@inploi/plugin-chatbot 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var Sy=Object.defineProperty;var My=(Et,Je,Fe)=>Je in Et?Sy(Et,Je,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Et[Je]=Fe;var nf=(Et,Je,Fe)=>(My(Et,typeof Je!="symbol"?Je+"":Je,Fe),Fe);(function(){"use strict";var Et=e=>e,Je=class extends Error{constructor(){super("Not found"),this.name="NotFoundError"}},Fe,V,Gs,Zs,Vt,Js,Qs,No,ea,Qt={},ta=[],rf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,fr=Array.isArray;function Qe(e,t){for(var n in t)e[n]=t[n];return e}function na(e){var t=e.parentNode;t&&t.removeChild(e)}function R(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Fe.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Cn(e,s,r,o,null)}function Cn(e,t,n,r,o){var i={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:o??++Gs};return o==null&&V.vnode!=null&&V.vnode(i),i}function ra(){return{current:null}}function ue(e){return e.children}function Pe(e,t){this.props=e,this.context=t}function hr(e,t){if(t==null)return e.__?hr(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"?hr(e):null}function oa(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 oa(e)}}function Ro(e){(!e.__d&&(e.__d=!0)&&Vt.push(e)&&!pr.__r++||Js!==V.debounceRendering)&&((Js=V.debounceRendering)||Qs)(pr)}function pr(){var e,t,n,r,o,i,s,a,c;for(Vt.sort(No);e=Vt.shift();)e.__d&&(t=Vt.length,r=void 0,o=void 0,i=void 0,a=(s=(n=e).__v).__e,(c=n.__P)&&(r=[],o=[],(i=Qe({},s)).__v=s.__v+1,Fo(c,s,i,n.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??hr(s),s.__h,o),da(r,s,o),s.__e!=a&&oa(s)),Vt.length>t&&Vt.sort(No));pr.__r=0}function ia(e,t,n,r,o,i,s,a,c,u,d){var l,f,h,p,m,y,x,g,w,M,S=0,F=r&&r.__k||ta,N=F.length,C=N,E=t.length;for(n.__k=[],l=0;l<E;l++)(p=n.__k[l]=(p=t[l])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?Cn(null,p,null,null,p):fr(p)?Cn(ue,{children:p},null,null,null):p.__b>0?Cn(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(g=of(p,F,x=l+S,C))===-1?h=Qt:(h=F[g]||Qt,F[g]=void 0,C--),Fo(e,p,h,o,i,s,a,c,u,d),m=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&Io(h.ref,null,p),d.push(f,p.__c||m,p)),m!=null&&(y==null&&(y=m),M=!(w=h===Qt||h.__v===null)&&g===x,w?g==-1&&S--:g!==x&&(g===x+1?(S++,M=!0):g>x?C>E-x?(S+=g-x,M=!0):S--:S=g<x&&g==x-1?g-x:0),x=l+S,M=M||g==l&&!w,typeof p.type!="function"||g===x&&h.__k!==p.__k?typeof p.type=="function"||M?p.__d!==void 0?(c=p.__d,p.__d=void 0):c=m.nextSibling:c=aa(e,m,c):c=sa(p,c,e),typeof n.type=="function"&&(n.__d=c)));for(n.__e=y,l=N;l--;)F[l]!=null&&(typeof n.type=="function"&&F[l].__e!=null&&F[l].__e==n.__d&&(n.__d=F[l].__e.nextSibling),fa(F[l],F[l]))}function sa(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t=typeof r.type=="function"?sa(r,t,n):aa(n,r.__e,t));return t}function et(e,t){return t=t||[],e==null||typeof e=="boolean"||(fr(e)?e.some(function(n){et(n,t)}):t.push(e)),t}function aa(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 of(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&o==c.key&&i===c.type)return a;a++}}return-1}function sf(e,t,n,r,o){var i;for(i in n)i==="children"||i==="key"||i in t||mr(e,i,null,n[i],r);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||n[i]===t[i]||mr(e,i,t[i],n[i],r)}function ca(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||rf.test(t)?n:n+"px"}function mr(e,t,n,r,o){var i;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||ca(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ca(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?ua:la,i):e.removeEventListener(t,i?ua:la,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function la(e){return this.l[e.type+!1](V.event?V.event(e):e)}function ua(e){return this.l[e.type+!0](V.event?V.event(e):e)}function Fo(e,t,n,r,o,i,s,a,c,u){var d,l,f,h,p,m,y,x,g,w,M,S,F,N,C,E=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,i=[a]),(d=V.__b)&&d(t);try{e:if(typeof E=="function"){if(x=t.props,g=(d=E.contextType)&&r[d.__c],w=d?g?g.props.value:d.__:r,n.__c?y=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(x,w):(t.__c=l=new Pe(x,w),l.constructor=E,l.render=cf),g&&g.sub(l),l.props=x,l.state||(l.state={}),l.context=w,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Qe({},l.__s)),Qe(l.__s,E.getDerivedStateFromProps(x,l.__s))),h=l.props,p=l.state,l.__v=t,f)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&x!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(x,w),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(x,l.__s,w)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=x,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(q){q&&(q.__=t)}),M=0;M<l._sb.length;M++)l.__h.push(l._sb[M]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(x,l.__s,w),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,m)})}if(l.context=w,l.props=x,l.__P=e,l.__e=!1,S=V.__r,F=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),N=0;N<l._sb.length;N++)l.__h.push(l._sb[N]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++F<25);l.state=l.__s,l.getChildContext!=null&&(r=Qe(Qe({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(h,p)),ia(e,fr(C=d!=null&&d.type===ue&&d.key==null?d.props.children:d)?C:[C],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),y&&(l.__E=l.__=null)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=af(n.__e,t,n,r,o,i,s,c,u);(d=V.diffed)&&d(t)}catch(q){t.__v=null,(c||i!=null)&&(t.__e=a,t.__h=!!c,i[i.indexOf(a)]=null),V.__e(q,t,n)}}function da(e,t,n){for(var r=0;r<n.length;r++)Io(n[r],n[++r],n[++r]);V.__c&&V.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){V.__e(i,o.__v)}})}function af(e,t,n,r,o,i,s,a,c){var u,d,l,f=n.props,h=t.props,p=t.type,m=0;if(p==="svg"&&(o=!0),i!=null){for(;m<i.length;m++)if((u=i[m])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,i[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),i=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(i=i&&Fe.call(e.childNodes),d=(f=n.props||Qt).dangerouslySetInnerHTML,l=h.dangerouslySetInnerHTML,!a){if(i!=null)for(f={},m=0;m<e.attributes.length;m++)f[e.attributes[m].name]=e.attributes[m].value;(l||d)&&(l&&(d&&l.__html==d.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(sf(e,h,f,o,a),l)t.__k=[];else if(ia(e,fr(m=t.props.children)?m:[m],t,n,r,o&&p!=="foreignObject",i,s,i?i[0]:n.__k&&hr(n,0),a,c),i!=null)for(m=i.length;m--;)i[m]!=null&&na(i[m]);a||("value"in h&&(m=h.value)!==void 0&&(m!==e.value||p==="progress"&&!m||p==="option"&&m!==f.value)&&mr(e,"value",m,f.value,!1),"checked"in h&&(m=h.checked)!==void 0&&m!==e.checked&&mr(e,"checked",m,f.checked,!1))}return e}function Io(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){V.__e(r,n)}}function fa(e,t,n){var r,o;if(V.unmount&&V.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Io(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){V.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&fa(r[o],t,n||typeof e.type!="function");n||e.__e==null||na(e.__e),e.__=e.__e=e.__d=void 0}function cf(e,t,n){return this.constructor(e,n)}function en(e,t,n){var r,o,i,s;V.__&&V.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Fo(t,e=(!r&&n||t).__k=R(ue,null,[e]),o||Qt,Qt,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?Fe.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),da(i,e,s)}function ha(e,t){en(e,t,ha)}function lf(e,t,n){var r,o,i,s,a=Qe({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Fe.call(arguments,2):n),Cn(e.type,a,r||e.key,o||e.ref,null)}function Ie(e,t){var n={__c:t="__cC"+ea++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Ro(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Fe=ta.slice,V={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Gs=0,Zs=function(e){return e!=null&&e.constructor===void 0},Pe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qe({},this.state),typeof e=="function"&&(e=e(Qe({},n),this.props)),e&&Qe(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ro(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ro(this))},Pe.prototype.render=ue,Vt=[],Qs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,No=function(e,t){return e.__v.__b-t.__v.__b},pr.__r=0,ea=0;var tt,J,Do,pa,tn=0,ma=[],vr=[],va=V.__b,ga=V.__r,ba=V.diffed,ya=V.__c,wa=V.unmount;function Ot(e,t){V.__h&&V.__h(J,e,tn||t),tn=0;var n=J.__H||(J.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:vr}),n.__[e]}function ae(e){return tn=1,gr($a,e)}function gr(e,t,n){var r=Ot(tt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$a(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=J,!J.u)){var o=function(a,c,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!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};J.u=!0;var i=J.shouldComponentUpdate,s=J.componentWillUpdate;J.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},J.shouldComponentUpdate=o}return r.__N||r.__}function G(e,t){var n=Ot(tt++,3);!V.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,J.__H.__h.push(n))}function Be(e,t){var n=Ot(tt++,4);!V.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,J.__h.push(n))}function U(e){return tn=5,de(function(){return{current:e}},[])}function _a(e,t,n){tn=6,Be(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 de(e,t){var n=Ot(tt++,7);return Bo(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function me(e,t){return tn=8,de(function(){return e},t)}function we(e){var t=J.context[e.__c],n=Ot(tt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(J)),t.props.value):e.__}function xa(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function uf(e){var t=Ot(tt++,10),n=ae();return t.__=e,J.componentDidCatch||(J.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function br(){var e=Ot(tt++,11);if(!e.__){for(var t=J.__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 df(){for(var e;e=ma.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yr),e.__H.__h.forEach(zo),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){J=null,va&&va(e)},V.__r=function(e){ga&&ga(e),tt=0;var t=(J=e.__c).__H;t&&(Do===J?(t.__h=[],J.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=vr,n.__N=n.i=void 0})):(t.__h.forEach(yr),t.__h.forEach(zo),t.__h=[],tt=0)),Do=J},V.diffed=function(e){ba&&ba(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ma.push(t)!==1&&pa===V.requestAnimationFrame||((pa=V.requestAnimationFrame)||ff)(df)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==vr&&(n.__=n.__V),n.i=void 0,n.__V=vr})),Do=J=null},V.__c=function(e,t){t.some(function(n){try{n.__h.forEach(yr),n.__h=n.__h.filter(function(r){return!r.__||zo(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],V.__e(r,n.__v)}}),ya&&ya(e,t)},V.unmount=function(e){wa&&wa(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{yr(r)}catch(o){t=o}}),n.__H=void 0,t&&V.__e(t,n.__v))};var ka=typeof requestAnimationFrame=="function";function ff(e){var t,n=function(){clearTimeout(r),ka&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ka&&(t=requestAnimationFrame(n))}function yr(e){var t=J,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),J=t}function zo(e){var t=J;e.__c=e.__(),J=t}function Bo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function $a(e,t){return typeof t=="function"?t(e):t}function wr(){throw new Error("Cycle detected")}var hf=Symbol.for("preact-signals");function _r(){if(ft>1)ft--;else{for(var e,t=!1;An!==void 0;){var n=An;for(An=void 0,jo++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ma(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(jo=0,ft--,t)throw e}}function pf(e){if(ft>0)return e();ft++;try{return e()}finally{_r()}}var oe=void 0,An=void 0,ft=0,jo=0,xr=0;function Sa(e){if(oe!==void 0){var t=e.n;if(t===void 0||t.t!==oe)return t={i:0,S:e,p:oe.s,n:void 0,t:oe,e:void 0,x:void 0,r:t},oe.s!==void 0&&(oe.s.n=t),oe.s=t,e.n=t,32&oe.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=oe.s,t.n=void 0,oe.s.n=t,oe.s=t),t}}function ve(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ve.prototype.brand=hf,ve.prototype.h=function(){return!0},ve.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)},ve.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)}},ve.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}})},ve.prototype.valueOf=function(){return this.value},ve.prototype.toString=function(){return this.value+""},ve.prototype.toJSON=function(){return this.value},ve.prototype.peek=function(){return this.v},Object.defineProperty(ve.prototype,"value",{get:function(){var e=Sa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(oe instanceof ht&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){jo>100&&wr(),this.v=e,this.i++,xr++,ft++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{_r()}}}});function Pn(e){return new ve(e)}function Ma(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 Ta(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 Ca(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 ht(e){ve.call(this,void 0),this.x=e,this.s=void 0,this.g=xr-1,this.f=4}(ht.prototype=new ve).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===xr))return!0;if(this.g=xr,this.f|=1,this.i>0&&!Ma(this))return this.f&=-2,!0;var e=oe;try{Ta(this),oe=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 oe=e,Ca(this),this.f&=-2,!0},ht.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)}ve.prototype.S.call(this,e)},ht.prototype.U=function(e){if(this.t!==void 0&&(ve.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)}},ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},ht.prototype.peek=function(){if(this.h()||wr(),16&this.f)throw this.v;return this.v},Object.defineProperty(ht.prototype,"value",{get:function(){1&this.f&&wr();var e=Sa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function mf(e){return new ht(e)}function Aa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){ft++;var n=oe;oe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Ho(e),r}finally{oe=n,_r()}}}function Ho(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Aa(e)}function vf(e){if(oe!==this)throw new Error("Out-of-order effect");Ca(this),oe=e,this.f&=-2,8&this.f&&Ho(this),_r()}function En(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}En.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()}},En.prototype.S=function(){1&this.f&&wr(),this.f|=1,this.f&=-9,Aa(this),Ta(this),ft++;var e=oe;return oe=this,vf.bind(this,e)},En.prototype.N=function(){2&this.f||(this.f|=2,this.o=An,An=this)},En.prototype.d=function(){this.f|=8,1&this.f||Ho(this)};function Uo(e){var t=new En(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var Xo;function nn(e,t){V[e]=t.bind(null,V[e]||function(){})}function kr(e){Xo&&Xo(),Xo=e&&e.S()}function Pa(e){var t=this,n=e.data,r=bf(n);r.value=n;var o=de(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Zs(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},mf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}Pa.displayName="_st",Object.defineProperties(ve.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Pa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),nn("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var o in r)if(o!=="children"){var i=r[o];i instanceof ve&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)}),nn("__r",function(e,t){kr();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(o){var i;return Uo(function(){i=this}),i.c=function(){r.__$f|=1,r.setState({})},i}())),kr(n),e(t)}),nn("__e",function(e,t,n,r){kr(),e(t,n,r)}),nn("diffed",function(e,t){kr();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var i=n.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in r)&&(a.d(),i[s]=void 0)}else n.U=i={};for(var c in r){var u=i[c],d=r[c];u===void 0?(u=gf(n,c,d,o),i[c]=u):u.o(d,o)}}}e(t)});function gf(e,t,n,r){var o=t in e&&e.ownerSVGElement===void 0,i=Pn(n);return{o:function(s,a){i.value=s,r=a},d:Uo(function(){var s=i.value.value;r[t]!==s&&(r[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}nn("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 o in r){var i=r[o];i&&i.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),nn("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),Pe.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 o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function bf(e){return de(function(){return Pn(e)},[])}var yf=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function $r(e,t){if(!e)throw new Error(t)}function Te(){return Te=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},Te.apply(this,arguments)}function Ea(e,t){for(var n in t)e[n]=t[n];return e}function qo(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 Wo(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Sr(e){this.props=e}function Va(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:qo(this.props,o)}function r(o){return this.shouldComponentUpdate=n,R(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Sr.prototype=new Pe).isPureReactComponent=!0,Sr.prototype.shouldComponentUpdate=function(e,t){return qo(this.props,e)||qo(this.state,t)};var Oa=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Oa&&Oa(e)};var wf=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _e(e){function t(n){var r=Ea({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=wf,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var La=function(e,t){return e==null?null:et(et(e).map(t))},je={map:La,forEach:La,count:function(e){return e?et(e).length:0},only:function(e){var t=et(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:et},_f=V.__e;V.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}_f(e,t,n,r)};var Na=V.unmount;function Ra(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=Ea({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ra(r,t,n)})),e}function Fa(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Fa(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 rn(){this.__u=0,this.t=null,this.__b=null}function Ia(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ko(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return R(n,i)}return o.displayName="Lazy",o.__f=!0,o}function on(){this.u=null,this.o=null}V.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Na&&Na(e)},(rn.prototype=new Pe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Ia(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Fa(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},rn.prototype.componentWillUnmount=function(){this.t=[]},rn.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]=Ra(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&R(ue,null,e.fallback);return o&&(o.__h=null),[R(ue,null,t.__a?null:e.children),o]};var Da=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 xf(e){return this.getChildContext=function(){return e.context},e.children}function kf(e){var t=this,n=e.i;t.componentWillUnmount=function(){en(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,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),en(R(xf,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function za(e,t){var n=R(kf,{__v:e,i:t});return n.containerInfo=t,n}(on.prototype=new Pe).__a=function(e){var t=this,n=Ia(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Da(t,e,r)):o()};n?n(i):i()}},on.prototype.render=function(e){this.u=null,this.o=new Map;var t=et(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},on.prototype.componentDidUpdate=on.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Da(e,n,t)})};var Ba=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$f=/^(?: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]/,Sf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Mf=/[A-Z0-9]/g,Tf=typeof document<"u",Cf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ja(e,t,n){return t.__k==null&&(t.textContent=""),en(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ha(e,t,n){return ha(e,t),typeof n=="function"&&n(),e?e.__c:null}Pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ua=V.event;function Af(){}function Pf(){return this.cancelBubble}function Ef(){return this.defaultPrevented}V.event=function(e){return Ua&&(e=Ua(e)),e.persist=Af,e.isPropagationStopped=Pf,e.isDefaultPrevented=Ef,e.nativeEvent=e};var Yo,Vf={enumerable:!1,configurable:!0,get:function(){return this.class}},Xa=V.vnode;V.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Tf&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Cf(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Sf.test(i)?i=a:r.indexOf("-")===-1&&$f.test(i)?i=i.replace(Mf,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=et(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=et(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Vf)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Ba,Xa&&Xa(e)};var qa=V.__r;V.__r=function(e){qa&&qa(e),Yo=e.__c};var Wa=V.diffed;V.diffed=function(e){Wa&&Wa(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),Yo=null};var Ka={ReactCurrentDispatcher:{current:{readContext:function(e){return Yo.__n[e.__c].props.value}}}},Of="17.0.2";function Ya(e){return R.bind(null,e)}function pt(e){return!!e&&e.$$typeof===Ba}function mt(e){return pt(e)?lf.apply(null,arguments):e}function Ga(e){return!!e.__k&&(en(null,e),!0)}function Za(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ja=function(e,t){return e(t)},Mr=function(e,t){return e(t)},Qa=ue;function Go(e){e()}function ec(e){return e}function tc(){return[!1,Go]}var Tr=Be;function nc(e,t){var n=t(),r=ae({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Be(function(){o.__=n,o.v=t,Wo(o.__,t())||i({h:o})},[e,n,t]),G(function(){return Wo(o.__,o.v())||i({h:o}),e(function(){Wo(o.__,o.v())||i({h:o})})},[e]),n}var De={useState:ae,useId:br,useReducer:gr,useEffect:G,useLayoutEffect:Be,useInsertionEffect:Tr,useTransition:tc,useDeferredValue:ec,useSyncExternalStore:nc,startTransition:Go,useRef:U,useImperativeHandle:_a,useMemo:de,useCallback:me,useContext:we,useDebugValue:xa,version:"17.0.2",Children:je,render:ja,hydrate:Ha,unmountComponentAtNode:Ga,createPortal:za,createElement:R,createContext:Ie,createFactory:Ya,cloneElement:mt,createRef:ra,Fragment:ue,isValidElement:pt,findDOMNode:Za,Component:Pe,PureComponent:Sr,memo:Va,forwardRef:_e,flushSync:Mr,unstable_batchedUpdates:Ja,StrictMode:Qa,Suspense:rn,SuspenseList:on,lazy:Ko,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ka};const Lf=Object.freeze(Object.defineProperty({__proto__:null,Children:je,Component:Pe,Fragment:ue,PureComponent:Sr,StrictMode:Qa,Suspense:rn,SuspenseList:on,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ka,cloneElement:mt,createContext:Ie,createElement:R,createFactory:Ya,createPortal:za,createRef:ra,default:De,findDOMNode:Za,flushSync:Mr,forwardRef:_e,hydrate:Ha,isValidElement:pt,lazy:Ko,memo:Va,render:ja,startTransition:Go,unmountComponentAtNode:Ga,unstable_batchedUpdates:Ja,useCallback:me,useContext:we,useDebugValue:xa,useDeferredValue:ec,useEffect:G,useErrorBoundary:uf,useId:br,useImperativeHandle:_a,useInsertionEffect:Tr,useLayoutEffect:Be,useMemo:de,useReducer:gr,useRef:U,useState:ae,useSyncExternalStore:nc,useTransition:tc,version:Of},Symbol.toStringTag,{value:"Module"}));function sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Nf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function rc(...e){return t=>e.forEach(n=>Nf(n,t))}function Vn(...e){return me(rc(...e),e)}function Rf(e,t=[]){let n=[];function r(i,s){const a=Ie(s),c=n.length;n=[...n,s];function u(l){const{scope:f,children:h,...p}=l,m=(f==null?void 0:f[e][c])||a,y=de(()=>p,Object.values(p));return R(m.Provider,{value:y},h)}function d(l,f){const h=(f==null?void 0:f[e][c])||a,p=we(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(s=>Ie(s));return function(a){const c=(a==null?void 0:a[e])||i;return de(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Ff(o,...t)]}function Ff(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return de(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Zo=globalThis!=null&&globalThis.document?Be:()=>{},If=Lf["useId".toString()]||(()=>{});let Df=0;function Jo(e){const[t,n]=ae(If());return Zo(()=>{e||n(r=>r??String(Df++))},[e]),e||(t?`radix-${t}`:"")}function Lt(e){const t=U(e);return G(()=>{t.current=e}),de(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function zf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Bf({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=Lt(n),c=me(u=>{if(i){const l=typeof u=="function"?u(e):u;l!==e&&a(l)}else o(u)},[i,e,o,a]);return[s,c]}function Bf({defaultProp:e,onChange:t}){const n=ae(e),[r]=n,o=U(r),i=Lt(t);return G(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Qo=_e((e,t)=>{const{children:n,...r}=e,o=je.toArray(n),i=o.find(Hf);if(i){const s=i.props.children,a=o.map(c=>c===i?je.count(s)>1?je.only(null):pt(s)?s.props.children:null:c);return R(ei,Te({},r,{ref:t}),pt(s)?mt(s,void 0,a):null)}return R(ei,Te({},r,{ref:t}),n)});Qo.displayName="Slot";const ei=_e((e,t)=>{const{children:n,...r}=e;return pt(n)?mt(n,{...Uf(r,n.props),ref:t?rc(t,n.ref):n.ref}):je.count(n)>1?je.only(null):null});ei.displayName="SlotClone";const jf=({children:e})=>R(ue,null,e);function Hf(e){return pt(e)&&e.type===jf}function Uf(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const ti=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=_e((r,o)=>{const{asChild:i,...s}=r,a=i?Qo:t;return G(()=>{window[Symbol.for("radix-ui")]=!0},[]),R(a,Te({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xf(e,t){e&&Mr(()=>e.dispatchEvent(t))}function qf(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e);G(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ni="dismissableLayer.update",Wf="dismissableLayer.pointerDownOutside",Kf="dismissableLayer.focusOutside";let oc;const Yf=Ie({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gf=_e((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=we(Yf),[l,f]=ae(null),h=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=ae({}),m=Vn(t,C=>f(C)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(x),w=l?y.indexOf(l):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=g,F=Zf(C=>{const E=C.target,q=[...d.branches].some(K=>K.contains(E));!S||q||(i==null||i(C),a==null||a(C),C.defaultPrevented||c==null||c())},h),N=Jf(C=>{const E=C.target;[...d.branches].some(K=>K.contains(E))||(s==null||s(C),a==null||a(C),C.defaultPrevented||c==null||c())},h);return qf(C=>{w===d.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},h),G(()=>{if(l)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(oc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),ic(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=oc)}},[l,h,r,d]),G(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),ic())},[l,d]),G(()=>{const C=()=>p({});return document.addEventListener(ni,C),()=>document.removeEventListener(ni,C)},[]),R(ti.div,Te({},u,{ref:m,style:{pointerEvents:M?S?"auto":"none":void 0,...e.style},onFocusCapture:sn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:sn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:sn(e.onPointerDownCapture,F.onPointerDownCapture)}))});function Zf(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e),r=U(!1),o=U(()=>{});return G(()=>{const i=a=>{if(a.target&&!r.current){let u=function(){sc(Wf,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jf(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e),r=U(!1);return G(()=>{const o=i=>{i.target&&!r.current&&sc(Kf,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ic(){const e=new CustomEvent(ni);document.dispatchEvent(e)}function sc(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xf(o,i):o.dispatchEvent(i)}const ri="focusScope.autoFocusOnMount",oi="focusScope.autoFocusOnUnmount",ac={bubbles:!1,cancelable:!0},Qf=_e((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,c]=ae(null),u=Lt(o),d=Lt(i),l=U(null),f=Vn(t,m=>c(m)),h=U({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;G(()=>{if(r){let m=function(w){if(h.paused||!a)return;const M=w.target;a.contains(M)?l.current=M:vt(l.current,{select:!0})},y=function(w){if(h.paused||!a)return;const M=w.relatedTarget;M!==null&&(a.contains(M)||vt(l.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&vt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(x);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,a,h.paused]),G(()=>{if(a){uc.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(ri,ac);a.addEventListener(ri,u),a.dispatchEvent(x),x.defaultPrevented||(eh(ih(cc(a)),{select:!0}),document.activeElement===m&&vt(a))}return()=>{a.removeEventListener(ri,u),setTimeout(()=>{const x=new CustomEvent(oi,ac);a.addEventListener(oi,d),a.dispatchEvent(x),x.defaultPrevented||vt(m??document.body,{select:!0}),a.removeEventListener(oi,d),uc.remove(h)},0)}}},[a,u,d,h]);const p=me(m=>{if(!n&&!r||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(y&&x){const g=m.currentTarget,[w,M]=th(g);w&&M?!m.shiftKey&&x===M?(m.preventDefault(),n&&vt(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&vt(M,{select:!0})):x===g&&m.preventDefault()}},[n,r,h.paused]);return R(ti.div,Te({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function eh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vt(r,{select:t}),document.activeElement!==n)return}function th(e){const t=cc(e),n=lc(t,e),r=lc(t.reverse(),e);return[n,r]}function cc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lc(e,t){for(const n of e)if(!nh(n,{upTo:t}))return n}function nh(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 rh(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rh(e)&&t&&e.select()}}const uc=oh();function oh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dc(e,t),e.unshift(t)},remove(t){var n;e=dc(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function dc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ih(e){return e.filter(t=>t.tagName!=="A")}function sh(e,t){return gr((n,r)=>{const o=t[n][r];return o??n},e)}const ii=e=>{const{present:t,children:n}=e,r=ah(t),o=typeof n=="function"?n({present:r.isPresent}):je.only(n),i=Vn(r.ref,o.ref);return typeof n=="function"||r.isPresent?mt(o,{ref:i}):null};ii.displayName="Presence";function ah(e){const[t,n]=ae(),r=U({}),o=U(e),i=U("none"),s=e?"mounted":"unmounted",[a,c]=sh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return G(()=>{const u=Cr(r.current);i.current=a==="mounted"?u:"none"},[a]),Zo(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,h=Cr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Zo(()=>{if(t){const u=l=>{const h=Cr(r.current).includes(l.animationName);l.target===t&&h&&Mr(()=>c("ANIMATION_END"))},d=l=>{l.target===t&&(i.current=Cr(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 c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:me(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Cr(e){return(e==null?void 0:e.animationName)||"none"}let si=0;function ch(){G(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:fc()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:fc()),si++,()=>{si===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),si--}},[])}function fc(){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 He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},He.apply(this,arguments)};function hc(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ar="right-scroll-bar-position",Pr="width-before-scroll-bar",uh="with-scroll-bars-hidden",dh="--removed-body-scroll-bar-size";function fh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hh(e,t){var n=ae(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function ph(e,t){return hh(t||null,function(n){return e.forEach(function(r){return fh(r,n)})})}function mh(e){return e}function vh(e,t){t===void 0&&(t=mh);var n=[],r=!1,o={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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var c=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function gh(e){e===void 0&&(e={});var t=vh(null);return t.options=He({async:!0,ssr:!1},e),t}var pc=function(e){var t=e.sideCar,n=hc(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 R(r,He({},n))};pc.isSideCarExport=!0;function bh(e,t){return e.useMedium(t),pc}var mc=gh(),ai=function(){},Er=_e(function(e,t){var n=U(null),r=ae({onScrollCapture:ai,onWheelCapture:ai,onTouchMoveCapture:ai}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,g=hc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=f,M=ph([n,t]),S=He(He({},g),o);return R(ue,null,d&&R(w,{sideCar:mc,removeScrollBar:u,shards:l,noIsolation:h,inert:p,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),s?mt(je.only(a),He(He({},S),{ref:M})):R(x,He({},S,{className:c,ref:M}),a))});Er.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Er.classNames={fullWidth:Pr,zeroRight:Ar};var vc,yh=function(){if(vc)return vc;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yh();return t&&e.setAttribute("nonce",t),e}function _h(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wh())&&(_h(t,n),xh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$h=function(){var e=kh();return function(t,n){G(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gc=function(){var e=$h(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sh={left:0,top:0,right:0,gap:0},ci=function(e){return parseInt(e||"",10)||0},Mh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ci(n),ci(r),ci(o)]},Th=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sh;var t=Mh(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])}},Ch=gc(),Ah=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
1
+ var Sy=Object.defineProperty;var My=(Et,Je,Ie)=>Je in Et?Sy(Et,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Et[Je]=Ie;var nf=(Et,Je,Ie)=>(My(Et,typeof Je!="symbol"?Je+"":Je,Ie),Ie);(function(){"use strict";var Et=e=>e,Je=class extends Error{constructor(){super("Not found"),this.name="NotFoundError"}},Ie,V,Gs,Zs,Vt,Js,Qs,No,ea,Qt={},ta=[],rf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,hr=Array.isArray;function Qe(e,t){for(var n in t)e[n]=t[n];return e}function na(e){var t=e.parentNode;t&&t.removeChild(e)}function R(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ie.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return An(e,s,r,o,null)}function An(e,t,n,r,o){var i={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:o??++Gs};return o==null&&V.vnode!=null&&V.vnode(i),i}function ra(){return{current:null}}function ue(e){return e.children}function Pe(e,t){this.props=e,this.context=t}function pr(e,t){if(t==null)return e.__?pr(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"?pr(e):null}function oa(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 oa(e)}}function Ro(e){(!e.__d&&(e.__d=!0)&&Vt.push(e)&&!mr.__r++||Js!==V.debounceRendering)&&((Js=V.debounceRendering)||Qs)(mr)}function mr(){var e,t,n,r,o,i,s,a,c;for(Vt.sort(No);e=Vt.shift();)e.__d&&(t=Vt.length,r=void 0,o=void 0,i=void 0,a=(s=(n=e).__v).__e,(c=n.__P)&&(r=[],o=[],(i=Qe({},s)).__v=s.__v+1,Io(c,s,i,n.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??pr(s),s.__h,o),da(r,s,o),s.__e!=a&&oa(s)),Vt.length>t&&Vt.sort(No));mr.__r=0}function ia(e,t,n,r,o,i,s,a,c,u,d){var l,f,h,p,m,y,x,g,w,M,S=0,I=r&&r.__k||ta,N=I.length,C=N,E=t.length;for(n.__k=[],l=0;l<E;l++)(p=n.__k[l]=(p=t[l])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?An(null,p,null,null,p):hr(p)?An(ue,{children:p},null,null,null):p.__b>0?An(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(g=of(p,I,x=l+S,C))===-1?h=Qt:(h=I[g]||Qt,I[g]=void 0,C--),Io(e,p,h,o,i,s,a,c,u,d),m=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&Fo(h.ref,null,p),d.push(f,p.__c||m,p)),m!=null&&(y==null&&(y=m),M=!(w=h===Qt||h.__v===null)&&g===x,w?g==-1&&S--:g!==x&&(g===x+1?(S++,M=!0):g>x?C>E-x?(S+=g-x,M=!0):S--:S=g<x&&g==x-1?g-x:0),x=l+S,M=M||g==l&&!w,typeof p.type!="function"||g===x&&h.__k!==p.__k?typeof p.type=="function"||M?p.__d!==void 0?(c=p.__d,p.__d=void 0):c=m.nextSibling:c=aa(e,m,c):c=sa(p,c,e),typeof n.type=="function"&&(n.__d=c)));for(n.__e=y,l=N;l--;)I[l]!=null&&(typeof n.type=="function"&&I[l].__e!=null&&I[l].__e==n.__d&&(n.__d=I[l].__e.nextSibling),fa(I[l],I[l]))}function sa(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t=typeof r.type=="function"?sa(r,t,n):aa(n,r.__e,t));return t}function et(e,t){return t=t||[],e==null||typeof e=="boolean"||(hr(e)?e.some(function(n){et(n,t)}):t.push(e)),t}function aa(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 of(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&o==c.key&&i===c.type)return a;a++}}return-1}function sf(e,t,n,r,o){var i;for(i in n)i==="children"||i==="key"||i in t||vr(e,i,null,n[i],r);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||n[i]===t[i]||vr(e,i,t[i],n[i],r)}function ca(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||rf.test(t)?n:n+"px"}function vr(e,t,n,r,o){var i;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||ca(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ca(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?ua:la,i):e.removeEventListener(t,i?ua:la,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function la(e){return this.l[e.type+!1](V.event?V.event(e):e)}function ua(e){return this.l[e.type+!0](V.event?V.event(e):e)}function Io(e,t,n,r,o,i,s,a,c,u){var d,l,f,h,p,m,y,x,g,w,M,S,I,N,C,E=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,i=[a]),(d=V.__b)&&d(t);try{e:if(typeof E=="function"){if(x=t.props,g=(d=E.contextType)&&r[d.__c],w=d?g?g.props.value:d.__:r,n.__c?y=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(x,w):(t.__c=l=new Pe(x,w),l.constructor=E,l.render=cf),g&&g.sub(l),l.props=x,l.state||(l.state={}),l.context=w,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Qe({},l.__s)),Qe(l.__s,E.getDerivedStateFromProps(x,l.__s))),h=l.props,p=l.state,l.__v=t,f)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&x!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(x,w),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(x,l.__s,w)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=x,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(q){q&&(q.__=t)}),M=0;M<l._sb.length;M++)l.__h.push(l._sb[M]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(x,l.__s,w),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,m)})}if(l.context=w,l.props=x,l.__P=e,l.__e=!1,S=V.__r,I=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),N=0;N<l._sb.length;N++)l.__h.push(l._sb[N]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++I<25);l.state=l.__s,l.getChildContext!=null&&(r=Qe(Qe({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(h,p)),ia(e,hr(C=d!=null&&d.type===ue&&d.key==null?d.props.children:d)?C:[C],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),y&&(l.__E=l.__=null)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=af(n.__e,t,n,r,o,i,s,c,u);(d=V.diffed)&&d(t)}catch(q){t.__v=null,(c||i!=null)&&(t.__e=a,t.__h=!!c,i[i.indexOf(a)]=null),V.__e(q,t,n)}}function da(e,t,n){for(var r=0;r<n.length;r++)Fo(n[r],n[++r],n[++r]);V.__c&&V.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){V.__e(i,o.__v)}})}function af(e,t,n,r,o,i,s,a,c){var u,d,l,f=n.props,h=t.props,p=t.type,m=0;if(p==="svg"&&(o=!0),i!=null){for(;m<i.length;m++)if((u=i[m])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,i[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),i=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(i=i&&Ie.call(e.childNodes),d=(f=n.props||Qt).dangerouslySetInnerHTML,l=h.dangerouslySetInnerHTML,!a){if(i!=null)for(f={},m=0;m<e.attributes.length;m++)f[e.attributes[m].name]=e.attributes[m].value;(l||d)&&(l&&(d&&l.__html==d.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(sf(e,h,f,o,a),l)t.__k=[];else if(ia(e,hr(m=t.props.children)?m:[m],t,n,r,o&&p!=="foreignObject",i,s,i?i[0]:n.__k&&pr(n,0),a,c),i!=null)for(m=i.length;m--;)i[m]!=null&&na(i[m]);a||("value"in h&&(m=h.value)!==void 0&&(m!==e.value||p==="progress"&&!m||p==="option"&&m!==f.value)&&vr(e,"value",m,f.value,!1),"checked"in h&&(m=h.checked)!==void 0&&m!==e.checked&&vr(e,"checked",m,f.checked,!1))}return e}function Fo(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){V.__e(r,n)}}function fa(e,t,n){var r,o;if(V.unmount&&V.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Fo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){V.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&fa(r[o],t,n||typeof e.type!="function");n||e.__e==null||na(e.__e),e.__=e.__e=e.__d=void 0}function cf(e,t,n){return this.constructor(e,n)}function en(e,t,n){var r,o,i,s;V.__&&V.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Io(t,e=(!r&&n||t).__k=R(ue,null,[e]),o||Qt,Qt,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?Ie.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),da(i,e,s)}function ha(e,t){en(e,t,ha)}function lf(e,t,n){var r,o,i,s,a=Qe({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Ie.call(arguments,2):n),An(e.type,a,r||e.key,o||e.ref,null)}function Fe(e,t){var n={__c:t="__cC"+ea++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Ro(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Ie=ta.slice,V={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Gs=0,Zs=function(e){return e!=null&&e.constructor===void 0},Pe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qe({},this.state),typeof e=="function"&&(e=e(Qe({},n),this.props)),e&&Qe(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ro(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ro(this))},Pe.prototype.render=ue,Vt=[],Qs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,No=function(e,t){return e.__v.__b-t.__v.__b},mr.__r=0,ea=0;var tt,J,Do,pa,tn=0,ma=[],gr=[],va=V.__b,ga=V.__r,ba=V.diffed,ya=V.__c,wa=V.unmount;function Ot(e,t){V.__h&&V.__h(J,e,tn||t),tn=0;var n=J.__H||(J.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:gr}),n.__[e]}function ae(e){return tn=1,br($a,e)}function br(e,t,n){var r=Ot(tt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$a(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=J,!J.u)){var o=function(a,c,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!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};J.u=!0;var i=J.shouldComponentUpdate,s=J.componentWillUpdate;J.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},J.shouldComponentUpdate=o}return r.__N||r.__}function G(e,t){var n=Ot(tt++,3);!V.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,J.__H.__h.push(n))}function Be(e,t){var n=Ot(tt++,4);!V.__s&&Bo(n.__H,t)&&(n.__=e,n.i=t,J.__h.push(n))}function U(e){return tn=5,de(function(){return{current:e}},[])}function _a(e,t,n){tn=6,Be(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 de(e,t){var n=Ot(tt++,7);return Bo(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function me(e,t){return tn=8,de(function(){return e},t)}function we(e){var t=J.context[e.__c],n=Ot(tt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(J)),t.props.value):e.__}function xa(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function uf(e){var t=Ot(tt++,10),n=ae();return t.__=e,J.componentDidCatch||(J.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function yr(){var e=Ot(tt++,11);if(!e.__){for(var t=J.__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 df(){for(var e;e=ma.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(wr),e.__H.__h.forEach(zo),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){J=null,va&&va(e)},V.__r=function(e){ga&&ga(e),tt=0;var t=(J=e.__c).__H;t&&(Do===J?(t.__h=[],J.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=gr,n.__N=n.i=void 0})):(t.__h.forEach(wr),t.__h.forEach(zo),t.__h=[],tt=0)),Do=J},V.diffed=function(e){ba&&ba(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ma.push(t)!==1&&pa===V.requestAnimationFrame||((pa=V.requestAnimationFrame)||ff)(df)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==gr&&(n.__=n.__V),n.i=void 0,n.__V=gr})),Do=J=null},V.__c=function(e,t){t.some(function(n){try{n.__h.forEach(wr),n.__h=n.__h.filter(function(r){return!r.__||zo(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],V.__e(r,n.__v)}}),ya&&ya(e,t)},V.unmount=function(e){wa&&wa(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{wr(r)}catch(o){t=o}}),n.__H=void 0,t&&V.__e(t,n.__v))};var ka=typeof requestAnimationFrame=="function";function ff(e){var t,n=function(){clearTimeout(r),ka&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ka&&(t=requestAnimationFrame(n))}function wr(e){var t=J,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),J=t}function zo(e){var t=J;e.__c=e.__(),J=t}function Bo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function $a(e,t){return typeof t=="function"?t(e):t}function _r(){throw new Error("Cycle detected")}var hf=Symbol.for("preact-signals");function xr(){if(ft>1)ft--;else{for(var e,t=!1;Pn!==void 0;){var n=Pn;for(Pn=void 0,jo++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ma(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(jo=0,ft--,t)throw e}}function pf(e){if(ft>0)return e();ft++;try{return e()}finally{xr()}}var oe=void 0,Pn=void 0,ft=0,jo=0,kr=0;function Sa(e){if(oe!==void 0){var t=e.n;if(t===void 0||t.t!==oe)return t={i:0,S:e,p:oe.s,n:void 0,t:oe,e:void 0,x:void 0,r:t},oe.s!==void 0&&(oe.s.n=t),oe.s=t,e.n=t,32&oe.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=oe.s,t.n=void 0,oe.s.n=t,oe.s=t),t}}function ve(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ve.prototype.brand=hf,ve.prototype.h=function(){return!0},ve.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)},ve.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)}},ve.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}})},ve.prototype.valueOf=function(){return this.value},ve.prototype.toString=function(){return this.value+""},ve.prototype.toJSON=function(){return this.value},ve.prototype.peek=function(){return this.v},Object.defineProperty(ve.prototype,"value",{get:function(){var e=Sa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(oe instanceof ht&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){jo>100&&_r(),this.v=e,this.i++,kr++,ft++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{xr()}}}});function En(e){return new ve(e)}function Ma(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 Ta(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 Ca(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 ht(e){ve.call(this,void 0),this.x=e,this.s=void 0,this.g=kr-1,this.f=4}(ht.prototype=new ve).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===kr))return!0;if(this.g=kr,this.f|=1,this.i>0&&!Ma(this))return this.f&=-2,!0;var e=oe;try{Ta(this),oe=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 oe=e,Ca(this),this.f&=-2,!0},ht.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)}ve.prototype.S.call(this,e)},ht.prototype.U=function(e){if(this.t!==void 0&&(ve.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)}},ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},ht.prototype.peek=function(){if(this.h()||_r(),16&this.f)throw this.v;return this.v},Object.defineProperty(ht.prototype,"value",{get:function(){1&this.f&&_r();var e=Sa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function mf(e){return new ht(e)}function Aa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){ft++;var n=oe;oe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Ho(e),r}finally{oe=n,xr()}}}function Ho(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Aa(e)}function vf(e){if(oe!==this)throw new Error("Out-of-order effect");Ca(this),oe=e,this.f&=-2,8&this.f&&Ho(this),xr()}function Vn(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Vn.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()}},Vn.prototype.S=function(){1&this.f&&_r(),this.f|=1,this.f&=-9,Aa(this),Ta(this),ft++;var e=oe;return oe=this,vf.bind(this,e)},Vn.prototype.N=function(){2&this.f||(this.f|=2,this.o=Pn,Pn=this)},Vn.prototype.d=function(){this.f|=8,1&this.f||Ho(this)};function Uo(e){var t=new Vn(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var Xo;function nn(e,t){V[e]=t.bind(null,V[e]||function(){})}function $r(e){Xo&&Xo(),Xo=e&&e.S()}function Pa(e){var t=this,n=e.data,r=bf(n);r.value=n;var o=de(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Zs(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},mf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}Pa.displayName="_st",Object.defineProperties(ve.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Pa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),nn("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var o in r)if(o!=="children"){var i=r[o];i instanceof ve&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)}),nn("__r",function(e,t){$r();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(o){var i;return Uo(function(){i=this}),i.c=function(){r.__$f|=1,r.setState({})},i}())),$r(n),e(t)}),nn("__e",function(e,t,n,r){$r(),e(t,n,r)}),nn("diffed",function(e,t){$r();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var i=n.U;if(i)for(var s in i){var a=i[s];a!==void 0&&!(s in r)&&(a.d(),i[s]=void 0)}else n.U=i={};for(var c in r){var u=i[c],d=r[c];u===void 0?(u=gf(n,c,d,o),i[c]=u):u.o(d,o)}}}e(t)});function gf(e,t,n,r){var o=t in e&&e.ownerSVGElement===void 0,i=En(n);return{o:function(s,a){i.value=s,r=a},d:Uo(function(){var s=i.value.value;r[t]!==s&&(r[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}nn("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 o in r){var i=r[o];i&&i.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),nn("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),Pe.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 o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function bf(e){return de(function(){return En(e)},[])}var yf=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function rn(e,t){if(!e)throw new Error(t)}function Te(){return Te=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},Te.apply(this,arguments)}function Ea(e,t){for(var n in t)e[n]=t[n];return e}function qo(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 Wo(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Sr(e){this.props=e}function Va(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:qo(this.props,o)}function r(o){return this.shouldComponentUpdate=n,R(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Sr.prototype=new Pe).isPureReactComponent=!0,Sr.prototype.shouldComponentUpdate=function(e,t){return qo(this.props,e)||qo(this.state,t)};var Oa=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Oa&&Oa(e)};var wf=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _e(e){function t(n){var r=Ea({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=wf,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var La=function(e,t){return e==null?null:et(et(e).map(t))},je={map:La,forEach:La,count:function(e){return e?et(e).length:0},only:function(e){var t=et(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:et},_f=V.__e;V.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}_f(e,t,n,r)};var Na=V.unmount;function Ra(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=Ea({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ra(r,t,n)})),e}function Ia(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ia(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 on(){this.__u=0,this.t=null,this.__b=null}function Fa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ko(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return R(n,i)}return o.displayName="Lazy",o.__f=!0,o}function sn(){this.u=null,this.o=null}V.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Na&&Na(e)},(on.prototype=new Pe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Fa(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Ia(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},on.prototype.componentWillUnmount=function(){this.t=[]},on.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]=Ra(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&R(ue,null,e.fallback);return o&&(o.__h=null),[R(ue,null,t.__a?null:e.children),o]};var Da=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 xf(e){return this.getChildContext=function(){return e.context},e.children}function kf(e){var t=this,n=e.i;t.componentWillUnmount=function(){en(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,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),en(R(xf,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function za(e,t){var n=R(kf,{__v:e,i:t});return n.containerInfo=t,n}(sn.prototype=new Pe).__a=function(e){var t=this,n=Fa(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Da(t,e,r)):o()};n?n(i):i()}},sn.prototype.render=function(e){this.u=null,this.o=new Map;var t=et(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},sn.prototype.componentDidUpdate=sn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Da(e,n,t)})};var Ba=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$f=/^(?: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]/,Sf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Mf=/[A-Z0-9]/g,Tf=typeof document<"u",Cf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ja(e,t,n){return t.__k==null&&(t.textContent=""),en(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ha(e,t,n){return ha(e,t),typeof n=="function"&&n(),e?e.__c:null}Pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ua=V.event;function Af(){}function Pf(){return this.cancelBubble}function Ef(){return this.defaultPrevented}V.event=function(e){return Ua&&(e=Ua(e)),e.persist=Af,e.isPropagationStopped=Pf,e.isDefaultPrevented=Ef,e.nativeEvent=e};var Yo,Vf={enumerable:!1,configurable:!0,get:function(){return this.class}},Xa=V.vnode;V.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Tf&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Cf(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Sf.test(i)?i=a:r.indexOf("-")===-1&&$f.test(i)?i=i.replace(Mf,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=et(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=et(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Vf)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Ba,Xa&&Xa(e)};var qa=V.__r;V.__r=function(e){qa&&qa(e),Yo=e.__c};var Wa=V.diffed;V.diffed=function(e){Wa&&Wa(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),Yo=null};var Ka={ReactCurrentDispatcher:{current:{readContext:function(e){return Yo.__n[e.__c].props.value}}}},Of="17.0.2";function Ya(e){return R.bind(null,e)}function pt(e){return!!e&&e.$$typeof===Ba}function mt(e){return pt(e)?lf.apply(null,arguments):e}function Ga(e){return!!e.__k&&(en(null,e),!0)}function Za(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ja=function(e,t){return e(t)},Mr=function(e,t){return e(t)},Qa=ue;function Go(e){e()}function ec(e){return e}function tc(){return[!1,Go]}var Tr=Be;function nc(e,t){var n=t(),r=ae({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Be(function(){o.__=n,o.v=t,Wo(o.__,t())||i({h:o})},[e,n,t]),G(function(){return Wo(o.__,o.v())||i({h:o}),e(function(){Wo(o.__,o.v())||i({h:o})})},[e]),n}var De={useState:ae,useId:yr,useReducer:br,useEffect:G,useLayoutEffect:Be,useInsertionEffect:Tr,useTransition:tc,useDeferredValue:ec,useSyncExternalStore:nc,startTransition:Go,useRef:U,useImperativeHandle:_a,useMemo:de,useCallback:me,useContext:we,useDebugValue:xa,version:"17.0.2",Children:je,render:ja,hydrate:Ha,unmountComponentAtNode:Ga,createPortal:za,createElement:R,createContext:Fe,createFactory:Ya,cloneElement:mt,createRef:ra,Fragment:ue,isValidElement:pt,findDOMNode:Za,Component:Pe,PureComponent:Sr,memo:Va,forwardRef:_e,flushSync:Mr,unstable_batchedUpdates:Ja,StrictMode:Qa,Suspense:on,SuspenseList:sn,lazy:Ko,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ka};const Lf=Object.freeze(Object.defineProperty({__proto__:null,Children:je,Component:Pe,Fragment:ue,PureComponent:Sr,StrictMode:Qa,Suspense:on,SuspenseList:sn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ka,cloneElement:mt,createContext:Fe,createElement:R,createFactory:Ya,createPortal:za,createRef:ra,default:De,findDOMNode:Za,flushSync:Mr,forwardRef:_e,hydrate:Ha,isValidElement:pt,lazy:Ko,memo:Va,render:ja,startTransition:Go,unmountComponentAtNode:Ga,unstable_batchedUpdates:Ja,useCallback:me,useContext:we,useDebugValue:xa,useDeferredValue:ec,useEffect:G,useErrorBoundary:uf,useId:yr,useImperativeHandle:_a,useInsertionEffect:Tr,useLayoutEffect:Be,useMemo:de,useReducer:br,useRef:U,useState:ae,useSyncExternalStore:nc,useTransition:tc,version:Of},Symbol.toStringTag,{value:"Module"}));function an(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Nf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function rc(...e){return t=>e.forEach(n=>Nf(n,t))}function On(...e){return me(rc(...e),e)}function Rf(e,t=[]){let n=[];function r(i,s){const a=Fe(s),c=n.length;n=[...n,s];function u(l){const{scope:f,children:h,...p}=l,m=(f==null?void 0:f[e][c])||a,y=de(()=>p,Object.values(p));return R(m.Provider,{value:y},h)}function d(l,f){const h=(f==null?void 0:f[e][c])||a,p=we(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(s=>Fe(s));return function(a){const c=(a==null?void 0:a[e])||i;return de(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,If(o,...t)]}function If(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return de(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Zo=globalThis!=null&&globalThis.document?Be:()=>{},Ff=Lf["useId".toString()]||(()=>{});let Df=0;function Jo(e){const[t,n]=ae(Ff());return Zo(()=>{e||n(r=>r??String(Df++))},[e]),e||(t?`radix-${t}`:"")}function Lt(e){const t=U(e);return G(()=>{t.current=e}),de(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function zf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Bf({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=Lt(n),c=me(u=>{if(i){const l=typeof u=="function"?u(e):u;l!==e&&a(l)}else o(u)},[i,e,o,a]);return[s,c]}function Bf({defaultProp:e,onChange:t}){const n=ae(e),[r]=n,o=U(r),i=Lt(t);return G(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Qo=_e((e,t)=>{const{children:n,...r}=e,o=je.toArray(n),i=o.find(Hf);if(i){const s=i.props.children,a=o.map(c=>c===i?je.count(s)>1?je.only(null):pt(s)?s.props.children:null:c);return R(ei,Te({},r,{ref:t}),pt(s)?mt(s,void 0,a):null)}return R(ei,Te({},r,{ref:t}),n)});Qo.displayName="Slot";const ei=_e((e,t)=>{const{children:n,...r}=e;return pt(n)?mt(n,{...Uf(r,n.props),ref:t?rc(t,n.ref):n.ref}):je.count(n)>1?je.only(null):null});ei.displayName="SlotClone";const jf=({children:e})=>R(ue,null,e);function Hf(e){return pt(e)&&e.type===jf}function Uf(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const ti=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=_e((r,o)=>{const{asChild:i,...s}=r,a=i?Qo:t;return G(()=>{window[Symbol.for("radix-ui")]=!0},[]),R(a,Te({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xf(e,t){e&&Mr(()=>e.dispatchEvent(t))}function qf(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e);G(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ni="dismissableLayer.update",Wf="dismissableLayer.pointerDownOutside",Kf="dismissableLayer.focusOutside";let oc;const Yf=Fe({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gf=_e((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=we(Yf),[l,f]=ae(null),h=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=ae({}),m=On(t,C=>f(C)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(x),w=l?y.indexOf(l):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=g,I=Zf(C=>{const E=C.target,q=[...d.branches].some(K=>K.contains(E));!S||q||(i==null||i(C),a==null||a(C),C.defaultPrevented||c==null||c())},h),N=Jf(C=>{const E=C.target;[...d.branches].some(K=>K.contains(E))||(s==null||s(C),a==null||a(C),C.defaultPrevented||c==null||c())},h);return qf(C=>{w===d.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},h),G(()=>{if(l)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(oc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),ic(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=oc)}},[l,h,r,d]),G(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),ic())},[l,d]),G(()=>{const C=()=>p({});return document.addEventListener(ni,C),()=>document.removeEventListener(ni,C)},[]),R(ti.div,Te({},u,{ref:m,style:{pointerEvents:M?S?"auto":"none":void 0,...e.style},onFocusCapture:an(e.onFocusCapture,N.onFocusCapture),onBlurCapture:an(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:an(e.onPointerDownCapture,I.onPointerDownCapture)}))});function Zf(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e),r=U(!1),o=U(()=>{});return G(()=>{const i=a=>{if(a.target&&!r.current){let u=function(){sc(Wf,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jf(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e),r=U(!1);return G(()=>{const o=i=>{i.target&&!r.current&&sc(Kf,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ic(){const e=new CustomEvent(ni);document.dispatchEvent(e)}function sc(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xf(o,i):o.dispatchEvent(i)}const ri="focusScope.autoFocusOnMount",oi="focusScope.autoFocusOnUnmount",ac={bubbles:!1,cancelable:!0},Qf=_e((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,c]=ae(null),u=Lt(o),d=Lt(i),l=U(null),f=On(t,m=>c(m)),h=U({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;G(()=>{if(r){let m=function(w){if(h.paused||!a)return;const M=w.target;a.contains(M)?l.current=M:vt(l.current,{select:!0})},y=function(w){if(h.paused||!a)return;const M=w.relatedTarget;M!==null&&(a.contains(M)||vt(l.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&vt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(x);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,a,h.paused]),G(()=>{if(a){uc.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(ri,ac);a.addEventListener(ri,u),a.dispatchEvent(x),x.defaultPrevented||(eh(ih(cc(a)),{select:!0}),document.activeElement===m&&vt(a))}return()=>{a.removeEventListener(ri,u),setTimeout(()=>{const x=new CustomEvent(oi,ac);a.addEventListener(oi,d),a.dispatchEvent(x),x.defaultPrevented||vt(m??document.body,{select:!0}),a.removeEventListener(oi,d),uc.remove(h)},0)}}},[a,u,d,h]);const p=me(m=>{if(!n&&!r||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(y&&x){const g=m.currentTarget,[w,M]=th(g);w&&M?!m.shiftKey&&x===M?(m.preventDefault(),n&&vt(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&vt(M,{select:!0})):x===g&&m.preventDefault()}},[n,r,h.paused]);return R(ti.div,Te({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function eh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vt(r,{select:t}),document.activeElement!==n)return}function th(e){const t=cc(e),n=lc(t,e),r=lc(t.reverse(),e);return[n,r]}function cc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lc(e,t){for(const n of e)if(!nh(n,{upTo:t}))return n}function nh(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 rh(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rh(e)&&t&&e.select()}}const uc=oh();function oh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dc(e,t),e.unshift(t)},remove(t){var n;e=dc(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function dc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ih(e){return e.filter(t=>t.tagName!=="A")}function sh(e,t){return br((n,r)=>{const o=t[n][r];return o??n},e)}const ii=e=>{const{present:t,children:n}=e,r=ah(t),o=typeof n=="function"?n({present:r.isPresent}):je.only(n),i=On(r.ref,o.ref);return typeof n=="function"||r.isPresent?mt(o,{ref:i}):null};ii.displayName="Presence";function ah(e){const[t,n]=ae(),r=U({}),o=U(e),i=U("none"),s=e?"mounted":"unmounted",[a,c]=sh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return G(()=>{const u=Cr(r.current);i.current=a==="mounted"?u:"none"},[a]),Zo(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,h=Cr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Zo(()=>{if(t){const u=l=>{const h=Cr(r.current).includes(l.animationName);l.target===t&&h&&Mr(()=>c("ANIMATION_END"))},d=l=>{l.target===t&&(i.current=Cr(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 c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:me(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Cr(e){return(e==null?void 0:e.animationName)||"none"}let si=0;function ch(){G(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:fc()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:fc()),si++,()=>{si===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),si--}},[])}function fc(){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 He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},He.apply(this,arguments)};function hc(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ar="right-scroll-bar-position",Pr="width-before-scroll-bar",uh="with-scroll-bars-hidden",dh="--removed-body-scroll-bar-size";function fh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hh(e,t){var n=ae(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function ph(e,t){return hh(t||null,function(n){return e.forEach(function(r){return fh(r,n)})})}function mh(e){return e}function vh(e,t){t===void 0&&(t=mh);var n=[],r=!1,o={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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var c=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function gh(e){e===void 0&&(e={});var t=vh(null);return t.options=He({async:!0,ssr:!1},e),t}var pc=function(e){var t=e.sideCar,n=hc(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 R(r,He({},n))};pc.isSideCarExport=!0;function bh(e,t){return e.useMedium(t),pc}var mc=gh(),ai=function(){},Er=_e(function(e,t){var n=U(null),r=ae({onScrollCapture:ai,onWheelCapture:ai,onTouchMoveCapture:ai}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,g=hc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=f,M=ph([n,t]),S=He(He({},g),o);return R(ue,null,d&&R(w,{sideCar:mc,removeScrollBar:u,shards:l,noIsolation:h,inert:p,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),s?mt(je.only(a),He(He({},S),{ref:M})):R(x,He({},S,{className:c,ref:M}),a))});Er.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Er.classNames={fullWidth:Pr,zeroRight:Ar};var vc,yh=function(){if(vc)return vc;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yh();return t&&e.setAttribute("nonce",t),e}function _h(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wh())&&(_h(t,n),xh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$h=function(){var e=kh();return function(t,n){G(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gc=function(){var e=$h(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sh={left:0,top:0,right:0,gap:0},ci=function(e){return parseInt(e||"",10)||0},Mh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ci(n),ci(r),ci(o)]},Th=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sh;var t=Mh(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])}},Ch=gc(),Ah=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(uh,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -35,10 +35,10 @@ var Sy=Object.defineProperty;var My=(Et,Je,Fe)=>Je in Et?Sy(Et,Je,{enumerable:!0
35
35
  body {
36
36
  `).concat(dh,": ").concat(a,`px;
37
37
  }
38
- `)},Ph=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=de(function(){return Th(o)},[o]);return R(Ch,{styles:Ah(i,!t,o,n?"":"!important")})},li=!1;if(typeof window<"u")try{var Vr=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener("test",Vr,Vr),window.removeEventListener("test",Vr,Vr)}catch{li=!1}var an=li?{passive:!1}:!1,Eh=function(e){return e.tagName==="TEXTAREA"},bc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Eh(e)&&n[t]==="visible")},Vh=function(e){return bc(e,"overflowY")},Oh=function(e){return bc(e,"overflowX")},yc=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=wc(e,n);if(r){var o=_c(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Lh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Nh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wc=function(e,t){return e==="v"?Vh(t):Oh(t)},_c=function(e,t){return e==="v"?Lh(t):Nh(t)},Rh=function(e,t){return e==="h"&&t==="rtl"?-1:1},Fh=function(e,t,n,r,o){var i=Rh(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,d=s>0,l=0,f=0;do{var h=_c(e,a),p=h[0],m=h[1],y=h[2],x=m-y-i*p;(p||x)&&wc(e,a)&&(l+=x,f+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(o&&l===0||!o&&s>l)||!d&&(o&&f===0||!o&&-s>f))&&(u=!0),u},Or=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xc=function(e){return[e.deltaX,e.deltaY]},kc=function(e){return e&&"current"in e?e.current:e},Ih=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Dh=function(e){return`
38
+ `)},Ph=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=de(function(){return Th(o)},[o]);return R(Ch,{styles:Ah(i,!t,o,n?"":"!important")})},li=!1;if(typeof window<"u")try{var Vr=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener("test",Vr,Vr),window.removeEventListener("test",Vr,Vr)}catch{li=!1}var cn=li?{passive:!1}:!1,Eh=function(e){return e.tagName==="TEXTAREA"},bc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Eh(e)&&n[t]==="visible")},Vh=function(e){return bc(e,"overflowY")},Oh=function(e){return bc(e,"overflowX")},yc=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=wc(e,n);if(r){var o=_c(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Lh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Nh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wc=function(e,t){return e==="v"?Vh(t):Oh(t)},_c=function(e,t){return e==="v"?Lh(t):Nh(t)},Rh=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ih=function(e,t,n,r,o){var i=Rh(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,d=s>0,l=0,f=0;do{var h=_c(e,a),p=h[0],m=h[1],y=h[2],x=m-y-i*p;(p||x)&&wc(e,a)&&(l+=x,f+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(o&&l===0||!o&&s>l)||!d&&(o&&f===0||!o&&-s>f))&&(u=!0),u},Or=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xc=function(e){return[e.deltaX,e.deltaY]},kc=function(e){return e&&"current"in e?e.current:e},Fh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Dh=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},zh=0,cn=[];function Bh(e){var t=U([]),n=U([0,0]),r=U(),o=ae(zh++)[0],i=ae(function(){return gc()})[0],s=U(e);G(function(){s.current=e},[e]),G(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=lh([e.lockRef.current],(e.shards||[]).map(kc),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=me(function(m,y){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var x=Or(m),g=n.current,w="deltaX"in m?m.deltaX:g[0]-x[0],M="deltaY"in m?m.deltaY:g[1]-x[1],S,F=m.target,N=Math.abs(w)>Math.abs(M)?"h":"v";if("touches"in m&&N==="h"&&F.type==="range")return!1;var C=yc(N,F);if(!C)return!0;if(C?S=N:(S=N==="v"?"h":"v",C=yc(N,F)),!C)return!1;if(!r.current&&"changedTouches"in m&&(w||M)&&(r.current=S),!S)return!0;var E=r.current||S;return Fh(E,y,m,E==="h"?w:M,!0)},[]),c=me(function(m){var y=m;if(!(!cn.length||cn[cn.length-1]!==i)){var x="deltaY"in y?xc(y):Or(y),g=t.current.filter(function(S){return S.name===y.type&&S.target===y.target&&Ih(S.delta,x)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var w=(s.current.shards||[]).map(kc).filter(Boolean).filter(function(S){return S.contains(y.target)}),M=w.length>0?a(y,w[0]):!s.current.noIsolation;M&&y.cancelable&&y.preventDefault()}}},[]),u=me(function(m,y,x,g){var w={name:m,delta:y,target:x,should:g};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(M){return M!==w})},1)},[]),d=me(function(m){n.current=Or(m),r.current=void 0},[]),l=me(function(m){u(m.type,xc(m),m.target,a(m,e.lockRef.current))},[]),f=me(function(m){u(m.type,Or(m),m.target,a(m,e.lockRef.current))},[]);G(function(){return cn.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,an),document.addEventListener("touchmove",c,an),document.addEventListener("touchstart",d,an),function(){cn=cn.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,an),document.removeEventListener("touchmove",c,an),document.removeEventListener("touchstart",d,an)}},[]);var h=e.removeScrollBar,p=e.inert;return R(ue,null,p?R(i,{styles:Dh(o)}):null,h?R(Ph,{gapMode:"margin"}):null)}const jh=bh(mc,Bh);var $c=_e(function(e,t){return R(Er,He({},e,{ref:t,sideCar:jh}))});$c.classNames=Er.classNames;const Hh=$c;var Uh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ln=new WeakMap,Lr=new WeakMap,Nr={},ui=0,Sc=function(e){return e&&(e.host||Sc(e.parentNode))},Xh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Sc(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})},qh=function(e,t,n,r){var o=Xh(t,Array.isArray(e)?e:[e]);Nr[n]||(Nr[n]=new WeakMap);var i=Nr[n],s=[],a=new Set,c=new Set(o),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};o.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",m=(ln.get(f)||0)+1,y=(i.get(f)||0)+1;ln.set(f,m),i.set(f,y),s.push(f),m===1&&p&&Lr.set(f,!0),y===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),ui++,function(){s.forEach(function(l){var f=ln.get(l)-1,h=i.get(l)-1;ln.set(l,f),i.set(l,h),f||(Lr.has(l)||l.removeAttribute(r),Lr.delete(l)),h||l.removeAttribute(n)}),ui--,ui||(ln=new WeakMap,ln=new WeakMap,Lr=new WeakMap,Nr={})}},Wh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Uh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),qh(r,o,n,"aria-hidden")):function(){return null}};const Mc="Dialog",[Tc,Cy]=Rf(Mc),[Kh,un]=Tc(Mc),Yh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=U(null),c=U(null),[u=!1,d]=zf({prop:r,defaultProp:o,onChange:i});return R(Kh,{scope:t,triggerRef:a,contentRef:c,contentId:Jo(),titleId:Jo(),descriptionId:Jo(),open:u,onOpenChange:d,onOpenToggle:me(()=>d(l=>!l),[d]),modal:s},n)},Gh="DialogPortal",[Ay,Cc]=Tc(Gh,{forceMount:void 0}),di="DialogOverlay",Zh=_e((e,t)=>{const n=Cc(di,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=un(di,e.__scopeDialog);return i.modal?R(ii,{present:r||i.open},R(Jh,Te({},o,{ref:t}))):null}),Jh=_e((e,t)=>{const{__scopeDialog:n,...r}=e,o=un(di,n);return R(Hh,{as:Qo,allowPinchZoom:!0,shards:[o.contentRef]},R(ti.div,Te({"data-state":Pc(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),On="DialogContent",Qh=_e((e,t)=>{const n=Cc(On,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=un(On,e.__scopeDialog);return R(ii,{present:r||i.open},i.modal?R(ep,Te({},o,{ref:t})):R(tp,Te({},o,{ref:t})))}),ep=_e((e,t)=>{const n=un(On,e.__scopeDialog),r=U(null),o=Vn(t,n.contentRef,r);return G(()=>{const i=r.current;if(i)return Wh(i)},[]),R(Ac,Te({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sn(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:sn(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:sn(e.onFocusOutside,i=>i.preventDefault())}))}),tp=_e((e,t)=>{const n=un(On,e.__scopeDialog),r=U(!1),o=U(!1);return R(Ac,Te({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Ac=_e((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=un(On,n),c=U(null),u=Vn(t,c);return ch(),R(ue,null,R(Qf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},R(Gf,Te({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Pc(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function Pc(e){return e?"open":"closed"}const np=Yh,rp=Zh,op=Qh,Ec=Ie({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Rr=Ie({}),fi=Ie(null),Fr=typeof document<"u",hi=Fr?Be:G,pi=Ie({strict:!1});function ip(e,t,n,r){const{visualElement:o}=we(Rr),i=we(pi),s=we(fi),a=we(Ec).reducedMotion,c=U();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;Tr(()=>{u&&u.update(n,s)});const d=U(!!window.HandoffAppearAnimations);return hi(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),G(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function Vc(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sp(e,t,n){return me(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Vc(n)&&(n.current=r))},[t])}function Ln(e){return typeof e=="string"||Array.isArray(e)}function Ir(e){return typeof e=="object"&&typeof e.start=="function"}const mi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vi=["initial",...mi];function Dr(e){return Ir(e.animate)||vi.some(t=>Ln(e[t]))}function Oc(e){return!!(Dr(e)||e.variants)}function ap(e,t){if(Dr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(r)?r:void 0}}return e.inherit!==!1?t:{}}function cp(e){const{initial:t,animate:n}=ap(e,we(Rr));return de(()=>({initial:t,animate:n}),[Lc(t),Lc(n)])}function Lc(e){return Array.isArray(e)?e.join(" "):e}const Nc={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"]},Nn={};for(const e in Nc)Nn[e]={isEnabled:t=>Nc[e].some(n=>!!t[n])};function gi(e){for(const t in e)Nn[t]={...Nn[t],...e[t]}}const Rc=Ie({}),lp=Ie({}),up=Symbol.for("motionComponentSymbol");function dp({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&gi(e);function i(a,c){let u;const d={...we(Ec),...a,layoutId:fp(a)},{isStatic:l}=d,f=cp(a),h=r(a,l);if(!l&&Fr){f.visualElement=ip(o,h,d,t);const p=we(lp),m=we(pi).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,m,e,p))}return R(Rr.Provider,{value:f},u&&f.visualElement?R(u,{visualElement:f.visualElement,...d}):null,n(o,a,sp(h,f.visualElement,c),h,l,f.visualElement))}const s=_e(i);return s[up]=o,s}function fp({layoutId:e}){const t=we(Rc).id;return t&&e!==void 0?t+"-"+e:e}function hp(e){function t(r,o={}){return dp(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const pp=["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 bi(e){return typeof e!="string"||e.includes("-")?!1:!!(pp.indexOf(e)>-1||/[A-Z]/.test(e))}const mp={},Rn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(Rn);function Fc(e,{layout:t,layoutId:n}){return Nt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mp[e]||e==="opacity")}const Ee=e=>!!(e&&e.getVelocity),vp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gp=Rn.length;function bp(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<gp;s++){const a=Rn[s];if(e[a]!==void 0){const c=vp[a]||a;i+=`${c}(${e[a]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}const Ic=e=>t=>typeof t=="string"&&t.startsWith(e),Dc=Ic("--"),yi=Ic("var(--"),yp=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,wp=(e,t)=>t&&typeof e=="number"?t.transform(e):e,dn=(e,t,n)=>Math.min(Math.max(n,e),t),Rt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fn={...Rt,transform:e=>dn(0,1,e)},zr={...Rt,default:1},In=e=>Math.round(e*1e5)/1e5,Br=/(-)?([\d]*\.?[\d])+/g,zc=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,_p=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dn(e){return typeof e=="string"}const zn=e=>({test:t=>Dn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=zn("deg"),fn=zn("%"),z=zn("px"),xp=zn("vh"),kp=zn("vw"),Bc={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},jc={...Rt,transform:Math.round},Hc={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,size:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:zr,scaleX:zr,scaleY:zr,scaleZ:zr,skew:gt,skewX:gt,skewY:gt,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Fn,originX:Bc,originY:Bc,originZ:z,zIndex:jc,fillOpacity:Fn,strokeOpacity:Fn,numOctaves:jc};function wi(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let c=!1,u=!1,d=!0;for(const l in t){const f=t[l];if(Dc(l)){i[l]=f;continue}const h=Hc[l],p=wp(f,h);if(Nt.has(l)){if(c=!0,s[l]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else l.startsWith("origin")?(u=!0,a[l]=p):o[l]=p}if(t.transform||(c||r?o.transform=bp(e.transform,n,d,r):o.transform&&(o.transform="none")),u){const{originX:l="50%",originY:f="50%",originZ:h=0}=a;o.transformOrigin=`${l} ${f} ${h}`}}const _i=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uc(e,t,n){for(const r in t)!Ee(t[r])&&!Fc(r,n)&&(e[r]=t[r])}function $p({transformTemplate:e},t,n){return de(()=>{const r=_i();return wi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sp(e,t,n){const r=e.style||{},o={};return Uc(o,r,e),Object.assign(o,$p(e,t,n)),e.transformValues?e.transformValues(o):o}function Mp(e,t,n){const r={},o=Sp(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,r}const Tp=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 jr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Tp.has(e)}let Xc=e=>!jr(e);function Cp(e){e&&(Xc=t=>t.startsWith("on")?!jr(t):e(t))}try{Cp(require("@emotion/is-prop-valid").default)}catch{}function Ap(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Xc(o)||n===!0&&jr(o)||!t&&!jr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function qc(e,t,n){return typeof e=="string"?e:z.transform(t+n*e)}function Pp(e,t,n){const r=qc(t,e.x,e.width),o=qc(n,e.y,e.height);return`${r} ${o}`}const Ep={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vp={offset:"strokeDashoffset",array:"strokeDasharray"};function Op(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Ep:Vp;e[i.offset]=z.transform(-r);const s=z.transform(t),a=z.transform(n);e[i.array]=`${s} ${a}`}function xi(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,l,f){if(wi(e,u,d,f),l){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&&(o!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=Pp(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&Op(h,s,a,c,!1)}const Wc=()=>({..._i(),attrs:{}}),ki=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Lp(e,t,n,r){const o=de(()=>{const i=Wc();return xi(i,t,{enableHardwareAcceleration:!1},ki(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Uc(i,e.style,e),o.style={...i,...o.style}}return o}function Np(e=!1){return(n,r,o,{latestValues:i},s)=>{const c=(bi(n)?Lp:Mp)(r,i,s,n),d={...Ap(r,typeof n=="string",e),...c,ref:o},{children:l}=r,f=de(()=>Ee(l)?l.get():l,[l]);return R(n,{...d,children:f})}}const $i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Kc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Yc=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 Gc(e,t,n,r){Kc(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Yc.has(o)?o:$i(o),t.attrs[o])}function Si(e,t){const{style:n}=e,r={};for(const o in n)(Ee(n[o])||t.style&&Ee(t.style[o])||Fc(o,e))&&(r[o]=n[o]);return r}function Zc(e,t){const n=Si(e,t);for(const r in e)if(Ee(e[r])||Ee(t[r])){const o=Rn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Mi(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function Jc(e){const t=U(null);return t.current===null&&(t.current=e()),t.current}const Hr=e=>Array.isArray(e),Rp=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Fp=e=>Hr(e)?e[e.length-1]||0:e;function Ip(e){const t=Ee(e)?e.get():e;return Rp(t)?t.toValue():t}function Dp({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:zp(r,o,i,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Qc=e=>(t,n)=>{const r=we(Rr),o=we(fi),i=()=>Dp(e,t,r,o);return n?i():Jc(i)};function zp(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Ip(i[f]);let{initial:s,animate:a}=e;const c=Dr(e),u=Oc(e);t&&u&&!c&&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 l=d?a:s;return l&&typeof l!="boolean"&&!Ir(l)&&(Array.isArray(l)?l:[l]).forEach(h=>{const p=Mi(e,h);if(!p)return;const{transitionEnd:m,transition:y,...x}=p;for(const g in x){let w=x[g];if(Array.isArray(w)){const M=d?w.length-1:0;w=w[M]}w!==null&&(o[g]=w)}for(const g in m)o[g]=m[g]}),o}const xe=e=>e;class el{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 Bp(e){let t=new el,n=new el,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const l=d&&o,f=l?t:n;return u&&s.add(c),f.add(c)&&l&&o&&(r=t.order.length),c},cancel:c=>{n.remove(c),s.delete(c)},process:c=>{if(o){i=!0;return}if(o=!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(c),s.has(d)&&(a.schedule(d),e())}o=!1,i&&(i=!1,a.process(c))}};return a}const Ur=["prepare","read","update","preRender","render","postRender"],jp=40;function Hp(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Ur.reduce((l,f)=>(l[f]=Bp(()=>n=!0),l),{}),s=l=>i[l].process(o),a=()=>{const l=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(l-o.timestamp,jp),1),o.timestamp=l,o.isProcessing=!0,Ur.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:Ur.reduce((l,f)=>{const h=i[f];return l[f]=(p,m=!1,y=!1)=>(n||c(),h.schedule(p,m,y)),l},{}),cancel:l=>Ur.forEach(f=>i[f].cancel(l)),state:o,steps:i}}const{schedule:ke,cancel:Xr,state:Bn,steps:Py}=Hp(typeof requestAnimationFrame<"u"?requestAnimationFrame:xe,!0),Up={useVisualState:Qc({scrapeMotionValuesFromProps:Zc,createRenderState:Wc,onMount:(e,t,{renderState:n,latestValues:r})=>{ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ke.render(()=>{xi(n,r,{enableHardwareAcceleration:!1},ki(t.tagName),e.transformTemplate),Gc(t,n)})}})},Xp={useVisualState:Qc({scrapeMotionValuesFromProps:Si,createRenderState:_i})};function qp(e,{forwardMotionProps:t=!1},n,r){return{...bi(e)?Up:Xp,preloadedFeatures:n,useRender:Np(t),createVisualElement:r,Component:e}}function Ft(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Wp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function tl(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Kp=e=>t=>Wp(t)&&e(t,tl(t));function qr(e,t,n,r){return Ft(e,t,Kp(n),r)}const Yp=(e,t)=>n=>t(e(n)),It=(...e)=>e.reduce(Yp);function nl(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const rl=nl("dragHorizontal"),ol=nl("dragVertical");function Gp(e){let t=!1;if(e==="y")t=ol();else if(e==="x")t=rl();else{const n=rl(),r=ol();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function il(){const e=Gp(!0);return e?(e(),!1):!0}class hn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function sl(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(i,s)=>{if(i.type==="touch"||il())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ke.update(()=>a[r](i,s))};return qr(e.current,n,o,{passive:!e.getProps()[r]})}class Zp extends hn{mount(){this.unmount=It(sl(this.node,!0),sl(this.node,!1))}unmount(){}}class Jp extends hn{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=It(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const al=(e,t)=>t?e===t?!0:al(e,t.parentElement):!1;function Ti(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,tl(n))}class Qp extends hn{constructor(){super(...arguments),this.removeStartListeners=xe,this.removeEndListeners=xe,this.removeAccessibleListeners=xe,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=qr(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();ke.update(()=>{al(this.node.current,a.target)?u&&u(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=qr(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=It(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ti("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&ke.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=Ft(this.node.current,"keyup",s),Ti("down",(a,c)=>{this.startPress(a,c)})},n=Ft(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ti("cancel",(i,s)=>this.cancelPress(i,s))},o=Ft(this.node.current,"blur",r);this.removeAccessibleListeners=It(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ke.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!il()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ke.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=qr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ft(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=It(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ci=new WeakMap,Ai=new WeakMap,e0=e=>{const t=Ci.get(e.target);t&&t(e)},t0=e=>{e.forEach(e0)};function n0({root:e,...t}){const n=e||document;Ai.has(n)||Ai.set(n,{});const r=Ai.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(t0,{root:e,...t})),r[o]}function r0(e,t,n){const r=n0(t);return Ci.set(e,n),r.observe(e),()=>{Ci.delete(e),r.unobserve(e)}}const o0={some:0,all:1};class i0 extends hn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:o0[o]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return r0(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(s0(t,n))&&this.startObserver()}unmount(){}}function s0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const a0={inView:{Feature:i0},tap:{Feature:Qp},focus:{Feature:Jp},hover:{Feature:Zp}};function cl(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 c0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function l0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Wr(e,t,n){const r=e.getProps();return Mi(r,t,n!==void 0?n:r.custom,c0(e),l0(e))}const u0="data-"+$i("framerAppearId");let jn=xe,Ue=xe;process.env.NODE_ENV!=="production"&&(jn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ue=(e,t)=>{if(!e)throw new Error(t)});const Dt=e=>e*1e3,bt=e=>e/1e3,d0={current:!1},ll=e=>Array.isArray(e)&&typeof e[0]=="number";function ul(e){return!!(!e||typeof e=="string"&&dl[e]||ll(e)||Array.isArray(e)&&e.every(ul))}const Hn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hn([0,.65,.55,1]),circOut:Hn([.55,0,1,.45]),backIn:Hn([.31,.01,.66,-.59]),backOut:Hn([.33,1.53,.69,.99])};function fl(e){if(e)return ll(e)?Hn(e):Array.isArray(e)?e.map(fl):dl[e]}function f0(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=fl(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function h0(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const hl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,p0=1e-7,m0=12;function v0(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=hl(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>p0&&++a<m0);return s}function Un(e,t,n,r){if(e===t&&n===r)return xe;const o=i=>v0(i,0,1,e,n);return i=>i===0||i===1?i:hl(o(i),t,r)}const g0=Un(.42,0,1,1),b0=Un(0,0,.58,1),pl=Un(.42,0,.58,1),y0=e=>Array.isArray(e)&&typeof e[0]!="number",ml=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vl=e=>t=>1-e(1-t),gl=e=>1-Math.sin(Math.acos(e)),bl=vl(gl),w0=ml(bl),yl=Un(.33,1.53,.69,.99),Pi=vl(yl),_0=ml(Pi),wl={linear:xe,easeIn:g0,easeInOut:pl,easeOut:b0,circIn:gl,circInOut:w0,circOut:bl,backIn:Pi,backInOut:_0,backOut:yl,anticipate:e=>(e*=2)<1?.5*Pi(e):.5*(2-Math.pow(2,-10*(e-1)))},_l=e=>{if(Array.isArray(e)){Ue(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Un(t,n,r,o)}else if(typeof e=="string")return Ue(wl[e]!==void 0,`Invalid easing type '${e}'`),wl[e];return e},Ei=(e,t)=>n=>!!(Dn(n)&&_p.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),xl=(e,t,n)=>r=>{if(!Dn(r))return r;const[o,i,s,a]=r.match(Br);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},x0=e=>dn(0,255,e),Vi={...Rt,transform:e=>Math.round(x0(e))},zt={test:Ei("rgb","red"),parse:xl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vi.transform(e)+", "+Vi.transform(t)+", "+Vi.transform(n)+", "+In(Fn.transform(r))+")"};function k0(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Oi={test:Ei("#"),parse:k0,transform:zt.transform},pn={test:Ei("hsl","hue"),parse:xl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(In(t))+", "+fn.transform(In(n))+", "+In(Fn.transform(r))+")"},Se={test:e=>zt.test(e)||Oi.test(e)||pn.test(e),parse:e=>zt.test(e)?zt.parse(e):pn.test(e)?pn.parse(e):Oi.parse(e),transform:e=>Dn(e)?e:e.hasOwnProperty("red")?zt.transform(e):pn.transform(e)},Kr=(e,t,n)=>-n*e+n*t+e;function Li(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 $0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=Li(c,a,e+1/3),i=Li(c,a,e),s=Li(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const Ni=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},S0=[Oi,zt,pn],M0=e=>S0.find(t=>t.test(e));function kl(e){const t=M0(e);Ue(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===pn&&(n=$0(n)),n}const $l=(e,t)=>{const n=kl(e),r=kl(t),o={...n};return i=>(o.red=Ni(n.red,r.red,i),o.green=Ni(n.green,r.green,i),o.blue=Ni(n.blue,r.blue,i),o.alpha=Kr(n.alpha,r.alpha,i),zt.transform(o))};function T0(e){var t,n;return isNaN(e)&&Dn(e)&&(((t=e.match(Br))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(zc))===null||n===void 0?void 0:n.length)||0)>0}const Sl={regex:yp,countKey:"Vars",token:"${v}",parse:xe},Ml={regex:zc,countKey:"Colors",token:"${c}",parse:Se.parse},Tl={regex:Br,countKey:"Numbers",token:"${n}",parse:Rt.parse};function Ri(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function Yr(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ri(n,Sl),Ri(n,Ml),Ri(n,Tl),n}function Cl(e){return Yr(e).values}function Al(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Yr(e),i=t.length;return s=>{let a=o;for(let c=0;c<i;c++)c<r?a=a.replace(Sl.token,s[c]):c<r+n?a=a.replace(Ml.token,Se.transform(s[c])):a=a.replace(Tl.token,In(s[c]));return a}}const C0=e=>typeof e=="number"?0:e;function A0(e){const t=Cl(e);return Al(e)(t.map(C0))}const mn={test:T0,parse:Cl,createTransformer:Al,getAnimatableNone:A0},Pl=(e,t)=>n=>`${n>0?t:e}`;function El(e,t){return typeof e=="number"?n=>Kr(e,t,n):Se.test(e)?$l(e,t):e.startsWith("var(")?Pl(e,t):Ol(e,t)}const Vl=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>El(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}},P0=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=El(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}},Ol=(e,t)=>{const n=mn.createTransformer(t),r=Yr(e),o=Yr(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?It(Vl(r.values,o.values),n):(jn(!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.`),Pl(e,t))},Ll=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Nl=(e,t)=>n=>Kr(e,t,n);function E0(e){return typeof e=="number"?Nl:typeof e=="string"?Se.test(e)?$l:Ol:Array.isArray(e)?Vl:typeof e=="object"?P0:Nl}function V0(e,t,n){const r=[],o=n||E0(e[0]),i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||xe:t;a=It(c,a)}r.push(a)}return r}function Rl(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ue(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=V0(t,r,o),a=s.length,c=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const l=Ll(e[d],e[d+1],u);return s[d](l)};return n?u=>c(dn(e[0],e[i-1],u)):c}function O0(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ll(0,t,r);e.push(Kr(n,1,o))}}function L0(e){const t=[0];return O0(t,e.length-1),t}function N0(e,t){return e.map(n=>n*t)}function R0(e,t){return e.map(()=>t||pl).splice(0,e.length-1)}function Gr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=y0(r)?r.map(_l):_l(r),i={done:!1,value:t[0]},s=N0(n&&n.length===t.length?n:L0(t),e),a=Rl(s,t,{ease:Array.isArray(o)?o:R0(t,o)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}function Fl(e,t){return t?e*(1e3/t):0}const F0=5;function Il(e,t,n){const r=Math.max(t-F0,0);return Fl(n-e(r),t-r)}const Fi=.001,I0=.01,Dl=10,D0=.05,z0=1;function B0({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;jn(e<=Dt(Dl),"Spring duration must be 10 seconds or less");let s=1-t;s=dn(D0,z0,s),e=dn(I0,Dl,bt(e)),s<1?(o=u=>{const d=u*s,l=d*e,f=d-n,h=Ii(u,s),p=Math.exp(-l);return Fi-f/h*p},i=u=>{const l=u*s*e,f=l*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-l),m=Ii(Math.pow(u,2),s);return(-o(u)+Fi>0?-1:1)*((f-h)*p)/m}):(o=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-Fi+d*l},i=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const a=5/e,c=H0(o,i,a);if(e=Dt(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const j0=12;function H0(e,t,n){let r=n;for(let o=1;o<j0;o++)r=r-e(r)/t(r);return r}function Ii(e,t){return e*Math.sqrt(1-t*t)}const U0=["duration","bounce"],X0=["stiffness","damping","mass"];function zl(e,t){return t.some(n=>e[n]!==void 0)}function q0(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!zl(e,X0)&&zl(e,U0)){const n=B0(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Bl({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:c,mass:u,velocity:d,duration:l,isResolvedFromDuration:f}=q0(r),h=d?-bt(d):0,p=c/(2*Math.sqrt(a*u)),m=i-o,y=bt(Math.sqrt(a/u)),x=Math.abs(m)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let g;if(p<1){const w=Ii(y,p);g=M=>{const S=Math.exp(-p*y*M);return i-S*((h+p*y*m)/w*Math.sin(w*M)+m*Math.cos(w*M))}}else if(p===1)g=w=>i-Math.exp(-y*w)*(m+(h+y*m)*w);else{const w=y*Math.sqrt(p*p-1);g=M=>{const S=Math.exp(-p*y*M),F=Math.min(w*M,300);return i-S*((h+p*y*m)*Math.sinh(F)+w*m*Math.cosh(F))/w}}return{calculatedDuration:f&&l||null,next:w=>{const M=g(w);if(f)s.done=w>=l;else{let S=h;w!==0&&(p<1?S=Il(g,w,M):S=0);const F=Math.abs(S)<=n,N=Math.abs(i-M)<=t;s.done=F&&N}return s.value=s.done?i:M,s}}}function jl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},h=C=>a!==void 0&&C<a||c!==void 0&&C>c,p=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let m=n*t;const y=l+m,x=s===void 0?y:s(y);x!==y&&(m=x-l);const g=C=>-m*Math.exp(-C/r),w=C=>x+g(C),M=C=>{const E=g(C),q=w(C);f.done=Math.abs(E)<=u,f.value=f.done?x:q};let S,F;const N=C=>{h(f.value)&&(S=C,F=Bl({keyframes:[f.value,p(f.value)],velocity:Il(w,C,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:C=>{let E=!1;return!F&&S===void 0&&(E=!0,M(C),N(C)),S!==void 0&&C>S?F.next(C-S):(!E&&M(C),f)}}}const W0=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>Xr(t),now:()=>Bn.isProcessing?Bn.timestamp:performance.now()}},Hl=2e4;function Ul(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Hl;)t+=n,r=e.next(t);return t>=Hl?1/0:t}const K0={decay:jl,inertia:jl,tween:Gr,keyframes:Gr,spring:Bl};function Zr({autoplay:e=!0,delay:t=0,driver:n=W0,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:l,...f}){let h=1,p=!1,m,y;const x=()=>{y=new Promise(Y=>{m=Y})};x();let g;const w=K0[o]||Gr;let M;w!==Gr&&typeof r[0]!="number"&&(M=Rl([0,100],r,{clamp:!1}),r=[0,100]);const S=w({...f,keyframes:r});let F;a==="mirror"&&(F=w({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let N="idle",C=null,E=null,q=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=Ul(S));const{calculatedDuration:K}=S;let j=1/0,B=1/0;K!==null&&(j=K+s,B=j*(i+1)-s);let H=0;const X=Y=>{if(E===null)return;h>0&&(E=Math.min(E,Y)),h<0&&(E=Math.min(Y-B/h,E)),C!==null?H=C:H=Math.round(Y-E)*h;const Re=H-t*(h>=0?1:-1),At=h>=0?Re<0:Re>B;H=Math.max(Re,0),N==="finished"&&C===null&&(H=B);let Pt=H,Gt=S;if(i){const Zt=H/j;let Jt=Math.floor(Zt),dt=Zt%1;!dt&&Zt>=1&&(dt=1),dt===1&&Jt--,Jt=Math.min(Jt,i+1);const dr=!!(Jt%2);dr&&(a==="reverse"?(dt=1-dt,s&&(dt-=s/j)):a==="mirror"&&(Gt=F));let Oo=dn(0,1,dt);H>B&&(Oo=a==="reverse"&&dr?1:0),Pt=Oo*j}const Ge=At?{done:!1,value:r[0]}:Gt.next(Pt);M&&(Ge.value=M(Ge.value));let{done:Ze}=Ge;!At&&K!==null&&(Ze=h>=0?H>=B:H<=0);const Vo=C===null&&(N==="finished"||N==="running"&&Ze);return l&&l(Ge.value),Vo&&Le(),Ge},re=()=>{g&&g.stop(),g=void 0},se=()=>{N="idle",re(),m(),x(),E=q=null},Le=()=>{N="finished",d&&d(),re(),m()},Ne=()=>{if(p)return;g||(g=n(X));const Y=g.now();c&&c(),C!==null?E=Y-C:(!E||N==="finished")&&(E=Y),N==="finished"&&x(),q=E,C=null,N="running",g.start()};e&&Ne();const ut={then(Y,Re){return y.then(Y,Re)},get time(){return bt(H)},set time(Y){Y=Dt(Y),H=Y,C!==null||!g||h===0?C=Y:E=g.now()-Y/h},get duration(){const Y=S.calculatedDuration===null?Ul(S):S.calculatedDuration;return bt(Y)},get speed(){return h},set speed(Y){Y===h||!g||(h=Y,ut.time=bt(H))},get state(){return N},play:Ne,pause:()=>{N="paused",C=H},stop:()=>{p=!0,N!=="idle"&&(N="idle",u&&u(),se())},cancel:()=>{q!==null&&X(q),se()},complete:()=>{N="finished"},sample:Y=>(E=0,X(Y))};return ut}function Y0(e){let t;return()=>(t===void 0&&(t=e()),t)}const G0=Y0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Z0=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Jr=10,J0=2e4,Q0=(e,t)=>t.type==="spring"||e==="backgroundColor"||!ul(t.ease);function em(e,t,{onUpdate:n,onComplete:r,...o}){if(!(G0()&&Z0.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let s=!1,a,c;const u=()=>{c=new Promise(g=>{a=g})};u();let{keyframes:d,duration:l=300,ease:f,times:h}=o;if(Q0(t,o)){const g=Zr({...o,repeat:0,delay:0});let w={done:!1,value:d[0]};const M=[];let S=0;for(;!w.done&&S<J0;)w=g.sample(S),M.push(w.value),S+=Jr;h=void 0,d=M,l=S-Jr,f="linear"}const p=f0(e.owner.current,t,d,{...o,duration:l,ease:f,times:h});o.syncStart&&(p.startTime=Bn.isProcessing?Bn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>p.cancel(),y=()=>{ke.update(m),a(),u()};return p.onfinish=()=>{e.set(h0(d,o)),r&&r(),y()},{then(g,w){return c.then(g,w)},attachTimeline(g){return p.timeline=g,p.onfinish=null,xe},get time(){return bt(p.currentTime||0)},set time(g){p.currentTime=Dt(g)},get speed(){return p.playbackRate},set speed(g){p.playbackRate=g},get duration(){return bt(l)},play:()=>{s||(p.play(),Xr(m))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:g}=p;if(g){const w=Zr({...o,autoplay:!1});e.setWithVelocity(w.sample(g-Jr).value,w.sample(g).value,Jr)}y()},complete:()=>p.finish(),cancel:y}}function tm({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:xe,pause:xe,stop:xe,then:i=>(i(),Promise.resolve()),cancel:xe,complete:xe});return t?Zr({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const nm={type:"spring",stiffness:500,damping:25,restSpeed:10},rm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),om={type:"keyframes",duration:.8},im={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sm=(e,{keyframes:t})=>t.length>2?om:Nt.has(e)?e.startsWith("scale")?rm(t[1]):nm:im,Di=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(mn.test(t)||t==="0")&&!t.startsWith("url(")),am=new Set(["brightness","contrast","saturate","opacity"]);function cm(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Br)||[];if(!r)return e;const o=n.replace(r,"");let i=am.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const lm=/([a-z-]*)\(.*?\)/g,zi={...mn,getAnimatableNone:e=>{const t=e.match(lm);return t?t.map(cm).join(" "):e}},um={...Hc,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:zi,WebkitFilter:zi},Bi=e=>um[e];function Xl(e,t){let n=Bi(e);return n!==zi&&(n=mn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ql=e=>/^0[^.\s]+$/.test(e);function dm(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||ql(e)}function fm(e,t,n,r){const o=Di(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let u=0;u<i.length;u++)i[u]===null&&(i[u]=u===0?s:i[u-1]),dm(i[u])&&c.push(u),typeof i[u]=="string"&&i[u]!=="none"&&i[u]!=="0"&&(a=i[u]);if(o&&c.length&&a)for(let u=0;u<c.length;u++){const d=c[u];i[d]=Xl(t,a)}return i}function hm({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function pm(e,t){return e[t]||e.default||e}const mm=(e,t,n,r={})=>o=>{const i=pm(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Dt(s);const c=fm(t,e,n,i),u=c[0],d=c[c.length-1],l=Di(e,u),f=Di(e,d);jn(l===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:c,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(hm(i)||(h={...h,...sm(e,h)}),h.duration&&(h.duration=Dt(h.duration)),h.repeatDelay&&(h.repeatDelay=Dt(h.repeatDelay)),!l||!f||d0.current||i.type===!1)return tm(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=em(t,e,h);if(p)return p}return Zr(h)};function Qr(e){return!!(Ee(e)&&e.add)}const Wl=e=>/^\-?\d*\.?\d+$/.test(e);function vm(e,t){e.indexOf(t)===-1&&e.push(t)}function gm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kl{constructor(){this.subscriptions=[]}add(t){return vm(this.subscriptions,t),()=>gm(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Yl=new Set;function ji(e,t,n){e||Yl.has(t)||(console.warn(t),n&&console.warn(n),Yl.add(t))}const bm=e=>!isNaN(parseFloat(e));class ym{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:s}=Bn;this.lastUpdated!==s&&(this.timeDelta=i,this.lastUpdated=s,ke.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()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ke.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=bm(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&ji(!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 Kl);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.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?Fl(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 ym(e,t)}const Gl=e=>t=>t.test(e),Zl=[Rt,z,fn,gt,kp,xp,{test:e=>e==="auto",parse:e=>e}],qn=e=>Zl.find(Gl(e)),wm=[...Zl,Se,mn],_m=e=>wm.find(Gl(e));function xm(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xn(n))}function km(e,t){const n=Wr(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i){const a=Fp(i[s]);xm(e,s,a)}}function $m(e,t,n){var r,o;const i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(s)for(let a=0;a<s;a++){const c=i[a],u=t[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&o!==void 0?o:t[c]),d!=null&&(typeof d=="string"&&(Wl(d)||ql(d))?d=parseFloat(d):!_m(d)&&mn.test(u)&&(d=Xl(c,u)),e.addValue(c,Xn(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function Sm(e,t){return t?(t[e]||t.default||t).from:void 0}function Mm(e,t,n){const r={};for(const o in e){const i=Sm(o,t);if(i!==void 0)r[o]=i;else{const s=n.getValue(o);s&&(r[o]=s.get())}}return r}function Tm({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Jl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const l in a){const f=e.getValue(l),h=a[l];if(!f||h===void 0||d&&Tm(d,l))continue;const p={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!f.hasAnimated){const y=e.getProps()[u0];y&&(p.elapsed=window.HandoffAppearAnimations(y,l,f,ke),p.syncStart=!0)}f.start(mm(l,f,h,e.shouldReduceMotion&&Nt.has(l)?{type:!1}:p));const m=f.animation;Qr(c)&&(c.add(l),m.then(()=>c.remove(l))),u.push(m)}return s&&Promise.all(u).then(()=>{s&&km(e,s)}),u}function Hi(e,t,n={}){const r=Wr(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Jl(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:l}=o;return Cm(e,t,u+c,d,l,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,u]=a==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(n.delay)])}function Cm(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(Am).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Hi(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function Am(e,t){return e.sortNodePosition(t)}function Pm(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Hi(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Hi(e,t,n);else{const o=typeof t=="function"?Wr(e,t,n.custom):t;r=Promise.all(Jl(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Em=[...mi].reverse(),Vm=mi.length;function Om(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Pm(e,n,r)))}function Lm(e){let t=Om(e);const n=Rm();let r=!0;const o=(c,u)=>{const d=Wr(e,u);if(d){const{transition:l,transitionEnd:f,...h}=d;c={...c,...h,...f}}return c};function i(c){t=c(e)}function s(c,u){const d=e.getProps(),l=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},m=1/0;for(let x=0;x<Vm;x++){const g=Em[x],w=n[g],M=d[g]!==void 0?d[g]:l[g],S=Ln(M),F=g===u?w.isActive:null;F===!1&&(m=x);let N=M===l[g]&&M!==d[g]&&S;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),w.protectedKeys={...p},!w.isActive&&F===null||!M&&!w.prevProp||Ir(M)||typeof M=="boolean")continue;const C=Nm(w.prevProp,M);let E=C||g===u&&w.isActive&&!N&&S||x>m&&S;const q=Array.isArray(M)?M:[M];let K=q.reduce(o,{});F===!1&&(K={});const{prevResolvedValues:j={}}=w,B={...j,...K},H=X=>{E=!0,h.delete(X),w.needsAnimating[X]=!0};for(const X in B){const re=K[X],se=j[X];p.hasOwnProperty(X)||(re!==se?Hr(re)&&Hr(se)?!cl(re,se)||C?H(X):w.protectedKeys[X]=!0:re!==void 0?H(X):h.add(X):re!==void 0&&h.has(X)?H(X):w.protectedKeys[X]=!0)}w.prevProp=M,w.prevResolvedValues=K,w.isActive&&(p={...p,...K}),r&&e.blockInitialAnimation&&(E=!1),E&&!N&&f.push(...q.map(X=>({animation:X,options:{type:g,...c}})))}if(h.size){const x={};h.forEach(g=>{const w=e.getBaseTarget(g);w!==void 0&&(x[g]=w)}),f.push({animation:x})}let y=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function a(c,u,d){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(d,c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n}}function Nm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!cl(t,e):!1}function Bt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rm(){return{animate:Bt(!0),whileInView:Bt(),whileHover:Bt(),whileTap:Bt(),whileDrag:Bt(),whileFocus:Bt(),exit:Bt()}}class Fm extends hn{constructor(t){super(t),t.animationState||(t.animationState=Lm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ir(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 Im=0;class Dm extends hn{constructor(){super(...arguments),this.id=Im++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const zm={animation:{Feature:Fm},exit:{Feature:Dm}},Ql=()=>({min:0,max:0}),eu=()=>({x:Ql(),y:Ql()});function Bm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jm(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 Hm(e,t){return Bm(jm(e.getBoundingClientRect(),t))}const Um=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xm(e){const t=Um.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const qm=4;function Ui(e,t,n=1){Ue(n<=qm,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Xm(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Wl(s)?parseFloat(s):s}else return yi(o)?Ui(o,t,n+1):o}function Wm(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const i=o.get();if(!yi(i))return;const s=Ui(i,r);s&&o.set(s)});for(const o in t){const i=t[o];if(!yi(i))continue;const s=Ui(i,r);s&&(t[o]=s,n||(n={}),n[o]===void 0&&(n[o]=i))}return{target:t,transitionEnd:n}}const Km=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),tu=e=>Km.has(e),Ym=e=>Object.keys(e).some(tu),eo=e=>e===Rt||e===z,nu=(e,t)=>parseFloat(e.split(", ")[t]),ru=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return nu(o[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?nu(i[1],e):0}},Gm=new Set(["x","y","z"]),Zm=Rn.filter(e=>!Gm.has(e));function Jm(e){const t=[];return Zm.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 vn={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:ru(4,13),y:ru(5,14)};vn.translateX=vn.x,vn.translateY=vn.y;const Qm=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=vn[u](r,i)}),t.render();const c=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=vn[u](c,i)}),e},ev=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(tu);let i=[],s=!1;const a=[];if(o.forEach(c=>{const u=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],l=qn(d);const f=t[c];let h;if(Hr(f)){const p=f.length,m=f[0]===null?1:0;d=f[m],l=qn(d);for(let y=m;y<p&&f[y]!==null;y++)h?Ue(qn(f[y])===h,"All keyframes must be of the same type"):(h=qn(f[y]),Ue(h===l||eo(l)&&eo(h),"Keyframes must be of the same dimension as the current value"))}else h=qn(f);if(l!==h)if(eo(l)&&eo(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&h===z&&(t[c]=f.map(parseFloat))}else l!=null&&l.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.transform(d)):t[c]=l.transform(f):(s||(i=Jm(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],u.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=Qm(t,e,a);return i.length&&i.forEach(([d,l])=>{e.getValue(d).set(l)}),e.render(),Fr&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function tv(e,t,n,r){return Ym(t)?ev(e,t,n,r):{target:t,transitionEnd:r}}const nv=(e,t,n,r)=>{const o=Wm(e,t,r);return t=o.target,r=o.transitionEnd,tv(e,t,n,r)},Xi={current:null},ou={current:!1};function rv(){if(ou.current=!0,!!Fr)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xi.current=e.matches;e.addListener(t),t()}else Xi.current=!1}function ov(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(Ee(i))e.addValue(o,i),Qr(r)&&r.add(o),process.env.NODE_ENV==="development"&&ji(i.version==="10.16.5",`Attempting to mix Framer Motion versions ${i.version} with 10.16.5 may not work as expected.`);else if(Ee(s))e.addValue(o,Xn(i,{owner:e})),Qr(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(o);e.addValue(o,Xn(a!==void 0?a:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const iu=new WeakMap,su=Object.keys(Nn),iv=su.length,au=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],sv=vi.length;class av{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i},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=()=>ke.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.isControllingVariants=Dr(n),this.isVariantNode=Oc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const l in d){const f=d[l];a[l]!==void 0&&Ee(f)&&(f.set(a[l],!1),Qr(u)&&u.add(l))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,iu.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)),ou.current||rv(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xi.current,process.env.NODE_ENV!=="production"&&ji(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(){iu.delete(this.current),this.projection&&this.projection.unmount(),Xr(this.notifyUpdate),Xr(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=Nt.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ke.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,i){let s,a;if(process.env.NODE_ENV!=="production"&&o&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?jn(!1,c):Ue(!1,c)}for(let c=0;c<iv;c++){const u=su[c],{isEnabled:d,Feature:l,ProjectionNode:f,MeasureLayout:h}=Nn[u];f&&(s=f),d(n)&&(!this.features[u]&&l&&(this.features[u]=new l(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:l,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||l&&Vc(l),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,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):eu()}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<au.length;r++){const o=au[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i=t["on"+o];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=ov(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<sv;r++){const o=vi[r],i=this.props[o];(Ln(i)||i===!1)&&(n[o]=i)}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,o=typeof r=="string"||typeof r=="object"?(n=Mi(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ee(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class cu extends av{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:o},i){let s=Mm(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),s&&(s=o(s))),i){$m(this,r,s);const a=nv(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function cv(e){return window.getComputedStyle(e)}class lv extends cu{readValueFromInstance(t,n){if(Nt.has(n)){const r=Bi(n);return r&&r.default||0}else{const r=cv(t),o=(Dc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hm(t,n)}build(t,n,r,o){wi(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Si(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ee(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){Kc(t,n,r,o)}}class uv extends cu{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nt.has(n)){const r=Bi(n);return r&&r.default||0}return n=Yc.has(n)?n:$i(n),t.getAttribute(n)}measureInstanceViewportBox(){return eu()}scrapeMotionValuesFromProps(t,n){return Zc(t,n)}build(t,n,r,o){xi(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){Gc(t,n,r,o)}mount(t){this.isSVGTag=ki(t.tagName),super.mount(t)}}const dv=(e,t)=>bi(e)?new uv(t,{enableHardwareAcceleration:!1}):new lv(t,{enableHardwareAcceleration:!0}),Wn=hp(qp);function lu(){const e=U(!1);return hi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fv(){const e=lu(),[t,n]=ae(0),r=me(()=>{e.current&&n(t+1)},[t]);return[me(()=>ke.postRender(r),[r]),t]}class hv extends Pe{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=br(),r=U(null),o=U({width:0,height:0,top:0,left:0});return Tr(()=>{const{width:i,height:s,top:a,left:c}=o.current;if(t||!r.current||!i||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
41
+ `)},zh=0,ln=[];function Bh(e){var t=U([]),n=U([0,0]),r=U(),o=ae(zh++)[0],i=ae(function(){return gc()})[0],s=U(e);G(function(){s.current=e},[e]),G(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=lh([e.lockRef.current],(e.shards||[]).map(kc),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=me(function(m,y){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var x=Or(m),g=n.current,w="deltaX"in m?m.deltaX:g[0]-x[0],M="deltaY"in m?m.deltaY:g[1]-x[1],S,I=m.target,N=Math.abs(w)>Math.abs(M)?"h":"v";if("touches"in m&&N==="h"&&I.type==="range")return!1;var C=yc(N,I);if(!C)return!0;if(C?S=N:(S=N==="v"?"h":"v",C=yc(N,I)),!C)return!1;if(!r.current&&"changedTouches"in m&&(w||M)&&(r.current=S),!S)return!0;var E=r.current||S;return Ih(E,y,m,E==="h"?w:M,!0)},[]),c=me(function(m){var y=m;if(!(!ln.length||ln[ln.length-1]!==i)){var x="deltaY"in y?xc(y):Or(y),g=t.current.filter(function(S){return S.name===y.type&&S.target===y.target&&Fh(S.delta,x)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var w=(s.current.shards||[]).map(kc).filter(Boolean).filter(function(S){return S.contains(y.target)}),M=w.length>0?a(y,w[0]):!s.current.noIsolation;M&&y.cancelable&&y.preventDefault()}}},[]),u=me(function(m,y,x,g){var w={name:m,delta:y,target:x,should:g};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(M){return M!==w})},1)},[]),d=me(function(m){n.current=Or(m),r.current=void 0},[]),l=me(function(m){u(m.type,xc(m),m.target,a(m,e.lockRef.current))},[]),f=me(function(m){u(m.type,Or(m),m.target,a(m,e.lockRef.current))},[]);G(function(){return ln.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,cn),document.addEventListener("touchmove",c,cn),document.addEventListener("touchstart",d,cn),function(){ln=ln.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,cn),document.removeEventListener("touchmove",c,cn),document.removeEventListener("touchstart",d,cn)}},[]);var h=e.removeScrollBar,p=e.inert;return R(ue,null,p?R(i,{styles:Dh(o)}):null,h?R(Ph,{gapMode:"margin"}):null)}const jh=bh(mc,Bh);var $c=_e(function(e,t){return R(Er,He({},e,{ref:t,sideCar:jh}))});$c.classNames=Er.classNames;const Hh=$c;var Uh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},un=new WeakMap,Lr=new WeakMap,Nr={},ui=0,Sc=function(e){return e&&(e.host||Sc(e.parentNode))},Xh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Sc(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})},qh=function(e,t,n,r){var o=Xh(t,Array.isArray(e)?e:[e]);Nr[n]||(Nr[n]=new WeakMap);var i=Nr[n],s=[],a=new Set,c=new Set(o),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};o.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",m=(un.get(f)||0)+1,y=(i.get(f)||0)+1;un.set(f,m),i.set(f,y),s.push(f),m===1&&p&&Lr.set(f,!0),y===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),ui++,function(){s.forEach(function(l){var f=un.get(l)-1,h=i.get(l)-1;un.set(l,f),i.set(l,h),f||(Lr.has(l)||l.removeAttribute(r),Lr.delete(l)),h||l.removeAttribute(n)}),ui--,ui||(un=new WeakMap,un=new WeakMap,Lr=new WeakMap,Nr={})}},Wh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Uh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),qh(r,o,n,"aria-hidden")):function(){return null}};const Mc="Dialog",[Tc,Cy]=Rf(Mc),[Kh,dn]=Tc(Mc),Yh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=U(null),c=U(null),[u=!1,d]=zf({prop:r,defaultProp:o,onChange:i});return R(Kh,{scope:t,triggerRef:a,contentRef:c,contentId:Jo(),titleId:Jo(),descriptionId:Jo(),open:u,onOpenChange:d,onOpenToggle:me(()=>d(l=>!l),[d]),modal:s},n)},Gh="DialogPortal",[Ay,Cc]=Tc(Gh,{forceMount:void 0}),di="DialogOverlay",Zh=_e((e,t)=>{const n=Cc(di,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=dn(di,e.__scopeDialog);return i.modal?R(ii,{present:r||i.open},R(Jh,Te({},o,{ref:t}))):null}),Jh=_e((e,t)=>{const{__scopeDialog:n,...r}=e,o=dn(di,n);return R(Hh,{as:Qo,allowPinchZoom:!0,shards:[o.contentRef]},R(ti.div,Te({"data-state":Pc(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ln="DialogContent",Qh=_e((e,t)=>{const n=Cc(Ln,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=dn(Ln,e.__scopeDialog);return R(ii,{present:r||i.open},i.modal?R(ep,Te({},o,{ref:t})):R(tp,Te({},o,{ref:t})))}),ep=_e((e,t)=>{const n=dn(Ln,e.__scopeDialog),r=U(null),o=On(t,n.contentRef,r);return G(()=>{const i=r.current;if(i)return Wh(i)},[]),R(Ac,Te({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:an(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:an(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:an(e.onFocusOutside,i=>i.preventDefault())}))}),tp=_e((e,t)=>{const n=dn(Ln,e.__scopeDialog),r=U(!1),o=U(!1);return R(Ac,Te({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Ac=_e((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=dn(Ln,n),c=U(null),u=On(t,c);return ch(),R(ue,null,R(Qf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},R(Gf,Te({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Pc(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function Pc(e){return e?"open":"closed"}const np=Yh,rp=Zh,op=Qh,Ec=Fe({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Rr=Fe({}),fi=Fe(null),Ir=typeof document<"u",hi=Ir?Be:G,pi=Fe({strict:!1});function ip(e,t,n,r){const{visualElement:o}=we(Rr),i=we(pi),s=we(fi),a=we(Ec).reducedMotion,c=U();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;Tr(()=>{u&&u.update(n,s)});const d=U(!!window.HandoffAppearAnimations);return hi(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),G(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function Vc(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sp(e,t,n){return me(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Vc(n)&&(n.current=r))},[t])}function Nn(e){return typeof e=="string"||Array.isArray(e)}function Fr(e){return typeof e=="object"&&typeof e.start=="function"}const mi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vi=["initial",...mi];function Dr(e){return Fr(e.animate)||vi.some(t=>Nn(e[t]))}function Oc(e){return!!(Dr(e)||e.variants)}function ap(e,t){if(Dr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Nn(n)?n:void 0,animate:Nn(r)?r:void 0}}return e.inherit!==!1?t:{}}function cp(e){const{initial:t,animate:n}=ap(e,we(Rr));return de(()=>({initial:t,animate:n}),[Lc(t),Lc(n)])}function Lc(e){return Array.isArray(e)?e.join(" "):e}const Nc={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"]},Rn={};for(const e in Nc)Rn[e]={isEnabled:t=>Nc[e].some(n=>!!t[n])};function gi(e){for(const t in e)Rn[t]={...Rn[t],...e[t]}}const Rc=Fe({}),lp=Fe({}),up=Symbol.for("motionComponentSymbol");function dp({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&gi(e);function i(a,c){let u;const d={...we(Ec),...a,layoutId:fp(a)},{isStatic:l}=d,f=cp(a),h=r(a,l);if(!l&&Ir){f.visualElement=ip(o,h,d,t);const p=we(lp),m=we(pi).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,m,e,p))}return R(Rr.Provider,{value:f},u&&f.visualElement?R(u,{visualElement:f.visualElement,...d}):null,n(o,a,sp(h,f.visualElement,c),h,l,f.visualElement))}const s=_e(i);return s[up]=o,s}function fp({layoutId:e}){const t=we(Rc).id;return t&&e!==void 0?t+"-"+e:e}function hp(e){function t(r,o={}){return dp(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const pp=["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 bi(e){return typeof e!="string"||e.includes("-")?!1:!!(pp.indexOf(e)>-1||/[A-Z]/.test(e))}const mp={},In=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(In);function Ic(e,{layout:t,layoutId:n}){return Nt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mp[e]||e==="opacity")}const Ee=e=>!!(e&&e.getVelocity),vp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gp=In.length;function bp(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<gp;s++){const a=In[s];if(e[a]!==void 0){const c=vp[a]||a;i+=`${c}(${e[a]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}const Fc=e=>t=>typeof t=="string"&&t.startsWith(e),Dc=Fc("--"),yi=Fc("var(--"),yp=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,wp=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fn=(e,t,n)=>Math.min(Math.max(n,e),t),Rt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fn={...Rt,transform:e=>fn(0,1,e)},zr={...Rt,default:1},Dn=e=>Math.round(e*1e5)/1e5,Br=/(-)?([\d]*\.?[\d])+/g,zc=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,_p=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function zn(e){return typeof e=="string"}const Bn=e=>({test:t=>zn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=Bn("deg"),hn=Bn("%"),z=Bn("px"),xp=Bn("vh"),kp=Bn("vw"),Bc={...hn,parse:e=>hn.parse(e)/100,transform:e=>hn.transform(e*100)},jc={...Rt,transform:Math.round},Hc={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,size:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:zr,scaleX:zr,scaleY:zr,scaleZ:zr,skew:gt,skewX:gt,skewY:gt,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Fn,originX:Bc,originY:Bc,originZ:z,zIndex:jc,fillOpacity:Fn,strokeOpacity:Fn,numOctaves:jc};function wi(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let c=!1,u=!1,d=!0;for(const l in t){const f=t[l];if(Dc(l)){i[l]=f;continue}const h=Hc[l],p=wp(f,h);if(Nt.has(l)){if(c=!0,s[l]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else l.startsWith("origin")?(u=!0,a[l]=p):o[l]=p}if(t.transform||(c||r?o.transform=bp(e.transform,n,d,r):o.transform&&(o.transform="none")),u){const{originX:l="50%",originY:f="50%",originZ:h=0}=a;o.transformOrigin=`${l} ${f} ${h}`}}const _i=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uc(e,t,n){for(const r in t)!Ee(t[r])&&!Ic(r,n)&&(e[r]=t[r])}function $p({transformTemplate:e},t,n){return de(()=>{const r=_i();return wi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sp(e,t,n){const r=e.style||{},o={};return Uc(o,r,e),Object.assign(o,$p(e,t,n)),e.transformValues?e.transformValues(o):o}function Mp(e,t,n){const r={},o=Sp(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,r}const Tp=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 jr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Tp.has(e)}let Xc=e=>!jr(e);function Cp(e){e&&(Xc=t=>t.startsWith("on")?!jr(t):e(t))}try{Cp(require("@emotion/is-prop-valid").default)}catch{}function Ap(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Xc(o)||n===!0&&jr(o)||!t&&!jr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function qc(e,t,n){return typeof e=="string"?e:z.transform(t+n*e)}function Pp(e,t,n){const r=qc(t,e.x,e.width),o=qc(n,e.y,e.height);return`${r} ${o}`}const Ep={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vp={offset:"strokeDashoffset",array:"strokeDasharray"};function Op(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Ep:Vp;e[i.offset]=z.transform(-r);const s=z.transform(t),a=z.transform(n);e[i.array]=`${s} ${a}`}function xi(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,l,f){if(wi(e,u,d,f),l){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&&(o!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=Pp(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&Op(h,s,a,c,!1)}const Wc=()=>({..._i(),attrs:{}}),ki=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Lp(e,t,n,r){const o=de(()=>{const i=Wc();return xi(i,t,{enableHardwareAcceleration:!1},ki(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Uc(i,e.style,e),o.style={...i,...o.style}}return o}function Np(e=!1){return(n,r,o,{latestValues:i},s)=>{const c=(bi(n)?Lp:Mp)(r,i,s,n),d={...Ap(r,typeof n=="string",e),...c,ref:o},{children:l}=r,f=de(()=>Ee(l)?l.get():l,[l]);return R(n,{...d,children:f})}}const $i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Kc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Yc=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 Gc(e,t,n,r){Kc(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Yc.has(o)?o:$i(o),t.attrs[o])}function Si(e,t){const{style:n}=e,r={};for(const o in n)(Ee(n[o])||t.style&&Ee(t.style[o])||Ic(o,e))&&(r[o]=n[o]);return r}function Zc(e,t){const n=Si(e,t);for(const r in e)if(Ee(e[r])||Ee(t[r])){const o=In.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Mi(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function Jc(e){const t=U(null);return t.current===null&&(t.current=e()),t.current}const Hr=e=>Array.isArray(e),Rp=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Ip=e=>Hr(e)?e[e.length-1]||0:e;function Fp(e){const t=Ee(e)?e.get():e;return Rp(t)?t.toValue():t}function Dp({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:zp(r,o,i,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Qc=e=>(t,n)=>{const r=we(Rr),o=we(fi),i=()=>Dp(e,t,r,o);return n?i():Jc(i)};function zp(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Fp(i[f]);let{initial:s,animate:a}=e;const c=Dr(e),u=Oc(e);t&&u&&!c&&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 l=d?a:s;return l&&typeof l!="boolean"&&!Fr(l)&&(Array.isArray(l)?l:[l]).forEach(h=>{const p=Mi(e,h);if(!p)return;const{transitionEnd:m,transition:y,...x}=p;for(const g in x){let w=x[g];if(Array.isArray(w)){const M=d?w.length-1:0;w=w[M]}w!==null&&(o[g]=w)}for(const g in m)o[g]=m[g]}),o}const xe=e=>e;class el{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 Bp(e){let t=new el,n=new el,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const l=d&&o,f=l?t:n;return u&&s.add(c),f.add(c)&&l&&o&&(r=t.order.length),c},cancel:c=>{n.remove(c),s.delete(c)},process:c=>{if(o){i=!0;return}if(o=!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(c),s.has(d)&&(a.schedule(d),e())}o=!1,i&&(i=!1,a.process(c))}};return a}const Ur=["prepare","read","update","preRender","render","postRender"],jp=40;function Hp(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Ur.reduce((l,f)=>(l[f]=Bp(()=>n=!0),l),{}),s=l=>i[l].process(o),a=()=>{const l=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(l-o.timestamp,jp),1),o.timestamp=l,o.isProcessing=!0,Ur.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:Ur.reduce((l,f)=>{const h=i[f];return l[f]=(p,m=!1,y=!1)=>(n||c(),h.schedule(p,m,y)),l},{}),cancel:l=>Ur.forEach(f=>i[f].cancel(l)),state:o,steps:i}}const{schedule:ke,cancel:Xr,state:jn,steps:Py}=Hp(typeof requestAnimationFrame<"u"?requestAnimationFrame:xe,!0),Up={useVisualState:Qc({scrapeMotionValuesFromProps:Zc,createRenderState:Wc,onMount:(e,t,{renderState:n,latestValues:r})=>{ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ke.render(()=>{xi(n,r,{enableHardwareAcceleration:!1},ki(t.tagName),e.transformTemplate),Gc(t,n)})}})},Xp={useVisualState:Qc({scrapeMotionValuesFromProps:Si,createRenderState:_i})};function qp(e,{forwardMotionProps:t=!1},n,r){return{...bi(e)?Up:Xp,preloadedFeatures:n,useRender:Np(t),createVisualElement:r,Component:e}}function It(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Wp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function tl(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Kp=e=>t=>Wp(t)&&e(t,tl(t));function qr(e,t,n,r){return It(e,t,Kp(n),r)}const Yp=(e,t)=>n=>t(e(n)),Ft=(...e)=>e.reduce(Yp);function nl(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const rl=nl("dragHorizontal"),ol=nl("dragVertical");function Gp(e){let t=!1;if(e==="y")t=ol();else if(e==="x")t=rl();else{const n=rl(),r=ol();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function il(){const e=Gp(!0);return e?(e(),!1):!0}class pn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function sl(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(i,s)=>{if(i.type==="touch"||il())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ke.update(()=>a[r](i,s))};return qr(e.current,n,o,{passive:!e.getProps()[r]})}class Zp extends pn{mount(){this.unmount=Ft(sl(this.node,!0),sl(this.node,!1))}unmount(){}}class Jp extends pn{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=Ft(It(this.node.current,"focus",()=>this.onFocus()),It(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const al=(e,t)=>t?e===t?!0:al(e,t.parentElement):!1;function Ti(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,tl(n))}class Qp extends pn{constructor(){super(...arguments),this.removeStartListeners=xe,this.removeEndListeners=xe,this.removeAccessibleListeners=xe,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=qr(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();ke.update(()=>{al(this.node.current,a.target)?u&&u(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=qr(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ft(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ti("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&ke.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=It(this.node.current,"keyup",s),Ti("down",(a,c)=>{this.startPress(a,c)})},n=It(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ti("cancel",(i,s)=>this.cancelPress(i,s))},o=It(this.node.current,"blur",r);this.removeAccessibleListeners=Ft(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ke.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!il()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ke.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=qr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=It(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ft(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ci=new WeakMap,Ai=new WeakMap,e0=e=>{const t=Ci.get(e.target);t&&t(e)},t0=e=>{e.forEach(e0)};function n0({root:e,...t}){const n=e||document;Ai.has(n)||Ai.set(n,{});const r=Ai.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(t0,{root:e,...t})),r[o]}function r0(e,t,n){const r=n0(t);return Ci.set(e,n),r.observe(e),()=>{Ci.delete(e),r.unobserve(e)}}const o0={some:0,all:1};class i0 extends pn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:o0[o]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return r0(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(s0(t,n))&&this.startObserver()}unmount(){}}function s0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const a0={inView:{Feature:i0},tap:{Feature:Qp},focus:{Feature:Jp},hover:{Feature:Zp}};function cl(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 c0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function l0(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Wr(e,t,n){const r=e.getProps();return Mi(r,t,n!==void 0?n:r.custom,c0(e),l0(e))}const u0="data-"+$i("framerAppearId");let Hn=xe,Ue=xe;process.env.NODE_ENV!=="production"&&(Hn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ue=(e,t)=>{if(!e)throw new Error(t)});const Dt=e=>e*1e3,bt=e=>e/1e3,d0={current:!1},ll=e=>Array.isArray(e)&&typeof e[0]=="number";function ul(e){return!!(!e||typeof e=="string"&&dl[e]||ll(e)||Array.isArray(e)&&e.every(ul))}const Un=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Un([0,.65,.55,1]),circOut:Un([.55,0,1,.45]),backIn:Un([.31,.01,.66,-.59]),backOut:Un([.33,1.53,.69,.99])};function fl(e){if(e)return ll(e)?Un(e):Array.isArray(e)?e.map(fl):dl[e]}function f0(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=fl(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function h0(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const hl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,p0=1e-7,m0=12;function v0(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=hl(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>p0&&++a<m0);return s}function Xn(e,t,n,r){if(e===t&&n===r)return xe;const o=i=>v0(i,0,1,e,n);return i=>i===0||i===1?i:hl(o(i),t,r)}const g0=Xn(.42,0,1,1),b0=Xn(0,0,.58,1),pl=Xn(.42,0,.58,1),y0=e=>Array.isArray(e)&&typeof e[0]!="number",ml=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vl=e=>t=>1-e(1-t),gl=e=>1-Math.sin(Math.acos(e)),bl=vl(gl),w0=ml(bl),yl=Xn(.33,1.53,.69,.99),Pi=vl(yl),_0=ml(Pi),wl={linear:xe,easeIn:g0,easeInOut:pl,easeOut:b0,circIn:gl,circInOut:w0,circOut:bl,backIn:Pi,backInOut:_0,backOut:yl,anticipate:e=>(e*=2)<1?.5*Pi(e):.5*(2-Math.pow(2,-10*(e-1)))},_l=e=>{if(Array.isArray(e)){Ue(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Xn(t,n,r,o)}else if(typeof e=="string")return Ue(wl[e]!==void 0,`Invalid easing type '${e}'`),wl[e];return e},Ei=(e,t)=>n=>!!(zn(n)&&_p.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),xl=(e,t,n)=>r=>{if(!zn(r))return r;const[o,i,s,a]=r.match(Br);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},x0=e=>fn(0,255,e),Vi={...Rt,transform:e=>Math.round(x0(e))},zt={test:Ei("rgb","red"),parse:xl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vi.transform(e)+", "+Vi.transform(t)+", "+Vi.transform(n)+", "+Dn(Fn.transform(r))+")"};function k0(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Oi={test:Ei("#"),parse:k0,transform:zt.transform},mn={test:Ei("hsl","hue"),parse:xl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+hn.transform(Dn(t))+", "+hn.transform(Dn(n))+", "+Dn(Fn.transform(r))+")"},Se={test:e=>zt.test(e)||Oi.test(e)||mn.test(e),parse:e=>zt.test(e)?zt.parse(e):mn.test(e)?mn.parse(e):Oi.parse(e),transform:e=>zn(e)?e:e.hasOwnProperty("red")?zt.transform(e):mn.transform(e)},Kr=(e,t,n)=>-n*e+n*t+e;function Li(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 $0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=Li(c,a,e+1/3),i=Li(c,a,e),s=Li(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const Ni=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},S0=[Oi,zt,mn],M0=e=>S0.find(t=>t.test(e));function kl(e){const t=M0(e);Ue(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===mn&&(n=$0(n)),n}const $l=(e,t)=>{const n=kl(e),r=kl(t),o={...n};return i=>(o.red=Ni(n.red,r.red,i),o.green=Ni(n.green,r.green,i),o.blue=Ni(n.blue,r.blue,i),o.alpha=Kr(n.alpha,r.alpha,i),zt.transform(o))};function T0(e){var t,n;return isNaN(e)&&zn(e)&&(((t=e.match(Br))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(zc))===null||n===void 0?void 0:n.length)||0)>0}const Sl={regex:yp,countKey:"Vars",token:"${v}",parse:xe},Ml={regex:zc,countKey:"Colors",token:"${c}",parse:Se.parse},Tl={regex:Br,countKey:"Numbers",token:"${n}",parse:Rt.parse};function Ri(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function Yr(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ri(n,Sl),Ri(n,Ml),Ri(n,Tl),n}function Cl(e){return Yr(e).values}function Al(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Yr(e),i=t.length;return s=>{let a=o;for(let c=0;c<i;c++)c<r?a=a.replace(Sl.token,s[c]):c<r+n?a=a.replace(Ml.token,Se.transform(s[c])):a=a.replace(Tl.token,Dn(s[c]));return a}}const C0=e=>typeof e=="number"?0:e;function A0(e){const t=Cl(e);return Al(e)(t.map(C0))}const vn={test:T0,parse:Cl,createTransformer:Al,getAnimatableNone:A0},Pl=(e,t)=>n=>`${n>0?t:e}`;function El(e,t){return typeof e=="number"?n=>Kr(e,t,n):Se.test(e)?$l(e,t):e.startsWith("var(")?Pl(e,t):Ol(e,t)}const Vl=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>El(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}},P0=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=El(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}},Ol=(e,t)=>{const n=vn.createTransformer(t),r=Yr(e),o=Yr(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?Ft(Vl(r.values,o.values),n):(Hn(!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.`),Pl(e,t))},Ll=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Nl=(e,t)=>n=>Kr(e,t,n);function E0(e){return typeof e=="number"?Nl:typeof e=="string"?Se.test(e)?$l:Ol:Array.isArray(e)?Vl:typeof e=="object"?P0:Nl}function V0(e,t,n){const r=[],o=n||E0(e[0]),i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||xe:t;a=Ft(c,a)}r.push(a)}return r}function Rl(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ue(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=V0(t,r,o),a=s.length,c=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const l=Ll(e[d],e[d+1],u);return s[d](l)};return n?u=>c(fn(e[0],e[i-1],u)):c}function O0(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ll(0,t,r);e.push(Kr(n,1,o))}}function L0(e){const t=[0];return O0(t,e.length-1),t}function N0(e,t){return e.map(n=>n*t)}function R0(e,t){return e.map(()=>t||pl).splice(0,e.length-1)}function Gr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=y0(r)?r.map(_l):_l(r),i={done:!1,value:t[0]},s=N0(n&&n.length===t.length?n:L0(t),e),a=Rl(s,t,{ease:Array.isArray(o)?o:R0(t,o)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}function Il(e,t){return t?e*(1e3/t):0}const I0=5;function Fl(e,t,n){const r=Math.max(t-I0,0);return Il(n-e(r),t-r)}const Ii=.001,F0=.01,Dl=10,D0=.05,z0=1;function B0({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Hn(e<=Dt(Dl),"Spring duration must be 10 seconds or less");let s=1-t;s=fn(D0,z0,s),e=fn(F0,Dl,bt(e)),s<1?(o=u=>{const d=u*s,l=d*e,f=d-n,h=Fi(u,s),p=Math.exp(-l);return Ii-f/h*p},i=u=>{const l=u*s*e,f=l*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-l),m=Fi(Math.pow(u,2),s);return(-o(u)+Ii>0?-1:1)*((f-h)*p)/m}):(o=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-Ii+d*l},i=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const a=5/e,c=H0(o,i,a);if(e=Dt(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const j0=12;function H0(e,t,n){let r=n;for(let o=1;o<j0;o++)r=r-e(r)/t(r);return r}function Fi(e,t){return e*Math.sqrt(1-t*t)}const U0=["duration","bounce"],X0=["stiffness","damping","mass"];function zl(e,t){return t.some(n=>e[n]!==void 0)}function q0(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!zl(e,X0)&&zl(e,U0)){const n=B0(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Bl({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:c,mass:u,velocity:d,duration:l,isResolvedFromDuration:f}=q0(r),h=d?-bt(d):0,p=c/(2*Math.sqrt(a*u)),m=i-o,y=bt(Math.sqrt(a/u)),x=Math.abs(m)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let g;if(p<1){const w=Fi(y,p);g=M=>{const S=Math.exp(-p*y*M);return i-S*((h+p*y*m)/w*Math.sin(w*M)+m*Math.cos(w*M))}}else if(p===1)g=w=>i-Math.exp(-y*w)*(m+(h+y*m)*w);else{const w=y*Math.sqrt(p*p-1);g=M=>{const S=Math.exp(-p*y*M),I=Math.min(w*M,300);return i-S*((h+p*y*m)*Math.sinh(I)+w*m*Math.cosh(I))/w}}return{calculatedDuration:f&&l||null,next:w=>{const M=g(w);if(f)s.done=w>=l;else{let S=h;w!==0&&(p<1?S=Fl(g,w,M):S=0);const I=Math.abs(S)<=n,N=Math.abs(i-M)<=t;s.done=I&&N}return s.value=s.done?i:M,s}}}function jl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},h=C=>a!==void 0&&C<a||c!==void 0&&C>c,p=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let m=n*t;const y=l+m,x=s===void 0?y:s(y);x!==y&&(m=x-l);const g=C=>-m*Math.exp(-C/r),w=C=>x+g(C),M=C=>{const E=g(C),q=w(C);f.done=Math.abs(E)<=u,f.value=f.done?x:q};let S,I;const N=C=>{h(f.value)&&(S=C,I=Bl({keyframes:[f.value,p(f.value)],velocity:Fl(w,C,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:C=>{let E=!1;return!I&&S===void 0&&(E=!0,M(C),N(C)),S!==void 0&&C>S?I.next(C-S):(!E&&M(C),f)}}}const W0=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>Xr(t),now:()=>jn.isProcessing?jn.timestamp:performance.now()}},Hl=2e4;function Ul(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Hl;)t+=n,r=e.next(t);return t>=Hl?1/0:t}const K0={decay:jl,inertia:jl,tween:Gr,keyframes:Gr,spring:Bl};function Zr({autoplay:e=!0,delay:t=0,driver:n=W0,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:l,...f}){let h=1,p=!1,m,y;const x=()=>{y=new Promise(Y=>{m=Y})};x();let g;const w=K0[o]||Gr;let M;w!==Gr&&typeof r[0]!="number"&&(M=Rl([0,100],r,{clamp:!1}),r=[0,100]);const S=w({...f,keyframes:r});let I;a==="mirror"&&(I=w({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let N="idle",C=null,E=null,q=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=Ul(S));const{calculatedDuration:K}=S;let j=1/0,B=1/0;K!==null&&(j=K+s,B=j*(i+1)-s);let H=0;const X=Y=>{if(E===null)return;h>0&&(E=Math.min(E,Y)),h<0&&(E=Math.min(Y-B/h,E)),C!==null?H=C:H=Math.round(Y-E)*h;const Re=H-t*(h>=0?1:-1),At=h>=0?Re<0:Re>B;H=Math.max(Re,0),N==="finished"&&C===null&&(H=B);let Pt=H,Gt=S;if(i){const Zt=H/j;let Jt=Math.floor(Zt),dt=Zt%1;!dt&&Zt>=1&&(dt=1),dt===1&&Jt--,Jt=Math.min(Jt,i+1);const fr=!!(Jt%2);fr&&(a==="reverse"?(dt=1-dt,s&&(dt-=s/j)):a==="mirror"&&(Gt=I));let Oo=fn(0,1,dt);H>B&&(Oo=a==="reverse"&&fr?1:0),Pt=Oo*j}const Ge=At?{done:!1,value:r[0]}:Gt.next(Pt);M&&(Ge.value=M(Ge.value));let{done:Ze}=Ge;!At&&K!==null&&(Ze=h>=0?H>=B:H<=0);const Vo=C===null&&(N==="finished"||N==="running"&&Ze);return l&&l(Ge.value),Vo&&Le(),Ge},re=()=>{g&&g.stop(),g=void 0},se=()=>{N="idle",re(),m(),x(),E=q=null},Le=()=>{N="finished",d&&d(),re(),m()},Ne=()=>{if(p)return;g||(g=n(X));const Y=g.now();c&&c(),C!==null?E=Y-C:(!E||N==="finished")&&(E=Y),N==="finished"&&x(),q=E,C=null,N="running",g.start()};e&&Ne();const ut={then(Y,Re){return y.then(Y,Re)},get time(){return bt(H)},set time(Y){Y=Dt(Y),H=Y,C!==null||!g||h===0?C=Y:E=g.now()-Y/h},get duration(){const Y=S.calculatedDuration===null?Ul(S):S.calculatedDuration;return bt(Y)},get speed(){return h},set speed(Y){Y===h||!g||(h=Y,ut.time=bt(H))},get state(){return N},play:Ne,pause:()=>{N="paused",C=H},stop:()=>{p=!0,N!=="idle"&&(N="idle",u&&u(),se())},cancel:()=>{q!==null&&X(q),se()},complete:()=>{N="finished"},sample:Y=>(E=0,X(Y))};return ut}function Y0(e){let t;return()=>(t===void 0&&(t=e()),t)}const G0=Y0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Z0=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Jr=10,J0=2e4,Q0=(e,t)=>t.type==="spring"||e==="backgroundColor"||!ul(t.ease);function em(e,t,{onUpdate:n,onComplete:r,...o}){if(!(G0()&&Z0.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let s=!1,a,c;const u=()=>{c=new Promise(g=>{a=g})};u();let{keyframes:d,duration:l=300,ease:f,times:h}=o;if(Q0(t,o)){const g=Zr({...o,repeat:0,delay:0});let w={done:!1,value:d[0]};const M=[];let S=0;for(;!w.done&&S<J0;)w=g.sample(S),M.push(w.value),S+=Jr;h=void 0,d=M,l=S-Jr,f="linear"}const p=f0(e.owner.current,t,d,{...o,duration:l,ease:f,times:h});o.syncStart&&(p.startTime=jn.isProcessing?jn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>p.cancel(),y=()=>{ke.update(m),a(),u()};return p.onfinish=()=>{e.set(h0(d,o)),r&&r(),y()},{then(g,w){return c.then(g,w)},attachTimeline(g){return p.timeline=g,p.onfinish=null,xe},get time(){return bt(p.currentTime||0)},set time(g){p.currentTime=Dt(g)},get speed(){return p.playbackRate},set speed(g){p.playbackRate=g},get duration(){return bt(l)},play:()=>{s||(p.play(),Xr(m))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:g}=p;if(g){const w=Zr({...o,autoplay:!1});e.setWithVelocity(w.sample(g-Jr).value,w.sample(g).value,Jr)}y()},complete:()=>p.finish(),cancel:y}}function tm({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:xe,pause:xe,stop:xe,then:i=>(i(),Promise.resolve()),cancel:xe,complete:xe});return t?Zr({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const nm={type:"spring",stiffness:500,damping:25,restSpeed:10},rm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),om={type:"keyframes",duration:.8},im={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sm=(e,{keyframes:t})=>t.length>2?om:Nt.has(e)?e.startsWith("scale")?rm(t[1]):nm:im,Di=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vn.test(t)||t==="0")&&!t.startsWith("url(")),am=new Set(["brightness","contrast","saturate","opacity"]);function cm(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Br)||[];if(!r)return e;const o=n.replace(r,"");let i=am.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const lm=/([a-z-]*)\(.*?\)/g,zi={...vn,getAnimatableNone:e=>{const t=e.match(lm);return t?t.map(cm).join(" "):e}},um={...Hc,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:zi,WebkitFilter:zi},Bi=e=>um[e];function Xl(e,t){let n=Bi(e);return n!==zi&&(n=vn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ql=e=>/^0[^.\s]+$/.test(e);function dm(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||ql(e)}function fm(e,t,n,r){const o=Di(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let u=0;u<i.length;u++)i[u]===null&&(i[u]=u===0?s:i[u-1]),dm(i[u])&&c.push(u),typeof i[u]=="string"&&i[u]!=="none"&&i[u]!=="0"&&(a=i[u]);if(o&&c.length&&a)for(let u=0;u<c.length;u++){const d=c[u];i[d]=Xl(t,a)}return i}function hm({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function pm(e,t){return e[t]||e.default||e}const mm=(e,t,n,r={})=>o=>{const i=pm(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Dt(s);const c=fm(t,e,n,i),u=c[0],d=c[c.length-1],l=Di(e,u),f=Di(e,d);Hn(l===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:c,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(hm(i)||(h={...h,...sm(e,h)}),h.duration&&(h.duration=Dt(h.duration)),h.repeatDelay&&(h.repeatDelay=Dt(h.repeatDelay)),!l||!f||d0.current||i.type===!1)return tm(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=em(t,e,h);if(p)return p}return Zr(h)};function Qr(e){return!!(Ee(e)&&e.add)}const Wl=e=>/^\-?\d*\.?\d+$/.test(e);function vm(e,t){e.indexOf(t)===-1&&e.push(t)}function gm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kl{constructor(){this.subscriptions=[]}add(t){return vm(this.subscriptions,t),()=>gm(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Yl=new Set;function ji(e,t,n){e||Yl.has(t)||(console.warn(t),n&&console.warn(n),Yl.add(t))}const bm=e=>!isNaN(parseFloat(e));class ym{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:s}=jn;this.lastUpdated!==s&&(this.timeDelta=i,this.lastUpdated=s,ke.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()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ke.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=bm(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&ji(!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 Kl);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.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?Il(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 qn(e,t){return new ym(e,t)}const Gl=e=>t=>t.test(e),Zl=[Rt,z,hn,gt,kp,xp,{test:e=>e==="auto",parse:e=>e}],Wn=e=>Zl.find(Gl(e)),wm=[...Zl,Se,vn],_m=e=>wm.find(Gl(e));function xm(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qn(n))}function km(e,t){const n=Wr(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i){const a=Ip(i[s]);xm(e,s,a)}}function $m(e,t,n){var r,o;const i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(s)for(let a=0;a<s;a++){const c=i[a],u=t[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&o!==void 0?o:t[c]),d!=null&&(typeof d=="string"&&(Wl(d)||ql(d))?d=parseFloat(d):!_m(d)&&vn.test(u)&&(d=Xl(c,u)),e.addValue(c,qn(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function Sm(e,t){return t?(t[e]||t.default||t).from:void 0}function Mm(e,t,n){const r={};for(const o in e){const i=Sm(o,t);if(i!==void 0)r[o]=i;else{const s=n.getValue(o);s&&(r[o]=s.get())}}return r}function Tm({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Jl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const l in a){const f=e.getValue(l),h=a[l];if(!f||h===void 0||d&&Tm(d,l))continue;const p={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!f.hasAnimated){const y=e.getProps()[u0];y&&(p.elapsed=window.HandoffAppearAnimations(y,l,f,ke),p.syncStart=!0)}f.start(mm(l,f,h,e.shouldReduceMotion&&Nt.has(l)?{type:!1}:p));const m=f.animation;Qr(c)&&(c.add(l),m.then(()=>c.remove(l))),u.push(m)}return s&&Promise.all(u).then(()=>{s&&km(e,s)}),u}function Hi(e,t,n={}){const r=Wr(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Jl(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:l}=o;return Cm(e,t,u+c,d,l,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,u]=a==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(n.delay)])}function Cm(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(Am).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Hi(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function Am(e,t){return e.sortNodePosition(t)}function Pm(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Hi(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Hi(e,t,n);else{const o=typeof t=="function"?Wr(e,t,n.custom):t;r=Promise.all(Jl(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Em=[...mi].reverse(),Vm=mi.length;function Om(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Pm(e,n,r)))}function Lm(e){let t=Om(e);const n=Rm();let r=!0;const o=(c,u)=>{const d=Wr(e,u);if(d){const{transition:l,transitionEnd:f,...h}=d;c={...c,...h,...f}}return c};function i(c){t=c(e)}function s(c,u){const d=e.getProps(),l=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},m=1/0;for(let x=0;x<Vm;x++){const g=Em[x],w=n[g],M=d[g]!==void 0?d[g]:l[g],S=Nn(M),I=g===u?w.isActive:null;I===!1&&(m=x);let N=M===l[g]&&M!==d[g]&&S;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),w.protectedKeys={...p},!w.isActive&&I===null||!M&&!w.prevProp||Fr(M)||typeof M=="boolean")continue;const C=Nm(w.prevProp,M);let E=C||g===u&&w.isActive&&!N&&S||x>m&&S;const q=Array.isArray(M)?M:[M];let K=q.reduce(o,{});I===!1&&(K={});const{prevResolvedValues:j={}}=w,B={...j,...K},H=X=>{E=!0,h.delete(X),w.needsAnimating[X]=!0};for(const X in B){const re=K[X],se=j[X];p.hasOwnProperty(X)||(re!==se?Hr(re)&&Hr(se)?!cl(re,se)||C?H(X):w.protectedKeys[X]=!0:re!==void 0?H(X):h.add(X):re!==void 0&&h.has(X)?H(X):w.protectedKeys[X]=!0)}w.prevProp=M,w.prevResolvedValues=K,w.isActive&&(p={...p,...K}),r&&e.blockInitialAnimation&&(E=!1),E&&!N&&f.push(...q.map(X=>({animation:X,options:{type:g,...c}})))}if(h.size){const x={};h.forEach(g=>{const w=e.getBaseTarget(g);w!==void 0&&(x[g]=w)}),f.push({animation:x})}let y=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function a(c,u,d){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(d,c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n}}function Nm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!cl(t,e):!1}function Bt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rm(){return{animate:Bt(!0),whileInView:Bt(),whileHover:Bt(),whileTap:Bt(),whileDrag:Bt(),whileFocus:Bt(),exit:Bt()}}class Im extends pn{constructor(t){super(t),t.animationState||(t.animationState=Lm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Fr(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 Fm=0;class Dm extends pn{constructor(){super(...arguments),this.id=Fm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const zm={animation:{Feature:Im},exit:{Feature:Dm}},Ql=()=>({min:0,max:0}),eu=()=>({x:Ql(),y:Ql()});function Bm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jm(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 Hm(e,t){return Bm(jm(e.getBoundingClientRect(),t))}const Um=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xm(e){const t=Um.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const qm=4;function Ui(e,t,n=1){Ue(n<=qm,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Xm(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Wl(s)?parseFloat(s):s}else return yi(o)?Ui(o,t,n+1):o}function Wm(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const i=o.get();if(!yi(i))return;const s=Ui(i,r);s&&o.set(s)});for(const o in t){const i=t[o];if(!yi(i))continue;const s=Ui(i,r);s&&(t[o]=s,n||(n={}),n[o]===void 0&&(n[o]=i))}return{target:t,transitionEnd:n}}const Km=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),tu=e=>Km.has(e),Ym=e=>Object.keys(e).some(tu),eo=e=>e===Rt||e===z,nu=(e,t)=>parseFloat(e.split(", ")[t]),ru=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return nu(o[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?nu(i[1],e):0}},Gm=new Set(["x","y","z"]),Zm=In.filter(e=>!Gm.has(e));function Jm(e){const t=[];return Zm.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 gn={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:ru(4,13),y:ru(5,14)};gn.translateX=gn.x,gn.translateY=gn.y;const Qm=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=gn[u](r,i)}),t.render();const c=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=gn[u](c,i)}),e},ev=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(tu);let i=[],s=!1;const a=[];if(o.forEach(c=>{const u=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],l=Wn(d);const f=t[c];let h;if(Hr(f)){const p=f.length,m=f[0]===null?1:0;d=f[m],l=Wn(d);for(let y=m;y<p&&f[y]!==null;y++)h?Ue(Wn(f[y])===h,"All keyframes must be of the same type"):(h=Wn(f[y]),Ue(h===l||eo(l)&&eo(h),"Keyframes must be of the same dimension as the current value"))}else h=Wn(f);if(l!==h)if(eo(l)&&eo(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&h===z&&(t[c]=f.map(parseFloat))}else l!=null&&l.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.transform(d)):t[c]=l.transform(f):(s||(i=Jm(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],u.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=Qm(t,e,a);return i.length&&i.forEach(([d,l])=>{e.getValue(d).set(l)}),e.render(),Ir&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function tv(e,t,n,r){return Ym(t)?ev(e,t,n,r):{target:t,transitionEnd:r}}const nv=(e,t,n,r)=>{const o=Wm(e,t,r);return t=o.target,r=o.transitionEnd,tv(e,t,n,r)},Xi={current:null},ou={current:!1};function rv(){if(ou.current=!0,!!Ir)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xi.current=e.matches;e.addListener(t),t()}else Xi.current=!1}function ov(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(Ee(i))e.addValue(o,i),Qr(r)&&r.add(o),process.env.NODE_ENV==="development"&&ji(i.version==="10.16.5",`Attempting to mix Framer Motion versions ${i.version} with 10.16.5 may not work as expected.`);else if(Ee(s))e.addValue(o,qn(i,{owner:e})),Qr(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(o);e.addValue(o,qn(a!==void 0?a:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const iu=new WeakMap,su=Object.keys(Rn),iv=su.length,au=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],sv=vi.length;class av{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i},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=()=>ke.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.isControllingVariants=Dr(n),this.isVariantNode=Oc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const l in d){const f=d[l];a[l]!==void 0&&Ee(f)&&(f.set(a[l],!1),Qr(u)&&u.add(l))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,iu.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)),ou.current||rv(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xi.current,process.env.NODE_ENV!=="production"&&ji(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(){iu.delete(this.current),this.projection&&this.projection.unmount(),Xr(this.notifyUpdate),Xr(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=Nt.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ke.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,i){let s,a;if(process.env.NODE_ENV!=="production"&&o&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Hn(!1,c):Ue(!1,c)}for(let c=0;c<iv;c++){const u=su[c],{isEnabled:d,Feature:l,ProjectionNode:f,MeasureLayout:h}=Rn[u];f&&(s=f),d(n)&&(!this.features[u]&&l&&(this.features[u]=new l(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:l,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||l&&Vc(l),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,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):eu()}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<au.length;r++){const o=au[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i=t["on"+o];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=ov(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<sv;r++){const o=vi[r],i=this.props[o];(Nn(i)||i===!1)&&(n[o]=i)}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=qn(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,o=typeof r=="string"||typeof r=="object"?(n=Mi(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ee(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class cu extends av{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:o},i){let s=Mm(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),s&&(s=o(s))),i){$m(this,r,s);const a=nv(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function cv(e){return window.getComputedStyle(e)}class lv extends cu{readValueFromInstance(t,n){if(Nt.has(n)){const r=Bi(n);return r&&r.default||0}else{const r=cv(t),o=(Dc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hm(t,n)}build(t,n,r,o){wi(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Si(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ee(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){Kc(t,n,r,o)}}class uv extends cu{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nt.has(n)){const r=Bi(n);return r&&r.default||0}return n=Yc.has(n)?n:$i(n),t.getAttribute(n)}measureInstanceViewportBox(){return eu()}scrapeMotionValuesFromProps(t,n){return Zc(t,n)}build(t,n,r,o){xi(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){Gc(t,n,r,o)}mount(t){this.isSVGTag=ki(t.tagName),super.mount(t)}}const dv=(e,t)=>bi(e)?new uv(t,{enableHardwareAcceleration:!1}):new lv(t,{enableHardwareAcceleration:!0}),Kn=hp(qp);function lu(){const e=U(!1);return hi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fv(){const e=lu(),[t,n]=ae(0),r=me(()=>{e.current&&n(t+1)},[t]);return[me(()=>ke.postRender(r),[r]),t]}class hv extends Pe{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=yr(),r=U(null),o=U({width:0,height:0,top:0,left:0});return Tr(()=>{const{width:i,height:s,top:a,left:c}=o.current;if(t||!r.current||!i||!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: ${i}px !important;
@@ -46,12 +46,12 @@ var Sy=Object.defineProperty;var My=(Et,Je,Fe)=>Je in Et?Sy(Et,Je,{enumerable:!0
46
46
  top: ${a}px !important;
47
47
  left: ${c}px !important;
48
48
  }
49
- `),()=>{document.head.removeChild(u)}},[t]),R(hv,{isPresent:t,childRef:r,sizeRef:o},mt(e,{ref:r}))}const qi=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Jc(mv),c=br(),u=de(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:d=>{a.set(d,!0);for(const l of a.values())if(!l)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),i?void 0:[n]);return de(()=>{a.forEach((d,l)=>a.set(l,!1))},[n]),G(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=R(pv,{isPresent:n},e)),R(fi.Provider,{value:u},e)};function mv(){return new Map}function vv(e){return G(()=>()=>e(),[])}const jt=e=>e.key||"";function gv(e,t){e.forEach(n=>{const r=jt(n);t.set(r,n)})}function bv(e){const t=[];return je.forEach(e,n=>{pt(n)&&t.push(n)}),t}const to=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ue(!o,"Replace exitBeforeEnter with mode='wait'");const a=we(Rc).forceRender||fv()[0],c=lu(),u=bv(e);let d=u;const l=U(new Map).current,f=U(d),h=U(new Map).current,p=U(!0);if(hi(()=>{p.current=!1,gv(u,h),f.current=d}),vv(()=>{p.current=!0,h.clear(),l.clear()}),p.current)return R(ue,null,d.map(g=>R(qi,{key:jt(g),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s},g)));d=[...d];const m=f.current.map(jt),y=u.map(jt),x=m.length;for(let g=0;g<x;g++){const w=m[g];y.indexOf(w)===-1&&!l.has(w)&&l.set(w,void 0)}return s==="wait"&&l.size&&(d=[]),l.forEach((g,w)=>{if(y.indexOf(w)!==-1)return;const M=h.get(w);if(!M)return;const S=m.indexOf(w);let F=g;if(!F){const N=()=>{l.delete(w);const C=Array.from(h.keys()).filter(E=>!y.includes(E));if(C.forEach(E=>h.delete(E)),f.current=u.filter(E=>{const q=jt(E);return q===w||C.includes(q)}),!l.size){if(c.current===!1)return;a(),r&&r()}};F=R(qi,{key:jt(M),isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:i,mode:s},M),l.set(w,F)}d.splice(S,0,F)}),d=d.map(g=>{const w=g.key;return l.has(w)?g:R(qi,{key:jt(g),isPresent:!0,presenceAffectsLayout:i,mode:s},g)}),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.`),R(ue,null,l.size?d:d.map(g=>mt(g)))};function yv({children:e,features:t,strict:n=!1}){const[,r]=ae(!Wi(t)),o=U(void 0);if(!Wi(t)){const{renderer:i,...s}=t;o.current=i,gi(s)}return G(()=>{Wi(t)&&t().then(({renderer:i,...s})=>{gi(s),o.current=i,r(!0)})},[]),R(pi.Provider,{value:{renderer:o.current,strict:n}},e)}function Wi(e){return typeof e=="function"}const wv={renderer:dv,...zm,...a0},Ce=Symbol.for("@ts-pattern/matcher"),uu=Symbol.for("@ts-pattern/isVariadic"),no="@ts-pattern/anonymous-select-key",Ki=e=>!!(e&&typeof e=="object"),ro=e=>e&&!!e[Ce],ge=(e,t,n)=>{if(ro(e)){const r=e[Ce](),{matched:o,selections:i}=r.match(t);return o&&i&&Object.keys(i).forEach(s=>n(s,i[s])),o}if(Ki(e)){if(!Ki(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],o=[],i=[];for(const s of e.keys()){const a=e[s];ro(a)&&a[uu]?i.push(a):i.length?o.push(a):r.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+o.length)return!1;const s=t.slice(0,r.length),a=o.length===0?[]:t.slice(-o.length),c=t.slice(r.length,o.length===0?1/0:-o.length);return r.every((u,d)=>ge(u,s[d],n))&&o.every((u,d)=>ge(u,a[d],n))&&(i.length===0||ge(i[0],c,n))}return e.length===t.length&&e.every((s,a)=>ge(s,t[a],n))}return Object.keys(e).every(r=>{const o=e[r];return(r in t||ro(i=o)&&i[Ce]().matcherType==="optional")&&ge(o,t[r],n);var i})}return Object.is(t,e)},Ve=e=>{var t,n,r;return Ki(e)?ro(e)?(t=(n=(r=e[Ce]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?Kn(e,Ve):Kn(Object.values(e),Ve):[]},Kn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function _v(...e){if(e.length===1){const[t]=e;return n=>ge(t,n,()=>{})}if(e.length===2){const[t,n]=e;return ge(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function $e(e){return Object.assign(e,{optional:()=>Gi(e),and:t=>te(e,t),or:t=>du(e,t),select:t=>t===void 0?Yn(e):Yn(t,e)})}function Yi(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[uu]:!0})}}))(e),{optional:()=>Yi(Gi(e)),select:t=>Yi(t===void 0?Yn(e):Yn(t,e))})}function Gi(e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return t===void 0?(Ve(e).forEach(o=>r(o,void 0)),{matched:!0,selections:n}):{matched:ge(e,t,r),selections:n}},getSelectionKeys:()=>Ve(e),matcherType:"optional"})})}const xv=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},kv=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function te(...e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return{matched:e.every(o=>ge(o,t,r)),selections:n}},getSelectionKeys:()=>Kn(e,Ve),matcherType:"and"})})}function du(...e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return Kn(e,Ve).forEach(o=>r(o,void 0)),{matched:e.some(o=>ge(o,t,r)),selections:n}},getSelectionKeys:()=>Kn(e,Ve),matcherType:"or"})})}function W(e){return{[Ce]:()=>({match:t=>({matched:!!e(t)})})}}function Yn(...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 $e({[Ce]:()=>({match:r=>{let o={[t??no]:r};return{matched:n===void 0||ge(n,r,(i,s)=>{o[i]=s}),selections:o}},getSelectionKeys:()=>[t??no].concat(n===void 0?[]:Ve(n))})})}function Xe(e){return typeof e=="number"}function Ht(e){return typeof e=="string"}function yt(e){return typeof e=="bigint"}const fu=$e(W(function(e){return!0})),$v=fu,Ut=e=>Object.assign($e(e),{startsWith:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&r.endsWith(n)))));var n},minLength:t=>Ut(te(e,(n=>W(r=>Ht(r)&&r.length>=n))(t))),maxLength:t=>Ut(te(e,(n=>W(r=>Ht(r)&&r.length<=n))(t))),includes:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&r.includes(n)))));var n},regex:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&!!r.match(n)))));var n}}),Sv=Ut(W(Ht)),qe=e=>Object.assign($e(e),{between:(t,n)=>qe(te(e,((r,o)=>W(i=>Xe(i)&&r<=i&&o>=i))(t,n))),lt:t=>qe(te(e,(n=>W(r=>Xe(r)&&r<n))(t))),gt:t=>qe(te(e,(n=>W(r=>Xe(r)&&r>n))(t))),lte:t=>qe(te(e,(n=>W(r=>Xe(r)&&r<=n))(t))),gte:t=>qe(te(e,(n=>W(r=>Xe(r)&&r>=n))(t))),int:()=>qe(te(e,W(t=>Xe(t)&&Number.isInteger(t)))),finite:()=>qe(te(e,W(t=>Xe(t)&&Number.isFinite(t)))),positive:()=>qe(te(e,W(t=>Xe(t)&&t>0))),negative:()=>qe(te(e,W(t=>Xe(t)&&t<0)))}),Mv=qe(W(Xe)),wt=e=>Object.assign($e(e),{between:(t,n)=>wt(te(e,((r,o)=>W(i=>yt(i)&&r<=i&&o>=i))(t,n))),lt:t=>wt(te(e,(n=>W(r=>yt(r)&&r<n))(t))),gt:t=>wt(te(e,(n=>W(r=>yt(r)&&r>n))(t))),lte:t=>wt(te(e,(n=>W(r=>yt(r)&&r<=n))(t))),gte:t=>wt(te(e,(n=>W(r=>yt(r)&&r>=n))(t))),positive:()=>wt(te(e,W(t=>yt(t)&&t>0))),negative:()=>wt(te(e,W(t=>yt(t)&&t<0)))}),Tv=wt(W(yt)),Cv=$e(W(function(e){return typeof e=="boolean"})),Av=$e(W(function(e){return typeof e=="symbol"})),Pv=$e(W(function(e){return e==null}));var Ae={__proto__:null,matcher:Ce,optional:Gi,array:function(...e){return Yi({[Ce]:()=>({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 Ve(n).forEach(i=>{r[i]=[]}),{matched:!0,selections:r};const o=(i,s)=>{r[i]=(r[i]||[]).concat([s])};return{matched:t.every(i=>ge(n,i,o)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ve(e[0])})})},set:function(...e){return $e({[Ce]:()=>({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=(i,s)=>{n[i]=(n[i]||[]).concat([s])},o=e[0];return{matched:xv(t,i=>ge(o,i,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ve(e[0])})})},map:function(...e){return $e({[Ce]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,c)=>{n[a]=(n[a]||[]).concat([c])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,s]=e;return{matched:kv(t,(a,c)=>{const u=ge(i,c,r),d=ge(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ve(e[0]),...Ve(e[1])]})})},intersection:te,union:du,not:function(e){return $e({[Ce]:()=>({match:t=>({matched:!ge(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:Yn,any:fu,_:$v,string:Sv,number:Mv,bigint:Tv,boolean:Cv,symbol:Av,nullish:Pv,instanceOf:function(e){return $e(W(function(t){return n=>n instanceof t}(e)))},shape:function(e){return $e(W(_v(e)))}};const Zi={matched:!1,value:void 0};function nt(e){return new oo(e,Zi)}class oo{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 o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let i=!1,s={};const a=(u,d)=>{i=!0,s[u]=d},c=!r.some(u=>ge(u,this.input,a))||o&&!o(this.input)?Zi:{matched:!0,value:n(i?no in s?s[no]:s:this.input,this.input)};return new oo(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new oo(this.input,r?{matched:!0,value:n(this.input,this.input)}:Zi)}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 Ev="isdk",Ji=44,Vv={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 Qi(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function hu(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Qi(n);return(o,i)=>r.then(s=>i(s.transaction(t,o).objectStore(t)))}let es;function pu(){return es||(es=hu("keyval-store","keyval")),es}function Ov(e,t=pu()){return t("readonly",n=>Qi(n.get(e)))}function Lv(e,t,n=pu()){return n("readwrite",r=>(r.put(t,e),Qi(r.transaction)))}const mu=typeof window>"u"?void 0:hu("inploi","applications"),Gn={getApplicationData:async e=>{const t=gu(e);return await Ov(t,mu)},setApplicationData:async e=>{const t=gu(e.application);return await Lv(t,e.data,mu)}},vu=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},Nv=e=>Object.entries(e).reduce((n,[r,o])=>(n[r]=o.value,n),{}),ts=e=>t=>t?t.type===e:!1;class Zn extends Error{constructor(){super("Aborted")}}const gu=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),rt=Pn("maximised"),ns=Pn(53),_t=Pn({state:"idle"}),Jn=async e=>{const{state:t,application:n}=_t.value;if(t!=="loaded")return;$r(n,"No application to update");const r=e(n.data),o={...n,data:r};_t.value={state:t,application:o},await Gn.setApplicationData({application:n,data:r})},ne={current$:_t,start:async e=>{const t=await Gn.getApplicationData(e)??bu(e);_t.value={state:"loaded",application:{...e,data:t,startedAt:new Date}},Gn.setApplicationData({application:e,data:t})},cancel:()=>{_t.value={state:"idle"}},markAsFinished:()=>Jn(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Jn(t=>({...t,currentNodeId:e})),restart:()=>{const{state:e,application:t}=_t.value;if(e!=="loaded")throw new Error("Application cannot be restarted: not in valid state");const n=bu(t);_t.value={state:e,application:{...t,data:n,startedAt:new Date}},Gn.setApplicationData({application:t,data:n})},addMessage:(e,t)=>{const n={...e,groupId:t};return Jn(r=>({...r,messages:[...r.messages,n]}))},removeLastGroupMessagesById:e=>{var i;const{state:t,application:n}=_t.value;$r(t==="loaded","Application not loaded");const r=[...n.data.messages];let o=r.length-1;for(;o>=0&&r[o]&&((i=r[o])==null?void 0:i.groupId)===e;)r.pop(),o--;n.data.messages=r,Gn.setApplicationData({application:n,data:n.data})},setSubmission:(e,t)=>Jn(n=>({...n,submissions:{...n.submissions,[e]:t}})),setInput:e=>Jn(t=>({...t,currentInput:e}))},bu=e=>({messages:[],submissions:{},currentNodeId:vu(e.flow.nodes).id,isFinished:!1,sequence:0,flowSessionId:crypto.randomUUID()});var Rv=0;function b(e,t,n,r,o,i){var s,a,c={};for(a in t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Rv,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return V.vnode&&V.vnode(u),u}const Fv=({message:e})=>b("div",{class:"flex flex-grow flex-col items-center justify-center",children:[b("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:[b("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"}),b("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"}),b("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),b("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),b("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),b("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),b("path",{d:"M38 56h19"})]}),b("div",{class:"flex flex-col gap-2 text-center",children:[b("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&b("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Iv=e=>b("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[b("title",{children:"Loading"}),b("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)}}"}),b("g",{id:"s1",transform:"translate(12,0)",children:b("g",{id:"s2",transform:"scale(0,0)",children:b("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),b("g",{id:"s3",transform:"translate(12,12)",children:b("g",{id:"s4",transform:"scale(1,1)",children:b("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),b("g",{id:"s5",transform:"translate(12,0)",children:b("g",{id:"s6",transform:"scale(0,0)",children:b("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"})})}),b("g",{id:"s7",transform:"translate(12,0)",children:b("g",{id:"s8",transform:"scale(0,0)",children:b("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"})})})]}),yu=()=>b("div",{class:"flex flex-grow flex-col items-center justify-center",children:b(Iv,{class:"text-neutral-4 h-8 w-8"})});function wu(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=wu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=wu(e))&&(r&&(r+=" "),r+=t);return r}const io=({class:e,children:t,...n})=>b("button",{class:Xt("touch-hitbox text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-neutral-12/5 active:bg-neutral-12/10 fr relative rounded-full p-2 transition-all",e),...n,children:b("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})}),Dv=({children:e})=>{const t=rt.value;return b("header",{class:"ring-neutral-12/5 bg-neutral-1/90 absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",children:[b("p",{id:"chatbot-header",class:"sr-only",children:e}),b("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t==="minimised"?rt.value="maximised":rt.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:b("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),b("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:rt.value==="minimised"?b(ue,{children:[b(io,{"aria-label":"Maximise job application",onClick:()=>rt.value="maximised",children:b("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),b(io,{"aria-label":"Close application",onClick:ne.cancel,children:b("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):b(ue,{children:[ne.current$.value.state==="loaded"&&b(io,{"aria-label":"Restart",onClick:()=>{ne.restart()},children:[b("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"}),b("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),b(io,{"aria-label":"Minimise application",onClick:()=>rt.value="minimised",children:b("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]})},zv=Ko(()=>Promise.resolve().then(()=>_y).then(e=>e.JobApplicationContent)),Bv=({children:e})=>b(yv,{features:wv,children:e}),jv={closed:{y:"calc(100% + 1rem)",height:Ji},maximised:{y:0,height:"75vh"},minimised:{y:0,height:Ji}},Hv=({logger:e,apiClient:t,analytics:n})=>{const{state:r,application:o,error:i}=ne.current$.value,s=rt.value,a=r!=="idle"&&s==="maximised",c=U(null);return b(Bv,{children:b(np,{open:a,modal:a,children:b(to,{children:[b(rp,{forceMount:!0,asChild:!0,children:a&&b(Wn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-neutral-12/60 fixed inset-0"})},"bg"),b(op,{forceMount:!0,asChild:!0,children:b(Wn.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-header",variants:jv,initial:"closed",animate:nt({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:Ae.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${Ji}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:b("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[b(Dv,{children:o?`Applying for “${o.job.title}” at ${o.company.name}`:"inploi chatbot: "+r}),(()=>{switch(r){case"idle":return null;case"loading":return b(yu,{},"loading");case"loaded":return s!=="maximised"?null:b(rn,{fallback:b(yu,{},"loading"),children:b(zv,{analytics:n,currentApplication:o,apiClient:t,logger:e})});case"error":return b(Fv,{message:i});default:yf(r)}})()]})},"content")})]})})})};function Uv(e){return(Array.isArray(e)?e:e.issues).reduce((t,n)=>{if(n.path){if(n.path.every(({key:r})=>typeof r=="string"||typeof r=="number")){const r=n.path.map(({key:o})=>o).join(".");t.nested[r]?t.nested[r].push(n.message):t.nested[r]=[n.message]}}else t.root?t.root.push(n.message):t.root=[n.message];return t},{nested:{}})}var so=class extends Error{constructor(t){super(t[0].message);nf(this,"issues");this.name="ValiError",this.issues=t}};function _u(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function Qn(e){return{issues:e}}function ot(e){return{output:e}}function Xv(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 qv(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 xt(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return ot(e);let o,i,s=e;for(const a of t){const c=a._parse(s);if(c.issues){o=o||qv(n,r);for(const u of c.issues){const d=Xv(o,u);i?i.push(d):i=[d]}if(o.abortEarly||o.abortPipeEarly)break}else s=c.output}return i?Qn(i):ot(s)}function kt(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function xu(e){return typeof e=="function"?e():e}function er(e,t,n,r){return Qn([{validation:e,message:xu(t),input:n,requirement:r}])}function Wv(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,s]=kt(t,n);return[e,i,s]}const[r,o]=kt(e,t);return[void 0,r,o]}function qt(e,t,n,r,o,i){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:xu(r),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Kv(e){return typeof e.default=="function"?e.default():e.default}function Yv(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return xt(t,this.pipe,n,"any")}}}function Gv(e,t,n){const[r="Invalid type",o]=kt(t,n);return{type:"array",async:!1,item:e,message:r,pipe:o,_parse(i,s){if(!Array.isArray(i))return qt(s,"type","array",this.message,i);let a;const c=[];for(let u=0;u<i.length;u++){const d=i[u],l=this.item._parse(d,s);if(l.issues){const f={type:"array",input:i,key:u,value:d};for(const h of l.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);if(a||(a=l.issues),s!=null&&s.abortEarly)break}else c.push(l.output)}return a?Qn(a):xt(c,this.pipe,s,"array")}}}function Zv(e,t){const[n="Invalid type",r]=kt(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="boolean"?qt(i,"type","boolean",this.message,o):xt(o,this.pipe,i,"boolean")}}}function Jv(e,t){const[n="Invalid type",r]=kt(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="number"||isNaN(o)?qt(i,"type","number",this.message,o):xt(o,this.pipe,i,"number")}}}function gn(e,t,n,r){const[o,i="Invalid type",s]=Wv(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:s,_parse(c,u){if(!c||typeof c!="object")return qt(u,"type","object",this.message,c);a=a||Object.entries(this.entries);let d;const l={};for(const[f,h]of a){const p=c[f],m=h._parse(p,u);if(m.issues){const y={type:"object",input:c,key:f,value:p};for(const x of m.issues)x.path?x.path.unshift(y):x.path=[y],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}else(m.output!==void 0||f in c)&&(l[f]=m.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in c)if(!(f in this.entries)){const h=c[f],p=this.rest._parse(h,u);if(p.issues){const m={type:"object",input:c,key:f,value:h};for(const y of p.issues)y.path?y.path.unshift(m):y.path=[m],d==null||d.push(y);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else l[f]=p.output}}return d?Qn(d):xt(l,this.pipe,u,"object")}}}function Qv(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const o=Kv(this);if(o===void 0)return ot(n);n=o}return this.wrapped._parse(n,r)}}}function eg(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?ot(n):qt(r,"type","picklist",this.message,n)}}}function We(e,t){const[n="Invalid type",r]=kt(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="string"?qt(i,"type","string",this.message,o):xt(o,this.pipe,i,"string")}}}function tg(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=kt(n,r);return[e,t,s,a]}const[o,i]=kt(t,n);return[We(),e,o,i]}var ng=["__proto__","prototype","constructor"];function rg(e,t,n,r){const[o,i,s="Invalid type",a]=tg(e,t,n,r);return{type:"record",async:!1,key:o,value:i,message:s,pipe:a,_parse(c,u){if(!c||typeof c!="object")return qt(u,"type","record",this.message,c);let d;const l={};for(const[f,h]of Object.entries(c))if(!ng.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:c,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 y=this.value._parse(h,u);if(y.issues){p=p||{type:"record",input:c,key:f,value:h};for(const x of y.issues)x.path?x.path.unshift(p):x.path=[p],d==null||d.push(x);if(d||(d=y.issues),u!=null&&u.abortEarly)break}!m.issues&&!y.issues&&(l[m.output]=y.output)}return d?Qn(d):xt(l,this.pipe,u,"record")}}}function rs(e,t,n){const r=e._parse(t,n);if(r.issues)throw new so(r.issues);return r.output}async function og(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new so(r.issues);return r.output}function ku(e,t,n){return{...e,_parse(r,o){const i=e._parse(r,o);if(i.issues)return i;const s=t(i.output);return n&&!Array.isArray(n)?n._parse(s,o):xt(s,n,o,typeof s)}}}var ig=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function sg(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:ig,_parse(t){return this.requirement.test(t)?ot(t):er(this.type,this.message,t,this.requirement)}}}function ag(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?er(this.type,this.message,n,this.requirement):ot(n)}}}function $u(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?er(this.type,this.message,n,this.requirement):ot(n)}}}function cg(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?ot(n):er(this.type,this.message,n,this.requirement)}}}function lg(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)?ot(t):er(this.type,this.message,t,this.requirement)}}}const ug=gn({job:gn({id:_u(We(),String),title:We()}),company:gn({name:We(),logo:Qv(We())}),flow:gn({id:_u(We(),String),version:Jv(),nodes:Gv(Yv())})});async function dg({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:rs(ug,r)}}catch(r){return r instanceof so?(n.error(Uv(r).nested),{ok:!1,error:"API error: Invalid application data received"}):r instanceof Je?{ok:!1,error:"Application flow not found."}:r instanceof Error?(n.error(r),{ok:!1,error:r.message}):(n.error(r),{ok:!1,error:"Unknown error"})}}const fg=`#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 *{box-sizing:border-box;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 .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .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-48{height:12rem}#isdk .h-8{height:2rem}#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-8{width:2rem}#isdk .w-full{width:100%}#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-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 .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-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-dashed{border-style:dashed}#isdk .border-neutral-12\\/5{border-color:oklch(var(--i-n-12) / .05)}#isdk .border-neutral-8{--tw-border-opacity: 1;border-color:oklch(var(--i-n-8) / var(--tw-border-opacity))}#isdk .bg-accent-1{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-1) / var(--tw-bg-opacity))}#isdk .bg-accent-7{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-7) / var(--tw-bg-opacity))}#isdk .bg-accent-8\\/5{background-color:oklch(var(--i-a-8) / .05)}#isdk .bg-lowest{--tw-bg-opacity: 1;background-color:hsl(var(--i-lowest) / var(--tw-bg-opacity))}#isdk .bg-neutral-1{--tw-bg-opacity: 1;background-color:oklch(var(--i-n-1) / var(--tw-bg-opacity))}#isdk .bg-neutral-1\\/90{background-color:oklch(var(--i-n-1) / .9)}#isdk .bg-neutral-12\\/60{background-color:oklch(var(--i-n-12) / .6)}#isdk .bg-neutral-2{--tw-bg-opacity: 1;background-color:oklch(var(--i-n-2) / var(--tw-bg-opacity))}#isdk .bg-neutral-2\\/80{background-color:oklch(var(--i-n-2) / .8)}#isdk .p-0{padding:0}#isdk .p-0\\.5{padding:.125rem}#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 .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 .pb-6{padding-bottom:1.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 .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-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 .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-12{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .text-accent-9{--tw-text-opacity: 1;color:oklch(var(--i-a-9) / var(--tw-text-opacity))}#isdk .text-error-10{--tw-text-opacity: 1;color:hsl(var(--i-e-10) / var(--tw-text-opacity))}#isdk .text-error-11{--tw-text-opacity: 1;color:hsl(var(--i-e-11) / var(--tw-text-opacity))}#isdk .text-error-9{--tw-text-opacity: 1;color:hsl(var(--i-e-9) / var(--tw-text-opacity))}#isdk .text-lowest{--tw-text-opacity: 1;color:hsl(var(--i-lowest) / var(--tw-text-opacity))}#isdk .text-neutral-10{--tw-text-opacity: 1;color:oklch(var(--i-n-10) / var(--tw-text-opacity))}#isdk .text-neutral-11{--tw-text-opacity: 1;color:oklch(var(--i-n-11) / var(--tw-text-opacity))}#isdk .text-neutral-12{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .text-neutral-4{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .text-neutral-8{--tw-text-opacity: 1;color:oklch(var(--i-n-8) / var(--tw-text-opacity))}#isdk .text-neutral-9{--tw-text-opacity: 1;color:oklch(var(--i-n-9) / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .caret-accent-9{caret-color:oklch(var(--i-a-9) / 1)}#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-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(var(--i-a-12) / .03), 0px 6px 4px 0px oklch(var(--i-a-12) / .02), 0px 6px 4px 0px oklch(var(--i-a-12) / .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(var(--i-a-12) / .03), 0px 4px 4px 0px oklch(var(--i-a-12) / .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 .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-neutral-11\\/\\[\\.08\\]{outline-color:oklch(var(--i-n-11) / .08)}#isdk .outline-neutral-12\\/5{outline-color:oklch(var(--i-n-12) / .05)}#isdk .outline-neutral-3{outline-color:oklch(var(--i-n-3) / 1)}#isdk .outline-neutral-4{outline-color:oklch(var(--i-n-4) / 1)}#isdk .outline-neutral-6{outline-color:oklch(var(--i-n-6) / 1)}#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-8\\/20{--tw-ring-color: oklch(var(--i-a-8) / .2)}#isdk .ring-lowest{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--i-lowest) / var(--tw-ring-opacity))}#isdk .ring-neutral-12\\/5{--tw-ring-color: oklch(var(--i-n-12) / .05)}#isdk .ring-transparent{--tw-ring-color: transparent}#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_white\\]{--tw-drop-shadow: drop-shadow(0 1.5px white);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 .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 .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-9) / 1);--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{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-accent-4 *::selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:text-accent-12 *::selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:bg-accent-4::-moz-selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-accent-4::selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:text-accent-12::selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-4::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-4::placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-5::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-5) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-5::placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-5) / var(--tw-text-opacity))}#isdk .hover\\:bg-neutral-12\\/5:hover{background-color:oklch(var(--i-n-12) / .05)}#isdk .hover\\:text-neutral-12:hover{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .hover\\:ring-accent-8:hover{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-8) / var(--tw-ring-opacity))}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:oklch(var(--i-a-7) / 1)}#isdk .focus-visible\\:outline-accent-9:focus-visible{outline-color:oklch(var(--i-a-9) / 1)}#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-accent-7\\/50:focus-visible{--tw-ring-color: oklch(var(--i-a-7) / .5)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:bg-accent-10:active{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-10) / var(--tw-bg-opacity))}#isdk .active\\:bg-accent-2:active{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-2) / var(--tw-bg-opacity))}#isdk .active\\:bg-neutral-12\\/10:active{background-color:oklch(var(--i-n-12) / .1)}#isdk .active\\:text-accent-10:active{--tw-text-opacity: 1;color:oklch(var(--i-a-10) / var(--tw-text-opacity))}#isdk .active\\:text-accent-11:active{--tw-text-opacity: 1;color:oklch(var(--i-a-11) / var(--tw-text-opacity))}#isdk .active\\:text-accent-2:active{--tw-text-opacity: 1;color:oklch(var(--i-a-2) / var(--tw-text-opacity))}#isdk .active\\:text-neutral-12:active{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .active\\:outline-neutral-10:active{outline-color:oklch(var(--i-n-10) / 1)}#isdk .active\\:ring-accent-7:active{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-7) / var(--tw-ring-opacity))}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-2) / var(--tw-bg-opacity))}#isdk .peer:checked~.peer-checked\\:text-accent-9{--tw-text-opacity: 1;color:oklch(var(--i-a-9) / var(--tw-text-opacity))}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:oklch(var(--i-a-7) / 1)}#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-opacity: 1;--tw-ring-color: oklch(var(--i-a-7) / var(--tw-ring-opacity))}#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
- `,hg=()=>{let e=null;return{getOrCreateChatbotElement:()=>{if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Ev,e=t,t},addStyle:(t,n)=>{const r=document.head,o=document.createElement("style");o.id=n,o.innerHTML=t,r.appendChild(o)}}},Su=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},pg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},mg=e=>Su(pg[e.toLowerCase()],6),vg=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,gg=e=>{let t;return(t=e.match(vg))?Su(parseInt(t[1],16),t[1].length):void 0},$t="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",tr=`${$t}%`,os=`(?:${$t}%|${$t})`,bg=`(?:${$t}(deg|grad|rad|turn)|${$t})`,bn="\\s*,\\s*",yg=new RegExp(`^rgba?\\(\\s*${$t}${bn}${$t}${bn}${$t}\\s*(?:,\\s*${os}\\s*)?\\)$`),wg=new RegExp(`^rgba?\\(\\s*${tr}${bn}${tr}${bn}${tr}\\s*(?:,\\s*${os}\\s*)?\\)$`),_g=e=>{let t={mode:"rgb"},n;if(n=e.match(yg))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(wg))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=n[4]/100:n[5]!==void 0&&(t.alpha=+n[5]),t},nr=(e,t)=>e===void 0?void 0:typeof e!="object"?Pg(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,it=(e="rgb")=>t=>(t=nr(t,e))!==void 0?t.mode===e?t:Ke[t.mode][e]?Ke[t.mode][e](t):e==="rgb"?Ke[t.mode].rgb(t):Ke.rgb[e](Ke[t.mode].rgb(t)):void 0,Ke={},Mu={},ao=[],Tu={},xg=e=>e,Z=e=>(Ke[e.mode]={...Ke[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ke[t]||(Ke[t]={}),Ke[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=xg)}),Mu[e.mode]=e,(e.parse||[]).forEach(t=>{kg(t,e.mode)}),it(e.mode)),Wt=e=>Mu[e],kg=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Tu[e]=t}else typeof e=="function"&&ao.indexOf(e)<0&&ao.push(e)},is=/[^\x00-\x7F]|[a-zA-Z_]/,$g=/[^\x00-\x7F]|[-\w]/,$={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let D=0;function co(e){let t=e[D],n=e[D+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[D+2]):t==="."?/\d/.test(n):/\d/.test(t)}function ss(e){if(D>=e.length)return!1;let t=e[D];if(is.test(t))return!0;if(t==="-"){if(e.length-D<2)return!1;let n=e[D+1];return!!(n==="-"||is.test(n))}return!1}const Sg={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function rr(e){let t="";if((e[D]==="-"||e[D]==="+")&&(t+=e[D++]),t+=lo(e),e[D]==="."&&/\d/.test(e[D+1])&&(t+=e[D++]+lo(e)),(e[D]==="e"||e[D]==="E")&&((e[D+1]==="-"||e[D+1]==="+")&&/\d/.test(e[D+2])?t+=e[D++]+e[D++]+lo(e):/\d/.test(e[D+1])&&(t+=e[D++]+lo(e))),ss(e)){let n=uo(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:$.Hue,value:t*Sg[n]}:void 0}return e[D]==="%"?(D++,{type:$.Percentage,value:+t}):{type:$.Number,value:+t}}function lo(e){let t="";for(;/\d/.test(e[D]);)t+=e[D++];return t}function uo(e){let t="";for(;D<e.length&&$g.test(e[D]);)t+=e[D++];return t}function Mg(e){let t=uo(e);return e[D]==="("?(D++,{type:$.Function,value:t}):t==="none"?{type:$.None,value:void 0}:{type:$.Ident,value:t}}function Tg(e=""){let t=e.trim(),n=[],r;for(D=0;D<t.length;){if(r=t[D++],r===`
49
+ `),()=>{document.head.removeChild(u)}},[t]),R(hv,{isPresent:t,childRef:r,sizeRef:o},mt(e,{ref:r}))}const qi=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Jc(mv),c=yr(),u=de(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:d=>{a.set(d,!0);for(const l of a.values())if(!l)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),i?void 0:[n]);return de(()=>{a.forEach((d,l)=>a.set(l,!1))},[n]),G(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=R(pv,{isPresent:n},e)),R(fi.Provider,{value:u},e)};function mv(){return new Map}function vv(e){return G(()=>()=>e(),[])}const jt=e=>e.key||"";function gv(e,t){e.forEach(n=>{const r=jt(n);t.set(r,n)})}function bv(e){const t=[];return je.forEach(e,n=>{pt(n)&&t.push(n)}),t}const to=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ue(!o,"Replace exitBeforeEnter with mode='wait'");const a=we(Rc).forceRender||fv()[0],c=lu(),u=bv(e);let d=u;const l=U(new Map).current,f=U(d),h=U(new Map).current,p=U(!0);if(hi(()=>{p.current=!1,gv(u,h),f.current=d}),vv(()=>{p.current=!0,h.clear(),l.clear()}),p.current)return R(ue,null,d.map(g=>R(qi,{key:jt(g),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s},g)));d=[...d];const m=f.current.map(jt),y=u.map(jt),x=m.length;for(let g=0;g<x;g++){const w=m[g];y.indexOf(w)===-1&&!l.has(w)&&l.set(w,void 0)}return s==="wait"&&l.size&&(d=[]),l.forEach((g,w)=>{if(y.indexOf(w)!==-1)return;const M=h.get(w);if(!M)return;const S=m.indexOf(w);let I=g;if(!I){const N=()=>{l.delete(w);const C=Array.from(h.keys()).filter(E=>!y.includes(E));if(C.forEach(E=>h.delete(E)),f.current=u.filter(E=>{const q=jt(E);return q===w||C.includes(q)}),!l.size){if(c.current===!1)return;a(),r&&r()}};I=R(qi,{key:jt(M),isPresent:!1,onExitComplete:N,custom:t,presenceAffectsLayout:i,mode:s},M),l.set(w,I)}d.splice(S,0,I)}),d=d.map(g=>{const w=g.key;return l.has(w)?g:R(qi,{key:jt(g),isPresent:!0,presenceAffectsLayout:i,mode:s},g)}),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.`),R(ue,null,l.size?d:d.map(g=>mt(g)))};function yv({children:e,features:t,strict:n=!1}){const[,r]=ae(!Wi(t)),o=U(void 0);if(!Wi(t)){const{renderer:i,...s}=t;o.current=i,gi(s)}return G(()=>{Wi(t)&&t().then(({renderer:i,...s})=>{gi(s),o.current=i,r(!0)})},[]),R(pi.Provider,{value:{renderer:o.current,strict:n}},e)}function Wi(e){return typeof e=="function"}const wv={renderer:dv,...zm,...a0},Ce=Symbol.for("@ts-pattern/matcher"),uu=Symbol.for("@ts-pattern/isVariadic"),no="@ts-pattern/anonymous-select-key",Ki=e=>!!(e&&typeof e=="object"),ro=e=>e&&!!e[Ce],ge=(e,t,n)=>{if(ro(e)){const r=e[Ce](),{matched:o,selections:i}=r.match(t);return o&&i&&Object.keys(i).forEach(s=>n(s,i[s])),o}if(Ki(e)){if(!Ki(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],o=[],i=[];for(const s of e.keys()){const a=e[s];ro(a)&&a[uu]?i.push(a):i.length?o.push(a):r.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+o.length)return!1;const s=t.slice(0,r.length),a=o.length===0?[]:t.slice(-o.length),c=t.slice(r.length,o.length===0?1/0:-o.length);return r.every((u,d)=>ge(u,s[d],n))&&o.every((u,d)=>ge(u,a[d],n))&&(i.length===0||ge(i[0],c,n))}return e.length===t.length&&e.every((s,a)=>ge(s,t[a],n))}return Object.keys(e).every(r=>{const o=e[r];return(r in t||ro(i=o)&&i[Ce]().matcherType==="optional")&&ge(o,t[r],n);var i})}return Object.is(t,e)},Ve=e=>{var t,n,r;return Ki(e)?ro(e)?(t=(n=(r=e[Ce]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?Yn(e,Ve):Yn(Object.values(e),Ve):[]},Yn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function _v(...e){if(e.length===1){const[t]=e;return n=>ge(t,n,()=>{})}if(e.length===2){const[t,n]=e;return ge(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function $e(e){return Object.assign(e,{optional:()=>Gi(e),and:t=>te(e,t),or:t=>du(e,t),select:t=>t===void 0?Gn(e):Gn(t,e)})}function Yi(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[uu]:!0})}}))(e),{optional:()=>Yi(Gi(e)),select:t=>Yi(t===void 0?Gn(e):Gn(t,e))})}function Gi(e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return t===void 0?(Ve(e).forEach(o=>r(o,void 0)),{matched:!0,selections:n}):{matched:ge(e,t,r),selections:n}},getSelectionKeys:()=>Ve(e),matcherType:"optional"})})}const xv=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},kv=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function te(...e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return{matched:e.every(o=>ge(o,t,r)),selections:n}},getSelectionKeys:()=>Yn(e,Ve),matcherType:"and"})})}function du(...e){return $e({[Ce]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return Yn(e,Ve).forEach(o=>r(o,void 0)),{matched:e.some(o=>ge(o,t,r)),selections:n}},getSelectionKeys:()=>Yn(e,Ve),matcherType:"or"})})}function W(e){return{[Ce]:()=>({match:t=>({matched:!!e(t)})})}}function Gn(...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 $e({[Ce]:()=>({match:r=>{let o={[t??no]:r};return{matched:n===void 0||ge(n,r,(i,s)=>{o[i]=s}),selections:o}},getSelectionKeys:()=>[t??no].concat(n===void 0?[]:Ve(n))})})}function Xe(e){return typeof e=="number"}function Ht(e){return typeof e=="string"}function yt(e){return typeof e=="bigint"}const fu=$e(W(function(e){return!0})),$v=fu,Ut=e=>Object.assign($e(e),{startsWith:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&r.endsWith(n)))));var n},minLength:t=>Ut(te(e,(n=>W(r=>Ht(r)&&r.length>=n))(t))),maxLength:t=>Ut(te(e,(n=>W(r=>Ht(r)&&r.length<=n))(t))),includes:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&r.includes(n)))));var n},regex:t=>{return Ut(te(e,(n=t,W(r=>Ht(r)&&!!r.match(n)))));var n}}),Sv=Ut(W(Ht)),qe=e=>Object.assign($e(e),{between:(t,n)=>qe(te(e,((r,o)=>W(i=>Xe(i)&&r<=i&&o>=i))(t,n))),lt:t=>qe(te(e,(n=>W(r=>Xe(r)&&r<n))(t))),gt:t=>qe(te(e,(n=>W(r=>Xe(r)&&r>n))(t))),lte:t=>qe(te(e,(n=>W(r=>Xe(r)&&r<=n))(t))),gte:t=>qe(te(e,(n=>W(r=>Xe(r)&&r>=n))(t))),int:()=>qe(te(e,W(t=>Xe(t)&&Number.isInteger(t)))),finite:()=>qe(te(e,W(t=>Xe(t)&&Number.isFinite(t)))),positive:()=>qe(te(e,W(t=>Xe(t)&&t>0))),negative:()=>qe(te(e,W(t=>Xe(t)&&t<0)))}),Mv=qe(W(Xe)),wt=e=>Object.assign($e(e),{between:(t,n)=>wt(te(e,((r,o)=>W(i=>yt(i)&&r<=i&&o>=i))(t,n))),lt:t=>wt(te(e,(n=>W(r=>yt(r)&&r<n))(t))),gt:t=>wt(te(e,(n=>W(r=>yt(r)&&r>n))(t))),lte:t=>wt(te(e,(n=>W(r=>yt(r)&&r<=n))(t))),gte:t=>wt(te(e,(n=>W(r=>yt(r)&&r>=n))(t))),positive:()=>wt(te(e,W(t=>yt(t)&&t>0))),negative:()=>wt(te(e,W(t=>yt(t)&&t<0)))}),Tv=wt(W(yt)),Cv=$e(W(function(e){return typeof e=="boolean"})),Av=$e(W(function(e){return typeof e=="symbol"})),Pv=$e(W(function(e){return e==null}));var Ae={__proto__:null,matcher:Ce,optional:Gi,array:function(...e){return Yi({[Ce]:()=>({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 Ve(n).forEach(i=>{r[i]=[]}),{matched:!0,selections:r};const o=(i,s)=>{r[i]=(r[i]||[]).concat([s])};return{matched:t.every(i=>ge(n,i,o)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ve(e[0])})})},set:function(...e){return $e({[Ce]:()=>({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=(i,s)=>{n[i]=(n[i]||[]).concat([s])},o=e[0];return{matched:xv(t,i=>ge(o,i,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ve(e[0])})})},map:function(...e){return $e({[Ce]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,c)=>{n[a]=(n[a]||[]).concat([c])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,s]=e;return{matched:kv(t,(a,c)=>{const u=ge(i,c,r),d=ge(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ve(e[0]),...Ve(e[1])]})})},intersection:te,union:du,not:function(e){return $e({[Ce]:()=>({match:t=>({matched:!ge(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:Gn,any:fu,_:$v,string:Sv,number:Mv,bigint:Tv,boolean:Cv,symbol:Av,nullish:Pv,instanceOf:function(e){return $e(W(function(t){return n=>n instanceof t}(e)))},shape:function(e){return $e(W(_v(e)))}};const Zi={matched:!1,value:void 0};function nt(e){return new oo(e,Zi)}class oo{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 o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let i=!1,s={};const a=(u,d)=>{i=!0,s[u]=d},c=!r.some(u=>ge(u,this.input,a))||o&&!o(this.input)?Zi:{matched:!0,value:n(i?no in s?s[no]:s:this.input,this.input)};return new oo(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new oo(this.input,r?{matched:!0,value:n(this.input,this.input)}:Zi)}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 Ev="isdk",Ji=44,Vv={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 Qi(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function hu(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Qi(n);return(o,i)=>r.then(s=>i(s.transaction(t,o).objectStore(t)))}let es;function pu(){return es||(es=hu("keyval-store","keyval")),es}function Ov(e,t=pu()){return t("readonly",n=>Qi(n.get(e)))}function Lv(e,t,n=pu()){return n("readwrite",r=>(r.put(t,e),Qi(r.transaction)))}const mu=typeof window>"u"?void 0:hu("inploi","applications"),Zn={getApplicationData:async e=>{const t=gu(e);return await Ov(t,mu)},setApplicationData:async e=>{const t=gu(e.application);return await Lv(t,e.data,mu)}},vu=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},Nv=e=>Object.entries(e).reduce((n,[r,o])=>(n[r]=o.value,n),{}),ts=e=>t=>t?t.type===e:!1;class Jn extends Error{constructor(){super("Aborted")}}const gu=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),rt=En("maximised"),ns=En(53),_t=En({state:"idle"}),Qn=async e=>{const{state:t,application:n}=_t.value;if(t!=="loaded")return;rn(n,"No application to update");const r=e(n.data),o={...n,data:r};_t.value={state:t,application:o},await Zn.setApplicationData({application:n,data:r})},ne={current$:_t,start:async e=>{const t=await Zn.getApplicationData(e)??bu(e);_t.value={state:"loaded",application:{...e,data:t,startedAt:new Date}},Zn.setApplicationData({application:e,data:t})},cancel:()=>{_t.value={state:"idle"}},markAsFinished:()=>Qn(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Qn(t=>({...t,currentNodeId:e})),restart:()=>{const{state:e,application:t}=_t.value;if(e!=="loaded")throw new Error("Application cannot be restarted: not in valid state");const n=bu(t);_t.value={state:e,application:{...t,data:n,startedAt:new Date}},Zn.setApplicationData({application:t,data:n})},addMessage:(e,t)=>{const n={...e,groupId:t};return Qn(r=>({...r,messages:[...r.messages,n]}))},removeLastGroupMessagesById:e=>{var i;const{state:t,application:n}=_t.value;rn(t==="loaded","Application not loaded");const r=[...n.data.messages];let o=r.length-1;for(;o>=0&&r[o]&&((i=r[o])==null?void 0:i.groupId)===e;)r.pop(),o--;n.data.messages=r,Zn.setApplicationData({application:n,data:n.data})},setSubmission:(e,t)=>Qn(n=>({...n,submissions:{...n.submissions,[e]:t}})),setInput:e=>Qn(t=>({...t,currentInput:e}))},bu=e=>({messages:[],submissions:{},currentNodeId:vu(e.flow.nodes).id,isFinished:!1,sequence:0,flowSessionId:crypto.randomUUID()});var Rv=0;function b(e,t,n,r,o,i){var s,a,c={};for(a in t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Rv,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return V.vnode&&V.vnode(u),u}const Iv=({message:e})=>b("div",{class:"flex flex-grow flex-col items-center justify-center",children:[b("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:[b("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"}),b("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"}),b("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),b("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),b("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),b("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),b("path",{d:"M38 56h19"})]}),b("div",{class:"flex flex-col gap-2 text-center",children:[b("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&b("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Fv=e=>b("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[b("title",{children:"Loading"}),b("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)}}"}),b("g",{id:"s1",transform:"translate(12,0)",children:b("g",{id:"s2",transform:"scale(0,0)",children:b("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),b("g",{id:"s3",transform:"translate(12,12)",children:b("g",{id:"s4",transform:"scale(1,1)",children:b("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),b("g",{id:"s5",transform:"translate(12,0)",children:b("g",{id:"s6",transform:"scale(0,0)",children:b("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"})})}),b("g",{id:"s7",transform:"translate(12,0)",children:b("g",{id:"s8",transform:"scale(0,0)",children:b("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"})})})]}),yu=()=>b("div",{class:"flex flex-grow flex-col items-center justify-center",children:b(Fv,{class:"text-neutral-4 h-8 w-8"})});function wu(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=wu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=wu(e))&&(r&&(r+=" "),r+=t);return r}const io=({class:e,children:t,...n})=>b("button",{class:Xt("touch-hitbox text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-neutral-12/5 active:bg-neutral-12/10 fr relative rounded-full p-2 transition-all",e),...n,children:b("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})}),Dv=({children:e})=>{const t=rt.value;return b("header",{class:"ring-neutral-12/5 bg-neutral-1/90 absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",children:[b("p",{id:"chatbot-header",class:"sr-only",children:e}),b("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t==="minimised"?rt.value="maximised":rt.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:b("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),b("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:rt.value==="minimised"?b(ue,{children:[b(io,{"aria-label":"Maximise job application",onClick:()=>rt.value="maximised",children:b("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),b(io,{"aria-label":"Close application",onClick:ne.cancel,children:b("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):b(ue,{children:[ne.current$.value.state==="loaded"&&b(io,{"aria-label":"Restart",onClick:()=>{ne.restart()},children:[b("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"}),b("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),b(io,{"aria-label":"Minimise application",onClick:()=>rt.value="minimised",children:b("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]})},zv=Ko(()=>Promise.resolve().then(()=>_y).then(e=>e.JobApplicationContent)),Bv=({children:e})=>b(yv,{features:wv,children:e}),jv={closed:{y:"calc(100% + 1rem)",height:Ji},maximised:{y:0,height:"75vh"},minimised:{y:0,height:Ji}},Hv=({logger:e,apiClient:t,analytics:n})=>{const{state:r,application:o,error:i}=ne.current$.value,s=rt.value,a=r!=="idle"&&s==="maximised",c=U(null);return b(Bv,{children:b(np,{open:a,modal:a,children:b(to,{children:[b(rp,{forceMount:!0,asChild:!0,children:a&&b(Kn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-neutral-12/60 fixed inset-0"})},"bg"),b(op,{forceMount:!0,asChild:!0,children:b(Kn.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-header",variants:jv,initial:"closed",animate:nt({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:Ae.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${Ji}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:b("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[b(Dv,{children:o?`Applying for “${o.job.title}” at ${o.company.name}`:"inploi chatbot: "+r}),(()=>{switch(r){case"idle":return null;case"loading":return b(yu,{},"loading");case"loaded":return s!=="maximised"?null:b(on,{fallback:b(yu,{},"loading"),children:b(zv,{analytics:n,currentApplication:o,apiClient:t,logger:e})});case"error":return b(Iv,{message:i});default:yf(r)}})()]})},"content")})]})})})};function Uv(e){return(Array.isArray(e)?e:e.issues).reduce((t,n)=>{if(n.path){if(n.path.every(({key:r})=>typeof r=="string"||typeof r=="number")){const r=n.path.map(({key:o})=>o).join(".");t.nested[r]?t.nested[r].push(n.message):t.nested[r]=[n.message]}}else t.root?t.root.push(n.message):t.root=[n.message];return t},{nested:{}})}var so=class extends Error{constructor(t){super(t[0].message);nf(this,"issues");this.name="ValiError",this.issues=t}};function _u(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function er(e){return{issues:e}}function ot(e){return{output:e}}function Xv(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 qv(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 xt(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return ot(e);let o,i,s=e;for(const a of t){const c=a._parse(s);if(c.issues){o=o||qv(n,r);for(const u of c.issues){const d=Xv(o,u);i?i.push(d):i=[d]}if(o.abortEarly||o.abortPipeEarly)break}else s=c.output}return i?er(i):ot(s)}function kt(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function xu(e){return typeof e=="function"?e():e}function tr(e,t,n,r){return er([{validation:e,message:xu(t),input:n,requirement:r}])}function Wv(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,s]=kt(t,n);return[e,i,s]}const[r,o]=kt(e,t);return[void 0,r,o]}function qt(e,t,n,r,o,i){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:xu(r),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Kv(e){return typeof e.default=="function"?e.default():e.default}function Yv(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return xt(t,this.pipe,n,"any")}}}function Gv(e,t,n){const[r="Invalid type",o]=kt(t,n);return{type:"array",async:!1,item:e,message:r,pipe:o,_parse(i,s){if(!Array.isArray(i))return qt(s,"type","array",this.message,i);let a;const c=[];for(let u=0;u<i.length;u++){const d=i[u],l=this.item._parse(d,s);if(l.issues){const f={type:"array",input:i,key:u,value:d};for(const h of l.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);if(a||(a=l.issues),s!=null&&s.abortEarly)break}else c.push(l.output)}return a?er(a):xt(c,this.pipe,s,"array")}}}function Zv(e,t){const[n="Invalid type",r]=kt(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="boolean"?qt(i,"type","boolean",this.message,o):xt(o,this.pipe,i,"boolean")}}}function Jv(e,t){const[n="Invalid type",r]=kt(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="number"||isNaN(o)?qt(i,"type","number",this.message,o):xt(o,this.pipe,i,"number")}}}function bn(e,t,n,r){const[o,i="Invalid type",s]=Wv(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:s,_parse(c,u){if(!c||typeof c!="object")return qt(u,"type","object",this.message,c);a=a||Object.entries(this.entries);let d;const l={};for(const[f,h]of a){const p=c[f],m=h._parse(p,u);if(m.issues){const y={type:"object",input:c,key:f,value:p};for(const x of m.issues)x.path?x.path.unshift(y):x.path=[y],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}else(m.output!==void 0||f in c)&&(l[f]=m.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in c)if(!(f in this.entries)){const h=c[f],p=this.rest._parse(h,u);if(p.issues){const m={type:"object",input:c,key:f,value:h};for(const y of p.issues)y.path?y.path.unshift(m):y.path=[m],d==null||d.push(y);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else l[f]=p.output}}return d?er(d):xt(l,this.pipe,u,"object")}}}function Qv(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const o=Kv(this);if(o===void 0)return ot(n);n=o}return this.wrapped._parse(n,r)}}}function eg(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?ot(n):qt(r,"type","picklist",this.message,n)}}}function We(e,t){const[n="Invalid type",r]=kt(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(o,i){return typeof o!="string"?qt(i,"type","string",this.message,o):xt(o,this.pipe,i,"string")}}}function tg(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=kt(n,r);return[e,t,s,a]}const[o,i]=kt(t,n);return[We(),e,o,i]}var ng=["__proto__","prototype","constructor"];function rg(e,t,n,r){const[o,i,s="Invalid type",a]=tg(e,t,n,r);return{type:"record",async:!1,key:o,value:i,message:s,pipe:a,_parse(c,u){if(!c||typeof c!="object")return qt(u,"type","record",this.message,c);let d;const l={};for(const[f,h]of Object.entries(c))if(!ng.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:c,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 y=this.value._parse(h,u);if(y.issues){p=p||{type:"record",input:c,key:f,value:h};for(const x of y.issues)x.path?x.path.unshift(p):x.path=[p],d==null||d.push(x);if(d||(d=y.issues),u!=null&&u.abortEarly)break}!m.issues&&!y.issues&&(l[m.output]=y.output)}return d?er(d):xt(l,this.pipe,u,"record")}}}function rs(e,t,n){const r=e._parse(t,n);if(r.issues)throw new so(r.issues);return r.output}async function og(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new so(r.issues);return r.output}function ku(e,t,n){return{...e,_parse(r,o){const i=e._parse(r,o);if(i.issues)return i;const s=t(i.output);return n&&!Array.isArray(n)?n._parse(s,o):xt(s,n,o,typeof s)}}}var ig=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function sg(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:ig,_parse(t){return this.requirement.test(t)?ot(t):tr(this.type,this.message,t,this.requirement)}}}function ag(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?tr(this.type,this.message,n,this.requirement):ot(n)}}}function $u(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?tr(this.type,this.message,n,this.requirement):ot(n)}}}function cg(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?ot(n):tr(this.type,this.message,n,this.requirement)}}}function lg(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)?ot(t):tr(this.type,this.message,t,this.requirement)}}}const ug=bn({job:bn({id:_u(We(),String),title:We()}),company:bn({name:We(),logo:Qv(We())}),flow:bn({id:_u(We(),String),version:Jv(),nodes:Gv(Yv())})});async function dg({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:rs(ug,r)}}catch(r){return r instanceof so?(n.error(Uv(r).nested),{ok:!1,error:"API error: Invalid application data received"}):r instanceof Je?{ok:!1,error:"Application flow not found."}:r instanceof Error?(n.error(r),{ok:!1,error:r.message}):(n.error(r),{ok:!1,error:"Unknown error"})}}const fg=`#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 *{box-sizing:border-box;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 .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .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-48{height:12rem}#isdk .h-8{height:2rem}#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-8{width:2rem}#isdk .w-full{width:100%}#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-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 .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-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-dashed{border-style:dashed}#isdk .border-neutral-12\\/5{border-color:oklch(var(--i-n-12) / .05)}#isdk .border-neutral-8{--tw-border-opacity: 1;border-color:oklch(var(--i-n-8) / var(--tw-border-opacity))}#isdk .bg-accent-1{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-1) / var(--tw-bg-opacity))}#isdk .bg-accent-7{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-7) / var(--tw-bg-opacity))}#isdk .bg-accent-8\\/5{background-color:oklch(var(--i-a-8) / .05)}#isdk .bg-lowest{--tw-bg-opacity: 1;background-color:hsl(var(--i-lowest) / var(--tw-bg-opacity))}#isdk .bg-neutral-1{--tw-bg-opacity: 1;background-color:oklch(var(--i-n-1) / var(--tw-bg-opacity))}#isdk .bg-neutral-1\\/90{background-color:oklch(var(--i-n-1) / .9)}#isdk .bg-neutral-12\\/60{background-color:oklch(var(--i-n-12) / .6)}#isdk .bg-neutral-2{--tw-bg-opacity: 1;background-color:oklch(var(--i-n-2) / var(--tw-bg-opacity))}#isdk .bg-neutral-2\\/80{background-color:oklch(var(--i-n-2) / .8)}#isdk .p-0{padding:0}#isdk .p-0\\.5{padding:.125rem}#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 .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 .pb-6{padding-bottom:1.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 .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-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 .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-12{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .text-accent-9{--tw-text-opacity: 1;color:oklch(var(--i-a-9) / var(--tw-text-opacity))}#isdk .text-error-10{--tw-text-opacity: 1;color:hsl(var(--i-e-10) / var(--tw-text-opacity))}#isdk .text-error-11{--tw-text-opacity: 1;color:hsl(var(--i-e-11) / var(--tw-text-opacity))}#isdk .text-error-9{--tw-text-opacity: 1;color:hsl(var(--i-e-9) / var(--tw-text-opacity))}#isdk .text-lowest{--tw-text-opacity: 1;color:hsl(var(--i-lowest) / var(--tw-text-opacity))}#isdk .text-neutral-10{--tw-text-opacity: 1;color:oklch(var(--i-n-10) / var(--tw-text-opacity))}#isdk .text-neutral-11{--tw-text-opacity: 1;color:oklch(var(--i-n-11) / var(--tw-text-opacity))}#isdk .text-neutral-12{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .text-neutral-4{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .text-neutral-8{--tw-text-opacity: 1;color:oklch(var(--i-n-8) / var(--tw-text-opacity))}#isdk .text-neutral-9{--tw-text-opacity: 1;color:oklch(var(--i-n-9) / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .caret-accent-9{caret-color:oklch(var(--i-a-9) / 1)}#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-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(var(--i-a-12) / .03), 0px 6px 4px 0px oklch(var(--i-a-12) / .02), 0px 6px 4px 0px oklch(var(--i-a-12) / .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(var(--i-a-12) / .03), 0px 4px 4px 0px oklch(var(--i-a-12) / .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 .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-neutral-11\\/\\[\\.08\\]{outline-color:oklch(var(--i-n-11) / .08)}#isdk .outline-neutral-12\\/5{outline-color:oklch(var(--i-n-12) / .05)}#isdk .outline-neutral-3{outline-color:oklch(var(--i-n-3) / 1)}#isdk .outline-neutral-4{outline-color:oklch(var(--i-n-4) / 1)}#isdk .outline-neutral-6{outline-color:oklch(var(--i-n-6) / 1)}#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-8\\/20{--tw-ring-color: oklch(var(--i-a-8) / .2)}#isdk .ring-lowest{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--i-lowest) / var(--tw-ring-opacity))}#isdk .ring-neutral-12\\/5{--tw-ring-color: oklch(var(--i-n-12) / .05)}#isdk .ring-transparent{--tw-ring-color: transparent}#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_white\\]{--tw-drop-shadow: drop-shadow(0 1.5px white);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 .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 .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-9) / 1);--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{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-accent-4 *::selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:text-accent-12 *::selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:bg-accent-4::-moz-selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-accent-4::selection{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-4) / var(--tw-bg-opacity))}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .selection\\:text-accent-12::selection{--tw-text-opacity: 1;color:oklch(var(--i-a-12) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-4::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-4::placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-4) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-5::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-5) / var(--tw-text-opacity))}#isdk .placeholder\\:text-neutral-5::placeholder{--tw-text-opacity: 1;color:oklch(var(--i-n-5) / var(--tw-text-opacity))}#isdk .hover\\:bg-neutral-12\\/5:hover{background-color:oklch(var(--i-n-12) / .05)}#isdk .hover\\:text-neutral-12:hover{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .hover\\:ring-accent-8:hover{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-8) / var(--tw-ring-opacity))}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:oklch(var(--i-a-7) / 1)}#isdk .focus-visible\\:outline-accent-9:focus-visible{outline-color:oklch(var(--i-a-9) / 1)}#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-accent-7\\/50:focus-visible{--tw-ring-color: oklch(var(--i-a-7) / .5)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:bg-accent-10:active{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-10) / var(--tw-bg-opacity))}#isdk .active\\:bg-accent-2:active{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-2) / var(--tw-bg-opacity))}#isdk .active\\:bg-neutral-12\\/10:active{background-color:oklch(var(--i-n-12) / .1)}#isdk .active\\:text-accent-10:active{--tw-text-opacity: 1;color:oklch(var(--i-a-10) / var(--tw-text-opacity))}#isdk .active\\:text-accent-11:active{--tw-text-opacity: 1;color:oklch(var(--i-a-11) / var(--tw-text-opacity))}#isdk .active\\:text-accent-2:active{--tw-text-opacity: 1;color:oklch(var(--i-a-2) / var(--tw-text-opacity))}#isdk .active\\:text-neutral-12:active{--tw-text-opacity: 1;color:oklch(var(--i-n-12) / var(--tw-text-opacity))}#isdk .active\\:outline-neutral-10:active{outline-color:oklch(var(--i-n-10) / 1)}#isdk .active\\:ring-accent-7:active{--tw-ring-opacity: 1;--tw-ring-color: oklch(var(--i-a-7) / var(--tw-ring-opacity))}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{--tw-bg-opacity: 1;background-color:oklch(var(--i-a-2) / var(--tw-bg-opacity))}#isdk .peer:checked~.peer-checked\\:text-accent-9{--tw-text-opacity: 1;color:oklch(var(--i-a-9) / var(--tw-text-opacity))}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:oklch(var(--i-a-7) / 1)}#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-opacity: 1;--tw-ring-color: oklch(var(--i-a-7) / var(--tw-ring-opacity))}#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
+ `,hg=()=>{let e=null;return{getOrCreateChatbotElement:()=>{if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Ev,e=t,t},addStyle:(t,n)=>{const r=document.head,o=document.createElement("style");o.id=n,o.innerHTML=t,r.appendChild(o)}}},Su=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},pg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},mg=e=>Su(pg[e.toLowerCase()],6),vg=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,gg=e=>{let t;return(t=e.match(vg))?Su(parseInt(t[1],16),t[1].length):void 0},$t="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",nr=`${$t}%`,os=`(?:${$t}%|${$t})`,bg=`(?:${$t}(deg|grad|rad|turn)|${$t})`,yn="\\s*,\\s*",yg=new RegExp(`^rgba?\\(\\s*${$t}${yn}${$t}${yn}${$t}\\s*(?:,\\s*${os}\\s*)?\\)$`),wg=new RegExp(`^rgba?\\(\\s*${nr}${yn}${nr}${yn}${nr}\\s*(?:,\\s*${os}\\s*)?\\)$`),_g=e=>{let t={mode:"rgb"},n;if(n=e.match(yg))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(wg))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=n[4]/100:n[5]!==void 0&&(t.alpha=+n[5]),t},rr=(e,t)=>e===void 0?void 0:typeof e!="object"?Pg(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,it=(e="rgb")=>t=>(t=rr(t,e))!==void 0?t.mode===e?t:Ke[t.mode][e]?Ke[t.mode][e](t):e==="rgb"?Ke[t.mode].rgb(t):Ke.rgb[e](Ke[t.mode].rgb(t)):void 0,Ke={},Mu={},ao=[],Tu={},xg=e=>e,Z=e=>(Ke[e.mode]={...Ke[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ke[t]||(Ke[t]={}),Ke[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=xg)}),Mu[e.mode]=e,(e.parse||[]).forEach(t=>{kg(t,e.mode)}),it(e.mode)),Wt=e=>Mu[e],kg=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Tu[e]=t}else typeof e=="function"&&ao.indexOf(e)<0&&ao.push(e)},is=/[^\x00-\x7F]|[a-zA-Z_]/,$g=/[^\x00-\x7F]|[-\w]/,$={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let D=0;function co(e){let t=e[D],n=e[D+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[D+2]):t==="."?/\d/.test(n):/\d/.test(t)}function ss(e){if(D>=e.length)return!1;let t=e[D];if(is.test(t))return!0;if(t==="-"){if(e.length-D<2)return!1;let n=e[D+1];return!!(n==="-"||is.test(n))}return!1}const Sg={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function or(e){let t="";if((e[D]==="-"||e[D]==="+")&&(t+=e[D++]),t+=lo(e),e[D]==="."&&/\d/.test(e[D+1])&&(t+=e[D++]+lo(e)),(e[D]==="e"||e[D]==="E")&&((e[D+1]==="-"||e[D+1]==="+")&&/\d/.test(e[D+2])?t+=e[D++]+e[D++]+lo(e):/\d/.test(e[D+1])&&(t+=e[D++]+lo(e))),ss(e)){let n=uo(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:$.Hue,value:t*Sg[n]}:void 0}return e[D]==="%"?(D++,{type:$.Percentage,value:+t}):{type:$.Number,value:+t}}function lo(e){let t="";for(;/\d/.test(e[D]);)t+=e[D++];return t}function uo(e){let t="";for(;D<e.length&&$g.test(e[D]);)t+=e[D++];return t}function Mg(e){let t=uo(e);return e[D]==="("?(D++,{type:$.Function,value:t}):t==="none"?{type:$.None,value:void 0}:{type:$.Ident,value:t}}function Tg(e=""){let t=e.trim(),n=[],r;for(D=0;D<t.length;){if(r=t[D++],r===`
51
51
  `||r===" "||r===" "){for(;D<t.length&&(t[D]===`
52
- `||t[D]===" "||t[D]===" ");)D++;continue}if(r===",")return;if(r===")"){n.push({type:$.ParenClose});continue}if(r==="+"){if(D--,co(t)){n.push(rr(t));continue}return}if(r==="-"){if(D--,co(t)){n.push(rr(t));continue}if(ss(t)){n.push({type:$.Ident,value:uo(t)});continue}return}if(r==="."){if(D--,co(t)){n.push(rr(t));continue}return}if(r==="/"){for(;D<t.length&&(t[D]===`
53
- `||t[D]===" "||t[D]===" ");)D++;let o;if(co(t)&&(o=rr(t),o.type!==$.Hue)){n.push({type:$.Alpha,value:o});continue}if(ss(t)&&uo(t)==="none"){n.push({type:$.Alpha,value:{type:$.None,value:void 0}});continue}return}if(/\d/.test(r)){D--,n.push(rr(t));continue}if(is.test(r)){D--,n.push(Mg(t));continue}return}return n}function Cg(e){e._i=0;let t=e[e._i++];if(!t||t.type!==$.Function||t.value!=="color"||(t=e[e._i++],t.type!==$.Ident))return;const n=Tu[t.value];if(!n)return;const r={mode:n},o=Cu(e,!1);if(!o)return;const i=Wt(n).channels;for(let s=0,a;s<i.length;s++)a=o[s],a.type!==$.None&&(r[i[s]]=a.type===$.Number?a.value:a.value/100);return r}function Cu(e,t){const n=[];let r;for(;e._i<e.length;){if(r=e[e._i++],r.type===$.None||r.type===$.Number||r.type===$.Alpha||r.type===$.Percentage||t&&r.type===$.Hue){n.push(r);continue}if(r.type===$.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==$.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:$.None,value:void 0}),n.every(o=>o.type!==$.Alpha)?n:void 0}}function Ag(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==$.Function)return;let r=Cu(e,t);if(r)return r.unshift(n.value),r}const Pg=e=>{if(typeof e!="string")return;const t=Tg(e),n=t?Ag(t,!0):void 0;let r,o=0,i=ao.length;for(;o<i;)if((r=ao[o++](e,n))!==void 0)return r;return t?Cg(t):void 0};function Eg(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;const n={mode:"rgb"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.r=r.type===$.Number?r.value/255:r.value/100),o.type!==$.None&&(n.g=o.type===$.Number?o.value/255:o.value/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value/255:i.value/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Vg=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Og=(e,t,n)=>e+n*(t-e),Lg=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1];r===void 0&&o===void 0?t.push(void 0):r!==void 0&&o!==void 0?t.push([r,o]):t.push(r!==void 0?[r,r]:[o,o])}return t},A=(e=>t=>{let n=Lg(t);return r=>{let o=r*n.length,i=r>=1?n.length-1:Math.max(Math.floor(o),0),s=n[i];return s===void 0?void 0:e(s[0],s[1],o-i)}})(Og),he=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},yn={mode:"rgb",channels:["r","g","b","alpha"],parse:[Eg,gg,_g,mg,Vg,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:he}},gamut:!0},as=e=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Au=e=>{let t=as(e.r),n=as(e.g),r=as(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},cs=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Pu=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"a98",r:cs(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:cs(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:cs(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},ls=e=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},wn=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:ls(e),g:ls(t),b:ls(n)};return r!==void 0&&(o.alpha=r),o},_n=e=>{let{r:t,g:n,b:r,alpha:o}=wn(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return o!==void 0&&(i.alpha=o),i},us=e=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},xn=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:us(e),g:us(t),b:us(n)};return r!==void 0&&(i.alpha=r),i},kn=({x:e,y:t,z:n,alpha:r})=>{let o=xn({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(o.alpha=r),o},Ng={...yn,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Pu(_n(e)),xyz65:Pu},toMode:{rgb:e=>kn(Au(e)),xyz65:Au}},be=e=>(e=e%360)<0?e+360:e,Rg=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=be(n);return r===0||e[r-1]===void 0?i:t(i-be(o[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),st=e=>Rg(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),pe=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Fg=Math.PI/180,Ig=180/Math.PI;let Eu=pe[3]*pe[4],Vu=pe[1]*pe[4],Ou=pe[1]*pe[2]-pe[0]*pe[3];const Dg=({r:e,g:t,b:n,alpha:r})=>{let o=(Ou*n+e*Eu-t*Vu)/(Ou+Eu-Vu),i=n-o,s=(pe[4]*(t-o)-pe[2]*i)/pe[3],a={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+s*s)/(pe[4]*o*(1-o))};return a.s&&(a.h=Math.atan2(s,i)*Ig-120),r!==void 0&&(a.alpha=r),a},zg=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Fg;let i=t===void 0?0:t*n*(1-n),s=Math.cos(e),a=Math.sin(e);return o.r=n+i*(pe[0]*s+pe[1]*a),o.g=n+i*(pe[2]*s+pe[3]*a),o.b=n+i*(pe[4]*s+pe[5]*a),r!==void 0&&(o.alpha=r),o},fo=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=be(e.h),r=be(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Bg=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=be(e.h),r=be(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},ho=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=be(e.h),r=be(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},Lu=(e="rgb",t=[1,1,1,0])=>{let n=Wt(e),r=n.channels,o=n.difference,i=it(e);return(s,a)=>{let c=i(s),u=i(a);return Math.sqrt(r.reduce((d,l,f)=>{let h=o[l]?o[l](c,u):c[l]-u[l];return d+(t[f]||0)*Math.pow(isNaN(h)?0:h,2)},0))}},at=e=>{let t=e.reduce((n,r)=>{if(r!==void 0){let o=r*Math.PI/180;n.sin+=Math.sin(o),n.cos+=Math.cos(o)}return n},{sin:0,cos:0});return Math.atan2(t.sin,t.cos)*180/Math.PI},jg={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Dg},toMode:{rgb:zg},interpolate:{h:{use:A,fixup:st},s:A,l:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}},St=({l:e,a:t,b:n,alpha:r},o="lch")=>{let i=Math.sqrt(t*t+n*n),s={mode:o,l:e,c:i};return i&&(s.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},Mt=({l:e,c:t,h:n,alpha:r},o="lab")=>{let i={mode:o,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Nu=Math.pow(29,3)/Math.pow(3,3),Ru=Math.pow(6,3)/Math.pow(29,3),ce={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},$n={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let ds=e=>Math.pow(e,3)>Ru?Math.pow(e,3):(116*e-16)/Nu;const Fu=({l:e,a:t,b:n,alpha:r})=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,a={mode:"xyz65",x:ds(i)*$n.X,y:ds(o)*$n.Y,z:ds(s)*$n.Z};return r!==void 0&&(a.alpha=r),a},po=e=>kn(Fu(e)),fs=e=>e>Ru?Math.cbrt(e):(Nu*e+16)/116,Iu=({x:e,y:t,z:n,alpha:r})=>{let o=fs(e/$n.X),i=fs(t/$n.Y),s=fs(n/$n.Z),a={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-s)};return r!==void 0&&(a.alpha=r),a},mo=e=>{let t=Iu(_n(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},vo=1,Du=1,or=26/180*Math.PI,go=Math.cos(or),bo=Math.sin(or),zu=100/Math.log(139/100),hs=({l:e,c:t,h:n,alpha:r})=>{let o={mode:"lab65",l:(Math.exp(e*vo/zu)-1)/.0039};if(n===void 0)o.a=o.b=0;else{let i=(Math.exp(.0435*t*Du*vo)-1)/.075,s=i*Math.cos(n/180*Math.PI-or),a=i*Math.sin(n/180*Math.PI-or);o.a=s*go-a/.83*bo,o.b=s*bo+a/.83*go}return r!==void 0&&(o.alpha=r),o},ps=({l:e,a:t,b:n,alpha:r})=>{let o=t*go+n*bo,i=.83*(n*go-t*bo),s=Math.sqrt(o*o+i*i),a={mode:"dlch",l:zu/vo*Math.log(1+.0039*e),c:Math.log(1+.075*s)/(.0435*Du*vo)};return a.c&&(a.h=be((Math.atan2(i,o)+or)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},Bu=e=>hs(St(e,"dlch")),ju=e=>Mt(ps(e),"dlab"),Hg={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Bu,rgb:e=>po(Bu(e))},fromMode:{lab65:ju,rgb:e=>ju(mo(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:he}}},Ug={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:hs,dlab:e=>Mt(e,"dlab"),rgb:e=>po(hs(e))},fromMode:{lab65:ps,dlab:e=>St(e,"dlch"),rgb:e=>ps(mo(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:st},alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}};function Xg({h:e,s:t,i:n,alpha:r}){e=be(e);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1-t)};break;case 1:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1+t*(3/(2-o)-1)),b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n*(1+t*(3/(2-o)-1)),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:i={r:n*(1-t),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1+t*(3/(2-o)-1))};break;case 4:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3/(2-o)-1))};break;case 5:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function qg({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsi",s:e+t+n===0?0:1-3*i/(e+t+n),i:(e+t+n)/3};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const Wg={mode:"hsi",toMode:{rgb:Xg},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:qg},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:st},s:A,i:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function Kg({h:e,s:t,l:n,alpha:r}){e=be(e);let o=n+t*(n<.5?n:1-n),i=o-(o-n)*2*Math.abs(e/60%2-1),s;switch(Math.floor(e/60)){case 0:s={r:o,g:i,b:2*n-o};break;case 1:s={r:i,g:o,b:2*n-o};break;case 2:s={r:2*n-o,g:o,b:i};break;case 3:s={r:2*n-o,g:i,b:o};break;case 4:s={r:i,g:2*n-o,b:o};break;case 5:s={r:o,g:2*n-o,b:i};break;default:s={r:2*n-o,g:2*n-o,b:2*n-o}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function Yg({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsl",s:o===i?0:(o-i)/(1-Math.abs(o+i-1)),l:.5*(o+i)};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const Gg=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Zg=new RegExp(`^hsla?\\(\\s*${bg}${bn}${tr}${bn}${tr}\\s*(?:,\\s*${os}\\s*)?\\)$`),Jg=e=>{let t=e.match(Zg);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=Gg(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=t[6]/100:t[7]!==void 0&&(n.alpha=+t[7]),n};function Qg(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Percentage)return;n.h=r.value}if(o.type!==$.None){if(o.type===$.Hue)return;n.s=o.type===$.Number?o.value:o.value/100}if(i.type!==$.None){if(i.type===$.Hue)return;n.l=i.type===$.Number?i.value:i.value/100}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Hu={mode:"hsl",toMode:{rgb:Kg},fromMode:{rgb:Yg},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qg,Jg],serialize:e=>`hsl(${e.h||0} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},s:A,l:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function Uu({h:e,s:t,v:n,alpha:r}){e=be(e);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:n*(1-t*o),b:n*(1-t)};break;case 1:i={r:n*(1-t*o),g:n,b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n,b:n*(1-t*o)};break;case 3:i={r:n*(1-t),g:n*(1-t*o),b:n};break;case 4:i={r:n*(1-t*o),g:n*(1-t),b:n};break;case 5:i={r:n,g:n*(1-t),b:n*(1-t*o)};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function Xu({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsv",s:o===0?0:1-i/o,v:o};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const qu={mode:"hsv",toMode:{rgb:Uu},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Xu},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:st},s:A,v:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function e1({h:e,w:t,b:n,alpha:r}){if(t+n>1){let o=t+n;t/=o,n/=o}return Uu({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function t1(e){let t=Xu(e);if(t===void 0)return;let n={mode:"hwb",w:(1-t.s)*t.v,b:1-t.v};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function n1(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Percentage)return;n.h=r.value}if(o.type!==$.None){if(o.type===$.Hue)return;n.w=o.type===$.Number?o.value:o.value/100}if(i.type!==$.None){if(i.type===$.Hue)return;n.b=i.type===$.Number?i.value:i.value/100}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const r1={mode:"hwb",toMode:{rgb:e1},fromMode:{rgb:t1},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[n1],serialize:e=>`hwb(${e.h||0} ${e.w*100}% ${e.b*100}%${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},w:A,b:A,alpha:{use:A,fixup:he}},difference:{h:Bg},average:{h:at}},o1=.1593017578125,i1=134.03437499999998,s1=.8359375,a1=18.8515625,c1=18.6875,l1=16295499532821565e-27,ms=e=>{let t=Math.pow(e/1e4,o1);return Math.pow((s1+a1*t)/(1+c1*t),i1)||0},vs=e=>Math.max(e*203,0),Wu=({x:e,y:t,z:n,alpha:r})=>{e=vs(e),t=vs(t),n=vs(n);let o=1.15*e-.15*n,i=.66*t+.34*e,s=ms(.41478972*o+.579999*i+.014648*n),a=ms(-.20151*o+1.120649*i+.0531008*n),c=ms(-.0166008*o+.2648*i+.6684799*n),u=(s+a)/2,d={mode:"jab",j:.44*u/(1-.56*u)-l1,a:3.524*s-4.066708*a+.542708*c,b:.199076*s+1.096799*a-1.295875*c};return r!==void 0&&(d.alpha=r),d},u1=.1593017578125,d1=134.03437499999998,f1=.8359375,h1=18.8515625,p1=18.6875,Ku=16295499532821565e-27,gs=e=>{let t=Math.pow(e,1/d1);return 1e4*Math.pow((f1-t)/(p1*t-h1),1/u1)||0},bs=e=>e/203,Yu=({j:e,a:t,b:n,alpha:r})=>{let o=(e+Ku)/(.44+.56*(e+Ku)),i=gs(o+.13860504*t+.058047316*n),s=gs(o-.13860504*t-.058047316*n),a=gs(o-.096019242*t-.8118919*n),c={mode:"xyz65",x:bs(1.661373024652174*i-.914523081304348*s+.23136208173913045*a),y:bs(-.3250758611844533*i+1.571847026732543*s-.21825383453227928*a),z:bs(-.090982811*i-.31272829*s+1.5227666*a)};return r!==void 0&&(c.alpha=r),c},Gu=e=>{let t=Wu(_n(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Zu=e=>kn(Yu(e)),m1={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Gu,xyz65:Wu},toMode:{rgb:Zu,xyz65:Yu},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:he}}},Ju=({j:e,a:t,b:n,alpha:r})=>{let o=Math.sqrt(t*t+n*n),i={mode:"jch",j:e,c:o};return o&&(i.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},Qu=({j:e,c:t,h:n,alpha:r})=>{let o={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},v1={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qu,rgb:e=>Zu(Qu(e))},fromMode:{rgb:e=>Ju(Gu(e)),jab:Ju},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:st},c:A,j:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},yo=Math.pow(29,3)/Math.pow(3,3),ys=Math.pow(6,3)/Math.pow(29,3);let ws=e=>Math.pow(e,3)>ys?Math.pow(e,3):(116*e-16)/yo;const _s=({l:e,a:t,b:n,alpha:r})=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,a={mode:"xyz50",x:ws(i)*ce.X,y:ws(o)*ce.Y,z:ws(s)*ce.Z};return r!==void 0&&(a.alpha=r),a},ir=({x:e,y:t,z:n,alpha:r})=>{let o=xn({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(o.alpha=r),o},ed=e=>ir(_s(e)),sr=e=>{let{r:t,g:n,b:r,alpha:o}=wn(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return o!==void 0&&(i.alpha=o),i},xs=e=>e>ys?Math.cbrt(e):(yo*e+16)/116,ks=({x:e,y:t,z:n,alpha:r})=>{let o=xs(e/ce.X),i=xs(t/ce.Y),s=xs(n/ce.Z),a={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-s)};return r!==void 0&&(a.alpha=r),a},td=e=>{let t=ks(sr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function g1(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.l=r.value),o.type!==$.None&&(n.a=o.type===$.Number?o.value:o.value*125/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value:i.value*125/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const $s={mode:"lab",toMode:{xyz50:_s,rgb:ed},fromMode:{xyz50:ks,rgb:td},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[g1],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:he}}},b1={...$s,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Fu,rgb:po},fromMode:{xyz65:Iu,rgb:mo},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function y1(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Hue)return;n.l=r.value}if(o.type!==$.None&&(n.c=Math.max(0,o.type===$.Number?o.value:o.value*150/100)),i.type!==$.None){if(i.type===$.Percentage)return;n.h=i.value}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Ss={mode:"lch",toMode:{lab:Mt,rgb:e=>ed(Mt(e))},fromMode:{rgb:e=>St(td(e)),lab:St},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[y1],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h||0}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},c:A,l:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},w1={...Ss,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Mt(e,"lab65"),rgb:e=>po(Mt(e,"lab65"))},fromMode:{rgb:e=>St(mo(e),"lch65"),lab65:e=>St(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},nd=({l:e,u:t,v:n,alpha:r})=>{let o=Math.sqrt(t*t+n*n),i={mode:"lchuv",l:e,c:o};return o&&(i.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},rd=({l:e,c:t,h:n,alpha:r})=>{let o={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},od=(e,t,n)=>4*e/(e+15*t+3*n),id=(e,t,n)=>9*t/(e+15*t+3*n),_1=od(ce.X,ce.Y,ce.Z),x1=id(ce.X,ce.Y,ce.Z),k1=e=>e<=ys?yo*e:116*Math.cbrt(e)-16,Ms=({x:e,y:t,z:n,alpha:r})=>{let o=k1(t/ce.Y),i=od(e,t,n),s=id(e,t,n);!isFinite(i)||!isFinite(s)?o=i=s=0:(i=13*o*(i-_1),s=13*o*(s-x1));let a={mode:"luv",l:o,u:i,v:s};return r!==void 0&&(a.alpha=r),a},$1=(e,t,n)=>4*e/(e+15*t+3*n),S1=(e,t,n)=>9*t/(e+15*t+3*n),M1=$1(ce.X,ce.Y,ce.Z),T1=S1(ce.X,ce.Y,ce.Z),Ts=({l:e,u:t,v:n,alpha:r})=>{let o=t/(13*e)+M1,i=n/(13*e)+T1,s=ce.Y*(e<=8?e/yo:Math.pow((e+16)/116,3)),a=s*(9*o)/(4*i),c=s*(12-3*o-20*i)/(4*i),u={mode:"xyz50",x:a,y:s,z:c};return r!==void 0&&(u.alpha=r),u},C1={mode:"lchuv",toMode:{luv:rd,rgb:e=>ir(Ts(rd(e)))},fromMode:{rgb:e=>nd(Ms(sr(e))),luv:nd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:st},c:A,l:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},A1={...yn,mode:"lrgb",toMode:{rgb:xn},fromMode:{rgb:wn},parse:["srgb-linear"],serialize:"srgb-linear"},P1={mode:"luv",toMode:{xyz50:Ts,rgb:e=>ir(Ts(e))},fromMode:{xyz50:Ms,rgb:e=>Ms(sr(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:he}}},sd=({r:e,g:t,b:n,alpha:r})=>{let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),s=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),a={mode:"oklab",l:.2104542553*o+.793617785*i-.0040720468*s,a:1.9779984951*o-2.428592205*i+.4505937099*s,b:.0259040371*o+.7827717662*i-.808675766*s};return r!==void 0&&(a.alpha=r),a},wo=e=>{let t=sd(wn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ar=({l:e,a:t,b:n,alpha:r})=>{let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n,3),i=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n,3),s=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n,3),a={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*i+.230969928729428*s,g:-1.2684380040921763*o+2.6097574006633715*i-.3413193963102197*s,b:-.004196086541837188*o-.7034186144594493*i+1.7076147009309444*s};return r!==void 0&&(a.alpha=r),a},_o=e=>xn(ar(e));function Cs(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function xo(e){const r=1.170873786407767;return(e*e+.206*e)/(r*(e+.03))}function E1(e,t){let n,r,o,i,s,a,c,u;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,o=.59662641,i=.75515197,s=.56771245,a=4.0767416621,c=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,o=.08285427,i=.1254107,s=.14503204,a=-1.2684380046,c=2.6097574011,u=-.3413193965):(n=1.35733652,r=-.00915799,o=-1.1513021,i=-.50559606,s=.00692167,a=-.0041960863,c=-.7034186147,u=1.707614701);let d=n+r*e+o*t+i*e*e+s*e*t,l=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let p=1+d*l,m=1+d*f,y=1+d*h,x=p*p*p,g=m*m*m,w=y*y*y,M=3*l*p*p,S=3*f*m*m,F=3*h*y*y,N=6*l*l*p,C=6*f*f*m,E=6*h*h*y,q=a*x+c*g+u*w,K=a*M+c*S+u*F,j=a*N+c*C+u*E;d=d-q*K/(K*K-.5*q*j)}return d}function As(e,t){let n=E1(e,t),r=ar({l:1,a:n*e,b:n*t}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=o*n;return[o,i]}function V1(e,t,n,r,o,i=null){i||(i=As(e,t));let s;if((n-o)*i[1]-(i[0]-o)*r<=0)s=i[1]*o/(r*i[0]+i[1]*(o-n));else{s=i[1]*(o-1)/(r*(i[0]-1)+i[1]*(o-n));{let a=n-o,c=r,u=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,f=a+c*u,h=a+c*d,p=a+c*l;{let m=o*(1-s)+s*n,y=s*r,x=m+y*u,g=m+y*d,w=m+y*l,M=x*x*x,S=g*g*g,F=w*w*w,N=3*f*x*x,C=3*h*g*g,E=3*p*w*w,q=6*f*f*x,K=6*h*h*g,j=6*p*p*w,B=4.0767416621*M-3.3077115913*S+.2309699292*F-1,H=4.0767416621*N-3.3077115913*C+.2309699292*E,X=4.0767416621*q-3.3077115913*K+.2309699292*j,re=H/(H*H-.5*B*X),se=-B*re,Le=-1.2684380046*M+2.6097574011*S-.3413193965*F-1,Ne=-1.2684380046*N+2.6097574011*C-.3413193965*E,ut=-1.2684380046*q+2.6097574011*K-.3413193965*j,Y=Ne/(Ne*Ne-.5*Le*ut),Re=-Le*Y,At=-.0041960863*M-.7034186147*S+1.707614701*F-1,Pt=-.0041960863*N-.7034186147*C+1.707614701*E,Gt=-.0041960863*q-.7034186147*K+1.707614701*j,Ge=Pt/(Pt*Pt-.5*At*Gt),Ze=-At*Ge;se=re>=0?se:1e6,Re=Y>=0?Re:1e6,Ze=Ge>=0?Ze:1e6,s+=Math.min(se,Math.min(Re,Ze))}}}return s}function Ps(e,t,n=null){n||(n=As(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function ad(e,t,n){let r=As(t,n),o=V1(t,n,e,1,e,r),i=Ps(t,n,r),s=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),a=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=o/Math.min(e*i[0],(1-e)*i[1]),u=e*s,d=(1-e)*a,l=.9*c*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(d*d*d*d))));return u=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(d*d))),l,o]}function cd(e){const t={mode:"okhsl",l:Cs(e.l)};e.alpha!==void 0&&(t.alpha=e.alpha);let n=Math.sqrt(e.a*e.a+e.b*e.b);if(!n)return t.s=0,t;let[r,o,i]=ad(e.l,e.a/n,e.b/n),s;if(n<o){let a=0,c=.8*r,u=1-c/o;s=(n-a)/(c+u*(n-a))*.8}else{let a=o,c=.2*o*o*1.25*1.25/r,u=1-c/(i-o);s=.8+.2*((n-a)/(c+u*(n-a)))}return s&&(t.s=s,t.h=be(Math.atan2(e.b,e.a)*180/Math.PI)),t}function ld(e){let t=xo(e.l);const n={mode:"oklab",l:t};if(e.alpha!==void 0&&(n.alpha=e.alpha),!e.s||e.l===1)return n.a=n.b=0,n;let r=Math.cos(e.h/180*Math.PI),o=Math.sin(e.h/180*Math.PI),[i,s,a]=ad(t,r,o),c,u,d,l;e.s<.8?(c=1.25*e.s,u=0,d=.8*i,l=1-d/s):(c=5*(e.s-.8),u=s,d=.2*s*s*1.25*1.25/i,l=1-d/(a-s));let f=u+c*d/(1-l*c);return n.a=f*r,n.b=f*o,n}const O1={...Hu,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:cd,rgb:e=>cd(wo(e))},toMode:{oklab:ld,rgb:e=>_o(ld(e))}};function ud(e){let t=Math.sqrt(e.a*e.a+e.b*e.b),n=e.l,r=t?e.a/t:1,o=t?e.b/t:1,[i,s]=Ps(r,o),a=.5,c=1-a/i,u=s/(t+n*s),d=u*n,l=u*t,f=xo(d),h=l*f/d,p=ar({l:f,a:r*h,b:o*h}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));n=n/m,t=t/m*Cs(n)/n,n=Cs(n);const y={mode:"okhsv",s:t?(a+s)*l/(s*a+s*c*l):0,v:n?n/d:0};return y.s&&(y.h=be(Math.atan2(e.b,e.a)*180/Math.PI)),e.alpha!==void 0&&(y.alpha=e.alpha),y}function dd(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h||0,r=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[i,s]=Ps(r,o),a=.5,c=1-a/i,u=1-e.s*a/(a+s-s*c*e.s),d=e.s*s*a/(a+s-s*c*e.s),l=xo(u),f=d*l/u,h=ar({l,a:r*f,b:o*f}),p=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),m=xo(e.v*u),y=d*m/u;return t.l=m*p,t.a=y*r*p,t.b=y*o*p,t}const L1={...qu,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ud,rgb:e=>ud(wo(e))},toMode:{oklab:dd,rgb:e=>_o(dd(e))}};function N1(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.l=r.type===$.Number?r.value:r.value/100),o.type!==$.None&&(n.a=o.type===$.Number?o.value:o.value*.4/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value:i.value*.4/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const R1={...$s,mode:"oklab",toMode:{lrgb:ar,rgb:_o},fromMode:{lrgb:sd,rgb:wo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[N1],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`};function F1(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Hue)return;n.l=r.type===$.Number?r.value:r.value/100}if(o.type!==$.None&&(n.c=Math.max(0,o.type===$.Number?o.value:o.value*.4/100)),i.type!==$.None){if(i.type===$.Percentage)return;n.h=i.value}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const I1={...Ss,mode:"oklch",toMode:{oklab:e=>Mt(e,"oklab"),rgb:e=>_o(Mt(e,"oklab"))},fromMode:{rgb:e=>St(wo(e),"oklch"),oklab:e=>St(e,"oklch")},parse:[F1],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h||0}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},fd=e=>{let{r:t,g:n,b:r,alpha:o}=wn(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return o!==void 0&&(i.alpha=o),i},hd=({x:e,y:t,z:n,alpha:r})=>{let o=xn({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(o.alpha=r),o},D1={...yn,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>hd(_n(e)),xyz65:hd},toMode:{rgb:e=>kn(fd(e)),xyz65:fd}},Es=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},pd=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"prophoto",r:Es(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Es(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Es(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},Vs=e=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},md=e=>{let t=Vs(e.r),n=Vs(e.g),r=Vs(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},z1={...yn,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:pd,rgb:e=>pd(sr(e))},toMode:{xyz50:md,rgb:e=>ir(md(e))}},vd=1.09929682680944,B1=.018053968510807,Os=e=>{const t=Math.abs(e);return t>B1?(Math.sign(e)||1)*(vd*Math.pow(t,.45)-(vd-1)):4.5*e},gd=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"rec2020",r:Os(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Os(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Os(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},bd=1.09929682680944,j1=.018053968510807,Ls=e=>{let t=Math.abs(e);return t<j1*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+bd-1)/bd,1/.45)},yd=e=>{let t=Ls(e.r),n=Ls(e.g),r=Ls(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},H1={...yn,mode:"rec2020",fromMode:{xyz65:gd,rgb:e=>gd(_n(e))},toMode:{xyz65:yd,rgb:e=>kn(yd(e))},parse:["rec2020"],serialize:"rec2020"},Kt=.0037930732552754493,wd=Math.cbrt(Kt),Ns=e=>Math.cbrt(e)-wd,U1=e=>{const{r:t,g:n,b:r,alpha:o}=wn(e),i=Ns(.3*t+.622*n+.078*r+Kt),s=Ns(.23*t+.692*n+.078*r+Kt),a=Ns(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+Kt),c={mode:"xyb",x:(i-s)/2,y:(i+s)/2,b:a-(i+s)/2};return o!==void 0&&(c.alpha=o),c},Rs=e=>Math.pow(e+wd,3),X1={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:n,alpha:r})=>{const o=Rs(e+t)-Kt,i=Rs(t-e)-Kt,s=Rs(n+t)-Kt,a=xn({r:11.031566904639861*o-9.866943908131562*i-.16462299650829934*s,g:-3.2541473810744237*o+4.418770377582723*i-.16462299650829934*s,b:-3.6588512867136815*o+2.7129230459360922*i+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:U1},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:he}}},q1={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:ir,lab:ks},fromMode:{rgb:sr,lab:_s},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:he}}},W1={mode:"xyz65",toMode:{rgb:kn,xyz50:e=>{let{x:t,y:n,z:r,alpha:o}=e,i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return o!==void 0&&(i.alpha=o),i}},fromMode:{rgb:_n,xyz50:e=>{let{x:t,y:n,z:r,alpha:o}=e,i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return o!==void 0&&(i.alpha=o),i}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:he}}},K1={mode:"yiq",toMode:{rgb:({y:e,i:t,q:n,alpha:r})=>{const o={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(o.alpha=r),o}},fromMode:{rgb:({r:e,g:t,b:n,alpha:r})=>{const o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(o.alpha=r),o}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:he}}},Y1=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t;((e=4)=>t=>typeof t=="number"?Y1(t,e):t)(2);const G1=e=>{const t=nr(e);if(!t)return;const n=Wt(t.mode);if(!n.serialize||typeof n.serialize=="string"){let r=`color(${n.serialize||`--${t.mode}`} `;return n.channels.forEach((o,i)=>{o!=="alpha"&&(r+=(i?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(r+=` / ${t.alpha}`),r+")"}if(typeof n.serialize=="function")return n.serialize(t)};it("rgb");const Z1=e=>{const t={mode:e.mode,r:Math.max(0,Math.min(e.r,1)),g:Math.max(0,Math.min(e.g,1)),b:Math.max(0,Math.min(e.b,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},J1=e=>e!==void 0&&e.r>=0&&e.r<=1&&e.g>=0&&e.g<=1&&e.b>=0&&e.b<=1;function _d(e="rgb"){const{gamut:t}=Wt(e);if(!t)return r=>!0;const n=it(typeof t=="string"?t:e);return r=>J1(n(r))}function Q1(e="rgb"){const{gamut:t}=Wt(e);if(!t)return i=>nr(i);const n=typeof t=="string"?t:e,r=it(n),o=_d(n);return i=>{const s=nr(i);if(!s)return;const a=r(s);if(o(a))return s;const c=Z1(a);return s.mode===c.mode?c:it(s.mode)(c)}}function eb(e="rgb",t="oklch",n=Lu("oklch"),r=.02){const o=it(e);if(!Wt(e).gamut)return l=>o(l);const i=_d(e),s=Q1(e),a=it(t),{ranges:c}=Wt(t),u=o("white"),d=o("black");return l=>{if(l=nr(l),l===void 0)return;const f={...a(l)};if(f.l>=c.l[1]){const x={...u};return l.alpha!==void 0&&(x.alpha=l.alpha),x}if(f.l<=c.l[0]){const x={...d};return l.alpha!==void 0&&(x.alpha=l.alpha),x}if(i(f))return o(f);let h=0,p=f.c,m=(c.c[1]-c.c[0])/4e3,y=s(f);for(;p-h>m;)f.c=(h+p)*.5,y=s(f),i(f)||n&&r>0&&n(f,y)<=r?h=f.c:p=f.c;return o(i(f)?f:y)}}Z(Ng),Z(jg),Z(Hg),Z(Ug),Z(Wg),Z(Hu),Z(qu),Z(r1),Z(m1),Z(v1),Z($s),Z(b1),Z(Ss),Z(w1),Z(C1),Z(A1),Z(P1),Z(O1),Z(L1),Z(R1),Z(I1),Z(D1),Z(z1),Z(H1),Z(yn),Z(X1),Z(q1),Z(W1),Z(K1);const tb=it("oklch"),nb=Object.keys({1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0}),rb={1:{l:97.78,c:.0108},2:{l:93.56,c:.0321},3:{l:88.11,c:.0609},4:{l:82.67,c:.0908},5:{l:74.22,c:.1398},6:{l:64.78,c:.1472},7:{l:57.33,c:.1299},8:{l:46.89,c:.1067},9:{l:39.44,c:.0898},10:{l:32,c:.0726},11:{l:23.78,c:.054},12:{l:15.56,c:.0353}},ob=(e,t=1)=>n=>{const{c:r,l:o}=rb[n],i="oklch("+o+"% "+r*t+" "+e+")",s=tb(eb("p3","oklch",Lu("oklch"),0)(i)),a=G1(s);if(!a)throw new Error("Could not format color");return a},xd=e=>{const t=ob(e.hue,e.chroma);return Object.fromEntries(nb.map(n=>[n,t(n)]))},ib=e=>e.replace("oklch(","").replace(")",""),sb=e=>`#isdk {
52
+ `||t[D]===" "||t[D]===" ");)D++;continue}if(r===",")return;if(r===")"){n.push({type:$.ParenClose});continue}if(r==="+"){if(D--,co(t)){n.push(or(t));continue}return}if(r==="-"){if(D--,co(t)){n.push(or(t));continue}if(ss(t)){n.push({type:$.Ident,value:uo(t)});continue}return}if(r==="."){if(D--,co(t)){n.push(or(t));continue}return}if(r==="/"){for(;D<t.length&&(t[D]===`
53
+ `||t[D]===" "||t[D]===" ");)D++;let o;if(co(t)&&(o=or(t),o.type!==$.Hue)){n.push({type:$.Alpha,value:o});continue}if(ss(t)&&uo(t)==="none"){n.push({type:$.Alpha,value:{type:$.None,value:void 0}});continue}return}if(/\d/.test(r)){D--,n.push(or(t));continue}if(is.test(r)){D--,n.push(Mg(t));continue}return}return n}function Cg(e){e._i=0;let t=e[e._i++];if(!t||t.type!==$.Function||t.value!=="color"||(t=e[e._i++],t.type!==$.Ident))return;const n=Tu[t.value];if(!n)return;const r={mode:n},o=Cu(e,!1);if(!o)return;const i=Wt(n).channels;for(let s=0,a;s<i.length;s++)a=o[s],a.type!==$.None&&(r[i[s]]=a.type===$.Number?a.value:a.value/100);return r}function Cu(e,t){const n=[];let r;for(;e._i<e.length;){if(r=e[e._i++],r.type===$.None||r.type===$.Number||r.type===$.Alpha||r.type===$.Percentage||t&&r.type===$.Hue){n.push(r);continue}if(r.type===$.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==$.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:$.None,value:void 0}),n.every(o=>o.type!==$.Alpha)?n:void 0}}function Ag(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==$.Function)return;let r=Cu(e,t);if(r)return r.unshift(n.value),r}const Pg=e=>{if(typeof e!="string")return;const t=Tg(e),n=t?Ag(t,!0):void 0;let r,o=0,i=ao.length;for(;o<i;)if((r=ao[o++](e,n))!==void 0)return r;return t?Cg(t):void 0};function Eg(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;const n={mode:"rgb"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.r=r.type===$.Number?r.value/255:r.value/100),o.type!==$.None&&(n.g=o.type===$.Number?o.value/255:o.value/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value/255:i.value/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Vg=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Og=(e,t,n)=>e+n*(t-e),Lg=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1];r===void 0&&o===void 0?t.push(void 0):r!==void 0&&o!==void 0?t.push([r,o]):t.push(r!==void 0?[r,r]:[o,o])}return t},A=(e=>t=>{let n=Lg(t);return r=>{let o=r*n.length,i=r>=1?n.length-1:Math.max(Math.floor(o),0),s=n[i];return s===void 0?void 0:e(s[0],s[1],o-i)}})(Og),he=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},wn={mode:"rgb",channels:["r","g","b","alpha"],parse:[Eg,gg,_g,mg,Vg,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:he}},gamut:!0},as=e=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Au=e=>{let t=as(e.r),n=as(e.g),r=as(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},cs=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Pu=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"a98",r:cs(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:cs(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:cs(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},ls=e=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},_n=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:ls(e),g:ls(t),b:ls(n)};return r!==void 0&&(o.alpha=r),o},xn=e=>{let{r:t,g:n,b:r,alpha:o}=_n(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return o!==void 0&&(i.alpha=o),i},us=e=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},kn=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:us(e),g:us(t),b:us(n)};return r!==void 0&&(i.alpha=r),i},$n=({x:e,y:t,z:n,alpha:r})=>{let o=kn({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(o.alpha=r),o},Ng={...wn,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Pu(xn(e)),xyz65:Pu},toMode:{rgb:e=>$n(Au(e)),xyz65:Au}},be=e=>(e=e%360)<0?e+360:e,Rg=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=be(n);return r===0||e[r-1]===void 0?i:t(i-be(o[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),st=e=>Rg(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),pe=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ig=Math.PI/180,Fg=180/Math.PI;let Eu=pe[3]*pe[4],Vu=pe[1]*pe[4],Ou=pe[1]*pe[2]-pe[0]*pe[3];const Dg=({r:e,g:t,b:n,alpha:r})=>{let o=(Ou*n+e*Eu-t*Vu)/(Ou+Eu-Vu),i=n-o,s=(pe[4]*(t-o)-pe[2]*i)/pe[3],a={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+s*s)/(pe[4]*o*(1-o))};return a.s&&(a.h=Math.atan2(s,i)*Fg-120),r!==void 0&&(a.alpha=r),a},zg=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Ig;let i=t===void 0?0:t*n*(1-n),s=Math.cos(e),a=Math.sin(e);return o.r=n+i*(pe[0]*s+pe[1]*a),o.g=n+i*(pe[2]*s+pe[3]*a),o.b=n+i*(pe[4]*s+pe[5]*a),r!==void 0&&(o.alpha=r),o},fo=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=be(e.h),r=be(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Bg=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=be(e.h),r=be(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},ho=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=be(e.h),r=be(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},Lu=(e="rgb",t=[1,1,1,0])=>{let n=Wt(e),r=n.channels,o=n.difference,i=it(e);return(s,a)=>{let c=i(s),u=i(a);return Math.sqrt(r.reduce((d,l,f)=>{let h=o[l]?o[l](c,u):c[l]-u[l];return d+(t[f]||0)*Math.pow(isNaN(h)?0:h,2)},0))}},at=e=>{let t=e.reduce((n,r)=>{if(r!==void 0){let o=r*Math.PI/180;n.sin+=Math.sin(o),n.cos+=Math.cos(o)}return n},{sin:0,cos:0});return Math.atan2(t.sin,t.cos)*180/Math.PI},jg={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Dg},toMode:{rgb:zg},interpolate:{h:{use:A,fixup:st},s:A,l:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}},St=({l:e,a:t,b:n,alpha:r},o="lch")=>{let i=Math.sqrt(t*t+n*n),s={mode:o,l:e,c:i};return i&&(s.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},Mt=({l:e,c:t,h:n,alpha:r},o="lab")=>{let i={mode:o,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Nu=Math.pow(29,3)/Math.pow(3,3),Ru=Math.pow(6,3)/Math.pow(29,3),ce={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Sn={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let ds=e=>Math.pow(e,3)>Ru?Math.pow(e,3):(116*e-16)/Nu;const Iu=({l:e,a:t,b:n,alpha:r})=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,a={mode:"xyz65",x:ds(i)*Sn.X,y:ds(o)*Sn.Y,z:ds(s)*Sn.Z};return r!==void 0&&(a.alpha=r),a},po=e=>$n(Iu(e)),fs=e=>e>Ru?Math.cbrt(e):(Nu*e+16)/116,Fu=({x:e,y:t,z:n,alpha:r})=>{let o=fs(e/Sn.X),i=fs(t/Sn.Y),s=fs(n/Sn.Z),a={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-s)};return r!==void 0&&(a.alpha=r),a},mo=e=>{let t=Fu(xn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},vo=1,Du=1,ir=26/180*Math.PI,go=Math.cos(ir),bo=Math.sin(ir),zu=100/Math.log(139/100),hs=({l:e,c:t,h:n,alpha:r})=>{let o={mode:"lab65",l:(Math.exp(e*vo/zu)-1)/.0039};if(n===void 0)o.a=o.b=0;else{let i=(Math.exp(.0435*t*Du*vo)-1)/.075,s=i*Math.cos(n/180*Math.PI-ir),a=i*Math.sin(n/180*Math.PI-ir);o.a=s*go-a/.83*bo,o.b=s*bo+a/.83*go}return r!==void 0&&(o.alpha=r),o},ps=({l:e,a:t,b:n,alpha:r})=>{let o=t*go+n*bo,i=.83*(n*go-t*bo),s=Math.sqrt(o*o+i*i),a={mode:"dlch",l:zu/vo*Math.log(1+.0039*e),c:Math.log(1+.075*s)/(.0435*Du*vo)};return a.c&&(a.h=be((Math.atan2(i,o)+ir)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},Bu=e=>hs(St(e,"dlch")),ju=e=>Mt(ps(e),"dlab"),Hg={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Bu,rgb:e=>po(Bu(e))},fromMode:{lab65:ju,rgb:e=>ju(mo(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:he}}},Ug={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:hs,dlab:e=>Mt(e,"dlab"),rgb:e=>po(hs(e))},fromMode:{lab65:ps,dlab:e=>St(e,"dlch"),rgb:e=>ps(mo(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:st},alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}};function Xg({h:e,s:t,i:n,alpha:r}){e=be(e);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1-t)};break;case 1:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1+t*(3/(2-o)-1)),b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n*(1+t*(3/(2-o)-1)),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:i={r:n*(1-t),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1+t*(3/(2-o)-1))};break;case 4:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3/(2-o)-1))};break;case 5:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function qg({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsi",s:e+t+n===0?0:1-3*i/(e+t+n),i:(e+t+n)/3};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const Wg={mode:"hsi",toMode:{rgb:Xg},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:qg},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:st},s:A,i:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function Kg({h:e,s:t,l:n,alpha:r}){e=be(e);let o=n+t*(n<.5?n:1-n),i=o-(o-n)*2*Math.abs(e/60%2-1),s;switch(Math.floor(e/60)){case 0:s={r:o,g:i,b:2*n-o};break;case 1:s={r:i,g:o,b:2*n-o};break;case 2:s={r:2*n-o,g:o,b:i};break;case 3:s={r:2*n-o,g:i,b:o};break;case 4:s={r:i,g:2*n-o,b:o};break;case 5:s={r:o,g:2*n-o,b:i};break;default:s={r:2*n-o,g:2*n-o,b:2*n-o}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function Yg({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsl",s:o===i?0:(o-i)/(1-Math.abs(o+i-1)),l:.5*(o+i)};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const Gg=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Zg=new RegExp(`^hsla?\\(\\s*${bg}${yn}${nr}${yn}${nr}\\s*(?:,\\s*${os}\\s*)?\\)$`),Jg=e=>{let t=e.match(Zg);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=Gg(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=t[6]/100:t[7]!==void 0&&(n.alpha=+t[7]),n};function Qg(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Percentage)return;n.h=r.value}if(o.type!==$.None){if(o.type===$.Hue)return;n.s=o.type===$.Number?o.value:o.value/100}if(i.type!==$.None){if(i.type===$.Hue)return;n.l=i.type===$.Number?i.value:i.value/100}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Hu={mode:"hsl",toMode:{rgb:Kg},fromMode:{rgb:Yg},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qg,Jg],serialize:e=>`hsl(${e.h||0} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},s:A,l:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function Uu({h:e,s:t,v:n,alpha:r}){e=be(e);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:n*(1-t*o),b:n*(1-t)};break;case 1:i={r:n*(1-t*o),g:n,b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n,b:n*(1-t*o)};break;case 3:i={r:n*(1-t),g:n*(1-t*o),b:n};break;case 4:i={r:n*(1-t*o),g:n*(1-t),b:n};break;case 5:i={r:n,g:n*(1-t),b:n*(1-t*o)};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function Xu({r:e,g:t,b:n,alpha:r}){let o=Math.max(e,t,n),i=Math.min(e,t,n),s={mode:"hsv",s:o===0?0:1-i/o,v:o};return o-i!==0&&(s.h=(o===e?(t-n)/(o-i)+(t<n)*6:o===t?(n-e)/(o-i)+2:(e-t)/(o-i)+4)*60),r!==void 0&&(s.alpha=r),s}const qu={mode:"hsv",toMode:{rgb:Uu},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Xu},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:st},s:A,v:A,alpha:{use:A,fixup:he}},difference:{h:fo},average:{h:at}};function e1({h:e,w:t,b:n,alpha:r}){if(t+n>1){let o=t+n;t/=o,n/=o}return Uu({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function t1(e){let t=Xu(e);if(t===void 0)return;let n={mode:"hwb",w:(1-t.s)*t.v,b:1-t.v};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function n1(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Percentage)return;n.h=r.value}if(o.type!==$.None){if(o.type===$.Hue)return;n.w=o.type===$.Number?o.value:o.value/100}if(i.type!==$.None){if(i.type===$.Hue)return;n.b=i.type===$.Number?i.value:i.value/100}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const r1={mode:"hwb",toMode:{rgb:e1},fromMode:{rgb:t1},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[n1],serialize:e=>`hwb(${e.h||0} ${e.w*100}% ${e.b*100}%${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},w:A,b:A,alpha:{use:A,fixup:he}},difference:{h:Bg},average:{h:at}},o1=.1593017578125,i1=134.03437499999998,s1=.8359375,a1=18.8515625,c1=18.6875,l1=16295499532821565e-27,ms=e=>{let t=Math.pow(e/1e4,o1);return Math.pow((s1+a1*t)/(1+c1*t),i1)||0},vs=e=>Math.max(e*203,0),Wu=({x:e,y:t,z:n,alpha:r})=>{e=vs(e),t=vs(t),n=vs(n);let o=1.15*e-.15*n,i=.66*t+.34*e,s=ms(.41478972*o+.579999*i+.014648*n),a=ms(-.20151*o+1.120649*i+.0531008*n),c=ms(-.0166008*o+.2648*i+.6684799*n),u=(s+a)/2,d={mode:"jab",j:.44*u/(1-.56*u)-l1,a:3.524*s-4.066708*a+.542708*c,b:.199076*s+1.096799*a-1.295875*c};return r!==void 0&&(d.alpha=r),d},u1=.1593017578125,d1=134.03437499999998,f1=.8359375,h1=18.8515625,p1=18.6875,Ku=16295499532821565e-27,gs=e=>{let t=Math.pow(e,1/d1);return 1e4*Math.pow((f1-t)/(p1*t-h1),1/u1)||0},bs=e=>e/203,Yu=({j:e,a:t,b:n,alpha:r})=>{let o=(e+Ku)/(.44+.56*(e+Ku)),i=gs(o+.13860504*t+.058047316*n),s=gs(o-.13860504*t-.058047316*n),a=gs(o-.096019242*t-.8118919*n),c={mode:"xyz65",x:bs(1.661373024652174*i-.914523081304348*s+.23136208173913045*a),y:bs(-.3250758611844533*i+1.571847026732543*s-.21825383453227928*a),z:bs(-.090982811*i-.31272829*s+1.5227666*a)};return r!==void 0&&(c.alpha=r),c},Gu=e=>{let t=Wu(xn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Zu=e=>$n(Yu(e)),m1={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Gu,xyz65:Wu},toMode:{rgb:Zu,xyz65:Yu},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:he}}},Ju=({j:e,a:t,b:n,alpha:r})=>{let o=Math.sqrt(t*t+n*n),i={mode:"jch",j:e,c:o};return o&&(i.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},Qu=({j:e,c:t,h:n,alpha:r})=>{let o={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},v1={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qu,rgb:e=>Zu(Qu(e))},fromMode:{rgb:e=>Ju(Gu(e)),jab:Ju},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:st},c:A,j:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},yo=Math.pow(29,3)/Math.pow(3,3),ys=Math.pow(6,3)/Math.pow(29,3);let ws=e=>Math.pow(e,3)>ys?Math.pow(e,3):(116*e-16)/yo;const _s=({l:e,a:t,b:n,alpha:r})=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,a={mode:"xyz50",x:ws(i)*ce.X,y:ws(o)*ce.Y,z:ws(s)*ce.Z};return r!==void 0&&(a.alpha=r),a},sr=({x:e,y:t,z:n,alpha:r})=>{let o=kn({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(o.alpha=r),o},ed=e=>sr(_s(e)),ar=e=>{let{r:t,g:n,b:r,alpha:o}=_n(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return o!==void 0&&(i.alpha=o),i},xs=e=>e>ys?Math.cbrt(e):(yo*e+16)/116,ks=({x:e,y:t,z:n,alpha:r})=>{let o=xs(e/ce.X),i=xs(t/ce.Y),s=xs(n/ce.Z),a={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-s)};return r!==void 0&&(a.alpha=r),a},td=e=>{let t=ks(ar(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function g1(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.l=r.value),o.type!==$.None&&(n.a=o.type===$.Number?o.value:o.value*125/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value:i.value*125/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const $s={mode:"lab",toMode:{xyz50:_s,rgb:ed},fromMode:{xyz50:ks,rgb:td},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[g1],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:he}}},b1={...$s,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Iu,rgb:po},fromMode:{xyz65:Fu,rgb:mo},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function y1(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Hue)return;n.l=r.value}if(o.type!==$.None&&(n.c=Math.max(0,o.type===$.Number?o.value:o.value*150/100)),i.type!==$.None){if(i.type===$.Percentage)return;n.h=i.value}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const Ss={mode:"lch",toMode:{lab:Mt,rgb:e=>ed(Mt(e))},fromMode:{rgb:e=>St(td(e)),lab:St},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[y1],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h||0}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:st},c:A,l:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},w1={...Ss,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Mt(e,"lab65"),rgb:e=>po(Mt(e,"lab65"))},fromMode:{rgb:e=>St(mo(e),"lch65"),lab65:e=>St(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},nd=({l:e,u:t,v:n,alpha:r})=>{let o=Math.sqrt(t*t+n*n),i={mode:"lchuv",l:e,c:o};return o&&(i.h=be(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},rd=({l:e,c:t,h:n,alpha:r})=>{let o={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},od=(e,t,n)=>4*e/(e+15*t+3*n),id=(e,t,n)=>9*t/(e+15*t+3*n),_1=od(ce.X,ce.Y,ce.Z),x1=id(ce.X,ce.Y,ce.Z),k1=e=>e<=ys?yo*e:116*Math.cbrt(e)-16,Ms=({x:e,y:t,z:n,alpha:r})=>{let o=k1(t/ce.Y),i=od(e,t,n),s=id(e,t,n);!isFinite(i)||!isFinite(s)?o=i=s=0:(i=13*o*(i-_1),s=13*o*(s-x1));let a={mode:"luv",l:o,u:i,v:s};return r!==void 0&&(a.alpha=r),a},$1=(e,t,n)=>4*e/(e+15*t+3*n),S1=(e,t,n)=>9*t/(e+15*t+3*n),M1=$1(ce.X,ce.Y,ce.Z),T1=S1(ce.X,ce.Y,ce.Z),Ts=({l:e,u:t,v:n,alpha:r})=>{let o=t/(13*e)+M1,i=n/(13*e)+T1,s=ce.Y*(e<=8?e/yo:Math.pow((e+16)/116,3)),a=s*(9*o)/(4*i),c=s*(12-3*o-20*i)/(4*i),u={mode:"xyz50",x:a,y:s,z:c};return r!==void 0&&(u.alpha=r),u},C1={mode:"lchuv",toMode:{luv:rd,rgb:e=>sr(Ts(rd(e)))},fromMode:{rgb:e=>nd(Ms(ar(e))),luv:nd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:st},c:A,l:A,alpha:{use:A,fixup:he}},difference:{h:ho},average:{h:at}},A1={...wn,mode:"lrgb",toMode:{rgb:kn},fromMode:{rgb:_n},parse:["srgb-linear"],serialize:"srgb-linear"},P1={mode:"luv",toMode:{xyz50:Ts,rgb:e=>sr(Ts(e))},fromMode:{xyz50:Ms,rgb:e=>Ms(ar(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:he}}},sd=({r:e,g:t,b:n,alpha:r})=>{let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),s=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),a={mode:"oklab",l:.2104542553*o+.793617785*i-.0040720468*s,a:1.9779984951*o-2.428592205*i+.4505937099*s,b:.0259040371*o+.7827717662*i-.808675766*s};return r!==void 0&&(a.alpha=r),a},wo=e=>{let t=sd(_n(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},cr=({l:e,a:t,b:n,alpha:r})=>{let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n,3),i=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n,3),s=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n,3),a={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*i+.230969928729428*s,g:-1.2684380040921763*o+2.6097574006633715*i-.3413193963102197*s,b:-.004196086541837188*o-.7034186144594493*i+1.7076147009309444*s};return r!==void 0&&(a.alpha=r),a},_o=e=>kn(cr(e));function Cs(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function xo(e){const r=1.170873786407767;return(e*e+.206*e)/(r*(e+.03))}function E1(e,t){let n,r,o,i,s,a,c,u;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,o=.59662641,i=.75515197,s=.56771245,a=4.0767416621,c=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,o=.08285427,i=.1254107,s=.14503204,a=-1.2684380046,c=2.6097574011,u=-.3413193965):(n=1.35733652,r=-.00915799,o=-1.1513021,i=-.50559606,s=.00692167,a=-.0041960863,c=-.7034186147,u=1.707614701);let d=n+r*e+o*t+i*e*e+s*e*t,l=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let p=1+d*l,m=1+d*f,y=1+d*h,x=p*p*p,g=m*m*m,w=y*y*y,M=3*l*p*p,S=3*f*m*m,I=3*h*y*y,N=6*l*l*p,C=6*f*f*m,E=6*h*h*y,q=a*x+c*g+u*w,K=a*M+c*S+u*I,j=a*N+c*C+u*E;d=d-q*K/(K*K-.5*q*j)}return d}function As(e,t){let n=E1(e,t),r=cr({l:1,a:n*e,b:n*t}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=o*n;return[o,i]}function V1(e,t,n,r,o,i=null){i||(i=As(e,t));let s;if((n-o)*i[1]-(i[0]-o)*r<=0)s=i[1]*o/(r*i[0]+i[1]*(o-n));else{s=i[1]*(o-1)/(r*(i[0]-1)+i[1]*(o-n));{let a=n-o,c=r,u=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,f=a+c*u,h=a+c*d,p=a+c*l;{let m=o*(1-s)+s*n,y=s*r,x=m+y*u,g=m+y*d,w=m+y*l,M=x*x*x,S=g*g*g,I=w*w*w,N=3*f*x*x,C=3*h*g*g,E=3*p*w*w,q=6*f*f*x,K=6*h*h*g,j=6*p*p*w,B=4.0767416621*M-3.3077115913*S+.2309699292*I-1,H=4.0767416621*N-3.3077115913*C+.2309699292*E,X=4.0767416621*q-3.3077115913*K+.2309699292*j,re=H/(H*H-.5*B*X),se=-B*re,Le=-1.2684380046*M+2.6097574011*S-.3413193965*I-1,Ne=-1.2684380046*N+2.6097574011*C-.3413193965*E,ut=-1.2684380046*q+2.6097574011*K-.3413193965*j,Y=Ne/(Ne*Ne-.5*Le*ut),Re=-Le*Y,At=-.0041960863*M-.7034186147*S+1.707614701*I-1,Pt=-.0041960863*N-.7034186147*C+1.707614701*E,Gt=-.0041960863*q-.7034186147*K+1.707614701*j,Ge=Pt/(Pt*Pt-.5*At*Gt),Ze=-At*Ge;se=re>=0?se:1e6,Re=Y>=0?Re:1e6,Ze=Ge>=0?Ze:1e6,s+=Math.min(se,Math.min(Re,Ze))}}}return s}function Ps(e,t,n=null){n||(n=As(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function ad(e,t,n){let r=As(t,n),o=V1(t,n,e,1,e,r),i=Ps(t,n,r),s=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),a=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=o/Math.min(e*i[0],(1-e)*i[1]),u=e*s,d=(1-e)*a,l=.9*c*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(d*d*d*d))));return u=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(d*d))),l,o]}function cd(e){const t={mode:"okhsl",l:Cs(e.l)};e.alpha!==void 0&&(t.alpha=e.alpha);let n=Math.sqrt(e.a*e.a+e.b*e.b);if(!n)return t.s=0,t;let[r,o,i]=ad(e.l,e.a/n,e.b/n),s;if(n<o){let a=0,c=.8*r,u=1-c/o;s=(n-a)/(c+u*(n-a))*.8}else{let a=o,c=.2*o*o*1.25*1.25/r,u=1-c/(i-o);s=.8+.2*((n-a)/(c+u*(n-a)))}return s&&(t.s=s,t.h=be(Math.atan2(e.b,e.a)*180/Math.PI)),t}function ld(e){let t=xo(e.l);const n={mode:"oklab",l:t};if(e.alpha!==void 0&&(n.alpha=e.alpha),!e.s||e.l===1)return n.a=n.b=0,n;let r=Math.cos(e.h/180*Math.PI),o=Math.sin(e.h/180*Math.PI),[i,s,a]=ad(t,r,o),c,u,d,l;e.s<.8?(c=1.25*e.s,u=0,d=.8*i,l=1-d/s):(c=5*(e.s-.8),u=s,d=.2*s*s*1.25*1.25/i,l=1-d/(a-s));let f=u+c*d/(1-l*c);return n.a=f*r,n.b=f*o,n}const O1={...Hu,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:cd,rgb:e=>cd(wo(e))},toMode:{oklab:ld,rgb:e=>_o(ld(e))}};function ud(e){let t=Math.sqrt(e.a*e.a+e.b*e.b),n=e.l,r=t?e.a/t:1,o=t?e.b/t:1,[i,s]=Ps(r,o),a=.5,c=1-a/i,u=s/(t+n*s),d=u*n,l=u*t,f=xo(d),h=l*f/d,p=cr({l:f,a:r*h,b:o*h}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));n=n/m,t=t/m*Cs(n)/n,n=Cs(n);const y={mode:"okhsv",s:t?(a+s)*l/(s*a+s*c*l):0,v:n?n/d:0};return y.s&&(y.h=be(Math.atan2(e.b,e.a)*180/Math.PI)),e.alpha!==void 0&&(y.alpha=e.alpha),y}function dd(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h||0,r=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[i,s]=Ps(r,o),a=.5,c=1-a/i,u=1-e.s*a/(a+s-s*c*e.s),d=e.s*s*a/(a+s-s*c*e.s),l=xo(u),f=d*l/u,h=cr({l,a:r*f,b:o*f}),p=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),m=xo(e.v*u),y=d*m/u;return t.l=m*p,t.a=y*r*p,t.b=y*o*p,t}const L1={...qu,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ud,rgb:e=>ud(wo(e))},toMode:{oklab:dd,rgb:e=>_o(dd(e))}};function N1(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,s]=t;if(!(r.type===$.Hue||o.type===$.Hue||i.type===$.Hue))return r.type!==$.None&&(n.l=r.type===$.Number?r.value:r.value/100),o.type!==$.None&&(n.a=o.type===$.Number?o.value:o.value*.4/100),i.type!==$.None&&(n.b=i.type===$.Number?i.value:i.value*.4/100),s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const R1={...$s,mode:"oklab",toMode:{lrgb:cr,rgb:_o},fromMode:{lrgb:sd,rgb:wo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[N1],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`};function I1(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,s]=t;if(r.type!==$.None){if(r.type===$.Hue)return;n.l=r.type===$.Number?r.value:r.value/100}if(o.type!==$.None&&(n.c=Math.max(0,o.type===$.Number?o.value:o.value*.4/100)),i.type!==$.None){if(i.type===$.Percentage)return;n.h=i.value}return s.type!==$.None&&(n.alpha=s.type===$.Number?s.value:s.value/100),n}const F1={...Ss,mode:"oklch",toMode:{oklab:e=>Mt(e,"oklab"),rgb:e=>_o(Mt(e,"oklab"))},fromMode:{rgb:e=>St(wo(e),"oklch"),oklab:e=>St(e,"oklch")},parse:[I1],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h||0}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},fd=e=>{let{r:t,g:n,b:r,alpha:o}=_n(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return o!==void 0&&(i.alpha=o),i},hd=({x:e,y:t,z:n,alpha:r})=>{let o=kn({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(o.alpha=r),o},D1={...wn,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>hd(xn(e)),xyz65:hd},toMode:{rgb:e=>$n(fd(e)),xyz65:fd}},Es=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},pd=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"prophoto",r:Es(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Es(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Es(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},Vs=e=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},md=e=>{let t=Vs(e.r),n=Vs(e.g),r=Vs(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},z1={...wn,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:pd,rgb:e=>pd(ar(e))},toMode:{xyz50:md,rgb:e=>sr(md(e))}},vd=1.09929682680944,B1=.018053968510807,Os=e=>{const t=Math.abs(e);return t>B1?(Math.sign(e)||1)*(vd*Math.pow(t,.45)-(vd-1)):4.5*e},gd=({x:e,y:t,z:n,alpha:r})=>{let o={mode:"rec2020",r:Os(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Os(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Os(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},bd=1.09929682680944,j1=.018053968510807,Ls=e=>{let t=Math.abs(e);return t<j1*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+bd-1)/bd,1/.45)},yd=e=>{let t=Ls(e.r),n=Ls(e.g),r=Ls(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},H1={...wn,mode:"rec2020",fromMode:{xyz65:gd,rgb:e=>gd(xn(e))},toMode:{xyz65:yd,rgb:e=>$n(yd(e))},parse:["rec2020"],serialize:"rec2020"},Kt=.0037930732552754493,wd=Math.cbrt(Kt),Ns=e=>Math.cbrt(e)-wd,U1=e=>{const{r:t,g:n,b:r,alpha:o}=_n(e),i=Ns(.3*t+.622*n+.078*r+Kt),s=Ns(.23*t+.692*n+.078*r+Kt),a=Ns(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+Kt),c={mode:"xyb",x:(i-s)/2,y:(i+s)/2,b:a-(i+s)/2};return o!==void 0&&(c.alpha=o),c},Rs=e=>Math.pow(e+wd,3),X1={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:n,alpha:r})=>{const o=Rs(e+t)-Kt,i=Rs(t-e)-Kt,s=Rs(n+t)-Kt,a=kn({r:11.031566904639861*o-9.866943908131562*i-.16462299650829934*s,g:-3.2541473810744237*o+4.418770377582723*i-.16462299650829934*s,b:-3.6588512867136815*o+2.7129230459360922*i+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:U1},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:he}}},q1={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:sr,lab:ks},fromMode:{rgb:ar,lab:_s},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:he}}},W1={mode:"xyz65",toMode:{rgb:$n,xyz50:e=>{let{x:t,y:n,z:r,alpha:o}=e,i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return o!==void 0&&(i.alpha=o),i}},fromMode:{rgb:xn,xyz50:e=>{let{x:t,y:n,z:r,alpha:o}=e,i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return o!==void 0&&(i.alpha=o),i}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:he}}},K1={mode:"yiq",toMode:{rgb:({y:e,i:t,q:n,alpha:r})=>{const o={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(o.alpha=r),o}},fromMode:{rgb:({r:e,g:t,b:n,alpha:r})=>{const o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(o.alpha=r),o}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:he}}},Y1=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t;((e=4)=>t=>typeof t=="number"?Y1(t,e):t)(2);const G1=e=>{const t=rr(e);if(!t)return;const n=Wt(t.mode);if(!n.serialize||typeof n.serialize=="string"){let r=`color(${n.serialize||`--${t.mode}`} `;return n.channels.forEach((o,i)=>{o!=="alpha"&&(r+=(i?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(r+=` / ${t.alpha}`),r+")"}if(typeof n.serialize=="function")return n.serialize(t)};it("rgb");const Z1=e=>{const t={mode:e.mode,r:Math.max(0,Math.min(e.r,1)),g:Math.max(0,Math.min(e.g,1)),b:Math.max(0,Math.min(e.b,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},J1=e=>e!==void 0&&e.r>=0&&e.r<=1&&e.g>=0&&e.g<=1&&e.b>=0&&e.b<=1;function _d(e="rgb"){const{gamut:t}=Wt(e);if(!t)return r=>!0;const n=it(typeof t=="string"?t:e);return r=>J1(n(r))}function Q1(e="rgb"){const{gamut:t}=Wt(e);if(!t)return i=>rr(i);const n=typeof t=="string"?t:e,r=it(n),o=_d(n);return i=>{const s=rr(i);if(!s)return;const a=r(s);if(o(a))return s;const c=Z1(a);return s.mode===c.mode?c:it(s.mode)(c)}}function eb(e="rgb",t="oklch",n=Lu("oklch"),r=.02){const o=it(e);if(!Wt(e).gamut)return l=>o(l);const i=_d(e),s=Q1(e),a=it(t),{ranges:c}=Wt(t),u=o("white"),d=o("black");return l=>{if(l=rr(l),l===void 0)return;const f={...a(l)};if(f.l>=c.l[1]){const x={...u};return l.alpha!==void 0&&(x.alpha=l.alpha),x}if(f.l<=c.l[0]){const x={...d};return l.alpha!==void 0&&(x.alpha=l.alpha),x}if(i(f))return o(f);let h=0,p=f.c,m=(c.c[1]-c.c[0])/4e3,y=s(f);for(;p-h>m;)f.c=(h+p)*.5,y=s(f),i(f)||n&&r>0&&n(f,y)<=r?h=f.c:p=f.c;return o(i(f)?f:y)}}Z(Ng),Z(jg),Z(Hg),Z(Ug),Z(Wg),Z(Hu),Z(qu),Z(r1),Z(m1),Z(v1),Z($s),Z(b1),Z(Ss),Z(w1),Z(C1),Z(A1),Z(P1),Z(O1),Z(L1),Z(R1),Z(F1),Z(D1),Z(z1),Z(H1),Z(wn),Z(X1),Z(q1),Z(W1),Z(K1);const tb=it("oklch"),nb=Object.keys({1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0}),rb={1:{l:97.78,c:.0108},2:{l:93.56,c:.0321},3:{l:88.11,c:.0609},4:{l:82.67,c:.0908},5:{l:74.22,c:.1398},6:{l:64.78,c:.1472},7:{l:57.33,c:.1299},8:{l:46.89,c:.1067},9:{l:39.44,c:.0898},10:{l:32,c:.0726},11:{l:23.78,c:.054},12:{l:15.56,c:.0353}},ob=(e,t=1)=>n=>{const{c:r,l:o}=rb[n],i="oklch("+o+"% "+r*t+" "+e+")",s=tb(eb("p3","oklch",Lu("oklch"),0)(i)),a=G1(s);if(!a)throw new Error("Could not format color");return a},xd=e=>{const t=ob(e.hue,e.chroma);return Object.fromEntries(nb.map(n=>[n,t(n)]))},ib=e=>e.replace("oklch(","").replace(")",""),sb=e=>`#isdk {
54
54
  ${e.flatMap(n=>Object.entries(n.colors).map(([r,o])=>`--i-${n.name}-${r}: ${ib(o)};`).join(`
55
55
  `)).join(`
56
56
  `)}
57
- }`,ab=({_internal_domManager:e=hg(),theme:t})=>Et(({apiClient:n,logger:r,analytics:o})=>{let i=!1;const s=()=>{if(typeof window>"u")return;const a=e.getOrCreateChatbotElement();e.addStyle(fg,"inploi-chatbot-style");const c=sb([{name:"a",colors:xd(t)},{name:"n",colors:xd({hue:t.hue,chroma:.1})}]);e.addStyle(c,"inploi-chatbot-theme"),en(R(Hv,{apiClient:n,logger:r,analytics:o}),a),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;s(),r.info("Chatbot plugin prepared")}catch(a){console.error(a),r.error("Error preparing chatbot plugin",a)}},startApplication:async({jobId:a})=>{if(!(typeof window>"u"))try{ne.cancel(),pf(()=>{rt.value="maximised",ne.current$.value={state:"loading"}}),dg({jobId:a,apiClient:n,logger:r}).then(async c=>{c.ok?(await o.log({event:"APPLY_START",properties:{job_id:a},customProperties:{flow_id:c.value.flow.id}}).catch(r.error),ne.start(c.value)):ne.current$.value={state:"error",error:c.error}}),i||s()}catch(c){console.error(c),r.error("Error starting application",c)}},closeApplication:async()=>{typeof window>"u"||(r.info("Closing application from an external source"),ne.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=ab;const kd=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(r)return kd({node:r,nodes:t,stopWhen:n})},cb=({childNode:e,nodes:t})=>{const r=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(a=>a.id===o.branchId);if(!i)return!1;const s=kd({node:i,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(o=>o.id===r.nextId)},lb=({flow:e,analytics:t,logger:n,context:r,apiClient:o,getSubmissions:i,chatService:s,onFlowEnd:a,onInterpret:c})=>{const u=new AbortController,d=async(l,f)=>{const h=i();c==null||c(l,f);try{await ub({analytics:t,logger:n,apiClient:o,context:r,node:l,submissions:h,chat:{sendMessage:async p=>s.send({groupId:l.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const m=p?e.find(y=>y.id===p):cb({childNode:l,nodes:e});return m?d(m,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(p){if(p instanceof Zn)return;throw p}};return{interpret:async l=>{const f=e.find(h=>h.id===l)??vu(e);return d(f)},abort:()=>{u.abort()}}};async function ub(e){return await nt(e).with({node:{type:"text"}},pb).with({node:{type:"image"}},mb).with({node:{type:"question-text"}},vb).with({node:{type:"question-enum"}},bb).with({node:{type:"question-number"}},gb).with({node:{type:"question-boolean"}},yb).with({node:{type:"question-file"}},_b).with({node:{type:"question-address"}},wb).with({node:{type:"end-flow"}},xb).with({node:{type:"if-block"}},hb).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},fb).with({node:{type:"integration-application-submit"}},db).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function db({chat:e,next:t,node:n,logger:r,apiClient:o,submissions:i,context:s,analytics:a}){await e.userInput({type:"multiple-choice",key:void 0,config:{options:[{label:"Submit my application",value:"submit"}],maxSelected:1,minSelected:1}});const c=()=>{const d=typeof s.jobId=="string"?s.jobId:void 0;d&&a.log({event:"APPLY_COMPLETE",properties:{job_id:d}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const u=await o.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,type:n.data.type,ats:n.data.ats,integration_id:n.data.integrationId,anonymous_id:a.getAnonymousId(),submissions:Nv(i||{})})}).catch(d=>d);await nt(u).with({ats_data:{redirect_url:Ae.string}},async d=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const l=a.getAnonymousId(),f=new URL(d.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),c(),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"})}).with({success:!0},async()=>{c(),await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async d=>{r.error(d),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function fb({chat:e,next:t,node:n}){await e.sendMessage({type:"link",href:n.data.href,text:n.data.cta}),t(n.nextId)}async function hb({submissions:e,next:t,node:n}){const r=kb(n,e)?n.branchId:n.nextId;t(r)}async function pb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.text}),t(n.nextId)}async function mb({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 vb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"text",config:{placeholder:n.data.placeholder,format:n.data.format}});await e.sendMessage({author:"user",type:"text",text:r.value}),t(n.nextId)}async function gb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"text",config:{placeholder:n.data.placeholder,format:"text"}});await e.sendMessage({author:"user",type:"text",text:r.value}),t(n.nextId)}async function bb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>r.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function yb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value,i={true:n.data.trueLabel,false:n.data.falseLabel};await e.sendMessage({author:"user",type:"text",text:i[o]}),t(n.nextId)}async function wb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:"Address questions are not implemented yet"}),t(n.nextId)}async function _b({node:e,chat:t,next:n}){await t.sendMessage({author:"bot",type:"text",text:e.data.question});const r=await t.userInput({key:e.data.key,type:"file",config:{extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});for await(const o of r.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function xb({chat:e,end:t,next:n,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage||"Conversation finished"}),t()}const $d=Ae.union(Ae.string,Ae.array(Ae.string)),kb=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?nt({...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:$d}},({compareValue:r,answer:o})=>o.value.includes(r)).with({compare:"notContains",answer:{value:$d}},({compareValue:r,answer:o})=>!o.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},ko=({class:e,...t})=>b("button",{class:Xt("bg-accent-7 active:bg-accent-10 active:text-accent-2 text-lowest pointer-coarse:touch-hitbox focus-visible:ring-accent-7/50 flex-shrink-0 rounded-full p-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[b("title",{children:"Send"}),b("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),b("path",{d:"M8 4V13"})]})}),Fs=()=>{const e=U(null);return G(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Sd=["true","false"],$b=eg(Sd),Sb="answer",Mb=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=Fs();return n(),b("form",{noValidate:!0,class:"flex items-center gap-2",onSubmit:o=>{o.preventDefault();const i=nt(o).with({nativeEvent:{submitter:Ae.select(Ae.union(Ae.instanceOf(HTMLButtonElement),Ae.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=rs($b,i);t(s)},children:Sd.map((o,i)=>b("button",{ref:i===0?r:null,type:"submit",name:Sb,value:o,class:"bg-lowest ease-expo-out ring-neutral-12/5 text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr duration-snappy block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:b("p",{class:"truncate text-center text-base",children:e.config.labels[o]})}))})},Is=({error:e,onAnimationComplete:t})=>b(to,{children:e&&b(Wn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},onAnimationComplete:t,role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full p-0.5 px-1 opacity-0",children:[b("svg",{class:"text-error-10",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),b("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),b("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),b("p",{class:"truncate pr-1 text-sm",children:e.message})]})}),Tb=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}),$o=e=>nt(e).with(Ae.number.lte(1e3),()=>`${Math.round(e)}KB`).with(Ae.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Cb=e=>e.reduce((t,n)=>t+n.sizeKb,0),Ab=ts("file"),Md=3,Pb=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${r}$`),"");return b("div",{class:Xt("bg-accent-1 outline-neutral-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...n,children:[b("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[b("span",{class:"block truncate",children:o}),b("span",{children:[".",r]})]}),b("p",{"aria-label":"File size",class:"text-neutral-10",children:$o(e.sizeKb)})]})},Td=({class:e,...t})=>b("li",{class:Xt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Eb=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=(l=ne.current$.value.application)==null?void 0:l.data.submissions[e.key],[o,i]=ae(Ab(r)?r.value:[]),[s,a]=ae(),c=o.length-Md,u=Cb(o),d=Fs();return b("form",{class:"flex flex-col gap-1",onSubmit:f=>(f.preventDefault(),a(void 0),o.length===0?a({type:"required",message:"Please select a file"}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${$o(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&o.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(o)),children:[b("div",{class:"flex items-center gap-2",children:[b("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:[o.length>0?b(ue,{children:[b("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[o.slice(0,Md).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return b(Td,{class:"flex overflow-hidden",children:[b("span",{class:"block truncate",children:p}),b("span",{children:[".",h]})]})}),c>0?b(Td,{children:["+",c," file",c!==1?"s":""]}):null]}),b("p",{class:"text-neutral-11 text-xs",children:[$o(u)," ",o.length>1?"total":""]})]}):b("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[b("header",{class:"flex flex-col items-center gap-0",children:[b("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:b("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"})}),b("p",{class:"text-neutral-12 tracking-[-0.01em] dark:text-gray-400",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?b("p",{class:"text-neutral-10 text-xs",children:["(max ",$o(e.config.fileSizeLimitKib),")"]}):null]}),b("aside",{class:"flex flex-col items-center gap-2",children:[b("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),b("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>b("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(".","")}))})]})]}),b("input",{id:"dropzone-file",onInput:async f=>{$r(f.target instanceof HTMLInputElement);const h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async y=>{const x=await Tb(y);return{name:y.name,data:x,sizeKb:y.size/1e3}}));if(p.some(({status:y})=>y==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=p.map(y=>y.status==="fulfilled"?y.value:null).filter(Boolean);i(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),b(ko,{disabled:o.length===0})]}),s&&b(Is,{onAnimationComplete:n,error:s})]})};var cr=e=>e.type==="checkbox",Sn=e=>e instanceof Date,Me=e=>e==null;const Cd=e=>typeof e=="object";var fe=e=>!Me(e)&&!Array.isArray(e)&&Cd(e)&&!Sn(e),Vb=e=>fe(e)&&e.target?cr(e.target)?e.target.checked:e.target.value:e,Ob=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Lb=(e,t)=>e.has(Ob(t)),Nb=e=>{const t=e.constructor&&e.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Ds=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ct(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(!(Ds&&(e instanceof Blob||e instanceof FileList))&&(n||fe(e)))if(t=n?[]:{},!n&&!Nb(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ct(e[r]));else return e;return t}var lr=e=>Array.isArray(e)?e.filter(Boolean):[],ie=e=>e===void 0,O=(e,t,n)=>{if(!t||!fe(e))return n;const r=lr(t.split(/[,[\].]+?/)).reduce((o,i)=>Me(o)?o:o[i],e);return ie(r)||r===e?ie(e[t])?n:e[t]:r},Tt=e=>typeof e=="boolean";const Ad={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ze={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},lt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};De.createContext(null);var Rb=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==ze.all&&(t._proxyFormState[s]=!r||ze.all),n&&(n[s]=!0),e[s]}});return o},Oe=e=>fe(e)&&!Object.keys(e).length,Fb=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Oe(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||ze.all))},zs=e=>Array.isArray(e)?e:[e];function Ib(e){const t=De.useRef(e);t.current=e,De.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ye=e=>typeof e=="string",Db=(e,t,n,r,o)=>Ye(e)?(r&&t.watch.add(e),O(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),O(n,i))):(r&&(t.watchAll=!0),n),Bs=e=>/^\w*$/.test(e),Pd=e=>lr(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Q(e,t,n){let r=-1;const o=Bs(t)?[t]:Pd(t),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let c=n;if(r!==s){const u=e[a];c=fe(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}e[a]=c,e=e[a]}return e}var Ed=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Vd=e=>({isOnSubmit:!e||e===ze.onSubmit,isOnBlur:e===ze.onBlur,isOnChange:e===ze.onChange,isOnAll:e===ze.all,isOnTouch:e===ze.onTouched}),Od=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const So=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=O(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else fe(a)&&So(a,t)}}};var zb=(e,t,n)=>{const r=lr(O(e,n));return Q(r,"root",t[n]),Q(e,n,r),e},js=e=>e.type==="file",Ct=e=>typeof e=="function",Mo=e=>{if(!Ds)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},To=e=>Ye(e),Hs=e=>e.type==="radio",Co=e=>e instanceof RegExp;const Ld={value:!1,isValid:!1},Nd={value:!0,isValid:!0};var Rd=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&&!ie(e[0].attributes.value)?ie(e[0].value)||e[0].value===""?Nd:{value:e[0].value,isValid:!0}:Nd:Ld}return Ld};const Fd={isValid:!1,value:null};var Id=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Fd):Fd;function Dd(e,t,n="validate"){if(To(e)||Array.isArray(e)&&e.every(To)||Tt(e)&&!e)return{type:n,message:To(e)?e:"",ref:t}}var Mn=e=>fe(e)&&!Co(e)?e:{value:e,message:""},zd=async(e,t,n,r,o)=>{const{ref:i,refs:s,required:a,maxLength:c,minLength:u,min:d,max:l,pattern:f,validate:h,name:p,valueAsNumber:m,mount:y,disabled:x}=e._f,g=O(t,p);if(!y||x)return{};const w=s?s[0]:i,M=j=>{r&&w.reportValidity&&(w.setCustomValidity(Tt(j)?"":j||""),w.reportValidity())},S={},F=Hs(i),N=cr(i),C=F||N,E=(m||js(i))&&ie(i.value)&&ie(g)||Mo(i)&&i.value===""||g===""||Array.isArray(g)&&!g.length,q=Ed.bind(null,p,n,S),K=(j,B,H,X=lt.maxLength,re=lt.minLength)=>{const se=j?B:H;S[p]={type:j?X:re,message:se,ref:i,...q(j?X:re,se)}};if(o?!Array.isArray(g)||!g.length:a&&(!C&&(E||Me(g))||Tt(g)&&!g||N&&!Rd(s).isValid||F&&!Id(s).isValid)){const{value:j,message:B}=To(a)?{value:!!a,message:a}:Mn(a);if(j&&(S[p]={type:lt.required,message:B,ref:w,...q(lt.required,B)},!n))return M(B),S}if(!E&&(!Me(d)||!Me(l))){let j,B;const H=Mn(l),X=Mn(d);if(!Me(g)&&!isNaN(g)){const re=i.valueAsNumber||g&&+g;Me(H.value)||(j=re>H.value),Me(X.value)||(B=re<X.value)}else{const re=i.valueAsDate||new Date(g),se=ut=>new Date(new Date().toDateString()+" "+ut),Le=i.type=="time",Ne=i.type=="week";Ye(H.value)&&g&&(j=Le?se(g)>se(H.value):Ne?g>H.value:re>new Date(H.value)),Ye(X.value)&&g&&(B=Le?se(g)<se(X.value):Ne?g<X.value:re<new Date(X.value))}if((j||B)&&(K(!!j,H.message,X.message,lt.max,lt.min),!n))return M(S[p].message),S}if((c||u)&&!E&&(Ye(g)||o&&Array.isArray(g))){const j=Mn(c),B=Mn(u),H=!Me(j.value)&&g.length>+j.value,X=!Me(B.value)&&g.length<+B.value;if((H||X)&&(K(H,j.message,B.message),!n))return M(S[p].message),S}if(f&&!E&&Ye(g)){const{value:j,message:B}=Mn(f);if(Co(j)&&!g.match(j)&&(S[p]={type:lt.pattern,message:B,ref:i,...q(lt.pattern,B)},!n))return M(B),S}if(h){if(Ct(h)){const j=await h(g,t),B=Dd(j,w);if(B&&(S[p]={...B,...q(lt.validate,B.message)},!n))return M(B.message),S}else if(fe(h)){let j={};for(const B in h){if(!Oe(j)&&!n)break;const H=Dd(await h[B](g,t),w,B);H&&(j={...H,...q(B,H.message)},M(H.message),n&&(S[p]=j))}if(!Oe(j)&&(S[p]={ref:w,...j},!n))return S}}return M(!0),S};function Bb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ie(e)?r++:e[t[r++]];return e}function jb(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ye(e,t){const n=Array.isArray(t)?t:Bs(t)?[t]:Pd(t),r=n.length===1?e:Bb(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(fe(r)&&Oe(r)||Array.isArray(r)&&jb(r))&&ye(e,n.slice(0,-1)),e}function Us(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Ao=e=>Me(e)||!Cd(e);function Yt(e,t){if(Ao(e)||Ao(t))return e===t;if(Sn(e)&&Sn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(Sn(i)&&Sn(s)||fe(i)&&fe(s)||Array.isArray(i)&&Array.isArray(s)?!Yt(i,s):i!==s)return!1}}return!0}var Bd=e=>e.type==="select-multiple",Hb=e=>Hs(e)||cr(e),Xs=e=>Mo(e)&&e.isConnected,jd=e=>{for(const t in e)if(Ct(e[t]))return!0;return!1};function Po(e,t={}){const n=Array.isArray(e);if(fe(e)||n)for(const r in e)Array.isArray(e[r])||fe(e[r])&&!jd(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Po(e[r],t[r])):Me(e[r])||(t[r]=!0);return t}function Hd(e,t,n){const r=Array.isArray(e);if(fe(e)||r)for(const o in e)Array.isArray(e[o])||fe(e[o])&&!jd(e[o])?ie(t)||Ao(n[o])?n[o]=Array.isArray(e[o])?Po(e[o],[]):{...Po(e[o])}:Hd(e[o],Me(t)?{}:t[o],n[o]):n[o]=!Yt(e[o],t[o]);return n}var qs=(e,t)=>Hd(e,t,Po(t)),Ud=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ie(e)?e:t?e===""?NaN:e&&+e:n&&Ye(e)?new Date(e):r?r(e):e;function Ws(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return js(t)?t.files:Hs(t)?Id(e.refs).value:Bd(t)?[...t.selectedOptions].map(({value:n})=>n):cr(t)?Rd(e.refs).value:Ud(ie(t.value)?e.ref.value:t.value,e)}var Ub=(e,t,n,r)=>{const o={};for(const i of e){const s=O(t,i);s&&Q(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},ur=e=>ie(e)?e:Co(e)?e.source:fe(e)?Co(e.value)?e.value.source:e.value:e,Xb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Xd(e,t,n){const r=O(e,n);if(r||Bs(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=O(t,i),a=O(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var qb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Wb=(e,t)=>!lr(O(e,t)).length&&ye(e,t);const Kb={mode:ze.onSubmit,reValidateMode:ze.onChange,shouldFocusError:!0};function Yb(e={},t){let n={...Kb,...e},r={submitCount:0,isDirty:!1,isLoading:Ct(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=fe(n.defaultValues)||fe(n.values)?ct(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:ct(i),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Us(),array:Us(),state:Us()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Vd(n.mode),m=Vd(n.reValidateMode),y=n.criteriaMode===ze.all,x=v=>_=>{clearTimeout(d),d=setTimeout(v,_)},g=async v=>{if(l.isValid||v){const _=n.resolver?Oe((await E()).errors):await K(o,!0);_!==r.isValid&&f.state.next({isValid:_})}},w=v=>l.isValidating&&f.state.next({isValidating:v}),M=(v,_=[],k,L,P=!0,T=!0)=>{if(L&&k){if(a.action=!0,T&&Array.isArray(O(o,v))){const I=k(O(o,v),L.argA,L.argB);P&&Q(o,v,I)}if(T&&Array.isArray(O(r.errors,v))){const I=k(O(r.errors,v),L.argA,L.argB);P&&Q(r.errors,v,I),Wb(r.errors,v)}if(l.touchedFields&&T&&Array.isArray(O(r.touchedFields,v))){const I=k(O(r.touchedFields,v),L.argA,L.argB);P&&Q(r.touchedFields,v,I)}l.dirtyFields&&(r.dirtyFields=qs(i,s)),f.state.next({name:v,isDirty:B(v,_),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Q(s,v,_)},S=(v,_)=>{Q(r.errors,v,_),f.state.next({errors:r.errors})},F=(v,_,k,L)=>{const P=O(o,v);if(P){const T=O(s,v,ie(k)?O(i,v):k);ie(T)||L&&L.defaultChecked||_?Q(s,v,_?T:Ws(P._f)):re(v,T),a.mount&&g()}},N=(v,_,k,L,P)=>{let T=!1,I=!1;const ee={name:v};if(!k||L){l.isDirty&&(I=r.isDirty,r.isDirty=ee.isDirty=B(),T=I!==ee.isDirty);const le=Yt(O(i,v),_);I=O(r.dirtyFields,v),le?ye(r.dirtyFields,v):Q(r.dirtyFields,v,!0),ee.dirtyFields=r.dirtyFields,T=T||l.dirtyFields&&I!==!le}if(k){const le=O(r.touchedFields,v);le||(Q(r.touchedFields,v,k),ee.touchedFields=r.touchedFields,T=T||l.touchedFields&&le!==k)}return T&&P&&f.state.next(ee),T?ee:{}},C=(v,_,k,L)=>{const P=O(r.errors,v),T=l.isValid&&Tt(_)&&r.isValid!==_;if(e.delayError&&k?(u=x(()=>S(v,k)),u(e.delayError)):(clearTimeout(d),u=null,k?Q(r.errors,v,k):ye(r.errors,v)),(k?!Yt(P,k):P)||!Oe(L)||T){const I={...L,...T&&Tt(_)?{isValid:_}:{},errors:r.errors,name:v};r={...r,...I},f.state.next(I)}w(!1)},E=async v=>n.resolver(s,n.context,Ub(v||c.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),q=async v=>{const{errors:_}=await E(v);if(v)for(const k of v){const L=O(_,k);L?Q(r.errors,k,L):ye(r.errors,k)}else r.errors=_;return _},K=async(v,_,k={valid:!0})=>{for(const L in v){const P=v[L];if(P){const{_f:T,...I}=P;if(T){const ee=c.array.has(T.name),le=await zd(P,s,y,n.shouldUseNativeValidation&&!_,ee);if(le[T.name]&&(k.valid=!1,_))break;!_&&(O(le,T.name)?ee?zb(r.errors,le,T.name):Q(r.errors,T.name,le[T.name]):ye(r.errors,T.name))}I&&await K(I,_,k)}}return k.valid},j=()=>{for(const v of c.unMount){const _=O(o,v);_&&(_._f.refs?_._f.refs.every(k=>!Xs(k)):!Xs(_._f.ref))&&Ze(v)}c.unMount=new Set},B=(v,_)=>(v&&_&&Q(s,v,_),!Yt(Re(),i)),H=(v,_,k)=>Db(v,c,{...a.mount?s:ie(_)?i:Ye(v)?{[v]:_}:_},k,_),X=v=>lr(O(a.mount?s:i,v,e.shouldUnregister?O(i,v,[]):[])),re=(v,_,k={})=>{const L=O(o,v);let P=_;if(L){const T=L._f;T&&(!T.disabled&&Q(s,v,Ud(_,T)),P=Mo(T.ref)&&Me(_)?"":_,Bd(T.ref)?[...T.ref.options].forEach(I=>I.selected=P.includes(I.value)):T.refs?cr(T.ref)?T.refs.length>1?T.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray(P)?!!P.find(ee=>ee===I.value):P===I.value)):T.refs[0]&&(T.refs[0].checked=!!P):T.refs.forEach(I=>I.checked=I.value===P):js(T.ref)?T.ref.value="":(T.ref.value=P,T.ref.type||f.values.next({name:v,values:{...s}})))}(k.shouldDirty||k.shouldTouch)&&N(v,P,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&Y(v)},se=(v,_,k)=>{for(const L in _){const P=_[L],T=`${v}.${L}`,I=O(o,T);(c.array.has(v)||!Ao(P)||I&&!I._f)&&!Sn(P)?se(T,P,k):re(T,P,k)}},Le=(v,_,k={})=>{const L=O(o,v),P=c.array.has(v),T=ct(_);Q(s,v,T),P?(f.array.next({name:v,values:{...s}}),(l.isDirty||l.dirtyFields)&&k.shouldDirty&&f.state.next({name:v,dirtyFields:qs(i,s),isDirty:B(v,T)})):L&&!L._f&&!Me(T)?se(v,T,k):re(v,T,k),Od(v,c)&&f.state.next({...r}),f.values.next({name:v,values:{...s}}),!a.mount&&t()},Ne=async v=>{const _=v.target;let k=_.name,L=!0;const P=O(o,k),T=()=>_.type?Ws(P._f):Vb(v),I=ee=>{L=Number.isNaN(ee)||ee===O(s,k,ee)};if(P){let ee,le;const Lo=T(),Tn=v.type===Ad.BLUR||v.type===Ad.FOCUS_OUT,xy=!Xb(P._f)&&!n.resolver&&!O(r.errors,k)&&!P._f.deps||qb(Tn,O(r.touchedFields,k),r.isSubmitted,m,p),Ks=Od(k,c,Tn);Q(s,k,Lo),Tn?(P._f.onBlur&&P._f.onBlur(v),u&&u(0)):P._f.onChange&&P._f.onChange(v);const Ys=N(k,Lo,Tn,!1),ky=!Oe(Ys)||Ks;if(!Tn&&f.values.next({name:k,type:v.type,values:{...s}}),xy)return l.isValid&&g(),ky&&f.state.next({name:k,...Ks?{}:Ys});if(!Tn&&Ks&&f.state.next({...r}),w(!0),n.resolver){const{errors:ef}=await E([k]);if(I(Lo),L){const $y=Xd(r.errors,o,k),tf=Xd(ef,o,$y.name||k);ee=tf.error,k=tf.name,le=Oe(ef)}}else ee=(await zd(P,s,y,n.shouldUseNativeValidation))[k],I(Lo),L&&(ee?le=!1:l.isValid&&(le=await K(o,!0)));L&&(P._f.deps&&Y(P._f.deps),C(k,le,ee,Ys))}},ut=(v,_)=>{if(O(r.errors,_)&&v.focus)return v.focus(),1},Y=async(v,_={})=>{let k,L;const P=zs(v);if(w(!0),n.resolver){const T=await q(ie(v)?v:P);k=Oe(T),L=v?!P.some(I=>O(T,I)):k}else v?(L=(await Promise.all(P.map(async T=>{const I=O(o,T);return await K(I&&I._f?{[T]:I}:I)}))).every(Boolean),!(!L&&!r.isValid)&&g()):L=k=await K(o);return f.state.next({...!Ye(v)||l.isValid&&k!==r.isValid?{}:{name:v},...n.resolver||!v?{isValid:k}:{},errors:r.errors,isValidating:!1}),_.shouldFocus&&!L&&So(o,ut,v?P:c.mount),L},Re=v=>{const _={...i,...a.mount?s:{}};return ie(v)?_:Ye(v)?O(_,v):v.map(k=>O(_,k))},At=(v,_)=>({invalid:!!O((_||r).errors,v),isDirty:!!O((_||r).dirtyFields,v),isTouched:!!O((_||r).touchedFields,v),error:O((_||r).errors,v)}),Pt=v=>{v&&zs(v).forEach(_=>ye(r.errors,_)),f.state.next({errors:v?r.errors:{}})},Gt=(v,_,k)=>{const L=(O(o,v,{_f:{}})._f||{}).ref;Q(r.errors,v,{..._,ref:L}),f.state.next({name:v,errors:r.errors,isValid:!1}),k&&k.shouldFocus&&L&&L.focus&&L.focus()},Ge=(v,_)=>Ct(v)?f.values.subscribe({next:k=>v(H(void 0,_),k)}):H(v,_,!0),Ze=(v,_={})=>{for(const k of v?zs(v):c.mount)c.mount.delete(k),c.array.delete(k),_.keepValue||(ye(o,k),ye(s,k)),!_.keepError&&ye(r.errors,k),!_.keepDirty&&ye(r.dirtyFields,k),!_.keepTouched&&ye(r.touchedFields,k),!n.shouldUnregister&&!_.keepDefaultValue&&ye(i,k);f.values.next({values:{...s}}),f.state.next({...r,..._.keepDirty?{isDirty:B()}:{}}),!_.keepIsValid&&g()},Vo=({disabled:v,name:_,field:k,fields:L,value:P})=>{if(Tt(v)){const T=v?void 0:ie(P)?Ws(k?k._f:O(L,_)._f):P;Q(s,_,T),N(_,T,!1,!1,!0)}},Zt=(v,_={})=>{let k=O(o,v);const L=Tt(_.disabled);return Q(o,v,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:v}},name:v,mount:!0,..._}}),c.mount.add(v),k?Vo({field:k,disabled:_.disabled,name:v}):F(v,!0,_.value),{...L?{disabled:_.disabled}:{},...n.progressive?{required:!!_.required,min:ur(_.min),max:ur(_.max),minLength:ur(_.minLength),maxLength:ur(_.maxLength),pattern:ur(_.pattern)}:{},name:v,onChange:Ne,onBlur:Ne,ref:P=>{if(P){Zt(v,_),k=O(o,v);const T=ie(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,I=Hb(T),ee=k._f.refs||[];if(I?ee.find(le=>le===T):T===k._f.ref)return;Q(o,v,{_f:{...k._f,...I?{refs:[...ee.filter(Xs),T,...Array.isArray(O(i,v))?[{}]:[]],ref:{type:T.type,name:v}}:{ref:T}}}),F(v,!1,void 0,T)}else k=O(o,v,{}),k._f&&(k._f.mount=!1),(n.shouldUnregister||_.shouldUnregister)&&!(Lb(c.array,v)&&a.action)&&c.unMount.add(v)}}},Jt=()=>n.shouldFocusError&&So(o,ut,c.mount),dt=v=>{Tt(v)&&(f.state.next({disabled:v}),So(o,_=>{_.disabled=v},0,!1))},dr=(v,_)=>async k=>{k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let L=ct(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:T}=await E();r.errors=P,L=T}else await K(o);ye(r.errors,"root"),Oe(r.errors)?(f.state.next({errors:{}}),await v(L,k)):(_&&await _({...r.errors},k),Jt(),setTimeout(Jt)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Oe(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Oo=(v,_={})=>{O(o,v)&&(ie(_.defaultValue)?Le(v,O(i,v)):(Le(v,_.defaultValue),Q(i,v,_.defaultValue)),_.keepTouched||ye(r.touchedFields,v),_.keepDirty||(ye(r.dirtyFields,v),r.isDirty=_.defaultValue?B(v,O(i,v)):B()),_.keepError||(ye(r.errors,v),l.isValid&&g()),f.state.next({...r}))},Jd=(v,_={})=>{const k=v?ct(v):i,L=ct(k),P=v&&!Oe(v)?L:i;if(_.keepDefaultValues||(i=k),!_.keepValues){if(_.keepDirtyValues||h)for(const T of c.mount)O(r.dirtyFields,T)?Q(P,T,O(s,T)):Le(T,O(P,T));else{if(Ds&&ie(v))for(const T of c.mount){const I=O(o,T);if(I&&I._f){const ee=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(Mo(ee)){const le=ee.closest("form");if(le){le.reset();break}}}}o={}}s=e.shouldUnregister?_.keepDefaultValues?ct(i):{}:ct(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!l.isValid||!!_.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:_.keepSubmitCount?r.submitCount:0,isDirty:_.keepDirty?r.isDirty:!!(_.keepDefaultValues&&!Yt(v,i)),isSubmitted:_.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:_.keepDirtyValues?r.dirtyFields:_.keepDefaultValues&&v?qs(i,v):{},touchedFields:_.keepTouched?r.touchedFields:{},errors:_.keepErrors?r.errors:{},isSubmitSuccessful:_.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Qd=(v,_)=>Jd(Ct(v)?v(s):v,_);return{control:{register:Zt,unregister:Ze,getFieldState:At,handleSubmit:dr,setError:Gt,_executeSchema:E,_getWatch:H,_getDirty:B,_updateValid:g,_removeUnmounted:j,_updateFieldArray:M,_updateDisabledField:Vo,_getFieldArray:X,_reset:Jd,_resetDefaultValues:()=>Ct(n.defaultValues)&&n.defaultValues().then(v=>{Qd(v,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:v=>{r={...r,...v}},_disableForm:dt,_subjects:f,_proxyFormState:l,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(v){a=v},get _defaultValues(){return i},get _names(){return c},set _names(v){c=v},get _formState(){return r},set _formState(v){r=v},get _options(){return n},set _options(v){n={...n,...v}}},trigger:Y,register:Zt,handleSubmit:dr,watch:Ge,setValue:Le,getValues:Re,reset:Qd,resetField:Oo,clearErrors:Pt,unregister:Ze,setError:Gt,setFocus:(v,_={})=>{const k=O(o,v),L=k&&k._f;if(L){const P=L.refs?L.refs[0]:L.ref;P.focus&&(P.focus(),_.shouldSelect&&P.select())}},getFieldState:At}}function qd(e={}){const t=De.useRef(),n=De.useRef(),[r,o]=De.useState({isDirty:!1,isValidating:!1,isLoading:Ct(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ct(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Yb(e,()=>o(s=>({...s}))),formState:r});const i=t.current.control;return i._options=e,Ib({subject:i._subjects.state,next:s=>{Fb(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),De.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),De.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),De.useEffect(()=>{e.values&&!Yt(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values):i._resetDefaultValues()},[e.values,i]),De.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Rb(r,i),t.current}var Wd=function(e,t,n){if(e&&"reportValidity"in e){var r=O(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Gb=function(e,t){var n=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?Wd(i.ref,o,e):i.refs&&i.refs.forEach(function(s){return Wd(s,o,e)})};for(var r in t.fields)n(r)},Zb=function(e,t){t.shouldUseNativeValidation&&Gb(e,t);var n={};for(var r in e){var o=O(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(Qb(t.names||Object.keys(e),r)){var s=Object.assign({},Jb(O(n,r)));Q(s,"root",i),Q(n,r,s)}else Q(n,r,i)}return n},Jb=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Qb=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},ey=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var o=r.path.map(function(a){return a.key}).join(".");if(n[o]||(n[o]={message:r.message,type:r.validation}),t){var i=n[o].types,s=i&&i[r.validation];n[o]=Ed(o,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Kd=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve(function(s,a){try{var c=function(){function u(l){return{values:n.raw?r:l,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(rs(e,r,d)):Promise.resolve(og(e,r,d)).then(u)}()}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(s){if(s instanceof so)return{values:{},errors:Zb(ey(s,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const ty=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},ny=ts("multiple-choice"),ry=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Kd(gn({checked:ku(rg(Zv()),n=>Object.entries(n).filter(([r,o])=>o).map(([r,o])=>r),[ag(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),$u(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},oy=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=ne.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:s}}=qd({defaultValues:{checked:ny(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:ry(e.config)}),a=Fs(),c=e.config.minSelected===1&&e.config.maxSelected===1;return b("form",{noValidate:!0,class:"flex flex-col gap-1",onChange:l=>{c&&ty(l.currentTarget)},onSubmit:i(l=>{const f=l.checked;t(f)}),children:[b("div",{class:"flex items-center gap-2",children:[b("div",{class:Xt("flex w-full flex-1 flex-wrap gap-3 p-1",{"justify-center":e.config.options.length===1}),children:e.config.options.map((l,f)=>{const h=`checked.${l.value}`,{ref:p,...m}=o(h);return b("div",{children:[b("input",{autoFocus:f===0,ref:y=>{y&&f===0&&(a.current=y),p(y)},id:h,...m,class:"peer sr-only",type:"checkbox"}),b("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-neutral-12/5 text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 duration-snappy 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:l.label})]},l.value)})}),!c&&b(ko,{})]}),b(Is,{onAnimationComplete:n,error:(d=s.checked)==null?void 0:d.root})]})},Eo={email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number"},iy=We(Eo.phone,[cg(/^\+?[0-9 -]+$/,Eo.phone)]),sy={email:We(Eo.email,[sg(Eo.email)]),phone:ku(iy,e=>e.replace(/[^0-9]/g,"")),text:We([$u(1,"Please enter some text")]),url:We([lg("That doesn’t look like a valid URL")])},ay={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},cy=ts("text"),ly=e=>Kd(gn({text:sy[e.format]})),uy=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var d;const r=e.key?(d=ne.current$.value.application)==null?void 0:d.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:s}}=qd({defaultValues:{text:cy(r)?r.value:""},resolver:ly(e.config)}),{ref:a,...c}=o("text",{required:!0}),u=U();return Be(()=>{u.current&&(u.current.focus(),u.current.select())},[]),b("form",{noValidate:!0,class:"flex flex-col gap-1",onSubmit:i(l=>{t(l.text)}),children:[b("div",{class:"flex items-center gap-2",children:[b("input",{id:"chat-input",...c,...ay[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:l=>{l&&(u.current=l),a(l)},class:"outline-neutral-12/5 ease-expo-out placeholder:text-neutral-5 focus-visible:outline-accent-7 caret-accent-9 duration-snappy flex-grow rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),b(ko,{})]}),b(Is,{onAnimationComplete:n,error:s.text})]})},dy=({onSubmit:e,onInputChange:t,input:n})=>{const r=U(null),o=me(()=>{r.current&&(ns.value=r.current.getBoundingClientRect().height)},[]);G(()=>{o(),t(n==null?void 0:n.type)},[n==null?void 0:n.type,t,o]);const i=s=>a=>e({type:s,value:a});return b(Wn.div,{initial:{height:0},animate:{height:ns.value},exit:{height:0,opacity:0},class:"bg-neutral-2/80 absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:b("div",{ref:r,class:"border-neutral-12/5 border-t p-2.5",children:nt({application:ne,input:n,onHeightChange:o}).with({input:Ae.nullish},()=>b("div",{class:"flex items-center gap-2",children:[b("input",{"aria-hidden":"true",id:"chat-input",class:"outline-neutral-12/5 placeholder:text-neutral-4 focus-visible:outline-accent-9 caret-accent-9 flex-grow rounded-full px-3 py-1 text-base outline outline-2",disabled:!0}),b(ko,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>b(uy,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>b(oy,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"boolean"}},s=>b(Mb,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"file"}},s=>b(Eb,{onSubmitSuccess:i(s.input.type),...s})).exhaustive()})})},Yd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Gd=Xt,Zd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Gd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],l=i==null?void 0:i[u];if(d===null)return null;const f=Yd(d)||Yd(l);return o[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...h}=d;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...u,l,f]:u},[]);return Gd(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},fy=Zd("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink-1 min-w-[2rem] text-md py-2 px-3 rounded-[18px] min-h-[36px] break-words",{variants:{side:{left:"bg-lowest text-neutral-12 shadow-surface-sm outline outline-1 outline-neutral-11/[.08] rounded-bl-md",right:"ml-auto bg-accent-7 text-lowest rounded-br-md bubble-right"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),hy={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},py=({children:e,className:t,transitionState:n,side:r,...o})=>b(Wn.p,{variants:hy,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:fy({className:t,side:r,transitionState:n}),...o,children:e}),my=({className:e,...t})=>b("div",{"aria-label":"Typing…",class:Xt("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>b("div",{class:"bg-accent-7 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}),vy={bot:"left",user:"right"},gy=Zd("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_white]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),by=({messages:e,isBotTyping:t})=>b("ol",{"aria-label":"Chat messages",class:"flex flex-grow flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[b(to,{initial:!1,children:e.map((n,r)=>b("li",{class:"flex",children:nt(n).with({type:"system"},o=>b("p",{class:gy({variant:o.variant}),children:o.text})).with({type:"text",author:Ae.union("bot","user")},o=>b(py,{side:vy[o.author],children:o.text},r)).with({type:"link"},o=>b("div",{class:"bg-accent-8/5 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",children:b("a",{class:"bg-lowest shadow-surface-sm ring-accent-8/20 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 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,b("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("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=>b("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=>b(Pb,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()},r))}),b("aside",{"aria-hidden":!0,children:t&&b(my,{})})]}),yy=25,wy=()=>{const e=U(null),[t,n]=ae(!1),[r,o]=ae(()=>()=>{}),i=de(()=>a=>{var c;return(c=e.current)==null?void 0:c.scrollTo({top:e.current.scrollHeight,...a})},[e]),s=de(()=>({send:async({message:a,signal:c,groupId:u})=>{if(await nt(a).with({author:"bot",type:"text"},async d=>{if(c!=null&&c.aborted)throw new Zn;n(!0);const l=Math.min(Math.max(20,d.text.length),100)*yy;await new Promise(f=>setTimeout(f,l,{signal:c})),n(!1)}).otherwise(async()=>{}),c!=null&&c.aborted)throw new Zn;ne.addMessage(a,u)},input:async({input:a,signal:c})=>{if(c!=null&&c.aborted)throw new Zn;return ne.setInput(a),await new Promise(u=>{const d=l=>{if(c!=null&&c.aborted)throw new Zn;ne.setInput(void 0),a.key&&ne.setSubmission(a.key,l),u(l)};o(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:r,scrollToEnd:i}},_y=Object.freeze(Object.defineProperty({__proto__:null,JobApplicationContent:({currentApplication:e,logger:t,apiClient:n,analytics:r})=>{const{chatRef:o,chatService:i,isBotTyping:s,onSubmitSuccessFn:a,scrollToEnd:c}=wy(),u=rt.value,d=e.flow,l=e.job;return Be(()=>{u==="maximised"&&c({behavior:"instant"})},[c,u]),G(()=>{c({behavior:"smooth"})},[e.data.messages,c]),Be(()=>{const{state:f,application:h}=ne.current$.peek();if(f!=="loaded")throw new Error(Vv.invalid_state);const p=h.data.currentNodeId;if(c({behavior:"instant"}),ne.setInput(void 0),h.data.isFinished)return;ne.removeLastGroupMessagesById(p);const{interpret:m,abort:y}=lb({context:{jobId:l.id,flowId:d.id},analytics:r,apiClient:n,logger:t,flow:d.nodes,chatService:i,getSubmissions:()=>{var x;return(x=ne.current$.peek().application)==null?void 0:x.data.submissions},onInterpret:(x,g)=>{const w=ne.current$.peek().application;$r(w),w.data.sequence=w.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:d.id,flow_version:d.version,job_id:l.id,from_node_id:g?g.id:null,to_node_id:x.id,sequence:w.data.sequence,flow_session_id:w.data.flowSessionId}}),ne.setCurrentNodeId(x.id)},onFlowEnd:async()=>{ne.markAsFinished()}});return m(p),y},[r,n,i,t,c,d,l.id,e.startedAt]),b(ue,{children:[b("div",{ref:o,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:ns.value},children:b(to,{children:b(by,{isBotTyping:s,messages:e.data.messages})})}),b(dy,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();
57
+ }`,ab=({_internal_domManager:e=hg(),theme:t})=>Et(({apiClient:n,logger:r,analytics:o})=>{let i=!1;const s=()=>{if(typeof window>"u")return;const a=e.getOrCreateChatbotElement();e.addStyle(fg,"inploi-chatbot-style");const c=sb([{name:"a",colors:xd(t)},{name:"n",colors:xd({hue:t.hue,chroma:.1})}]);e.addStyle(c,"inploi-chatbot-theme"),en(R(Hv,{apiClient:n,logger:r,analytics:o}),a),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;s(),r.info("Chatbot plugin prepared")}catch(a){console.error(a),r.error("Error preparing chatbot plugin",a)}},startApplication:async({jobId:a})=>{if(!(typeof window>"u"))try{ne.cancel(),pf(()=>{rt.value="maximised",ne.current$.value={state:"loading"}}),dg({jobId:a,apiClient:n,logger:r}).then(async c=>{c.ok?(await o.log({event:"APPLY_START",properties:{job_id:a,flow_id:c.value.flow.id}}).catch(r.error),ne.start(c.value)):ne.current$.value={state:"error",error:c.error}}),i||s()}catch(c){console.error(c),r.error("Error starting application",c)}},closeApplication:async()=>{typeof window>"u"||(r.info("Closing application from an external source"),ne.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=ab;const kd=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(r)return kd({node:r,nodes:t,stopWhen:n})},cb=({childNode:e,nodes:t})=>{const r=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(a=>a.id===o.branchId);if(!i)return!1;const s=kd({node:i,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(o=>o.id===r.nextId)},lb=({flow:e,analytics:t,logger:n,context:r,apiClient:o,getSubmissions:i,chatService:s,onFlowEnd:a,onInterpret:c})=>{const u=new AbortController,d=async(l,f)=>{const h=i();c==null||c(l,f);try{await ub({analytics:t,logger:n,apiClient:o,context:r,node:l,submissions:h,chat:{sendMessage:async p=>s.send({groupId:l.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const m=p?e.find(y=>y.id===p):cb({childNode:l,nodes:e});return m?d(m,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(p){if(p instanceof Jn)return;throw p}};return{interpret:async l=>{const f=e.find(h=>h.id===l)??vu(e);return d(f)},abort:()=>{u.abort()}}};async function ub(e){return await nt(e).with({node:{type:"text"}},pb).with({node:{type:"image"}},mb).with({node:{type:"question-text"}},vb).with({node:{type:"question-enum"}},bb).with({node:{type:"question-number"}},gb).with({node:{type:"question-boolean"}},yb).with({node:{type:"question-file"}},_b).with({node:{type:"question-address"}},wb).with({node:{type:"end-flow"}},xb).with({node:{type:"if-block"}},hb).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},fb).with({node:{type:"integration-application-submit"}},db).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function db({chat:e,next:t,node:n,logger:r,apiClient:o,submissions:i,context:s,analytics:a}){await e.userInput({type:"multiple-choice",key:void 0,config:{options:[{label:"Submit my application",value:"submit"}],maxSelected:1,minSelected:1}});const c=()=>{const d=typeof s.jobId=="string"?s.jobId:void 0,l=typeof s.flowId=="string"?s.flowId:void 0;rn(d),rn(l),d&&a.log({event:"APPLY_COMPLETE",properties:{job_id:d,flow_id:l}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const u=await o.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,type:n.data.type,ats:n.data.ats,integration_id:n.data.integrationId,anonymous_id:a.getAnonymousId(),submissions:Nv(i||{})})}).catch(d=>d);await nt(u).with({ats_data:{redirect_url:Ae.string}},async d=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const l=a.getAnonymousId(),f=new URL(d.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),c(),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"})}).with({success:!0},async()=>{c(),await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async d=>{r.error(d),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function fb({chat:e,next:t,node:n}){await e.sendMessage({type:"link",href:n.data.href,text:n.data.cta}),t(n.nextId)}async function hb({submissions:e,next:t,node:n}){const r=kb(n,e)?n.branchId:n.nextId;t(r)}async function pb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.text}),t(n.nextId)}async function mb({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 vb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"text",config:{placeholder:n.data.placeholder,format:n.data.format}});await e.sendMessage({author:"user",type:"text",text:r.value}),t(n.nextId)}async function gb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"text",config:{placeholder:n.data.placeholder,format:"text"}});await e.sendMessage({author:"user",type:"text",text:r.value}),t(n.nextId)}async function bb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const r=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>r.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function yb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value,i={true:n.data.trueLabel,false:n.data.falseLabel};await e.sendMessage({author:"user",type:"text",text:i[o]}),t(n.nextId)}async function wb({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"text",text:"Address questions are not implemented yet"}),t(n.nextId)}async function _b({node:e,chat:t,next:n}){await t.sendMessage({author:"bot",type:"text",text:e.data.question});const r=await t.userInput({key:e.data.key,type:"file",config:{extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});for await(const o of r.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function xb({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage||"Conversation finished"}),t()}const $d=Ae.union(Ae.string,Ae.array(Ae.string)),kb=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?nt({...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:$d}},({compareValue:r,answer:o})=>o.value.includes(r)).with({compare:"notContains",answer:{value:$d}},({compareValue:r,answer:o})=>!o.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},ko=({class:e,...t})=>b("button",{class:Xt("bg-accent-7 active:bg-accent-10 active:text-accent-2 text-lowest pointer-coarse:touch-hitbox focus-visible:ring-accent-7/50 flex-shrink-0 rounded-full p-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[b("title",{children:"Send"}),b("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),b("path",{d:"M8 4V13"})]})}),Is=()=>{const e=U(null);return G(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Sd=["true","false"],$b=eg(Sd),Sb="answer",Mb=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=Is();return n(),b("form",{noValidate:!0,class:"flex items-center gap-2",onSubmit:o=>{o.preventDefault();const i=nt(o).with({nativeEvent:{submitter:Ae.select(Ae.union(Ae.instanceOf(HTMLButtonElement),Ae.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=rs($b,i);t(s)},children:Sd.map((o,i)=>b("button",{ref:i===0?r:null,type:"submit",name:Sb,value:o,class:"bg-lowest ease-expo-out ring-neutral-12/5 text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr duration-snappy block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:b("p",{class:"truncate text-center text-base",children:e.config.labels[o]})}))})},Fs=({error:e,onAnimationComplete:t})=>b(to,{children:e&&b(Kn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},onAnimationComplete:t,role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full p-0.5 px-1 opacity-0",children:[b("svg",{class:"text-error-10",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),b("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),b("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),b("p",{class:"truncate pr-1 text-sm",children:e.message})]})}),Tb=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}),$o=e=>nt(e).with(Ae.number.lte(1e3),()=>`${Math.round(e)}KB`).with(Ae.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Cb=e=>e.reduce((t,n)=>t+n.sizeKb,0),Ab=ts("file"),Md=3,Pb=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${r}$`),"");return b("div",{class:Xt("bg-accent-1 outline-neutral-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...n,children:[b("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[b("span",{class:"block truncate",children:o}),b("span",{children:[".",r]})]}),b("p",{"aria-label":"File size",class:"text-neutral-10",children:$o(e.sizeKb)})]})},Td=({class:e,...t})=>b("li",{class:Xt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Eb=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=(l=ne.current$.value.application)==null?void 0:l.data.submissions[e.key],[o,i]=ae(Ab(r)?r.value:[]),[s,a]=ae(),c=o.length-Md,u=Cb(o),d=Is();return b("form",{class:"flex flex-col gap-1",onSubmit:f=>(f.preventDefault(),a(void 0),o.length===0?a({type:"required",message:"Please select a file"}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${$o(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&o.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(o)),children:[b("div",{class:"flex items-center gap-2",children:[b("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:[o.length>0?b(ue,{children:[b("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[o.slice(0,Md).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return b(Td,{class:"flex overflow-hidden",children:[b("span",{class:"block truncate",children:p}),b("span",{children:[".",h]})]})}),c>0?b(Td,{children:["+",c," file",c!==1?"s":""]}):null]}),b("p",{class:"text-neutral-11 text-xs",children:[$o(u)," ",o.length>1?"total":""]})]}):b("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[b("header",{class:"flex flex-col items-center gap-0",children:[b("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:b("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"})}),b("p",{class:"text-neutral-12 tracking-[-0.01em] dark:text-gray-400",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?b("p",{class:"text-neutral-10 text-xs",children:["(max ",$o(e.config.fileSizeLimitKib),")"]}):null]}),b("aside",{class:"flex flex-col items-center gap-2",children:[b("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),b("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>b("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(".","")}))})]})]}),b("input",{id:"dropzone-file",onInput:async f=>{rn(f.target instanceof HTMLInputElement);const h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async y=>{const x=await Tb(y);return{name:y.name,data:x,sizeKb:y.size/1e3}}));if(p.some(({status:y})=>y==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=p.map(y=>y.status==="fulfilled"?y.value:null).filter(Boolean);i(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),b(ko,{disabled:o.length===0})]}),s&&b(Fs,{onAnimationComplete:n,error:s})]})};var lr=e=>e.type==="checkbox",Mn=e=>e instanceof Date,Me=e=>e==null;const Cd=e=>typeof e=="object";var fe=e=>!Me(e)&&!Array.isArray(e)&&Cd(e)&&!Mn(e),Vb=e=>fe(e)&&e.target?lr(e.target)?e.target.checked:e.target.value:e,Ob=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Lb=(e,t)=>e.has(Ob(t)),Nb=e=>{const t=e.constructor&&e.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Ds=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ct(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(!(Ds&&(e instanceof Blob||e instanceof FileList))&&(n||fe(e)))if(t=n?[]:{},!n&&!Nb(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ct(e[r]));else return e;return t}var ur=e=>Array.isArray(e)?e.filter(Boolean):[],ie=e=>e===void 0,O=(e,t,n)=>{if(!t||!fe(e))return n;const r=ur(t.split(/[,[\].]+?/)).reduce((o,i)=>Me(o)?o:o[i],e);return ie(r)||r===e?ie(e[t])?n:e[t]:r},Tt=e=>typeof e=="boolean";const Ad={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ze={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},lt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};De.createContext(null);var Rb=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==ze.all&&(t._proxyFormState[s]=!r||ze.all),n&&(n[s]=!0),e[s]}});return o},Oe=e=>fe(e)&&!Object.keys(e).length,Ib=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Oe(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||ze.all))},zs=e=>Array.isArray(e)?e:[e];function Fb(e){const t=De.useRef(e);t.current=e,De.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ye=e=>typeof e=="string",Db=(e,t,n,r,o)=>Ye(e)?(r&&t.watch.add(e),O(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),O(n,i))):(r&&(t.watchAll=!0),n),Bs=e=>/^\w*$/.test(e),Pd=e=>ur(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Q(e,t,n){let r=-1;const o=Bs(t)?[t]:Pd(t),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let c=n;if(r!==s){const u=e[a];c=fe(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}e[a]=c,e=e[a]}return e}var Ed=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Vd=e=>({isOnSubmit:!e||e===ze.onSubmit,isOnBlur:e===ze.onBlur,isOnChange:e===ze.onChange,isOnAll:e===ze.all,isOnTouch:e===ze.onTouched}),Od=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const So=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=O(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else fe(a)&&So(a,t)}}};var zb=(e,t,n)=>{const r=ur(O(e,n));return Q(r,"root",t[n]),Q(e,n,r),e},js=e=>e.type==="file",Ct=e=>typeof e=="function",Mo=e=>{if(!Ds)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},To=e=>Ye(e),Hs=e=>e.type==="radio",Co=e=>e instanceof RegExp;const Ld={value:!1,isValid:!1},Nd={value:!0,isValid:!0};var Rd=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&&!ie(e[0].attributes.value)?ie(e[0].value)||e[0].value===""?Nd:{value:e[0].value,isValid:!0}:Nd:Ld}return Ld};const Id={isValid:!1,value:null};var Fd=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Id):Id;function Dd(e,t,n="validate"){if(To(e)||Array.isArray(e)&&e.every(To)||Tt(e)&&!e)return{type:n,message:To(e)?e:"",ref:t}}var Tn=e=>fe(e)&&!Co(e)?e:{value:e,message:""},zd=async(e,t,n,r,o)=>{const{ref:i,refs:s,required:a,maxLength:c,minLength:u,min:d,max:l,pattern:f,validate:h,name:p,valueAsNumber:m,mount:y,disabled:x}=e._f,g=O(t,p);if(!y||x)return{};const w=s?s[0]:i,M=j=>{r&&w.reportValidity&&(w.setCustomValidity(Tt(j)?"":j||""),w.reportValidity())},S={},I=Hs(i),N=lr(i),C=I||N,E=(m||js(i))&&ie(i.value)&&ie(g)||Mo(i)&&i.value===""||g===""||Array.isArray(g)&&!g.length,q=Ed.bind(null,p,n,S),K=(j,B,H,X=lt.maxLength,re=lt.minLength)=>{const se=j?B:H;S[p]={type:j?X:re,message:se,ref:i,...q(j?X:re,se)}};if(o?!Array.isArray(g)||!g.length:a&&(!C&&(E||Me(g))||Tt(g)&&!g||N&&!Rd(s).isValid||I&&!Fd(s).isValid)){const{value:j,message:B}=To(a)?{value:!!a,message:a}:Tn(a);if(j&&(S[p]={type:lt.required,message:B,ref:w,...q(lt.required,B)},!n))return M(B),S}if(!E&&(!Me(d)||!Me(l))){let j,B;const H=Tn(l),X=Tn(d);if(!Me(g)&&!isNaN(g)){const re=i.valueAsNumber||g&&+g;Me(H.value)||(j=re>H.value),Me(X.value)||(B=re<X.value)}else{const re=i.valueAsDate||new Date(g),se=ut=>new Date(new Date().toDateString()+" "+ut),Le=i.type=="time",Ne=i.type=="week";Ye(H.value)&&g&&(j=Le?se(g)>se(H.value):Ne?g>H.value:re>new Date(H.value)),Ye(X.value)&&g&&(B=Le?se(g)<se(X.value):Ne?g<X.value:re<new Date(X.value))}if((j||B)&&(K(!!j,H.message,X.message,lt.max,lt.min),!n))return M(S[p].message),S}if((c||u)&&!E&&(Ye(g)||o&&Array.isArray(g))){const j=Tn(c),B=Tn(u),H=!Me(j.value)&&g.length>+j.value,X=!Me(B.value)&&g.length<+B.value;if((H||X)&&(K(H,j.message,B.message),!n))return M(S[p].message),S}if(f&&!E&&Ye(g)){const{value:j,message:B}=Tn(f);if(Co(j)&&!g.match(j)&&(S[p]={type:lt.pattern,message:B,ref:i,...q(lt.pattern,B)},!n))return M(B),S}if(h){if(Ct(h)){const j=await h(g,t),B=Dd(j,w);if(B&&(S[p]={...B,...q(lt.validate,B.message)},!n))return M(B.message),S}else if(fe(h)){let j={};for(const B in h){if(!Oe(j)&&!n)break;const H=Dd(await h[B](g,t),w,B);H&&(j={...H,...q(B,H.message)},M(H.message),n&&(S[p]=j))}if(!Oe(j)&&(S[p]={ref:w,...j},!n))return S}}return M(!0),S};function Bb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ie(e)?r++:e[t[r++]];return e}function jb(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ye(e,t){const n=Array.isArray(t)?t:Bs(t)?[t]:Pd(t),r=n.length===1?e:Bb(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(fe(r)&&Oe(r)||Array.isArray(r)&&jb(r))&&ye(e,n.slice(0,-1)),e}function Us(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Ao=e=>Me(e)||!Cd(e);function Yt(e,t){if(Ao(e)||Ao(t))return e===t;if(Mn(e)&&Mn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(Mn(i)&&Mn(s)||fe(i)&&fe(s)||Array.isArray(i)&&Array.isArray(s)?!Yt(i,s):i!==s)return!1}}return!0}var Bd=e=>e.type==="select-multiple",Hb=e=>Hs(e)||lr(e),Xs=e=>Mo(e)&&e.isConnected,jd=e=>{for(const t in e)if(Ct(e[t]))return!0;return!1};function Po(e,t={}){const n=Array.isArray(e);if(fe(e)||n)for(const r in e)Array.isArray(e[r])||fe(e[r])&&!jd(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Po(e[r],t[r])):Me(e[r])||(t[r]=!0);return t}function Hd(e,t,n){const r=Array.isArray(e);if(fe(e)||r)for(const o in e)Array.isArray(e[o])||fe(e[o])&&!jd(e[o])?ie(t)||Ao(n[o])?n[o]=Array.isArray(e[o])?Po(e[o],[]):{...Po(e[o])}:Hd(e[o],Me(t)?{}:t[o],n[o]):n[o]=!Yt(e[o],t[o]);return n}var qs=(e,t)=>Hd(e,t,Po(t)),Ud=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ie(e)?e:t?e===""?NaN:e&&+e:n&&Ye(e)?new Date(e):r?r(e):e;function Ws(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return js(t)?t.files:Hs(t)?Fd(e.refs).value:Bd(t)?[...t.selectedOptions].map(({value:n})=>n):lr(t)?Rd(e.refs).value:Ud(ie(t.value)?e.ref.value:t.value,e)}var Ub=(e,t,n,r)=>{const o={};for(const i of e){const s=O(t,i);s&&Q(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},dr=e=>ie(e)?e:Co(e)?e.source:fe(e)?Co(e.value)?e.value.source:e.value:e,Xb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Xd(e,t,n){const r=O(e,n);if(r||Bs(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=O(t,i),a=O(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var qb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Wb=(e,t)=>!ur(O(e,t)).length&&ye(e,t);const Kb={mode:ze.onSubmit,reValidateMode:ze.onChange,shouldFocusError:!0};function Yb(e={},t){let n={...Kb,...e},r={submitCount:0,isDirty:!1,isLoading:Ct(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=fe(n.defaultValues)||fe(n.values)?ct(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:ct(i),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Us(),array:Us(),state:Us()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Vd(n.mode),m=Vd(n.reValidateMode),y=n.criteriaMode===ze.all,x=v=>_=>{clearTimeout(d),d=setTimeout(v,_)},g=async v=>{if(l.isValid||v){const _=n.resolver?Oe((await E()).errors):await K(o,!0);_!==r.isValid&&f.state.next({isValid:_})}},w=v=>l.isValidating&&f.state.next({isValidating:v}),M=(v,_=[],k,L,P=!0,T=!0)=>{if(L&&k){if(a.action=!0,T&&Array.isArray(O(o,v))){const F=k(O(o,v),L.argA,L.argB);P&&Q(o,v,F)}if(T&&Array.isArray(O(r.errors,v))){const F=k(O(r.errors,v),L.argA,L.argB);P&&Q(r.errors,v,F),Wb(r.errors,v)}if(l.touchedFields&&T&&Array.isArray(O(r.touchedFields,v))){const F=k(O(r.touchedFields,v),L.argA,L.argB);P&&Q(r.touchedFields,v,F)}l.dirtyFields&&(r.dirtyFields=qs(i,s)),f.state.next({name:v,isDirty:B(v,_),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Q(s,v,_)},S=(v,_)=>{Q(r.errors,v,_),f.state.next({errors:r.errors})},I=(v,_,k,L)=>{const P=O(o,v);if(P){const T=O(s,v,ie(k)?O(i,v):k);ie(T)||L&&L.defaultChecked||_?Q(s,v,_?T:Ws(P._f)):re(v,T),a.mount&&g()}},N=(v,_,k,L,P)=>{let T=!1,F=!1;const ee={name:v};if(!k||L){l.isDirty&&(F=r.isDirty,r.isDirty=ee.isDirty=B(),T=F!==ee.isDirty);const le=Yt(O(i,v),_);F=O(r.dirtyFields,v),le?ye(r.dirtyFields,v):Q(r.dirtyFields,v,!0),ee.dirtyFields=r.dirtyFields,T=T||l.dirtyFields&&F!==!le}if(k){const le=O(r.touchedFields,v);le||(Q(r.touchedFields,v,k),ee.touchedFields=r.touchedFields,T=T||l.touchedFields&&le!==k)}return T&&P&&f.state.next(ee),T?ee:{}},C=(v,_,k,L)=>{const P=O(r.errors,v),T=l.isValid&&Tt(_)&&r.isValid!==_;if(e.delayError&&k?(u=x(()=>S(v,k)),u(e.delayError)):(clearTimeout(d),u=null,k?Q(r.errors,v,k):ye(r.errors,v)),(k?!Yt(P,k):P)||!Oe(L)||T){const F={...L,...T&&Tt(_)?{isValid:_}:{},errors:r.errors,name:v};r={...r,...F},f.state.next(F)}w(!1)},E=async v=>n.resolver(s,n.context,Ub(v||c.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),q=async v=>{const{errors:_}=await E(v);if(v)for(const k of v){const L=O(_,k);L?Q(r.errors,k,L):ye(r.errors,k)}else r.errors=_;return _},K=async(v,_,k={valid:!0})=>{for(const L in v){const P=v[L];if(P){const{_f:T,...F}=P;if(T){const ee=c.array.has(T.name),le=await zd(P,s,y,n.shouldUseNativeValidation&&!_,ee);if(le[T.name]&&(k.valid=!1,_))break;!_&&(O(le,T.name)?ee?zb(r.errors,le,T.name):Q(r.errors,T.name,le[T.name]):ye(r.errors,T.name))}F&&await K(F,_,k)}}return k.valid},j=()=>{for(const v of c.unMount){const _=O(o,v);_&&(_._f.refs?_._f.refs.every(k=>!Xs(k)):!Xs(_._f.ref))&&Ze(v)}c.unMount=new Set},B=(v,_)=>(v&&_&&Q(s,v,_),!Yt(Re(),i)),H=(v,_,k)=>Db(v,c,{...a.mount?s:ie(_)?i:Ye(v)?{[v]:_}:_},k,_),X=v=>ur(O(a.mount?s:i,v,e.shouldUnregister?O(i,v,[]):[])),re=(v,_,k={})=>{const L=O(o,v);let P=_;if(L){const T=L._f;T&&(!T.disabled&&Q(s,v,Ud(_,T)),P=Mo(T.ref)&&Me(_)?"":_,Bd(T.ref)?[...T.ref.options].forEach(F=>F.selected=P.includes(F.value)):T.refs?lr(T.ref)?T.refs.length>1?T.refs.forEach(F=>(!F.defaultChecked||!F.disabled)&&(F.checked=Array.isArray(P)?!!P.find(ee=>ee===F.value):P===F.value)):T.refs[0]&&(T.refs[0].checked=!!P):T.refs.forEach(F=>F.checked=F.value===P):js(T.ref)?T.ref.value="":(T.ref.value=P,T.ref.type||f.values.next({name:v,values:{...s}})))}(k.shouldDirty||k.shouldTouch)&&N(v,P,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&Y(v)},se=(v,_,k)=>{for(const L in _){const P=_[L],T=`${v}.${L}`,F=O(o,T);(c.array.has(v)||!Ao(P)||F&&!F._f)&&!Mn(P)?se(T,P,k):re(T,P,k)}},Le=(v,_,k={})=>{const L=O(o,v),P=c.array.has(v),T=ct(_);Q(s,v,T),P?(f.array.next({name:v,values:{...s}}),(l.isDirty||l.dirtyFields)&&k.shouldDirty&&f.state.next({name:v,dirtyFields:qs(i,s),isDirty:B(v,T)})):L&&!L._f&&!Me(T)?se(v,T,k):re(v,T,k),Od(v,c)&&f.state.next({...r}),f.values.next({name:v,values:{...s}}),!a.mount&&t()},Ne=async v=>{const _=v.target;let k=_.name,L=!0;const P=O(o,k),T=()=>_.type?Ws(P._f):Vb(v),F=ee=>{L=Number.isNaN(ee)||ee===O(s,k,ee)};if(P){let ee,le;const Lo=T(),Cn=v.type===Ad.BLUR||v.type===Ad.FOCUS_OUT,xy=!Xb(P._f)&&!n.resolver&&!O(r.errors,k)&&!P._f.deps||qb(Cn,O(r.touchedFields,k),r.isSubmitted,m,p),Ks=Od(k,c,Cn);Q(s,k,Lo),Cn?(P._f.onBlur&&P._f.onBlur(v),u&&u(0)):P._f.onChange&&P._f.onChange(v);const Ys=N(k,Lo,Cn,!1),ky=!Oe(Ys)||Ks;if(!Cn&&f.values.next({name:k,type:v.type,values:{...s}}),xy)return l.isValid&&g(),ky&&f.state.next({name:k,...Ks?{}:Ys});if(!Cn&&Ks&&f.state.next({...r}),w(!0),n.resolver){const{errors:ef}=await E([k]);if(F(Lo),L){const $y=Xd(r.errors,o,k),tf=Xd(ef,o,$y.name||k);ee=tf.error,k=tf.name,le=Oe(ef)}}else ee=(await zd(P,s,y,n.shouldUseNativeValidation))[k],F(Lo),L&&(ee?le=!1:l.isValid&&(le=await K(o,!0)));L&&(P._f.deps&&Y(P._f.deps),C(k,le,ee,Ys))}},ut=(v,_)=>{if(O(r.errors,_)&&v.focus)return v.focus(),1},Y=async(v,_={})=>{let k,L;const P=zs(v);if(w(!0),n.resolver){const T=await q(ie(v)?v:P);k=Oe(T),L=v?!P.some(F=>O(T,F)):k}else v?(L=(await Promise.all(P.map(async T=>{const F=O(o,T);return await K(F&&F._f?{[T]:F}:F)}))).every(Boolean),!(!L&&!r.isValid)&&g()):L=k=await K(o);return f.state.next({...!Ye(v)||l.isValid&&k!==r.isValid?{}:{name:v},...n.resolver||!v?{isValid:k}:{},errors:r.errors,isValidating:!1}),_.shouldFocus&&!L&&So(o,ut,v?P:c.mount),L},Re=v=>{const _={...i,...a.mount?s:{}};return ie(v)?_:Ye(v)?O(_,v):v.map(k=>O(_,k))},At=(v,_)=>({invalid:!!O((_||r).errors,v),isDirty:!!O((_||r).dirtyFields,v),isTouched:!!O((_||r).touchedFields,v),error:O((_||r).errors,v)}),Pt=v=>{v&&zs(v).forEach(_=>ye(r.errors,_)),f.state.next({errors:v?r.errors:{}})},Gt=(v,_,k)=>{const L=(O(o,v,{_f:{}})._f||{}).ref;Q(r.errors,v,{..._,ref:L}),f.state.next({name:v,errors:r.errors,isValid:!1}),k&&k.shouldFocus&&L&&L.focus&&L.focus()},Ge=(v,_)=>Ct(v)?f.values.subscribe({next:k=>v(H(void 0,_),k)}):H(v,_,!0),Ze=(v,_={})=>{for(const k of v?zs(v):c.mount)c.mount.delete(k),c.array.delete(k),_.keepValue||(ye(o,k),ye(s,k)),!_.keepError&&ye(r.errors,k),!_.keepDirty&&ye(r.dirtyFields,k),!_.keepTouched&&ye(r.touchedFields,k),!n.shouldUnregister&&!_.keepDefaultValue&&ye(i,k);f.values.next({values:{...s}}),f.state.next({...r,..._.keepDirty?{isDirty:B()}:{}}),!_.keepIsValid&&g()},Vo=({disabled:v,name:_,field:k,fields:L,value:P})=>{if(Tt(v)){const T=v?void 0:ie(P)?Ws(k?k._f:O(L,_)._f):P;Q(s,_,T),N(_,T,!1,!1,!0)}},Zt=(v,_={})=>{let k=O(o,v);const L=Tt(_.disabled);return Q(o,v,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:v}},name:v,mount:!0,..._}}),c.mount.add(v),k?Vo({field:k,disabled:_.disabled,name:v}):I(v,!0,_.value),{...L?{disabled:_.disabled}:{},...n.progressive?{required:!!_.required,min:dr(_.min),max:dr(_.max),minLength:dr(_.minLength),maxLength:dr(_.maxLength),pattern:dr(_.pattern)}:{},name:v,onChange:Ne,onBlur:Ne,ref:P=>{if(P){Zt(v,_),k=O(o,v);const T=ie(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,F=Hb(T),ee=k._f.refs||[];if(F?ee.find(le=>le===T):T===k._f.ref)return;Q(o,v,{_f:{...k._f,...F?{refs:[...ee.filter(Xs),T,...Array.isArray(O(i,v))?[{}]:[]],ref:{type:T.type,name:v}}:{ref:T}}}),I(v,!1,void 0,T)}else k=O(o,v,{}),k._f&&(k._f.mount=!1),(n.shouldUnregister||_.shouldUnregister)&&!(Lb(c.array,v)&&a.action)&&c.unMount.add(v)}}},Jt=()=>n.shouldFocusError&&So(o,ut,c.mount),dt=v=>{Tt(v)&&(f.state.next({disabled:v}),So(o,_=>{_.disabled=v},0,!1))},fr=(v,_)=>async k=>{k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let L=ct(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:T}=await E();r.errors=P,L=T}else await K(o);ye(r.errors,"root"),Oe(r.errors)?(f.state.next({errors:{}}),await v(L,k)):(_&&await _({...r.errors},k),Jt(),setTimeout(Jt)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Oe(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Oo=(v,_={})=>{O(o,v)&&(ie(_.defaultValue)?Le(v,O(i,v)):(Le(v,_.defaultValue),Q(i,v,_.defaultValue)),_.keepTouched||ye(r.touchedFields,v),_.keepDirty||(ye(r.dirtyFields,v),r.isDirty=_.defaultValue?B(v,O(i,v)):B()),_.keepError||(ye(r.errors,v),l.isValid&&g()),f.state.next({...r}))},Jd=(v,_={})=>{const k=v?ct(v):i,L=ct(k),P=v&&!Oe(v)?L:i;if(_.keepDefaultValues||(i=k),!_.keepValues){if(_.keepDirtyValues||h)for(const T of c.mount)O(r.dirtyFields,T)?Q(P,T,O(s,T)):Le(T,O(P,T));else{if(Ds&&ie(v))for(const T of c.mount){const F=O(o,T);if(F&&F._f){const ee=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Mo(ee)){const le=ee.closest("form");if(le){le.reset();break}}}}o={}}s=e.shouldUnregister?_.keepDefaultValues?ct(i):{}:ct(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!l.isValid||!!_.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:_.keepSubmitCount?r.submitCount:0,isDirty:_.keepDirty?r.isDirty:!!(_.keepDefaultValues&&!Yt(v,i)),isSubmitted:_.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:_.keepDirtyValues?r.dirtyFields:_.keepDefaultValues&&v?qs(i,v):{},touchedFields:_.keepTouched?r.touchedFields:{},errors:_.keepErrors?r.errors:{},isSubmitSuccessful:_.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Qd=(v,_)=>Jd(Ct(v)?v(s):v,_);return{control:{register:Zt,unregister:Ze,getFieldState:At,handleSubmit:fr,setError:Gt,_executeSchema:E,_getWatch:H,_getDirty:B,_updateValid:g,_removeUnmounted:j,_updateFieldArray:M,_updateDisabledField:Vo,_getFieldArray:X,_reset:Jd,_resetDefaultValues:()=>Ct(n.defaultValues)&&n.defaultValues().then(v=>{Qd(v,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:v=>{r={...r,...v}},_disableForm:dt,_subjects:f,_proxyFormState:l,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(v){a=v},get _defaultValues(){return i},get _names(){return c},set _names(v){c=v},get _formState(){return r},set _formState(v){r=v},get _options(){return n},set _options(v){n={...n,...v}}},trigger:Y,register:Zt,handleSubmit:fr,watch:Ge,setValue:Le,getValues:Re,reset:Qd,resetField:Oo,clearErrors:Pt,unregister:Ze,setError:Gt,setFocus:(v,_={})=>{const k=O(o,v),L=k&&k._f;if(L){const P=L.refs?L.refs[0]:L.ref;P.focus&&(P.focus(),_.shouldSelect&&P.select())}},getFieldState:At}}function qd(e={}){const t=De.useRef(),n=De.useRef(),[r,o]=De.useState({isDirty:!1,isValidating:!1,isLoading:Ct(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ct(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Yb(e,()=>o(s=>({...s}))),formState:r});const i=t.current.control;return i._options=e,Fb({subject:i._subjects.state,next:s=>{Ib(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),De.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),De.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),De.useEffect(()=>{e.values&&!Yt(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values):i._resetDefaultValues()},[e.values,i]),De.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Rb(r,i),t.current}var Wd=function(e,t,n){if(e&&"reportValidity"in e){var r=O(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Gb=function(e,t){var n=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?Wd(i.ref,o,e):i.refs&&i.refs.forEach(function(s){return Wd(s,o,e)})};for(var r in t.fields)n(r)},Zb=function(e,t){t.shouldUseNativeValidation&&Gb(e,t);var n={};for(var r in e){var o=O(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(Qb(t.names||Object.keys(e),r)){var s=Object.assign({},Jb(O(n,r)));Q(s,"root",i),Q(n,r,s)}else Q(n,r,i)}return n},Jb=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Qb=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},ey=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var o=r.path.map(function(a){return a.key}).join(".");if(n[o]||(n[o]={message:r.message,type:r.validation}),t){var i=n[o].types,s=i&&i[r.validation];n[o]=Ed(o,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Kd=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve(function(s,a){try{var c=function(){function u(l){return{values:n.raw?r:l,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(rs(e,r,d)):Promise.resolve(og(e,r,d)).then(u)}()}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(s){if(s instanceof so)return{values:{},errors:Zb(ey(s,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const ty=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},ny=ts("multiple-choice"),ry=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Kd(bn({checked:ku(rg(Zv()),n=>Object.entries(n).filter(([r,o])=>o).map(([r,o])=>r),[ag(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),$u(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},oy=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=ne.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:s}}=qd({defaultValues:{checked:ny(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:ry(e.config)}),a=Is(),c=e.config.minSelected===1&&e.config.maxSelected===1;return b("form",{noValidate:!0,class:"flex flex-col gap-1",onChange:l=>{c&&ty(l.currentTarget)},onSubmit:i(l=>{const f=l.checked;t(f)}),children:[b("div",{class:"flex items-center gap-2",children:[b("div",{class:Xt("flex w-full flex-1 flex-wrap gap-3 p-1",{"justify-center":e.config.options.length===1}),children:e.config.options.map((l,f)=>{const h=`checked.${l.value}`,{ref:p,...m}=o(h);return b("div",{children:[b("input",{autoFocus:f===0,ref:y=>{y&&f===0&&(a.current=y),p(y)},id:h,...m,class:"peer sr-only",type:"checkbox"}),b("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-neutral-12/5 text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 duration-snappy 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:l.label})]},l.value)})}),!c&&b(ko,{})]}),b(Fs,{onAnimationComplete:n,error:(d=s.checked)==null?void 0:d.root})]})},Eo={email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number"},iy=We(Eo.phone,[cg(/^\+?[0-9 -]+$/,Eo.phone)]),sy={email:We(Eo.email,[sg(Eo.email)]),phone:ku(iy,e=>e.replace(/[^0-9]/g,"")),text:We([$u(1,"Please enter some text")]),url:We([lg("That doesn’t look like a valid URL")])},ay={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},cy=ts("text"),ly=e=>Kd(bn({text:sy[e.format]})),uy=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var d;const r=e.key?(d=ne.current$.value.application)==null?void 0:d.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:s}}=qd({defaultValues:{text:cy(r)?r.value:""},resolver:ly(e.config)}),{ref:a,...c}=o("text",{required:!0}),u=U();return Be(()=>{u.current&&(u.current.focus(),u.current.select())},[]),b("form",{noValidate:!0,class:"flex flex-col gap-1",onSubmit:i(l=>{t(l.text)}),children:[b("div",{class:"flex items-center gap-2",children:[b("input",{id:"chat-input",...c,...ay[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:l=>{l&&(u.current=l),a(l)},class:"outline-neutral-12/5 ease-expo-out placeholder:text-neutral-5 focus-visible:outline-accent-7 caret-accent-9 duration-snappy flex-grow rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),b(ko,{})]}),b(Fs,{onAnimationComplete:n,error:s.text})]})},dy=({onSubmit:e,onInputChange:t,input:n})=>{const r=U(null),o=me(()=>{r.current&&(ns.value=r.current.getBoundingClientRect().height)},[]);G(()=>{o(),t(n==null?void 0:n.type)},[n==null?void 0:n.type,t,o]);const i=s=>a=>e({type:s,value:a});return b(Kn.div,{initial:{height:0},animate:{height:ns.value},exit:{height:0,opacity:0},class:"bg-neutral-2/80 absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:b("div",{ref:r,class:"border-neutral-12/5 border-t p-2.5",children:nt({application:ne,input:n,onHeightChange:o}).with({input:Ae.nullish},()=>b("div",{class:"flex items-center gap-2",children:[b("input",{"aria-hidden":"true",id:"chat-input",class:"outline-neutral-12/5 placeholder:text-neutral-4 focus-visible:outline-accent-9 caret-accent-9 flex-grow rounded-full px-3 py-1 text-base outline outline-2",disabled:!0}),b(ko,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>b(uy,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>b(oy,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"boolean"}},s=>b(Mb,{onSubmitSuccess:i(s.input.type),...s})).with({input:{type:"file"}},s=>b(Eb,{onSubmitSuccess:i(s.input.type),...s})).exhaustive()})})},Yd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Gd=Xt,Zd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Gd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],l=i==null?void 0:i[u];if(d===null)return null;const f=Yd(d)||Yd(l);return o[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...h}=d;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...u,l,f]:u},[]);return Gd(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},fy=Zd("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink-1 min-w-[2rem] text-md py-2 px-3 rounded-[18px] min-h-[36px] break-words",{variants:{side:{left:"bg-lowest text-neutral-12 shadow-surface-sm outline outline-1 outline-neutral-11/[.08] rounded-bl-md",right:"ml-auto bg-accent-7 text-lowest rounded-br-md bubble-right"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),hy={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},py=({children:e,className:t,transitionState:n,side:r,...o})=>b(Kn.p,{variants:hy,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:fy({className:t,side:r,transitionState:n}),...o,children:e}),my=({className:e,...t})=>b("div",{"aria-label":"Typing…",class:Xt("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>b("div",{class:"bg-accent-7 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}),vy={bot:"left",user:"right"},gy=Zd("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_white]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),by=({messages:e,isBotTyping:t})=>b("ol",{"aria-label":"Chat messages",class:"flex flex-grow flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[b(to,{initial:!1,children:e.map((n,r)=>b("li",{class:"flex",children:nt(n).with({type:"system"},o=>b("p",{class:gy({variant:o.variant}),children:o.text})).with({type:"text",author:Ae.union("bot","user")},o=>b(py,{side:vy[o.author],children:o.text},r)).with({type:"link"},o=>b("div",{class:"bg-accent-8/5 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",children:b("a",{class:"bg-lowest shadow-surface-sm ring-accent-8/20 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 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,b("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("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=>b("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=>b(Pb,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()},r))}),b("aside",{"aria-hidden":!0,children:t&&b(my,{})})]}),yy=25,wy=()=>{const e=U(null),[t,n]=ae(!1),[r,o]=ae(()=>()=>{}),i=de(()=>a=>{var c;return(c=e.current)==null?void 0:c.scrollTo({top:e.current.scrollHeight,...a})},[e]),s=de(()=>({send:async({message:a,signal:c,groupId:u})=>{if(await nt(a).with({author:"bot",type:"text"},async d=>{if(c!=null&&c.aborted)throw new Jn;n(!0);const l=Math.min(Math.max(20,d.text.length),100)*yy;await new Promise(f=>setTimeout(f,l,{signal:c})),n(!1)}).otherwise(async()=>{}),c!=null&&c.aborted)throw new Jn;ne.addMessage(a,u)},input:async({input:a,signal:c})=>{if(c!=null&&c.aborted)throw new Jn;return ne.setInput(a),await new Promise(u=>{const d=l=>{if(c!=null&&c.aborted)throw new Jn;ne.setInput(void 0),a.key&&ne.setSubmission(a.key,l),u(l)};o(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:r,scrollToEnd:i}},_y=Object.freeze(Object.defineProperty({__proto__:null,JobApplicationContent:({currentApplication:e,logger:t,apiClient:n,analytics:r})=>{const{chatRef:o,chatService:i,isBotTyping:s,onSubmitSuccessFn:a,scrollToEnd:c}=wy(),u=rt.value,d=e.flow,l=e.job;return Be(()=>{u==="maximised"&&c({behavior:"instant"})},[c,u]),G(()=>{c({behavior:"smooth"})},[e.data.messages,c]),Be(()=>{const{state:f,application:h}=ne.current$.peek();if(f!=="loaded")throw new Error(Vv.invalid_state);const p=h.data.currentNodeId;if(c({behavior:"instant"}),ne.setInput(void 0),h.data.isFinished)return;ne.removeLastGroupMessagesById(p);const{interpret:m,abort:y}=lb({context:{jobId:l.id,flowId:d.id},analytics:r,apiClient:n,logger:t,flow:d.nodes,chatService:i,getSubmissions:()=>{var x;return(x=ne.current$.peek().application)==null?void 0:x.data.submissions},onInterpret:(x,g)=>{const w=ne.current$.peek().application;rn(w),w.data.sequence=w.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:d.id,flow_version:d.version,job_id:l.id,from_node_id:g?g.id:null,to_node_id:x.id,sequence:w.data.sequence,flow_session_id:w.data.flowSessionId}}),ne.setCurrentNodeId(x.id)},onFlowEnd:async()=>{ne.markAsFinished()}});return m(p),y},[r,n,i,t,c,d,l.id,e.startedAt]),b(ue,{children:[b("div",{ref:o,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:ns.value},children:b(to,{children:b(by,{isBotTyping:s,messages:e.data.messages})})}),b(dy,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();