deskcord 0.8.2 → 0.9.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.
@@ -1,4 +1,4 @@
1
- (function(){"use strict";var wn,j,js,be,Hs,Ws,ci,Ks,li,ui,di,qs,vn={},Ys=[],Oh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,sr=Array.isArray;function ie(t,e){for(var n in e)t[n]=e[n];return t}function hi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function B(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?wn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return _n(t,s,r,i,null)}function _n(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++js,__i:-1,__u:0};return i==null&&j.vnode!=null&&j.vnode(o),o}function Gs(){return{current:null}}function tt(t){return t.children}function Nt(t,e){this.props=t,this.context=e}function Ue(t,e){if(e==null)return t.__?Ue(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Ue(t):null}function Xs(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Xs(t)}}function fi(t){(!t.__d&&(t.__d=!0)&&be.push(t)&&!ar.__r++||Hs!==j.debounceRendering)&&((Hs=j.debounceRendering)||Ws)(ar)}function ar(){var t,e,n,r,i,o,s,a;for(be.sort(ci);t=be.shift();)t.__d&&(e=be.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ie({},i)).__v=i.__v+1,j.vnode&&j.vnode(r),pi(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ue(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,ea(s,r,a),r.__e!=o&&Xs(r)),be.length>e&&be.sort(ci));ar.__r=0}function Zs(t,e,n,r,i,o,s,a,c,h,l){var f,m,g,_,v,x,b=r&&r.__k||Ys,k=e.length;for(c=Fh(n,e,b,c,k),f=0;f<k;f++)(g=n.__k[f])!=null&&(m=g.__i===-1?vn:b[g.__i]||vn,g.__i=f,x=pi(t,g,m,i,o,s,a,c,h,l),_=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&mi(m.ref,null,g),l.push(g.ref,g.__c||_,g)),v==null&&_!=null&&(v=_),4&g.__u||m.__k===g.__k?c=Js(g,c,t):typeof g.type=="function"&&x!==void 0?c=x:_&&(c=_.nextSibling),g.__u&=-7);return n.__e=v,c}function Fh(t,e,n,r,i){var o,s,a,c,h,l=n.length,f=l,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?_n(null,s,null,null,null):sr(s)?_n(tt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?_n(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(h=s.__i=Vh(s,n,c,f))!==-1&&(f--,(a=n[h])&&(a.__u|=2)),a==null||a.__v===null?(h==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):h!=c&&(h==c-1?m--:h==c+1?m++:(h>c?m--:m++,s.__u|=4))):t.__k[o]=null;if(f)for(o=0;o<l;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=Ue(a)),na(a,a));return r}function Js(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Js(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Ue(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function oe(t,e){return e=e||[],t==null||typeof t=="boolean"||(sr(t)?t.some(function(n){oe(n,e)}):e.push(t)),e}function Vh(t,e,n,r){var i,o,s=t.key,a=t.type,c=e[n];if(c===null||c&&s==c.key&&a===c.type&&!(2&c.__u))return n;if(r>(c!=null&&!(2&c.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((c=e[i])&&!(2&c.__u)&&s==c.key&&a===c.type)return i;i--}if(o<e.length){if((c=e[o])&&!(2&c.__u)&&s==c.key&&a===c.type)return o;o++}}return-1}function Qs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Oh.test(e)?n:n+"px"}function cr(t,e,n,r,i){var o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Qs(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Qs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ks,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=li,t.addEventListener(e,o?di:ui,o)):t.removeEventListener(e,o?di:ui,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ta(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=li++;else if(e.t<n.u)return;return n(j.event?j.event(e):e)}}}function pi(t,e,n,r,i,o,s,a,c,h){var l,f,m,g,_,v,x,b,k,E,I,T,R,N,P,M,D,O=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=e.__e=n.__e]),(l=j.__b)&&l(e);t:if(typeof O=="function")try{if(b=e.props,k="prototype"in O&&O.prototype.render,E=(l=O.contextType)&&r[l.__c],I=l?E?E.props.value:l.__:r,n.__c?x=(f=e.__c=n.__c).__=f.__E:(k?e.__c=f=new O(b,I):(e.__c=f=new Nt(b,I),f.constructor=O,f.render=$h),E&&E.sub(f),f.props=b,f.state||(f.state={}),f.context=I,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),k&&f.__s==null&&(f.__s=f.state),k&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ie({},f.__s)),ie(f.__s,O.getDerivedStateFromProps(b,f.__s))),g=f.props,_=f.state,f.__v=e,m)k&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),k&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(k&&O.getDerivedStateFromProps==null&&b!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(b,I),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(b,f.__s,I)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(f.props=b,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(J){J&&(J.__=e)}),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[],f.__h.length&&s.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(b,f.__s,I),k&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,_,v)})}if(f.context=I,f.props=b,f.__P=t,f.__e=!1,R=j.__r,N=0,k){for(f.state=f.__s,f.__d=!1,R&&R(e),l=f.render(f.props,f.state,f.context),P=0;P<f._sb.length;P++)f.__h.push(f._sb[P]);f._sb=[]}else do f.__d=!1,R&&R(e),l=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++N<25);f.state=f.__s,f.getChildContext!=null&&(r=ie(ie({},r),f.getChildContext())),k&&!m&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,_)),a=Zs(t,sr(M=l!=null&&l.type===tt&&l.key==null?l.props.children:l)?M:[M],e,n,r,i,o,s,a,c,h),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),x&&(f.__E=f.__=null)}catch(J){if(e.__v=null,c||o!=null)if(J.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(D=o.length;D--;)hi(o[D]);else e.__e=n.__e,e.__k=n.__k;j.__e(J,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Uh(n.__e,e,n,r,i,o,s,c,h);return(l=j.diffed)&&l(e),128&e.__u?void 0:a}function ea(t,e,n){for(var r=0;r<n.length;r++)mi(n[r],n[++r],n[++r]);j.__c&&j.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){j.__e(o,i.__v)}})}function Uh(t,e,n,r,i,o,s,a,c){var h,l,f,m,g,_,v,x=n.props,b=e.props,k=e.type;if(k=="svg"?i="http://www.w3.org/2000/svg":k=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(h=0;h<o.length;h++)if((g=o[h])&&"setAttribute"in g==!!k&&(k?g.localName==k:g.nodeType==3)){t=g,o[h]=null;break}}if(t==null){if(k==null)return document.createTextNode(b);t=document.createElementNS(i,k,b.is&&b),a&&(j.__m&&j.__m(e,o),a=!1),o=null}if(k===null)x===b||a&&t.data===b||(t.data=b);else{if(o=o&&wn.call(t.childNodes),x=n.props||vn,!a&&o!=null)for(x={},h=0;h<t.attributes.length;h++)x[(g=t.attributes[h]).name]=g.value;for(h in x)if(g=x[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=g;else if(!(h in b)){if(h=="value"&&"defaultValue"in b||h=="checked"&&"defaultChecked"in b)continue;cr(t,h,null,g,i)}}for(h in b)g=b[h],h=="children"?m=g:h=="dangerouslySetInnerHTML"?l=g:h=="value"?_=g:h=="checked"?v=g:a&&typeof g!="function"||x[h]===g||cr(t,h,g,x[h],i);if(l)a||f&&(l.__html===f.__html||l.__html===t.innerHTML)||(t.innerHTML=l.__html),e.__k=[];else if(f&&(t.innerHTML=""),Zs(t,sr(m)?m:[m],e,n,r,k=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ue(n,0),a,c),o!=null)for(h=o.length;h--;)hi(o[h]);a||(h="value",k=="progress"&&_==null?t.removeAttribute("value"):_!==void 0&&(_!==t[h]||k=="progress"&&!_||k=="option"&&_!==x[h])&&cr(t,h,_,x[h],i),h="checked",v!==void 0&&v!==t[h]&&cr(t,h,v,x[h],i))}return t}function mi(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){j.__e(i,n)}}function na(t,e,n){var r,i;if(j.unmount&&j.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||mi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){j.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&na(r[i],e,n||typeof t.type!="function");n||hi(t.__e),t.__c=t.__=t.__e=void 0}function $h(t,e,n){return this.constructor(t,n)}function bn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),j.__&&j.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],pi(e,t=(!r&&n||e).__k=B(tt,null,[t]),i||vn,vn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?wn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),ea(o,t,s)}function ra(t,e){bn(t,e,ra)}function zh(t,e,n){var r,i,o,s,a=ie({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!==void 0?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?wn.call(arguments,2):n),_n(t.type,a,r||t.key,i||t.ref,null)}function At(t,e){var n={__c:e="__cC"+qs++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=new Set,(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.forEach(function(a){a.__e=!0,fi(a)})},this.sub=function(s){i.add(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}wn=Ys.slice,j={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},js=0,Nt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ie({},this.state),typeof t=="function"&&(t=t(ie({},n),this.props)),t&&ie(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),fi(this))},Nt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),fi(this))},Nt.prototype.render=tt,be=[],Ws=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ci=function(t,e){return t.__v.__b-e.__v.__b},ar.__r=0,Ks=/(PointerCapture)$|Capture$/i,li=0,ui=ta(!1),di=ta(!0),qs=0;var jh=0;function w(t,e,n,r,i,o){e||(e={});var s,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?s=e[a]:c[a]=e[a];var h={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--jh,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return j.vnode&&j.vnode(h),h}var se,X,gi,ia,$e=0,oa=[],ot=j,sa=ot.__b,aa=ot.__r,ca=ot.diffed,la=ot.__c,ua=ot.unmount,da=ot.__;function xe(t,e){ot.__h&&ot.__h(X,t,$e||e),$e=0;var n=X.__H||(X.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function W(t){return $e=1,xn(fa,t)}function xn(t,e,n){var r=xe(se++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):fa(void 0,e),function(a){var c=r.__N?r.__N[0]:r.__[0],h=r.t(c,a);c!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.u)){var i=function(a,c,h){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(m){return!!m.__c});if(l.every(function(m){return!m.__N}))return!o||o.call(this,a,c,h);var f=r.__c.props!==a;return l.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,a,c,h)||f};X.u=!0;var o=X.shouldComponentUpdate,s=X.componentWillUpdate;X.componentWillUpdate=function(a,c,h){if(this.__e){var l=o;o=void 0,i(a,c,h),o=l}s&&s.call(this,a,c,h)},X.shouldComponentUpdate=i}return r.__N||r.__}function U(t,e){var n=xe(se++,3);!ot.__s&&vi(n.__H,e)&&(n.__=t,n.i=e,X.__H.__h.push(n))}function ae(t,e){var n=xe(se++,4);!ot.__s&&vi(n.__H,e)&&(n.__=t,n.i=e,X.__h.push(n))}function F(t){return $e=5,_t(function(){return{current:t}},[])}function Cn(t,e,n){$e=6,ae(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function _t(t,e){var n=xe(se++,7);return vi(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function et(t,e){return $e=8,_t(function(){return t},e)}function ft(t){var e=X.context[t.__c],n=xe(se++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(X)),e.props.value):t.__}function yi(t,e){ot.useDebugValue&&ot.useDebugValue(e?e(t):t)}function Hh(t){var e=xe(se++,10),n=W();return e.__=t,X.componentDidCatch||(X.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function ze(){var t=xe(se++,11);if(!t.__){for(var e=X.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Wh(){for(var t;t=oa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lr),t.__H.__h.forEach(wi),t.__H.__h=[]}catch(e){t.__H.__h=[],ot.__e(e,t.__v)}}ot.__b=function(t){X=null,sa&&sa(t)},ot.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),da&&da(t,e)},ot.__r=function(t){aa&&aa(t),se=0;var e=(X=t.__c).__H;e&&(gi===X?(e.__h=[],X.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(lr),e.__h.forEach(wi),e.__h=[],se=0)),gi=X},ot.diffed=function(t){ca&&ca(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(oa.push(e)!==1&&ia===ot.requestAnimationFrame||((ia=ot.requestAnimationFrame)||Kh)(Wh)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),gi=X=null},ot.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lr),n.__h=n.__h.filter(function(r){return!r.__||wi(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],ot.__e(r,n.__v)}}),la&&la(t,e)},ot.unmount=function(t){ua&&ua(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{lr(r)}catch(i){e=i}}),n.__H=void 0,e&&ot.__e(e,n.__v))};var ha=typeof requestAnimationFrame=="function";function Kh(t){var e,n=function(){clearTimeout(r),ha&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);ha&&(e=requestAnimationFrame(n))}function lr(t){var e=X,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),X=e}function wi(t){var e=X;t.__c=t.__(),X=e}function vi(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function fa(t,e){return typeof e=="function"?e(t):e}function pa(t,e){for(var n in e)t[n]=e[n];return t}function _i(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function bi(t,e){var n=e(),r=W({t:{__:n,u:e}}),i=r[0].t,o=r[1];return ae(function(){i.__=n,i.u=e,xi(i)&&o({t:i})},[t,n,e]),U(function(){return xi(i)&&o({t:i}),t(function(){xi(i)&&o({t:i})})},[t]),n}function xi(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function Ci(t){t()}function ki(t){return t}function Si(){return[!1,Ci]}var kn=ae;function ur(t,e){this.props=t,this.context=e}function ma(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:_i(this.props,i)}function r(i){return this.shouldComponentUpdate=n,B(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ur.prototype=new Nt).isPureReactComponent=!0,ur.prototype.shouldComponentUpdate=function(t,e){return _i(this.props,t)||_i(this.state,e)};var ga=j.__b;j.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ga&&ga(t)};var qh=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function fe(t){function e(n){var r=pa({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=qh,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ya=function(t,e){return t==null?null:oe(oe(t).map(e))},Ei={map:ya,forEach:ya,count:function(t){return t?oe(t).length:0},only:function(t){var e=oe(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:oe},Yh=j.__e;j.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Yh(t,e,n,r)};var wa=j.unmount;function va(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=pa({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return va(r,e,n)})),t}function _a(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return _a(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Sn(){this.__u=0,this.o=null,this.__b=null}function ba(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function xa(t){var e,n,r;function i(o){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return B(n,o)}return i.displayName="Lazy",i.__f=!0,i}function je(){this.i=null,this.l=null}j.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),wa&&wa(t)},(Sn.prototype=new Nt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=ba(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=_a(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.o.pop();)h.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Sn.prototype.componentWillUnmount=function(){this.o=[]},Sn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=va(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&B(tt,null,t.fallback);return i&&(i.__u&=-33),[B(tt,null,e.__a?null:t.children),i]};var Ca=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Gh(t){return this.getChildContext=function(){return t.context},t.children}function Xh(t){var e=this,n=t.h;e.componentWillUnmount=function(){bn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),e.v||(e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),e.h.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.h.insertBefore(r,i)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}),bn(B(Gh,{context:e.context},t.__v),e.v)}function Ti(t,e){var n=B(Xh,{__v:t,h:e});return n.containerInfo=e,n}(je.prototype=new Nt).__a=function(t){var e=this,n=ba(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Ca(e,t,r)):i()};n?n(o):o()}},je.prototype.render=function(t){this.i=null,this.l=new Map;var e=oe(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},je.prototype.componentDidUpdate=je.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ca(t,n,e)})};var ka=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Zh=/^(?: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]/,Jh=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qh=/[A-Z0-9]/g,tf=typeof document<"u",ef=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Sa(t,e,n){return e.__k==null&&(e.textContent=""),bn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Ea(t,e,n){return ra(t,e),typeof n=="function"&&n(),t?t.__c:null}Nt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Nt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ta=j.event;function nf(){}function rf(){return this.cancelBubble}function of(){return this.defaultPrevented}j.event=function(t){return Ta&&(t=Ta(t)),t.persist=nf,t.isPropagationStopped=rf,t.isDefaultPrevented=of,t.nativeEvent=t};var Ai,sf={enumerable:!1,configurable:!0,get:function(){return this.class}},Aa=j.vnode;j.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||tf&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||ef(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":Jh.test(s)&&(s=c):c=s="oninput":o&&Zh.test(s)?s=s.replace(Qh,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&i[s=c]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=oe(n.children).forEach(function(h){h.props.selected=i.value.indexOf(h.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=oe(n.children).forEach(function(h){h.props.selected=i.multiple?i.defaultValue.indexOf(h.props.value)!=-1:i.defaultValue==h.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",sf)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=ka,Aa&&Aa(t)};var Pa=j.__r;j.__r=function(t){Pa&&Pa(t),Ai=t.__c};var Ia=j.diffed;j.diffed=function(t){Ia&&Ia(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Ai=null};var Ma={ReactCurrentDispatcher:{current:{readContext:function(t){return Ai.__n[t.__c].props.value},useCallback:et,useContext:ft,useDebugValue:yi,useDeferredValue:ki,useEffect:U,useId:ze,useImperativeHandle:Cn,useInsertionEffect:kn,useLayoutEffect:ae,useMemo:_t,useReducer:xn,useRef:F,useState:W,useSyncExternalStore:bi,useTransition:Si}}},Ra="18.3.1";function Na(t){return B.bind(null,t)}function He(t){return!!t&&t.$$typeof===ka}function Da(t){return He(t)&&t.type===tt}function La(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Pi(t){return He(t)?zh.apply(null,arguments):t}function Ba(t){return!!t.__k&&(bn(null,t),!0)}function Oa(t){return t&&(t.base||t.nodeType===1&&t)||null}var Fa=function(t,e){return t(e)},Va=function(t,e){return t(e)},Ua=tt,$a=He,We={useState:W,useId:ze,useReducer:xn,useEffect:U,useLayoutEffect:ae,useInsertionEffect:kn,useTransition:Si,useDeferredValue:ki,useSyncExternalStore:bi,startTransition:Ci,useRef:F,useImperativeHandle:Cn,useMemo:_t,useCallback:et,useContext:ft,useDebugValue:yi,version:"18.3.1",Children:Ei,render:Sa,hydrate:Ea,unmountComponentAtNode:Ba,createPortal:Ti,createElement:B,createContext:At,createFactory:Na,cloneElement:Pi,createRef:Gs,Fragment:tt,isValidElement:He,isElement:$a,isFragment:Da,isMemo:La,findDOMNode:Oa,Component:Nt,PureComponent:ur,memo:ma,forwardRef:fe,flushSync:Va,unstable_batchedUpdates:Fa,StrictMode:Ua,Suspense:Sn,SuspenseList:je,lazy:xa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ma};const af=Object.freeze(Object.defineProperty({__proto__:null,Children:Ei,Component:Nt,Fragment:tt,PureComponent:ur,StrictMode:Ua,Suspense:Sn,SuspenseList:je,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ma,cloneElement:Pi,createContext:At,createElement:B,createFactory:Na,createPortal:Ti,createRef:Gs,default:We,findDOMNode:Oa,flushSync:Va,forwardRef:fe,hydrate:Ea,isElement:$a,isFragment:Da,isMemo:La,isValidElement:He,lazy:xa,memo:ma,render:Sa,startTransition:Ci,unmountComponentAtNode:Ba,unstable_batchedUpdates:Fa,useCallback:et,useContext:ft,useDebugValue:yi,useDeferredValue:ki,useEffect:U,useErrorBoundary:Hh,useId:ze,useImperativeHandle:Cn,useInsertionEffect:kn,useLayoutEffect:ae,useMemo:_t,useReducer:xn,useRef:F,useState:W,useSyncExternalStore:bi,useTransition:Si,version:Ra},Symbol.toStringTag,{value:"Module"})),cf='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,*:before,*:after{border-color:hsl(var(--border))}#deskcord-shadow-container{color:hsl(var(--foreground));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.dc-scroll{scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color .3s ease}.dc-scroll.dc-scroll--active{scrollbar-color:rgba(0,0,0,.25) transparent}.dc-scroll::-webkit-scrollbar{width:6px}.dc-scroll::-webkit-scrollbar-track{background:transparent}.dc-scroll::-webkit-scrollbar-thumb{background-color:transparent;border-radius:9999px;-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.dc-scroll.dc-scroll--active::-webkit-scrollbar-thumb{background-color:#00000040}.dark .dc-scroll.dc-scroll--active{scrollbar-color:rgba(255,255,255,.3) transparent}.dark .dc-scroll.dc-scroll--active::-webkit-scrollbar-thumb{background-color:#ffffff4d}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.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}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-0\\.5{bottom:-.125rem}.-end-0\\.5{inset-inline-end:-.125rem}.bottom-0{bottom:0}.bottom-\\[22\\%\\]{bottom:22%}.bottom-full{bottom:100%}.end-0{inset-inline-end:0px}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-full{top:100%}.z-20{z-index:20}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-\\[3px\\]{margin-top:3px;margin-bottom:3px}.\\!me-1{margin-inline-end:.25rem!important}.\\!me-1\\.5{margin-inline-end:.375rem!important}.\\!ms-auto{margin-inline-start:auto!important}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.me-11{margin-inline-end:2.75rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms-0\\.5{margin-inline-start:.125rem}.ms-2{margin-inline-start:.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.size-2\\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-9{width:2.25rem;height:2.25rem}.size-\\[32px\\]{width:32px;height:32px}.\\!h-2\\.5{height:.625rem!important}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[10px\\]{height:10px}.h-\\[33px\\]{height:33px}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.min-h-\\[55px\\]{min-height:55px}.\\!w-2\\.5{width:.625rem!important}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\\[33px\\]{width:33px}.w-\\[40px\\]{width:40px}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[300px\\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50%;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))}.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 slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-in{animation:slide-in .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-.5rem * var(--tw-space-x-reverse));margin-left:calc(-.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-\\[3px\\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3px * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.\\!rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.\\!border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity))!important}.border-current{border-color:currentColor}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity: 1;border-top-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\\[var\\(--dc-primary\\)\\]{background-color:var(--dc-primary)}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.fill-black{fill:#000}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.ps-11{padding-inline-start:2.75rem}.ps-3\\.5{padding-inline-start:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-end{text-align:end}.align-bottom{vertical-align:bottom}.\\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-\\[7px\\]{font-size:7px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg\\/5{font-size:1.125rem;line-height:1.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/3{font-size:.875rem;line-height:.75rem}.text-xs,.text-xs\\/4{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-\\[11px\\]{line-height:11px}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.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)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--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(3px + 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)}.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)}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.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)}.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)}.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)}.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}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}:host,#deskcord-shadow-container{overflow-x:hidden;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--dc-primary: #7289DA;--dc-primary-mid: #5B6EAB;--dc-primary-dark: #22252A}.dark,:host(.dark) #deskcord-shadow-container{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-\\[var\\(--dc-primary-mid\\)\\]:hover{background-color:var(--dc-primary-mid)}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--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)}.focus\\:ring-\\[var\\(--dc-primary\\)\\]:focus{--tw-ring-color: var(--dc-primary)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:transform-none:disabled{transform:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.selected .hs-combo-box-selected\\:block,.selected.hs-combo-box-selected\\:block{display:block}.complete .hs-file-upload-complete\\:bg-green-600,.complete.hs-file-upload-complete\\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.dark\\:\\!border-neutral-700:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity))!important}.dark\\:border-neutral-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}.dark\\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:border-neutral-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity))}.dark\\:\\!bg-neutral-800:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(38 38 38 / var(--tw-bg-opacity))!important}.dark\\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:bg-neutral-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity))}.dark\\:bg-neutral-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\\:fill-neutral-200:is(.dark *){fill:#e5e5e5}.dark\\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-neutral-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500:is(.dark *){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-neutral-600:is(.dark *){--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:ring-neutral-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity))}.dark\\:hover\\:bg-neutral-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}',lf=".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:none;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_opacity,1);transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;transform:translate(-50%) translateY(-50%)}.yarl__slide_loading{animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px);-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",Ii=At({});function Mi(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Ri=typeof window<"u",za=Ri?ae:U,dr=At(null);function Ni(t,e){t.indexOf(e)===-1&&t.push(e)}function Di(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ce=(t,e,n)=>n>e?e:n<t?t:n;let hr=()=>{};const le={},ja=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ha(t){return typeof t=="object"&&t!==null}const Wa=t=>/^0[^.\s]+$/u.test(t);function Li(t){let e;return()=>(e===void 0&&(e=t()),e)}const Vt=t=>t,uf=(t,e)=>n=>e(t(n)),En=(...t)=>t.reduce(uf),Tn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Bi{constructor(){this.subscriptions=[]}add(e){return Ni(this.subscriptions,e),()=>Di(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xt=t=>t*1e3,Zt=t=>t/1e3;function Ka(t,e){return e?t*(1e3/e):0}const qa=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,df=1e-7,hf=12;function ff(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=qa(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>df&&++a<hf);return s}function An(t,e,n,r){if(t===e&&n===r)return Vt;const i=o=>ff(o,0,1,t,n);return o=>o===0||o===1?o:qa(i(o),e,r)}const Ya=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ga=t=>e=>1-t(1-e),Xa=An(.33,1.53,.69,.99),Oi=Ga(Xa),Za=Ya(Oi),Ja=t=>(t*=2)<1?.5*Oi(t):.5*(2-Math.pow(2,-10*(t-1))),Fi=t=>1-Math.sin(Math.acos(t)),Qa=Ga(Fi),tc=Ya(Fi),pf=An(.42,0,1,1),mf=An(0,0,.58,1),ec=An(.42,0,.58,1),gf=t=>Array.isArray(t)&&typeof t[0]!="number",nc=t=>Array.isArray(t)&&typeof t[0]=="number",rc={linear:Vt,easeIn:pf,easeInOut:ec,easeOut:mf,circIn:Fi,circInOut:tc,circOut:Qa,backIn:Oi,backInOut:Za,backOut:Xa,anticipate:Ja},yf=t=>typeof t=="string",ic=t=>{if(nc(t)){hr(t.length===4);const[e,n,r,i]=t;return An(e,n,r,i)}else if(yf(t))return hr(rc[t]!==void 0),rc[t];return t},fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],oc={value:null,addProjectionMetrics:null};function wf(t,e){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function h(f){s.has(f)&&(l.schedule(f),t()),c++,f(a)}const l={schedule:(f,m=!1,g=!1)=>{const v=g&&i?n:r;return m&&s.add(f),v.has(f)||v.add(f),f},cancel:f=>{r.delete(f),s.delete(f)},process:f=>{if(a=f,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(h),e&&oc.value&&oc.value.frameloop[e].push(c),c=0,n.clear(),i=!1,o&&(o=!1,l.process(f))}};return l}const vf=40;function sc(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=fr.reduce((E,I)=>(E[I]=wf(o,e?I:void 0),E),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:l,update:f,preRender:m,render:g,postRender:_}=s,v=()=>{const E=le.useManualTiming?i.timestamp:performance.now();n=!1,le.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,vf),1)),i.timestamp=E,i.isProcessing=!0,a.process(i),c.process(i),h.process(i),l.process(i),f.process(i),m.process(i),g.process(i),_.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(v))},x=()=>{n=!0,r=!0,i.isProcessing||t(v)};return{schedule:fr.reduce((E,I)=>{const T=s[I];return E[I]=(R,N=!1,P=!1)=>(n||x(),T.schedule(R,N,P)),E},{}),cancel:E=>{for(let I=0;I<fr.length;I++)s[fr[I]].cancel(E)},state:i,steps:s}}const{schedule:rt,cancel:pe,state:kt,steps:Vi}=sc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Vt,!0);let pr;function _f(){pr=void 0}const Mt={now:()=>(pr===void 0&&Mt.set(kt.isProcessing||le.useManualTiming?kt.timestamp:performance.now()),pr),set:t=>{pr=t,queueMicrotask(_f)}},ac=t=>e=>typeof e=="string"&&e.startsWith(t),Ui=ac("--"),bf=ac("var(--"),$i=t=>bf(t)?xf.test(t.split("/*")[0].trim()):!1,xf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ke={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pn={...Ke,transform:t=>ce(0,1,t)},mr={...Ke,default:1},In=t=>Math.round(t*1e5)/1e5,zi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cf(t){return t==null}const kf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ji=(t,e)=>n=>!!(typeof n=="string"&&kf.test(n)&&n.startsWith(t)||e&&!Cf(n)&&Object.prototype.hasOwnProperty.call(n,e)),cc=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(zi);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Sf=t=>ce(0,255,t),Hi={...Ke,transform:t=>Math.round(Sf(t))},Ce={test:ji("rgb","red"),parse:cc("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Hi.transform(t)+", "+Hi.transform(e)+", "+Hi.transform(n)+", "+In(Pn.transform(r))+")"};function Ef(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Wi={test:ji("#"),parse:Ef,transform:Ce.transform},Mn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),me=Mn("deg"),Jt=Mn("%"),V=Mn("px"),Tf=Mn("vh"),Af=Mn("vw"),lc={...Jt,parse:t=>Jt.parse(t)/100,transform:t=>Jt.transform(t*100)},qe={test:ji("hsl","hue"),parse:cc("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Jt.transform(In(e))+", "+Jt.transform(In(n))+", "+In(Pn.transform(r))+")"},gt={test:t=>Ce.test(t)||Wi.test(t)||qe.test(t),parse:t=>Ce.test(t)?Ce.parse(t):qe.test(t)?qe.parse(t):Wi.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ce.transform(t):qe.transform(t),getAnimatableNone:t=>{const e=gt.parse(t);return e.alpha=0,gt.transform(e)}},Pf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function If(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(zi))==null?void 0:e.length)||0)+(((n=t.match(Pf))==null?void 0:n.length)||0)>0}const uc="number",dc="color",Mf="var",Rf="var(",hc="${}",Nf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rn(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Nf,c=>(gt.test(c)?(r.color.push(o),i.push(dc),n.push(gt.parse(c))):c.startsWith(Rf)?(r.var.push(o),i.push(Mf),n.push(c)):(r.number.push(o),i.push(uc),n.push(parseFloat(c))),++o,hc)).split(hc);return{values:n,split:a,indexes:r,types:i}}function fc(t){return Rn(t).values}function pc(t){const{split:e,types:n}=Rn(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===uc?o+=In(i[s]):a===dc?o+=gt.transform(i[s]):o+=i[s]}return o}}const Df=t=>typeof t=="number"?0:gt.test(t)?gt.getAnimatableNone(t):t;function Lf(t){const e=fc(t);return pc(t)(e.map(Df))}const ge={test:If,parse:fc,createTransformer:pc,getAnimatableNone:Lf};function Ki(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Bf({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Ki(c,a,t+1/3),o=Ki(c,a,t),s=Ki(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function gr(t,e){return n=>n>0?e:t}const st=(t,e,n)=>t+(e-t)*n,qi=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Of=[Wi,Ce,qe],Ff=t=>Of.find(e=>e.test(t));function mc(t){const e=Ff(t);if(!e)return!1;let n=e.parse(t);return e===qe&&(n=Bf(n)),n}const gc=(t,e)=>{const n=mc(t),r=mc(e);if(!n||!r)return gr(t,e);const i={...n};return o=>(i.red=qi(n.red,r.red,o),i.green=qi(n.green,r.green,o),i.blue=qi(n.blue,r.blue,o),i.alpha=st(n.alpha,r.alpha,o),Ce.transform(i))},Yi=new Set(["none","hidden"]);function Vf(t,e){return Yi.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Uf(t,e){return n=>st(t,e,n)}function Gi(t){return typeof t=="number"?Uf:typeof t=="string"?$i(t)?gr:gt.test(t)?gc:jf:Array.isArray(t)?yc:typeof t=="object"?gt.test(t)?gc:$f:gr}function yc(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Gi(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function $f(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Gi(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function zf(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],s=t.indexes[o][r[o]],a=t.values[s]??0;n[i]=a,r[o]++}return n}const jf=(t,e)=>{const n=ge.createTransformer(e),r=Rn(t),i=Rn(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yi.has(t)&&!i.values.length||Yi.has(e)&&!r.values.length?Vf(t,e):En(yc(zf(r,i),i.values),n):gr(t,e)};function wc(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?st(t,e,n):Gi(t)(t,e)}const Hf=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>rt.update(e,n),stop:()=>pe(e),now:()=>kt.isProcessing?kt.timestamp:Mt.now()}},vc=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)r+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},yr=2e4;function Xi(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<yr;)e+=n,r=t.next(e);return e>=yr?1/0:e}function Wf(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(Xi(r),yr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:Zt(i)}}const Kf=5;function _c(t,e,n){const r=Math.max(e-Kf,0);return Ka(n-t(r),e-r)}const lt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zi=.001;function qf({duration:t=lt.duration,bounce:e=lt.bounce,velocity:n=lt.velocity,mass:r=lt.mass}){let i,o,s=1-e;s=ce(lt.minDamping,lt.maxDamping,s),t=ce(lt.minDuration,lt.maxDuration,Zt(t)),s<1?(i=h=>{const l=h*s,f=l*t,m=l-n,g=Ji(h,s),_=Math.exp(-f);return Zi-m/g*_},o=h=>{const f=h*s*t,m=f*n+n,g=Math.pow(s,2)*Math.pow(h,2)*t,_=Math.exp(-f),v=Ji(Math.pow(h,2),s);return(-i(h)+Zi>0?-1:1)*((m-g)*_)/v}):(i=h=>{const l=Math.exp(-h*t),f=(h-n)*t+1;return-Zi+l*f},o=h=>{const l=Math.exp(-h*t),f=(n-h)*(t*t);return l*f});const a=5/t,c=Gf(i,o,a);if(t=Xt(t),isNaN(c))return{stiffness:lt.stiffness,damping:lt.damping,duration:t};{const h=Math.pow(c,2)*r;return{stiffness:h,damping:s*2*Math.sqrt(r*h),duration:t}}}const Yf=12;function Gf(t,e,n){let r=n;for(let i=1;i<Yf;i++)r=r-t(r)/e(r);return r}function Ji(t,e){return t*Math.sqrt(1-e*e)}const Xf=["duration","bounce"],Zf=["stiffness","damping","mass"];function bc(t,e){return e.some(n=>t[n]!==void 0)}function Jf(t){let e={velocity:lt.velocity,stiffness:lt.stiffness,damping:lt.damping,mass:lt.mass,isResolvedFromDuration:!1,...t};if(!bc(t,Zf)&&bc(t,Xf))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*ce(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:lt.mass,stiffness:i,damping:o}}else{const n=qf(t);e={...e,...n,mass:lt.mass},e.isResolvedFromDuration=!0}return e}function wr(t=lt.visualDuration,e=lt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:h,mass:l,duration:f,velocity:m,isResolvedFromDuration:g}=Jf({...n,velocity:-Zt(n.velocity||0)}),_=m||0,v=h/(2*Math.sqrt(c*l)),x=s-o,b=Zt(Math.sqrt(c/l)),k=Math.abs(x)<5;r||(r=k?lt.restSpeed.granular:lt.restSpeed.default),i||(i=k?lt.restDelta.granular:lt.restDelta.default);let E;if(v<1){const T=Ji(b,v);E=R=>{const N=Math.exp(-v*b*R);return s-N*((_+v*b*x)/T*Math.sin(T*R)+x*Math.cos(T*R))}}else if(v===1)E=T=>s-Math.exp(-b*T)*(x+(_+b*x)*T);else{const T=b*Math.sqrt(v*v-1);E=R=>{const N=Math.exp(-v*b*R),P=Math.min(T*R,300);return s-N*((_+v*b*x)*Math.sinh(P)+T*x*Math.cosh(P))/T}}const I={calculatedDuration:g&&f||null,next:T=>{const R=E(T);if(g)a.done=T>=f;else{let N=T===0?_:0;v<1&&(N=T===0?Xt(_):_c(E,T,R));const P=Math.abs(N)<=r,M=Math.abs(s-R)<=i;a.done=P&&M}return a.value=a.done?s:R,a},toString:()=>{const T=Math.min(Xi(I),yr),R=vc(N=>I.next(T*N).value,T,30);return T+"ms "+R},toTransition:()=>{}};return I}wr.applyToOptions=t=>{const e=Wf(t,100,wr);return t.ease=e.ease,t.duration=Xt(e.duration),t.type="keyframes",t};function Qi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:h=.5,restSpeed:l}){const f=t[0],m={done:!1,value:f},g=P=>a!==void 0&&P<a||c!==void 0&&P>c,_=P=>a===void 0?c:c===void 0||Math.abs(a-P)<Math.abs(c-P)?a:c;let v=n*e;const x=f+v,b=s===void 0?x:s(x);b!==x&&(v=b-f);const k=P=>-v*Math.exp(-P/r),E=P=>b+k(P),I=P=>{const M=k(P),D=E(P);m.done=Math.abs(M)<=h,m.value=m.done?b:D};let T,R;const N=P=>{g(m.value)&&(T=P,R=wr({keyframes:[m.value,_(m.value)],velocity:_c(E,P,m.value),damping:i,stiffness:o,restDelta:h,restSpeed:l}))};return N(0),{calculatedDuration:null,next:P=>{let M=!1;return!R&&T===void 0&&(M=!0,I(P),N(P)),T!==void 0&&P>=T?R.next(P-T):(!M&&I(P),m)}}}function Qf(t,e,n){const r=[],i=n||le.mix||wc,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||Vt:e;a=En(c,a)}r.push(a)}return r}function tp(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(hr(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Qf(e,r,i),c=a.length,h=l=>{if(s&&l<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const m=Tn(t[f],t[f+1],l);return a[f](m)};return n?l=>h(ce(t[0],t[o-1],l)):h}function ep(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Tn(0,e,r);t.push(st(n,1,i))}}function np(t){const e=[0];return ep(e,t.length-1),e}function rp(t,e){return t.map(n=>n*e)}function ip(t,e){return t.map(()=>e||ec).splice(0,t.length-1)}function Nn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=gf(r)?r.map(ic):ic(r),o={done:!1,value:e[0]},s=rp(n&&n.length===e.length?n:np(e),t),a=tp(s,e,{ease:Array.isArray(i)?i:ip(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const op=t=>t!==null;function to(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(op),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const sp={decay:Qi,inertia:Qi,tween:Nn,keyframes:Nn,spring:wr};function xc(t){typeof t.type=="string"&&(t.type=sp[t.type])}class eo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ap=t=>t/100;class no extends eo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Mt.now()&&this.tick(Mt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;xc(e);const{type:n=Nn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const c=n||Nn;c!==Nn&&typeof a[0]!="number"&&(this.mixKeyframes=En(ap,wc(a[0],a[1])),a=[0,100]);const h=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-s})),h.calculatedDuration===null&&(h.calculatedDuration=Xi(h));const{calculatedDuration:l}=h;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:l,repeat:f,repeatType:m,repeatDelay:g,type:_,onUpdate:v,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-h*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,I=r;if(f){const P=Math.min(this.currentTime,i)/a;let M=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(m==="reverse"?(D=1-D,g&&(D-=g/a)):m==="mirror"&&(I=s)),E=ce(0,1,D)*a}const T=k?{done:!1,value:l[0]}:I.next(E);o&&(T.value=o(T.value));let{done:R}=T;!k&&c!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return N&&_!==Qi&&(T.value=to(l,this.options,x,this.speed)),v&&v(T.value),N&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return Zt(this.calculatedDuration)}get time(){return Zt(this.currentTime)}set time(e){var n;e=Xt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Mt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Zt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Hf,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Mt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function cp(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ke=t=>t*180/Math.PI,ro=t=>{const e=ke(Math.atan2(t[1],t[0]));return io(e)},lp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ro,rotateZ:ro,skewX:t=>ke(Math.atan(t[1])),skewY:t=>ke(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},io=t=>(t=t%360,t<0&&(t+=360),t),Cc=ro,kc=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Sc=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),up={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kc,scaleY:Sc,scale:t=>(kc(t)+Sc(t))/2,rotateX:t=>io(ke(Math.atan2(t[6],t[5]))),rotateY:t=>io(ke(Math.atan2(-t[2],t[0]))),rotateZ:Cc,rotate:Cc,skewX:t=>ke(Math.atan(t[4])),skewY:t=>ke(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function oo(t){return t.includes("scale")?1:0}function so(t,e){if(!t||t==="none")return oo(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=up,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=lp,i=a}if(!i)return oo(e);const o=r[e],s=i[1].split(",").map(hp);return typeof o=="function"?o(s):s[o]}const dp=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return so(n,e)};function hp(t){return parseFloat(t.trim())}const Ye=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(Ye),Ec=t=>t===Ke||t===V,fp=new Set(["x","y","z"]),pp=Ye.filter(t=>!fp.has(t));function mp(t){const e=[];return pp.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Se={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>so(e,"x"),y:(t,{transform:e})=>so(e,"y")};Se.translateX=Se.x,Se.translateY=Se.y;const Ee=new Set;let ao=!1,co=!1,lo=!1;function Tc(){if(co){const t=Array.from(Ee).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=mp(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}co=!1,ao=!1,Ee.forEach(t=>t.complete(lo)),Ee.clear()}function Ac(){Ee.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(co=!0)})}function gp(){lo=!0,Ac(),Tc(),lo=!1}class uo{constructor(e,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Ee.add(this),ao||(ao=!0,rt.read(Ac),rt.resolveKeyframes(Tc))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}cp(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ee.delete(this)}cancel(){this.state==="scheduled"&&(Ee.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yp=t=>t.startsWith("--");function wp(t,e,n){yp(e)?t.style.setProperty(e,n):t.style[e]=n}const vp=Li(()=>window.ScrollTimeline!==void 0),_p={};function bp(t,e){const n=Li(t);return()=>_p[e]??n()}const Pc=bp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dn=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Ic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Mc(t,e){if(t)return typeof t=="function"?Pc()?vc(t,e):"ease-out":nc(t)?Dn(t):Array.isArray(t)?t.map(n=>Mc(n,e)||Ic.easeOut):Ic[t]}function xp(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},h=void 0){const l={[e]:n};c&&(l.offset=c);const f=Mc(a,i);Array.isArray(f)&&(l.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return h&&(m.pseudoElement=h),t.animate(l,m)}function Rc(t){return typeof t=="function"&&"applyToOptions"in t}function Cp({type:t,...e}){return Rc(t)&&Pc()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class kp extends eo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,hr(typeof e.type!="string");const h=Cp(e);this.animation=xp(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=to(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):wp(n,r,l),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Zt(Number(e))}get time(){return Zt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Xt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&vp()?(this.animation.timeline=e,Vt):n(this)}}const Nc={anticipate:Ja,backInOut:Za,circInOut:tc};function Sp(t){return t in Nc}function Ep(t){typeof t.ease=="string"&&Sp(t.ease)&&(t.ease=Nc[t.ease])}const Dc=10;class Tp extends kp{constructor(e){Ep(e),xc(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new no({...s,autoplay:!1}),c=Xt(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-Dc).value,a.sample(c).value,Dc),a.stop()}}const Lc=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ge.test(t)||t==="0")&&!t.startsWith("url("));function Ap(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Pp(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=Lc(i,e),a=Lc(o,e);return!s||!a?!1:Ap(t)||(n==="spring"||Rc(n))&&r}function ho(t){t.duration=0,t.type}const Ip=new Set(["opacity","clipPath","filter","transform"]),Mp=Li(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Rp(t){var l;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((l=e==null?void 0:e.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:h}=e.owner.getProps();return Mp()&&n&&Ip.has(n)&&(n!=="transform"||!h)&&!c&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const Np=40;class Dp extends eo{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:h,element:l,...f}){var _;super(),this.stop=()=>{var v,x;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Mt.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:c,motionValue:h,element:l,...f},g=(l==null?void 0:l.KeyframeResolver)||uo;this.keyframeResolver=new g(a,(v,x,b)=>this.onKeyframesResolved(v,x,m,!b),c,h,l),(_=this.keyframeResolver)==null||_.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:h,onUpdate:l}=r;this.resolvedAt=Mt.now(),Pp(e,o,s,a)||((le.instantAnimations||!c)&&(l==null||l(to(e,r,n))),e[0]=e[e.length-1],ho(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Np?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},g=!h&&Rp(m)?new Tp({...m,element:m.motionValue.owner.current}):new no(m);g.finished.then(()=>this.notifyFinished()).catch(Vt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),gp()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Lp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bp(t){const e=Lp.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Bc(t,e,n=1){const[r,i]=Bp(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return ja(s)?parseFloat(s):s}return $i(i)?Bc(i,e,n+1):i}function fo(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Oc=new Set(["width","height","top","left","right","bottom",...Ye]),Op={test:t=>t==="auto",parse:t=>t},Fc=t=>e=>e.test(t),Vc=[Ke,V,Jt,me,Af,Tf,Op],Uc=t=>Vc.find(Fc(t));function Fp(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Wa(t):!0}const Vp=new Set(["brightness","contrast","saturate","opacity"]);function Up(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(zi)||[];if(!r)return t;const i=n.replace(r,"");let o=Vp.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const $p=/\b([a-z-]*)\(.*?\)/gu,po={...ge,getAnimatableNone:t=>{const e=t.match($p);return e?e.map(Up).join(" "):t}},$c={...Ke,transform:Math.round},mo={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:me,rotateX:me,rotateY:me,rotateZ:me,scale:mr,scaleX:mr,scaleY:mr,scaleZ:mr,skew:me,skewX:me,skewY:me,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Pn,originX:lc,originY:lc,originZ:V},zIndex:$c,fillOpacity:Pn,strokeOpacity:Pn,numOctaves:$c},zp={...mo,color:gt,backgroundColor:gt,outlineColor:gt,fill:gt,stroke:gt,borderColor:gt,borderTopColor:gt,borderRightColor:gt,borderBottomColor:gt,borderLeftColor:gt,filter:po,WebkitFilter:po},zc=t=>zp[t];function jc(t,e){let n=zc(t);return n!==po&&(n=ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const jp=new Set(["auto","none","0"]);function Hp(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!jp.has(o)&&Rn(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=jc(n,i)}class Wp extends uo{constructor(e,n,r,i,o){super(e,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),$i(h))){const l=Bc(h,n.current);l!==void 0&&(e[c]=l),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Oc.has(r)||e.length!==2)return;const[i,o]=e,s=Uc(i),a=Uc(o);if(s!==a)if(Ec(s)&&Ec(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else Se[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Fp(e[i]))&&r.push(i);r.length&&Hp(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Se[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Se[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,h])=>{e.getValue(c).set(h)}),this.resolveNoneKeyframes()}}function Kp(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Hc=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Wc(t){return Ha(t)&&"offsetHeight"in t}const Kc=30,qp=t=>!isNaN(parseFloat(t));class Yp{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Mt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Mt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=qp(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Bi);const r=this.events[e].add(n);return e==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Mt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Kc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kc);return Ka(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xe(t,e){return new Yp(t,e)}const{schedule:go,cancel:T_}=sc(queueMicrotask,!1),Wt={x:!1,y:!1};function qc(){return Wt.x||Wt.y}function Gp(t){return t==="x"||t==="y"?Wt[t]?null:(Wt[t]=!0,()=>{Wt[t]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function Yc(t,e){const n=Kp(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Gc(t){return!(t.pointerType==="touch"||qc())}function Xp(t,e,n={}){const[r,i,o]=Yc(t,n),s=a=>{if(!Gc(a))return;const{target:c}=a,h=e(c,a);if(typeof h!="function"||!c)return;const l=f=>{Gc(f)&&(h(f),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Xc=(t,e)=>e?t===e?!0:Xc(t,e.parentElement):!1,yo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Zp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jp(t){return Zp.has(t.tagName)||t.tabIndex!==-1}const vr=new WeakSet;function Zc(t){return e=>{e.key==="Enter"&&t(e)}}function wo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Qp=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Zc(()=>{if(vr.has(n))return;wo(n,"down");const i=Zc(()=>{wo(n,"up")}),o=()=>wo(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Jc(t){return yo(t)&&!qc()}function tm(t,e,n={}){const[r,i,o]=Yc(t,n),s=a=>{const c=a.currentTarget;if(!Jc(a))return;vr.add(c);const h=e(c,a),l=(g,_)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),vr.has(c)&&vr.delete(c),Jc(g)&&typeof h=="function"&&h(g,{success:_})},f=g=>{l(g,c===window||c===document||n.useGlobalTarget||Xc(c,g.target))},m=g=>{l(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),Wc(a)&&(a.addEventListener("focus",h=>Qp(h,i)),!Jp(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Qc(t){return Ha(t)&&"ownerSVGElement"in t}function em(t){return Qc(t)&&t.tagName==="svg"}const St=t=>!!(t&&t.getVelocity),nm=[...Vc,gt,ge],rm=t=>nm.find(Fc(t)),vo=At({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class im extends Nt{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Wc(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function om({children:t,isPresent:e,anchorX:n,root:r}){const i=ze(),o=F(null),s=F({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=ft(vo);return kn(()=>{const{width:c,height:h,top:l,left:f,right:m}=s.current;if(e||!o.current||!c||!h)return;const g=n==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=i;const _=document.createElement("style");a&&(_.nonce=a);const v=r??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
1
+ (function(){"use strict";var wn,j,Ws,be,Ks,qs,li,Ys,ui,di,hi,Gs,vn={},Xs=[],Vh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,sr=Array.isArray;function ie(t,e){for(var n in e)t[n]=e[n];return t}function fi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function B(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?wn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return _n(t,s,r,i,null)}function _n(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Ws,__i:-1,__u:0};return i==null&&j.vnode!=null&&j.vnode(o),o}function Zs(){return{current:null}}function tt(t){return t.children}function Nt(t,e){this.props=t,this.context=e}function Ue(t,e){if(e==null)return t.__?Ue(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Ue(t):null}function Js(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Js(t)}}function pi(t){(!t.__d&&(t.__d=!0)&&be.push(t)&&!ar.__r++||Ks!==j.debounceRendering)&&((Ks=j.debounceRendering)||qs)(ar)}function ar(){var t,e,n,r,i,o,s,a;for(be.sort(li);t=be.shift();)t.__d&&(e=be.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ie({},i)).__v=i.__v+1,j.vnode&&j.vnode(r),mi(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ue(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,ra(s,r,a),r.__e!=o&&Js(r)),be.length>e&&be.sort(li));ar.__r=0}function Qs(t,e,n,r,i,o,s,a,c,h,l){var f,m,g,_,v,x,b=r&&r.__k||Xs,k=e.length;for(c=Uh(n,e,b,c,k),f=0;f<k;f++)(g=n.__k[f])!=null&&(m=g.__i===-1?vn:b[g.__i]||vn,g.__i=f,x=mi(t,g,m,i,o,s,a,c,h,l),_=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&gi(m.ref,null,g),l.push(g.ref,g.__c||_,g)),v==null&&_!=null&&(v=_),4&g.__u||m.__k===g.__k?c=ta(g,c,t):typeof g.type=="function"&&x!==void 0?c=x:_&&(c=_.nextSibling),g.__u&=-7);return n.__e=v,c}function Uh(t,e,n,r,i){var o,s,a,c,h,l=n.length,f=l,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?_n(null,s,null,null,null):sr(s)?_n(tt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?_n(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(h=s.__i=$h(s,n,c,f))!==-1&&(f--,(a=n[h])&&(a.__u|=2)),a==null||a.__v===null?(h==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):h!=c&&(h==c-1?m--:h==c+1?m++:(h>c?m--:m++,s.__u|=4))):t.__k[o]=null;if(f)for(o=0;o<l;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=Ue(a)),ia(a,a));return r}function ta(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=ta(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Ue(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function oe(t,e){return e=e||[],t==null||typeof t=="boolean"||(sr(t)?t.some(function(n){oe(n,e)}):e.push(t)),e}function $h(t,e,n,r){var i,o,s=t.key,a=t.type,c=e[n];if(c===null||c&&s==c.key&&a===c.type&&!(2&c.__u))return n;if(r>(c!=null&&!(2&c.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((c=e[i])&&!(2&c.__u)&&s==c.key&&a===c.type)return i;i--}if(o<e.length){if((c=e[o])&&!(2&c.__u)&&s==c.key&&a===c.type)return o;o++}}return-1}function ea(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Vh.test(e)?n:n+"px"}function cr(t,e,n,r,i){var o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ea(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||ea(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ys,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=ui,t.addEventListener(e,o?hi:di,o)):t.removeEventListener(e,o?hi:di,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function na(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ui++;else if(e.t<n.u)return;return n(j.event?j.event(e):e)}}}function mi(t,e,n,r,i,o,s,a,c,h){var l,f,m,g,_,v,x,b,k,S,M,T,R,N,P,I,D,O=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=e.__e=n.__e]),(l=j.__b)&&l(e);t:if(typeof O=="function")try{if(b=e.props,k="prototype"in O&&O.prototype.render,S=(l=O.contextType)&&r[l.__c],M=l?S?S.props.value:l.__:r,n.__c?x=(f=e.__c=n.__c).__=f.__E:(k?e.__c=f=new O(b,M):(e.__c=f=new Nt(b,M),f.constructor=O,f.render=jh),S&&S.sub(f),f.props=b,f.state||(f.state={}),f.context=M,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),k&&f.__s==null&&(f.__s=f.state),k&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ie({},f.__s)),ie(f.__s,O.getDerivedStateFromProps(b,f.__s))),g=f.props,_=f.state,f.__v=e,m)k&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),k&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(k&&O.getDerivedStateFromProps==null&&b!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(b,M),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(b,f.__s,M)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(f.props=b,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(J){J&&(J.__=e)}),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[],f.__h.length&&s.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(b,f.__s,M),k&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,_,v)})}if(f.context=M,f.props=b,f.__P=t,f.__e=!1,R=j.__r,N=0,k){for(f.state=f.__s,f.__d=!1,R&&R(e),l=f.render(f.props,f.state,f.context),P=0;P<f._sb.length;P++)f.__h.push(f._sb[P]);f._sb=[]}else do f.__d=!1,R&&R(e),l=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++N<25);f.state=f.__s,f.getChildContext!=null&&(r=ie(ie({},r),f.getChildContext())),k&&!m&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,_)),a=Qs(t,sr(I=l!=null&&l.type===tt&&l.key==null?l.props.children:l)?I:[I],e,n,r,i,o,s,a,c,h),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),x&&(f.__E=f.__=null)}catch(J){if(e.__v=null,c||o!=null)if(J.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(D=o.length;D--;)fi(o[D]);else e.__e=n.__e,e.__k=n.__k;j.__e(J,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=zh(n.__e,e,n,r,i,o,s,c,h);return(l=j.diffed)&&l(e),128&e.__u?void 0:a}function ra(t,e,n){for(var r=0;r<n.length;r++)gi(n[r],n[++r],n[++r]);j.__c&&j.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){j.__e(o,i.__v)}})}function zh(t,e,n,r,i,o,s,a,c){var h,l,f,m,g,_,v,x=n.props,b=e.props,k=e.type;if(k=="svg"?i="http://www.w3.org/2000/svg":k=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(h=0;h<o.length;h++)if((g=o[h])&&"setAttribute"in g==!!k&&(k?g.localName==k:g.nodeType==3)){t=g,o[h]=null;break}}if(t==null){if(k==null)return document.createTextNode(b);t=document.createElementNS(i,k,b.is&&b),a&&(j.__m&&j.__m(e,o),a=!1),o=null}if(k===null)x===b||a&&t.data===b||(t.data=b);else{if(o=o&&wn.call(t.childNodes),x=n.props||vn,!a&&o!=null)for(x={},h=0;h<t.attributes.length;h++)x[(g=t.attributes[h]).name]=g.value;for(h in x)if(g=x[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=g;else if(!(h in b)){if(h=="value"&&"defaultValue"in b||h=="checked"&&"defaultChecked"in b)continue;cr(t,h,null,g,i)}}for(h in b)g=b[h],h=="children"?m=g:h=="dangerouslySetInnerHTML"?l=g:h=="value"?_=g:h=="checked"?v=g:a&&typeof g!="function"||x[h]===g||cr(t,h,g,x[h],i);if(l)a||f&&(l.__html===f.__html||l.__html===t.innerHTML)||(t.innerHTML=l.__html),e.__k=[];else if(f&&(t.innerHTML=""),Qs(t,sr(m)?m:[m],e,n,r,k=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ue(n,0),a,c),o!=null)for(h=o.length;h--;)fi(o[h]);a||(h="value",k=="progress"&&_==null?t.removeAttribute("value"):_!==void 0&&(_!==t[h]||k=="progress"&&!_||k=="option"&&_!==x[h])&&cr(t,h,_,x[h],i),h="checked",v!==void 0&&v!==t[h]&&cr(t,h,v,x[h],i))}return t}function gi(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){j.__e(i,n)}}function ia(t,e,n){var r,i;if(j.unmount&&j.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||gi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){j.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&ia(r[i],e,n||typeof t.type!="function");n||fi(t.__e),t.__c=t.__=t.__e=void 0}function jh(t,e,n){return this.constructor(t,n)}function bn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),j.__&&j.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],mi(e,t=(!r&&n||e).__k=B(tt,null,[t]),i||vn,vn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?wn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),ra(o,t,s)}function oa(t,e){bn(t,e,oa)}function Hh(t,e,n){var r,i,o,s,a=ie({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!==void 0?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?wn.call(arguments,2):n),_n(t.type,a,r||t.key,i||t.ref,null)}function At(t,e){var n={__c:e="__cC"+Gs++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=new Set,(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.forEach(function(a){a.__e=!0,pi(a)})},this.sub=function(s){i.add(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}wn=Xs.slice,j={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},Ws=0,Nt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ie({},this.state),typeof t=="function"&&(t=t(ie({},n),this.props)),t&&ie(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),pi(this))},Nt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),pi(this))},Nt.prototype.render=tt,be=[],qs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,li=function(t,e){return t.__v.__b-e.__v.__b},ar.__r=0,Ys=/(PointerCapture)$|Capture$/i,ui=0,di=na(!1),hi=na(!0),Gs=0;var Wh=0;function w(t,e,n,r,i,o){e||(e={});var s,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?s=e[a]:c[a]=e[a];var h={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Wh,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return j.vnode&&j.vnode(h),h}var se,X,yi,sa,$e=0,aa=[],ot=j,ca=ot.__b,la=ot.__r,ua=ot.diffed,da=ot.__c,ha=ot.unmount,fa=ot.__;function xe(t,e){ot.__h&&ot.__h(X,t,$e||e),$e=0;var n=X.__H||(X.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function W(t){return $e=1,xn(ma,t)}function xn(t,e,n){var r=xe(se++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):ma(void 0,e),function(a){var c=r.__N?r.__N[0]:r.__[0],h=r.t(c,a);c!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.u)){var i=function(a,c,h){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(m){return!!m.__c});if(l.every(function(m){return!m.__N}))return!o||o.call(this,a,c,h);var f=r.__c.props!==a;return l.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,a,c,h)||f};X.u=!0;var o=X.shouldComponentUpdate,s=X.componentWillUpdate;X.componentWillUpdate=function(a,c,h){if(this.__e){var l=o;o=void 0,i(a,c,h),o=l}s&&s.call(this,a,c,h)},X.shouldComponentUpdate=i}return r.__N||r.__}function U(t,e){var n=xe(se++,3);!ot.__s&&_i(n.__H,e)&&(n.__=t,n.i=e,X.__H.__h.push(n))}function ae(t,e){var n=xe(se++,4);!ot.__s&&_i(n.__H,e)&&(n.__=t,n.i=e,X.__h.push(n))}function F(t){return $e=5,_t(function(){return{current:t}},[])}function Cn(t,e,n){$e=6,ae(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function _t(t,e){var n=xe(se++,7);return _i(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function et(t,e){return $e=8,_t(function(){return t},e)}function ft(t){var e=X.context[t.__c],n=xe(se++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(X)),e.props.value):t.__}function wi(t,e){ot.useDebugValue&&ot.useDebugValue(e?e(t):t)}function Kh(t){var e=xe(se++,10),n=W();return e.__=t,X.componentDidCatch||(X.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function ze(){var t=xe(se++,11);if(!t.__){for(var e=X.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function qh(){for(var t;t=aa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lr),t.__H.__h.forEach(vi),t.__H.__h=[]}catch(e){t.__H.__h=[],ot.__e(e,t.__v)}}ot.__b=function(t){X=null,ca&&ca(t)},ot.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),fa&&fa(t,e)},ot.__r=function(t){la&&la(t),se=0;var e=(X=t.__c).__H;e&&(yi===X?(e.__h=[],X.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(lr),e.__h.forEach(vi),e.__h=[],se=0)),yi=X},ot.diffed=function(t){ua&&ua(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(aa.push(e)!==1&&sa===ot.requestAnimationFrame||((sa=ot.requestAnimationFrame)||Yh)(qh)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),yi=X=null},ot.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lr),n.__h=n.__h.filter(function(r){return!r.__||vi(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],ot.__e(r,n.__v)}}),da&&da(t,e)},ot.unmount=function(t){ha&&ha(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{lr(r)}catch(i){e=i}}),n.__H=void 0,e&&ot.__e(e,n.__v))};var pa=typeof requestAnimationFrame=="function";function Yh(t){var e,n=function(){clearTimeout(r),pa&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);pa&&(e=requestAnimationFrame(n))}function lr(t){var e=X,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),X=e}function vi(t){var e=X;t.__c=t.__(),X=e}function _i(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function ma(t,e){return typeof e=="function"?e(t):e}function ga(t,e){for(var n in e)t[n]=e[n];return t}function bi(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function xi(t,e){var n=e(),r=W({t:{__:n,u:e}}),i=r[0].t,o=r[1];return ae(function(){i.__=n,i.u=e,Ci(i)&&o({t:i})},[t,n,e]),U(function(){return Ci(i)&&o({t:i}),t(function(){Ci(i)&&o({t:i})})},[t]),n}function Ci(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function ki(t){t()}function Ei(t){return t}function Si(){return[!1,ki]}var kn=ae;function ur(t,e){this.props=t,this.context=e}function ya(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:bi(this.props,i)}function r(i){return this.shouldComponentUpdate=n,B(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ur.prototype=new Nt).isPureReactComponent=!0,ur.prototype.shouldComponentUpdate=function(t,e){return bi(this.props,t)||bi(this.state,e)};var wa=j.__b;j.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),wa&&wa(t)};var Gh=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function fe(t){function e(n){var r=ga({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Gh,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var va=function(t,e){return t==null?null:oe(oe(t).map(e))},Ti={map:va,forEach:va,count:function(t){return t?oe(t).length:0},only:function(t){var e=oe(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:oe},Xh=j.__e;j.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Xh(t,e,n,r)};var _a=j.unmount;function ba(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=ga({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return ba(r,e,n)})),t}function xa(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return xa(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function En(){this.__u=0,this.o=null,this.__b=null}function Ca(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ka(t){var e,n,r;function i(o){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return B(n,o)}return i.displayName="Lazy",i.__f=!0,i}function je(){this.i=null,this.l=null}j.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),_a&&_a(t)},(En.prototype=new Nt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Ca(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=xa(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.o.pop();)h.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},En.prototype.componentWillUnmount=function(){this.o=[]},En.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ba(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&B(tt,null,t.fallback);return i&&(i.__u&=-33),[B(tt,null,e.__a?null:t.children),i]};var Ea=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Zh(t){return this.getChildContext=function(){return t.context},t.children}function Jh(t){var e=this,n=t.h;e.componentWillUnmount=function(){bn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),e.v||(e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),e.h.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.h.insertBefore(r,i)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}),bn(B(Zh,{context:e.context},t.__v),e.v)}function Ai(t,e){var n=B(Jh,{__v:t,h:e});return n.containerInfo=e,n}(je.prototype=new Nt).__a=function(t){var e=this,n=Ca(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Ea(e,t,r)):i()};n?n(o):o()}},je.prototype.render=function(t){this.i=null,this.l=new Map;var e=oe(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},je.prototype.componentDidUpdate=je.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ea(t,n,e)})};var Sa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qh=/^(?: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]/,tf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ef=/[A-Z0-9]/g,nf=typeof document<"u",rf=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Ta(t,e,n){return e.__k==null&&(e.textContent=""),bn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Aa(t,e,n){return oa(t,e),typeof n=="function"&&n(),t?t.__c:null}Nt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Nt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Pa=j.event;function of(){}function sf(){return this.cancelBubble}function af(){return this.defaultPrevented}j.event=function(t){return Pa&&(t=Pa(t)),t.persist=of,t.isPropagationStopped=sf,t.isDefaultPrevented=af,t.nativeEvent=t};var Pi,cf={enumerable:!1,configurable:!0,get:function(){return this.class}},Ia=j.vnode;j.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||nf&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||rf(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":tf.test(s)&&(s=c):c=s="oninput":o&&Qh.test(s)?s=s.replace(ef,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&i[s=c]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=oe(n.children).forEach(function(h){h.props.selected=i.value.indexOf(h.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=oe(n.children).forEach(function(h){h.props.selected=i.multiple?i.defaultValue.indexOf(h.props.value)!=-1:i.defaultValue==h.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",cf)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=Sa,Ia&&Ia(t)};var Ma=j.__r;j.__r=function(t){Ma&&Ma(t),Pi=t.__c};var Ra=j.diffed;j.diffed=function(t){Ra&&Ra(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Pi=null};var Na={ReactCurrentDispatcher:{current:{readContext:function(t){return Pi.__n[t.__c].props.value},useCallback:et,useContext:ft,useDebugValue:wi,useDeferredValue:Ei,useEffect:U,useId:ze,useImperativeHandle:Cn,useInsertionEffect:kn,useLayoutEffect:ae,useMemo:_t,useReducer:xn,useRef:F,useState:W,useSyncExternalStore:xi,useTransition:Si}}},Da="18.3.1";function La(t){return B.bind(null,t)}function He(t){return!!t&&t.$$typeof===Sa}function Ba(t){return He(t)&&t.type===tt}function Oa(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Ii(t){return He(t)?Hh.apply(null,arguments):t}function Fa(t){return!!t.__k&&(bn(null,t),!0)}function Va(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ua=function(t,e){return t(e)},$a=function(t,e){return t(e)},za=tt,ja=He,We={useState:W,useId:ze,useReducer:xn,useEffect:U,useLayoutEffect:ae,useInsertionEffect:kn,useTransition:Si,useDeferredValue:Ei,useSyncExternalStore:xi,startTransition:ki,useRef:F,useImperativeHandle:Cn,useMemo:_t,useCallback:et,useContext:ft,useDebugValue:wi,version:"18.3.1",Children:Ti,render:Ta,hydrate:Aa,unmountComponentAtNode:Fa,createPortal:Ai,createElement:B,createContext:At,createFactory:La,cloneElement:Ii,createRef:Zs,Fragment:tt,isValidElement:He,isElement:ja,isFragment:Ba,isMemo:Oa,findDOMNode:Va,Component:Nt,PureComponent:ur,memo:ya,forwardRef:fe,flushSync:$a,unstable_batchedUpdates:Ua,StrictMode:za,Suspense:En,SuspenseList:je,lazy:ka,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Na};const lf=Object.freeze(Object.defineProperty({__proto__:null,Children:Ti,Component:Nt,Fragment:tt,PureComponent:ur,StrictMode:za,Suspense:En,SuspenseList:je,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Na,cloneElement:Ii,createContext:At,createElement:B,createFactory:La,createPortal:Ai,createRef:Zs,default:We,findDOMNode:Va,flushSync:$a,forwardRef:fe,hydrate:Aa,isElement:ja,isFragment:Ba,isMemo:Oa,isValidElement:He,lazy:ka,memo:ya,render:Ta,startTransition:ki,unmountComponentAtNode:Fa,unstable_batchedUpdates:Ua,useCallback:et,useContext:ft,useDebugValue:wi,useDeferredValue:Ei,useEffect:U,useErrorBoundary:Kh,useId:ze,useImperativeHandle:Cn,useInsertionEffect:kn,useLayoutEffect:ae,useMemo:_t,useReducer:xn,useRef:F,useState:W,useSyncExternalStore:xi,useTransition:Si,version:Da},Symbol.toStringTag,{value:"Module"})),uf='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,*:before,*:after{border-color:hsl(var(--border))}#deskcord-shadow-container{color:hsl(var(--foreground));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.dc-scroll{scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color .3s ease}.dc-scroll.dc-scroll--active{scrollbar-color:rgba(0,0,0,.25) transparent}.dc-scroll::-webkit-scrollbar{width:6px}.dc-scroll::-webkit-scrollbar-track{background:transparent}.dc-scroll::-webkit-scrollbar-thumb{background-color:transparent;border-radius:9999px;-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.dc-scroll.dc-scroll--active::-webkit-scrollbar-thumb{background-color:#00000040}.dark .dc-scroll.dc-scroll--active{scrollbar-color:rgba(255,255,255,.3) transparent}.dark .dc-scroll.dc-scroll--active::-webkit-scrollbar-thumb{background-color:#ffffff4d}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.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}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-0\\.5{bottom:-.125rem}.-end-0\\.5{inset-inline-end:-.125rem}.bottom-0{bottom:0}.bottom-\\[22\\%\\]{bottom:22%}.bottom-full{bottom:100%}.end-0{inset-inline-end:0px}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-full{top:100%}.z-20{z-index:20}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-\\[3px\\]{margin-top:3px;margin-bottom:3px}.\\!me-1{margin-inline-end:.25rem!important}.\\!me-1\\.5{margin-inline-end:.375rem!important}.\\!ms-auto{margin-inline-start:auto!important}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.me-11{margin-inline-end:2.75rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms-0\\.5{margin-inline-start:.125rem}.ms-2{margin-inline-start:.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.size-2\\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-9{width:2.25rem;height:2.25rem}.size-\\[32px\\]{width:32px;height:32px}.\\!h-2\\.5{height:.625rem!important}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[10px\\]{height:10px}.h-\\[33px\\]{height:33px}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.min-h-\\[55px\\]{min-height:55px}.\\!w-2\\.5{width:.625rem!important}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\\[33px\\]{width:33px}.w-\\[40px\\]{width:40px}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[300px\\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50%;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))}.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 slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-in{animation:slide-in .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-.5rem * var(--tw-space-x-reverse));margin-left:calc(-.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-\\[3px\\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3px * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.\\!rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.\\!border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity))!important}.border-current{border-color:currentColor}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity: 1;border-top-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\\[var\\(--dc-primary\\)\\]{background-color:var(--dc-primary)}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.fill-black{fill:#000}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.ps-11{padding-inline-start:2.75rem}.ps-3\\.5{padding-inline-start:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-end{text-align:end}.align-bottom{vertical-align:bottom}.\\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-\\[7px\\]{font-size:7px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg\\/5{font-size:1.125rem;line-height:1.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/3{font-size:.875rem;line-height:.75rem}.text-xs,.text-xs\\/4{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-\\[11px\\]{line-height:11px}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.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)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--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(3px + 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)}.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)}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.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)}.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)}.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)}.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}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}:host,#deskcord-shadow-container{overflow-x:hidden;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--dc-primary: #7289DA;--dc-primary-mid: #5B6EAB;--dc-primary-dark: #22252A}.dark,:host(.dark) #deskcord-shadow-container{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-\\[var\\(--dc-primary-mid\\)\\]:hover{background-color:var(--dc-primary-mid)}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--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)}.focus\\:ring-\\[var\\(--dc-primary\\)\\]:focus{--tw-ring-color: var(--dc-primary)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:transform-none:disabled{transform:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.selected .hs-combo-box-selected\\:block,.selected.hs-combo-box-selected\\:block{display:block}.complete .hs-file-upload-complete\\:bg-green-600,.complete.hs-file-upload-complete\\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.dark\\:\\!border-neutral-700:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity))!important}.dark\\:border-neutral-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}.dark\\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:border-neutral-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity))}.dark\\:\\!bg-neutral-800:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(38 38 38 / var(--tw-bg-opacity))!important}.dark\\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:bg-neutral-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity))}.dark\\:bg-neutral-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\\:fill-neutral-200:is(.dark *){fill:#e5e5e5}.dark\\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-neutral-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500:is(.dark *){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-neutral-600:is(.dark *){--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:ring-neutral-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity))}.dark\\:hover\\:bg-neutral-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}',df=".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:none;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_opacity,1);transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;transform:translate(-50%) translateY(-50%)}.yarl__slide_loading{animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px);-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",Mi=At({});function Ri(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Ni=typeof window<"u",Ha=Ni?ae:U,dr=At(null);function Di(t,e){t.indexOf(e)===-1&&t.push(e)}function Li(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ce=(t,e,n)=>n>e?e:n<t?t:n;let hr=()=>{};const le={},Wa=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ka(t){return typeof t=="object"&&t!==null}const qa=t=>/^0[^.\s]+$/u.test(t);function Bi(t){let e;return()=>(e===void 0&&(e=t()),e)}const Vt=t=>t,hf=(t,e)=>n=>e(t(n)),Sn=(...t)=>t.reduce(hf),Tn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Oi{constructor(){this.subscriptions=[]}add(e){return Di(this.subscriptions,e),()=>Li(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xt=t=>t*1e3,Zt=t=>t/1e3;function Ya(t,e){return e?t*(1e3/e):0}const Ga=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ff=1e-7,pf=12;function mf(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Ga(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>ff&&++a<pf);return s}function An(t,e,n,r){if(t===e&&n===r)return Vt;const i=o=>mf(o,0,1,t,n);return o=>o===0||o===1?o:Ga(i(o),e,r)}const Xa=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Za=t=>e=>1-t(1-e),Ja=An(.33,1.53,.69,.99),Fi=Za(Ja),Qa=Xa(Fi),tc=t=>(t*=2)<1?.5*Fi(t):.5*(2-Math.pow(2,-10*(t-1))),Vi=t=>1-Math.sin(Math.acos(t)),ec=Za(Vi),nc=Xa(Vi),gf=An(.42,0,1,1),yf=An(0,0,.58,1),rc=An(.42,0,.58,1),wf=t=>Array.isArray(t)&&typeof t[0]!="number",ic=t=>Array.isArray(t)&&typeof t[0]=="number",oc={linear:Vt,easeIn:gf,easeInOut:rc,easeOut:yf,circIn:Vi,circInOut:nc,circOut:ec,backIn:Fi,backInOut:Qa,backOut:Ja,anticipate:tc},vf=t=>typeof t=="string",sc=t=>{if(ic(t)){hr(t.length===4);const[e,n,r,i]=t;return An(e,n,r,i)}else if(vf(t))return hr(oc[t]!==void 0),oc[t];return t},fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ac={value:null,addProjectionMetrics:null};function _f(t,e){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function h(f){s.has(f)&&(l.schedule(f),t()),c++,f(a)}const l={schedule:(f,m=!1,g=!1)=>{const v=g&&i?n:r;return m&&s.add(f),v.has(f)||v.add(f),f},cancel:f=>{r.delete(f),s.delete(f)},process:f=>{if(a=f,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(h),e&&ac.value&&ac.value.frameloop[e].push(c),c=0,n.clear(),i=!1,o&&(o=!1,l.process(f))}};return l}const bf=40;function cc(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=fr.reduce((S,M)=>(S[M]=_f(o,e?M:void 0),S),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:l,update:f,preRender:m,render:g,postRender:_}=s,v=()=>{const S=le.useManualTiming?i.timestamp:performance.now();n=!1,le.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,bf),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),c.process(i),h.process(i),l.process(i),f.process(i),m.process(i),g.process(i),_.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(v))},x=()=>{n=!0,r=!0,i.isProcessing||t(v)};return{schedule:fr.reduce((S,M)=>{const T=s[M];return S[M]=(R,N=!1,P=!1)=>(n||x(),T.schedule(R,N,P)),S},{}),cancel:S=>{for(let M=0;M<fr.length;M++)s[fr[M]].cancel(S)},state:i,steps:s}}const{schedule:rt,cancel:pe,state:kt,steps:Ui}=cc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Vt,!0);let pr;function xf(){pr=void 0}const Mt={now:()=>(pr===void 0&&Mt.set(kt.isProcessing||le.useManualTiming?kt.timestamp:performance.now()),pr),set:t=>{pr=t,queueMicrotask(xf)}},lc=t=>e=>typeof e=="string"&&e.startsWith(t),$i=lc("--"),Cf=lc("var(--"),zi=t=>Cf(t)?kf.test(t.split("/*")[0].trim()):!1,kf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ke={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pn={...Ke,transform:t=>ce(0,1,t)},mr={...Ke,default:1},In=t=>Math.round(t*1e5)/1e5,ji=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ef(t){return t==null}const Sf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hi=(t,e)=>n=>!!(typeof n=="string"&&Sf.test(n)&&n.startsWith(t)||e&&!Ef(n)&&Object.prototype.hasOwnProperty.call(n,e)),uc=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(ji);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Tf=t=>ce(0,255,t),Wi={...Ke,transform:t=>Math.round(Tf(t))},Ce={test:Hi("rgb","red"),parse:uc("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Wi.transform(t)+", "+Wi.transform(e)+", "+Wi.transform(n)+", "+In(Pn.transform(r))+")"};function Af(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ki={test:Hi("#"),parse:Af,transform:Ce.transform},Mn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),me=Mn("deg"),Jt=Mn("%"),V=Mn("px"),Pf=Mn("vh"),If=Mn("vw"),dc={...Jt,parse:t=>Jt.parse(t)/100,transform:t=>Jt.transform(t*100)},qe={test:Hi("hsl","hue"),parse:uc("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Jt.transform(In(e))+", "+Jt.transform(In(n))+", "+In(Pn.transform(r))+")"},gt={test:t=>Ce.test(t)||Ki.test(t)||qe.test(t),parse:t=>Ce.test(t)?Ce.parse(t):qe.test(t)?qe.parse(t):Ki.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ce.transform(t):qe.transform(t),getAnimatableNone:t=>{const e=gt.parse(t);return e.alpha=0,gt.transform(e)}},Mf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Rf(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ji))==null?void 0:e.length)||0)+(((n=t.match(Mf))==null?void 0:n.length)||0)>0}const hc="number",fc="color",Nf="var",Df="var(",pc="${}",Lf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rn(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Lf,c=>(gt.test(c)?(r.color.push(o),i.push(fc),n.push(gt.parse(c))):c.startsWith(Df)?(r.var.push(o),i.push(Nf),n.push(c)):(r.number.push(o),i.push(hc),n.push(parseFloat(c))),++o,pc)).split(pc);return{values:n,split:a,indexes:r,types:i}}function mc(t){return Rn(t).values}function gc(t){const{split:e,types:n}=Rn(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===hc?o+=In(i[s]):a===fc?o+=gt.transform(i[s]):o+=i[s]}return o}}const Bf=t=>typeof t=="number"?0:gt.test(t)?gt.getAnimatableNone(t):t;function Of(t){const e=mc(t);return gc(t)(e.map(Bf))}const ge={test:Rf,parse:mc,createTransformer:gc,getAnimatableNone:Of};function qi(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ff({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=qi(c,a,t+1/3),o=qi(c,a,t),s=qi(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function gr(t,e){return n=>n>0?e:t}const st=(t,e,n)=>t+(e-t)*n,Yi=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Vf=[Ki,Ce,qe],Uf=t=>Vf.find(e=>e.test(t));function yc(t){const e=Uf(t);if(!e)return!1;let n=e.parse(t);return e===qe&&(n=Ff(n)),n}const wc=(t,e)=>{const n=yc(t),r=yc(e);if(!n||!r)return gr(t,e);const i={...n};return o=>(i.red=Yi(n.red,r.red,o),i.green=Yi(n.green,r.green,o),i.blue=Yi(n.blue,r.blue,o),i.alpha=st(n.alpha,r.alpha,o),Ce.transform(i))},Gi=new Set(["none","hidden"]);function $f(t,e){return Gi.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function zf(t,e){return n=>st(t,e,n)}function Xi(t){return typeof t=="number"?zf:typeof t=="string"?zi(t)?gr:gt.test(t)?wc:Wf:Array.isArray(t)?vc:typeof t=="object"?gt.test(t)?wc:jf:gr}function vc(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Xi(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function jf(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Xi(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Hf(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],s=t.indexes[o][r[o]],a=t.values[s]??0;n[i]=a,r[o]++}return n}const Wf=(t,e)=>{const n=ge.createTransformer(e),r=Rn(t),i=Rn(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gi.has(t)&&!i.values.length||Gi.has(e)&&!r.values.length?$f(t,e):Sn(vc(Hf(r,i),i.values),n):gr(t,e)};function _c(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?st(t,e,n):Xi(t)(t,e)}const Kf=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>rt.update(e,n),stop:()=>pe(e),now:()=>kt.isProcessing?kt.timestamp:Mt.now()}},bc=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)r+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},yr=2e4;function Zi(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<yr;)e+=n,r=t.next(e);return e>=yr?1/0:e}function qf(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(Zi(r),yr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:Zt(i)}}const Yf=5;function xc(t,e,n){const r=Math.max(e-Yf,0);return Ya(n-t(r),e-r)}const lt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ji=.001;function Gf({duration:t=lt.duration,bounce:e=lt.bounce,velocity:n=lt.velocity,mass:r=lt.mass}){let i,o,s=1-e;s=ce(lt.minDamping,lt.maxDamping,s),t=ce(lt.minDuration,lt.maxDuration,Zt(t)),s<1?(i=h=>{const l=h*s,f=l*t,m=l-n,g=Qi(h,s),_=Math.exp(-f);return Ji-m/g*_},o=h=>{const f=h*s*t,m=f*n+n,g=Math.pow(s,2)*Math.pow(h,2)*t,_=Math.exp(-f),v=Qi(Math.pow(h,2),s);return(-i(h)+Ji>0?-1:1)*((m-g)*_)/v}):(i=h=>{const l=Math.exp(-h*t),f=(h-n)*t+1;return-Ji+l*f},o=h=>{const l=Math.exp(-h*t),f=(n-h)*(t*t);return l*f});const a=5/t,c=Zf(i,o,a);if(t=Xt(t),isNaN(c))return{stiffness:lt.stiffness,damping:lt.damping,duration:t};{const h=Math.pow(c,2)*r;return{stiffness:h,damping:s*2*Math.sqrt(r*h),duration:t}}}const Xf=12;function Zf(t,e,n){let r=n;for(let i=1;i<Xf;i++)r=r-t(r)/e(r);return r}function Qi(t,e){return t*Math.sqrt(1-e*e)}const Jf=["duration","bounce"],Qf=["stiffness","damping","mass"];function Cc(t,e){return e.some(n=>t[n]!==void 0)}function tp(t){let e={velocity:lt.velocity,stiffness:lt.stiffness,damping:lt.damping,mass:lt.mass,isResolvedFromDuration:!1,...t};if(!Cc(t,Qf)&&Cc(t,Jf))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*ce(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:lt.mass,stiffness:i,damping:o}}else{const n=Gf(t);e={...e,...n,mass:lt.mass},e.isResolvedFromDuration=!0}return e}function wr(t=lt.visualDuration,e=lt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:h,mass:l,duration:f,velocity:m,isResolvedFromDuration:g}=tp({...n,velocity:-Zt(n.velocity||0)}),_=m||0,v=h/(2*Math.sqrt(c*l)),x=s-o,b=Zt(Math.sqrt(c/l)),k=Math.abs(x)<5;r||(r=k?lt.restSpeed.granular:lt.restSpeed.default),i||(i=k?lt.restDelta.granular:lt.restDelta.default);let S;if(v<1){const T=Qi(b,v);S=R=>{const N=Math.exp(-v*b*R);return s-N*((_+v*b*x)/T*Math.sin(T*R)+x*Math.cos(T*R))}}else if(v===1)S=T=>s-Math.exp(-b*T)*(x+(_+b*x)*T);else{const T=b*Math.sqrt(v*v-1);S=R=>{const N=Math.exp(-v*b*R),P=Math.min(T*R,300);return s-N*((_+v*b*x)*Math.sinh(P)+T*x*Math.cosh(P))/T}}const M={calculatedDuration:g&&f||null,next:T=>{const R=S(T);if(g)a.done=T>=f;else{let N=T===0?_:0;v<1&&(N=T===0?Xt(_):xc(S,T,R));const P=Math.abs(N)<=r,I=Math.abs(s-R)<=i;a.done=P&&I}return a.value=a.done?s:R,a},toString:()=>{const T=Math.min(Zi(M),yr),R=bc(N=>M.next(T*N).value,T,30);return T+"ms "+R},toTransition:()=>{}};return M}wr.applyToOptions=t=>{const e=qf(t,100,wr);return t.ease=e.ease,t.duration=Xt(e.duration),t.type="keyframes",t};function to({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:h=.5,restSpeed:l}){const f=t[0],m={done:!1,value:f},g=P=>a!==void 0&&P<a||c!==void 0&&P>c,_=P=>a===void 0?c:c===void 0||Math.abs(a-P)<Math.abs(c-P)?a:c;let v=n*e;const x=f+v,b=s===void 0?x:s(x);b!==x&&(v=b-f);const k=P=>-v*Math.exp(-P/r),S=P=>b+k(P),M=P=>{const I=k(P),D=S(P);m.done=Math.abs(I)<=h,m.value=m.done?b:D};let T,R;const N=P=>{g(m.value)&&(T=P,R=wr({keyframes:[m.value,_(m.value)],velocity:xc(S,P,m.value),damping:i,stiffness:o,restDelta:h,restSpeed:l}))};return N(0),{calculatedDuration:null,next:P=>{let I=!1;return!R&&T===void 0&&(I=!0,M(P),N(P)),T!==void 0&&P>=T?R.next(P-T):(!I&&M(P),m)}}}function ep(t,e,n){const r=[],i=n||le.mix||_c,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||Vt:e;a=Sn(c,a)}r.push(a)}return r}function np(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(hr(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ep(e,r,i),c=a.length,h=l=>{if(s&&l<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const m=Tn(t[f],t[f+1],l);return a[f](m)};return n?l=>h(ce(t[0],t[o-1],l)):h}function rp(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Tn(0,e,r);t.push(st(n,1,i))}}function ip(t){const e=[0];return rp(e,t.length-1),e}function op(t,e){return t.map(n=>n*e)}function sp(t,e){return t.map(()=>e||rc).splice(0,t.length-1)}function Nn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=wf(r)?r.map(sc):sc(r),o={done:!1,value:e[0]},s=op(n&&n.length===e.length?n:ip(e),t),a=np(s,e,{ease:Array.isArray(i)?i:sp(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const ap=t=>t!==null;function eo(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(ap),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const cp={decay:to,inertia:to,tween:Nn,keyframes:Nn,spring:wr};function kc(t){typeof t.type=="string"&&(t.type=cp[t.type])}class no{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const lp=t=>t/100;class ro extends no{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Mt.now()&&this.tick(Mt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;kc(e);const{type:n=Nn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const c=n||Nn;c!==Nn&&typeof a[0]!="number"&&(this.mixKeyframes=Sn(lp,_c(a[0],a[1])),a=[0,100]);const h=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-s})),h.calculatedDuration===null&&(h.calculatedDuration=Zi(h));const{calculatedDuration:l}=h;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:l,repeat:f,repeatType:m,repeatDelay:g,type:_,onUpdate:v,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-h*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,M=r;if(f){const P=Math.min(this.currentTime,i)/a;let I=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(D=1-D,g&&(D-=g/a)):m==="mirror"&&(M=s)),S=ce(0,1,D)*a}const T=k?{done:!1,value:l[0]}:M.next(S);o&&(T.value=o(T.value));let{done:R}=T;!k&&c!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return N&&_!==to&&(T.value=eo(l,this.options,x,this.speed)),v&&v(T.value),N&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return Zt(this.calculatedDuration)}get time(){return Zt(this.currentTime)}set time(e){var n;e=Xt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Mt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Zt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Kf,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Mt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function up(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ke=t=>t*180/Math.PI,io=t=>{const e=ke(Math.atan2(t[1],t[0]));return oo(e)},dp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:io,rotateZ:io,skewX:t=>ke(Math.atan(t[1])),skewY:t=>ke(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},oo=t=>(t=t%360,t<0&&(t+=360),t),Ec=io,Sc=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Tc=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),hp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Sc,scaleY:Tc,scale:t=>(Sc(t)+Tc(t))/2,rotateX:t=>oo(ke(Math.atan2(t[6],t[5]))),rotateY:t=>oo(ke(Math.atan2(-t[2],t[0]))),rotateZ:Ec,rotate:Ec,skewX:t=>ke(Math.atan(t[4])),skewY:t=>ke(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function so(t){return t.includes("scale")?1:0}function ao(t,e){if(!t||t==="none")return so(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=hp,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dp,i=a}if(!i)return so(e);const o=r[e],s=i[1].split(",").map(pp);return typeof o=="function"?o(s):s[o]}const fp=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ao(n,e)};function pp(t){return parseFloat(t.trim())}const Ye=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(Ye),Ac=t=>t===Ke||t===V,mp=new Set(["x","y","z"]),gp=Ye.filter(t=>!mp.has(t));function yp(t){const e=[];return gp.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ee={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ao(e,"x"),y:(t,{transform:e})=>ao(e,"y")};Ee.translateX=Ee.x,Ee.translateY=Ee.y;const Se=new Set;let co=!1,lo=!1,uo=!1;function Pc(){if(lo){const t=Array.from(Se).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=yp(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}lo=!1,co=!1,Se.forEach(t=>t.complete(uo)),Se.clear()}function Ic(){Se.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(lo=!0)})}function wp(){uo=!0,Ic(),Pc(),uo=!1}class ho{constructor(e,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),co||(co=!0,rt.read(Ic),rt.resolveKeyframes(Pc))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}up(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vp=t=>t.startsWith("--");function _p(t,e,n){vp(e)?t.style.setProperty(e,n):t.style[e]=n}const bp=Bi(()=>window.ScrollTimeline!==void 0),xp={};function Cp(t,e){const n=Bi(t);return()=>xp[e]??n()}const Mc=Cp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dn=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Rc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Nc(t,e){if(t)return typeof t=="function"?Mc()?bc(t,e):"ease-out":ic(t)?Dn(t):Array.isArray(t)?t.map(n=>Nc(n,e)||Rc.easeOut):Rc[t]}function kp(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},h=void 0){const l={[e]:n};c&&(l.offset=c);const f=Nc(a,i);Array.isArray(f)&&(l.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return h&&(m.pseudoElement=h),t.animate(l,m)}function Dc(t){return typeof t=="function"&&"applyToOptions"in t}function Ep({type:t,...e}){return Dc(t)&&Mc()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Sp extends no{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,hr(typeof e.type!="string");const h=Ep(e);this.animation=kp(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=eo(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):_p(n,r,l),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Zt(Number(e))}get time(){return Zt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Xt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&bp()?(this.animation.timeline=e,Vt):n(this)}}const Lc={anticipate:tc,backInOut:Qa,circInOut:nc};function Tp(t){return t in Lc}function Ap(t){typeof t.ease=="string"&&Tp(t.ease)&&(t.ease=Lc[t.ease])}const Bc=10;class Pp extends Sp{constructor(e){Ap(e),kc(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ro({...s,autoplay:!1}),c=Xt(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-Bc).value,a.sample(c).value,Bc),a.stop()}}const Oc=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ge.test(t)||t==="0")&&!t.startsWith("url("));function Ip(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Mp(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=Oc(i,e),a=Oc(o,e);return!s||!a?!1:Ip(t)||(n==="spring"||Dc(n))&&r}function fo(t){t.duration=0,t.type}const Rp=new Set(["opacity","clipPath","filter","transform"]),Np=Bi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Dp(t){var l;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((l=e==null?void 0:e.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:h}=e.owner.getProps();return Np()&&n&&Rp.has(n)&&(n!=="transform"||!h)&&!c&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const Lp=40;class Bp extends no{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:h,element:l,...f}){var _;super(),this.stop=()=>{var v,x;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Mt.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:c,motionValue:h,element:l,...f},g=(l==null?void 0:l.KeyframeResolver)||ho;this.keyframeResolver=new g(a,(v,x,b)=>this.onKeyframesResolved(v,x,m,!b),c,h,l),(_=this.keyframeResolver)==null||_.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:h,onUpdate:l}=r;this.resolvedAt=Mt.now(),Mp(e,o,s,a)||((le.instantAnimations||!c)&&(l==null||l(eo(e,r,n))),e[0]=e[e.length-1],fo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Lp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},g=!h&&Dp(m)?new Pp({...m,element:m.motionValue.owner.current}):new ro(m);g.finished.then(()=>this.notifyFinished()).catch(Vt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),wp()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Op=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fp(t){const e=Op.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Fc(t,e,n=1){const[r,i]=Fp(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return Wa(s)?parseFloat(s):s}return zi(i)?Fc(i,e,n+1):i}function po(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Vc=new Set(["width","height","top","left","right","bottom",...Ye]),Vp={test:t=>t==="auto",parse:t=>t},Uc=t=>e=>e.test(t),$c=[Ke,V,Jt,me,If,Pf,Vp],zc=t=>$c.find(Uc(t));function Up(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||qa(t):!0}const $p=new Set(["brightness","contrast","saturate","opacity"]);function zp(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ji)||[];if(!r)return t;const i=n.replace(r,"");let o=$p.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const jp=/\b([a-z-]*)\(.*?\)/gu,mo={...ge,getAnimatableNone:t=>{const e=t.match(jp);return e?e.map(zp).join(" "):t}},jc={...Ke,transform:Math.round},go={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:me,rotateX:me,rotateY:me,rotateZ:me,scale:mr,scaleX:mr,scaleY:mr,scaleZ:mr,skew:me,skewX:me,skewY:me,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Pn,originX:dc,originY:dc,originZ:V},zIndex:jc,fillOpacity:Pn,strokeOpacity:Pn,numOctaves:jc},Hp={...go,color:gt,backgroundColor:gt,outlineColor:gt,fill:gt,stroke:gt,borderColor:gt,borderTopColor:gt,borderRightColor:gt,borderBottomColor:gt,borderLeftColor:gt,filter:mo,WebkitFilter:mo},Hc=t=>Hp[t];function Wc(t,e){let n=Hc(t);return n!==mo&&(n=ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Wp=new Set(["auto","none","0"]);function Kp(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Wp.has(o)&&Rn(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=Wc(n,i)}class qp extends ho{constructor(e,n,r,i,o){super(e,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),zi(h))){const l=Fc(h,n.current);l!==void 0&&(e[c]=l),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Vc.has(r)||e.length!==2)return;const[i,o]=e,s=zc(i),a=zc(o);if(s!==a)if(Ac(s)&&Ac(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else Ee[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Up(e[i]))&&r.push(i);r.length&&Kp(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ee[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ee[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,h])=>{e.getValue(c).set(h)}),this.resolveNoneKeyframes()}}function Yp(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Kc=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function qc(t){return Ka(t)&&"offsetHeight"in t}const Yc=30,Gp=t=>!isNaN(parseFloat(t));class Xp{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Mt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Mt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Gp(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Oi);const r=this.events[e].add(n);return e==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Mt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Yc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yc);return Ya(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xe(t,e){return new Xp(t,e)}const{schedule:yo,cancel:M_}=cc(queueMicrotask,!1),Wt={x:!1,y:!1};function Gc(){return Wt.x||Wt.y}function Zp(t){return t==="x"||t==="y"?Wt[t]?null:(Wt[t]=!0,()=>{Wt[t]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function Xc(t,e){const n=Yp(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Zc(t){return!(t.pointerType==="touch"||Gc())}function Jp(t,e,n={}){const[r,i,o]=Xc(t,n),s=a=>{if(!Zc(a))return;const{target:c}=a,h=e(c,a);if(typeof h!="function"||!c)return;const l=f=>{Zc(f)&&(h(f),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Jc=(t,e)=>e?t===e?!0:Jc(t,e.parentElement):!1,wo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Qp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tm(t){return Qp.has(t.tagName)||t.tabIndex!==-1}const vr=new WeakSet;function Qc(t){return e=>{e.key==="Enter"&&t(e)}}function vo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const em=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Qc(()=>{if(vr.has(n))return;vo(n,"down");const i=Qc(()=>{vo(n,"up")}),o=()=>vo(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function tl(t){return wo(t)&&!Gc()}function nm(t,e,n={}){const[r,i,o]=Xc(t,n),s=a=>{const c=a.currentTarget;if(!tl(a))return;vr.add(c);const h=e(c,a),l=(g,_)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),vr.has(c)&&vr.delete(c),tl(g)&&typeof h=="function"&&h(g,{success:_})},f=g=>{l(g,c===window||c===document||n.useGlobalTarget||Jc(c,g.target))},m=g=>{l(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),qc(a)&&(a.addEventListener("focus",h=>em(h,i)),!tm(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function el(t){return Ka(t)&&"ownerSVGElement"in t}function rm(t){return el(t)&&t.tagName==="svg"}const Et=t=>!!(t&&t.getVelocity),im=[...$c,gt,ge],om=t=>im.find(Uc(t)),_o=At({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class sm extends Nt{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=qc(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function am({children:t,isPresent:e,anchorX:n,root:r}){const i=ze(),o=F(null),s=F({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=ft(_o);return kn(()=>{const{width:c,height:h,top:l,left:f,right:m}=s.current;if(e||!o.current||!c||!h)return;const g=n==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=i;const _=document.createElement("style");a&&(_.nonce=a);const v=r??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
2
2
  [data-motion-pop-id="${i}"] {
3
3
  position: absolute !important;
4
4
  width: ${c}px !important;
@@ -6,77 +6,77 @@
6
6
  ${g}px !important;
7
7
  top: ${l}px !important;
8
8
  }
9
- `),()=>{v.contains(_)&&v.removeChild(_)}},[e]),w(im,{isPresent:e,childRef:o,sizeRef:s,children:Pi(t,{ref:o})})}const sm=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:c})=>{const h=Mi(am),l=ze();let f=!0,m=_t(()=>(f=!1,{id:l,initial:e,isPresent:n,custom:i,onExitComplete:g=>{h.set(g,!0);for(const _ of h.values())if(!_)return;r&&r()},register:g=>(h.set(g,!1),()=>h.delete(g))}),[n,h,r]);return o&&f&&(m={...m}),_t(()=>{h.forEach((g,_)=>h.set(_,!1))},[n]),U(()=>{!n&&!h.size&&r&&r()},[n]),s==="popLayout"&&(t=w(om,{isPresent:n,anchorX:a,root:c,children:t})),w(dr.Provider,{value:m,children:t})};function am(){return new Map}function tl(t=!0){const e=ft(dr);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=ze();U(()=>{if(t)return i(o)},[t]);const s=et(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const _r=t=>t.key||"";function el(t){const e=[];return Ei.forEach(t,n=>{He(n)&&e.push(n)}),e}const _o=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:c})=>{const[h,l]=tl(s),f=_t(()=>el(t),[t]),m=s&&!h?[]:f.map(_r),g=F(!0),_=F(f),v=Mi(()=>new Map),[x,b]=W(f),[k,E]=W(f);za(()=>{g.current=!1,_.current=f;for(let R=0;R<k.length;R++){const N=_r(k[R]);m.includes(N)?v.delete(N):v.get(N)!==!0&&v.set(N,!1)}},[k,m.length,m.join("-")]);const I=[];if(f!==x){let R=[...f];for(let N=0;N<k.length;N++){const P=k[N],M=_r(P);m.includes(M)||(R.splice(N,0,P),I.push(P))}return o==="wait"&&I.length&&(R=I),E(el(R)),b(f),null}const{forceRender:T}=ft(Ii);return w(tt,{children:k.map(R=>{const N=_r(R),P=s&&!h?!1:f===k||m.includes(N),M=()=>{if(v.has(N))v.set(N,!0);else return;let D=!0;v.forEach(O=>{O||(D=!1)}),D&&(T==null||T(),E(_.current),s&&(l==null||l()),r&&r())};return w(sm,{isPresent:P,initial:!g.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:P?void 0:M,anchorX:a,children:R},N)})})},nl=At({strict:!1}),rl={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"]},Ze={};for(const t in rl)Ze[t]={isEnabled:e=>rl[t].some(n=>!!e[n])};function cm(t){for(const e in t)Ze[e]={...Ze[e],...t[e]}}const lm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function br(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||lm.has(t)}let il=t=>!br(t);function um(t){typeof t=="function"&&(il=e=>e.startsWith("on")?!br(e):t(e))}try{um(require("@emotion/is-prop-valid").default)}catch{}function dm(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(il(i)||n===!0&&br(i)||!e&&!br(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const xr=At({});function Cr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ln(t){return typeof t=="string"||Array.isArray(t)}const bo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xo=["initial",...bo];function kr(t){return Cr(t.animate)||xo.some(e=>Ln(t[e]))}function ol(t){return!!(kr(t)||t.variants)}function hm(t,e){if(kr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(r)?r:void 0}}return t.inherit!==!1?e:{}}function fm(t){const{initial:e,animate:n}=hm(t,ft(xr));return _t(()=>({initial:e,animate:n}),[sl(e),sl(n)])}function sl(t){return Array.isArray(t)?t.join(" "):t}const Bn={};function pm(t){for(const e in t)Bn[e]=t[e],Ui(e)&&(Bn[e].isCSSVariable=!0)}function al(t,{layout:e,layoutId:n}){return Ge.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bn[t]||t==="opacity")}const mm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gm=Ye.length;function ym(t,e,n){let r="",i=!0;for(let o=0;o<gm;o++){const s=Ye[o],a=t[s];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(s.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const h=Hc(a,mo[s]);if(!c){i=!1;const l=mm[s]||s;r+=`${l}(${h}) `}n&&(e[s]=h)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function Co(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const c in e){const h=e[c];if(Ge.has(c)){s=!0;continue}else if(Ui(c)){i[c]=h;continue}else{const l=Hc(h,mo[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(e.transform||(s||n?r.transform=ym(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${h} ${l}`}}const ko=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cl(t,e,n){for(const r in e)!St(e[r])&&!al(r,n)&&(t[r]=e[r])}function wm({transformTemplate:t},e){return _t(()=>{const n=ko();return Co(n,e,t),Object.assign({},n.vars,n.style)},[e])}function vm(t,e){const n=t.style||{},r={};return cl(r,n,t),Object.assign(r,wm(t,e)),r}function _m(t,e){const n={},r=vm(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const bm={offset:"stroke-dashoffset",array:"stroke-dasharray"},xm={offset:"strokeDashoffset",array:"strokeDasharray"};function Cm(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?bm:xm;t[o.offset]=V.transform(-r);const s=V.transform(e),a=V.transform(n);t[o.array]=`${s} ${a}`}function ll(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},c,h,l){if(Co(t,a,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m}=t;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(l==null?void 0:l.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Cm(f,i,o,s,!1)}const ul=()=>({...ko(),attrs:{}}),dl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function km(t,e,n,r){const i=_t(()=>{const o=ul();return ll(o,e,dl(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};cl(o,t.style,t),i.style={...o,...i.style}}return i}const Sm=["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 So(t){return typeof t!="string"||t.includes("-")?!1:!!(Sm.indexOf(t)>-1||/[A-Z]/u.test(t))}function Em(t,e,n,{latestValues:r},i,o=!1){const a=(So(t)?km:_m)(e,r,i,t),c=dm(e,typeof t=="string",o),h=t!==tt?{...c,...a,ref:n}:{},{children:l}=e,f=_t(()=>St(l)?l.get():l,[l]);return B(t,{...h,children:f})}function hl(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Eo(t,e,n,r){if(typeof e=="function"){const[i,o]=hl(r);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=hl(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Sr(t){return St(t)?t.get():t}function Tm({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:Am(n,r,i,t),renderState:e()}}function Am(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Sr(o[m]);let{initial:s,animate:a}=t;const c=kr(t),h=ol(t);e&&h&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||s===!1;const f=l?a:s;if(f&&typeof f!="boolean"&&!Cr(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const _=Eo(t,m[g]);if(_){const{transitionEnd:v,transition:x,...b}=_;for(const k in b){let E=b[k];if(Array.isArray(E)){const I=l?E.length-1:0;E=E[I]}E!==null&&(i[k]=E)}for(const k in v)i[k]=v[k]}}}return i}const fl=t=>(e,n)=>{const r=ft(xr),i=ft(dr),o=()=>Tm(t,e,r,i);return n?o():Mi(o)};function To(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(St(r[s])||e.style&&St(e.style[s])||al(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const Pm=fl({scrapeMotionValuesFromProps:To,createRenderState:ko});function pl(t,e,n){const r=To(t,e,n);for(const i in t)if(St(t[i])||St(e[i])){const o=Ye.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const Im=fl({scrapeMotionValuesFromProps:pl,createRenderState:ul}),Mm=Symbol.for("motionComponentSymbol");function Je(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Rm(t,e,n){return et(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Je(n)&&(n.current=r))},[e])}const Ao=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ml="data-"+Ao("framerAppearId"),gl=At({});function Nm(t,e,n,r,i){var v,x;const{visualElement:o}=ft(xr),s=ft(nl),a=ft(dr),c=ft(vo).reducedMotion,h=F(null);r=r||s.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=h.current,f=ft(gl);l&&!l.projection&&i&&(l.type==="html"||l.type==="svg")&&Dm(h.current,n,i,f);const m=F(!1);kn(()=>{l&&m.current&&l.update(n,a)});const g=n[ml],_=F(!!g&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,g)));return za(()=>{l&&(m.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),_.current&&l.animationState&&l.animationState.animateChanges())}),U(()=>{l&&(!_.current&&l.animationState&&l.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,g)}),_.current=!1),l.enteringChildren=void 0)}),l}function Dm(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:h,layoutCrossfade:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:yl(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&Je(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:h})}function yl(t){if(t)return t.options.allowProjection!==!1?t.projection:yl(t.parent)}function Po(t,{forwardMotionProps:e=!1}={},n,r){n&&cm(n);const i=So(t)?Im:Pm;function o(a,c){let h;const l={...ft(vo),...a,layoutId:Lm(a)},{isStatic:f}=l,m=fm(a),g=i(a,f);if(!f&&Ri){Bm();const _=Om(l);h=_.MeasureLayout,m.visualElement=Nm(t,g,l,r,_.ProjectionNode)}return w(xr.Provider,{value:m,children:[h&&m.visualElement?w(h,{visualElement:m.visualElement,...l}):null,Em(t,a,Rm(g,m.visualElement,c),g,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=fe(o);return s[Mm]=t,s}function Lm({layoutId:t}){const e=ft(Ii).id;return e&&t!==void 0?e+"-"+t:t}function Bm(t,e){ft(nl).strict}function Om(t){const{drag:e,layout:n}=Ze;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Fm(t,e){if(typeof Proxy>"u")return Po;const n=new Map,r=(o,s)=>Po(o,s,t,e),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,Po(s,void 0,t,e)),n.get(s))})}function wl({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Vm({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Um(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Io(t){return t===void 0||t===1}function Mo({scale:t,scaleX:e,scaleY:n}){return!Io(t)||!Io(e)||!Io(n)}function Te(t){return Mo(t)||vl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function vl(t){return _l(t.x)||_l(t.y)}function _l(t){return t&&t!=="0%"}function Er(t,e,n){const r=t-n,i=e*r;return n+i}function bl(t,e,n,r,i){return i!==void 0&&(t=Er(t,i,r)),Er(t,n,r)+e}function Ro(t,e=0,n=1,r,i){t.min=bl(t.min,e,n,r,i),t.max=bl(t.max,e,n,r,i)}function xl(t,{x:e,y:n}){Ro(t.x,e.translate,e.scale,e.originPoint),Ro(t.y,n.translate,n.scale,n.originPoint)}const Cl=.999999999999,kl=1.0000000000001;function $m(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tn(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,xl(t,s)),r&&Te(o.latestValues)&&tn(t,o.latestValues))}e.x<kl&&e.x>Cl&&(e.x=1),e.y<kl&&e.y>Cl&&(e.y=1)}function Qe(t,e){t.min=t.min+e,t.max=t.max+e}function Sl(t,e,n,r,i=.5){const o=st(t.min,t.max,i);Ro(t,e,n,o,r)}function tn(t,e){Sl(t.x,e.x,e.scaleX,e.scale,e.originX),Sl(t.y,e.y,e.scaleY,e.scale,e.originY)}function El(t,e){return wl(Um(t.getBoundingClientRect(),e))}function zm(t,e,n){const r=El(t,n),{scroll:i}=e;return i&&(Qe(r.x,i.offset.x),Qe(r.y,i.offset.y)),r}const Tl=()=>({translate:0,scale:1,origin:0,originPoint:0}),en=()=>({x:Tl(),y:Tl()}),Al=()=>({min:0,max:0}),pt=()=>({x:Al(),y:Al()}),No={current:null},Pl={current:!1};function jm(){if(Pl.current=!0,!!Ri)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>No.current=t.matches;t.addEventListener("change",e),e()}else No.current=!1}const Hm=new WeakMap;function Wm(t,e,n){for(const r in e){const i=e[r],o=n[r];if(St(i))t.addValue(r,i);else if(St(o))t.addValue(r,Xe(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,Xe(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Il=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Km{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=uo,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.renderScheduledAt=0,this.scheduleRender=()=>{const m=Mt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,rt.render(this.render,!1,!0))};const{latestValues:c,renderState:h}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=h,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=kr(n),this.isVariantNode=ol(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&St(g)&&g.set(c[m])}}mount(e){var n;this.current=e,Hm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),Pl.current||jm(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:No.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),pe(this.notifyUpdate),pe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Ge.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ze){const n=Ze[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Il.length;r++){const i=Il[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Wm(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Xe(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(ja(r)||Wa(r))?r=parseFloat(r):!rm(r)&&ge.test(n)&&(r=jc(e,n)),this.setBaseTarget(e,St(r)?r.get():r)),St(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Eo(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!St(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Bi),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){go.render(this.render)}}class Ml extends Km{constructor(){super(...arguments),this.KeyframeResolver=Wp}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;St(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Rl(t,{style:e,vars:n},r,i){const o=t.style;let s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function qm(t){return window.getComputedStyle(t)}class Ym extends Ml{constructor(){super(...arguments),this.type="html",this.renderInstance=Rl}readValueFromInstance(e,n){var r;if(Ge.has(n))return(r=this.projection)!=null&&r.isProjecting?oo(n):dp(e,n);{const i=qm(e),o=(Ui(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return El(e,n)}build(e,n,r){Co(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return To(e,n,r)}}const Nl=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 Gm(t,e,n,r){Rl(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Nl.has(i)?i:Ao(i),e.attrs[i])}class Xm extends Ml{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ge.has(n)){const r=zc(n);return r&&r.default||0}return n=Nl.has(n)?n:Ao(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return pl(e,n,r)}build(e,n,r){ll(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){Gm(e,n,r,i)}mount(e){this.isSVGTag=dl(e.tagName),super.mount(e)}}const Zm=(t,e)=>So(t)?new Xm(e):new Ym(e,{allowProjection:t!==tt});function nn(t,e,n){const r=t.getProps();return Eo(r,e,n!==void 0?n:r.custom,t)}const Do=t=>Array.isArray(t);function Jm(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Xe(n))}function Qm(t){return Do(t)?t[t.length-1]||0:t}function t0(t,e){const n=nn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=Qm(o[s]);Jm(t,s,a)}}function e0(t){return!!(St(t)&&t.add)}function Lo(t,e){const n=t.getValue("willChange");if(e0(n))return n.add(e);if(!n&&le.WillChange){const r=new le.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Dl(t){return t.props[ml]}const n0=t=>t!==null;function r0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(n0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const i0={type:"spring",stiffness:500,damping:25,restSpeed:10},o0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),s0={type:"keyframes",duration:.8},a0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},c0=(t,{keyframes:e})=>e.length>2?s0:Ge.has(t)?t.startsWith("scale")?o0(e[1]):i0:a0;function l0({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:h,...l}){return!!Object.keys(l).length}const Bo=(t,e,n,r={},i,o)=>s=>{const a=fo(r,t)||{},c=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Xt(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};l0(a)||Object.assign(l,c0(t,l)),l.duration&&(l.duration=Xt(l.duration)),l.repeatDelay&&(l.repeatDelay=Xt(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(ho(l),l.delay===0&&(f=!0)),(le.instantAnimations||le.skipAnimations)&&(f=!0,ho(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const m=r0(l.keyframes,a);if(m!==void 0){rt.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new no(l):new Dp(l)};function u0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Ll(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const l in a){const f=t.getValue(l,t.latestValues[l]??null),m=a[l];if(m===void 0||h&&u0(h,l))continue;const g={delay:n,...fo(o||{},l)},_=f.get();if(_!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===_&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const b=Dl(t);if(b){const k=window.MotionHandoffAnimation(b,l,rt);k!==null&&(g.startTime=k,v=!0)}}Lo(t,l),f.start(Bo(l,f,m,t.shouldReduceMotion&&Oc.has(l)?{type:!1}:g,t,v));const x=f.animation;x&&c.push(x)}return s&&Promise.all(c).then(()=>{rt.update(()=>{s&&t0(t,s)})}),c}function Bl(t,e,n,r=0,i=1){const o=Array.from(t).sort((h,l)=>h.sortNodePosition(l)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Oo(t,e,n={}){var c;const r=nn(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Ll(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(h=0)=>{const{delayChildren:l=0,staggerChildren:f,staggerDirection:m}=i;return d0(t,e,h,l,f,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[h,l]=a==="beforeChildren"?[o,s]:[s,o];return h().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function d0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Oo(c,e,{...s,delay:n+(typeof r=="function"?0:r)+Bl(t.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function h0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Oo(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Oo(t,e,n);else{const i=typeof e=="function"?nn(t,e,n.custom):e;r=Promise.all(Ll(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Ol(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const f0=xo.length;function Fl(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Fl(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<f0;n++){const r=xo[n],i=t.props[r];(Ln(i)||i===!1)&&(e[r]=i)}return e}const p0=[...bo].reverse(),m0=bo.length;function g0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>h0(t,n,r)))}function y0(t){let e=g0(t),n=Vl(),r=!0;const i=c=>(h,l)=>{var m;const f=nn(t,l,c==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:g,transitionEnd:_,...v}=f;h={...h,...v,..._}}return h};function o(c){e=c(t)}function s(c){const{props:h}=t,l=Fl(t.parent)||{},f=[],m=new Set;let g={},_=1/0;for(let x=0;x<m0;x++){const b=p0[x],k=n[b],E=h[b]!==void 0?h[b]:l[b],I=Ln(E),T=b===c?k.isActive:null;T===!1&&(_=x);let R=E===l[b]&&E!==h[b]&&I;if(R&&r&&t.manuallyAnimateOnMount&&(R=!1),k.protectedKeys={...g},!k.isActive&&T===null||!E&&!k.prevProp||Cr(E)||typeof E=="boolean")continue;const N=w0(k.prevProp,E);let P=N||b===c&&k.isActive&&!R&&I||x>_&&I,M=!1;const D=Array.isArray(E)?E:[E];let O=D.reduce(i(b),{});T===!1&&(O={});const{prevResolvedValues:J={}}=k,at={...J,...O},Tt=z=>{P=!0,m.has(z)&&(M=!0,m.delete(z)),k.needsAnimating[z]=!0;const nt=t.getValue(z);nt&&(nt.liveStyle=!1)};for(const z in at){const nt=O[z],Ot=J[z];if(g.hasOwnProperty(z))continue;let Ht=!1;Do(nt)&&Do(Ot)?Ht=!Ol(nt,Ot):Ht=nt!==Ot,Ht?nt!=null?Tt(z):m.add(z):nt!==void 0&&m.has(z)?Tt(z):k.protectedKeys[z]=!0}k.prevProp=E,k.prevResolvedValues=O,k.isActive&&(g={...g,...O}),r&&t.blockInitialAnimation&&(P=!1);const $=R&&N;P&&(!$||M)&&f.push(...D.map(z=>{const nt={type:b};if(typeof z=="string"&&r&&!$&&t.manuallyAnimateOnMount&&t.parent){const{parent:Ot}=t,Ht=nn(Ot,z);if(Ot.enteringChildren&&Ht){const{delayChildren:q}=Ht.transition||{};nt.delay=Bl(Ot.enteringChildren,t,q)}}return{animation:z,options:nt}}))}if(m.size){const x={};if(typeof h.initial!="boolean"){const b=nn(t,Array.isArray(h.initial)?h.initial[0]:h.initial);b&&b.transition&&(x.transition=b.transition)}m.forEach(b=>{const k=t.getBaseTarget(b),E=t.getValue(b);E&&(E.liveStyle=!0),x[b]=k??null}),f.push({animation:x})}let v=!!f.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(v=!1),r=!1,v?e(f):Promise.resolve()}function a(c,h){var f;if(n[c].isActive===h)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(c,h)}),n[c].isActive=h;const l=s(c);for(const m in n)n[m].protectedKeys={};return l}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Vl(),r=!0}}}function w0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ol(e,t):!1}function Ae(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vl(){return{animate:Ae(!0),whileInView:Ae(),whileHover:Ae(),whileTap:Ae(),whileDrag:Ae(),whileFocus:Ae(),exit:Ae()}}class ye{constructor(e){this.isMounted=!1,this.node=e}update(){}}class v0 extends ye{constructor(e){super(e),e.animationState||(e.animationState=y0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Cr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let _0=0;class b0 extends ye{constructor(){super(...arguments),this.id=_0++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const x0={animation:{Feature:v0},exit:{Feature:b0}};function On(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Fn(t){return{point:{x:t.pageX,y:t.pageY}}}const C0=t=>e=>yo(e)&&t(e,Fn(e));function Vn(t,e,n,r){return On(t,e,C0(n),r)}const Ul=1e-4,k0=1-Ul,S0=1+Ul,$l=.01,E0=0-$l,T0=0+$l;function Pt(t){return t.max-t.min}function A0(t,e,n){return Math.abs(t-e)<=n}function zl(t,e,n,r=.5){t.origin=r,t.originPoint=st(e.min,e.max,t.origin),t.scale=Pt(n)/Pt(e),t.translate=st(n.min,n.max,t.origin)-t.originPoint,(t.scale>=k0&&t.scale<=S0||isNaN(t.scale))&&(t.scale=1),(t.translate>=E0&&t.translate<=T0||isNaN(t.translate))&&(t.translate=0)}function Un(t,e,n,r){zl(t.x,e.x,n.x,r?r.originX:void 0),zl(t.y,e.y,n.y,r?r.originY:void 0)}function jl(t,e,n){t.min=n.min+e.min,t.max=t.min+Pt(e)}function P0(t,e,n){jl(t.x,e.x,n.x),jl(t.y,e.y,n.y)}function Hl(t,e,n){t.min=e.min-n.min,t.max=t.min+Pt(e)}function $n(t,e,n){Hl(t.x,e.x,n.x),Hl(t.y,e.y,n.y)}function Ut(t){return[t("x"),t("y")]}const Wl=({current:t})=>t?t.ownerDocument.defaultView:null,Kl=(t,e)=>Math.abs(t-e);function I0(t,e){const n=Kl(t.x,e.x),r=Kl(t.y,e.y);return Math.sqrt(n**2+r**2)}class ql{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Vo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,_=I0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!_)return;const{point:v}=m,{timestamp:x}=kt;this.history.push({...v,timestamp:x});const{onStart:b,onMove:k}=this.handlers;g||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Fo(g,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:_,onSessionEnd:v,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Vo(m.type==="pointercancel"?this.lastMoveEventInfo:Fo(g,this.transformPagePoint),this.history);this.startEvent&&_&&_(m,b),v&&v(m,b)},!yo(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=Fn(e),c=Fo(a,this.transformPagePoint),{point:h}=c,{timestamp:l}=kt;this.history=[{...h,timestamp:l}];const{onSessionStart:f}=n;f&&f(e,Vo(c,this.history)),this.removeListeners=En(Vn(this.contextWindow,"pointermove",this.handlePointerMove),Vn(this.contextWindow,"pointerup",this.handlePointerUp),Vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),pe(this.updatePoint)}}function Fo(t,e){return e?{point:e(t.point)}:t}function Yl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Vo({point:t},e){return{point:t,delta:Yl(t,Gl(e)),offset:Yl(t,M0(e)),velocity:R0(e,.1)}}function M0(t){return t[0]}function Gl(t){return t[t.length-1]}function R0(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Gl(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Xt(e)));)n--;if(!r)return{x:0,y:0};const o=Zt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function N0(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?st(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?st(n,t,r.max):Math.min(t,n)),t}function Xl(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function D0(t,{top:e,left:n,bottom:r,right:i}){return{x:Xl(t.x,n,i),y:Xl(t.y,e,r)}}function Zl(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function L0(t,e){return{x:Zl(t.x,e.x),y:Zl(t.y,e.y)}}function B0(t,e){let n=.5;const r=Pt(t),i=Pt(e);return i>r?n=Tn(e.min,e.max-r,t.min):r>i&&(n=Tn(t.min,t.max-i,e.min)),ce(0,1,n)}function O0(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Uo=.35;function F0(t=Uo){return t===!1?t=0:t===!0&&(t=Uo),{x:Jl(t,"left","right"),y:Jl(t,"top","bottom")}}function Jl(t,e,n){return{min:Ql(t,e),max:Ql(t,n)}}function Ql(t,e){return typeof t=="number"?t:t[e]||0}const V0=new WeakMap;class U0{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fn(f).point)},s=(f,m)=>{const{drag:g,dragPropagation:_,onDragStart:v}=this.getProps();if(g&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Gp(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ut(b=>{let k=this.getAxisMotionValue(b).get()||0;if(Jt.test(k)){const{projection:E}=this.visualElement;if(E&&E.layout){const I=E.layout.layoutBox[b];I&&(k=Pt(I)*(parseFloat(k)/100))}}this.originPoint[b]=k}),v&&rt.postRender(()=>v(f,m)),Lo(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:_,onDirectionLock:v,onDrag:x}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:b}=m;if(_&&this.currentDirection===null){this.currentDirection=$0(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,b),this.updateAxis("y",m.point,b),this.visualElement.render(),x&&x(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Ut(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new ql(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:Wl(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&rt.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Tr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=N0(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Je(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=D0(r.layoutBox,e):this.constraints=!1,this.elastic=F0(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ut(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=O0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Je(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zm(r,i.root,this.visualElement.getTransformPagePoint());let s=L0(i.layout.layoutBox,o);if(n){const a=n(Vm(s));this.hasMutatedConstraints=!!a,a&&(s=wl(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},h=Ut(l=>{if(!Tr(l,n,this.currentDirection))return;let f=c&&c[l]||{};s&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,_={type:"inertia",velocity:r?e[l]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,_)});return Promise.all(h).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Lo(this.visualElement,e),r.start(Bo(e,r,0,n,this.visualElement,!1))}stopAnimation(){Ut(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Ut(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Ut(n=>{const{drag:r}=this.getProps();if(!Tr(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-st(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Je(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ut(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=B0({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ut(s=>{if(!Tr(s,e,null))return;const a=this.getAxisMotionValue(s),{min:c,max:h}=this.constraints[s];a.set(st(c,h,i[s]))})}addListeners(){if(!this.visualElement.current)return;V0.set(this.visualElement,this);const e=this.visualElement.current,n=Vn(e,"pointerdown",c=>{const{drag:h,dragListener:l=!0}=this.getProps();h&&l&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Je(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),rt.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h})=>{this.isDragging&&h&&(Ut(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Uo,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Tr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function $0(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class z0 extends ye{constructor(e){super(e),this.removeGroupControls=Vt,this.removeListeners=Vt,this.controls=new U0(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Vt}unmount(){this.removeGroupControls(),this.removeListeners()}}const tu=t=>(e,n)=>{t&&rt.postRender(()=>t(e,n))};class j0 extends ye{constructor(){super(...arguments),this.removePointerDownListener=Vt}onPointerDown(e){this.session=new ql(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:tu(e),onStart:tu(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&rt.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ar={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function eu(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zn={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=eu(t,e.target.x),r=eu(t,e.target.y);return`${n}% ${r}%`}},H0={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=ge.parse(t);if(i.length>5)return r;const o=ge.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=c;const h=st(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=h),typeof i[3+s]=="number"&&(i[3+s]/=h),o(i)}};let $o=!1;class W0 extends Nt{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;pm(K0),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),$o&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ar.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,$o=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||rt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),go.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;$o=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function nu(t){const[e,n]=tl(),r=ft(Ii);return w(W0,{...t,layoutGroup:r,switchLayoutGroup:ft(gl),isPresent:e,safeToRemove:n})}const K0={borderRadius:{...zn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zn,borderTopRightRadius:zn,borderBottomLeftRadius:zn,borderBottomRightRadius:zn,boxShadow:H0};function q0(t,e,n){const r=St(t)?t:Xe(t);return r.start(Bo("",r,e,n)),r.animation}const Y0=(t,e)=>t.depth-e.depth;class G0{constructor(){this.children=[],this.isDirty=!1}add(e){Ni(this.children,e),this.isDirty=!0}remove(e){Di(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Y0),this.isDirty=!1,this.children.forEach(e)}}function X0(t,e){const n=Mt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(pe(r),t(o-e))};return rt.setup(r,!0),()=>pe(r)}const ru=["TopLeft","TopRight","BottomLeft","BottomRight"],Z0=ru.length,iu=t=>typeof t=="string"?parseFloat(t):t,ou=t=>typeof t=="number"||V.test(t);function J0(t,e,n,r,i,o){i?(t.opacity=st(0,n.opacity??1,Q0(r)),t.opacityExit=st(e.opacity??1,0,tg(r))):o&&(t.opacity=st(e.opacity??1,n.opacity??1,r));for(let s=0;s<Z0;s++){const a=`border${ru[s]}Radius`;let c=su(e,a),h=su(n,a);if(c===void 0&&h===void 0)continue;c||(c=0),h||(h=0),c===0||h===0||ou(c)===ou(h)?(t[a]=Math.max(st(iu(c),iu(h),r),0),(Jt.test(h)||Jt.test(c))&&(t[a]+="%")):t[a]=h}(e.rotate||n.rotate)&&(t.rotate=st(e.rotate||0,n.rotate||0,r))}function su(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Q0=au(0,.5,Qa),tg=au(.5,.95,Vt);function au(t,e,n){return r=>r<t?0:r>e?1:n(Tn(t,e,r))}function cu(t,e){t.min=e.min,t.max=e.max}function $t(t,e){cu(t.x,e.x),cu(t.y,e.y)}function lu(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function uu(t,e,n,r,i){return t-=e,t=Er(t,1/n,r),i!==void 0&&(t=Er(t,1/i,r)),t}function eg(t,e=0,n=1,r=.5,i,o=t,s=t){if(Jt.test(e)&&(e=parseFloat(e),e=st(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=st(o.min,o.max,r);t===o&&(a-=e),t.min=uu(t.min,e,n,a,i),t.max=uu(t.max,e,n,a,i)}function du(t,e,[n,r,i],o,s){eg(t,e[n],e[r],e[i],e.scale,o,s)}const ng=["x","scaleX","originX"],rg=["y","scaleY","originY"];function hu(t,e,n,r){du(t.x,e,ng,n?n.x:void 0,r?r.x:void 0),du(t.y,e,rg,n?n.y:void 0,r?r.y:void 0)}function fu(t){return t.translate===0&&t.scale===1}function pu(t){return fu(t.x)&&fu(t.y)}function mu(t,e){return t.min===e.min&&t.max===e.max}function ig(t,e){return mu(t.x,e.x)&&mu(t.y,e.y)}function gu(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function yu(t,e){return gu(t.x,e.x)&&gu(t.y,e.y)}function wu(t){return Pt(t.x)/Pt(t.y)}function vu(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class og{constructor(){this.members=[]}add(e){Ni(this.members,e),e.scheduleRender()}remove(e){if(Di(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sg(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:h,rotate:l,rotateX:f,rotateY:m,skewX:g,skewY:_}=n;h&&(r=`perspective(${h}px) ${r}`),l&&(r+=`rotate(${l}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),_&&(r+=`skewY(${_}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const zo=["","X","Y","Z"],ag=1e3;let cg=0;function jo(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function _u(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Dl(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",rt,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&_u(r)}function bu({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=cg++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(dg),this.nodes.forEach(mg),this.nodes.forEach(gg),this.nodes.forEach(hg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new G0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Bi),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Qc(s)&&!em(s),this.instance=s;const{layoutId:a,layout:c,visualElement:h}=this.options;if(h&&!h.current&&h.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let l,f=0;const m=()=>this.root.updateBlockedByResize=!1;rt.read(()=>{f=window.innerWidth}),t(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,l&&l(),l=X0(m,250),Ar.hasAnimatedSinceResize&&(Ar.hasAnimatedSinceResize=!1,this.nodes.forEach(ku)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||bg,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=h.getProps(),b=!this.targetLayout||!yu(this.targetLayout,g),k=!f&&m;if(this.options.layoutRoot||this.resumeFrom||k||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...fo(_,"layout"),onPlay:v,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(l,k)}else f||ku(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),pe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yg),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_u(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const f=this.path[l];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Cu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pg),this.nodes.forEach(lg),this.nodes.forEach(ug)):this.nodes.forEach(Cu),this.clearAllSnapshots();const a=Mt.now();kt.delta=ce(0,1e3/60,a-kt.timestamp),kt.timestamp=a,kt.isProcessing=!0,Vi.update.process(kt),Vi.preRender.process(kt),Vi.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,go.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fg),this.sharedNodes.forEach(wg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pt(this.snapshot.measuredBox.x)&&!Pt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!pu(this.projectionDelta),c=this.getTransformTemplate(),h=c?c(this.latestValues,""):void 0,l=h!==this.prevTransformTemplateValue;s&&this.instance&&(a||Te(this.latestValues)||l)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),xg(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:s}=this.options;if(!s)return pt();const a=s.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(Cg))){const{scroll:l}=this.root;l&&(Qe(a.x,l.offset.x),Qe(a.y,l.offset.y))}return a}removeElementScroll(s){var c;const a=pt();if($t(a,s),(c=this.scroll)!=null&&c.wasRoot)return a;for(let h=0;h<this.path.length;h++){const l=this.path[h],{scroll:f,options:m}=l;l!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&$t(a,s),Qe(a.x,f.offset.x),Qe(a.y,f.offset.y))}return a}applyTransform(s,a=!1){const c=pt();$t(c,s);for(let h=0;h<this.path.length;h++){const l=this.path[h];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&tn(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),Te(l.latestValues)&&tn(c,l.latestValues)}return Te(this.latestValues)&&tn(c,this.latestValues),c}removeTransform(s){const a=pt();$t(a,s);for(let c=0;c<this.path.length;c++){const h=this.path[c];if(!h.instance||!Te(h.latestValues))continue;Mo(h.latestValues)&&h.updateSnapshot();const l=pt(),f=h.measurePageBox();$t(l,f),hu(a,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,l)}return Te(this.latestValues)&&hu(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:f}=this.options;if(!(!this.layout||!(l||f))){if(this.resolvedRelativeTargetAt=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pt(),this.relativeTargetOrigin=pt(),$n(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pt(),this.targetWithTransforms=pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),P0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),xl(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pt(),this.relativeTargetOrigin=pt(),$n(this.relativeTargetOrigin,this.target,g.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Mo(this.parent.latestValues)||vl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var _;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===kt.timestamp&&(c=!1),c)return;const{layout:h,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||l))return;$t(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;$m(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=pt());const{target:g}=s;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(lu(this.prevProjectionDelta.x,this.projectionDelta.x),lu(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!vu(this.projectionDelta.x,this.prevProjectionDelta.x)||!vu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=en(),this.projectionDelta=en(),this.projectionDeltaWithTransform=en()}setAnimationOrigin(s,a=!1){const c=this.snapshot,h=c?c.latestValues:{},l={...this.latestValues},f=en();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=pt(),g=c?c.source:void 0,_=this.layout?this.layout.source:void 0,v=g!==_,x=this.getStack(),b=!x||x.members.length<=1,k=!!(v&&!b&&this.options.crossfade===!0&&!this.path.some(_g));this.animationProgress=0;let E;this.mixTargetDelta=I=>{const T=I/1e3;Su(f.x,s.x,T),Su(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vg(this.relativeTarget,this.relativeTargetOrigin,m,T),E&&ig(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=pt()),$t(E,this.relativeTarget)),v&&(this.animationValues=l,J0(l,h,this.latestValues,T,k,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,c,h;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(h=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||h.stop(),this.pendingAnimation&&(pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Ar.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xe(0)),this.currentAnimation=q0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ag),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:h,latestValues:l}=s;if(!(!a||!c||!h)){if(this!==s&&this.layout&&h&&Iu(this.options.animationType,this.layout.layoutBox,h.layoutBox)){c=this.target||pt();const f=Pt(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=Pt(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}$t(a,c),tn(a,l),Un(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new og),this.sharedNodes.get(s).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const h=this.getStack();h&&h.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const h={};c.z&&jo("z",s,h,this.animationValues);for(let l=0;l<zo.length;l++)jo(`rotate${zo[l]}`,s,h,this.animationValues),jo(`skew${zo[l]}`,s,h,this.animationValues);s.render();for(const l in h)s.setStaticValue(l,h[l]),this.animationValues&&(this.animationValues[l]=h[l]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Sr(a==null?void 0:a.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Sr(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Te(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const l=h.animationValues||h.latestValues;this.applyTransformsToTarget();let f=sg(this.projectionDeltaWithTransform,this.treeScale,l);c&&(f=c(l,f)),s.transform=f;const{x:m,y:g}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,h.animationValues?s.opacity=h===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:s.opacity=h===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const _ in Bn){if(l[_]===void 0)continue;const{correct:v,applyTo:x,isCSSVariable:b}=Bn[_],k=f==="none"?l[_]:v(l[_],h);if(x){const E=x.length;for(let I=0;I<E;I++)s[x[I]]=k}else b?this.options.visualElement.renderState.vars[_]=k:s[_]=k}this.options.layoutId&&(s.pointerEvents=h===this?Sr(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(xu),this.root.sharedNodes.clear()}}}function lg(t){t.updateLayout()}function ug(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;o==="size"?Ut(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Pt(m);m.min=r[f].min,m.max=m.min+g}):Iu(o,e.layoutBox,r)&&Ut(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Pt(r[f]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const a=en();Un(a,r,e.layoutBox);const c=en();s?Un(c,t.applyTransform(i,!0),e.measuredBox):Un(c,r,e.layoutBox);const h=!pu(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const _=pt();$n(_,e.layoutBox,m.layoutBox);const v=pt();$n(v,r,g.layoutBox),yu(_,v)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=_,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:h,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function dg(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function hg(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function fg(t){t.clearSnapshot()}function xu(t){t.clearMeasurements()}function Cu(t){t.isLayoutDirty=!1}function pg(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ku(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function mg(t){t.resolveTargetDelta()}function gg(t){t.calcProjection()}function yg(t){t.resetSkewAndRotation()}function wg(t){t.removeLeadSnapshot()}function Su(t,e,n){t.translate=st(e.translate,0,n),t.scale=st(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Eu(t,e,n,r){t.min=st(e.min,n.min,r),t.max=st(e.max,n.max,r)}function vg(t,e,n,r){Eu(t.x,e.x,n.x,r),Eu(t.y,e.y,n.y,r)}function _g(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const bg={duration:.45,ease:[.4,0,.1,1]},Tu=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Au=Tu("applewebkit/")&&!Tu("chrome/")?Math.round:Vt;function Pu(t){t.min=Au(t.min),t.max=Au(t.max)}function xg(t){Pu(t.x),Pu(t.y)}function Iu(t,e,n){return t==="position"||t==="preserve-aspect"&&!A0(wu(e),wu(n),.2)}function Cg(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const kg=bu({attachResizeListener:(t,e)=>On(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ho={current:void 0},Mu=bu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ho.current){const t=new kg({});t.mount(window),t.setOptions({layoutScroll:!0}),Ho.current=t}return Ho.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Sg={pan:{Feature:j0},drag:{Feature:z0,ProjectionNode:Mu,MeasureLayout:nu}};function Ru(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&rt.postRender(()=>o(e,Fn(e)))}class Eg extends ye{mount(){const{current:e}=this.node;e&&(this.unmount=Xp(e,(n,r)=>(Ru(this.node,r,"Start"),i=>Ru(this.node,i,"End"))))}unmount(){}}class Tg extends ye{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=En(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Nu(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&rt.postRender(()=>o(e,Fn(e)))}class Ag extends ye{mount(){const{current:e}=this.node;e&&(this.unmount=tm(e,(n,r)=>(Nu(this.node,r,"Start"),(i,{success:o})=>Nu(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wo=new WeakMap,Ko=new WeakMap,Pg=t=>{const e=Wo.get(t.target);e&&e(t)},Ig=t=>{t.forEach(Pg)};function Mg({root:t,...e}){const n=t||document;Ko.has(n)||Ko.set(n,{});const r=Ko.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Ig,{root:t,...e})),r[i]}function Rg(t,e,n){const r=Mg(e);return Wo.set(t,n),r.observe(t),()=>{Wo.delete(t),r.unobserve(t)}}const Ng={some:0,all:1};class Dg extends ye{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Ng[i]},a=c=>{const{isIntersecting:h}=c;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),m=h?l:f;m&&m(c)};return Rg(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Lg(e,n))&&this.startObserver()}unmount(){}}function Lg({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Bg={...x0,...{inView:{Feature:Dg},tap:{Feature:Ag},focus:{Feature:Tg},hover:{Feature:Eg}},...Sg,...{layout:{ProjectionNode:Mu,MeasureLayout:nu}}},Qt=Fm(Bg,Zm);/**
9
+ `),()=>{v.contains(_)&&v.removeChild(_)}},[e]),w(sm,{isPresent:e,childRef:o,sizeRef:s,children:Ii(t,{ref:o})})}const cm=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:c})=>{const h=Ri(lm),l=ze();let f=!0,m=_t(()=>(f=!1,{id:l,initial:e,isPresent:n,custom:i,onExitComplete:g=>{h.set(g,!0);for(const _ of h.values())if(!_)return;r&&r()},register:g=>(h.set(g,!1),()=>h.delete(g))}),[n,h,r]);return o&&f&&(m={...m}),_t(()=>{h.forEach((g,_)=>h.set(_,!1))},[n]),U(()=>{!n&&!h.size&&r&&r()},[n]),s==="popLayout"&&(t=w(am,{isPresent:n,anchorX:a,root:c,children:t})),w(dr.Provider,{value:m,children:t})};function lm(){return new Map}function nl(t=!0){const e=ft(dr);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=ze();U(()=>{if(t)return i(o)},[t]);const s=et(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const _r=t=>t.key||"";function rl(t){const e=[];return Ti.forEach(t,n=>{He(n)&&e.push(n)}),e}const bo=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:c})=>{const[h,l]=nl(s),f=_t(()=>rl(t),[t]),m=s&&!h?[]:f.map(_r),g=F(!0),_=F(f),v=Ri(()=>new Map),[x,b]=W(f),[k,S]=W(f);Ha(()=>{g.current=!1,_.current=f;for(let R=0;R<k.length;R++){const N=_r(k[R]);m.includes(N)?v.delete(N):v.get(N)!==!0&&v.set(N,!1)}},[k,m.length,m.join("-")]);const M=[];if(f!==x){let R=[...f];for(let N=0;N<k.length;N++){const P=k[N],I=_r(P);m.includes(I)||(R.splice(N,0,P),M.push(P))}return o==="wait"&&M.length&&(R=M),S(rl(R)),b(f),null}const{forceRender:T}=ft(Mi);return w(tt,{children:k.map(R=>{const N=_r(R),P=s&&!h?!1:f===k||m.includes(N),I=()=>{if(v.has(N))v.set(N,!0);else return;let D=!0;v.forEach(O=>{O||(D=!1)}),D&&(T==null||T(),S(_.current),s&&(l==null||l()),r&&r())};return w(cm,{isPresent:P,initial:!g.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:P?void 0:I,anchorX:a,children:R},N)})})},il=At({strict:!1}),ol={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"]},Ze={};for(const t in ol)Ze[t]={isEnabled:e=>ol[t].some(n=>!!e[n])};function um(t){for(const e in t)Ze[e]={...Ze[e],...t[e]}}const dm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function br(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||dm.has(t)}let sl=t=>!br(t);function hm(t){typeof t=="function"&&(sl=e=>e.startsWith("on")?!br(e):t(e))}try{hm(require("@emotion/is-prop-valid").default)}catch{}function fm(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(sl(i)||n===!0&&br(i)||!e&&!br(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const xr=At({});function Cr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ln(t){return typeof t=="string"||Array.isArray(t)}const xo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Co=["initial",...xo];function kr(t){return Cr(t.animate)||Co.some(e=>Ln(t[e]))}function al(t){return!!(kr(t)||t.variants)}function pm(t,e){if(kr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(r)?r:void 0}}return t.inherit!==!1?e:{}}function mm(t){const{initial:e,animate:n}=pm(t,ft(xr));return _t(()=>({initial:e,animate:n}),[cl(e),cl(n)])}function cl(t){return Array.isArray(t)?t.join(" "):t}const Bn={};function gm(t){for(const e in t)Bn[e]=t[e],$i(e)&&(Bn[e].isCSSVariable=!0)}function ll(t,{layout:e,layoutId:n}){return Ge.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bn[t]||t==="opacity")}const ym={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wm=Ye.length;function vm(t,e,n){let r="",i=!0;for(let o=0;o<wm;o++){const s=Ye[o],a=t[s];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(s.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const h=Kc(a,go[s]);if(!c){i=!1;const l=ym[s]||s;r+=`${l}(${h}) `}n&&(e[s]=h)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function ko(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const c in e){const h=e[c];if(Ge.has(c)){s=!0;continue}else if($i(c)){i[c]=h;continue}else{const l=Kc(h,go[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(e.transform||(s||n?r.transform=vm(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${h} ${l}`}}const Eo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ul(t,e,n){for(const r in e)!Et(e[r])&&!ll(r,n)&&(t[r]=e[r])}function _m({transformTemplate:t},e){return _t(()=>{const n=Eo();return ko(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bm(t,e){const n=t.style||{},r={};return ul(r,n,t),Object.assign(r,_m(t,e)),r}function xm(t,e){const n={},r=bm(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const Cm={offset:"stroke-dashoffset",array:"stroke-dasharray"},km={offset:"strokeDashoffset",array:"strokeDasharray"};function Em(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Cm:km;t[o.offset]=V.transform(-r);const s=V.transform(e),a=V.transform(n);t[o.array]=`${s} ${a}`}function dl(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},c,h,l){if(ko(t,a,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m}=t;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(l==null?void 0:l.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Em(f,i,o,s,!1)}const hl=()=>({...Eo(),attrs:{}}),fl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Sm(t,e,n,r){const i=_t(()=>{const o=hl();return dl(o,e,fl(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ul(o,t.style,t),i.style={...o,...i.style}}return i}const Tm=["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 So(t){return typeof t!="string"||t.includes("-")?!1:!!(Tm.indexOf(t)>-1||/[A-Z]/u.test(t))}function Am(t,e,n,{latestValues:r},i,o=!1){const a=(So(t)?Sm:xm)(e,r,i,t),c=fm(e,typeof t=="string",o),h=t!==tt?{...c,...a,ref:n}:{},{children:l}=e,f=_t(()=>Et(l)?l.get():l,[l]);return B(t,{...h,children:f})}function pl(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function To(t,e,n,r){if(typeof e=="function"){const[i,o]=pl(r);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=pl(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Er(t){return Et(t)?t.get():t}function Pm({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:Im(n,r,i,t),renderState:e()}}function Im(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Er(o[m]);let{initial:s,animate:a}=t;const c=kr(t),h=al(t);e&&h&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||s===!1;const f=l?a:s;if(f&&typeof f!="boolean"&&!Cr(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const _=To(t,m[g]);if(_){const{transitionEnd:v,transition:x,...b}=_;for(const k in b){let S=b[k];if(Array.isArray(S)){const M=l?S.length-1:0;S=S[M]}S!==null&&(i[k]=S)}for(const k in v)i[k]=v[k]}}}return i}const ml=t=>(e,n)=>{const r=ft(xr),i=ft(dr),o=()=>Pm(t,e,r,i);return n?o():Ri(o)};function Ao(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Et(r[s])||e.style&&Et(e.style[s])||ll(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const Mm=ml({scrapeMotionValuesFromProps:Ao,createRenderState:Eo});function gl(t,e,n){const r=Ao(t,e,n);for(const i in t)if(Et(t[i])||Et(e[i])){const o=Ye.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const Rm=ml({scrapeMotionValuesFromProps:gl,createRenderState:hl}),Nm=Symbol.for("motionComponentSymbol");function Je(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Dm(t,e,n){return et(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Je(n)&&(n.current=r))},[e])}const Po=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yl="data-"+Po("framerAppearId"),wl=At({});function Lm(t,e,n,r,i){var v,x;const{visualElement:o}=ft(xr),s=ft(il),a=ft(dr),c=ft(_o).reducedMotion,h=F(null);r=r||s.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=h.current,f=ft(wl);l&&!l.projection&&i&&(l.type==="html"||l.type==="svg")&&Bm(h.current,n,i,f);const m=F(!1);kn(()=>{l&&m.current&&l.update(n,a)});const g=n[yl],_=F(!!g&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,g)));return Ha(()=>{l&&(m.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),_.current&&l.animationState&&l.animationState.animateChanges())}),U(()=>{l&&(!_.current&&l.animationState&&l.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,g)}),_.current=!1),l.enteringChildren=void 0)}),l}function Bm(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:h,layoutCrossfade:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:vl(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&Je(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:h})}function vl(t){if(t)return t.options.allowProjection!==!1?t.projection:vl(t.parent)}function Io(t,{forwardMotionProps:e=!1}={},n,r){n&&um(n);const i=So(t)?Rm:Mm;function o(a,c){let h;const l={...ft(_o),...a,layoutId:Om(a)},{isStatic:f}=l,m=mm(a),g=i(a,f);if(!f&&Ni){Fm();const _=Vm(l);h=_.MeasureLayout,m.visualElement=Lm(t,g,l,r,_.ProjectionNode)}return w(xr.Provider,{value:m,children:[h&&m.visualElement?w(h,{visualElement:m.visualElement,...l}):null,Am(t,a,Dm(g,m.visualElement,c),g,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=fe(o);return s[Nm]=t,s}function Om({layoutId:t}){const e=ft(Mi).id;return e&&t!==void 0?e+"-"+t:t}function Fm(t,e){ft(il).strict}function Vm(t){const{drag:e,layout:n}=Ze;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Um(t,e){if(typeof Proxy>"u")return Io;const n=new Map,r=(o,s)=>Io(o,s,t,e),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,Io(s,void 0,t,e)),n.get(s))})}function _l({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function $m({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function zm(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Mo(t){return t===void 0||t===1}function Ro({scale:t,scaleX:e,scaleY:n}){return!Mo(t)||!Mo(e)||!Mo(n)}function Te(t){return Ro(t)||bl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function bl(t){return xl(t.x)||xl(t.y)}function xl(t){return t&&t!=="0%"}function Sr(t,e,n){const r=t-n,i=e*r;return n+i}function Cl(t,e,n,r,i){return i!==void 0&&(t=Sr(t,i,r)),Sr(t,n,r)+e}function No(t,e=0,n=1,r,i){t.min=Cl(t.min,e,n,r,i),t.max=Cl(t.max,e,n,r,i)}function kl(t,{x:e,y:n}){No(t.x,e.translate,e.scale,e.originPoint),No(t.y,n.translate,n.scale,n.originPoint)}const El=.999999999999,Sl=1.0000000000001;function jm(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tn(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,kl(t,s)),r&&Te(o.latestValues)&&tn(t,o.latestValues))}e.x<Sl&&e.x>El&&(e.x=1),e.y<Sl&&e.y>El&&(e.y=1)}function Qe(t,e){t.min=t.min+e,t.max=t.max+e}function Tl(t,e,n,r,i=.5){const o=st(t.min,t.max,i);No(t,e,n,o,r)}function tn(t,e){Tl(t.x,e.x,e.scaleX,e.scale,e.originX),Tl(t.y,e.y,e.scaleY,e.scale,e.originY)}function Al(t,e){return _l(zm(t.getBoundingClientRect(),e))}function Hm(t,e,n){const r=Al(t,n),{scroll:i}=e;return i&&(Qe(r.x,i.offset.x),Qe(r.y,i.offset.y)),r}const Pl=()=>({translate:0,scale:1,origin:0,originPoint:0}),en=()=>({x:Pl(),y:Pl()}),Il=()=>({min:0,max:0}),pt=()=>({x:Il(),y:Il()}),Do={current:null},Ml={current:!1};function Wm(){if(Ml.current=!0,!!Ni)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Do.current=t.matches;t.addEventListener("change",e),e()}else Do.current=!1}const Km=new WeakMap;function qm(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Et(i))t.addValue(r,i);else if(Et(o))t.addValue(r,Xe(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,Xe(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Rl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ym{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ho,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.renderScheduledAt=0,this.scheduleRender=()=>{const m=Mt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,rt.render(this.render,!1,!0))};const{latestValues:c,renderState:h}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=h,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=kr(n),this.isVariantNode=al(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&Et(g)&&g.set(c[m])}}mount(e){var n;this.current=e,Km.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),Ml.current||Wm(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Do.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),pe(this.notifyUpdate),pe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Ge.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ze){const n=Ze[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Rl.length;r++){const i=Rl[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=qm(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Xe(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Wa(r)||qa(r))?r=parseFloat(r):!om(r)&&ge.test(n)&&(r=Wc(e,n)),this.setBaseTarget(e,Et(r)?r.get():r)),Et(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=To(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Et(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Oi),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){yo.render(this.render)}}class Nl extends Ym{constructor(){super(...arguments),this.KeyframeResolver=qp}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Et(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Dl(t,{style:e,vars:n},r,i){const o=t.style;let s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function Gm(t){return window.getComputedStyle(t)}class Xm extends Nl{constructor(){super(...arguments),this.type="html",this.renderInstance=Dl}readValueFromInstance(e,n){var r;if(Ge.has(n))return(r=this.projection)!=null&&r.isProjecting?so(n):fp(e,n);{const i=Gm(e),o=($i(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Al(e,n)}build(e,n,r){ko(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Ao(e,n,r)}}const Ll=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 Zm(t,e,n,r){Dl(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Ll.has(i)?i:Po(i),e.attrs[i])}class Jm extends Nl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ge.has(n)){const r=Hc(n);return r&&r.default||0}return n=Ll.has(n)?n:Po(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return gl(e,n,r)}build(e,n,r){dl(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){Zm(e,n,r,i)}mount(e){this.isSVGTag=fl(e.tagName),super.mount(e)}}const Qm=(t,e)=>So(t)?new Jm(e):new Xm(e,{allowProjection:t!==tt});function nn(t,e,n){const r=t.getProps();return To(r,e,n!==void 0?n:r.custom,t)}const Lo=t=>Array.isArray(t);function t0(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Xe(n))}function e0(t){return Lo(t)?t[t.length-1]||0:t}function n0(t,e){const n=nn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=e0(o[s]);t0(t,s,a)}}function r0(t){return!!(Et(t)&&t.add)}function Bo(t,e){const n=t.getValue("willChange");if(r0(n))return n.add(e);if(!n&&le.WillChange){const r=new le.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Bl(t){return t.props[yl]}const i0=t=>t!==null;function o0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(i0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const s0={type:"spring",stiffness:500,damping:25,restSpeed:10},a0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),c0={type:"keyframes",duration:.8},l0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},u0=(t,{keyframes:e})=>e.length>2?c0:Ge.has(t)?t.startsWith("scale")?a0(e[1]):s0:l0;function d0({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:h,...l}){return!!Object.keys(l).length}const Oo=(t,e,n,r={},i,o)=>s=>{const a=po(r,t)||{},c=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Xt(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};d0(a)||Object.assign(l,u0(t,l)),l.duration&&(l.duration=Xt(l.duration)),l.repeatDelay&&(l.repeatDelay=Xt(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(fo(l),l.delay===0&&(f=!0)),(le.instantAnimations||le.skipAnimations)&&(f=!0,fo(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const m=o0(l.keyframes,a);if(m!==void 0){rt.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new ro(l):new Bp(l)};function h0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Ol(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const l in a){const f=t.getValue(l,t.latestValues[l]??null),m=a[l];if(m===void 0||h&&h0(h,l))continue;const g={delay:n,...po(o||{},l)},_=f.get();if(_!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===_&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const b=Bl(t);if(b){const k=window.MotionHandoffAnimation(b,l,rt);k!==null&&(g.startTime=k,v=!0)}}Bo(t,l),f.start(Oo(l,f,m,t.shouldReduceMotion&&Vc.has(l)?{type:!1}:g,t,v));const x=f.animation;x&&c.push(x)}return s&&Promise.all(c).then(()=>{rt.update(()=>{s&&n0(t,s)})}),c}function Fl(t,e,n,r=0,i=1){const o=Array.from(t).sort((h,l)=>h.sortNodePosition(l)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Fo(t,e,n={}){var c;const r=nn(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Ol(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(h=0)=>{const{delayChildren:l=0,staggerChildren:f,staggerDirection:m}=i;return f0(t,e,h,l,f,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[h,l]=a==="beforeChildren"?[o,s]:[s,o];return h().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function f0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Fo(c,e,{...s,delay:n+(typeof r=="function"?0:r)+Fl(t.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function p0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Fo(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Fo(t,e,n);else{const i=typeof e=="function"?nn(t,e,n.custom):e;r=Promise.all(Ol(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Vl(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const m0=Co.length;function Ul(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ul(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<m0;n++){const r=Co[n],i=t.props[r];(Ln(i)||i===!1)&&(e[r]=i)}return e}const g0=[...xo].reverse(),y0=xo.length;function w0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>p0(t,n,r)))}function v0(t){let e=w0(t),n=$l(),r=!0;const i=c=>(h,l)=>{var m;const f=nn(t,l,c==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:g,transitionEnd:_,...v}=f;h={...h,...v,..._}}return h};function o(c){e=c(t)}function s(c){const{props:h}=t,l=Ul(t.parent)||{},f=[],m=new Set;let g={},_=1/0;for(let x=0;x<y0;x++){const b=g0[x],k=n[b],S=h[b]!==void 0?h[b]:l[b],M=Ln(S),T=b===c?k.isActive:null;T===!1&&(_=x);let R=S===l[b]&&S!==h[b]&&M;if(R&&r&&t.manuallyAnimateOnMount&&(R=!1),k.protectedKeys={...g},!k.isActive&&T===null||!S&&!k.prevProp||Cr(S)||typeof S=="boolean")continue;const N=_0(k.prevProp,S);let P=N||b===c&&k.isActive&&!R&&M||x>_&&M,I=!1;const D=Array.isArray(S)?S:[S];let O=D.reduce(i(b),{});T===!1&&(O={});const{prevResolvedValues:J={}}=k,at={...J,...O},Tt=z=>{P=!0,m.has(z)&&(I=!0,m.delete(z)),k.needsAnimating[z]=!0;const nt=t.getValue(z);nt&&(nt.liveStyle=!1)};for(const z in at){const nt=O[z],Ot=J[z];if(g.hasOwnProperty(z))continue;let Ht=!1;Lo(nt)&&Lo(Ot)?Ht=!Vl(nt,Ot):Ht=nt!==Ot,Ht?nt!=null?Tt(z):m.add(z):nt!==void 0&&m.has(z)?Tt(z):k.protectedKeys[z]=!0}k.prevProp=S,k.prevResolvedValues=O,k.isActive&&(g={...g,...O}),r&&t.blockInitialAnimation&&(P=!1);const $=R&&N;P&&(!$||I)&&f.push(...D.map(z=>{const nt={type:b};if(typeof z=="string"&&r&&!$&&t.manuallyAnimateOnMount&&t.parent){const{parent:Ot}=t,Ht=nn(Ot,z);if(Ot.enteringChildren&&Ht){const{delayChildren:q}=Ht.transition||{};nt.delay=Fl(Ot.enteringChildren,t,q)}}return{animation:z,options:nt}}))}if(m.size){const x={};if(typeof h.initial!="boolean"){const b=nn(t,Array.isArray(h.initial)?h.initial[0]:h.initial);b&&b.transition&&(x.transition=b.transition)}m.forEach(b=>{const k=t.getBaseTarget(b),S=t.getValue(b);S&&(S.liveStyle=!0),x[b]=k??null}),f.push({animation:x})}let v=!!f.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(v=!1),r=!1,v?e(f):Promise.resolve()}function a(c,h){var f;if(n[c].isActive===h)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(c,h)}),n[c].isActive=h;const l=s(c);for(const m in n)n[m].protectedKeys={};return l}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=$l(),r=!0}}}function _0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vl(e,t):!1}function Ae(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $l(){return{animate:Ae(!0),whileInView:Ae(),whileHover:Ae(),whileTap:Ae(),whileDrag:Ae(),whileFocus:Ae(),exit:Ae()}}class ye{constructor(e){this.isMounted=!1,this.node=e}update(){}}class b0 extends ye{constructor(e){super(e),e.animationState||(e.animationState=v0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Cr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let x0=0;class C0 extends ye{constructor(){super(...arguments),this.id=x0++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const k0={animation:{Feature:b0},exit:{Feature:C0}};function On(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Fn(t){return{point:{x:t.pageX,y:t.pageY}}}const E0=t=>e=>wo(e)&&t(e,Fn(e));function Vn(t,e,n,r){return On(t,e,E0(n),r)}const zl=1e-4,S0=1-zl,T0=1+zl,jl=.01,A0=0-jl,P0=0+jl;function Pt(t){return t.max-t.min}function I0(t,e,n){return Math.abs(t-e)<=n}function Hl(t,e,n,r=.5){t.origin=r,t.originPoint=st(e.min,e.max,t.origin),t.scale=Pt(n)/Pt(e),t.translate=st(n.min,n.max,t.origin)-t.originPoint,(t.scale>=S0&&t.scale<=T0||isNaN(t.scale))&&(t.scale=1),(t.translate>=A0&&t.translate<=P0||isNaN(t.translate))&&(t.translate=0)}function Un(t,e,n,r){Hl(t.x,e.x,n.x,r?r.originX:void 0),Hl(t.y,e.y,n.y,r?r.originY:void 0)}function Wl(t,e,n){t.min=n.min+e.min,t.max=t.min+Pt(e)}function M0(t,e,n){Wl(t.x,e.x,n.x),Wl(t.y,e.y,n.y)}function Kl(t,e,n){t.min=e.min-n.min,t.max=t.min+Pt(e)}function $n(t,e,n){Kl(t.x,e.x,n.x),Kl(t.y,e.y,n.y)}function Ut(t){return[t("x"),t("y")]}const ql=({current:t})=>t?t.ownerDocument.defaultView:null,Yl=(t,e)=>Math.abs(t-e);function R0(t,e){const n=Yl(t.x,e.x),r=Yl(t.y,e.y);return Math.sqrt(n**2+r**2)}class Gl{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Uo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,_=R0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!_)return;const{point:v}=m,{timestamp:x}=kt;this.history.push({...v,timestamp:x});const{onStart:b,onMove:k}=this.handlers;g||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Vo(g,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:_,onSessionEnd:v,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Uo(m.type==="pointercancel"?this.lastMoveEventInfo:Vo(g,this.transformPagePoint),this.history);this.startEvent&&_&&_(m,b),v&&v(m,b)},!wo(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=Fn(e),c=Vo(a,this.transformPagePoint),{point:h}=c,{timestamp:l}=kt;this.history=[{...h,timestamp:l}];const{onSessionStart:f}=n;f&&f(e,Uo(c,this.history)),this.removeListeners=Sn(Vn(this.contextWindow,"pointermove",this.handlePointerMove),Vn(this.contextWindow,"pointerup",this.handlePointerUp),Vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),pe(this.updatePoint)}}function Vo(t,e){return e?{point:e(t.point)}:t}function Xl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Uo({point:t},e){return{point:t,delta:Xl(t,Zl(e)),offset:Xl(t,N0(e)),velocity:D0(e,.1)}}function N0(t){return t[0]}function Zl(t){return t[t.length-1]}function D0(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Zl(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Xt(e)));)n--;if(!r)return{x:0,y:0};const o=Zt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function L0(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?st(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?st(n,t,r.max):Math.min(t,n)),t}function Jl(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function B0(t,{top:e,left:n,bottom:r,right:i}){return{x:Jl(t.x,n,i),y:Jl(t.y,e,r)}}function Ql(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function O0(t,e){return{x:Ql(t.x,e.x),y:Ql(t.y,e.y)}}function F0(t,e){let n=.5;const r=Pt(t),i=Pt(e);return i>r?n=Tn(e.min,e.max-r,t.min):r>i&&(n=Tn(t.min,t.max-i,e.min)),ce(0,1,n)}function V0(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const $o=.35;function U0(t=$o){return t===!1?t=0:t===!0&&(t=$o),{x:tu(t,"left","right"),y:tu(t,"top","bottom")}}function tu(t,e,n){return{min:eu(t,e),max:eu(t,n)}}function eu(t,e){return typeof t=="number"?t:t[e]||0}const $0=new WeakMap;class z0{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fn(f).point)},s=(f,m)=>{const{drag:g,dragPropagation:_,onDragStart:v}=this.getProps();if(g&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zp(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ut(b=>{let k=this.getAxisMotionValue(b).get()||0;if(Jt.test(k)){const{projection:S}=this.visualElement;if(S&&S.layout){const M=S.layout.layoutBox[b];M&&(k=Pt(M)*(parseFloat(k)/100))}}this.originPoint[b]=k}),v&&rt.postRender(()=>v(f,m)),Bo(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:_,onDirectionLock:v,onDrag:x}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:b}=m;if(_&&this.currentDirection===null){this.currentDirection=j0(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,b),this.updateAxis("y",m.point,b),this.visualElement.render(),x&&x(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Ut(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Gl(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:ql(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&rt.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Tr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=L0(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Je(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=B0(r.layoutBox,e):this.constraints=!1,this.elastic=U0(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ut(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=V0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Je(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Hm(r,i.root,this.visualElement.getTransformPagePoint());let s=O0(i.layout.layoutBox,o);if(n){const a=n($m(s));this.hasMutatedConstraints=!!a,a&&(s=_l(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},h=Ut(l=>{if(!Tr(l,n,this.currentDirection))return;let f=c&&c[l]||{};s&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,_={type:"inertia",velocity:r?e[l]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,_)});return Promise.all(h).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Bo(this.visualElement,e),r.start(Oo(e,r,0,n,this.visualElement,!1))}stopAnimation(){Ut(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Ut(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Ut(n=>{const{drag:r}=this.getProps();if(!Tr(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-st(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Je(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ut(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=F0({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ut(s=>{if(!Tr(s,e,null))return;const a=this.getAxisMotionValue(s),{min:c,max:h}=this.constraints[s];a.set(st(c,h,i[s]))})}addListeners(){if(!this.visualElement.current)return;$0.set(this.visualElement,this);const e=this.visualElement.current,n=Vn(e,"pointerdown",c=>{const{drag:h,dragListener:l=!0}=this.getProps();h&&l&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Je(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),rt.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h})=>{this.isDragging&&h&&(Ut(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=$o,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Tr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function j0(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class H0 extends ye{constructor(e){super(e),this.removeGroupControls=Vt,this.removeListeners=Vt,this.controls=new z0(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Vt}unmount(){this.removeGroupControls(),this.removeListeners()}}const nu=t=>(e,n)=>{t&&rt.postRender(()=>t(e,n))};class W0 extends ye{constructor(){super(...arguments),this.removePointerDownListener=Vt}onPointerDown(e){this.session=new Gl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ql(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nu(e),onStart:nu(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&rt.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ar={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ru(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zn={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=ru(t,e.target.x),r=ru(t,e.target.y);return`${n}% ${r}%`}},K0={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=ge.parse(t);if(i.length>5)return r;const o=ge.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=c;const h=st(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=h),typeof i[3+s]=="number"&&(i[3+s]/=h),o(i)}};let zo=!1;class q0 extends Nt{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;gm(Y0),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),zo&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ar.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,zo=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||rt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),yo.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;zo=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function iu(t){const[e,n]=nl(),r=ft(Mi);return w(q0,{...t,layoutGroup:r,switchLayoutGroup:ft(wl),isPresent:e,safeToRemove:n})}const Y0={borderRadius:{...zn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zn,borderTopRightRadius:zn,borderBottomLeftRadius:zn,borderBottomRightRadius:zn,boxShadow:K0};function G0(t,e,n){const r=Et(t)?t:Xe(t);return r.start(Oo("",r,e,n)),r.animation}const X0=(t,e)=>t.depth-e.depth;class Z0{constructor(){this.children=[],this.isDirty=!1}add(e){Di(this.children,e),this.isDirty=!0}remove(e){Li(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(X0),this.isDirty=!1,this.children.forEach(e)}}function J0(t,e){const n=Mt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(pe(r),t(o-e))};return rt.setup(r,!0),()=>pe(r)}const ou=["TopLeft","TopRight","BottomLeft","BottomRight"],Q0=ou.length,su=t=>typeof t=="string"?parseFloat(t):t,au=t=>typeof t=="number"||V.test(t);function tg(t,e,n,r,i,o){i?(t.opacity=st(0,n.opacity??1,eg(r)),t.opacityExit=st(e.opacity??1,0,ng(r))):o&&(t.opacity=st(e.opacity??1,n.opacity??1,r));for(let s=0;s<Q0;s++){const a=`border${ou[s]}Radius`;let c=cu(e,a),h=cu(n,a);if(c===void 0&&h===void 0)continue;c||(c=0),h||(h=0),c===0||h===0||au(c)===au(h)?(t[a]=Math.max(st(su(c),su(h),r),0),(Jt.test(h)||Jt.test(c))&&(t[a]+="%")):t[a]=h}(e.rotate||n.rotate)&&(t.rotate=st(e.rotate||0,n.rotate||0,r))}function cu(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const eg=lu(0,.5,ec),ng=lu(.5,.95,Vt);function lu(t,e,n){return r=>r<t?0:r>e?1:n(Tn(t,e,r))}function uu(t,e){t.min=e.min,t.max=e.max}function $t(t,e){uu(t.x,e.x),uu(t.y,e.y)}function du(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function hu(t,e,n,r,i){return t-=e,t=Sr(t,1/n,r),i!==void 0&&(t=Sr(t,1/i,r)),t}function rg(t,e=0,n=1,r=.5,i,o=t,s=t){if(Jt.test(e)&&(e=parseFloat(e),e=st(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=st(o.min,o.max,r);t===o&&(a-=e),t.min=hu(t.min,e,n,a,i),t.max=hu(t.max,e,n,a,i)}function fu(t,e,[n,r,i],o,s){rg(t,e[n],e[r],e[i],e.scale,o,s)}const ig=["x","scaleX","originX"],og=["y","scaleY","originY"];function pu(t,e,n,r){fu(t.x,e,ig,n?n.x:void 0,r?r.x:void 0),fu(t.y,e,og,n?n.y:void 0,r?r.y:void 0)}function mu(t){return t.translate===0&&t.scale===1}function gu(t){return mu(t.x)&&mu(t.y)}function yu(t,e){return t.min===e.min&&t.max===e.max}function sg(t,e){return yu(t.x,e.x)&&yu(t.y,e.y)}function wu(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function vu(t,e){return wu(t.x,e.x)&&wu(t.y,e.y)}function _u(t){return Pt(t.x)/Pt(t.y)}function bu(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ag{constructor(){this.members=[]}add(e){Di(this.members,e),e.scheduleRender()}remove(e){if(Li(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cg(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:h,rotate:l,rotateX:f,rotateY:m,skewX:g,skewY:_}=n;h&&(r=`perspective(${h}px) ${r}`),l&&(r+=`rotate(${l}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),_&&(r+=`skewY(${_}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const jo=["","X","Y","Z"],lg=1e3;let ug=0;function Ho(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function xu(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Bl(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",rt,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&xu(r)}function Cu({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=ug++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(fg),this.nodes.forEach(yg),this.nodes.forEach(wg),this.nodes.forEach(pg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Z0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Oi),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=el(s)&&!rm(s),this.instance=s;const{layoutId:a,layout:c,visualElement:h}=this.options;if(h&&!h.current&&h.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let l,f=0;const m=()=>this.root.updateBlockedByResize=!1;rt.read(()=>{f=window.innerWidth}),t(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,l&&l(),l=J0(m,250),Ar.hasAnimatedSinceResize&&(Ar.hasAnimatedSinceResize=!1,this.nodes.forEach(Su)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||Cg,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=h.getProps(),b=!this.targetLayout||!vu(this.targetLayout,g),k=!f&&m;if(this.options.layoutRoot||this.resumeFrom||k||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...po(_,"layout"),onPlay:v,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(l,k)}else f||Su(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),pe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(vg),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const f=this.path[l];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ku);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Eu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(gg),this.nodes.forEach(dg),this.nodes.forEach(hg)):this.nodes.forEach(Eu),this.clearAllSnapshots();const a=Mt.now();kt.delta=ce(0,1e3/60,a-kt.timestamp),kt.timestamp=a,kt.isProcessing=!0,Ui.update.process(kt),Ui.preRender.process(kt),Ui.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mg),this.sharedNodes.forEach(_g)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pt(this.snapshot.measuredBox.x)&&!Pt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!gu(this.projectionDelta),c=this.getTransformTemplate(),h=c?c(this.latestValues,""):void 0,l=h!==this.prevTransformTemplateValue;s&&this.instance&&(a||Te(this.latestValues)||l)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),kg(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:s}=this.options;if(!s)return pt();const a=s.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(Eg))){const{scroll:l}=this.root;l&&(Qe(a.x,l.offset.x),Qe(a.y,l.offset.y))}return a}removeElementScroll(s){var c;const a=pt();if($t(a,s),(c=this.scroll)!=null&&c.wasRoot)return a;for(let h=0;h<this.path.length;h++){const l=this.path[h],{scroll:f,options:m}=l;l!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&$t(a,s),Qe(a.x,f.offset.x),Qe(a.y,f.offset.y))}return a}applyTransform(s,a=!1){const c=pt();$t(c,s);for(let h=0;h<this.path.length;h++){const l=this.path[h];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&tn(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),Te(l.latestValues)&&tn(c,l.latestValues)}return Te(this.latestValues)&&tn(c,this.latestValues),c}removeTransform(s){const a=pt();$t(a,s);for(let c=0;c<this.path.length;c++){const h=this.path[c];if(!h.instance||!Te(h.latestValues))continue;Ro(h.latestValues)&&h.updateSnapshot();const l=pt(),f=h.measurePageBox();$t(l,f),pu(a,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,l)}return Te(this.latestValues)&&pu(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:f}=this.options;if(!(!this.layout||!(l||f))){if(this.resolvedRelativeTargetAt=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pt(),this.relativeTargetOrigin=pt(),$n(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pt(),this.targetWithTransforms=pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),M0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),kl(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pt(),this.relativeTargetOrigin=pt(),$n(this.relativeTargetOrigin,this.target,g.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ro(this.parent.latestValues)||bl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var _;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===kt.timestamp&&(c=!1),c)return;const{layout:h,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||l))return;$t(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;jm(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=pt());const{target:g}=s;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(du(this.prevProjectionDelta.x,this.projectionDelta.x),du(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!bu(this.projectionDelta.x,this.prevProjectionDelta.x)||!bu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=en(),this.projectionDelta=en(),this.projectionDeltaWithTransform=en()}setAnimationOrigin(s,a=!1){const c=this.snapshot,h=c?c.latestValues:{},l={...this.latestValues},f=en();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=pt(),g=c?c.source:void 0,_=this.layout?this.layout.source:void 0,v=g!==_,x=this.getStack(),b=!x||x.members.length<=1,k=!!(v&&!b&&this.options.crossfade===!0&&!this.path.some(xg));this.animationProgress=0;let S;this.mixTargetDelta=M=>{const T=M/1e3;Tu(f.x,s.x,T),Tu(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bg(this.relativeTarget,this.relativeTargetOrigin,m,T),S&&sg(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=pt()),$t(S,this.relativeTarget)),v&&(this.animationValues=l,tg(l,h,this.latestValues,T,k,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,c,h;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(h=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||h.stop(),this.pendingAnimation&&(pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Ar.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xe(0)),this.currentAnimation=G0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(lg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:h,latestValues:l}=s;if(!(!a||!c||!h)){if(this!==s&&this.layout&&h&&Ru(this.options.animationType,this.layout.layoutBox,h.layoutBox)){c=this.target||pt();const f=Pt(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=Pt(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}$t(a,c),tn(a,l),Un(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new ag),this.sharedNodes.get(s).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const h=this.getStack();h&&h.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const h={};c.z&&Ho("z",s,h,this.animationValues);for(let l=0;l<jo.length;l++)Ho(`rotate${jo[l]}`,s,h,this.animationValues),Ho(`skew${jo[l]}`,s,h,this.animationValues);s.render();for(const l in h)s.setStaticValue(l,h[l]),this.animationValues&&(this.animationValues[l]=h[l]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Te(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const l=h.animationValues||h.latestValues;this.applyTransformsToTarget();let f=cg(this.projectionDeltaWithTransform,this.treeScale,l);c&&(f=c(l,f)),s.transform=f;const{x:m,y:g}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,h.animationValues?s.opacity=h===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:s.opacity=h===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const _ in Bn){if(l[_]===void 0)continue;const{correct:v,applyTo:x,isCSSVariable:b}=Bn[_],k=f==="none"?l[_]:v(l[_],h);if(x){const S=x.length;for(let M=0;M<S;M++)s[x[M]]=k}else b?this.options.visualElement.renderState.vars[_]=k:s[_]=k}this.options.layoutId&&(s.pointerEvents=h===this?Er(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ku),this.root.sharedNodes.clear()}}}function dg(t){t.updateLayout()}function hg(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;o==="size"?Ut(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Pt(m);m.min=r[f].min,m.max=m.min+g}):Ru(o,e.layoutBox,r)&&Ut(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Pt(r[f]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const a=en();Un(a,r,e.layoutBox);const c=en();s?Un(c,t.applyTransform(i,!0),e.measuredBox):Un(c,r,e.layoutBox);const h=!gu(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const _=pt();$n(_,e.layoutBox,m.layoutBox);const v=pt();$n(v,r,g.layoutBox),vu(_,v)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=_,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:h,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function fg(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function pg(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function mg(t){t.clearSnapshot()}function ku(t){t.clearMeasurements()}function Eu(t){t.isLayoutDirty=!1}function gg(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Su(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function yg(t){t.resolveTargetDelta()}function wg(t){t.calcProjection()}function vg(t){t.resetSkewAndRotation()}function _g(t){t.removeLeadSnapshot()}function Tu(t,e,n){t.translate=st(e.translate,0,n),t.scale=st(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Au(t,e,n,r){t.min=st(e.min,n.min,r),t.max=st(e.max,n.max,r)}function bg(t,e,n,r){Au(t.x,e.x,n.x,r),Au(t.y,e.y,n.y,r)}function xg(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Cg={duration:.45,ease:[.4,0,.1,1]},Pu=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Iu=Pu("applewebkit/")&&!Pu("chrome/")?Math.round:Vt;function Mu(t){t.min=Iu(t.min),t.max=Iu(t.max)}function kg(t){Mu(t.x),Mu(t.y)}function Ru(t,e,n){return t==="position"||t==="preserve-aspect"&&!I0(_u(e),_u(n),.2)}function Eg(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Sg=Cu({attachResizeListener:(t,e)=>On(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wo={current:void 0},Nu=Cu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Wo.current){const t=new Sg({});t.mount(window),t.setOptions({layoutScroll:!0}),Wo.current=t}return Wo.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Tg={pan:{Feature:W0},drag:{Feature:H0,ProjectionNode:Nu,MeasureLayout:iu}};function Du(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&rt.postRender(()=>o(e,Fn(e)))}class Ag extends ye{mount(){const{current:e}=this.node;e&&(this.unmount=Jp(e,(n,r)=>(Du(this.node,r,"Start"),i=>Du(this.node,i,"End"))))}unmount(){}}class Pg extends ye{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=Sn(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Lu(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&rt.postRender(()=>o(e,Fn(e)))}class Ig extends ye{mount(){const{current:e}=this.node;e&&(this.unmount=nm(e,(n,r)=>(Lu(this.node,r,"Start"),(i,{success:o})=>Lu(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ko=new WeakMap,qo=new WeakMap,Mg=t=>{const e=Ko.get(t.target);e&&e(t)},Rg=t=>{t.forEach(Mg)};function Ng({root:t,...e}){const n=t||document;qo.has(n)||qo.set(n,{});const r=qo.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Rg,{root:t,...e})),r[i]}function Dg(t,e,n){const r=Ng(e);return Ko.set(t,n),r.observe(t),()=>{Ko.delete(t),r.unobserve(t)}}const Lg={some:0,all:1};class Bg extends ye{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Lg[i]},a=c=>{const{isIntersecting:h}=c;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),m=h?l:f;m&&m(c)};return Dg(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Og(e,n))&&this.startObserver()}unmount(){}}function Og({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Fg={...k0,...{inView:{Feature:Bg},tap:{Feature:Ig},focus:{Feature:Pg},hover:{Feature:Ag}},...Tg,...{layout:{ProjectionNode:Nu,MeasureLayout:iu}}},Qt=Um(Fg,Qm);/**
10
10
  * @license lucide-react v0.435.0 - ISC
11
11
  *
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */const Og=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Du=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
14
+ */const Vg=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bu=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
15
15
  * @license lucide-react v0.435.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */var Fg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
19
+ */var Ug={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
20
20
  * @license lucide-react v0.435.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
- */const Vg=fe(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},c)=>B("svg",{ref:c,...Fg,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Du("lucide",i),...a},[...s.map(([h,l])=>B(h,l)),...Array.isArray(o)?o:[o]]));/**
24
+ */const $g=fe(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},c)=>B("svg",{ref:c,...Ug,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Bu("lucide",i),...a},[...s.map(([h,l])=>B(h,l)),...Array.isArray(o)?o:[o]]));/**
25
25
  * @license lucide-react v0.435.0 - ISC
26
26
  *
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */const te=(t,e)=>{const n=fe(({className:r,...i},o)=>B(Vg,{ref:o,iconNode:e,className:Du(`lucide-${Og(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
29
+ */const te=(t,e)=>{const n=fe(({className:r,...i},o)=>B($g,{ref:o,iconNode:e,className:Bu(`lucide-${Vg(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
30
30
  * @license lucide-react v0.435.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
- */const Ug=te("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
34
+ */const zg=te("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
35
35
  * @license lucide-react v0.435.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
- */const $g=te("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
39
+ */const jg=te("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
40
40
  * @license lucide-react v0.435.0 - ISC
41
41
  *
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */const zg=te("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
44
+ */const Hg=te("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
45
45
  * @license lucide-react v0.435.0 - ISC
46
46
  *
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */const jg=te("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
49
+ */const Wg=te("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
50
50
  * @license lucide-react v0.435.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const Hg=te("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
54
+ */const Kg=te("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
55
55
  * @license lucide-react v0.435.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */const Wg=te("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
59
+ */const qg=te("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
60
60
  * @license lucide-react v0.435.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const Kg=te("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/**
64
+ */const Yg=te("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/**
65
65
  * @license lucide-react v0.435.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const Lu=te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
69
+ */const Ou=te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
70
70
  * @license lucide-react v0.435.0 - ISC
71
71
  *
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */const qg=te("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
74
+ */const Gg=te("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
75
75
  * @license lucide-react v0.435.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */const Yg=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gg=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=W(!1);U(()=>{if(n>0&&!e){i(!0);const s=setTimeout(()=>i(!1),600),a=setInterval(()=>{i(!0),setTimeout(()=>i(!1),600)},1e4);return()=>{clearTimeout(s),clearInterval(a)}}else i(!1)},[n,e]);const o=n>0&&!e;return w("div",{className:"fixed",style:{zIndex:9998,bottom:30,right:30},children:[r&&o&&w(Qt.div,{className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(135deg, var(--dc-primary) 0%, var(--dc-primary-mid) 80%, var(--dc-primary-dark) 100%)"},initial:{scale:1,opacity:.6},animate:{scale:1.5,opacity:0},transition:{duration:.6,ease:"easeOut"}}),w(Qt.button,{onClick:t,className:"relative w-14 h-14 rounded-full shadow-lg flex items-center justify-center outline-none",style:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.25)",background:"linear-gradient(135deg, var(--dc-primary) 0%, var(--dc-primary-mid) 80%, var(--dc-primary-dark) 100%)"},"aria-label":e?"Close chat":"Open chat",animate:{scale:[1,.9,1.05,1]},transition:{duration:.25,ease:"easeOut"},children:[w(_o,{mode:"wait",initial:!1,children:w(Qt.div,{initial:{rotate:-90,opacity:0,scale:.9},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:90,opacity:0,scale:.9},transition:{duration:.18,ease:"easeInOut"},className:"flex items-center justify-center",whileHover:{scale:1.1},whileTap:{scale:.95},children:e?w(Yg,{size:24,color:"#FFFFFF"}):w(jg,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")}),w(_o,{children:o&&w(Qt.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute flex items-center justify-center",style:{top:-4,right:-4,minWidth:22,height:22,borderRadius:11,backgroundColor:"var(--dc-primary)",border:"2px solid #FFFFFF",padding:"0 6px"},children:w("span",{style:{color:"#FFFFFF",fontSize:12,fontWeight:600,lineHeight:1},children:n>99?"99+":n})})})]})]})};/*! js-cookie v3.0.5 | MIT */function Pr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var Xg={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function qo(t,e){function n(i,o,s){if(!(typeof document>"u")){s=Pr({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),h=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(s[l]=t.read(h,l),i===l)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Pr({},o,{expires:-1}))},withAttributes:function(i){return qo(this.converter,Pr({},this.attributes,i))},withConverter:function(i){return qo(Pr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Pe=qo(Xg,{path:"/"});const Zg={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Bu=t=>{let e;const n=new Set,r=(l,f)=>{const m=typeof l=="function"?l(e):l;if(!Object.is(m,e)){const g=e;e=f??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(_=>_(e,g))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>h,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(Zg?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=e=t(r,i,c);return c},Jg=t=>t?Bu(t):Bu;function Qg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ty(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Ou={exports:{}},Fu={};const Vu=ty(af);var Uu={exports:{}},$u={};/**
79
+ */const Xg=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zg={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Fu=t=>{let e;const n=new Set,r=(l,f)=>{const m=typeof l=="function"?l(e):l;if(!Object.is(m,e)){const g=e;e=f??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(_=>_(e,g))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>h,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(Zg?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=e=t(r,i,c);return c},Jg=t=>t?Fu(t):Fu;function Qg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ty(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Vu={exports:{}},Uu={};const $u=ty(lf);var zu={exports:{}},ju={};/**
80
80
  * @license React
81
81
  * use-sync-external-store-shim.production.min.js
82
82
  *
@@ -84,7 +84,7 @@
84
84
  *
85
85
  * This source code is licensed under the MIT license found in the
86
86
  * LICENSE file in the root directory of this source tree.
87
- */var rn=Vu;function ey(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ny=typeof Object.is=="function"?Object.is:ey,ry=rn.useState,iy=rn.useEffect,oy=rn.useLayoutEffect,sy=rn.useDebugValue;function ay(t,e){var n=e(),r=ry({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return oy(function(){i.value=n,i.getSnapshot=e,Yo(i)&&o({inst:i})},[t,n,e]),iy(function(){return Yo(i)&&o({inst:i}),t(function(){Yo(i)&&o({inst:i})})},[t]),sy(n),n}function Yo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ny(t,n)}catch{return!0}}function cy(t,e){return e()}var ly=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cy:ay;$u.useSyncExternalStore=rn.useSyncExternalStore!==void 0?rn.useSyncExternalStore:ly,Uu.exports=$u;var uy=Uu.exports;/**
87
+ */var rn=$u;function ey(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ny=typeof Object.is=="function"?Object.is:ey,ry=rn.useState,iy=rn.useEffect,oy=rn.useLayoutEffect,sy=rn.useDebugValue;function ay(t,e){var n=e(),r=ry({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return oy(function(){i.value=n,i.getSnapshot=e,Yo(i)&&o({inst:i})},[t,n,e]),iy(function(){return Yo(i)&&o({inst:i}),t(function(){Yo(i)&&o({inst:i})})},[t]),sy(n),n}function Yo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ny(t,n)}catch{return!0}}function cy(t,e){return e()}var ly=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cy:ay;ju.useSyncExternalStore=rn.useSyncExternalStore!==void 0?rn.useSyncExternalStore:ly,zu.exports=ju;var uy=zu.exports;/**
88
88
  * @license React
89
89
  * use-sync-external-store-shim/with-selector.production.min.js
90
90
  *
@@ -92,27 +92,27 @@
92
92
  *
93
93
  * This source code is licensed under the MIT license found in the
94
94
  * LICENSE file in the root directory of this source tree.
95
- */var Ir=Vu,dy=uy;function hy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var fy=typeof Object.is=="function"?Object.is:hy,py=dy.useSyncExternalStore,my=Ir.useRef,gy=Ir.useEffect,yy=Ir.useMemo,wy=Ir.useDebugValue;Fu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=my(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=yy(function(){function c(g){if(!h){if(h=!0,l=g,g=r(g),i!==void 0&&s.hasValue){var _=s.value;if(i(_,g))return f=_}return f=g}if(_=f,fy(l,g))return _;var v=r(g);return i!==void 0&&i(_,v)?_:(l=g,f=v)}var h=!1,l,f,m=n===void 0?null:n;return[function(){return c(e())},m===null?void 0:function(){return c(m())}]},[e,n,r,i]);var a=py(t,o[0],o[1]);return gy(function(){s.hasValue=!0,s.value=a},[a]),wy(a),a},Ou.exports=Fu;var vy=Ou.exports;const _y=Qg(vy),zu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:by}=We,{useSyncExternalStoreWithSelector:xy}=_y;let ju=!1;const Cy=t=>t;function ky(t,e=Cy,n){(zu?"production":void 0)!=="production"&&n&&!ju&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ju=!0);const r=xy(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return by(r),r}const Hu=t=>{(zu?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Jg(t):t,n=(r,i)=>ky(e,r,i);return Object.assign(n,e),n},Sy=t=>t?Hu(t):Hu;var Wu=Symbol.for("immer-nothing"),Ku=Symbol.for("immer-draftable"),Dt=Symbol.for("immer-state");function Kt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var on=Object.getPrototypeOf;function sn(t){return!!t&&!!t[Dt]}function Ie(t){var e;return t?qu(t)||Array.isArray(t)||!!t[Ku]||!!((e=t.constructor)!=null&&e[Ku])||Nr(t)||Dr(t):!1}var Ey=Object.prototype.constructor.toString();function qu(t){if(!t||typeof t!="object")return!1;const e=on(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Ey}function Mr(t,e){Rr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Rr(t){const e=t[Dt];return e?e.type_:Array.isArray(t)?1:Nr(t)?2:Dr(t)?3:0}function Go(t,e){return Rr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Yu(t,e,n){const r=Rr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Ty(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Nr(t){return t instanceof Map}function Dr(t){return t instanceof Set}function Me(t){return t.copy_||t.base_}function Xo(t,e){if(Nr(t))return new Map(t);if(Dr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=qu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Dt];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(on(t),r)}else{const r=on(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Zo(t,e=!1){return Lr(t)||sn(t)||!Ie(t)||(Rr(t)>1&&(t.set=t.add=t.clear=t.delete=Ay),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Zo(r,!0))),t}function Ay(){Kt(2)}function Lr(t){return Object.isFrozen(t)}var Py={};function Re(t){const e=Py[t];return e||Kt(0,t),e}var jn;function Gu(){return jn}function Iy(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xu(t,e){e&&(Re("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Jo(t){Qo(t),t.drafts_.forEach(My),t.drafts_=null}function Qo(t){t===jn&&(jn=t.parent_)}function Zu(t){return jn=Iy(jn,t)}function My(t){const e=t[Dt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ju(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Dt].modified_&&(Jo(e),Kt(4)),Ie(t)&&(t=Br(e,t),e.parent_||Or(e,t)),e.patches_&&Re("Patches").generateReplacementPatches_(n[Dt].base_,t,e.patches_,e.inversePatches_)):t=Br(e,n,[]),Jo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Wu?t:void 0}function Br(t,e,n){if(Lr(e))return e;const r=e[Dt];if(!r)return Mr(e,(i,o)=>Qu(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Or(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Mr(o,(a,c)=>Qu(t,r,i,a,c,n,s)),Or(t,i,!1),n&&t.patches_&&Re("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Qu(t,e,n,r,i,o,s){if(sn(i)){const a=o&&e&&e.type_!==3&&!Go(e.assigned_,r)?o.concat(r):void 0,c=Br(t,i,a);if(Yu(n,r,c),sn(c))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Ie(i)&&!Lr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Br(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Or(t,i)}}function Or(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Zo(e,n)}function Ry(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Gu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=ts;n&&(i=[r],o=Hn);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var ts={get(t,e){if(e===Dt)return t;const n=Me(t);if(!Go(n,e))return Ny(t,n,e);const r=n[e];return t.finalized_||!Ie(r)?r:r===es(t.base_,e)?(rs(t),t.copy_[e]=is(r,t)):r},has(t,e){return e in Me(t)},ownKeys(t){return Reflect.ownKeys(Me(t))},set(t,e,n){const r=td(Me(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=es(Me(t),e),o=i==null?void 0:i[Dt];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(Ty(n,i)&&(n!==void 0||Go(t.base_,e)))return!0;rs(t),ns(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return es(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,rs(t),ns(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Me(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Kt(11)},getPrototypeOf(t){return on(t.base_)},setPrototypeOf(){Kt(12)}},Hn={};Mr(ts,(t,e)=>{Hn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Hn.deleteProperty=function(t,e){return Hn.set.call(this,t,e,void 0)},Hn.set=function(t,e,n){return ts.set.call(this,t[0],e,n,t[0])};function es(t,e){const n=t[Dt];return(n?Me(n):t)[e]}function Ny(t,e,n){var i;const r=td(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function td(t,e){if(!(e in t))return;let n=on(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=on(n)}}function ns(t){t.modified_||(t.modified_=!0,t.parent_&&ns(t.parent_))}function rs(t){t.copy_||(t.copy_=Xo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Dy=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(c=o,...h){return s.produce(c,l=>n.call(this,l,...h))}}typeof n!="function"&&Kt(6),r!==void 0&&typeof r!="function"&&Kt(7);let i;if(Ie(e)){const o=Zu(this),s=is(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Jo(o):Qo(o)}return Xu(o,r),Ju(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Wu&&(i=void 0),this.autoFreeze_&&Zo(i,!0),r){const o=[],s=[];Re("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else Kt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Ie(t)||Kt(8),sn(t)&&(t=Ly(t));const e=Zu(this),n=is(t,void 0);return n[Dt].isManual_=!0,Qo(e),n}finishDraft(t,e){const n=t&&t[Dt];(!n||!n.isManual_)&&Kt(9);const{scope_:r}=n;return Xu(r,e),Ju(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=Re("Patches").applyPatches_;return sn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function is(t,e){const n=Nr(t)?Re("MapSet").proxyMap_(t,e):Dr(t)?Re("MapSet").proxySet_(t,e):Ry(t,e);return(e?e.scope_:Gu()).drafts_.push(n),n}function Ly(t){return sn(t)||Kt(10,t),ed(t)}function ed(t){if(!Ie(t)||Lr(t))return t;const e=t[Dt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Xo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Xo(t,!0);return Mr(n,(r,i)=>{Yu(n,r,ed(i))}),e&&(e.finalized_=!1),n}var Lt=new Dy,an=Lt.produce;Lt.produceWithPatches.bind(Lt),Lt.setAutoFreeze.bind(Lt),Lt.setUseStrictShallowCopy.bind(Lt),Lt.applyPatches.bind(Lt),Lt.createDraft.bind(Lt),Lt.finishDraft.bind(Lt);const Fr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},os=new Map,Vr=t=>{const e=os.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},By=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=os.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return os.set(n.name,i),{type:"tracked",store:t,...i}},Oy=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let h;try{h=(o??(Fr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!h)return(Fr?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:l,...f}=By(a,h,c);let m=!0;i.setState=(v,x,b)=>{const k=n(v,x);if(!m)return k;const E=b===void 0?{type:s||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(l==null||l.send(E,r()),k):(l==null||l.send({...E,type:`${a}/${E.type}`},{...Vr(c.name),[a]:i.getState()}),k)};const g=(...v)=>{const x=m;m=!1,n(...v),m=x},_=t(i.setState,r,i);if(f.type==="untracked"?l==null||l.init(_):(f.stores[f.store]=i,l==null||l.init(Object.fromEntries(Object.entries(f.stores).map(([v,x])=>[v,v===f.store?_:x.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let v=!1;const x=i.dispatch;i.dispatch=(...b)=>{(Fr?"production":void 0)!=="production"&&b[0].type==="__setState"&&!v&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),v=!0),x(...b)}}return l.subscribe(v=>{var x;switch(v.type){case"ACTION":if(typeof v.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ss(v.payload,b=>{if(b.type==="__setState"){if(a===void 0){g(b.state);return}Object.keys(b.state).length!==1&&console.error(`
95
+ */var Pr=$u,dy=uy;function hy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var fy=typeof Object.is=="function"?Object.is:hy,py=dy.useSyncExternalStore,my=Pr.useRef,gy=Pr.useEffect,yy=Pr.useMemo,wy=Pr.useDebugValue;Uu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=my(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=yy(function(){function c(g){if(!h){if(h=!0,l=g,g=r(g),i!==void 0&&s.hasValue){var _=s.value;if(i(_,g))return f=_}return f=g}if(_=f,fy(l,g))return _;var v=r(g);return i!==void 0&&i(_,v)?_:(l=g,f=v)}var h=!1,l,f,m=n===void 0?null:n;return[function(){return c(e())},m===null?void 0:function(){return c(m())}]},[e,n,r,i]);var a=py(t,o[0],o[1]);return gy(function(){s.hasValue=!0,s.value=a},[a]),wy(a),a},Vu.exports=Uu;var vy=Vu.exports;const _y=Qg(vy),Hu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:by}=We,{useSyncExternalStoreWithSelector:xy}=_y;let Wu=!1;const Cy=t=>t;function ky(t,e=Cy,n){(Hu?"production":void 0)!=="production"&&n&&!Wu&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Wu=!0);const r=xy(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return by(r),r}const Ku=t=>{(Hu?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Jg(t):t,n=(r,i)=>ky(e,r,i);return Object.assign(n,e),n},Ey=t=>t?Ku(t):Ku;var qu=Symbol.for("immer-nothing"),Yu=Symbol.for("immer-draftable"),Dt=Symbol.for("immer-state");function Kt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var on=Object.getPrototypeOf;function sn(t){return!!t&&!!t[Dt]}function Pe(t){var e;return t?Gu(t)||Array.isArray(t)||!!t[Yu]||!!((e=t.constructor)!=null&&e[Yu])||Rr(t)||Nr(t):!1}var Sy=Object.prototype.constructor.toString();function Gu(t){if(!t||typeof t!="object")return!1;const e=on(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Sy}function Ir(t,e){Mr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Mr(t){const e=t[Dt];return e?e.type_:Array.isArray(t)?1:Rr(t)?2:Nr(t)?3:0}function Go(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Xu(t,e,n){const r=Mr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Ty(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Rr(t){return t instanceof Map}function Nr(t){return t instanceof Set}function Ie(t){return t.copy_||t.base_}function Xo(t,e){if(Rr(t))return new Map(t);if(Nr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Gu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Dt];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(on(t),r)}else{const r=on(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Zo(t,e=!1){return Dr(t)||sn(t)||!Pe(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=Ay),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Zo(r,!0))),t}function Ay(){Kt(2)}function Dr(t){return Object.isFrozen(t)}var Py={};function Me(t){const e=Py[t];return e||Kt(0,t),e}var jn;function Zu(){return jn}function Iy(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ju(t,e){e&&(Me("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Jo(t){Qo(t),t.drafts_.forEach(My),t.drafts_=null}function Qo(t){t===jn&&(jn=t.parent_)}function Qu(t){return jn=Iy(jn,t)}function My(t){const e=t[Dt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function td(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Dt].modified_&&(Jo(e),Kt(4)),Pe(t)&&(t=Lr(e,t),e.parent_||Br(e,t)),e.patches_&&Me("Patches").generateReplacementPatches_(n[Dt].base_,t,e.patches_,e.inversePatches_)):t=Lr(e,n,[]),Jo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==qu?t:void 0}function Lr(t,e,n){if(Dr(e))return e;const r=e[Dt];if(!r)return Ir(e,(i,o)=>ed(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Br(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Ir(o,(a,c)=>ed(t,r,i,a,c,n,s)),Br(t,i,!1),n&&t.patches_&&Me("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function ed(t,e,n,r,i,o,s){if(sn(i)){const a=o&&e&&e.type_!==3&&!Go(e.assigned_,r)?o.concat(r):void 0,c=Lr(t,i,a);if(Xu(n,r,c),sn(c))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Pe(i)&&!Dr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Lr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Br(t,i)}}function Br(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Zo(e,n)}function Ry(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Zu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=ts;n&&(i=[r],o=Hn);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var ts={get(t,e){if(e===Dt)return t;const n=Ie(t);if(!Go(n,e))return Ny(t,n,e);const r=n[e];return t.finalized_||!Pe(r)?r:r===es(t.base_,e)?(rs(t),t.copy_[e]=is(r,t)):r},has(t,e){return e in Ie(t)},ownKeys(t){return Reflect.ownKeys(Ie(t))},set(t,e,n){const r=nd(Ie(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=es(Ie(t),e),o=i==null?void 0:i[Dt];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(Ty(n,i)&&(n!==void 0||Go(t.base_,e)))return!0;rs(t),ns(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return es(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,rs(t),ns(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Ie(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Kt(11)},getPrototypeOf(t){return on(t.base_)},setPrototypeOf(){Kt(12)}},Hn={};Ir(ts,(t,e)=>{Hn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Hn.deleteProperty=function(t,e){return Hn.set.call(this,t,e,void 0)},Hn.set=function(t,e,n){return ts.set.call(this,t[0],e,n,t[0])};function es(t,e){const n=t[Dt];return(n?Ie(n):t)[e]}function Ny(t,e,n){var i;const r=nd(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function nd(t,e){if(!(e in t))return;let n=on(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=on(n)}}function ns(t){t.modified_||(t.modified_=!0,t.parent_&&ns(t.parent_))}function rs(t){t.copy_||(t.copy_=Xo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Dy=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(c=o,...h){return s.produce(c,l=>n.call(this,l,...h))}}typeof n!="function"&&Kt(6),r!==void 0&&typeof r!="function"&&Kt(7);let i;if(Pe(e)){const o=Qu(this),s=is(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Jo(o):Qo(o)}return Ju(o,r),td(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===qu&&(i=void 0),this.autoFreeze_&&Zo(i,!0),r){const o=[],s=[];Me("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else Kt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Pe(t)||Kt(8),sn(t)&&(t=Ly(t));const e=Qu(this),n=is(t,void 0);return n[Dt].isManual_=!0,Qo(e),n}finishDraft(t,e){const n=t&&t[Dt];(!n||!n.isManual_)&&Kt(9);const{scope_:r}=n;return Ju(r,e),td(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=Me("Patches").applyPatches_;return sn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function is(t,e){const n=Rr(t)?Me("MapSet").proxyMap_(t,e):Nr(t)?Me("MapSet").proxySet_(t,e):Ry(t,e);return(e?e.scope_:Zu()).drafts_.push(n),n}function Ly(t){return sn(t)||Kt(10,t),rd(t)}function rd(t){if(!Pe(t)||Dr(t))return t;const e=t[Dt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Xo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Xo(t,!0);return Ir(n,(r,i)=>{Xu(n,r,rd(i))}),e&&(e.finalized_=!1),n}var Lt=new Dy,an=Lt.produce;Lt.produceWithPatches.bind(Lt),Lt.setAutoFreeze.bind(Lt),Lt.setUseStrictShallowCopy.bind(Lt),Lt.applyPatches.bind(Lt),Lt.createDraft.bind(Lt),Lt.finishDraft.bind(Lt);const Or={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},os=new Map,Fr=t=>{const e=os.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},By=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=os.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return os.set(n.name,i),{type:"tracked",store:t,...i}},Oy=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let h;try{h=(o??(Or?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!h)return(Or?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:l,...f}=By(a,h,c);let m=!0;i.setState=(v,x,b)=>{const k=n(v,x);if(!m)return k;const S=b===void 0?{type:s||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(l==null||l.send(S,r()),k):(l==null||l.send({...S,type:`${a}/${S.type}`},{...Fr(c.name),[a]:i.getState()}),k)};const g=(...v)=>{const x=m;m=!1,n(...v),m=x},_=t(i.setState,r,i);if(f.type==="untracked"?l==null||l.init(_):(f.stores[f.store]=i,l==null||l.init(Object.fromEntries(Object.entries(f.stores).map(([v,x])=>[v,v===f.store?_:x.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let v=!1;const x=i.dispatch;i.dispatch=(...b)=>{(Or?"production":void 0)!=="production"&&b[0].type==="__setState"&&!v&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),v=!0),x(...b)}}return l.subscribe(v=>{var x;switch(v.type){case"ACTION":if(typeof v.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ss(v.payload,b=>{if(b.type==="__setState"){if(a===void 0){g(b.state);return}Object.keys(b.state).length!==1&&console.error(`
96
96
  [zustand devtools middleware] Unsupported __setState action format.
97
97
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
98
98
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
99
- `);const k=b.state[a];if(k==null)return;JSON.stringify(i.getState())!==JSON.stringify(k)&&g(k);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(b)});case"DISPATCH":switch(v.payload.type){case"RESET":return g(_),a===void 0?l==null?void 0:l.init(i.getState()):l==null?void 0:l.init(Vr(c.name));case"COMMIT":if(a===void 0){l==null||l.init(i.getState());return}return l==null?void 0:l.init(Vr(c.name));case"ROLLBACK":return ss(v.state,b=>{if(a===void 0){g(b),l==null||l.init(i.getState());return}g(b[a]),l==null||l.init(Vr(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ss(v.state,b=>{if(a===void 0){g(b);return}JSON.stringify(i.getState())!==JSON.stringify(b[a])&&g(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=v.payload,k=(x=b.computedStates.slice(-1)[0])==null?void 0:x.state;if(!k)return;g(a===void 0?k:k[a]),l==null||l.send(null,b);return}case"PAUSE_RECORDING":return m=!m}return}}),_},ss=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)};function Fy(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=c=>c===null?null:JSON.parse(c,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Wn=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Wn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Wn(r)(n)}}}},Vy=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,b)=>({...b,...x}),...e},s=!1;const a=new Set,c=new Set;let h;try{h=o.getStorage()}catch{}if(!h)return t((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...x)},r,i);const l=Wn(o.serialize),f=()=>{const x=o.partialize({...r()});let b;const k=l({state:x,version:o.version}).then(E=>h.setItem(o.name,E)).catch(E=>{b=E});if(b)throw b;return k},m=i.setState;i.setState=(x,b)=>{m(x,b),f()};const g=t((...x)=>{n(...x),f()},r,i);let _;const v=()=>{var x;if(!h)return;s=!1,a.forEach(k=>k(r()));const b=((x=o.onRehydrateStorage)==null?void 0:x.call(o,r()))||void 0;return Wn(h.getItem.bind(h))(o.name).then(k=>{if(k)return o.deserialize(k)}).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==o.version){if(o.migrate)return o.migrate(k.state,k.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return k.state}).then(k=>{var E;return _=o.merge(k,(E=r())!=null?E:g),n(_,!0),f()}).then(()=>{b==null||b(_,void 0),s=!0,c.forEach(k=>k(_))}).catch(k=>{b==null||b(void 0,k)})};return i.persist={setOptions:x=>{o={...o,...x},x.getStorage&&(h=x.getStorage())},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(c.add(x),()=>{c.delete(x)})},v(),_||g},Uy=(t,e)=>(n,r,i)=>{let o={storage:Fy(()=>localStorage),partialize:v=>v,version:0,merge:(v,x)=>({...x,...v}),...e},s=!1;const a=new Set,c=new Set;let h=o.storage;if(!h)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,i);const l=()=>{const v=o.partialize({...r()});return h.setItem(o.name,{state:v,version:o.version})},f=i.setState;i.setState=(v,x)=>{f(v,x),l()};const m=t((...v)=>{n(...v),l()},r,i);i.getInitialState=()=>m;let g;const _=()=>{var v,x;if(!h)return;s=!1,a.forEach(k=>{var E;return k((E=r())!=null?E:m)});const b=((x=o.onRehydrateStorage)==null?void 0:x.call(o,(v=r())!=null?v:m))||void 0;return Wn(h.getItem.bind(h))(o.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==o.version){if(o.migrate)return[!0,o.migrate(k.state,k.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,k.state];return[!1,void 0]}).then(k=>{var E;const[I,T]=k;if(g=o.merge(T,(E=r())!=null?E:m),n(g,!0),I)return l()}).then(()=>{b==null||b(g,void 0),g=r(),s=!0,c.forEach(k=>k(g))}).catch(k=>{b==null||b(void 0,k)})};return i.persist={setOptions:v=>{o={...o,...v},v.storage&&(h=v.storage)},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},o.skipHydration||_(),g||m},$y=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Fr?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Vy(t,e)):Uy(t,e);function Ur(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function nd(t,e){const n=new Map;return t.forEach(r=>{const i=Ur(r);n.set(i,r)}),e.forEach(r=>{const i=Ur(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function zy(t,e){const n=Ur(e);return t.some(r=>Ur(r)===n)}const rd=460,jy=750,Hy="https://api.deskcord.chat";function Wy(){var n,r,i,o;const t=(r=(n=window.deskcord)==null?void 0:n.settings)==null?void 0:r.app_id,e=((o=(i=window.deskcord)==null?void 0:i.settings)==null?void 0:o.domain)??Hy;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const Bt=Wy();function yt(...t){}async function Ky(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(yt(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function qy(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${Bt.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(yt(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const id="deskcord_last_read",od="deskcord_unread_count",Yy=()=>{try{const t=localStorage.getItem(id);if(!t)return null;const e=parseInt(t,10);return isNaN(e)?null:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading last read timestamp"),null}},sd=t=>{try{localStorage.setItem(id,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},$r=()=>{try{const t=localStorage.getItem(od);if(!t)return 0;const e=parseInt(t,10);return isNaN(e)?0:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading unread count"),0}},Kn=t=>{try{localStorage.setItem(od,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},G=Sy(Oy($y((t,e)=>({_REHYDRATED_:!1,token:"",isNetworkInitialized:!1,isChatOpen:!1,isChatVisible:!1,isConversationOpen:!0,conversations:[],email:"",username:"",openConversationId:null,guildSettings:{iconURL:"",header_title:"",header_subtitle:"",lastUpdate:null},fullScreen:!1,isLoading:!1,networkError:null,currentConversationLastFetchedAt:null,pastConversationsLastFetchedAt:null,unreadCount:0,lastReadMessageDate:null,typingByThread:{},setThreadTyping:(n,r)=>t(i=>({typingByThread:{...i.typingByThread,[n]:r}})),setRehydrated:n=>t(()=>({_REHYDRATED_:n})),setFullScreen:n=>t(()=>({fullScreen:n})),setToken:n=>t(()=>({token:n})),toggleChatOpen:()=>t(n=>({isChatOpen:!n.isChatOpen})),setNetworkInitialized:n=>t(()=>({isNetworkInitialized:n})),setChatVisible:n=>t(()=>({isChatVisible:n})),setChatOpen:n=>t(()=>({isChatOpen:n})),setOpenConversationId:n=>t(()=>({openConversationId:n})),setConversations:n=>t(()=>({conversations:n})),setGuildSettings:n=>t(r=>({guildSettings:{...r.guildSettings,...n}})),setConversationOpen:(n,r)=>t(i=>({conversations:i.conversations.map(o=>o.threadId===n?{...o,status:r?"open":"closed"}:o)})),setConversationCSMember:(n,r)=>t(an(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(an(i=>{const o=i.conversations.find(s=>s.threadId===n);o?o.messages.push(r):(i.conversations.push({threadId:n,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[r]}),i.openConversationId=n)})),updateMessage:(n,r,i)=>t(an(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(c=>c.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(an(i=>{const o=i.conversations.findIndex(s=>s.threadId===n);o!==-1&&(i.conversations[o].messages=i.conversations[o].messages.filter(s=>s.date!==r))})),tempConversationToThread:n=>t(r=>({...r,openConversationId:n,conversations:r.conversations.map(i=>i.threadId==="TEMP"?{...i,threadId:n}:i)})),setEmail:n=>t(()=>({email:n})),setUsername:n=>t(()=>({username:n})),getConversation:()=>{const{conversations:n,openConversationId:r}=e();return r?n.find(i=>i.threadId===r)??null:null},setLoading:n=>t(()=>({isLoading:n})),setNetworkError:n=>t(()=>({networkError:n})),setCurrentConversationLastFetchedAt:n=>t(()=>({currentConversationLastFetchedAt:n})),setPastConversationsLastFetchedAt:n=>t(()=>({pastConversationsLastFetchedAt:n})),smartMergeCurrentConversation:n=>t(an(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=nd(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(an(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=nd(s.messages,i.messages);r.conversations[o]={...i,messages:a}}else r.conversations.push(i)}),r.pastConversationsLastFetchedAt=Date.now()})),incrementUnreadCount:()=>t(n=>{const r=n.unreadCount+1;return Kn(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return Kn(0),sd(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(Kn(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Pe.get("discord-widget");if(!n){const r=$r();t(()=>({unreadCount:r}));return}try{const r=await Ky(n);if(r!==null)yt(`Synced unread count from server: ${r}`),Kn(r),t(()=>({unreadCount:r}));else{yt("Server unavailable, using cached unread count");const i=$r();t(()=>({unreadCount:i}))}}catch{const i=$r();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();Kn(0),sd(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Pe.get("discord-widget");if(r)try{const i=await qy(r,n);yt(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=$r(),r=Yy();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:Gy(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function Gy(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function Xy({content:t}){const e=G.getState().username,n=Pe.get("discord-widget"),r=JSON.stringify({name:e,content:t}),i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization",`Bearer ${n}`);const o={method:"POST",headers:i,body:r};return await(await fetch(`${Bt.domain}/conversations/sendMessage`,o)).json()}var cn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(cn||{});const qn="System",Zy={content:"This conversation has been closed by the support.",support:!0,authorName:qn,date:Date.now()},Jy={content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:cn.IntroduceYourself};function ad(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:qn,date:Date.now(),ephemeral:!0}}function Qy(t){return{content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:cn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function t1(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const cd=["image/png","image/jpeg","image/gif","image/webp","application/pdf"],e1=fe(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const c=F(null),h=F(null),{addMessage:l,getConversation:f,removeMessage:m,updateMessage:g}=G(),_=f();Cn(a,()=>({upload:async()=>{if(h.current)try{const I=new FormData;I.append("file",h.current),o==null||o(h.current),x(h.current);const T=await fetch(n.url,{method:n.method,headers:n.headers,body:I}),R=await T.json();i==null||i(T),b(h.current),v(R)}catch(I){s==null||s(I),k(h.current)}},clear:()=>{h.current=null,c.current&&(c.current.value=""),r==null||r(null)}}));function v(I){_&&l(_.threadId,t1(I.attachments))}function x(I){_&&l(_.threadId,Qy({fileName:I.name,status:"uploading",size:I.size}))}function b(I){var R;if(!_)return;const T=(R=f())==null?void 0:R.messages.find(N=>{var P,M;return((M=(P=N.customRendererProps)==null?void 0:P.file)==null?void 0:M.fileName)===I.name});T&&m(_.threadId,T.date)}function k(I){var R,N;if(!_)return;const T=(R=f())==null?void 0:R.messages.find(P=>{var M,D;return((D=(M=P.customRendererProps)==null?void 0:M.file)==null?void 0:D.fileName)===I.name});(N=T==null?void 0:T.customRendererProps)!=null&&N.file&&g(_.threadId,T.date,{...T,customRendererProps:{...T.customRendererProps,file:{...T.customRendererProps.file,status:"error"}}})}return w(tt,{children:[w("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var I;return(I=c.current)==null?void 0:I.click()},children:w(Hg,{size:16})}),w("input",{type:"file",accept:t,ref:c,style:{display:"none"},onChange:I=>{var R;const T=(R=I.target.files)==null?void 0:R[0];T&&T.size<=e&&cd.includes(T.type)?(h.current=T,r==null||r(T)):(h.current=null,r==null||r(null))}})]})}),n1=({size:t})=>w("svg",{className:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:t||16,height:t||16,fill:"currentColor",viewBox:"0 0 16 16",children:w("path",{d:"M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"})}),r1=({onPickEmoji:t})=>w("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:w("div",{className:"grid grid-cols-8 gap-2",children:i1.map((e,n)=>w("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),i1=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],o1=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>w("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[w("div",{className:"flex justify-center absolute inset-0",children:w("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),w("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:w(Lu,{size:20})}),w("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-800 bg-opacity-80 text-white text-sm px-2 py-1 truncate",children:e})]}),as=({extension:t,className:e="",iconColorClassName:n="text-gray-300 dark:text-neutral-600"})=>{const r=t==null?void 0:t.slice(0,4).toUpperCase();return w("span",{className:`relative inline-flex shrink-0 items-center justify-center ${e}`,children:[w($g,{className:`w-full h-full ${n}`,strokeWidth:1.5}),r&&w("span",{className:"absolute left-1/2 bottom-[22%] -translate-x-1/2 rounded-[3px] bg-blue-600 px-[3px] leading-[11px] text-[7px] font-bold tracking-tight text-white",children:r})]})};function zr(t){const e=t.lastIndexOf(".");return e<=0||e===t.length-1?"":t.slice(e+1).toLowerCase()}function cs(t,e=!1,n=1){const r=e?1e3:1024;if(Math.abs(t)<r)return t+" B";const i=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let o=-1;const s=10**n;do t/=r,++o;while(Math.round(Math.abs(t)*s)/s>=r&&o<i.length-1);return t.toFixed(n)+" "+i[o]}const s1=({fileName:t,size:e,onDelete:n})=>w("div",{className:"relative flex items-center gap-3 w-56 rounded-lg border border-gray-200 bg-gray-50 pl-3 pr-8 py-2",children:[w(as,{extension:zr(t),className:"w-8 h-9"}),w("div",{className:"min-w-0",children:[w("p",{className:"text-sm font-medium text-gray-800 truncate",children:t}),w("p",{className:"text-xs text-gray-500",children:cs(e)})]}),w("button",{onClick:n,"aria-label":"Remove attachment",className:"absolute top-1 right-1 p-1 rounded-lg text-gray-400 hover:text-red-500 transition",children:w(Lu,{size:16})})]}),a1=({className:t})=>w("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M23.9 73.2C19.4333 73.2 15.3667 72.0667 11.7 69.8C8.1 67.5333 5.23333 64.4333 3.1 60.5C1.03333 56.5 7.45058e-08 51.9667 7.45058e-08 46.9C7.45058e-08 41.7667 1.06667 37.2333 3.2 33.3C5.33333 29.3 8.23333 26.1667 11.9 23.9C15.6333 21.5667 19.7667 20.4 24.3 20.4C27.7667 20.4 30.8 21.0333 33.4 22.3C36 23.5 38.1333 25.2667 39.8 27.6V-2.86102e-06H54.8V72H41.5L39.8 65.5C38.8 66.9 37.5667 68.2 36.1 69.4C34.7 70.5333 33 71.4333 31 72.1C29 72.8333 26.6333 73.2 23.9 73.2ZM27.8 60.1C30.2667 60.1 32.4333 59.5333 34.3 58.4C36.2333 57.2667 37.7 55.7 38.7 53.7C39.7667 51.7 40.3 49.4 40.3 46.8C40.3 44.2 39.7667 41.9 38.7 39.9C37.7 37.9 36.2333 36.3333 34.3 35.2C32.4333 34.0667 30.2667 33.5 27.8 33.5C25.4 33.5 23.2333 34.0667 21.3 35.2C19.4333 36.3333 17.9667 37.9 16.9 39.9C15.8333 41.9 15.3 44.1667 15.3 46.7C15.3 49.3 15.8333 51.6333 16.9 53.7C17.9667 55.7 19.4333 57.2667 21.3 58.4C23.2333 59.5333 25.4 60.1 27.8 60.1ZM86.6086 73.2C81.4086 73.2 76.8419 72.1333 72.9086 70C68.9753 67.8 65.8753 64.7667 63.6086 60.9C61.4086 56.9667 60.3086 52.4667 60.3086 47.4C60.3086 42.2 61.4086 37.5667 63.6086 33.5C65.8086 29.4333 68.8753 26.2333 72.8086 23.9C76.7419 21.5667 81.3086 20.4 86.5086 20.4C91.5753 20.4 96.0086 21.5 99.8086 23.7C103.609 25.9 106.575 28.9 108.709 32.7C110.909 36.4333 112.009 40.7667 112.009 45.7C112.009 46.3667 111.975 47.1333 111.909 48C111.909 48.8 111.842 49.6333 111.709 50.5H71.0086V41.8H96.7086C96.5753 39 95.5419 36.7667 93.6086 35.1C91.7419 33.3667 89.4086 32.5 86.6086 32.5C84.4753 32.5 82.5419 33 80.8086 34C79.0753 35 77.6753 36.5 76.6086 38.5C75.6086 40.5 75.1086 43.0333 75.1086 46.1V49.1C75.1086 51.4333 75.5419 53.5 76.4086 55.3C77.3419 57.1 78.6419 58.5 80.3086 59.5C82.0419 60.5 84.0753 61 86.4086 61C88.6086 61 90.4086 60.5667 91.8086 59.7C93.2753 58.7667 94.4086 57.6 95.2086 56.2H110.509C109.575 59.4 107.975 62.3 105.709 64.9C103.442 67.4333 100.675 69.4667 97.4086 71C94.1419 72.4667 90.5419 73.2 86.6086 73.2ZM138.039 73.2C133.306 73.2 129.206 72.4667 125.739 71C122.339 69.4667 119.639 67.4 117.639 64.8C115.706 62.2 114.606 59.2667 114.339 56H129.239C129.506 57.1333 129.972 58.1667 130.639 59.1C131.372 59.9667 132.339 60.6667 133.539 61.2C134.806 61.6667 136.206 61.9 137.739 61.9C139.406 61.9 140.739 61.7 141.739 61.3C142.806 60.8333 143.606 60.2333 144.139 59.5C144.672 58.7667 144.939 58 144.939 57.2C144.939 55.9333 144.539 54.9667 143.739 54.3C143.006 53.6333 141.906 53.1 140.439 52.7C138.972 52.2333 137.206 51.8 135.139 51.4C132.739 50.8667 130.339 50.2667 127.939 49.6C125.606 48.8667 123.506 47.9667 121.639 46.9C119.839 45.8333 118.372 44.4667 117.239 42.8C116.172 41.0667 115.639 38.9667 115.639 36.5C115.639 33.5 116.472 30.8 118.139 28.4C119.806 25.9333 122.206 24 125.339 22.6C128.472 21.1333 132.272 20.4 136.739 20.4C143.072 20.4 148.039 21.8 151.639 24.6C155.239 27.4 157.372 31.1667 158.039 35.9H144.039C143.639 34.5667 142.806 33.5667 141.539 32.9C140.272 32.1667 138.672 31.8 136.739 31.8C134.539 31.8 132.872 32.1667 131.739 32.9C130.606 33.6333 130.039 34.6 130.039 35.8C130.039 36.6 130.406 37.3333 131.139 38C131.939 38.6 133.072 39.1333 134.539 39.6C136.006 40.0667 137.806 40.5333 139.939 41C144.006 41.8667 147.506 42.8 150.439 43.8C153.439 44.8 155.772 46.2667 157.439 48.2C159.106 50.0667 159.906 52.8 159.839 56.4C159.906 59.6667 159.039 62.5667 157.239 65.1C155.506 67.6333 153.006 69.6333 149.739 71.1C146.472 72.5 142.572 73.2 138.039 73.2ZM198.643 72L177.843 44.4L196.343 21.6H214.043L189.143 50.8V38.8L217.243 72H198.643ZM165.043 72V-2.86102e-06H180.043V72H165.043ZM239.509 73.2C234.309 73.2 229.709 72.0667 225.709 69.8C221.776 67.5333 218.676 64.4333 216.409 60.5C214.209 56.5667 213.109 52.0667 213.109 47C213.109 41.8 214.209 37.2333 216.409 33.3C218.676 29.3 221.776 26.1667 225.709 23.9C229.709 21.5667 234.309 20.4 239.509 20.4C246.109 20.4 251.643 22.1333 256.109 25.6C260.643 29.0667 263.509 33.9 264.709 40.1H248.809C248.209 37.9667 247.076 36.3 245.409 35.1C243.743 33.9 241.743 33.3 239.409 33.3C237.209 33.3 235.276 33.8667 233.609 35C232.009 36.0667 230.743 37.6333 229.809 39.7C228.876 41.7 228.409 44.0667 228.409 46.8C228.409 48.8667 228.676 50.7333 229.209 52.4C229.743 54.0667 230.476 55.5 231.409 56.7C232.409 57.9 233.576 58.8333 234.909 59.5C236.243 60.1 237.743 60.4 239.409 60.4C241.009 60.4 242.409 60.1333 243.609 59.6C244.876 59.0667 245.943 58.3 246.809 57.3C247.743 56.3 248.409 55.0667 248.809 53.6H264.709C263.509 59.6 260.643 64.3667 256.109 67.9C251.576 71.4333 246.043 73.2 239.509 73.2ZM294.528 73.2C289.661 73.2 285.295 72.0667 281.428 69.8C277.561 67.5333 274.495 64.4333 272.228 60.5C269.961 56.5 268.828 51.9667 268.828 46.9C268.828 41.7 269.961 37.1333 272.228 33.2C274.495 29.2 277.561 26.0667 281.428 23.8C285.361 21.5333 289.728 20.4 294.528 20.4C299.461 20.4 303.861 21.5333 307.728 23.8C311.595 26.0667 314.661 29.2 316.928 33.2C319.195 37.1333 320.328 41.6667 320.328 46.8C320.328 51.9333 319.195 56.5 316.928 60.5C314.661 64.4333 311.595 67.5333 307.728 69.8C303.861 72.0667 299.461 73.2 294.528 73.2ZM294.528 60.2C296.528 60.2 298.295 59.7 299.828 58.7C301.428 57.7 302.695 56.2 303.628 54.2C304.561 52.2 305.028 49.7333 305.028 46.8C305.028 43.8667 304.561 41.4 303.628 39.4C302.695 37.4 301.461 35.9 299.928 34.9C298.395 33.9 296.628 33.4 294.628 33.4C292.628 33.4 290.828 33.9 289.228 34.9C287.695 35.9 286.461 37.4 285.528 39.4C284.595 41.4 284.128 43.8667 284.128 46.8C284.128 49.7333 284.595 52.2 285.528 54.2C286.461 56.2 287.695 57.7 289.228 58.7C290.828 59.7 292.595 60.2 294.528 60.2ZM325.852 72V21.6H339.152L340.552 30.8C341.885 28.6667 343.452 26.8333 345.252 25.3C347.052 23.7667 349.118 22.5667 351.452 21.7C353.852 20.8333 356.418 20.4 359.152 20.4V36.3H354.152C352.152 36.3 350.318 36.5333 348.652 37C347.052 37.4 345.652 38.1 344.452 39.1C343.318 40.1 342.418 41.4667 341.752 43.2C341.152 44.8667 340.852 46.9667 340.852 49.5V72H325.852ZM383.853 73.2C379.386 73.2 375.32 72.0667 371.653 69.8C368.053 67.5333 365.186 64.4333 363.053 60.5C360.986 56.5 359.953 51.9667 359.953 46.9C359.953 41.7667 361.02 37.2333 363.153 33.3C365.286 29.3 368.186 26.1667 371.853 23.9C375.586 21.5667 379.72 20.4 384.253 20.4C387.72 20.4 390.753 21.0333 393.353 22.3C395.953 23.5 398.086 25.2667 399.753 27.6V-2.86102e-06H414.753V72H401.453L399.753 65.5C398.753 66.9 397.52 68.2 396.053 69.4C394.653 70.5333 392.953 71.4333 390.953 72.1C388.953 72.8333 386.586 73.2 383.853 73.2ZM387.753 60.1C390.22 60.1 392.386 59.5333 394.253 58.4C396.186 57.2667 397.653 55.7 398.653 53.7C399.72 51.7 400.253 49.4 400.253 46.8C400.253 44.2 399.72 41.9 398.653 39.9C397.653 37.9 396.186 36.3333 394.253 35.2C392.386 34.0667 390.22 33.5 387.753 33.5C385.353 33.5 383.186 34.0667 381.253 35.2C379.386 36.3333 377.92 37.9 376.853 39.9C375.786 41.9 375.253 44.1667 375.253 46.7C375.253 49.3 375.786 51.6333 376.853 53.7C377.92 55.7 379.386 57.2667 381.253 58.4C383.186 59.5333 385.353 60.1 387.753 60.1ZM428.762 72.5C426.028 72.5 423.795 71.7 422.062 70.1C420.395 68.4333 419.562 66.4333 419.562 64.1C419.562 61.7 420.395 59.7 422.062 58.1C423.795 56.4333 426.028 55.6 428.762 55.6C431.428 55.6 433.595 56.4333 435.262 58.1C436.928 59.7 437.762 61.7 437.762 64.1C437.762 66.4333 436.928 68.4333 435.262 70.1C433.595 71.7 431.428 72.5 428.762 72.5ZM467.42 73.2C462.22 73.2 457.62 72.0667 453.62 69.8C449.686 67.5333 446.586 64.4333 444.32 60.5C442.12 56.5667 441.02 52.0667 441.02 47C441.02 41.8 442.12 37.2333 444.32 33.3C446.586 29.3 449.686 26.1667 453.62 23.9C457.62 21.5667 462.22 20.4 467.42 20.4C474.02 20.4 479.553 22.1333 484.02 25.6C488.553 29.0667 491.42 33.9 492.62 40.1H476.72C476.12 37.9667 474.986 36.3 473.32 35.1C471.653 33.9 469.653 33.3 467.32 33.3C465.12 33.3 463.186 33.8667 461.52 35C459.92 36.0667 458.653 37.6333 457.72 39.7C456.786 41.7 456.32 44.0667 456.32 46.8C456.32 48.8667 456.586 50.7333 457.12 52.4C457.653 54.0667 458.386 55.5 459.32 56.7C460.32 57.9 461.486 58.8333 462.82 59.5C464.153 60.1 465.653 60.4 467.32 60.4C468.92 60.4 470.32 60.1333 471.52 59.6C472.786 59.0667 473.853 58.3 474.72 57.3C475.653 56.3 476.32 55.0667 476.72 53.6H492.62C491.42 59.6 488.553 64.3667 484.02 67.9C479.486 71.4333 473.953 73.2 467.42 73.2ZM498.238 72V-2.86102e-06H513.238V28.8C514.838 26.2667 517.005 24.2333 519.738 22.7C522.472 21.1667 525.672 20.4 529.338 20.4C533.605 20.4 537.172 21.3 540.038 23.1C542.905 24.9 545.072 27.5333 546.538 31C548.005 34.4 548.738 38.5333 548.738 43.4V72H533.838V44.8C533.838 41.0667 533.038 38.1667 531.438 36.1C529.905 34.0333 527.438 33 524.038 33C522.038 33 520.205 33.5 518.538 34.5C516.872 35.5 515.572 36.9333 514.638 38.8C513.705 40.6 513.238 42.7667 513.238 45.3V72H498.238ZM572.427 73.2C568.227 73.2 564.727 72.5333 561.927 71.2C559.193 69.8667 557.16 68.0667 555.827 65.8C554.56 63.4667 553.927 60.9 553.927 58.1C553.927 55.1 554.66 52.4667 556.127 50.2C557.66 47.8667 560.027 46.0333 563.227 44.7C566.427 43.3 570.46 42.6 575.327 42.6H587.527C587.527 40.3333 587.227 38.4667 586.627 37C586.093 35.5333 585.193 34.4333 583.927 33.7C582.66 32.9667 580.927 32.6 578.727 32.6C576.393 32.6 574.427 33.0667 572.827 34C571.227 34.9333 570.227 36.4 569.827 38.4H555.427C555.76 34.8 556.927 31.6667 558.927 29C560.993 26.3333 563.727 24.2333 567.127 22.7C570.527 21.1667 574.427 20.4 578.827 20.4C583.627 20.4 587.793 21.2 591.327 22.8C594.86 24.3333 597.593 26.6 599.527 29.6C601.527 32.6 602.527 36.3333 602.527 40.8V72H590.027L588.227 64.7C587.493 65.9667 586.627 67.1333 585.627 68.2C584.627 69.2 583.46 70.1 582.127 70.9C580.793 71.6333 579.327 72.2 577.727 72.6C576.127 73 574.36 73.2 572.427 73.2ZM576.127 61.8C577.727 61.8 579.127 61.5333 580.327 61C581.527 60.4667 582.56 59.7333 583.427 58.8C584.293 57.8667 584.993 56.8 585.527 55.6C586.127 54.3333 586.56 52.9667 586.827 51.5V51.4H577.127C575.46 51.4 574.06 51.6333 572.927 52.1C571.86 52.5 571.06 53.1 570.527 53.9C569.993 54.7 569.727 55.6333 569.727 56.7C569.727 57.8333 569.993 58.8 570.527 59.6C571.127 60.3333 571.893 60.9 572.827 61.3C573.827 61.6333 574.927 61.8 576.127 61.8ZM632.299 72C628.633 72 625.399 71.4333 622.599 70.3C619.799 69.1 617.633 67.1667 616.099 64.5C614.566 61.8333 613.799 58.2 613.799 53.6V34.1H605.199V21.6H613.799L615.399 7.4H628.799V21.6H641.699V34.1H628.799V53.8C628.799 55.8 629.233 57.2333 630.099 58.1C631.033 58.9 632.599 59.3 634.799 59.3H641.699V72H632.299Z",fill:"currentColor"})}),c1=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:c,attachmentPreviews:h,disabled:l=!1}=t,{getConversation:f}=G(),m=f(),g=Pe.get("discord-widget"),_=F(null),v=(m==null?void 0:m.status)==="closed",x=v||l,b=()=>{},k=P=>{i(o.filter(M=>(P==null?void 0:P.name)!==M.name))},E=P=>{P&&i([...o,P])},I=()=>{var P;(P=_.current)==null||P.upload()},T=()=>{o.length&&I(),r()},R=P=>{P.key==="Enter"&&(P.shiftKey?(P.preventDefault(),n(`${e}
100
- `)):(P.preventDefault(),T()))};return w("div",{className:"relative",children:[!v&&s&&w(r1,{onPickEmoji:a}),!v&&(()=>{if(!(o!=null&&o.length))return null;const P=o.map((M,D)=>{if(!h[M.name])return null;const O=()=>{var $;i(o.filter(ut=>ut.name!==M.name)),($=_.current)==null||$.clear()};if(!M.type.startsWith("image/"))return w(s1,{onDelete:O,fileName:M.name,size:M.size},`attachment-preview-${D}`);const{url:J,width:at,height:Tt}=h[M.name];return w(o1,{onDelete:O,fileName:M.name,width:at,height:Tt,imageUrl:J},`attachment-preview-${D}`)});return w("div",{className:"m-2",children:P})})(),!v&&w("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[w("textarea",{id:"hs-textarea-ex-1",disabled:x,value:e,onChange:P=>n(P.target.value),onKeyDown:R,className:"flex-1 p-3 block text-base md:text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none min-h-[55px] max-h-[200px] overflow-y-auto",placeholder:l?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),w("button",{type:"button",disabled:x,onClick:()=>T(),style:{background:x?"#9CA3AF":"linear-gradient(167deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%)"},"aria-label":"Send message",className:"inline-flex shrink-0 justify-center items-center w-[33px] h-[33px] rounded-lg text-white transform transition-transform duration-150 hover:scale-105 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:transform-none",children:w(n1,{size:16})})]}),w("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[w("div",{className:"flex items-center gap-1",children:!v&&w(tt,{children:[w("div",{className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 transition-colors duration-150",children:w(e1,{ref:_,accept:cd.join(","),maxSize:10*1024*1024,uploadConfig:{url:`${Bt.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${g}`}},onUploadComplete:b,onUploadStart:k,onFileSelect:E})}),w("button",{type:"button",disabled:x,onClick:x?void 0:()=>c(!s),"aria-label":"Open emoji picker",className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150",children:w(Kg,{size:16})})]})}),w("a",{href:"https://deskcord.chat",target:"_blank",rel:"noopener noreferrer","aria-label":"Powered by Deskcord",className:"flex items-center gap-1 text-[10px] text-gray-400 hover:text-gray-600 dark:text-neutral-600 dark:hover:text-neutral-400 transition-colors duration-200 no-underline",children:[w("span",{children:"Powered by"}),w(a1,{className:"h-[10px] w-auto"})]})]})]})},ld=t=>{const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?"Just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`},ud="carousel",dd="controller",l1="navigation",u1="no-scroll",ls="portal",d1="root",hd="toolbar",us="loading",ds="error",hs="complete",h1="placeholder",f1=t=>`active-slide-${t}`,fd="flex_center",p1="no_scroll",pd="no_scroll_padding",m1="slide_wrapper",Ne="prev",De="next",md="swipe",ln="close",gd="onPointerDown",yd="onPointerMove",wd="onPointerUp",vd="onPointerLeave",_d="onPointerCancel",bd="onKeyDown",g1="onKeyUp",xd="onWheel",y1="Escape",w1="ArrowLeft",v1="ArrowRight",_1="button",fs="icon",Cd="contain",kd="cover",b1="Unknown action type",Sd="yarl__";function ue(...t){return[...t].filter(Boolean).join(" ")}function Y(t){return`${Sd}${t}`}function Rt(t){return`--${Sd}${t}`}function Yn(t,e){return`${t}${e?`_${e}`:""}`}function ps(t){return e=>Yn(t,e)}function x1(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function Ed(...t){return()=>{t.forEach(e=>{e()})}}function Le(t,e,n){return()=>{const r=ft(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function Td(){return typeof window<"u"}function C1(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function Ad(t){return t.type===void 0||t.type==="image"}function k1(t,e){return t.imageFit===kd||t.imageFit!==Cd&&e===kd}function jr(t){return typeof t=="string"?Number.parseInt(t,10):t}function Hr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=jr(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function S1(t,e){const n=Hr(e),r=n.percent!==void 0?t.width/100*n.percent:n.pixel;return{width:Math.max(t.width-2*r,0),height:Math.max(t.height-2*r,0)}}function Pd(t,e){return e>0?(t%e+e)%e:0}function Id(t){return t.length>0}function Md(t,e){return t[Pd(e,t.length)]}function ms(t,e){return Id(t)?Md(t,e):void 0}function E1(t){return Ad(t)?t.src:void 0}function T1(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const A1=Number(Ra.split(".")[0])>=19;function P1(t){return{inert:A1?t:t?"":void 0}}const gs={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[ln]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Cd,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function Be(t,e){return{name:t,component:e}}function xt(t,e){return{module:t,children:e}}function Rd(t,e,n){return t.module.name===e?n(t):t.children?[xt(t.module,t.children.flatMap(r=>{var i;return(i=Rd(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function un(t,e,n){return t.flatMap(r=>{var i;return(i=Rd(r,e,n))!==null&&i!==void 0?i:[]})}function I1(t,e=[],n=[]){let r=t;const i=g=>{const _=[...r];for(;_.length>0;){const v=_.pop();if((v==null?void 0:v.module.name)===g)return!0;v!=null&&v.children&&_.push(...v.children)}return!1},o=(g,_)=>{if(g===""){r=[xt(_,r)];return}r=un(r,g,v=>[xt(_,[v])])},s=(g,_)=>{r=un(r,g,v=>[xt(v.module,[xt(_,v.children)])])},a=(g,_,v)=>{r=un(r,g,x=>{var b;return[xt(x.module,[...v?[xt(_)]:[],...(b=x.children)!==null&&b!==void 0?b:[],...v?[]:[xt(_)]])]})},c=(g,_,v)=>{r=un(r,g,x=>[...v?[xt(_)]:[],x,...v?[]:[xt(_)]])},h=g=>{s(dd,g)},l=(g,_)=>{r=un(r,g,v=>[xt(_,v.children)])},f=g=>{r=un(r,g,_=>_.children)},m=g=>{n.push(g)};return e.forEach(g=>{g({contains:i,addParent:o,append:s,addChild:a,addSibling:c,addModule:h,replace:l,remove:f,augment:m})}),{config:r,augmentation:g=>n.reduce((_,v)=>v(_),g)}}const Nd=At(null),ys=Le("useDocument","DocumentContext",Nd);function M1({nodeRef:t,children:e}){const n=_t(()=>{const r=o=>{var s;return((s=o||t.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[t]);return B(Nd.Provider,{value:n},e)}const Dd=At(null),Wr=Le("useEvents","EventsContext",Dd);function R1({children:t}){const[e]=W({});U(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=_t(()=>{const r=(s,a)=>{var c;(c=e[s])===null||c===void 0||c.splice(0,e[s].length,...e[s].filter(h=>h!==a))};return{publish:(...[s,a])=>{var c;(c=e[s])===null||c===void 0||c.forEach(h=>h(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return B(Dd.Provider,{value:n},t)}const Ld=At(null),Gn=Le("useLightboxProps","LightboxPropsContext",Ld);function N1({children:t,...e}){return B(Ld.Provider,{value:e},t)}const Bd=At(null),Kr=Le("useLightboxState","LightboxStateContext",Bd),Od=At(null),D1=Le("useLightboxDispatch","LightboxDispatchContext",Od);function L1(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=Pd(i,n.length),s=ms(n,o),a=r||e.duration?{increment:r,duration:e.duration,easing:e.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:a}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:ms(e.slides,e.index)}:t;default:throw new Error(b1)}}function B1({slides:t,index:e,children:n}){const[r,i]=xn(L1,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ms(t,e)});U(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=_t(()=>({...r,state:r,dispatch:i}),[r,i]);return B(Od.Provider,{value:i},B(Bd.Provider,{value:o},n))}const Fd=At(null),qr=Le("useTimeouts","TimeoutsContext",Fd);function O1({children:t}){const[e]=W([]);U(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=_t(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const c=window.setTimeout(()=>{r(c),s()},a);return e.push(c),c},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return B(Fd.Provider,{value:n},t)}const Vd=fe(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},c){const{styles:h,labels:l}=Gn(),f=x1(l,e);return B("button",{ref:c,type:"button",title:f,"aria-label":f,className:ue(Y(_1),n),onClick:o,style:{...s,...h.button},...a},i?i():B(r,{className:Y(fs),style:h.icon}))});function F1(t,e){const n=r=>B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},e);return n.displayName=t,n}function Xn(t,e){return F1(t,B("g",{fill:"currentColor"},B("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const V1=Xn("Close",B("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),U1=Xn("Previous",B("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),$1=Xn("Next",B("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),z1=Xn("Loading",B(tt,null,Array.from({length:8}).map((t,e,n)=>B("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(e+1),transform:`rotate(${360/n.length*e}, 12, 12)`})))),j1=Xn("Error",B("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Zn=Td()?ae:U;function Ud(){const[t,e]=W(!1);return U(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");e(i==null?void 0:i.matches);const o=s=>e(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),t}function H1(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(jr);s.length===6?(e=s[4],n=s[5]):s.length===16&&(e=s[12],n=s[13],r=s[14])}return{x:e,y:n,z:r}}function $d(t,e){const n=F(),r=F(),i=Ud();return Zn(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:c,duration:h,easing:l,onfinish:f}=e(n.current,t.current.getBoundingClientRect(),H1(t.current))||{};if(c&&h){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(a=(s=t.current).animate)===null||a===void 0?void 0:a.call(s,c,{duration:h,easing:l})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function zd(){const t=F(null),e=F(),[n,r]=W();return{setContainerRef:et(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),c=h=>parseFloat(h)||0;r({width:Math.round(o.clientWidth-c(a.paddingLeft)-c(a.paddingRight)),height:Math.round(o.clientHeight-c(a.paddingTop)-c(a.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(s),e.current.observe(o))},[]),containerRef:t,containerRect:n}}function Yr(){const t=F(),{setTimeout:e,clearTimeout:n}=qr();return et((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function wt(t){const e=F(t);return Zn(()=>{e.current=t}),et((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function jd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ws(t,e){return _t(()=>t==null&&e==null?null:n=>{jd(t,n),jd(e,n)},[t,e])}function W1(t,e=!1){const n=F();Zn(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=et(()=>{n.current=!0},[]),i=et(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function vs(){const[t,e]=W(!1);return Zn(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function K1(){const[t]=W({}),e=et((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=_t(()=>({onPointerDown:i=>e(gd,i),onPointerMove:i=>e(yd,i),onPointerUp:i=>e(wd,i),onPointerLeave:i=>e(vd,i),onPointerCancel:i=>e(_d,i),onKeyDown:i=>e(bd,i),onKeyUp:i=>e(g1,i),onWheel:i=>e(xd,i)}),[e]),r=et((i,o)=>(t[i]||(t[i]=[]),t[i].unshift(o),()=>{const s=t[i];s&&s.splice(0,s.length,...s.filter(a=>a!==o))}),[t]);return{registerSensors:n,subscribeSensors:r}}function Hd(t,e){const n=F(0),r=Yr(),i=wt((...o)=>{n.current=Date.now(),t(o)});return et((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const _s=ps("slide"),bs=ps("slide_image");function q1({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:c,style:h}){var l,f,m,g,_,v,x;const[b,k]=W(us),{publish:E}=Wr(),{setTimeout:I}=qr(),T=F(null);U(()=>{e===0&&E(f1(b))},[e,b,E]);const R=wt(q=>{("decode"in q?q.decode():Promise.resolve()).catch(()=>{}).then(()=>{q.parentNode&&(k(hs),I(()=>{a==null||a(q)},0))})}),N=et(q=>{T.current=q,q!=null&&q.complete&&R(q)},[R]),P=et(q=>{R(q.currentTarget)},[R]),M=wt(()=>{k(ds),c==null||c()}),D=k1(t,i),O=(q,Gt)=>Number.isFinite(q)?q:Gt,J=O(Math.max(...((f=(l=t.srcSet)===null||l===void 0?void 0:l.map(q=>q.width))!==null&&f!==void 0?f:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=T.current)===null||m===void 0?void 0:m.naturalWidth)||0),at=O(Math.max(...((_=(g=t.srcSet)===null||g===void 0?void 0:g.map(q=>q.height))!==null&&_!==void 0?_:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((v=T.current)===null||v===void 0?void 0:v.naturalHeight)||0),Tt=J&&at?{maxWidth:`min(${J}px, 100%)`,maxHeight:`min(${at}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},$=(x=t.srcSet)===null||x===void 0?void 0:x.sort((q,Gt)=>q.width-Gt.width).map(q=>`${q.src} ${q.width}w`).join(", "),ut=()=>r&&!D&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,z=$&&r&&Td()?`${Math.round(Math.min(ut(),r.width))}px`:void 0,{style:nt,className:Ot,...Ht}=o||{};return B(tt,null,B("img",{ref:N,onLoad:P,onError:M,onClick:s,draggable:!1,className:ue(Y(bs()),D&&Y(bs("cover")),b!==hs&&Y(bs("loading")),Ot),style:{...Tt,...h,...nt},...Ht,alt:t.alt,sizes:z,srcSet:$,src:t.src}),b!==hs&&B("div",{className:Y(_s(h1))},b===us&&(n!=null&&n.iconLoading?n.iconLoading():B(z1,{className:ue(Y(fs),Y(_s(us)))})),b===ds&&(n!=null&&n.iconError?n.iconError():B(j1,{className:ue(Y(fs),Y(_s(ds)))}))))}const Y1=fe(function({className:e,children:n,...r},i){const o=F(null);return B(M1,{nodeRef:o},B("div",{ref:ws(i,o),className:ue(Y("root"),e),...r},n))});var Et;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(Et||(Et={}));function G1(t,e,n,r,i){U(()=>Ed(t(gd,e),t(yd,n),t(wd,r),t(vd,r),t(_d,r)),[t,e,n,r,i])}var qt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(qt||(qt={}));const xs=30;function X1(t,e,n,r,i,o,s,a,c,h,l,f,m,g){const _=F(0),v=F([]),x=F(),b=F(0),k=F(qt.NONE),E=et(M=>{x.current===M.pointerId&&(x.current=void 0,k.current=qt.NONE);const D=v.current;D.splice(0,D.length,...D.filter(O=>O.pointerId!==M.pointerId))},[]),I=et(M=>{E(M),M.persist(),v.current.push(M)},[E]),T=wt(M=>{I(M)}),R=(M,D)=>h&&M>D||c&&M<-D,N=wt(M=>{if(v.current.find(D=>D.pointerId===M.pointerId)&&x.current===M.pointerId){const D=Date.now()-b.current,O=_.current;k.current===qt.SWIPE?Math.abs(O)>.3*n||Math.abs(O)>5&&D<r?s(O,D):a(O):k.current===qt.PULL&&(R(O,2*xs)?m(O,D):g(O)),_.current=0,k.current=qt.NONE}E(M)}),P=wt(M=>{const D=v.current.find(O=>O.pointerId===M.pointerId);if(D){const O=x.current===M.pointerId;if(M.buttons===0){O&&_.current!==0?N(M):E(D);return}const J=M.clientX-D.clientX,at=M.clientY-D.clientY;if(x.current===void 0){const Tt=$=>{I(M),x.current=M.pointerId,b.current=Date.now(),k.current=$};Math.abs(J)>Math.abs(at)&&Math.abs(J)>xs&&e(J)?(Tt(qt.SWIPE),i()):Math.abs(at)>Math.abs(J)&&R(at,xs)&&(Tt(qt.PULL),l())}else O&&(k.current===qt.SWIPE?(_.current=J,o(J)):k.current===qt.PULL&&(_.current=at,f(at)))}});G1(t,T,P,N)}function Z1({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=F(null),r=wt(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return et(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function J1(t,e,n,r,i,o,s,a,c){const h=F(0),l=F(0),f=F(),m=F(),g=F(0),_=F(),v=F(0),{setTimeout:x,clearTimeout:b}=qr(),k=et(()=>{f.current&&(b(f.current),f.current=void 0)},[b]),E=et(()=>{m.current&&(b(m.current),m.current=void 0)},[b]),I=wt(()=>{t!==Et.SWIPE&&(h.current=0,v.current=0,k(),E())});U(I,[t,I]);const T=wt(N=>{m.current=void 0,h.current===N&&c(h.current)}),R=wt(N=>{if(N.ctrlKey||Math.abs(N.deltaY)>Math.abs(N.deltaX))return;const P=M=>{g.current=M,b(_.current),_.current=M>0?x(()=>{g.current=0,_.current=void 0},300):void 0};if(t===Et.NONE){if(Math.abs(N.deltaX)<=1.2*Math.abs(g.current)){P(N.deltaX);return}if(!n(-N.deltaX))return;if(l.current+=N.deltaX,k(),Math.abs(l.current)>30)l.current=0,P(0),v.current=Date.now(),o();else{const M=l.current;f.current=x(()=>{f.current=void 0,M===l.current&&(l.current=0)},i)}}else if(t===Et.SWIPE){let M=h.current-N.deltaX;if(M=Math.min(Math.abs(M),r)*Math.sign(M),h.current=M,s(M),E(),Math.abs(M)>.2*r){P(N.deltaX),a(M,Date.now()-v.current);return}m.current=x(()=>T(M),2*i)}else P(N.deltaX)});U(()=>e(xd,R),[e,R])}const Wd=ps("container"),Kd=At(null),Jn=Le("useController","ControllerContext",Kd);function Q1({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:c}=e,{closeOnPullUp:h,closeOnPullDown:l,preventDefaultWheelX:f,preventDefaultWheelY:m}=o,[g,_]=W(),v=Kr(),x=D1(),[b,k]=W(Et.NONE),E=F(0),I=F(0),T=F(1),{registerSensors:R,subscribeSensors:N}=K1(),{subscribe:P,publish:M}=Wr(),D=Yr(),O=Yr(),J=Yr(),{containerRef:at,setContainerRef:Tt,containerRect:$}=zd(),ut=ws(Z1({preventDefaultWheelX:f,preventDefaultWheelY:m}),Tt),z=F(null),nt=ws(z,void 0),{getOwnerDocument:Ot}=ys(),Ht=vs(),q=L=>(Ht?-1:1)*(typeof L=="number"?L:1),Gt=wt(()=>{var L;return(L=at.current)===null||L===void 0?void 0:L.focus()}),ii=wt(()=>e),mt=wt(()=>v),bt=et(L=>M(Ne,L),[M]),Fe=et(L=>M(De,L),[M]),we=et(()=>M(ln),[M]),fn=L=>!(r.finite&&(q(L)>0&&v.currentIndex===0||q(L)<0&&v.currentIndex===v.slides.length-1)),rr=L=>{var Q;E.current=L,(Q=at.current)===null||Q===void 0||Q.style.setProperty(Rt("swipe_offset"),`${Math.round(L)}px`)},pn=L=>{var Q,Ct;I.current=L,T.current=(()=>{const he=l&&L>0?L:h&&L<0?-L:0;return Math.min(Math.max(C1(1-he/60*(1-.5),2),.5),1)})(),(Q=at.current)===null||Q===void 0||Q.style.setProperty(Rt("pull_offset"),`${Math.round(L)}px`),(Ct=at.current)===null||Ct===void 0||Ct.style.setProperty(Rt("pull_opacity"),`${T.current}`)},{prepareAnimation:ve}=$d(z,(L,Q,Ct)=>{if(z.current&&$)return{keyframes:[{transform:`translate(0, ${L.rect.y-Q.y+Ct.y}px)`,opacity:L.opacity},{transform:"translate(0, 0)",opacity:1}],duration:L.duration,easing:i.easing.fade}}),mn=(L,Q)=>{if(h||l){pn(L);let Ct=0;z.current&&(Ct=i.fade*(Q?2:1),ve({rect:z.current.getBoundingClientRect(),opacity:T.current,duration:Ct})),J(()=>{pn(0),k(Et.NONE)},Ct),k(Et.ANIMATION),Q||we()}},{prepareAnimation:oi,isAnimationPlaying:zs}=$d(z,(L,Q,Ct)=>{var It;if(z.current&&$&&(!((It=v.animation)===null||It===void 0)&&It.duration)){const ct=Hr(r.spacing),he=(ct.percent?ct.percent*$.width/100:ct.pixel)||0;return{keyframes:[{transform:`translate(${q(v.globalIndex-L.index)*($.width+he)+L.rect.x-Q.x+Ct.x}px, 0)`},{transform:"translate(0, 0)"}],duration:v.animation.duration,easing:v.animation.easing}}}),_e=wt(L=>{var Q,Ct;const It=L.offset||0,ct=It?i.swipe:(Q=i.navigation)!==null&&Q!==void 0?Q:i.swipe,he=!It&&!zs()?i.easing.navigation:i.easing.swipe;let{direction:gn}=L;const Ft=(Ct=L.count)!==null&&Ct!==void 0?Ct:1;let or=Et.ANIMATION,p=ct*Ft;if(!gn){const d=$==null?void 0:$.width,y=L.duration||0,C=d?ct/d*Math.abs(It):ct;Ft!==0?(y<C?p=p/C*Math.max(y,C/5):d&&(p=ct/d*(d-Math.abs(It))),gn=q(It)>0?Ne:De):p=ct/2}let u=0;gn===Ne?fn(q(1))?u=-Ft:(or=Et.NONE,p=ct):gn===De&&(fn(q(-1))?u=Ft:(or=Et.NONE,p=ct)),p=Math.round(p),O(()=>{rr(0),k(Et.NONE)},p),z.current&&oi({rect:z.current.getBoundingClientRect(),index:v.globalIndex}),k(or),M(md,{type:"swipe",increment:u,duration:p,easing:he})});U(()=>{var L,Q;!((L=v.animation)===null||L===void 0)&&L.increment&&(!((Q=v.animation)===null||Q===void 0)&&Q.duration)&&D(()=>x({type:"swipe",increment:0}),v.animation.duration)},[v.animation,x,D]);const de=[N,fn,($==null?void 0:$.width)||0,i.swipe,()=>k(Et.SWIPE),L=>rr(L),(L,Q)=>_e({offset:L,duration:Q,count:1}),L=>_e({offset:L,count:0})],Ve=[()=>{l&&k(Et.PULL)},L=>pn(L),L=>mn(L),L=>mn(L,!0)];X1(...de,h,l,...Ve),J1(b,...de);const si=wt(()=>{o.focus&&Ot().querySelector(`.${Y(ls)} .${Y(Wd())}`)&&Gt()});U(si,[si]);const ai=wt(()=>{var L;(L=s.view)===null||L===void 0||L.call(s,{index:v.currentIndex})});U(ai,[v.globalIndex,ai]),U(()=>Ed(P(Ne,L=>_e({direction:Ne,...L})),P(De,L=>_e({direction:De,...L})),P(md,L=>x(L))),[P,_e,x]);const ir=_t(()=>({prev:bt,next:Fe,close:we,focus:Gt,slideRect:$?S1($,r.padding):{width:0,height:0},containerRect:$||{width:0,height:0},subscribeSensors:N,containerRef:at,setCarouselRef:nt,toolbarWidth:g,setToolbarWidth:_}),[bt,Fe,we,Gt,N,$,at,nt,g,_,r.padding]);return Cn(o.ref,()=>({prev:bt,next:Fe,close:we,focus:Gt,getLightboxProps:ii,getLightboxState:mt}),[bt,Fe,we,Gt,ii,mt]),B("div",{ref:ut,className:ue(Y(Wd()),Y(fd)),style:{...b===Et.SWIPE?{[Rt("swipe_offset")]:`${Math.round(E.current)}px`}:null,...b===Et.PULL?{[Rt("pull_offset")]:`${Math.round(I.current)}px`,[Rt("pull_opacity")]:`${T.current}`}:null,...o.touchAction!=="none"?{[Rt("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...R},$&&B(Kd.Provider,{value:ir},t,(n=c.controls)===null||n===void 0?void 0:n.call(c)))}const tw=Be(dd,Q1);function Oe(t){return Yn(ud,t)}function qd(t){return Yn("slide",t)}function ew({slide:t,offset:e}){const n=F(null),{currentIndex:r}=Kr(),{slideRect:i,close:o,focus:s}=Jn(),{render:a,carousel:{imageFit:c,imageProps:h},on:{click:l},controller:{closeOnBackdropClick:f},styles:{slide:m}}=Gn(),{getOwnerDocument:g}=ys(),_=e!==0;U(()=>{var b;_&&(!((b=n.current)===null||b===void 0)&&b.contains(g().activeElement))&&s()},[_,s,g]);const v=()=>{var b,k,E,I;let T=(b=a.slide)===null||b===void 0?void 0:b.call(a,{slide:t,offset:e,rect:i});return!T&&Ad(t)&&(T=B(q1,{slide:t,offset:e,render:a,rect:i,imageFit:c,imageProps:h,onClick:_?void 0:()=>l==null?void 0:l({index:r})})),T?B(tt,null,(k=a.slideHeader)===null||k===void 0?void 0:k.call(a,{slide:t}),((E=a.slideContainer)!==null&&E!==void 0?E:({children:R})=>R)({slide:t,children:T}),(I=a.slideFooter)===null||I===void 0?void 0:I.call(a,{slide:t})):null},x=b=>{const k=n.current,E=b.target instanceof HTMLElement?b.target:void 0;f&&E&&k&&(E===k||Array.from(k.children).find(I=>I===E)&&E.classList.contains(Y(m1)))&&o()};return B("div",{ref:n,className:ue(Y(qd()),!_&&Y(qd("current")),Y(fd)),...P1(_),onClick:x,style:m},v())}function nw(){const t=Gn().styles.slide;return B("div",{className:Y("slide"),style:t})}function rw({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=Kr(),{setCarouselRef:i}=Jn(),o=Hr(t.spacing),s=Hr(t.padding),a=T1(t,e,1),c=[];if(Id(e))for(let h=n-a;h<=n+a;h+=1){const l=Md(e,h),f=r-n+h,m=t.finite&&(h<0||h>e.length-1);c.push(m?{key:f}:{key:[`${f}`,E1(l)].filter(Boolean).join("|"),offset:h-n,slide:l})}return B("div",{ref:i,className:ue(Y(Oe()),c.length>0&&Y(Oe("with_slides"))),style:{[`${Rt(Oe("slides_count"))}`]:c.length,[`${Rt(Oe("spacing_px"))}`]:o.pixel||0,[`${Rt(Oe("spacing_percent"))}`]:o.percent||0,[`${Rt(Oe("padding_px"))}`]:s.pixel||0,[`${Rt(Oe("padding_percent"))}`]:s.percent||0}},c.map(({key:h,slide:l,offset:f})=>l?B(ew,{key:h,slide:l,offset:f}):B(nw,{key:h})))}const iw=Be(ud,rw);function Yd(){const{carousel:t}=Gn(),{slides:e,currentIndex:n}=Kr(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function ow(t){var e;const n=vs(),{publish:r}=Wr(),{animation:i}=Gn(),{prevDisabled:o,nextDisabled:s}=Yd(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,c=Hd(()=>r(Ne),a),h=Hd(()=>r(De),a),l=wt(f=>{switch(f.key){case y1:r(ln);break;case w1:(n?s:o)||(n?h:c)();break;case v1:(n?o:s)||(n?c:h)();break}});U(()=>t(bd,l),[t,l])}function Gd({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return B(Vd,{label:t,icon:e,renderIcon:n,className:Y(`navigation_${r}`),disabled:o,onClick:i,style:s,...W1(Jn().focus,o)})}function sw({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Jn(),{prevDisabled:c,nextDisabled:h}=Yd();return ow(a),B(tt,null,t?t():B(Gd,{label:"Previous",action:Ne,icon:U1,renderIcon:n,style:i.navigationPrev,disabled:c,onClick:o}),e?e():B(Gd,{label:"Next",action:De,icon:$1,renderIcon:r,style:i.navigationNext,disabled:h,onClick:s}))}const aw=Be(l1,sw),Xd=Y(p1),cw=Y(pd);function lw(t){return"style"in t}function Zd(t,e,n){const r=window.getComputedStyle(t),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=t.style.getPropertyValue(i);return t.style.setProperty(i,`${(jr(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function uw({noScroll:{disabled:t},children:e}){const n=vs(),{getOwnerDocument:r,getOwnerWindow:i}=ys();return U(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:c}=r(),h=Math.round(s.innerWidth-c.clientWidth);if(h>0){o.push(Zd(a,h,n));const l=a.getElementsByTagName("*");for(let f=0;f<l.length;f+=1){const m=l[f];lw(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(cw)&&o.push(Zd(m,h,n))}}return a.classList.add(Xd),()=>{a.classList.remove(Xd),o.forEach(l=>l())}},[n,t,r,i]),B(tt,null,e)}const dw=Be(u1,uw);function Jd(t){return Yn(ls,t)}function Qd(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function hw({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,c]=W(!1),[h,l]=W(!1),f=F([]),m=F(null),{setTimeout:g}=qr(),{subscribe:_}=Wr(),x=Ud()?0:e.fade;U(()=>(c(!0),()=>{c(!1),l(!1)}),[]);const b=wt(()=>{f.current.forEach(T=>T()),f.current=[]}),k=wt(()=>{var T;l(!1),b(),(T=i.exiting)===null||T===void 0||T.call(i),g(()=>{var R;(R=i.exited)===null||R===void 0||R.call(i),s()},x)});U(()=>_(ln,k),[_,k]);const E=wt(T=>{var R,N,P;T.scrollTop,l(!0),(R=i.entering)===null||R===void 0||R.call(i);const M=(P=(N=T.parentNode)===null||N===void 0?void 0:N.children)!==null&&P!==void 0?P:[];for(let D=0;D<M.length;D+=1){const O=M[D];["TEMPLATE","SCRIPT","STYLE"].indexOf(O.tagName)===-1&&O!==T&&(f.current.push(Qd(O,"inert","")),f.current.push(Qd(O,"aria-hidden","true")))}f.current.push(()=>{var D,O;(O=(D=m.current)===null||D===void 0?void 0:D.focus)===null||O===void 0||O.call(D)}),g(()=>{var D;(D=i.entered)===null||D===void 0||D.call(i)},x)}),I=et(T=>{T?E(T):b()},[E,b]);return a?Ti(B(Y1,{ref:I,className:ue(r,Y(Jd()),Y(pd),h&&Y(Jd("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==gs.animation.fade?{[Rt("fade_animation_duration")]:`${x}ms`}:null,...e.easing.fade!==gs.animation.easing.fade?{[Rt("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:T=>{m.current||(m.current=T.relatedTarget)}},t),o.root||document.body):null}const fw=Be(ls,hw);function pw({children:t}){return B(tt,null,t)}const mw=Be(d1,pw);function gw(t){return Yn(hd,t)}function yw({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Jn(),{setContainerRef:s,containerRect:a}=zd();Zn(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const c=()=>e?e():B(Vd,{key:ln,label:"Close",icon:V1,renderIcon:n,onClick:i});return B("div",{ref:s,style:r.toolbar,className:Y(gw())},t==null?void 0:t.map(h=>h===ln?c():h))}const ww=Be(hd,yw);function th(t,e){var n;return B(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>th(r,e)))}function vw(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function _w({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:c,index:h,...l}){const{animation:f,carousel:m,render:g,toolbar:_,controller:v,noScroll:x,on:b,slides:k,index:E,plugins:I,...T}=gs,{config:R,augmentation:N}=I1([xt(fw,[xt(dw,[xt(tw,[xt(iw),xt(ww),xt(aw)])])])],a||I),P=N({animation:vw(f,e),carousel:{...m,...t},render:{...g,...n},toolbar:{..._,...r},controller:{...v,...i},noScroll:{...x,...o},on:{...b,...s},...T,...l});return P.open?B(N1,{...P},B(B1,{slides:c||k,index:jr(h||E)},B(O1,null,B(R1,null,th(xt(mw,R),P))))):null}const bw=({attachment:t})=>{const e=async n=>{n.preventDefault();try{const r=await fetch(t.url);if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.download=t.name,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(o)}catch{window.open(t.url,"_blank","noopener,noreferrer")}};return w("a",{href:t.url,onClick:e,className:"flex items-center gap-3 max-w-[240px] rounded-lg border border-gray-200 bg-white px-3 py-2 no-underline hover:bg-gray-50 transition-colors cursor-pointer dark:bg-neutral-800 dark:border-neutral-700 dark:hover:bg-neutral-700",children:[w(as,{extension:zr(t.name),className:"w-8 h-9"}),w("div",{className:"min-w-0",children:[w("p",{className:"text-sm font-medium text-gray-800 dark:text-white truncate",children:t.name}),w("p",{className:"text-xs text-gray-500 dark:text-neutral-400",children:cs(t.size)})]})]})},xw=["png","jpg","jpeg","gif","webp"];function eh(t){return t.contentType?t.contentType.startsWith("image/"):xw.includes(zr(t.name))}function nh(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const rh=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=G(),[r,i]=W(!1),o=ft(Bh);function s(){if(o){const l=o.getElementById("deskcord-lightbox-portal");if(l)return l}const h=document.getElementById("deskcord-lightbox-portal");return h||document.body}const a=(e==null?void 0:e.filter(h=>eh(h)&&!nh(h)))??[];function c(){return a.length?w(_w,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(h=>({src:h.proxyURL}))}):null}return e!=null&&e.length?w("div",{children:[e.map((h,l)=>{const{proxyURL:f,width:m,height:g}=h;return eh(h)?nh(h)?w("div",{children:w("img",{src:f,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):w("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:w("img",{src:f,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):w("div",{className:"mt-1",children:w(bw,{attachment:h})},`conv-cus-attachment-${t}-${l}`)}),c()]},`conv-cus-attachment-${t}`):null},ih=({imageUrls:t,messageIndexKey:e})=>t.length?w("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>w("div",{className:"inline-block",children:w("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,Cw=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],kw=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function Sw(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of kw)if(n.endsWith(i))return!0;for(const i of Cw)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const Ew=/https?:\/\/[^\s<>]+/gi;function oh(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(Ew);if(r)for(const i of r)Sw(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const Tw=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const c=/<\w?:\w+:\d+>/g,h=s.split(c),l=s.match(c)??[],f=[];for(let m=0;m<h.length;m++)if(f.push(h[m]),l[m]){const g=a[l[m]];g&&f.push(w("img",{src:g.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return f}const{text:i,imageUrls:o}=oh(e.content??"");return w("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&w("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white text-sm min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(i,e.emojis??{})}),w(ih,{imageUrls:o,messageIndexKey:n}),w("div",{className:"flex flex-1",children:w(rh,{attachments:e.attachments,messageIndexKey:n})}),t&&w("div",{children:w("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",ld(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},Aw=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=oh(t.content??"");return w("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&w("div",{className:"grow",children:w("div",{style:{background:"linear-gradient(167deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%)"},className:"min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:w("p",{className:"text-left text-sm text-white",children:n})})}),w(ih,{imageUrls:r,messageIndexKey:e}),t.attachments&&w("div",{className:"flex flex-1 justify-end",children:w(rh,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},Pw=({message:t,indexKey:e})=>w("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:w("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:w("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),Iw=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=G(),[o,s]=W(r),[a,c]=W(n),[h,l]=W(""),[f,m]=W(!1),g=b=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(b),_=!!n&&!!r,v=b=>{if(b.preventDefault(),!!a.trim()){if(!g(o)){l("Please enter a valid email address");return}f||(m(!0),l(""),t(o),e(a))}};function x(){return w("form",{onSubmit:v,className:"w-full space-y-4",children:[w("div",{className:"mb-4",children:[w("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),w("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),w("div",{children:[w("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),w("div",{className:"relative",children:[w("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:w(qg,{size:18,className:"text-gray-400"})}),w("input",{type:"text",id:"name",value:a,onChange:b=>c(b.target.value),name:"name",className:"py-2.5 px-4 ps-11 block w-full bg-white border border-gray-300 rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--dc-primary)] focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",placeholder:"John Smith",disabled:_,required:!0})]})]}),w("div",{children:[w("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),w("div",{className:"relative",children:[w("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:w(zg,{size:18,className:"text-gray-400"})}),w("input",{type:"email",id:"email",value:o,onChange:b=>{s(b.target.value),h&&l("")},name:"email",className:`py-2.5 px-4 ps-11 block w-full bg-white rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed border ${h?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[var(--dc-primary)]"}`,placeholder:"you@example.com",disabled:_,required:!0})]}),h&&w("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[w("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),h]})]}),w("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?w("button",{type:"submit",className:"w-full py-2.5 px-4 bg-[var(--dc-primary)] hover:bg-[var(--dc-primary-mid)] text-white font-medium text-sm rounded-lg transition-all duration-200 transform hover:shadow-md active:scale-95 focus:outline-none focus:ring-2 focus:ring-[var(--dc-primary)] focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f,children:"Start Chatting"}):null]})}return w(tt,{children:[w("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:w("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:x()})}),n&&r&&w("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:w("div",{className:"grow",children:w("div",{style:{background:"linear-gradient(167deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%)"},className:"min-w-10 inline-block rounded-lg px-4 py-2 shadow-sm flex items-center gap-2",children:[w(Ug,{size:16,className:"text-white flex-shrink-0"}),w("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",w("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function Mw(t,e){const n=F();U(()=>{n.current=t},[t]),U(()=>{function r(){var i;(i=n==null?void 0:n.current)==null||i.call(n)}if(e!==null){const i=setInterval(r,e);return()=>clearInterval(i)}},[e])}const Rw=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=W(!0),[s,a]=W(0);return Mw(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),w("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:w("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:w("div",{children:[w("div",{className:"mb-2 flex justify-between items-center",children:[w("div",{className:"flex items-center gap-x-3",children:[w(as,{extension:zr(n.fileName),className:"size-9",iconColorClassName:r?"text-red-300":void 0}),w("div",{children:[w("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),w("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:cs(n.size)})]})]}),r&&w("div",{className:"inline-flex items-center gap-x-2",children:w("span",{className:"relative",children:[w("svg",{className:"shrink-0 size-4 text-red-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:w("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})}),w("span",{className:"sr-only",children:"Danger"})]})})]}),w("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[w("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:w("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${r?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${s}%`}})}),w("div",{className:"w-6 text-end",children:w("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},Nw=({conversation:t,open:e})=>{const n=F(!1),{isChatOpen:r}=G();U(()=>{r?n.current=!0:n.current=!1},[r]);function i(c,h){const l=`${c.date}-${h}`;let f;if(typeof c.customRenderer<"u")switch(c.customRenderer){case cn.IntroduceYourself:f=w(Iw,{});break;case cn.UploadFile:f=w(Rw,{message:c,indexKey:l});break;default:f=a(c,l)}else c.authorName===qn?f=a(c,l):c.support?f=o(c,l):f=s(c,l);return r&&(c.pending??(c.support&&n.current))?w(Qt.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:f},l):w("li",{children:f},l)}function o(c,h){var g;const l=(g=t==null?void 0:t.messages)==null?void 0:g.filter(_=>_.support),f=l==null?void 0:l[l.length-1],m=c.date===(f==null?void 0:f.date);return w(Tw,{renderTimestamp:m,message:c,indexKey:h})}function s(c,h){return w(Aw,{message:c,indexKey:h})}function a(c,h){return w(Pw,{message:c,indexKey:h})}return w("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((c,h)=>c.date-h.date).map(i),t&&!e&&i(Zy,1)]})},Dw={duration:.9,repeat:1/0,ease:"easeInOut"},Lw=({authorName:t,visible:e})=>w("div",{className:`flex items-center gap-2 px-4 py-1.5 bg-white dark:bg-neutral-900 transition-opacity duration-150 ${e?"opacity-100":"opacity-0 pointer-events-none"}`,role:"status","aria-hidden":!e,"aria-label":e?`${t} is typing`:void 0,children:[w("span",{className:"inline-flex items-center gap-1",children:[0,1,2].map(n=>w(Qt.span,{className:"block w-1.5 h-1.5 rounded-full bg-gray-400 dark:bg-neutral-500",animate:e?{y:[0,-3,0]}:{y:0},transition:e?{...Dw,delay:n*.15}:void 0},n))}),w("span",{className:"text-xs text-gray-500 dark:text-neutral-400",children:[w("span",{className:"font-semibold text-gray-700 dark:text-neutral-200",children:t})," ","is typing..."]})]}),Bw=()=>{var Tt;const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s,typingByThread:a}=G(),c=!!(r&&i),h=F(!1);U(()=>{s&&!h.current&&(h.current=!0),s||(h.current=!1)},[s]);const[l,f]=W(!1),[m,g]=W([]),[_,v]=W({}),x=t(),b=(x==null?void 0:x.status)==="open",[k,E]=W(""),[I,T]=W(!1),R=F(null),N=()=>{T(!0),R.current!==null&&clearTimeout(R.current),R.current=window.setTimeout(()=>{T(!1),R.current=null},800)};U(()=>()=>{R.current!==null&&clearTimeout(R.current)},[]);const P=!!(x&&a[x.threadId]),M=[...(x==null?void 0:x.messages)??[]].filter($=>$.support&&$.authorName).sort(($,ut)=>ut.date-$.date)[0],D=((Tt=x==null?void 0:x.csMember)==null?void 0:Tt.displayName)??(M==null?void 0:M.authorName)??"Support";U(()=>{const $={};m.forEach(ut=>{if(!ut.type.startsWith("image/")){$[ut.name]={url:"",width:0,height:0,size:ut.size},v({...$});return}const z=new FileReader;z.addEventListener("load",function(){const nt=new Image;nt.onload=()=>{$[ut.name]={url:z.result,width:nt.width,height:nt.height,size:ut.size},v({...$})},nt.src=z.result},!1),z.readAsDataURL(ut)})},[m]);const O=$=>{E(ut=>ut+$)},J=async()=>{const $=Date.now(),ut={support:!1,content:k,date:$,authorName:r,pending:!0};if(k.trim()!==""){E(""),e(x?x.threadId:"TEMP",ut);const z=await Xy({content:k});z&&((!x||x.threadId==="TEMP")&&n(z.threadId),o(z.threadId,$,{...ut,pending:!1,date:z.date}))}},at=s&&!h.current;return w(tt,{children:[w("div",{className:`flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse dc-scroll ${I?"dc-scroll--active":""}`,onScroll:N,children:w(Qt.div,{initial:at?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:w(Nw,{conversation:x,open:b})})}),w(Lw,{authorName:D,visible:P}),w("div",{className:(x==null?void 0:x.status)==="closed"?"":"border-t border-t-gray-200 dark:border-neutral-800",children:w(c1,{attachmentPreviews:_,files:m,setFiles:g,inputMessage:k,setInputMessage:E,showEmojiPicker:l,setShowEmojiPicker:f,addEmoji:O,sendMessage:J,disabled:!c})})]})};function Cs(t,e){switch(t){case"online":return e==="text"?"text-teal-600":"bg-teal-400";case"idle":return e==="text"?"text-yellow-600":"bg-yellow-400";case"dnd":return e==="text"?"text-red-600":"bg-red-400";case"offline":case"invisible":return e==="text"?"text-black":"bg-gray-400";default:return e==="text"?"text-black":"bg-gray-400"}}function Ow(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const ee=Object.create(null);ee.open="0",ee.close="1",ee.ping="2",ee.pong="3",ee.message="4",ee.upgrade="5",ee.noop="6";const Gr=Object.create(null);Object.keys(ee).forEach(t=>{Gr[ee[t]]=t});const ks={type:"error",data:"parser error"},sh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ah=typeof ArrayBuffer=="function",ch=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ss=({type:t,data:e},n,r)=>sh&&e instanceof Blob?n?r(e):lh(e,r):ah&&(e instanceof ArrayBuffer||ch(e))?n?r(e):lh(new Blob([e]),r):r(ee[t]+(e||"")),lh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function uh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Es;function Fw(t,e){if(sh&&t.data instanceof Blob)return t.data.arrayBuffer().then(uh).then(e);if(ah&&(t.data instanceof ArrayBuffer||ch(t.data)))return e(uh(t.data));Ss(t,!1,n=>{Es||(Es=new TextEncoder),e(Es.encode(n))})}const dh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<dh.length;t++)Qn[dh.charCodeAt(t)]=t;const Vw=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const h=new ArrayBuffer(e),l=new Uint8Array(h);for(r=0;r<n;r+=4)o=Qn[t.charCodeAt(r)],s=Qn[t.charCodeAt(r+1)],a=Qn[t.charCodeAt(r+2)],c=Qn[t.charCodeAt(r+3)],l[i++]=o<<2|s>>4,l[i++]=(s&15)<<4|a>>2,l[i++]=(a&3)<<6|c&63;return h},Uw=typeof ArrayBuffer=="function",Ts=(t,e)=>{if(typeof t!="string")return{type:"message",data:hh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:$w(t.substring(1),e)}:Gr[n]?t.length>1?{type:Gr[n],data:t.substring(1)}:{type:Gr[n]}:ks},$w=(t,e)=>{if(Uw){const n=Vw(t);return hh(n,e)}else return{base64:!0,data:t}},hh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},fh="",zw=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{Ss(o,!1,a=>{r[s]=a,++i===n&&e(r.join(fh))})})},jw=(t,e)=>{const n=t.split(fh),r=[];for(let i=0;i<n.length;i++){const o=Ts(n[i],e);if(r.push(o),o.type==="error")break}return r};function Hw(){return new TransformStream({transform(t,e){Fw(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let As;function Xr(t){return t.reduce((e,n)=>e+n.length,0)}function Zr(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function Ww(t,e){As||(As=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Xr(n)<1)break;const c=Zr(n,1);o=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Xr(n)<2)break;const c=Zr(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Xr(n)<8)break;const c=Zr(n,8),h=new DataView(c.buffer,c.byteOffset,c.length),l=h.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(ks);break}i=l*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Xr(n)<i)break;const c=Zr(n,i);a.enqueue(Ts(o?c:As.decode(c),e)),r=0}if(i===0||i>t){a.enqueue(ks);break}}}})}const ph=4;function vt(t){if(t)return Kw(t)}function Kw(t){for(var e in vt.prototype)t[e]=vt.prototype[e];return t}vt.prototype.on=vt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},vt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this},vt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},vt.prototype.emitReserved=vt.prototype.emit,vt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},vt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const zt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function mh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const qw=zt.setTimeout,Yw=zt.clearTimeout;function Jr(t,e){e.useNativeTimers?(t.setTimeoutFn=qw.bind(zt),t.clearTimeoutFn=Yw.bind(zt)):(t.setTimeoutFn=zt.setTimeout.bind(zt),t.clearTimeoutFn=zt.clearTimeout.bind(zt))}const Gw=1.33;function Xw(t){return typeof t=="string"?Zw(t):Math.ceil((t.byteLength||t.size)*Gw)}function Zw(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function Jw(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Qw(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class tv extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Ps extends vt{constructor(e){super(),this.writable=!1,Jr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new tv(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=Ts(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=Jw(e);return n.length?"?"+n:""}}const gh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Is=64,ev={};let yh=0,Qr=0,wh;function vh(t){let e="";do e=gh[t%Is]+e,t=Math.floor(t/Is);while(t>0);return e}function _h(){const t=vh(+new Date);return t!==wh?(yh=0,wh=t):t+"."+vh(yh++)}for(;Qr<Is;Qr++)ev[gh[Qr]]=Qr;let bh=!1;try{bh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nv=bh;function xh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||nv))return new XMLHttpRequest}catch{}if(!e)try{return new zt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function N_(){}function rv(){}const iv=function(){return new xh({xdomain:!1}).responseType!=null}();class ov extends Ps{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=iv&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};jw(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,zw(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=_h()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ne(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class ne extends vt{constructor(e,n){super(),Jr(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=mh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new xh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=ne.requestsCount++,ne.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=rv,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ne.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(ne.requestsCount=0,ne.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ch);else if(typeof addEventListener=="function"){const t="onpagehide"in zt?"pagehide":"unload";addEventListener(t,Ch,!1)}}function Ch(){for(let t in ne.requests)ne.requests.hasOwnProperty(t)&&ne.requests[t].abort()}var sv={},ti={};ti.byteLength=lv,ti.toByteArray=dv,ti.fromByteArray=pv;for(var re=[],jt=[],av=typeof Uint8Array<"u"?Uint8Array:Array,Ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dn=0,cv=Ms.length;dn<cv;++dn)re[dn]=Ms[dn],jt[Ms.charCodeAt(dn)]=dn;jt[45]=62,jt[95]=63;function kh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function lv(t){var e=kh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function uv(t,e,n){return(e+n)*3/4-n}function dv(t){var e,n=kh(t),r=n[0],i=n[1],o=new av(uv(t,r,i)),s=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)e=jt[t.charCodeAt(c)]<<18|jt[t.charCodeAt(c+1)]<<12|jt[t.charCodeAt(c+2)]<<6|jt[t.charCodeAt(c+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=jt[t.charCodeAt(c)]<<2|jt[t.charCodeAt(c+1)]>>4,o[s++]=e&255),i===1&&(e=jt[t.charCodeAt(c)]<<10|jt[t.charCodeAt(c+1)]<<4|jt[t.charCodeAt(c+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function hv(t){return re[t>>18&63]+re[t>>12&63]+re[t>>6&63]+re[t&63]}function fv(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(hv(r));return i.join("")}function pv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(fv(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(re[e>>2]+re[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(re[e>>10]+re[e>>4&63]+re[e<<2&63]+"=")),i.join("")}var Rs={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Rs.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,c=(1<<a)-1,h=c>>1,l=-7,f=n?i-1:0,m=n?-1:1,g=t[e+f];for(f+=m,o=g&(1<<-l)-1,g>>=-l,l+=a;l>0;o=o*256+t[e+f],f+=m,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=s*256+t[e+f],f+=m,l-=8);if(o===0)o=1-h;else{if(o===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-h}return(g?-1:1)*s*Math.pow(2,o-r)},Rs.write=function(t,e,n,r,i,o){var s,a,c,h=o*8-i-1,l=(1<<h)-1,f=l>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,_=r?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?e+=m/c:e+=m*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+g]=a&255,g+=_,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[n+g]=s&255,g+=_,s/=256,h-=8);t[n+g-_]|=v*128};/*!
99
+ `);const k=b.state[a];if(k==null)return;JSON.stringify(i.getState())!==JSON.stringify(k)&&g(k);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(b)});case"DISPATCH":switch(v.payload.type){case"RESET":return g(_),a===void 0?l==null?void 0:l.init(i.getState()):l==null?void 0:l.init(Fr(c.name));case"COMMIT":if(a===void 0){l==null||l.init(i.getState());return}return l==null?void 0:l.init(Fr(c.name));case"ROLLBACK":return ss(v.state,b=>{if(a===void 0){g(b),l==null||l.init(i.getState());return}g(b[a]),l==null||l.init(Fr(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ss(v.state,b=>{if(a===void 0){g(b);return}JSON.stringify(i.getState())!==JSON.stringify(b[a])&&g(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=v.payload,k=(x=b.computedStates.slice(-1)[0])==null?void 0:x.state;if(!k)return;g(a===void 0?k:k[a]),l==null||l.send(null,b);return}case"PAUSE_RECORDING":return m=!m}return}}),_},ss=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)};function Fy(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=c=>c===null?null:JSON.parse(c,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Wn=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Wn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Wn(r)(n)}}}},Vy=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,b)=>({...b,...x}),...e},s=!1;const a=new Set,c=new Set;let h;try{h=o.getStorage()}catch{}if(!h)return t((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...x)},r,i);const l=Wn(o.serialize),f=()=>{const x=o.partialize({...r()});let b;const k=l({state:x,version:o.version}).then(S=>h.setItem(o.name,S)).catch(S=>{b=S});if(b)throw b;return k},m=i.setState;i.setState=(x,b)=>{m(x,b),f()};const g=t((...x)=>{n(...x),f()},r,i);let _;const v=()=>{var x;if(!h)return;s=!1,a.forEach(k=>k(r()));const b=((x=o.onRehydrateStorage)==null?void 0:x.call(o,r()))||void 0;return Wn(h.getItem.bind(h))(o.name).then(k=>{if(k)return o.deserialize(k)}).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==o.version){if(o.migrate)return o.migrate(k.state,k.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return k.state}).then(k=>{var S;return _=o.merge(k,(S=r())!=null?S:g),n(_,!0),f()}).then(()=>{b==null||b(_,void 0),s=!0,c.forEach(k=>k(_))}).catch(k=>{b==null||b(void 0,k)})};return i.persist={setOptions:x=>{o={...o,...x},x.getStorage&&(h=x.getStorage())},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(c.add(x),()=>{c.delete(x)})},v(),_||g},Uy=(t,e)=>(n,r,i)=>{let o={storage:Fy(()=>localStorage),partialize:v=>v,version:0,merge:(v,x)=>({...x,...v}),...e},s=!1;const a=new Set,c=new Set;let h=o.storage;if(!h)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,i);const l=()=>{const v=o.partialize({...r()});return h.setItem(o.name,{state:v,version:o.version})},f=i.setState;i.setState=(v,x)=>{f(v,x),l()};const m=t((...v)=>{n(...v),l()},r,i);i.getInitialState=()=>m;let g;const _=()=>{var v,x;if(!h)return;s=!1,a.forEach(k=>{var S;return k((S=r())!=null?S:m)});const b=((x=o.onRehydrateStorage)==null?void 0:x.call(o,(v=r())!=null?v:m))||void 0;return Wn(h.getItem.bind(h))(o.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==o.version){if(o.migrate)return[!0,o.migrate(k.state,k.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,k.state];return[!1,void 0]}).then(k=>{var S;const[M,T]=k;if(g=o.merge(T,(S=r())!=null?S:m),n(g,!0),M)return l()}).then(()=>{b==null||b(g,void 0),g=r(),s=!0,c.forEach(k=>k(g))}).catch(k=>{b==null||b(void 0,k)})};return i.persist={setOptions:v=>{o={...o,...v},v.storage&&(h=v.storage)},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},o.skipHydration||_(),g||m},$y=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Or?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Vy(t,e)):Uy(t,e);/*! js-cookie v3.0.5 | MIT */function Vr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var zy={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function as(t,e){function n(i,o,s){if(!(typeof document>"u")){s=Vr({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),h=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(s[l]=t.read(h,l),i===l)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Vr({},o,{expires:-1}))},withAttributes:function(i){return as(this.converter,Vr({},this.attributes,i))},withConverter:function(i){return as(Vr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Re=as(zy,{path:"/"});function Ur(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function id(t,e){const n=new Map;return t.forEach(r=>{const i=Ur(r);n.set(i,r)}),e.forEach(r=>{const i=Ur(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function jy(t,e){const n=Ur(e);return t.some(r=>Ur(r)===n)}const od=460,Hy=750,Wy="https://api.deskcord.chat";function Ky(){var n,r,i,o;const t=(r=(n=window.deskcord)==null?void 0:n.settings)==null?void 0:r.app_id,e=((o=(i=window.deskcord)==null?void 0:i.settings)==null?void 0:o.domain)??Wy;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const Bt=Ky();function yt(...t){}async function qy(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(yt(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function Yy(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${Bt.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(yt(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const sd="deskcord_last_read",ad="deskcord_unread_count",Gy=()=>{try{const t=localStorage.getItem(sd);if(!t)return null;const e=parseInt(t,10);return isNaN(e)?null:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading last read timestamp"),null}},cd=t=>{try{localStorage.setItem(sd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},$r=()=>{try{const t=localStorage.getItem(ad);if(!t)return 0;const e=parseInt(t,10);return isNaN(e)?0:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading unread count"),0}},Kn=t=>{try{localStorage.setItem(ad,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},Y=Ey(Oy($y((t,e)=>({_REHYDRATED_:!1,token:"",isNetworkInitialized:!1,isChatOpen:!1,isChatVisible:!1,isConversationOpen:!0,conversations:[],email:"",username:"",openConversationId:null,guildSettings:{iconURL:"",header_title:"",header_subtitle:"",lastUpdate:null},fullScreen:!1,isLoading:!1,networkError:null,currentConversationLastFetchedAt:null,pastConversationsLastFetchedAt:null,unreadCount:0,lastReadMessageDate:null,typingByThread:{},setThreadTyping:(n,r)=>t(i=>({typingByThread:{...i.typingByThread,[n]:r}})),setRehydrated:n=>t(()=>({_REHYDRATED_:n})),setFullScreen:n=>t(()=>({fullScreen:n})),setToken:n=>t(()=>({token:n})),toggleChatOpen:()=>t(n=>({isChatOpen:!n.isChatOpen})),setNetworkInitialized:n=>t(()=>({isNetworkInitialized:n})),setChatVisible:n=>t(()=>({isChatVisible:n})),setChatOpen:n=>t(()=>({isChatOpen:n})),setOpenConversationId:n=>t(()=>({openConversationId:n})),setConversations:n=>t(()=>({conversations:n})),setGuildSettings:n=>t(r=>({guildSettings:{...r.guildSettings,...n}})),setConversationOpen:(n,r)=>t(i=>({conversations:i.conversations.map(o=>o.threadId===n?{...o,status:r?"open":"closed"}:o)})),setConversationCSMember:(n,r)=>t(an(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(an(i=>{const o=i.conversations.find(s=>s.threadId===n);o?o.messages.push(r):(i.conversations.push({threadId:n,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[r]}),i.openConversationId=n)})),updateMessage:(n,r,i)=>t(an(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(c=>c.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(an(i=>{const o=i.conversations.findIndex(s=>s.threadId===n);o!==-1&&(i.conversations[o].messages=i.conversations[o].messages.filter(s=>s.date!==r))})),tempConversationToThread:n=>t(r=>({...r,openConversationId:n,conversations:r.conversations.map(i=>i.threadId==="TEMP"?{...i,threadId:n}:i)})),setEmail:n=>t(()=>({email:n})),setUsername:n=>t(()=>({username:n})),getConversation:()=>{const{conversations:n,openConversationId:r}=e();return r?n.find(i=>i.threadId===r)??null:null},setLoading:n=>t(()=>({isLoading:n})),setNetworkError:n=>t(()=>({networkError:n})),setCurrentConversationLastFetchedAt:n=>t(()=>({currentConversationLastFetchedAt:n})),setPastConversationsLastFetchedAt:n=>t(()=>({pastConversationsLastFetchedAt:n})),smartMergeCurrentConversation:n=>t(an(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=id(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(an(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=id(s.messages,i.messages);r.conversations[o]={...i,messages:a}}else r.conversations.push(i)}),r.pastConversationsLastFetchedAt=Date.now()})),incrementUnreadCount:()=>t(n=>{const r=n.unreadCount+1;return Kn(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return Kn(0),cd(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(Kn(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Re.get("discord-widget");if(!n){const r=$r();t(()=>({unreadCount:r}));return}try{const r=await qy(n);if(r!==null)yt(`Synced unread count from server: ${r}`),Kn(r),t(()=>({unreadCount:r}));else{yt("Server unavailable, using cached unread count");const i=$r();t(()=>({unreadCount:i}))}}catch{const i=$r();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();Kn(0),cd(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Re.get("discord-widget");if(r)try{const i=await Yy(r,n);yt(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=$r(),r=Gy();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:Xy(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function Xy(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}const Zy="bottom-right";function Jy(t){return t==="bottom-left"||t==="bottom-right"}function cs(t){return Jy(t)?t:Zy}function zr(t,e){return t==="bottom-left"?{left:e}:{right:e}}const Qy=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=W(!1),{guildSettings:o}=Y(),s=cs(o==null?void 0:o.widget_position);U(()=>{if(n>0&&!e){i(!0);const c=setTimeout(()=>i(!1),600),h=setInterval(()=>{i(!0),setTimeout(()=>i(!1),600)},1e4);return()=>{clearTimeout(c),clearInterval(h)}}else i(!1)},[n,e]);const a=n>0&&!e;return w("div",{className:"fixed",style:{zIndex:9998,bottom:30,...zr(s,30)},children:[r&&a&&w(Qt.div,{className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(135deg, var(--dc-primary) 0%, var(--dc-primary-mid) 80%, var(--dc-primary-dark) 100%)"},initial:{scale:1,opacity:.6},animate:{scale:1.5,opacity:0},transition:{duration:.6,ease:"easeOut"}}),w(Qt.button,{onClick:t,className:"relative w-14 h-14 rounded-full shadow-lg flex items-center justify-center outline-none",style:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.25)",background:"linear-gradient(135deg, var(--dc-primary) 0%, var(--dc-primary-mid) 80%, var(--dc-primary-dark) 100%)"},"aria-label":e?"Close chat":"Open chat",animate:{scale:[1,.9,1.05,1]},transition:{duration:.25,ease:"easeOut"},children:[w(bo,{mode:"wait",initial:!1,children:w(Qt.div,{initial:{rotate:-90,opacity:0,scale:.9},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:90,opacity:0,scale:.9},transition:{duration:.18,ease:"easeInOut"},className:"flex items-center justify-center",whileHover:{scale:1.1},whileTap:{scale:.95},children:e?w(Xg,{size:24,color:"#FFFFFF"}):w(Wg,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")}),w(bo,{children:a&&w(Qt.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute flex items-center justify-center",style:{top:-4,right:-4,minWidth:22,height:22,borderRadius:11,backgroundColor:"var(--dc-primary)",border:"2px solid #FFFFFF",padding:"0 6px"},children:w("span",{style:{color:"#FFFFFF",fontSize:12,fontWeight:600,lineHeight:1},children:n>99?"99+":n})})})]})]})};async function t1({content:t}){const e=Y.getState().username,n=Re.get("discord-widget"),r=JSON.stringify({name:e,content:t}),i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization",`Bearer ${n}`);const o={method:"POST",headers:i,body:r};return await(await fetch(`${Bt.domain}/conversations/sendMessage`,o)).json()}var cn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(cn||{});const qn="System",e1={content:"This conversation has been closed by the support.",support:!0,authorName:qn,date:Date.now()},n1={content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:cn.IntroduceYourself};function ld(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:qn,date:Date.now(),ephemeral:!0}}function r1(t){return{content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:cn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function i1(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const ud=["image/png","image/jpeg","image/gif","image/webp","application/pdf"],o1=fe(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const c=F(null),h=F(null),{addMessage:l,getConversation:f,removeMessage:m,updateMessage:g}=Y(),_=f();Cn(a,()=>({upload:async()=>{if(h.current)try{const M=new FormData;M.append("file",h.current),o==null||o(h.current),x(h.current);const T=await fetch(n.url,{method:n.method,headers:n.headers,body:M}),R=await T.json();i==null||i(T),b(h.current),v(R)}catch(M){s==null||s(M),k(h.current)}},clear:()=>{h.current=null,c.current&&(c.current.value=""),r==null||r(null)}}));function v(M){_&&l(_.threadId,i1(M.attachments))}function x(M){_&&l(_.threadId,r1({fileName:M.name,status:"uploading",size:M.size}))}function b(M){var R;if(!_)return;const T=(R=f())==null?void 0:R.messages.find(N=>{var P,I;return((I=(P=N.customRendererProps)==null?void 0:P.file)==null?void 0:I.fileName)===M.name});T&&m(_.threadId,T.date)}function k(M){var R,N;if(!_)return;const T=(R=f())==null?void 0:R.messages.find(P=>{var I,D;return((D=(I=P.customRendererProps)==null?void 0:I.file)==null?void 0:D.fileName)===M.name});(N=T==null?void 0:T.customRendererProps)!=null&&N.file&&g(_.threadId,T.date,{...T,customRendererProps:{...T.customRendererProps,file:{...T.customRendererProps.file,status:"error"}}})}return w(tt,{children:[w("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var M;return(M=c.current)==null?void 0:M.click()},children:w(Kg,{size:16})}),w("input",{type:"file",accept:t,ref:c,style:{display:"none"},onChange:M=>{var R;const T=(R=M.target.files)==null?void 0:R[0];T&&T.size<=e&&ud.includes(T.type)?(h.current=T,r==null||r(T)):(h.current=null,r==null||r(null))}})]})}),s1=({size:t})=>w("svg",{className:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:t||16,height:t||16,fill:"currentColor",viewBox:"0 0 16 16",children:w("path",{d:"M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"})}),a1=({onPickEmoji:t})=>w("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:w("div",{className:"grid grid-cols-8 gap-2",children:c1.map((e,n)=>w("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),c1=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],l1=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>w("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[w("div",{className:"flex justify-center absolute inset-0",children:w("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),w("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:w(Ou,{size:20})}),w("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-800 bg-opacity-80 text-white text-sm px-2 py-1 truncate",children:e})]}),ls=({extension:t,className:e="",iconColorClassName:n="text-gray-300 dark:text-neutral-600"})=>{const r=t==null?void 0:t.slice(0,4).toUpperCase();return w("span",{className:`relative inline-flex shrink-0 items-center justify-center ${e}`,children:[w(jg,{className:`w-full h-full ${n}`,strokeWidth:1.5}),r&&w("span",{className:"absolute left-1/2 bottom-[22%] -translate-x-1/2 rounded-[3px] bg-blue-600 px-[3px] leading-[11px] text-[7px] font-bold tracking-tight text-white",children:r})]})};function jr(t){const e=t.lastIndexOf(".");return e<=0||e===t.length-1?"":t.slice(e+1).toLowerCase()}function us(t,e=!1,n=1){const r=e?1e3:1024;if(Math.abs(t)<r)return t+" B";const i=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let o=-1;const s=10**n;do t/=r,++o;while(Math.round(Math.abs(t)*s)/s>=r&&o<i.length-1);return t.toFixed(n)+" "+i[o]}const u1=({fileName:t,size:e,onDelete:n})=>w("div",{className:"relative flex items-center gap-3 w-56 rounded-lg border border-gray-200 bg-gray-50 pl-3 pr-8 py-2",children:[w(ls,{extension:jr(t),className:"w-8 h-9"}),w("div",{className:"min-w-0",children:[w("p",{className:"text-sm font-medium text-gray-800 truncate",children:t}),w("p",{className:"text-xs text-gray-500",children:us(e)})]}),w("button",{onClick:n,"aria-label":"Remove attachment",className:"absolute top-1 right-1 p-1 rounded-lg text-gray-400 hover:text-red-500 transition",children:w(Ou,{size:16})})]}),d1=({className:t})=>w("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M23.9 73.2C19.4333 73.2 15.3667 72.0667 11.7 69.8C8.1 67.5333 5.23333 64.4333 3.1 60.5C1.03333 56.5 7.45058e-08 51.9667 7.45058e-08 46.9C7.45058e-08 41.7667 1.06667 37.2333 3.2 33.3C5.33333 29.3 8.23333 26.1667 11.9 23.9C15.6333 21.5667 19.7667 20.4 24.3 20.4C27.7667 20.4 30.8 21.0333 33.4 22.3C36 23.5 38.1333 25.2667 39.8 27.6V-2.86102e-06H54.8V72H41.5L39.8 65.5C38.8 66.9 37.5667 68.2 36.1 69.4C34.7 70.5333 33 71.4333 31 72.1C29 72.8333 26.6333 73.2 23.9 73.2ZM27.8 60.1C30.2667 60.1 32.4333 59.5333 34.3 58.4C36.2333 57.2667 37.7 55.7 38.7 53.7C39.7667 51.7 40.3 49.4 40.3 46.8C40.3 44.2 39.7667 41.9 38.7 39.9C37.7 37.9 36.2333 36.3333 34.3 35.2C32.4333 34.0667 30.2667 33.5 27.8 33.5C25.4 33.5 23.2333 34.0667 21.3 35.2C19.4333 36.3333 17.9667 37.9 16.9 39.9C15.8333 41.9 15.3 44.1667 15.3 46.7C15.3 49.3 15.8333 51.6333 16.9 53.7C17.9667 55.7 19.4333 57.2667 21.3 58.4C23.2333 59.5333 25.4 60.1 27.8 60.1ZM86.6086 73.2C81.4086 73.2 76.8419 72.1333 72.9086 70C68.9753 67.8 65.8753 64.7667 63.6086 60.9C61.4086 56.9667 60.3086 52.4667 60.3086 47.4C60.3086 42.2 61.4086 37.5667 63.6086 33.5C65.8086 29.4333 68.8753 26.2333 72.8086 23.9C76.7419 21.5667 81.3086 20.4 86.5086 20.4C91.5753 20.4 96.0086 21.5 99.8086 23.7C103.609 25.9 106.575 28.9 108.709 32.7C110.909 36.4333 112.009 40.7667 112.009 45.7C112.009 46.3667 111.975 47.1333 111.909 48C111.909 48.8 111.842 49.6333 111.709 50.5H71.0086V41.8H96.7086C96.5753 39 95.5419 36.7667 93.6086 35.1C91.7419 33.3667 89.4086 32.5 86.6086 32.5C84.4753 32.5 82.5419 33 80.8086 34C79.0753 35 77.6753 36.5 76.6086 38.5C75.6086 40.5 75.1086 43.0333 75.1086 46.1V49.1C75.1086 51.4333 75.5419 53.5 76.4086 55.3C77.3419 57.1 78.6419 58.5 80.3086 59.5C82.0419 60.5 84.0753 61 86.4086 61C88.6086 61 90.4086 60.5667 91.8086 59.7C93.2753 58.7667 94.4086 57.6 95.2086 56.2H110.509C109.575 59.4 107.975 62.3 105.709 64.9C103.442 67.4333 100.675 69.4667 97.4086 71C94.1419 72.4667 90.5419 73.2 86.6086 73.2ZM138.039 73.2C133.306 73.2 129.206 72.4667 125.739 71C122.339 69.4667 119.639 67.4 117.639 64.8C115.706 62.2 114.606 59.2667 114.339 56H129.239C129.506 57.1333 129.972 58.1667 130.639 59.1C131.372 59.9667 132.339 60.6667 133.539 61.2C134.806 61.6667 136.206 61.9 137.739 61.9C139.406 61.9 140.739 61.7 141.739 61.3C142.806 60.8333 143.606 60.2333 144.139 59.5C144.672 58.7667 144.939 58 144.939 57.2C144.939 55.9333 144.539 54.9667 143.739 54.3C143.006 53.6333 141.906 53.1 140.439 52.7C138.972 52.2333 137.206 51.8 135.139 51.4C132.739 50.8667 130.339 50.2667 127.939 49.6C125.606 48.8667 123.506 47.9667 121.639 46.9C119.839 45.8333 118.372 44.4667 117.239 42.8C116.172 41.0667 115.639 38.9667 115.639 36.5C115.639 33.5 116.472 30.8 118.139 28.4C119.806 25.9333 122.206 24 125.339 22.6C128.472 21.1333 132.272 20.4 136.739 20.4C143.072 20.4 148.039 21.8 151.639 24.6C155.239 27.4 157.372 31.1667 158.039 35.9H144.039C143.639 34.5667 142.806 33.5667 141.539 32.9C140.272 32.1667 138.672 31.8 136.739 31.8C134.539 31.8 132.872 32.1667 131.739 32.9C130.606 33.6333 130.039 34.6 130.039 35.8C130.039 36.6 130.406 37.3333 131.139 38C131.939 38.6 133.072 39.1333 134.539 39.6C136.006 40.0667 137.806 40.5333 139.939 41C144.006 41.8667 147.506 42.8 150.439 43.8C153.439 44.8 155.772 46.2667 157.439 48.2C159.106 50.0667 159.906 52.8 159.839 56.4C159.906 59.6667 159.039 62.5667 157.239 65.1C155.506 67.6333 153.006 69.6333 149.739 71.1C146.472 72.5 142.572 73.2 138.039 73.2ZM198.643 72L177.843 44.4L196.343 21.6H214.043L189.143 50.8V38.8L217.243 72H198.643ZM165.043 72V-2.86102e-06H180.043V72H165.043ZM239.509 73.2C234.309 73.2 229.709 72.0667 225.709 69.8C221.776 67.5333 218.676 64.4333 216.409 60.5C214.209 56.5667 213.109 52.0667 213.109 47C213.109 41.8 214.209 37.2333 216.409 33.3C218.676 29.3 221.776 26.1667 225.709 23.9C229.709 21.5667 234.309 20.4 239.509 20.4C246.109 20.4 251.643 22.1333 256.109 25.6C260.643 29.0667 263.509 33.9 264.709 40.1H248.809C248.209 37.9667 247.076 36.3 245.409 35.1C243.743 33.9 241.743 33.3 239.409 33.3C237.209 33.3 235.276 33.8667 233.609 35C232.009 36.0667 230.743 37.6333 229.809 39.7C228.876 41.7 228.409 44.0667 228.409 46.8C228.409 48.8667 228.676 50.7333 229.209 52.4C229.743 54.0667 230.476 55.5 231.409 56.7C232.409 57.9 233.576 58.8333 234.909 59.5C236.243 60.1 237.743 60.4 239.409 60.4C241.009 60.4 242.409 60.1333 243.609 59.6C244.876 59.0667 245.943 58.3 246.809 57.3C247.743 56.3 248.409 55.0667 248.809 53.6H264.709C263.509 59.6 260.643 64.3667 256.109 67.9C251.576 71.4333 246.043 73.2 239.509 73.2ZM294.528 73.2C289.661 73.2 285.295 72.0667 281.428 69.8C277.561 67.5333 274.495 64.4333 272.228 60.5C269.961 56.5 268.828 51.9667 268.828 46.9C268.828 41.7 269.961 37.1333 272.228 33.2C274.495 29.2 277.561 26.0667 281.428 23.8C285.361 21.5333 289.728 20.4 294.528 20.4C299.461 20.4 303.861 21.5333 307.728 23.8C311.595 26.0667 314.661 29.2 316.928 33.2C319.195 37.1333 320.328 41.6667 320.328 46.8C320.328 51.9333 319.195 56.5 316.928 60.5C314.661 64.4333 311.595 67.5333 307.728 69.8C303.861 72.0667 299.461 73.2 294.528 73.2ZM294.528 60.2C296.528 60.2 298.295 59.7 299.828 58.7C301.428 57.7 302.695 56.2 303.628 54.2C304.561 52.2 305.028 49.7333 305.028 46.8C305.028 43.8667 304.561 41.4 303.628 39.4C302.695 37.4 301.461 35.9 299.928 34.9C298.395 33.9 296.628 33.4 294.628 33.4C292.628 33.4 290.828 33.9 289.228 34.9C287.695 35.9 286.461 37.4 285.528 39.4C284.595 41.4 284.128 43.8667 284.128 46.8C284.128 49.7333 284.595 52.2 285.528 54.2C286.461 56.2 287.695 57.7 289.228 58.7C290.828 59.7 292.595 60.2 294.528 60.2ZM325.852 72V21.6H339.152L340.552 30.8C341.885 28.6667 343.452 26.8333 345.252 25.3C347.052 23.7667 349.118 22.5667 351.452 21.7C353.852 20.8333 356.418 20.4 359.152 20.4V36.3H354.152C352.152 36.3 350.318 36.5333 348.652 37C347.052 37.4 345.652 38.1 344.452 39.1C343.318 40.1 342.418 41.4667 341.752 43.2C341.152 44.8667 340.852 46.9667 340.852 49.5V72H325.852ZM383.853 73.2C379.386 73.2 375.32 72.0667 371.653 69.8C368.053 67.5333 365.186 64.4333 363.053 60.5C360.986 56.5 359.953 51.9667 359.953 46.9C359.953 41.7667 361.02 37.2333 363.153 33.3C365.286 29.3 368.186 26.1667 371.853 23.9C375.586 21.5667 379.72 20.4 384.253 20.4C387.72 20.4 390.753 21.0333 393.353 22.3C395.953 23.5 398.086 25.2667 399.753 27.6V-2.86102e-06H414.753V72H401.453L399.753 65.5C398.753 66.9 397.52 68.2 396.053 69.4C394.653 70.5333 392.953 71.4333 390.953 72.1C388.953 72.8333 386.586 73.2 383.853 73.2ZM387.753 60.1C390.22 60.1 392.386 59.5333 394.253 58.4C396.186 57.2667 397.653 55.7 398.653 53.7C399.72 51.7 400.253 49.4 400.253 46.8C400.253 44.2 399.72 41.9 398.653 39.9C397.653 37.9 396.186 36.3333 394.253 35.2C392.386 34.0667 390.22 33.5 387.753 33.5C385.353 33.5 383.186 34.0667 381.253 35.2C379.386 36.3333 377.92 37.9 376.853 39.9C375.786 41.9 375.253 44.1667 375.253 46.7C375.253 49.3 375.786 51.6333 376.853 53.7C377.92 55.7 379.386 57.2667 381.253 58.4C383.186 59.5333 385.353 60.1 387.753 60.1ZM428.762 72.5C426.028 72.5 423.795 71.7 422.062 70.1C420.395 68.4333 419.562 66.4333 419.562 64.1C419.562 61.7 420.395 59.7 422.062 58.1C423.795 56.4333 426.028 55.6 428.762 55.6C431.428 55.6 433.595 56.4333 435.262 58.1C436.928 59.7 437.762 61.7 437.762 64.1C437.762 66.4333 436.928 68.4333 435.262 70.1C433.595 71.7 431.428 72.5 428.762 72.5ZM467.42 73.2C462.22 73.2 457.62 72.0667 453.62 69.8C449.686 67.5333 446.586 64.4333 444.32 60.5C442.12 56.5667 441.02 52.0667 441.02 47C441.02 41.8 442.12 37.2333 444.32 33.3C446.586 29.3 449.686 26.1667 453.62 23.9C457.62 21.5667 462.22 20.4 467.42 20.4C474.02 20.4 479.553 22.1333 484.02 25.6C488.553 29.0667 491.42 33.9 492.62 40.1H476.72C476.12 37.9667 474.986 36.3 473.32 35.1C471.653 33.9 469.653 33.3 467.32 33.3C465.12 33.3 463.186 33.8667 461.52 35C459.92 36.0667 458.653 37.6333 457.72 39.7C456.786 41.7 456.32 44.0667 456.32 46.8C456.32 48.8667 456.586 50.7333 457.12 52.4C457.653 54.0667 458.386 55.5 459.32 56.7C460.32 57.9 461.486 58.8333 462.82 59.5C464.153 60.1 465.653 60.4 467.32 60.4C468.92 60.4 470.32 60.1333 471.52 59.6C472.786 59.0667 473.853 58.3 474.72 57.3C475.653 56.3 476.32 55.0667 476.72 53.6H492.62C491.42 59.6 488.553 64.3667 484.02 67.9C479.486 71.4333 473.953 73.2 467.42 73.2ZM498.238 72V-2.86102e-06H513.238V28.8C514.838 26.2667 517.005 24.2333 519.738 22.7C522.472 21.1667 525.672 20.4 529.338 20.4C533.605 20.4 537.172 21.3 540.038 23.1C542.905 24.9 545.072 27.5333 546.538 31C548.005 34.4 548.738 38.5333 548.738 43.4V72H533.838V44.8C533.838 41.0667 533.038 38.1667 531.438 36.1C529.905 34.0333 527.438 33 524.038 33C522.038 33 520.205 33.5 518.538 34.5C516.872 35.5 515.572 36.9333 514.638 38.8C513.705 40.6 513.238 42.7667 513.238 45.3V72H498.238ZM572.427 73.2C568.227 73.2 564.727 72.5333 561.927 71.2C559.193 69.8667 557.16 68.0667 555.827 65.8C554.56 63.4667 553.927 60.9 553.927 58.1C553.927 55.1 554.66 52.4667 556.127 50.2C557.66 47.8667 560.027 46.0333 563.227 44.7C566.427 43.3 570.46 42.6 575.327 42.6H587.527C587.527 40.3333 587.227 38.4667 586.627 37C586.093 35.5333 585.193 34.4333 583.927 33.7C582.66 32.9667 580.927 32.6 578.727 32.6C576.393 32.6 574.427 33.0667 572.827 34C571.227 34.9333 570.227 36.4 569.827 38.4H555.427C555.76 34.8 556.927 31.6667 558.927 29C560.993 26.3333 563.727 24.2333 567.127 22.7C570.527 21.1667 574.427 20.4 578.827 20.4C583.627 20.4 587.793 21.2 591.327 22.8C594.86 24.3333 597.593 26.6 599.527 29.6C601.527 32.6 602.527 36.3333 602.527 40.8V72H590.027L588.227 64.7C587.493 65.9667 586.627 67.1333 585.627 68.2C584.627 69.2 583.46 70.1 582.127 70.9C580.793 71.6333 579.327 72.2 577.727 72.6C576.127 73 574.36 73.2 572.427 73.2ZM576.127 61.8C577.727 61.8 579.127 61.5333 580.327 61C581.527 60.4667 582.56 59.7333 583.427 58.8C584.293 57.8667 584.993 56.8 585.527 55.6C586.127 54.3333 586.56 52.9667 586.827 51.5V51.4H577.127C575.46 51.4 574.06 51.6333 572.927 52.1C571.86 52.5 571.06 53.1 570.527 53.9C569.993 54.7 569.727 55.6333 569.727 56.7C569.727 57.8333 569.993 58.8 570.527 59.6C571.127 60.3333 571.893 60.9 572.827 61.3C573.827 61.6333 574.927 61.8 576.127 61.8ZM632.299 72C628.633 72 625.399 71.4333 622.599 70.3C619.799 69.1 617.633 67.1667 616.099 64.5C614.566 61.8333 613.799 58.2 613.799 53.6V34.1H605.199V21.6H613.799L615.399 7.4H628.799V21.6H641.699V34.1H628.799V53.8C628.799 55.8 629.233 57.2333 630.099 58.1C631.033 58.9 632.599 59.3 634.799 59.3H641.699V72H632.299Z",fill:"currentColor"})}),h1=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:c,attachmentPreviews:h,disabled:l=!1}=t,{getConversation:f}=Y(),m=f(),g=Re.get("discord-widget"),_=F(null),v=(m==null?void 0:m.status)==="closed",x=v||l,b=()=>{},k=P=>{i(o.filter(I=>(P==null?void 0:P.name)!==I.name))},S=P=>{P&&i([...o,P])},M=()=>{var P;(P=_.current)==null||P.upload()},T=()=>{o.length&&M(),r()},R=P=>{P.key==="Enter"&&(P.shiftKey?(P.preventDefault(),n(`${e}
100
+ `)):(P.preventDefault(),T()))};return w("div",{className:"relative",children:[!v&&s&&w(a1,{onPickEmoji:a}),!v&&(()=>{if(!(o!=null&&o.length))return null;const P=o.map((I,D)=>{if(!h[I.name])return null;const O=()=>{var $;i(o.filter(ut=>ut.name!==I.name)),($=_.current)==null||$.clear()};if(!I.type.startsWith("image/"))return w(u1,{onDelete:O,fileName:I.name,size:I.size},`attachment-preview-${D}`);const{url:J,width:at,height:Tt}=h[I.name];return w(l1,{onDelete:O,fileName:I.name,width:at,height:Tt,imageUrl:J},`attachment-preview-${D}`)});return w("div",{className:"m-2",children:P})})(),!v&&w("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[w("textarea",{id:"hs-textarea-ex-1",disabled:x,value:e,onChange:P=>n(P.target.value),onKeyDown:R,className:"flex-1 p-3 block text-base md:text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none min-h-[55px] max-h-[200px] overflow-y-auto",placeholder:l?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),w("button",{type:"button",disabled:x,onClick:()=>T(),style:{background:x?"#9CA3AF":"linear-gradient(167deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%)"},"aria-label":"Send message",className:"inline-flex shrink-0 justify-center items-center w-[33px] h-[33px] rounded-lg text-white transform transition-transform duration-150 hover:scale-105 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:transform-none",children:w(s1,{size:16})})]}),w("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[w("div",{className:"flex items-center gap-1",children:!v&&w(tt,{children:[w("div",{className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 transition-colors duration-150",children:w(o1,{ref:_,accept:ud.join(","),maxSize:10*1024*1024,uploadConfig:{url:`${Bt.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${g}`}},onUploadComplete:b,onUploadStart:k,onFileSelect:S})}),w("button",{type:"button",disabled:x,onClick:x?void 0:()=>c(!s),"aria-label":"Open emoji picker",className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150",children:w(Yg,{size:16})})]})}),w("a",{href:"https://deskcord.chat",target:"_blank",rel:"noopener noreferrer","aria-label":"Powered by Deskcord",className:"flex items-center gap-1 text-[10px] text-gray-400 hover:text-gray-600 dark:text-neutral-600 dark:hover:text-neutral-400 transition-colors duration-200 no-underline",children:[w("span",{children:"Powered by"}),w(d1,{className:"h-[10px] w-auto"})]})]})]})},dd=t=>{const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?"Just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`},hd="carousel",fd="controller",f1="navigation",p1="no-scroll",ds="portal",m1="root",pd="toolbar",hs="loading",fs="error",ps="complete",g1="placeholder",y1=t=>`active-slide-${t}`,md="flex_center",w1="no_scroll",gd="no_scroll_padding",v1="slide_wrapper",Ne="prev",De="next",yd="swipe",ln="close",wd="onPointerDown",vd="onPointerMove",_d="onPointerUp",bd="onPointerLeave",xd="onPointerCancel",Cd="onKeyDown",_1="onKeyUp",kd="onWheel",b1="Escape",x1="ArrowLeft",C1="ArrowRight",k1="button",ms="icon",Ed="contain",Sd="cover",E1="Unknown action type",Td="yarl__";function ue(...t){return[...t].filter(Boolean).join(" ")}function G(t){return`${Td}${t}`}function Rt(t){return`--${Td}${t}`}function Yn(t,e){return`${t}${e?`_${e}`:""}`}function gs(t){return e=>Yn(t,e)}function S1(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function Ad(...t){return()=>{t.forEach(e=>{e()})}}function Le(t,e,n){return()=>{const r=ft(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function Pd(){return typeof window<"u"}function T1(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function Id(t){return t.type===void 0||t.type==="image"}function A1(t,e){return t.imageFit===Sd||t.imageFit!==Ed&&e===Sd}function Hr(t){return typeof t=="string"?Number.parseInt(t,10):t}function Wr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=Hr(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function P1(t,e){const n=Wr(e),r=n.percent!==void 0?t.width/100*n.percent:n.pixel;return{width:Math.max(t.width-2*r,0),height:Math.max(t.height-2*r,0)}}function Md(t,e){return e>0?(t%e+e)%e:0}function Rd(t){return t.length>0}function Nd(t,e){return t[Md(e,t.length)]}function ys(t,e){return Rd(t)?Nd(t,e):void 0}function I1(t){return Id(t)?t.src:void 0}function M1(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const R1=Number(Da.split(".")[0])>=19;function N1(t){return{inert:R1?t:t?"":void 0}}const ws={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[ln]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Ed,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function Be(t,e){return{name:t,component:e}}function xt(t,e){return{module:t,children:e}}function Dd(t,e,n){return t.module.name===e?n(t):t.children?[xt(t.module,t.children.flatMap(r=>{var i;return(i=Dd(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function un(t,e,n){return t.flatMap(r=>{var i;return(i=Dd(r,e,n))!==null&&i!==void 0?i:[]})}function D1(t,e=[],n=[]){let r=t;const i=g=>{const _=[...r];for(;_.length>0;){const v=_.pop();if((v==null?void 0:v.module.name)===g)return!0;v!=null&&v.children&&_.push(...v.children)}return!1},o=(g,_)=>{if(g===""){r=[xt(_,r)];return}r=un(r,g,v=>[xt(_,[v])])},s=(g,_)=>{r=un(r,g,v=>[xt(v.module,[xt(_,v.children)])])},a=(g,_,v)=>{r=un(r,g,x=>{var b;return[xt(x.module,[...v?[xt(_)]:[],...(b=x.children)!==null&&b!==void 0?b:[],...v?[]:[xt(_)]])]})},c=(g,_,v)=>{r=un(r,g,x=>[...v?[xt(_)]:[],x,...v?[]:[xt(_)]])},h=g=>{s(fd,g)},l=(g,_)=>{r=un(r,g,v=>[xt(_,v.children)])},f=g=>{r=un(r,g,_=>_.children)},m=g=>{n.push(g)};return e.forEach(g=>{g({contains:i,addParent:o,append:s,addChild:a,addSibling:c,addModule:h,replace:l,remove:f,augment:m})}),{config:r,augmentation:g=>n.reduce((_,v)=>v(_),g)}}const Ld=At(null),vs=Le("useDocument","DocumentContext",Ld);function L1({nodeRef:t,children:e}){const n=_t(()=>{const r=o=>{var s;return((s=o||t.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[t]);return B(Ld.Provider,{value:n},e)}const Bd=At(null),Kr=Le("useEvents","EventsContext",Bd);function B1({children:t}){const[e]=W({});U(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=_t(()=>{const r=(s,a)=>{var c;(c=e[s])===null||c===void 0||c.splice(0,e[s].length,...e[s].filter(h=>h!==a))};return{publish:(...[s,a])=>{var c;(c=e[s])===null||c===void 0||c.forEach(h=>h(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return B(Bd.Provider,{value:n},t)}const Od=At(null),Gn=Le("useLightboxProps","LightboxPropsContext",Od);function O1({children:t,...e}){return B(Od.Provider,{value:e},t)}const Fd=At(null),qr=Le("useLightboxState","LightboxStateContext",Fd),Vd=At(null),F1=Le("useLightboxDispatch","LightboxDispatchContext",Vd);function V1(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=Md(i,n.length),s=ys(n,o),a=r||e.duration?{increment:r,duration:e.duration,easing:e.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:a}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:ys(e.slides,e.index)}:t;default:throw new Error(E1)}}function U1({slides:t,index:e,children:n}){const[r,i]=xn(V1,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ys(t,e)});U(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=_t(()=>({...r,state:r,dispatch:i}),[r,i]);return B(Vd.Provider,{value:i},B(Fd.Provider,{value:o},n))}const Ud=At(null),Yr=Le("useTimeouts","TimeoutsContext",Ud);function $1({children:t}){const[e]=W([]);U(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=_t(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const c=window.setTimeout(()=>{r(c),s()},a);return e.push(c),c},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return B(Ud.Provider,{value:n},t)}const $d=fe(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},c){const{styles:h,labels:l}=Gn(),f=S1(l,e);return B("button",{ref:c,type:"button",title:f,"aria-label":f,className:ue(G(k1),n),onClick:o,style:{...s,...h.button},...a},i?i():B(r,{className:G(ms),style:h.icon}))});function z1(t,e){const n=r=>B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},e);return n.displayName=t,n}function Xn(t,e){return z1(t,B("g",{fill:"currentColor"},B("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const j1=Xn("Close",B("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),H1=Xn("Previous",B("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),W1=Xn("Next",B("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),K1=Xn("Loading",B(tt,null,Array.from({length:8}).map((t,e,n)=>B("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(e+1),transform:`rotate(${360/n.length*e}, 12, 12)`})))),q1=Xn("Error",B("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Zn=Pd()?ae:U;function zd(){const[t,e]=W(!1);return U(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");e(i==null?void 0:i.matches);const o=s=>e(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),t}function Y1(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(Hr);s.length===6?(e=s[4],n=s[5]):s.length===16&&(e=s[12],n=s[13],r=s[14])}return{x:e,y:n,z:r}}function jd(t,e){const n=F(),r=F(),i=zd();return Zn(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:c,duration:h,easing:l,onfinish:f}=e(n.current,t.current.getBoundingClientRect(),Y1(t.current))||{};if(c&&h){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(a=(s=t.current).animate)===null||a===void 0?void 0:a.call(s,c,{duration:h,easing:l})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function Hd(){const t=F(null),e=F(),[n,r]=W();return{setContainerRef:et(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),c=h=>parseFloat(h)||0;r({width:Math.round(o.clientWidth-c(a.paddingLeft)-c(a.paddingRight)),height:Math.round(o.clientHeight-c(a.paddingTop)-c(a.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(s),e.current.observe(o))},[]),containerRef:t,containerRect:n}}function Gr(){const t=F(),{setTimeout:e,clearTimeout:n}=Yr();return et((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function wt(t){const e=F(t);return Zn(()=>{e.current=t}),et((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Wd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function _s(t,e){return _t(()=>t==null&&e==null?null:n=>{Wd(t,n),Wd(e,n)},[t,e])}function G1(t,e=!1){const n=F();Zn(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=et(()=>{n.current=!0},[]),i=et(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function bs(){const[t,e]=W(!1);return Zn(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function X1(){const[t]=W({}),e=et((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=_t(()=>({onPointerDown:i=>e(wd,i),onPointerMove:i=>e(vd,i),onPointerUp:i=>e(_d,i),onPointerLeave:i=>e(bd,i),onPointerCancel:i=>e(xd,i),onKeyDown:i=>e(Cd,i),onKeyUp:i=>e(_1,i),onWheel:i=>e(kd,i)}),[e]),r=et((i,o)=>(t[i]||(t[i]=[]),t[i].unshift(o),()=>{const s=t[i];s&&s.splice(0,s.length,...s.filter(a=>a!==o))}),[t]);return{registerSensors:n,subscribeSensors:r}}function Kd(t,e){const n=F(0),r=Gr(),i=wt((...o)=>{n.current=Date.now(),t(o)});return et((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const xs=gs("slide"),Cs=gs("slide_image");function Z1({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:c,style:h}){var l,f,m,g,_,v,x;const[b,k]=W(hs),{publish:S}=Kr(),{setTimeout:M}=Yr(),T=F(null);U(()=>{e===0&&S(y1(b))},[e,b,S]);const R=wt(q=>{("decode"in q?q.decode():Promise.resolve()).catch(()=>{}).then(()=>{q.parentNode&&(k(ps),M(()=>{a==null||a(q)},0))})}),N=et(q=>{T.current=q,q!=null&&q.complete&&R(q)},[R]),P=et(q=>{R(q.currentTarget)},[R]),I=wt(()=>{k(fs),c==null||c()}),D=A1(t,i),O=(q,Gt)=>Number.isFinite(q)?q:Gt,J=O(Math.max(...((f=(l=t.srcSet)===null||l===void 0?void 0:l.map(q=>q.width))!==null&&f!==void 0?f:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=T.current)===null||m===void 0?void 0:m.naturalWidth)||0),at=O(Math.max(...((_=(g=t.srcSet)===null||g===void 0?void 0:g.map(q=>q.height))!==null&&_!==void 0?_:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((v=T.current)===null||v===void 0?void 0:v.naturalHeight)||0),Tt=J&&at?{maxWidth:`min(${J}px, 100%)`,maxHeight:`min(${at}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},$=(x=t.srcSet)===null||x===void 0?void 0:x.sort((q,Gt)=>q.width-Gt.width).map(q=>`${q.src} ${q.width}w`).join(", "),ut=()=>r&&!D&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,z=$&&r&&Pd()?`${Math.round(Math.min(ut(),r.width))}px`:void 0,{style:nt,className:Ot,...Ht}=o||{};return B(tt,null,B("img",{ref:N,onLoad:P,onError:I,onClick:s,draggable:!1,className:ue(G(Cs()),D&&G(Cs("cover")),b!==ps&&G(Cs("loading")),Ot),style:{...Tt,...h,...nt},...Ht,alt:t.alt,sizes:z,srcSet:$,src:t.src}),b!==ps&&B("div",{className:G(xs(g1))},b===hs&&(n!=null&&n.iconLoading?n.iconLoading():B(K1,{className:ue(G(ms),G(xs(hs)))})),b===fs&&(n!=null&&n.iconError?n.iconError():B(q1,{className:ue(G(ms),G(xs(fs)))}))))}const J1=fe(function({className:e,children:n,...r},i){const o=F(null);return B(L1,{nodeRef:o},B("div",{ref:_s(i,o),className:ue(G("root"),e),...r},n))});var St;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(St||(St={}));function Q1(t,e,n,r,i){U(()=>Ad(t(wd,e),t(vd,n),t(_d,r),t(bd,r),t(xd,r)),[t,e,n,r,i])}var qt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(qt||(qt={}));const ks=30;function tw(t,e,n,r,i,o,s,a,c,h,l,f,m,g){const _=F(0),v=F([]),x=F(),b=F(0),k=F(qt.NONE),S=et(I=>{x.current===I.pointerId&&(x.current=void 0,k.current=qt.NONE);const D=v.current;D.splice(0,D.length,...D.filter(O=>O.pointerId!==I.pointerId))},[]),M=et(I=>{S(I),I.persist(),v.current.push(I)},[S]),T=wt(I=>{M(I)}),R=(I,D)=>h&&I>D||c&&I<-D,N=wt(I=>{if(v.current.find(D=>D.pointerId===I.pointerId)&&x.current===I.pointerId){const D=Date.now()-b.current,O=_.current;k.current===qt.SWIPE?Math.abs(O)>.3*n||Math.abs(O)>5&&D<r?s(O,D):a(O):k.current===qt.PULL&&(R(O,2*ks)?m(O,D):g(O)),_.current=0,k.current=qt.NONE}S(I)}),P=wt(I=>{const D=v.current.find(O=>O.pointerId===I.pointerId);if(D){const O=x.current===I.pointerId;if(I.buttons===0){O&&_.current!==0?N(I):S(D);return}const J=I.clientX-D.clientX,at=I.clientY-D.clientY;if(x.current===void 0){const Tt=$=>{M(I),x.current=I.pointerId,b.current=Date.now(),k.current=$};Math.abs(J)>Math.abs(at)&&Math.abs(J)>ks&&e(J)?(Tt(qt.SWIPE),i()):Math.abs(at)>Math.abs(J)&&R(at,ks)&&(Tt(qt.PULL),l())}else O&&(k.current===qt.SWIPE?(_.current=J,o(J)):k.current===qt.PULL&&(_.current=at,f(at)))}});Q1(t,T,P,N)}function ew({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=F(null),r=wt(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return et(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function nw(t,e,n,r,i,o,s,a,c){const h=F(0),l=F(0),f=F(),m=F(),g=F(0),_=F(),v=F(0),{setTimeout:x,clearTimeout:b}=Yr(),k=et(()=>{f.current&&(b(f.current),f.current=void 0)},[b]),S=et(()=>{m.current&&(b(m.current),m.current=void 0)},[b]),M=wt(()=>{t!==St.SWIPE&&(h.current=0,v.current=0,k(),S())});U(M,[t,M]);const T=wt(N=>{m.current=void 0,h.current===N&&c(h.current)}),R=wt(N=>{if(N.ctrlKey||Math.abs(N.deltaY)>Math.abs(N.deltaX))return;const P=I=>{g.current=I,b(_.current),_.current=I>0?x(()=>{g.current=0,_.current=void 0},300):void 0};if(t===St.NONE){if(Math.abs(N.deltaX)<=1.2*Math.abs(g.current)){P(N.deltaX);return}if(!n(-N.deltaX))return;if(l.current+=N.deltaX,k(),Math.abs(l.current)>30)l.current=0,P(0),v.current=Date.now(),o();else{const I=l.current;f.current=x(()=>{f.current=void 0,I===l.current&&(l.current=0)},i)}}else if(t===St.SWIPE){let I=h.current-N.deltaX;if(I=Math.min(Math.abs(I),r)*Math.sign(I),h.current=I,s(I),S(),Math.abs(I)>.2*r){P(N.deltaX),a(I,Date.now()-v.current);return}m.current=x(()=>T(I),2*i)}else P(N.deltaX)});U(()=>e(kd,R),[e,R])}const qd=gs("container"),Yd=At(null),Jn=Le("useController","ControllerContext",Yd);function rw({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:c}=e,{closeOnPullUp:h,closeOnPullDown:l,preventDefaultWheelX:f,preventDefaultWheelY:m}=o,[g,_]=W(),v=qr(),x=F1(),[b,k]=W(St.NONE),S=F(0),M=F(0),T=F(1),{registerSensors:R,subscribeSensors:N}=X1(),{subscribe:P,publish:I}=Kr(),D=Gr(),O=Gr(),J=Gr(),{containerRef:at,setContainerRef:Tt,containerRect:$}=Hd(),ut=_s(ew({preventDefaultWheelX:f,preventDefaultWheelY:m}),Tt),z=F(null),nt=_s(z,void 0),{getOwnerDocument:Ot}=vs(),Ht=bs(),q=L=>(Ht?-1:1)*(typeof L=="number"?L:1),Gt=wt(()=>{var L;return(L=at.current)===null||L===void 0?void 0:L.focus()}),oi=wt(()=>e),mt=wt(()=>v),bt=et(L=>I(Ne,L),[I]),Fe=et(L=>I(De,L),[I]),we=et(()=>I(ln),[I]),fn=L=>!(r.finite&&(q(L)>0&&v.currentIndex===0||q(L)<0&&v.currentIndex===v.slides.length-1)),rr=L=>{var Q;S.current=L,(Q=at.current)===null||Q===void 0||Q.style.setProperty(Rt("swipe_offset"),`${Math.round(L)}px`)},pn=L=>{var Q,Ct;M.current=L,T.current=(()=>{const he=l&&L>0?L:h&&L<0?-L:0;return Math.min(Math.max(T1(1-he/60*(1-.5),2),.5),1)})(),(Q=at.current)===null||Q===void 0||Q.style.setProperty(Rt("pull_offset"),`${Math.round(L)}px`),(Ct=at.current)===null||Ct===void 0||Ct.style.setProperty(Rt("pull_opacity"),`${T.current}`)},{prepareAnimation:ve}=jd(z,(L,Q,Ct)=>{if(z.current&&$)return{keyframes:[{transform:`translate(0, ${L.rect.y-Q.y+Ct.y}px)`,opacity:L.opacity},{transform:"translate(0, 0)",opacity:1}],duration:L.duration,easing:i.easing.fade}}),mn=(L,Q)=>{if(h||l){pn(L);let Ct=0;z.current&&(Ct=i.fade*(Q?2:1),ve({rect:z.current.getBoundingClientRect(),opacity:T.current,duration:Ct})),J(()=>{pn(0),k(St.NONE)},Ct),k(St.ANIMATION),Q||we()}},{prepareAnimation:si,isAnimationPlaying:Hs}=jd(z,(L,Q,Ct)=>{var It;if(z.current&&$&&(!((It=v.animation)===null||It===void 0)&&It.duration)){const ct=Wr(r.spacing),he=(ct.percent?ct.percent*$.width/100:ct.pixel)||0;return{keyframes:[{transform:`translate(${q(v.globalIndex-L.index)*($.width+he)+L.rect.x-Q.x+Ct.x}px, 0)`},{transform:"translate(0, 0)"}],duration:v.animation.duration,easing:v.animation.easing}}}),_e=wt(L=>{var Q,Ct;const It=L.offset||0,ct=It?i.swipe:(Q=i.navigation)!==null&&Q!==void 0?Q:i.swipe,he=!It&&!Hs()?i.easing.navigation:i.easing.swipe;let{direction:gn}=L;const Ft=(Ct=L.count)!==null&&Ct!==void 0?Ct:1;let or=St.ANIMATION,p=ct*Ft;if(!gn){const d=$==null?void 0:$.width,y=L.duration||0,C=d?ct/d*Math.abs(It):ct;Ft!==0?(y<C?p=p/C*Math.max(y,C/5):d&&(p=ct/d*(d-Math.abs(It))),gn=q(It)>0?Ne:De):p=ct/2}let u=0;gn===Ne?fn(q(1))?u=-Ft:(or=St.NONE,p=ct):gn===De&&(fn(q(-1))?u=Ft:(or=St.NONE,p=ct)),p=Math.round(p),O(()=>{rr(0),k(St.NONE)},p),z.current&&si({rect:z.current.getBoundingClientRect(),index:v.globalIndex}),k(or),I(yd,{type:"swipe",increment:u,duration:p,easing:he})});U(()=>{var L,Q;!((L=v.animation)===null||L===void 0)&&L.increment&&(!((Q=v.animation)===null||Q===void 0)&&Q.duration)&&D(()=>x({type:"swipe",increment:0}),v.animation.duration)},[v.animation,x,D]);const de=[N,fn,($==null?void 0:$.width)||0,i.swipe,()=>k(St.SWIPE),L=>rr(L),(L,Q)=>_e({offset:L,duration:Q,count:1}),L=>_e({offset:L,count:0})],Ve=[()=>{l&&k(St.PULL)},L=>pn(L),L=>mn(L),L=>mn(L,!0)];tw(...de,h,l,...Ve),nw(b,...de);const ai=wt(()=>{o.focus&&Ot().querySelector(`.${G(ds)} .${G(qd())}`)&&Gt()});U(ai,[ai]);const ci=wt(()=>{var L;(L=s.view)===null||L===void 0||L.call(s,{index:v.currentIndex})});U(ci,[v.globalIndex,ci]),U(()=>Ad(P(Ne,L=>_e({direction:Ne,...L})),P(De,L=>_e({direction:De,...L})),P(yd,L=>x(L))),[P,_e,x]);const ir=_t(()=>({prev:bt,next:Fe,close:we,focus:Gt,slideRect:$?P1($,r.padding):{width:0,height:0},containerRect:$||{width:0,height:0},subscribeSensors:N,containerRef:at,setCarouselRef:nt,toolbarWidth:g,setToolbarWidth:_}),[bt,Fe,we,Gt,N,$,at,nt,g,_,r.padding]);return Cn(o.ref,()=>({prev:bt,next:Fe,close:we,focus:Gt,getLightboxProps:oi,getLightboxState:mt}),[bt,Fe,we,Gt,oi,mt]),B("div",{ref:ut,className:ue(G(qd()),G(md)),style:{...b===St.SWIPE?{[Rt("swipe_offset")]:`${Math.round(S.current)}px`}:null,...b===St.PULL?{[Rt("pull_offset")]:`${Math.round(M.current)}px`,[Rt("pull_opacity")]:`${T.current}`}:null,...o.touchAction!=="none"?{[Rt("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...R},$&&B(Yd.Provider,{value:ir},t,(n=c.controls)===null||n===void 0?void 0:n.call(c)))}const iw=Be(fd,rw);function Oe(t){return Yn(hd,t)}function Gd(t){return Yn("slide",t)}function ow({slide:t,offset:e}){const n=F(null),{currentIndex:r}=qr(),{slideRect:i,close:o,focus:s}=Jn(),{render:a,carousel:{imageFit:c,imageProps:h},on:{click:l},controller:{closeOnBackdropClick:f},styles:{slide:m}}=Gn(),{getOwnerDocument:g}=vs(),_=e!==0;U(()=>{var b;_&&(!((b=n.current)===null||b===void 0)&&b.contains(g().activeElement))&&s()},[_,s,g]);const v=()=>{var b,k,S,M;let T=(b=a.slide)===null||b===void 0?void 0:b.call(a,{slide:t,offset:e,rect:i});return!T&&Id(t)&&(T=B(Z1,{slide:t,offset:e,render:a,rect:i,imageFit:c,imageProps:h,onClick:_?void 0:()=>l==null?void 0:l({index:r})})),T?B(tt,null,(k=a.slideHeader)===null||k===void 0?void 0:k.call(a,{slide:t}),((S=a.slideContainer)!==null&&S!==void 0?S:({children:R})=>R)({slide:t,children:T}),(M=a.slideFooter)===null||M===void 0?void 0:M.call(a,{slide:t})):null},x=b=>{const k=n.current,S=b.target instanceof HTMLElement?b.target:void 0;f&&S&&k&&(S===k||Array.from(k.children).find(M=>M===S)&&S.classList.contains(G(v1)))&&o()};return B("div",{ref:n,className:ue(G(Gd()),!_&&G(Gd("current")),G(md)),...N1(_),onClick:x,style:m},v())}function sw(){const t=Gn().styles.slide;return B("div",{className:G("slide"),style:t})}function aw({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=qr(),{setCarouselRef:i}=Jn(),o=Wr(t.spacing),s=Wr(t.padding),a=M1(t,e,1),c=[];if(Rd(e))for(let h=n-a;h<=n+a;h+=1){const l=Nd(e,h),f=r-n+h,m=t.finite&&(h<0||h>e.length-1);c.push(m?{key:f}:{key:[`${f}`,I1(l)].filter(Boolean).join("|"),offset:h-n,slide:l})}return B("div",{ref:i,className:ue(G(Oe()),c.length>0&&G(Oe("with_slides"))),style:{[`${Rt(Oe("slides_count"))}`]:c.length,[`${Rt(Oe("spacing_px"))}`]:o.pixel||0,[`${Rt(Oe("spacing_percent"))}`]:o.percent||0,[`${Rt(Oe("padding_px"))}`]:s.pixel||0,[`${Rt(Oe("padding_percent"))}`]:s.percent||0}},c.map(({key:h,slide:l,offset:f})=>l?B(ow,{key:h,slide:l,offset:f}):B(sw,{key:h})))}const cw=Be(hd,aw);function Xd(){const{carousel:t}=Gn(),{slides:e,currentIndex:n}=qr(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function lw(t){var e;const n=bs(),{publish:r}=Kr(),{animation:i}=Gn(),{prevDisabled:o,nextDisabled:s}=Xd(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,c=Kd(()=>r(Ne),a),h=Kd(()=>r(De),a),l=wt(f=>{switch(f.key){case b1:r(ln);break;case x1:(n?s:o)||(n?h:c)();break;case C1:(n?o:s)||(n?c:h)();break}});U(()=>t(Cd,l),[t,l])}function Zd({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return B($d,{label:t,icon:e,renderIcon:n,className:G(`navigation_${r}`),disabled:o,onClick:i,style:s,...G1(Jn().focus,o)})}function uw({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Jn(),{prevDisabled:c,nextDisabled:h}=Xd();return lw(a),B(tt,null,t?t():B(Zd,{label:"Previous",action:Ne,icon:H1,renderIcon:n,style:i.navigationPrev,disabled:c,onClick:o}),e?e():B(Zd,{label:"Next",action:De,icon:W1,renderIcon:r,style:i.navigationNext,disabled:h,onClick:s}))}const dw=Be(f1,uw),Jd=G(w1),hw=G(gd);function fw(t){return"style"in t}function Qd(t,e,n){const r=window.getComputedStyle(t),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=t.style.getPropertyValue(i);return t.style.setProperty(i,`${(Hr(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function pw({noScroll:{disabled:t},children:e}){const n=bs(),{getOwnerDocument:r,getOwnerWindow:i}=vs();return U(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:c}=r(),h=Math.round(s.innerWidth-c.clientWidth);if(h>0){o.push(Qd(a,h,n));const l=a.getElementsByTagName("*");for(let f=0;f<l.length;f+=1){const m=l[f];fw(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(hw)&&o.push(Qd(m,h,n))}}return a.classList.add(Jd),()=>{a.classList.remove(Jd),o.forEach(l=>l())}},[n,t,r,i]),B(tt,null,e)}const mw=Be(p1,pw);function th(t){return Yn(ds,t)}function eh(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function gw({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,c]=W(!1),[h,l]=W(!1),f=F([]),m=F(null),{setTimeout:g}=Yr(),{subscribe:_}=Kr(),x=zd()?0:e.fade;U(()=>(c(!0),()=>{c(!1),l(!1)}),[]);const b=wt(()=>{f.current.forEach(T=>T()),f.current=[]}),k=wt(()=>{var T;l(!1),b(),(T=i.exiting)===null||T===void 0||T.call(i),g(()=>{var R;(R=i.exited)===null||R===void 0||R.call(i),s()},x)});U(()=>_(ln,k),[_,k]);const S=wt(T=>{var R,N,P;T.scrollTop,l(!0),(R=i.entering)===null||R===void 0||R.call(i);const I=(P=(N=T.parentNode)===null||N===void 0?void 0:N.children)!==null&&P!==void 0?P:[];for(let D=0;D<I.length;D+=1){const O=I[D];["TEMPLATE","SCRIPT","STYLE"].indexOf(O.tagName)===-1&&O!==T&&(f.current.push(eh(O,"inert","")),f.current.push(eh(O,"aria-hidden","true")))}f.current.push(()=>{var D,O;(O=(D=m.current)===null||D===void 0?void 0:D.focus)===null||O===void 0||O.call(D)}),g(()=>{var D;(D=i.entered)===null||D===void 0||D.call(i)},x)}),M=et(T=>{T?S(T):b()},[S,b]);return a?Ai(B(J1,{ref:M,className:ue(r,G(th()),G(gd),h&&G(th("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==ws.animation.fade?{[Rt("fade_animation_duration")]:`${x}ms`}:null,...e.easing.fade!==ws.animation.easing.fade?{[Rt("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:T=>{m.current||(m.current=T.relatedTarget)}},t),o.root||document.body):null}const yw=Be(ds,gw);function ww({children:t}){return B(tt,null,t)}const vw=Be(m1,ww);function _w(t){return Yn(pd,t)}function bw({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Jn(),{setContainerRef:s,containerRect:a}=Hd();Zn(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const c=()=>e?e():B($d,{key:ln,label:"Close",icon:j1,renderIcon:n,onClick:i});return B("div",{ref:s,style:r.toolbar,className:G(_w())},t==null?void 0:t.map(h=>h===ln?c():h))}const xw=Be(pd,bw);function nh(t,e){var n;return B(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>nh(r,e)))}function Cw(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function kw({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:c,index:h,...l}){const{animation:f,carousel:m,render:g,toolbar:_,controller:v,noScroll:x,on:b,slides:k,index:S,plugins:M,...T}=ws,{config:R,augmentation:N}=D1([xt(yw,[xt(mw,[xt(iw,[xt(cw),xt(xw),xt(dw)])])])],a||M),P=N({animation:Cw(f,e),carousel:{...m,...t},render:{...g,...n},toolbar:{..._,...r},controller:{...v,...i},noScroll:{...x,...o},on:{...b,...s},...T,...l});return P.open?B(O1,{...P},B(U1,{slides:c||k,index:Hr(h||S)},B($1,null,B(B1,null,nh(xt(vw,R),P))))):null}const Ew=({attachment:t})=>{const e=async n=>{n.preventDefault();try{const r=await fetch(t.url);if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.download=t.name,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(o)}catch{window.open(t.url,"_blank","noopener,noreferrer")}};return w("a",{href:t.url,onClick:e,className:"flex items-center gap-3 max-w-[240px] rounded-lg border border-gray-200 bg-white px-3 py-2 no-underline hover:bg-gray-50 transition-colors cursor-pointer dark:bg-neutral-800 dark:border-neutral-700 dark:hover:bg-neutral-700",children:[w(ls,{extension:jr(t.name),className:"w-8 h-9"}),w("div",{className:"min-w-0",children:[w("p",{className:"text-sm font-medium text-gray-800 dark:text-white truncate",children:t.name}),w("p",{className:"text-xs text-gray-500 dark:text-neutral-400",children:us(t.size)})]})]})},Sw=["png","jpg","jpeg","gif","webp"];function rh(t){return t.contentType?t.contentType.startsWith("image/"):Sw.includes(jr(t.name))}function ih(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const oh=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=Y(),[r,i]=W(!1),o=ft(Fh);function s(){if(o){const l=o.getElementById("deskcord-lightbox-portal");if(l)return l}const h=document.getElementById("deskcord-lightbox-portal");return h||document.body}const a=(e==null?void 0:e.filter(h=>rh(h)&&!ih(h)))??[];function c(){return a.length?w(kw,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(h=>({src:h.proxyURL}))}):null}return e!=null&&e.length?w("div",{children:[e.map((h,l)=>{const{proxyURL:f,width:m,height:g}=h;return rh(h)?ih(h)?w("div",{children:w("img",{src:f,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):w("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:w("img",{src:f,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):w("div",{className:"mt-1",children:w(Ew,{attachment:h})},`conv-cus-attachment-${t}-${l}`)}),c()]},`conv-cus-attachment-${t}`):null},sh=({imageUrls:t,messageIndexKey:e})=>t.length?w("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>w("div",{className:"inline-block",children:w("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,Tw=["giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],Aw=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function Pw(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of Aw)if(n.endsWith(i))return!0;for(const i of Tw)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const Iw=/https?:\/\/[^\s<>]+/gi;function ah(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(Iw);if(r)for(const i of r)Pw(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const Mw=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const c=/<\w?:\w+:\d+>/g,h=s.split(c),l=s.match(c)??[],f=[];for(let m=0;m<h.length;m++)if(f.push(h[m]),l[m]){const g=a[l[m]];g&&f.push(w("img",{src:g.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return f}const{text:i,imageUrls:o}=ah(e.content??"");return w("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&w("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white text-sm min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(i,e.emojis??{})}),w(sh,{imageUrls:o,messageIndexKey:n}),w("div",{className:"flex flex-1",children:w(oh,{attachments:e.attachments,messageIndexKey:n})}),t&&w("div",{children:w("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",dd(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},Rw=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=ah(t.content??"");return w("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&w("div",{className:"grow",children:w("div",{style:{background:"linear-gradient(167deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%)"},className:"min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:w("p",{className:"text-left text-sm text-white",children:n})})}),w(sh,{imageUrls:r,messageIndexKey:e}),t.attachments&&w("div",{className:"flex flex-1 justify-end",children:w(oh,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},Nw=({message:t,indexKey:e})=>w("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:w("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:w("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),Dw=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=Y(),[o,s]=W(r),[a,c]=W(n),[h,l]=W(""),[f,m]=W(!1),g=b=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(b),_=!!n&&!!r,v=b=>{if(b.preventDefault(),!!a.trim()){if(!g(o)){l("Please enter a valid email address");return}f||(m(!0),l(""),t(o),e(a))}};function x(){return w("form",{onSubmit:v,className:"w-full space-y-4",children:[w("div",{className:"mb-4",children:[w("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),w("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),w("div",{children:[w("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),w("div",{className:"relative",children:[w("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:w(Gg,{size:18,className:"text-gray-400"})}),w("input",{type:"text",id:"name",value:a,onChange:b=>c(b.target.value),name:"name",className:"py-2.5 px-4 ps-11 block w-full bg-white border border-gray-300 rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--dc-primary)] focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",placeholder:"John Smith",disabled:_,required:!0})]})]}),w("div",{children:[w("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),w("div",{className:"relative",children:[w("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:w(Hg,{size:18,className:"text-gray-400"})}),w("input",{type:"email",id:"email",value:o,onChange:b=>{s(b.target.value),h&&l("")},name:"email",className:`py-2.5 px-4 ps-11 block w-full bg-white rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed border ${h?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[var(--dc-primary)]"}`,placeholder:"you@example.com",disabled:_,required:!0})]}),h&&w("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[w("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),h]})]}),w("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?w("button",{type:"submit",className:"w-full py-2.5 px-4 bg-[var(--dc-primary)] hover:bg-[var(--dc-primary-mid)] text-white font-medium text-sm rounded-lg transition-all duration-200 transform hover:shadow-md active:scale-95 focus:outline-none focus:ring-2 focus:ring-[var(--dc-primary)] focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f,children:"Start Chatting"}):null]})}return w(tt,{children:[w("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:w("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:x()})}),n&&r&&w("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:w("div",{className:"grow",children:w("div",{style:{background:"linear-gradient(167deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%)"},className:"min-w-10 inline-block rounded-lg px-4 py-2 shadow-sm flex items-center gap-2",children:[w(zg,{size:16,className:"text-white flex-shrink-0"}),w("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",w("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function Lw(t,e){const n=F();U(()=>{n.current=t},[t]),U(()=>{function r(){var i;(i=n==null?void 0:n.current)==null||i.call(n)}if(e!==null){const i=setInterval(r,e);return()=>clearInterval(i)}},[e])}const Bw=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=W(!0),[s,a]=W(0);return Lw(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),w("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:w("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:w("div",{children:[w("div",{className:"mb-2 flex justify-between items-center",children:[w("div",{className:"flex items-center gap-x-3",children:[w(ls,{extension:jr(n.fileName),className:"size-9",iconColorClassName:r?"text-red-300":void 0}),w("div",{children:[w("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),w("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:us(n.size)})]})]}),r&&w("div",{className:"inline-flex items-center gap-x-2",children:w("span",{className:"relative",children:[w("svg",{className:"shrink-0 size-4 text-red-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:w("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})}),w("span",{className:"sr-only",children:"Danger"})]})})]}),w("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[w("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:w("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${r?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${s}%`}})}),w("div",{className:"w-6 text-end",children:w("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},Ow=({conversation:t,open:e})=>{const n=F(!1),{isChatOpen:r}=Y();U(()=>{r?n.current=!0:n.current=!1},[r]);function i(c,h){const l=`${c.date}-${h}`;let f;if(typeof c.customRenderer<"u")switch(c.customRenderer){case cn.IntroduceYourself:f=w(Dw,{});break;case cn.UploadFile:f=w(Bw,{message:c,indexKey:l});break;default:f=a(c,l)}else c.authorName===qn?f=a(c,l):c.support?f=o(c,l):f=s(c,l);return r&&(c.pending??(c.support&&n.current))?w(Qt.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:f},l):w("li",{children:f},l)}function o(c,h){var g;const l=(g=t==null?void 0:t.messages)==null?void 0:g.filter(_=>_.support),f=l==null?void 0:l[l.length-1],m=c.date===(f==null?void 0:f.date);return w(Mw,{renderTimestamp:m,message:c,indexKey:h})}function s(c,h){return w(Rw,{message:c,indexKey:h})}function a(c,h){return w(Nw,{message:c,indexKey:h})}return w("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((c,h)=>c.date-h.date).map(i),t&&!e&&i(e1,1)]})},Fw={duration:.9,repeat:1/0,ease:"easeInOut"},Vw=({authorName:t,visible:e})=>w("div",{className:`flex items-center gap-2 px-4 py-1.5 bg-white dark:bg-neutral-900 transition-opacity duration-150 ${e?"opacity-100":"opacity-0 pointer-events-none"}`,role:"status","aria-hidden":!e,"aria-label":e?`${t} is typing`:void 0,children:[w("span",{className:"inline-flex items-center gap-1",children:[0,1,2].map(n=>w(Qt.span,{className:"block w-1.5 h-1.5 rounded-full bg-gray-400 dark:bg-neutral-500",animate:e?{y:[0,-3,0]}:{y:0},transition:e?{...Fw,delay:n*.15}:void 0},n))}),w("span",{className:"text-xs text-gray-500 dark:text-neutral-400",children:[w("span",{className:"font-semibold text-gray-700 dark:text-neutral-200",children:t})," ","is typing..."]})]}),Uw=()=>{var Tt;const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s,typingByThread:a}=Y(),c=!!(r&&i),h=F(!1);U(()=>{s&&!h.current&&(h.current=!0),s||(h.current=!1)},[s]);const[l,f]=W(!1),[m,g]=W([]),[_,v]=W({}),x=t(),b=(x==null?void 0:x.status)==="open",[k,S]=W(""),[M,T]=W(!1),R=F(null),N=()=>{T(!0),R.current!==null&&clearTimeout(R.current),R.current=window.setTimeout(()=>{T(!1),R.current=null},800)};U(()=>()=>{R.current!==null&&clearTimeout(R.current)},[]);const P=!!(x&&a[x.threadId]),I=[...(x==null?void 0:x.messages)??[]].filter($=>$.support&&$.authorName).sort(($,ut)=>ut.date-$.date)[0],D=((Tt=x==null?void 0:x.csMember)==null?void 0:Tt.displayName)??(I==null?void 0:I.authorName)??"Support";U(()=>{const $={};m.forEach(ut=>{if(!ut.type.startsWith("image/")){$[ut.name]={url:"",width:0,height:0,size:ut.size},v({...$});return}const z=new FileReader;z.addEventListener("load",function(){const nt=new Image;nt.onload=()=>{$[ut.name]={url:z.result,width:nt.width,height:nt.height,size:ut.size},v({...$})},nt.src=z.result},!1),z.readAsDataURL(ut)})},[m]);const O=$=>{S(ut=>ut+$)},J=async()=>{const $=Date.now(),ut={support:!1,content:k,date:$,authorName:r,pending:!0};if(k.trim()!==""){S(""),e(x?x.threadId:"TEMP",ut);const z=await t1({content:k});z&&((!x||x.threadId==="TEMP")&&n(z.threadId),o(z.threadId,$,{...ut,pending:!1,date:z.date}))}},at=s&&!h.current;return w(tt,{children:[w("div",{className:`flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse dc-scroll ${M?"dc-scroll--active":""}`,onScroll:N,children:w(Qt.div,{initial:at?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:w(Ow,{conversation:x,open:b})})}),w(Vw,{authorName:D,visible:P}),w("div",{className:(x==null?void 0:x.status)==="closed"?"":"border-t border-t-gray-200 dark:border-neutral-800",children:w(h1,{attachmentPreviews:_,files:m,setFiles:g,inputMessage:k,setInputMessage:S,showEmojiPicker:l,setShowEmojiPicker:f,addEmoji:O,sendMessage:J,disabled:!c})})]})};function Es(t,e){switch(t){case"online":return e==="text"?"text-teal-600":"bg-teal-400";case"idle":return e==="text"?"text-yellow-600":"bg-yellow-400";case"dnd":return e==="text"?"text-red-600":"bg-red-400";case"offline":case"invisible":return e==="text"?"text-black":"bg-gray-400";default:return e==="text"?"text-black":"bg-gray-400"}}function $w(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const ee=Object.create(null);ee.open="0",ee.close="1",ee.ping="2",ee.pong="3",ee.message="4",ee.upgrade="5",ee.noop="6";const Xr=Object.create(null);Object.keys(ee).forEach(t=>{Xr[ee[t]]=t});const Ss={type:"error",data:"parser error"},ch=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",lh=typeof ArrayBuffer=="function",uh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ts=({type:t,data:e},n,r)=>ch&&e instanceof Blob?n?r(e):dh(e,r):lh&&(e instanceof ArrayBuffer||uh(e))?n?r(e):dh(new Blob([e]),r):r(ee[t]+(e||"")),dh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function hh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let As;function zw(t,e){if(ch&&t.data instanceof Blob)return t.data.arrayBuffer().then(hh).then(e);if(lh&&(t.data instanceof ArrayBuffer||uh(t.data)))return e(hh(t.data));Ts(t,!1,n=>{As||(As=new TextEncoder),e(As.encode(n))})}const fh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<fh.length;t++)Qn[fh.charCodeAt(t)]=t;const jw=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const h=new ArrayBuffer(e),l=new Uint8Array(h);for(r=0;r<n;r+=4)o=Qn[t.charCodeAt(r)],s=Qn[t.charCodeAt(r+1)],a=Qn[t.charCodeAt(r+2)],c=Qn[t.charCodeAt(r+3)],l[i++]=o<<2|s>>4,l[i++]=(s&15)<<4|a>>2,l[i++]=(a&3)<<6|c&63;return h},Hw=typeof ArrayBuffer=="function",Ps=(t,e)=>{if(typeof t!="string")return{type:"message",data:ph(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:Ww(t.substring(1),e)}:Xr[n]?t.length>1?{type:Xr[n],data:t.substring(1)}:{type:Xr[n]}:Ss},Ww=(t,e)=>{if(Hw){const n=jw(t);return ph(n,e)}else return{base64:!0,data:t}},ph=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},mh="",Kw=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{Ts(o,!1,a=>{r[s]=a,++i===n&&e(r.join(mh))})})},qw=(t,e)=>{const n=t.split(mh),r=[];for(let i=0;i<n.length;i++){const o=Ps(n[i],e);if(r.push(o),o.type==="error")break}return r};function Yw(){return new TransformStream({transform(t,e){zw(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let Is;function Zr(t){return t.reduce((e,n)=>e+n.length,0)}function Jr(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function Gw(t,e){Is||(Is=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Zr(n)<1)break;const c=Jr(n,1);o=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Zr(n)<2)break;const c=Jr(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Zr(n)<8)break;const c=Jr(n,8),h=new DataView(c.buffer,c.byteOffset,c.length),l=h.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(Ss);break}i=l*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Zr(n)<i)break;const c=Jr(n,i);a.enqueue(Ps(o?c:Is.decode(c),e)),r=0}if(i===0||i>t){a.enqueue(Ss);break}}}})}const gh=4;function vt(t){if(t)return Xw(t)}function Xw(t){for(var e in vt.prototype)t[e]=vt.prototype[e];return t}vt.prototype.on=vt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},vt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this},vt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},vt.prototype.emitReserved=vt.prototype.emit,vt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},vt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const zt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function yh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Zw=zt.setTimeout,Jw=zt.clearTimeout;function Qr(t,e){e.useNativeTimers?(t.setTimeoutFn=Zw.bind(zt),t.clearTimeoutFn=Jw.bind(zt)):(t.setTimeoutFn=zt.setTimeout.bind(zt),t.clearTimeoutFn=zt.clearTimeout.bind(zt))}const Qw=1.33;function tv(t){return typeof t=="string"?ev(t):Math.ceil((t.byteLength||t.size)*Qw)}function ev(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function nv(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function rv(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class iv extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Ms extends vt{constructor(e){super(),this.writable=!1,Qr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new iv(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=Ps(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=nv(e);return n.length?"?"+n:""}}const wh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Rs=64,ov={};let vh=0,ti=0,_h;function bh(t){let e="";do e=wh[t%Rs]+e,t=Math.floor(t/Rs);while(t>0);return e}function xh(){const t=bh(+new Date);return t!==_h?(vh=0,_h=t):t+"."+bh(vh++)}for(;ti<Rs;ti++)ov[wh[ti]]=ti;let Ch=!1;try{Ch=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const sv=Ch;function kh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||sv))return new XMLHttpRequest}catch{}if(!e)try{return new zt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function O_(){}function av(){}const cv=function(){return new kh({xdomain:!1}).responseType!=null}();class lv extends Ms{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=cv&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};qw(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Kw(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=xh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ne(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class ne extends vt{constructor(e,n){super(),Qr(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=yh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new kh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=ne.requestsCount++,ne.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=av,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ne.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(ne.requestsCount=0,ne.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Eh);else if(typeof addEventListener=="function"){const t="onpagehide"in zt?"pagehide":"unload";addEventListener(t,Eh,!1)}}function Eh(){for(let t in ne.requests)ne.requests.hasOwnProperty(t)&&ne.requests[t].abort()}var uv={},ei={};ei.byteLength=fv,ei.toByteArray=mv,ei.fromByteArray=wv;for(var re=[],jt=[],dv=typeof Uint8Array<"u"?Uint8Array:Array,Ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dn=0,hv=Ns.length;dn<hv;++dn)re[dn]=Ns[dn],jt[Ns.charCodeAt(dn)]=dn;jt[45]=62,jt[95]=63;function Sh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function fv(t){var e=Sh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function pv(t,e,n){return(e+n)*3/4-n}function mv(t){var e,n=Sh(t),r=n[0],i=n[1],o=new dv(pv(t,r,i)),s=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)e=jt[t.charCodeAt(c)]<<18|jt[t.charCodeAt(c+1)]<<12|jt[t.charCodeAt(c+2)]<<6|jt[t.charCodeAt(c+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=jt[t.charCodeAt(c)]<<2|jt[t.charCodeAt(c+1)]>>4,o[s++]=e&255),i===1&&(e=jt[t.charCodeAt(c)]<<10|jt[t.charCodeAt(c+1)]<<4|jt[t.charCodeAt(c+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function gv(t){return re[t>>18&63]+re[t>>12&63]+re[t>>6&63]+re[t&63]}function yv(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(gv(r));return i.join("")}function wv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(yv(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(re[e>>2]+re[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(re[e>>10]+re[e>>4&63]+re[e<<2&63]+"=")),i.join("")}var Ds={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ds.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,c=(1<<a)-1,h=c>>1,l=-7,f=n?i-1:0,m=n?-1:1,g=t[e+f];for(f+=m,o=g&(1<<-l)-1,g>>=-l,l+=a;l>0;o=o*256+t[e+f],f+=m,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=s*256+t[e+f],f+=m,l-=8);if(o===0)o=1-h;else{if(o===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-h}return(g?-1:1)*s*Math.pow(2,o-r)},Ds.write=function(t,e,n,r,i,o){var s,a,c,h=o*8-i-1,l=(1<<h)-1,f=l>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,_=r?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?e+=m/c:e+=m*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+g]=a&255,g+=_,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[n+g]=s&255,g+=_,s/=256,h-=8);t[n+g-_]|=v*128};/*!
101
101
  * The buffer module from node.js, for the browser.
102
102
  *
103
103
  * @author Feross Aboukhadijeh <https://feross.org>
104
104
  * @license MIT
105
- */(function(t){const e=ti,n=Rs,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;l.TYPED_ARRAY_SUPPORT=c(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const p=new o(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,o.prototype),Object.setPrototypeOf(p,u),p.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function h(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,l.prototype),u}function l(p,u,d){if(typeof p=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(p)}return f(p,u,d)}l.poolSize=8192;function f(p,u,d){if(typeof p=="string")return v(p,u);if(s.isView(p))return b(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(ct(p,s)||p&&ct(p.buffer,s)||typeof a<"u"&&(ct(p,a)||p&&ct(p.buffer,a)))return k(p,u,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return l.from(y,u,d);const C=E(p);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.from(p[Symbol.toPrimitive]("string"),u,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}l.from=function(p,u,d){return f(p,u,d)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,o);function m(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function g(p,u,d){return m(p),p<=0?h(p):u!==void 0?typeof d=="string"?h(p).fill(u,d):h(p).fill(u):h(p)}l.alloc=function(p,u,d){return g(p,u,d)};function _(p){return m(p),h(p<0?0:I(p)|0)}l.allocUnsafe=function(p){return _(p)},l.allocUnsafeSlow=function(p){return _(p)};function v(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!l.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const d=R(p,u)|0;let y=h(d);const C=y.write(p,u);return C!==d&&(y=y.slice(0,C)),y}function x(p){const u=p.length<0?0:I(p.length)|0,d=h(u);for(let y=0;y<u;y+=1)d[y]=p[y]&255;return d}function b(p){if(ct(p,o)){const u=new o(p);return k(u.buffer,u.byteOffset,u.byteLength)}return x(p)}function k(p,u,d){if(u<0||p.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<u+(d||0))throw new RangeError('"length" is outside of buffer bounds');let y;return u===void 0&&d===void 0?y=new o(p):d===void 0?y=new o(p,u):y=new o(p,u,d),Object.setPrototypeOf(y,l.prototype),y}function E(p){if(l.isBuffer(p)){const u=I(p.length)|0,d=h(u);return d.length===0||p.copy(d,0,0,u),d}if(p.length!==void 0)return typeof p.length!="number"||he(p.length)?h(0):x(p);if(p.type==="Buffer"&&Array.isArray(p.data))return x(p.data)}function I(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function T(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==l.prototype},l.compare=function(u,d){if(ct(u,o)&&(u=l.from(u,u.offset,u.byteLength)),ct(d,o)&&(d=l.from(d,d.offset,d.byteLength)),!l.isBuffer(u)||!l.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===d)return 0;let y=u.length,C=d.length;for(let S=0,A=Math.min(y,C);S<A;++S)if(u[S]!==d[S]){y=u[S],C=d[S];break}return y<C?-1:C<y?1:0},l.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(u,d){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return l.alloc(0);let y;if(d===void 0)for(d=0,y=0;y<u.length;++y)d+=u[y].length;const C=l.allocUnsafe(d);let S=0;for(y=0;y<u.length;++y){let A=u[y];if(ct(A,o))S+A.length>C.length?(l.isBuffer(A)||(A=l.from(A)),A.copy(C,S)):o.prototype.set.call(C,A,S);else if(l.isBuffer(A))A.copy(C,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=A.length}return C};function R(p,u){if(l.isBuffer(p))return p.length;if(s.isView(p)||ct(p,s))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const d=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let C=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return ir(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Ct(p).length;default:if(C)return y?-1:ir(p).length;u=(""+u).toLowerCase(),C=!0}}l.byteLength=R;function N(p,u,d){let y=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,u>>>=0,d<=u))return"";for(p||(p="utf8");;)switch(p){case"hex":return Gt(this,u,d);case"utf8":case"utf-8":return z(this,u,d);case"ascii":return Ht(this,u,d);case"latin1":case"binary":return q(this,u,d);case"base64":return ut(this,u,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ii(this,u,d);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}l.prototype._isBuffer=!0;function P(p,u,d){const y=p[u];p[u]=p[d],p[d]=y}l.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<u;d+=2)P(this,d,d+1);return this},l.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<u;d+=4)P(this,d,d+3),P(this,d+1,d+2);return this},l.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<u;d+=8)P(this,d,d+7),P(this,d+1,d+6),P(this,d+2,d+5),P(this,d+3,d+4);return this},l.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?z(this,0,u):N.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(u){if(!l.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:l.compare(this,u)===0},l.prototype.inspect=function(){let u="";const d=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(u+=" ... "),"<Buffer "+u+">"},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(u,d,y,C,S){if(ct(u,o)&&(u=l.from(u,u.offset,u.byteLength)),!l.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(d===void 0&&(d=0),y===void 0&&(y=u?u.length:0),C===void 0&&(C=0),S===void 0&&(S=this.length),d<0||y>u.length||C<0||S>this.length)throw new RangeError("out of range index");if(C>=S&&d>=y)return 0;if(C>=S)return-1;if(d>=y)return 1;if(d>>>=0,y>>>=0,C>>>=0,S>>>=0,this===u)return 0;let A=S-C,H=y-d;const dt=Math.min(A,H),it=this.slice(C,S),ht=u.slice(d,y);for(let Z=0;Z<dt;++Z)if(it[Z]!==ht[Z]){A=it[Z],H=ht[Z];break}return A<H?-1:H<A?1:0};function M(p,u,d,y,C){if(p.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,he(d)&&(d=C?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(C)return-1;d=p.length-1}else if(d<0)if(C)d=0;else return-1;if(typeof u=="string"&&(u=l.from(u,y)),l.isBuffer(u))return u.length===0?-1:D(p,u,d,y,C);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?C?o.prototype.indexOf.call(p,u,d):o.prototype.lastIndexOf.call(p,u,d):D(p,[u],d,y,C);throw new TypeError("val must be string, number or Buffer")}function D(p,u,d,y,C){let S=1,A=p.length,H=u.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||u.length<2)return-1;S=2,A/=2,H/=2,d/=2}function dt(ht,Z){return S===1?ht[Z]:ht.readUInt16BE(Z*S)}let it;if(C){let ht=-1;for(it=d;it<A;it++)if(dt(p,it)===dt(u,ht===-1?0:it-ht)){if(ht===-1&&(ht=it),it-ht+1===H)return ht*S}else ht!==-1&&(it-=it-ht),ht=-1}else for(d+H>A&&(d=A-H),it=d;it>=0;it--){let ht=!0;for(let Z=0;Z<H;Z++)if(dt(p,it+Z)!==dt(u,Z)){ht=!1;break}if(ht)return it}return-1}l.prototype.includes=function(u,d,y){return this.indexOf(u,d,y)!==-1},l.prototype.indexOf=function(u,d,y){return M(this,u,d,y,!0)},l.prototype.lastIndexOf=function(u,d,y){return M(this,u,d,y,!1)};function O(p,u,d,y){d=Number(d)||0;const C=p.length-d;y?(y=Number(y),y>C&&(y=C)):y=C;const S=u.length;y>S/2&&(y=S/2);let A;for(A=0;A<y;++A){const H=parseInt(u.substr(A*2,2),16);if(he(H))return A;p[d+A]=H}return A}function J(p,u,d,y){return It(ir(u,p.length-d),p,d,y)}function at(p,u,d,y){return It(L(u),p,d,y)}function Tt(p,u,d,y){return It(Ct(u),p,d,y)}function $(p,u,d,y){return It(Q(u,p.length-d),p,d,y)}l.prototype.write=function(u,d,y,C){if(d===void 0)C="utf8",y=this.length,d=0;else if(y===void 0&&typeof d=="string")C=d,y=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(y)?(y=y>>>0,C===void 0&&(C="utf8")):(C=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-d;if((y===void 0||y>S)&&(y=S),u.length>0&&(y<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let A=!1;for(;;)switch(C){case"hex":return O(this,u,d,y);case"utf8":case"utf-8":return J(this,u,d,y);case"ascii":case"latin1":case"binary":return at(this,u,d,y);case"base64":return Tt(this,u,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,u,d,y);default:if(A)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),A=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ut(p,u,d){return u===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,d))}function z(p,u,d){d=Math.min(p.length,d);const y=[];let C=u;for(;C<d;){const S=p[C];let A=null,H=S>239?4:S>223?3:S>191?2:1;if(C+H<=d){let dt,it,ht,Z;switch(H){case 1:S<128&&(A=S);break;case 2:dt=p[C+1],(dt&192)===128&&(Z=(S&31)<<6|dt&63,Z>127&&(A=Z));break;case 3:dt=p[C+1],it=p[C+2],(dt&192)===128&&(it&192)===128&&(Z=(S&15)<<12|(dt&63)<<6|it&63,Z>2047&&(Z<55296||Z>57343)&&(A=Z));break;case 4:dt=p[C+1],it=p[C+2],ht=p[C+3],(dt&192)===128&&(it&192)===128&&(ht&192)===128&&(Z=(S&15)<<18|(dt&63)<<12|(it&63)<<6|ht&63,Z>65535&&Z<1114112&&(A=Z))}}A===null?(A=65533,H=1):A>65535&&(A-=65536,y.push(A>>>10&1023|55296),A=56320|A&1023),y.push(A),C+=H}return Ot(y)}const nt=4096;function Ot(p){const u=p.length;if(u<=nt)return String.fromCharCode.apply(String,p);let d="",y=0;for(;y<u;)d+=String.fromCharCode.apply(String,p.slice(y,y+=nt));return d}function Ht(p,u,d){let y="";d=Math.min(p.length,d);for(let C=u;C<d;++C)y+=String.fromCharCode(p[C]&127);return y}function q(p,u,d){let y="";d=Math.min(p.length,d);for(let C=u;C<d;++C)y+=String.fromCharCode(p[C]);return y}function Gt(p,u,d){const y=p.length;(!u||u<0)&&(u=0),(!d||d<0||d>y)&&(d=y);let C="";for(let S=u;S<d;++S)C+=gn[p[S]];return C}function ii(p,u,d){const y=p.slice(u,d);let C="";for(let S=0;S<y.length-1;S+=2)C+=String.fromCharCode(y[S]+y[S+1]*256);return C}l.prototype.slice=function(u,d){const y=this.length;u=~~u,d=d===void 0?y:~~d,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),d<0?(d+=y,d<0&&(d=0)):d>y&&(d=y),d<u&&(d=u);const C=this.subarray(u,d);return Object.setPrototypeOf(C,l.prototype),C};function mt(p,u,d){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+u>d)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=this[u],S=1,A=0;for(;++A<d&&(S*=256);)C+=this[u+A]*S;return C},l.prototype.readUintBE=l.prototype.readUIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=this[u+--d],S=1;for(;d>0&&(S*=256);)C+=this[u+--d]*S;return C},l.prototype.readUint8=l.prototype.readUInt8=function(u,d){return u=u>>>0,d||mt(u,1,this.length),this[u]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(u,d){return u=u>>>0,d||mt(u,2,this.length),this[u]|this[u+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(u,d){return u=u>>>0,d||mt(u,2,this.length),this[u]<<8|this[u+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},l.prototype.readBigUInt64LE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,S=this[++u]+this[++u]*2**8+this[++u]*2**16+y*2**24;return BigInt(C)+(BigInt(S)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=d*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],S=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y;return(BigInt(C)<<BigInt(32))+BigInt(S)}),l.prototype.readIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=this[u],S=1,A=0;for(;++A<d&&(S*=256);)C+=this[u+A]*S;return S*=128,C>=S&&(C-=Math.pow(2,8*d)),C},l.prototype.readIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=d,S=1,A=this[u+--C];for(;C>0&&(S*=256);)A+=this[u+--C]*S;return S*=128,A>=S&&(A-=Math.pow(2,8*d)),A},l.prototype.readInt8=function(u,d){return u=u>>>0,d||mt(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},l.prototype.readInt16LE=function(u,d){u=u>>>0,d||mt(u,2,this.length);const y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},l.prototype.readInt16BE=function(u,d){u=u>>>0,d||mt(u,2,this.length);const y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},l.prototype.readInt32LE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},l.prototype.readInt32BE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},l.prototype.readBigInt64LE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(y<<24);return(BigInt(C)<<BigInt(32))+BigInt(d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),l.prototype.readBigInt64BE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=(d<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(C)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y)}),l.prototype.readFloatLE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),n.read(this,u,!0,23,4)},l.prototype.readFloatBE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),n.read(this,u,!1,23,4)},l.prototype.readDoubleLE=function(u,d){return u=u>>>0,d||mt(u,8,this.length),n.read(this,u,!0,52,8)},l.prototype.readDoubleBE=function(u,d){return u=u>>>0,d||mt(u,8,this.length),n.read(this,u,!1,52,8)};function bt(p,u,d,y,C,S){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>C||u<S)throw new RangeError('"value" argument is out of bounds');if(d+y>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(u,d,y,C){if(u=+u,d=d>>>0,y=y>>>0,!C){const H=Math.pow(2,8*y)-1;bt(this,u,d,y,H,0)}let S=1,A=0;for(this[d]=u&255;++A<y&&(S*=256);)this[d+A]=u/S&255;return d+y},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(u,d,y,C){if(u=+u,d=d>>>0,y=y>>>0,!C){const H=Math.pow(2,8*y)-1;bt(this,u,d,y,H,0)}let S=y-1,A=1;for(this[d+S]=u&255;--S>=0&&(A*=256);)this[d+S]=u/A&255;return d+y},l.prototype.writeUint8=l.prototype.writeUInt8=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,1,255,0),this[d]=u&255,d+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,65535,0),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,65535,0),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,4294967295,0),this[d+3]=u>>>24,this[d+2]=u>>>16,this[d+1]=u>>>8,this[d]=u&255,d+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,4294967295,0),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4};function Fe(p,u,d,y,C){_e(u,y,C,p,d,7);let S=Number(u&BigInt(4294967295));p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S;let A=Number(u>>BigInt(32)&BigInt(4294967295));return p[d++]=A,A=A>>8,p[d++]=A,A=A>>8,p[d++]=A,A=A>>8,p[d++]=A,d}function we(p,u,d,y,C){_e(u,y,C,p,d,7);let S=Number(u&BigInt(4294967295));p[d+7]=S,S=S>>8,p[d+6]=S,S=S>>8,p[d+5]=S,S=S>>8,p[d+4]=S;let A=Number(u>>BigInt(32)&BigInt(4294967295));return p[d+3]=A,A=A>>8,p[d+2]=A,A=A>>8,p[d+1]=A,A=A>>8,p[d]=A,d+8}l.prototype.writeBigUInt64LE=Ft(function(u,d=0){return Fe(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ft(function(u,d=0){return we(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(u,d,y,C){if(u=+u,d=d>>>0,!C){const dt=Math.pow(2,8*y-1);bt(this,u,d,y,dt-1,-dt)}let S=0,A=1,H=0;for(this[d]=u&255;++S<y&&(A*=256);)u<0&&H===0&&this[d+S-1]!==0&&(H=1),this[d+S]=(u/A>>0)-H&255;return d+y},l.prototype.writeIntBE=function(u,d,y,C){if(u=+u,d=d>>>0,!C){const dt=Math.pow(2,8*y-1);bt(this,u,d,y,dt-1,-dt)}let S=y-1,A=1,H=0;for(this[d+S]=u&255;--S>=0&&(A*=256);)u<0&&H===0&&this[d+S+1]!==0&&(H=1),this[d+S]=(u/A>>0)-H&255;return d+y},l.prototype.writeInt8=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,1,127,-128),u<0&&(u=255+u+1),this[d]=u&255,d+1},l.prototype.writeInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,32767,-32768),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,32767,-32768),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,2147483647,-2147483648),this[d]=u&255,this[d+1]=u>>>8,this[d+2]=u>>>16,this[d+3]=u>>>24,d+4},l.prototype.writeInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4},l.prototype.writeBigInt64LE=Ft(function(u,d=0){return Fe(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ft(function(u,d=0){return we(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fn(p,u,d,y,C,S){if(d+y>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function rr(p,u,d,y,C){return u=+u,d=d>>>0,C||fn(p,u,d,4),n.write(p,u,d,y,23,4),d+4}l.prototype.writeFloatLE=function(u,d,y){return rr(this,u,d,!0,y)},l.prototype.writeFloatBE=function(u,d,y){return rr(this,u,d,!1,y)};function pn(p,u,d,y,C){return u=+u,d=d>>>0,C||fn(p,u,d,8),n.write(p,u,d,y,52,8),d+8}l.prototype.writeDoubleLE=function(u,d,y){return pn(this,u,d,!0,y)},l.prototype.writeDoubleBE=function(u,d,y){return pn(this,u,d,!1,y)},l.prototype.copy=function(u,d,y,C){if(!l.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!C&&C!==0&&(C=this.length),d>=u.length&&(d=u.length),d||(d=0),C>0&&C<y&&(C=y),C===y||u.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),u.length-d<C-y&&(C=u.length-d+y);const S=C-y;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,y,C):o.prototype.set.call(u,this.subarray(y,C),d),S},l.prototype.fill=function(u,d,y,C){if(typeof u=="string"){if(typeof d=="string"?(C=d,d=0,y=this.length):typeof y=="string"&&(C=y,y=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!l.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(u.length===1){const A=u.charCodeAt(0);(C==="utf8"&&A<128||C==="latin1")&&(u=A)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(d<0||this.length<d||this.length<y)throw new RangeError("Out of range index");if(y<=d)return this;d=d>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);let S;if(typeof u=="number")for(S=d;S<y;++S)this[S]=u;else{const A=l.isBuffer(u)?u:l.from(u,C),H=A.length;if(H===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(S=0;S<y-d;++S)this[S+d]=A[S%H]}return this};const ve={};function mn(p,u,d){ve[p]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}mn("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mn("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),mn("ERR_OUT_OF_RANGE",function(p,u,d){let y=`The value of "${p}" is out of range.`,C=d;return Number.isInteger(d)&&Math.abs(d)>2**32?C=oi(String(d)):typeof d=="bigint"&&(C=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(C=oi(C)),C+="n"),y+=` It must be ${u}. Received ${C}`,y},RangeError);function oi(p){let u="",d=p.length;const y=p[0]==="-"?1:0;for(;d>=y+4;d-=3)u=`_${p.slice(d-3,d)}${u}`;return`${p.slice(0,d)}${u}`}function zs(p,u,d){de(u,"offset"),(p[u]===void 0||p[u+d]===void 0)&&Ve(u,p.length-(d+1))}function _e(p,u,d,y,C,S){if(p>d||p<u){const A=typeof u=="bigint"?"n":"";let H;throw u===0||u===BigInt(0)?H=`>= 0${A} and < 2${A} ** ${(S+1)*8}${A}`:H=`>= -(2${A} ** ${(S+1)*8-1}${A}) and < 2 ** ${(S+1)*8-1}${A}`,new ve.ERR_OUT_OF_RANGE("value",H,p)}zs(y,C,S)}function de(p,u){if(typeof p!="number")throw new ve.ERR_INVALID_ARG_TYPE(u,"number",p)}function Ve(p,u,d){throw Math.floor(p)!==p?(de(p,d),new ve.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const si=/[^+/0-9A-Za-z-_]/g;function ai(p){if(p=p.split("=")[0],p=p.trim().replace(si,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function ir(p,u){u=u||1/0;let d;const y=p.length;let C=null;const S=[];for(let A=0;A<y;++A){if(d=p.charCodeAt(A),d>55295&&d<57344){if(!C){if(d>56319){(u-=3)>-1&&S.push(239,191,189);continue}else if(A+1===y){(u-=3)>-1&&S.push(239,191,189);continue}C=d;continue}if(d<56320){(u-=3)>-1&&S.push(239,191,189),C=d;continue}d=(C-55296<<10|d-56320)+65536}else C&&(u-=3)>-1&&S.push(239,191,189);if(C=null,d<128){if((u-=1)<0)break;S.push(d)}else if(d<2048){if((u-=2)<0)break;S.push(d>>6|192,d&63|128)}else if(d<65536){if((u-=3)<0)break;S.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((u-=4)<0)break;S.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return S}function L(p){const u=[];for(let d=0;d<p.length;++d)u.push(p.charCodeAt(d)&255);return u}function Q(p,u){let d,y,C;const S=[];for(let A=0;A<p.length&&!((u-=2)<0);++A)d=p.charCodeAt(A),y=d>>8,C=d%256,S.push(C),S.push(y);return S}function Ct(p){return e.toByteArray(ai(p))}function It(p,u,d,y){let C;for(C=0;C<y&&!(C+d>=u.length||C>=p.length);++C)u[C+d]=p[C];return C}function ct(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function he(p){return p!==p}const gn=function(){const p="0123456789abcdef",u=new Array(256);for(let d=0;d<16;++d){const y=d*16;for(let C=0;C<16;++C)u[y+C]=p[d]+p[C]}return u}();function Ft(p){return typeof BigInt>"u"?or:p}function or(){throw new Error("BigInt not supported")}})(sv);const Ns=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),ei=zt.WebSocket||zt.MozWebSocket,Sh=!0,mv="arraybuffer",Eh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class gv extends Ps{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=Eh?{}:mh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Sh&&!Eh?n?new ei(e,n):new ei(e):new ei(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;Ss(r,this.supportsBinary,o=>{const s={};try{Sh&&this.ws.send(o)}catch{}i&&Ns(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=_h()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!ei}}class yv extends Ps{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=Ww(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=Hw();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&Ns(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const wv={websocket:gv,webtransport:yv,polling:ov},vv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,_v=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ds(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=vv.exec(t||""),o={},s=14;for(;s--;)o[_v[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=bv(o,o.path),o.queryKey=xv(o,o.query),o}function bv(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function xv(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Th=class yn extends vt{constructor(e,n={}){super(),this.binaryType=mv,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Ds(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Ds(n.host).host),Jr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Qw(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=ph,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new wv[e](r)}open(){let e;if(this.opts.rememberUpgrade&&yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(l(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,l(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function c(){s("socket closed")}function h(f){n&&f.name!==n.name&&o()}const l=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",c),this.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",c),this.once("upgrading",h),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",yn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Xw(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){yn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};Th.protocol=ph;function Cv(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Ds(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const kv=typeof ArrayBuffer=="function",Sv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ah=Object.prototype.toString,Ev=typeof Blob=="function"||typeof Blob<"u"&&Ah.call(Blob)==="[object BlobConstructor]",Tv=typeof File=="function"||typeof File<"u"&&Ah.call(File)==="[object FileConstructor]";function Ls(t){return kv&&(t instanceof ArrayBuffer||Sv(t))||Ev&&t instanceof Blob||Tv&&t instanceof File}function ni(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(ni(t[n]))return!0;return!1}if(Ls(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ni(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ni(t[n]))return!0;return!1}function Av(t){const e=[],n=t.data,r=t;return r.data=Bs(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Bs(t,e){if(!t)return t;if(Ls(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=Bs(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=Bs(t[r],e));return n}return t}function Pv(t,e){return t.data=Os(t.data,e),delete t.attachments,t}function Os(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Os(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Os(t[n],e));return t}const Iv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Mv=5;var K;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(K||(K={}));class Rv{constructor(e){this.replacer=e}encode(e){return(e.type===K.EVENT||e.type===K.ACK)&&ni(e)?this.encodeAsBinary({type:e.type===K.EVENT?K.BINARY_EVENT:K.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===K.BINARY_EVENT||e.type===K.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=Av(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Ph(t){return Object.prototype.toString.call(t)==="[object Object]"}class Fs extends vt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===K.BINARY_EVENT;r||n.type===K.BINARY_ACK?(n.type=r?K.EVENT:K.ACK,this.reconstructor=new Nv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ls(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(K[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===K.BINARY_EVENT||r.type===K.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(Fs.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case K.CONNECT:return Ph(n);case K.DISCONNECT:return n===void 0;case K.CONNECT_ERROR:return typeof n=="string"||Ph(n);case K.EVENT:case K.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Iv.indexOf(n[0])===-1);case K.ACK:case K.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Nv{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=Pv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Dv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fs,Encoder:Rv,get PacketType(){return K},protocol:Mv},Symbol.toStringTag,{value:"Module"}));function Yt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Lv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ih extends vt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Yt(e,"open",this.onopen.bind(this)),Yt(e,"packet",this.onpacket.bind(this)),Yt(e,"error",this.onerror.bind(this)),Yt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(Lv.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:K.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:K.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case K.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case K.EVENT:case K.BINARY_EVENT:this.onevent(e);break;case K.ACK:case K.BINARY_ACK:this.onack(e);break;case K.DISCONNECT:this.ondisconnect();break;case K.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:K.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:K.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function hn(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}hn.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},hn.prototype.reset=function(){this.attempts=0},hn.prototype.setMin=function(t){this.ms=t},hn.prototype.setMax=function(t){this.max=t},hn.prototype.setJitter=function(t){this.jitter=t};class Vs extends vt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Jr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new hn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||Dv;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Th(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Yt(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=Yt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Yt(e,"ping",this.onping.bind(this)),Yt(e,"data",this.ondata.bind(this)),Yt(e,"error",this.onerror.bind(this)),Yt(e,"close",this.onclose.bind(this)),Yt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Ns(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Ih(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const tr={};function ri(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Cv(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=tr[i]&&o in tr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return a?c=new Vs(r,e):(tr[i]||(tr[i]=new Vs(r,e)),c=tr[i]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(ri,{Manager:Vs,Socket:Ih,io:ri,connect:ri});function Us(){return document.visibilityState==="visible"&&document.hasFocus()}const Bv=8e3,er=new Map;function Mh(t){const e=er.get(t);e&&(clearTimeout(e),er.delete(t)),G.getState().setThreadTyping(t,!1)}function Ov(t){G.getState().setThreadTyping(t.threadId,!0);const e=er.get(t.threadId);e&&clearTimeout(e),er.set(t.threadId,setTimeout(()=>{er.delete(t.threadId),G.getState().setThreadTyping(t.threadId,!1)},Bv))}function Fv(t){const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=G.getState(),o={support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis},s=e.find(a=>a.threadId===t.threadId);if(s&&zy(s.messages,o)){yt("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),Mh(t.threadId),(!r||!Us())&&i()}function Vv(t){const e=G.getState().setConversationOpen;e(t.threadId,!1),Mh(t.threadId)}function Uv(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=G.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,ad(t.csMember.displayName))}function $v(t){const{setConversationCSMember:e,addMessage:n}=G.getState();e(t.threadId,t.csMember),n(t.threadId,ad(t.csMember.displayName))}function zv(t){const{conversations:e,updateMessage:n}=G.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){yt("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){yt("⚠️ Message not found for update:",t.message.date);return}n(t.threadId,t.message.date,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,edited:!0,emojis:t.message.emojis})}function jv(t){const{conversations:e,removeMessage:n}=G.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){yt("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){yt("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function Hv(t){G.getState().setGuildSettings({onlineCsMembers:t.onlineCsMembers})}function Wv(t){return new Promise(e=>{const n=ri(Bt.domain,{path:"/socket"});n.on("new-support-message",Fv),n.on("updated-support-message",zv),n.on("deleted-support-message",jv),n.on("thread-closed",Vv),n.on("thread-assigned",Uv),n.on("thread-reassigned",$v),n.on("support-typing",Ov),n.on("presence-updated",Hv),n.on("connect",()=>{n.emit("identify",{jwt:t}),e(n)})})}async function Kv({name:t,email:e}){const n=JSON.stringify({guildId:Bt.app_id,name:t,email:e}),r=new Headers;r.append("Content-Type","application/json");const i={method:"POST",headers:r,body:n},s=await(await fetch(`${Bt.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Pe.set("discord-widget",s.token,{sameSite:"strict",secure:window.location.protocol==="https:"}),G.getState().setToken(s.token)),s}async function qv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/current`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).currentConversation??null}catch(n){return console.error("Error fetching current conversation",n),null}}async function Yv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/past`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).pastConversations??null}catch(n){return console.error("Error fetching past conversations",n),null}}async function Gv(t){return await Wv(t)}async function Xv(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=G.getState();try{const i=await qv(t);if(i)yt("✅ Found current conversation:",i.threadId),e(i);else{yt("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(yt("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{G.getState().setNetworkError("Failed to load conversation")}}async function Zv(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=G.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await Yv(t);a&&a.length>0?(yt(`✅ Loaded ${a.length} past conversations`),n(a)):yt("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function Jv(){const{username:t,email:e,setNetworkError:n,setLoading:r}=G.getState();try{r(!0),n(null);let i=Pe.get("discord-widget");i?yt("ℹ️ Returning user - JWT found in cookies"):(yt("ℹ️ New user - obtaining JWT token..."),i=(await Kv({name:t,email:e})).token,yt("✅ JWT token obtained")),await Gv(i),await Xv(i),yt("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const Qv="Customer support",t_="A team member will pick up this conversation shortly",e_="https://i.imgur.com/ecjl5HR.png",n_=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n,guildSettings:r}=G(),i=t.filter(c=>c.status==="open").length;U(()=>{const c=Pe.get("discord-widget");if(!c)return;const h=5*60*1e3;(!n||Date.now()-n>h)&&Zv(c)},[n]);function o(){return i!==0?null:w(Qt.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},onClick:()=>e("TEMP"),style:{background:"linear-gradient(135deg, var(--dc-primary), var(--dc-primary-mid))"},type:"button",className:"flex justify-center items-center w-full h-16 border-t border-gray-200",children:w("div",{className:`flex flex-row items-center transform transition-transform duration-150
106
- hover:scale-105 active:scale-95`,children:[w("span",{className:"text-sm text-slate-50 pr-3",children:"Send us a new message"}),w(Wg,{color:"#FFFFFF",size:18,strokeWidth:1})]})})}function s(c,h,l){var _,v;const f=c.messages[c.messages.length-1],m=c.status==="open",g=!(c!=null&&c.csMember)||c.csMember.displayName===Qv;return w("div",{className:`flex flex-row items-center px-3 py-4 hover:bg-gray-200 cursor-pointer ${l?"":"border-b border-gray-200 "}`,onClick:()=>e(c.threadId),children:[w("div",{className:"relative inline-block mr-3",children:[w("img",{className:"inline-block size-[32px] rounded-full",src:g?(r==null?void 0:r.iconURL)||e_:c.csMember.displayAvatarURL}),!g&&((_=c==null?void 0:c.csMember)==null?void 0:_.status)&&w("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-1 ring-white dark:ring-neutral-900 ${Cs(c.csMember.status,"bg")}`})]}),w("div",{className:"flex flex-1 flex-col",children:[w("p",{className:`text-sm/3 ${m?"font-semibold":""}`,children:g?t_:(v=c==null?void 0:c.csMember)==null?void 0:v.displayName}),w("p",{className:"text-xs text-gray-500 line-clamp-1",children:f.content})]}),w("div",{className:"ml-2",children:w("p",{className:"text-xs text-gray-500",children:ld(f.date)})})]},`conversation-${h}`)}function a(){const c=[...t].filter(f=>f.status==="open"),h=[...t].filter(f=>f.status==="closed"),l=f=>f.sort((m,g)=>g.lastMessageDate-m.lastMessageDate).map((m,g)=>m.messages.length?s(m,g,g+1===f.length):null);return w(Qt.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col flex-1 p-2 overflow-y-auto",children:[c.length>0&&w("div",{className:"mb-2",children:[w("span",{className:"text-sm",children:"Current conversation"}),l(c)]}),h.length>0&&w(tt,{children:[w("span",{className:"text-sm",children:"Closed messages"}),l(h)]})]})}return w("div",{className:"flex flex-col flex-1 overflow-auto",children:[a(),o()]})},Rh=({IconComponent:t,onClick:e})=>w("button",{onClick:e,className:`flex mr-2 items-center justify-center w-8 h-8
105
+ */(function(t){const e=ei,n=Ds,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;l.TYPED_ARRAY_SUPPORT=c(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const p=new o(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,o.prototype),Object.setPrototypeOf(p,u),p.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function h(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,l.prototype),u}function l(p,u,d){if(typeof p=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(p)}return f(p,u,d)}l.poolSize=8192;function f(p,u,d){if(typeof p=="string")return v(p,u);if(s.isView(p))return b(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(ct(p,s)||p&&ct(p.buffer,s)||typeof a<"u"&&(ct(p,a)||p&&ct(p.buffer,a)))return k(p,u,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return l.from(y,u,d);const C=S(p);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.from(p[Symbol.toPrimitive]("string"),u,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}l.from=function(p,u,d){return f(p,u,d)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,o);function m(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function g(p,u,d){return m(p),p<=0?h(p):u!==void 0?typeof d=="string"?h(p).fill(u,d):h(p).fill(u):h(p)}l.alloc=function(p,u,d){return g(p,u,d)};function _(p){return m(p),h(p<0?0:M(p)|0)}l.allocUnsafe=function(p){return _(p)},l.allocUnsafeSlow=function(p){return _(p)};function v(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!l.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const d=R(p,u)|0;let y=h(d);const C=y.write(p,u);return C!==d&&(y=y.slice(0,C)),y}function x(p){const u=p.length<0?0:M(p.length)|0,d=h(u);for(let y=0;y<u;y+=1)d[y]=p[y]&255;return d}function b(p){if(ct(p,o)){const u=new o(p);return k(u.buffer,u.byteOffset,u.byteLength)}return x(p)}function k(p,u,d){if(u<0||p.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<u+(d||0))throw new RangeError('"length" is outside of buffer bounds');let y;return u===void 0&&d===void 0?y=new o(p):d===void 0?y=new o(p,u):y=new o(p,u,d),Object.setPrototypeOf(y,l.prototype),y}function S(p){if(l.isBuffer(p)){const u=M(p.length)|0,d=h(u);return d.length===0||p.copy(d,0,0,u),d}if(p.length!==void 0)return typeof p.length!="number"||he(p.length)?h(0):x(p);if(p.type==="Buffer"&&Array.isArray(p.data))return x(p.data)}function M(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function T(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==l.prototype},l.compare=function(u,d){if(ct(u,o)&&(u=l.from(u,u.offset,u.byteLength)),ct(d,o)&&(d=l.from(d,d.offset,d.byteLength)),!l.isBuffer(u)||!l.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===d)return 0;let y=u.length,C=d.length;for(let E=0,A=Math.min(y,C);E<A;++E)if(u[E]!==d[E]){y=u[E],C=d[E];break}return y<C?-1:C<y?1:0},l.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(u,d){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return l.alloc(0);let y;if(d===void 0)for(d=0,y=0;y<u.length;++y)d+=u[y].length;const C=l.allocUnsafe(d);let E=0;for(y=0;y<u.length;++y){let A=u[y];if(ct(A,o))E+A.length>C.length?(l.isBuffer(A)||(A=l.from(A)),A.copy(C,E)):o.prototype.set.call(C,A,E);else if(l.isBuffer(A))A.copy(C,E);else throw new TypeError('"list" argument must be an Array of Buffers');E+=A.length}return C};function R(p,u){if(l.isBuffer(p))return p.length;if(s.isView(p)||ct(p,s))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const d=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let C=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return ir(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Ct(p).length;default:if(C)return y?-1:ir(p).length;u=(""+u).toLowerCase(),C=!0}}l.byteLength=R;function N(p,u,d){let y=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,u>>>=0,d<=u))return"";for(p||(p="utf8");;)switch(p){case"hex":return Gt(this,u,d);case"utf8":case"utf-8":return z(this,u,d);case"ascii":return Ht(this,u,d);case"latin1":case"binary":return q(this,u,d);case"base64":return ut(this,u,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oi(this,u,d);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}l.prototype._isBuffer=!0;function P(p,u,d){const y=p[u];p[u]=p[d],p[d]=y}l.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<u;d+=2)P(this,d,d+1);return this},l.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<u;d+=4)P(this,d,d+3),P(this,d+1,d+2);return this},l.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<u;d+=8)P(this,d,d+7),P(this,d+1,d+6),P(this,d+2,d+5),P(this,d+3,d+4);return this},l.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?z(this,0,u):N.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(u){if(!l.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:l.compare(this,u)===0},l.prototype.inspect=function(){let u="";const d=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(u+=" ... "),"<Buffer "+u+">"},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(u,d,y,C,E){if(ct(u,o)&&(u=l.from(u,u.offset,u.byteLength)),!l.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(d===void 0&&(d=0),y===void 0&&(y=u?u.length:0),C===void 0&&(C=0),E===void 0&&(E=this.length),d<0||y>u.length||C<0||E>this.length)throw new RangeError("out of range index");if(C>=E&&d>=y)return 0;if(C>=E)return-1;if(d>=y)return 1;if(d>>>=0,y>>>=0,C>>>=0,E>>>=0,this===u)return 0;let A=E-C,H=y-d;const dt=Math.min(A,H),it=this.slice(C,E),ht=u.slice(d,y);for(let Z=0;Z<dt;++Z)if(it[Z]!==ht[Z]){A=it[Z],H=ht[Z];break}return A<H?-1:H<A?1:0};function I(p,u,d,y,C){if(p.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,he(d)&&(d=C?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(C)return-1;d=p.length-1}else if(d<0)if(C)d=0;else return-1;if(typeof u=="string"&&(u=l.from(u,y)),l.isBuffer(u))return u.length===0?-1:D(p,u,d,y,C);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?C?o.prototype.indexOf.call(p,u,d):o.prototype.lastIndexOf.call(p,u,d):D(p,[u],d,y,C);throw new TypeError("val must be string, number or Buffer")}function D(p,u,d,y,C){let E=1,A=p.length,H=u.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||u.length<2)return-1;E=2,A/=2,H/=2,d/=2}function dt(ht,Z){return E===1?ht[Z]:ht.readUInt16BE(Z*E)}let it;if(C){let ht=-1;for(it=d;it<A;it++)if(dt(p,it)===dt(u,ht===-1?0:it-ht)){if(ht===-1&&(ht=it),it-ht+1===H)return ht*E}else ht!==-1&&(it-=it-ht),ht=-1}else for(d+H>A&&(d=A-H),it=d;it>=0;it--){let ht=!0;for(let Z=0;Z<H;Z++)if(dt(p,it+Z)!==dt(u,Z)){ht=!1;break}if(ht)return it}return-1}l.prototype.includes=function(u,d,y){return this.indexOf(u,d,y)!==-1},l.prototype.indexOf=function(u,d,y){return I(this,u,d,y,!0)},l.prototype.lastIndexOf=function(u,d,y){return I(this,u,d,y,!1)};function O(p,u,d,y){d=Number(d)||0;const C=p.length-d;y?(y=Number(y),y>C&&(y=C)):y=C;const E=u.length;y>E/2&&(y=E/2);let A;for(A=0;A<y;++A){const H=parseInt(u.substr(A*2,2),16);if(he(H))return A;p[d+A]=H}return A}function J(p,u,d,y){return It(ir(u,p.length-d),p,d,y)}function at(p,u,d,y){return It(L(u),p,d,y)}function Tt(p,u,d,y){return It(Ct(u),p,d,y)}function $(p,u,d,y){return It(Q(u,p.length-d),p,d,y)}l.prototype.write=function(u,d,y,C){if(d===void 0)C="utf8",y=this.length,d=0;else if(y===void 0&&typeof d=="string")C=d,y=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(y)?(y=y>>>0,C===void 0&&(C="utf8")):(C=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const E=this.length-d;if((y===void 0||y>E)&&(y=E),u.length>0&&(y<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let A=!1;for(;;)switch(C){case"hex":return O(this,u,d,y);case"utf8":case"utf-8":return J(this,u,d,y);case"ascii":case"latin1":case"binary":return at(this,u,d,y);case"base64":return Tt(this,u,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,u,d,y);default:if(A)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),A=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ut(p,u,d){return u===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,d))}function z(p,u,d){d=Math.min(p.length,d);const y=[];let C=u;for(;C<d;){const E=p[C];let A=null,H=E>239?4:E>223?3:E>191?2:1;if(C+H<=d){let dt,it,ht,Z;switch(H){case 1:E<128&&(A=E);break;case 2:dt=p[C+1],(dt&192)===128&&(Z=(E&31)<<6|dt&63,Z>127&&(A=Z));break;case 3:dt=p[C+1],it=p[C+2],(dt&192)===128&&(it&192)===128&&(Z=(E&15)<<12|(dt&63)<<6|it&63,Z>2047&&(Z<55296||Z>57343)&&(A=Z));break;case 4:dt=p[C+1],it=p[C+2],ht=p[C+3],(dt&192)===128&&(it&192)===128&&(ht&192)===128&&(Z=(E&15)<<18|(dt&63)<<12|(it&63)<<6|ht&63,Z>65535&&Z<1114112&&(A=Z))}}A===null?(A=65533,H=1):A>65535&&(A-=65536,y.push(A>>>10&1023|55296),A=56320|A&1023),y.push(A),C+=H}return Ot(y)}const nt=4096;function Ot(p){const u=p.length;if(u<=nt)return String.fromCharCode.apply(String,p);let d="",y=0;for(;y<u;)d+=String.fromCharCode.apply(String,p.slice(y,y+=nt));return d}function Ht(p,u,d){let y="";d=Math.min(p.length,d);for(let C=u;C<d;++C)y+=String.fromCharCode(p[C]&127);return y}function q(p,u,d){let y="";d=Math.min(p.length,d);for(let C=u;C<d;++C)y+=String.fromCharCode(p[C]);return y}function Gt(p,u,d){const y=p.length;(!u||u<0)&&(u=0),(!d||d<0||d>y)&&(d=y);let C="";for(let E=u;E<d;++E)C+=gn[p[E]];return C}function oi(p,u,d){const y=p.slice(u,d);let C="";for(let E=0;E<y.length-1;E+=2)C+=String.fromCharCode(y[E]+y[E+1]*256);return C}l.prototype.slice=function(u,d){const y=this.length;u=~~u,d=d===void 0?y:~~d,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),d<0?(d+=y,d<0&&(d=0)):d>y&&(d=y),d<u&&(d=u);const C=this.subarray(u,d);return Object.setPrototypeOf(C,l.prototype),C};function mt(p,u,d){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+u>d)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=this[u],E=1,A=0;for(;++A<d&&(E*=256);)C+=this[u+A]*E;return C},l.prototype.readUintBE=l.prototype.readUIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=this[u+--d],E=1;for(;d>0&&(E*=256);)C+=this[u+--d]*E;return C},l.prototype.readUint8=l.prototype.readUInt8=function(u,d){return u=u>>>0,d||mt(u,1,this.length),this[u]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(u,d){return u=u>>>0,d||mt(u,2,this.length),this[u]|this[u+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(u,d){return u=u>>>0,d||mt(u,2,this.length),this[u]<<8|this[u+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},l.prototype.readBigUInt64LE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,E=this[++u]+this[++u]*2**8+this[++u]*2**16+y*2**24;return BigInt(C)+(BigInt(E)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=d*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],E=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y;return(BigInt(C)<<BigInt(32))+BigInt(E)}),l.prototype.readIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=this[u],E=1,A=0;for(;++A<d&&(E*=256);)C+=this[u+A]*E;return E*=128,C>=E&&(C-=Math.pow(2,8*d)),C},l.prototype.readIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||mt(u,d,this.length);let C=d,E=1,A=this[u+--C];for(;C>0&&(E*=256);)A+=this[u+--C]*E;return E*=128,A>=E&&(A-=Math.pow(2,8*d)),A},l.prototype.readInt8=function(u,d){return u=u>>>0,d||mt(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},l.prototype.readInt16LE=function(u,d){u=u>>>0,d||mt(u,2,this.length);const y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},l.prototype.readInt16BE=function(u,d){u=u>>>0,d||mt(u,2,this.length);const y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},l.prototype.readInt32LE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},l.prototype.readInt32BE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},l.prototype.readBigInt64LE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(y<<24);return(BigInt(C)<<BigInt(32))+BigInt(d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),l.prototype.readBigInt64BE=Ft(function(u){u=u>>>0,de(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const C=(d<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(C)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y)}),l.prototype.readFloatLE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),n.read(this,u,!0,23,4)},l.prototype.readFloatBE=function(u,d){return u=u>>>0,d||mt(u,4,this.length),n.read(this,u,!1,23,4)},l.prototype.readDoubleLE=function(u,d){return u=u>>>0,d||mt(u,8,this.length),n.read(this,u,!0,52,8)},l.prototype.readDoubleBE=function(u,d){return u=u>>>0,d||mt(u,8,this.length),n.read(this,u,!1,52,8)};function bt(p,u,d,y,C,E){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>C||u<E)throw new RangeError('"value" argument is out of bounds');if(d+y>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(u,d,y,C){if(u=+u,d=d>>>0,y=y>>>0,!C){const H=Math.pow(2,8*y)-1;bt(this,u,d,y,H,0)}let E=1,A=0;for(this[d]=u&255;++A<y&&(E*=256);)this[d+A]=u/E&255;return d+y},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(u,d,y,C){if(u=+u,d=d>>>0,y=y>>>0,!C){const H=Math.pow(2,8*y)-1;bt(this,u,d,y,H,0)}let E=y-1,A=1;for(this[d+E]=u&255;--E>=0&&(A*=256);)this[d+E]=u/A&255;return d+y},l.prototype.writeUint8=l.prototype.writeUInt8=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,1,255,0),this[d]=u&255,d+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,65535,0),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,65535,0),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,4294967295,0),this[d+3]=u>>>24,this[d+2]=u>>>16,this[d+1]=u>>>8,this[d]=u&255,d+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,4294967295,0),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4};function Fe(p,u,d,y,C){_e(u,y,C,p,d,7);let E=Number(u&BigInt(4294967295));p[d++]=E,E=E>>8,p[d++]=E,E=E>>8,p[d++]=E,E=E>>8,p[d++]=E;let A=Number(u>>BigInt(32)&BigInt(4294967295));return p[d++]=A,A=A>>8,p[d++]=A,A=A>>8,p[d++]=A,A=A>>8,p[d++]=A,d}function we(p,u,d,y,C){_e(u,y,C,p,d,7);let E=Number(u&BigInt(4294967295));p[d+7]=E,E=E>>8,p[d+6]=E,E=E>>8,p[d+5]=E,E=E>>8,p[d+4]=E;let A=Number(u>>BigInt(32)&BigInt(4294967295));return p[d+3]=A,A=A>>8,p[d+2]=A,A=A>>8,p[d+1]=A,A=A>>8,p[d]=A,d+8}l.prototype.writeBigUInt64LE=Ft(function(u,d=0){return Fe(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ft(function(u,d=0){return we(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(u,d,y,C){if(u=+u,d=d>>>0,!C){const dt=Math.pow(2,8*y-1);bt(this,u,d,y,dt-1,-dt)}let E=0,A=1,H=0;for(this[d]=u&255;++E<y&&(A*=256);)u<0&&H===0&&this[d+E-1]!==0&&(H=1),this[d+E]=(u/A>>0)-H&255;return d+y},l.prototype.writeIntBE=function(u,d,y,C){if(u=+u,d=d>>>0,!C){const dt=Math.pow(2,8*y-1);bt(this,u,d,y,dt-1,-dt)}let E=y-1,A=1,H=0;for(this[d+E]=u&255;--E>=0&&(A*=256);)u<0&&H===0&&this[d+E+1]!==0&&(H=1),this[d+E]=(u/A>>0)-H&255;return d+y},l.prototype.writeInt8=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,1,127,-128),u<0&&(u=255+u+1),this[d]=u&255,d+1},l.prototype.writeInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,32767,-32768),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,2,32767,-32768),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,2147483647,-2147483648),this[d]=u&255,this[d+1]=u>>>8,this[d+2]=u>>>16,this[d+3]=u>>>24,d+4},l.prototype.writeInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||bt(this,u,d,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4},l.prototype.writeBigInt64LE=Ft(function(u,d=0){return Fe(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ft(function(u,d=0){return we(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fn(p,u,d,y,C,E){if(d+y>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function rr(p,u,d,y,C){return u=+u,d=d>>>0,C||fn(p,u,d,4),n.write(p,u,d,y,23,4),d+4}l.prototype.writeFloatLE=function(u,d,y){return rr(this,u,d,!0,y)},l.prototype.writeFloatBE=function(u,d,y){return rr(this,u,d,!1,y)};function pn(p,u,d,y,C){return u=+u,d=d>>>0,C||fn(p,u,d,8),n.write(p,u,d,y,52,8),d+8}l.prototype.writeDoubleLE=function(u,d,y){return pn(this,u,d,!0,y)},l.prototype.writeDoubleBE=function(u,d,y){return pn(this,u,d,!1,y)},l.prototype.copy=function(u,d,y,C){if(!l.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!C&&C!==0&&(C=this.length),d>=u.length&&(d=u.length),d||(d=0),C>0&&C<y&&(C=y),C===y||u.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),u.length-d<C-y&&(C=u.length-d+y);const E=C-y;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,y,C):o.prototype.set.call(u,this.subarray(y,C),d),E},l.prototype.fill=function(u,d,y,C){if(typeof u=="string"){if(typeof d=="string"?(C=d,d=0,y=this.length):typeof y=="string"&&(C=y,y=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!l.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(u.length===1){const A=u.charCodeAt(0);(C==="utf8"&&A<128||C==="latin1")&&(u=A)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(d<0||this.length<d||this.length<y)throw new RangeError("Out of range index");if(y<=d)return this;d=d>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);let E;if(typeof u=="number")for(E=d;E<y;++E)this[E]=u;else{const A=l.isBuffer(u)?u:l.from(u,C),H=A.length;if(H===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(E=0;E<y-d;++E)this[E+d]=A[E%H]}return this};const ve={};function mn(p,u,d){ve[p]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}mn("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mn("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),mn("ERR_OUT_OF_RANGE",function(p,u,d){let y=`The value of "${p}" is out of range.`,C=d;return Number.isInteger(d)&&Math.abs(d)>2**32?C=si(String(d)):typeof d=="bigint"&&(C=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(C=si(C)),C+="n"),y+=` It must be ${u}. Received ${C}`,y},RangeError);function si(p){let u="",d=p.length;const y=p[0]==="-"?1:0;for(;d>=y+4;d-=3)u=`_${p.slice(d-3,d)}${u}`;return`${p.slice(0,d)}${u}`}function Hs(p,u,d){de(u,"offset"),(p[u]===void 0||p[u+d]===void 0)&&Ve(u,p.length-(d+1))}function _e(p,u,d,y,C,E){if(p>d||p<u){const A=typeof u=="bigint"?"n":"";let H;throw u===0||u===BigInt(0)?H=`>= 0${A} and < 2${A} ** ${(E+1)*8}${A}`:H=`>= -(2${A} ** ${(E+1)*8-1}${A}) and < 2 ** ${(E+1)*8-1}${A}`,new ve.ERR_OUT_OF_RANGE("value",H,p)}Hs(y,C,E)}function de(p,u){if(typeof p!="number")throw new ve.ERR_INVALID_ARG_TYPE(u,"number",p)}function Ve(p,u,d){throw Math.floor(p)!==p?(de(p,d),new ve.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const ai=/[^+/0-9A-Za-z-_]/g;function ci(p){if(p=p.split("=")[0],p=p.trim().replace(ai,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function ir(p,u){u=u||1/0;let d;const y=p.length;let C=null;const E=[];for(let A=0;A<y;++A){if(d=p.charCodeAt(A),d>55295&&d<57344){if(!C){if(d>56319){(u-=3)>-1&&E.push(239,191,189);continue}else if(A+1===y){(u-=3)>-1&&E.push(239,191,189);continue}C=d;continue}if(d<56320){(u-=3)>-1&&E.push(239,191,189),C=d;continue}d=(C-55296<<10|d-56320)+65536}else C&&(u-=3)>-1&&E.push(239,191,189);if(C=null,d<128){if((u-=1)<0)break;E.push(d)}else if(d<2048){if((u-=2)<0)break;E.push(d>>6|192,d&63|128)}else if(d<65536){if((u-=3)<0)break;E.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((u-=4)<0)break;E.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return E}function L(p){const u=[];for(let d=0;d<p.length;++d)u.push(p.charCodeAt(d)&255);return u}function Q(p,u){let d,y,C;const E=[];for(let A=0;A<p.length&&!((u-=2)<0);++A)d=p.charCodeAt(A),y=d>>8,C=d%256,E.push(C),E.push(y);return E}function Ct(p){return e.toByteArray(ci(p))}function It(p,u,d,y){let C;for(C=0;C<y&&!(C+d>=u.length||C>=p.length);++C)u[C+d]=p[C];return C}function ct(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function he(p){return p!==p}const gn=function(){const p="0123456789abcdef",u=new Array(256);for(let d=0;d<16;++d){const y=d*16;for(let C=0;C<16;++C)u[y+C]=p[d]+p[C]}return u}();function Ft(p){return typeof BigInt>"u"?or:p}function or(){throw new Error("BigInt not supported")}})(uv);const Ls=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),ni=zt.WebSocket||zt.MozWebSocket,Th=!0,vv="arraybuffer",Ah=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class _v extends Ms{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=Ah?{}:yh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Th&&!Ah?n?new ni(e,n):new ni(e):new ni(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;Ts(r,this.supportsBinary,o=>{const s={};try{Th&&this.ws.send(o)}catch{}i&&Ls(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=xh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!ni}}class bv extends Ms{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=Gw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=Yw();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&Ls(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const xv={websocket:_v,webtransport:bv,polling:lv},Cv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bs(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=Cv.exec(t||""),o={},s=14;for(;s--;)o[kv[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Ev(o,o.path),o.queryKey=Sv(o,o.query),o}function Ev(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Sv(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Ph=class yn extends vt{constructor(e,n={}){super(),this.binaryType=vv,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Bs(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Bs(n.host).host),Qr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=rv(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=gh,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new xv[e](r)}open(){let e;if(this.opts.rememberUpgrade&&yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(l(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,l(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function c(){s("socket closed")}function h(f){n&&f.name!==n.name&&o()}const l=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",c),this.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",c),this.once("upgrading",h),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",yn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=tv(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){yn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};Ph.protocol=gh;function Tv(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Bs(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Av=typeof ArrayBuffer=="function",Pv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ih=Object.prototype.toString,Iv=typeof Blob=="function"||typeof Blob<"u"&&Ih.call(Blob)==="[object BlobConstructor]",Mv=typeof File=="function"||typeof File<"u"&&Ih.call(File)==="[object FileConstructor]";function Os(t){return Av&&(t instanceof ArrayBuffer||Pv(t))||Iv&&t instanceof Blob||Mv&&t instanceof File}function ri(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(ri(t[n]))return!0;return!1}if(Os(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ri(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ri(t[n]))return!0;return!1}function Rv(t){const e=[],n=t.data,r=t;return r.data=Fs(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Fs(t,e){if(!t)return t;if(Os(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=Fs(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=Fs(t[r],e));return n}return t}function Nv(t,e){return t.data=Vs(t.data,e),delete t.attachments,t}function Vs(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Vs(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Vs(t[n],e));return t}const Dv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Lv=5;var K;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(K||(K={}));class Bv{constructor(e){this.replacer=e}encode(e){return(e.type===K.EVENT||e.type===K.ACK)&&ri(e)?this.encodeAsBinary({type:e.type===K.EVENT?K.BINARY_EVENT:K.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===K.BINARY_EVENT||e.type===K.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=Rv(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Mh(t){return Object.prototype.toString.call(t)==="[object Object]"}class Us extends vt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===K.BINARY_EVENT;r||n.type===K.BINARY_ACK?(n.type=r?K.EVENT:K.ACK,this.reconstructor=new Ov(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Os(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(K[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===K.BINARY_EVENT||r.type===K.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(Us.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case K.CONNECT:return Mh(n);case K.DISCONNECT:return n===void 0;case K.CONNECT_ERROR:return typeof n=="string"||Mh(n);case K.EVENT:case K.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Dv.indexOf(n[0])===-1);case K.ACK:case K.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ov{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=Nv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Fv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Us,Encoder:Bv,get PacketType(){return K},protocol:Lv},Symbol.toStringTag,{value:"Module"}));function Yt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Vv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Rh extends vt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Yt(e,"open",this.onopen.bind(this)),Yt(e,"packet",this.onpacket.bind(this)),Yt(e,"error",this.onerror.bind(this)),Yt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(Vv.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:K.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:K.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case K.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case K.EVENT:case K.BINARY_EVENT:this.onevent(e);break;case K.ACK:case K.BINARY_ACK:this.onack(e);break;case K.DISCONNECT:this.ondisconnect();break;case K.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:K.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:K.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function hn(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}hn.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},hn.prototype.reset=function(){this.attempts=0},hn.prototype.setMin=function(t){this.ms=t},hn.prototype.setMax=function(t){this.max=t},hn.prototype.setJitter=function(t){this.jitter=t};class $s extends vt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Qr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new hn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||Fv;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ph(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Yt(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=Yt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Yt(e,"ping",this.onping.bind(this)),Yt(e,"data",this.ondata.bind(this)),Yt(e,"error",this.onerror.bind(this)),Yt(e,"close",this.onclose.bind(this)),Yt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Ls(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Rh(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const tr={};function ii(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Tv(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=tr[i]&&o in tr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return a?c=new $s(r,e):(tr[i]||(tr[i]=new $s(r,e)),c=tr[i]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(ii,{Manager:$s,Socket:Rh,io:ii,connect:ii});function zs(){return document.visibilityState==="visible"&&document.hasFocus()}const Uv=8e3,er=new Map;function Nh(t){const e=er.get(t);e&&(clearTimeout(e),er.delete(t)),Y.getState().setThreadTyping(t,!1)}function $v(t){Y.getState().setThreadTyping(t.threadId,!0);const e=er.get(t.threadId);e&&clearTimeout(e),er.set(t.threadId,setTimeout(()=>{er.delete(t.threadId),Y.getState().setThreadTyping(t.threadId,!1)},Uv))}function zv(t){const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=Y.getState(),o={support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis},s=e.find(a=>a.threadId===t.threadId);if(s&&jy(s.messages,o)){yt("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),Nh(t.threadId),(!r||!zs())&&i()}function jv(t){const e=Y.getState().setConversationOpen;e(t.threadId,!1),Nh(t.threadId)}function Hv(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=Y.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,ld(t.csMember.displayName))}function Wv(t){const{setConversationCSMember:e,addMessage:n}=Y.getState();e(t.threadId,t.csMember),n(t.threadId,ld(t.csMember.displayName))}function Kv(t){const{conversations:e,updateMessage:n}=Y.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){yt("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){yt("⚠️ Message not found for update:",t.message.date);return}n(t.threadId,t.message.date,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,edited:!0,emojis:t.message.emojis})}function qv(t){const{conversations:e,removeMessage:n}=Y.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){yt("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){yt("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function Yv(t){Y.getState().setGuildSettings({onlineCsMembers:t.onlineCsMembers})}function Gv(t){return new Promise(e=>{const n=ii(Bt.domain,{path:"/socket"});n.on("new-support-message",zv),n.on("updated-support-message",Kv),n.on("deleted-support-message",qv),n.on("thread-closed",jv),n.on("thread-assigned",Hv),n.on("thread-reassigned",Wv),n.on("support-typing",$v),n.on("presence-updated",Yv),n.on("connect",()=>{n.emit("identify",{jwt:t}),e(n)})})}async function Xv({name:t,email:e}){const n=JSON.stringify({guildId:Bt.app_id,name:t,email:e}),r=new Headers;r.append("Content-Type","application/json");const i={method:"POST",headers:r,body:n},s=await(await fetch(`${Bt.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Re.set("discord-widget",s.token,{sameSite:"strict",secure:window.location.protocol==="https:"}),Y.getState().setToken(s.token)),s}async function Zv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/current`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).currentConversation??null}catch(n){return console.error("Error fetching current conversation",n),null}}async function Jv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/past`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).pastConversations??null}catch(n){return console.error("Error fetching past conversations",n),null}}async function Qv(t){return await Gv(t)}async function t_(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=Y.getState();try{const i=await Zv(t);if(i)yt("✅ Found current conversation:",i.threadId),e(i);else{yt("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(yt("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{Y.getState().setNetworkError("Failed to load conversation")}}async function e_(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=Y.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await Jv(t);a&&a.length>0?(yt(`✅ Loaded ${a.length} past conversations`),n(a)):yt("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function n_(){const{username:t,email:e,setNetworkError:n,setLoading:r}=Y.getState();try{r(!0),n(null);let i=Re.get("discord-widget");i?yt("ℹ️ Returning user - JWT found in cookies"):(yt("ℹ️ New user - obtaining JWT token..."),i=(await Xv({name:t,email:e})).token,yt("✅ JWT token obtained")),await Qv(i),await t_(i),yt("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const r_="Customer support",i_="A team member will pick up this conversation shortly",o_="https://i.imgur.com/ecjl5HR.png",s_=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n,guildSettings:r}=Y(),i=t.filter(c=>c.status==="open").length;U(()=>{const c=Re.get("discord-widget");if(!c)return;const h=5*60*1e3;(!n||Date.now()-n>h)&&e_(c)},[n]);function o(){return i!==0?null:w(Qt.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},onClick:()=>e("TEMP"),style:{background:"linear-gradient(135deg, var(--dc-primary), var(--dc-primary-mid))"},type:"button",className:"flex justify-center items-center w-full h-16 border-t border-gray-200",children:w("div",{className:`flex flex-row items-center transform transition-transform duration-150
106
+ hover:scale-105 active:scale-95`,children:[w("span",{className:"text-sm text-slate-50 pr-3",children:"Send us a new message"}),w(qg,{color:"#FFFFFF",size:18,strokeWidth:1})]})})}function s(c,h,l){var _,v;const f=c.messages[c.messages.length-1],m=c.status==="open",g=!(c!=null&&c.csMember)||c.csMember.displayName===r_;return w("div",{className:`flex flex-row items-center px-3 py-4 hover:bg-gray-200 cursor-pointer ${l?"":"border-b border-gray-200 "}`,onClick:()=>e(c.threadId),children:[w("div",{className:"relative inline-block mr-3",children:[w("img",{className:"inline-block size-[32px] rounded-full",src:g?(r==null?void 0:r.iconURL)||o_:c.csMember.displayAvatarURL}),!g&&((_=c==null?void 0:c.csMember)==null?void 0:_.status)&&w("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-1 ring-white dark:ring-neutral-900 ${Es(c.csMember.status,"bg")}`})]}),w("div",{className:"flex flex-1 flex-col",children:[w("p",{className:`text-sm/3 ${m?"font-semibold":""}`,children:g?i_:(v=c==null?void 0:c.csMember)==null?void 0:v.displayName}),w("p",{className:"text-xs text-gray-500 line-clamp-1",children:f.content})]}),w("div",{className:"ml-2",children:w("p",{className:"text-xs text-gray-500",children:dd(f.date)})})]},`conversation-${h}`)}function a(){const c=[...t].filter(f=>f.status==="open"),h=[...t].filter(f=>f.status==="closed"),l=f=>f.sort((m,g)=>g.lastMessageDate-m.lastMessageDate).map((m,g)=>m.messages.length?s(m,g,g+1===f.length):null);return w(Qt.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col flex-1 p-2 overflow-y-auto",children:[c.length>0&&w("div",{className:"mb-2",children:[w("span",{className:"text-sm",children:"Current conversation"}),l(c)]}),h.length>0&&w(tt,{children:[w("span",{className:"text-sm",children:"Closed messages"}),l(h)]})]})}return w("div",{className:"flex flex-col flex-1 overflow-auto",children:[a(),o()]})},Dh=({IconComponent:t,onClick:e})=>w("button",{onClick:e,className:`flex mr-2 items-center justify-center w-8 h-8
107
107
  transform transition-transform duration-150
108
- hover:scale-110 active:scale-95`,children:w(t,{})}),r_=({size:t})=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||26,height:t||26,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[w("path",{d:"M18 6 6 18"}),w("path",{d:"m6 6 12 12"})]}),i_=({size:t})=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||24,height:t||24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-left",children:w("path",{d:"m15 18-6-6 6-6"})}),$s=3,o_=({members:t})=>{if(t.length===0)return null;const e=t.length>$s,n=t.slice(0,e?$s-1:$s),r=t.length-n.length;return w("div",{className:"flex items-center -space-x-2 ml-3",children:[n.map((i,o)=>w("div",{className:"relative",style:{zIndex:n.length-o},children:[w("img",{src:i.displayAvatarURL,alt:i.displayName,title:i.displayName,className:"block w-7 h-7 rounded-full object-cover ring-1 ring-white dark:ring-neutral-900"}),w("span",{className:`absolute -bottom-0.5 -end-0.5 block size-2.5 rounded-full ring-1 ring-white dark:ring-neutral-900 ${Cs(i.status,"bg")}`})]},`${i.displayName}-${o}`)),r>0&&w("div",{className:"relative flex items-center justify-center w-7 h-7 rounded-full bg-gray-500 text-white text-[10px] font-semibold ring-1 ring-white dark:ring-neutral-900",style:{zIndex:0},children:["+",r]})]})},Nh={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},s_="No one's online right now — leave a message and we'll get back to you.",a_=()=>{var _,v,x,b,k,E;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=G(),o=r.find(I=>I.status==="open"),s=!!i,a=r.length===1&&r[0].status==="closed",c=r.length>1,h=s&&(a||c),l=!!(i&&(o!=null&&o.csMember)&&((_=o==null?void 0:o.csMember)==null?void 0:_.displayName)!=="Customer support"),f=n==null?void 0:n.onlineCsMembers,m=Array.isArray(f)&&f.length===0,g=l?{title:(v=o==null?void 0:o.csMember)==null?void 0:v.displayName,subtitle:(x=o==null?void 0:o.csMember)!=null&&x.status?Ow((b=o==null?void 0:o.csMember)==null?void 0:b.status):null,avatar:(k=o==null?void 0:o.csMember)==null?void 0:k.displayAvatarURL,status:(E=o==null?void 0:o.csMember)==null?void 0:E.status}:{title:(n==null?void 0:n.header_title)??Nh.title,subtitle:m?s_:(n==null?void 0:n.header_subtitle)??Nh.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://i.imgur.com/ecjl5HR.png",status:Array.isArray(f)?f.length>0?"online":"offline":void 0};return w("div",{style:{background:"linear-gradient(135deg, var(--dc-primary), var(--dc-primary-mid))",boxShadow:"0 4px 4px rgba(0, 0, 0, 0.1)"},className:"flex flex-row items-center py-5 px-4 text-white",children:[h&&w(Rh,{onClick:()=>e(null),IconComponent:i_}),w("div",{className:"relative inline-block mr-3",children:[w("img",{className:"inline-block w-[40px] rounded-full",src:g.avatar}),g.status&&w("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-1 ring-white dark:ring-neutral-900 ${Cs(g.status,"bg")}`})]}),w("div",{className:"flex-1 flex-col",children:[w("p",{className:"text-lg/5 font-regular",children:g.title}),g.subtitle&&w("p",{className:"flex-1 text-xs/4 line-clamp-2",children:g.subtitle})]}),!l&&f&&w(o_,{members:f}),w(Rh,{onClick:()=>t(!1),IconComponent:r_})]})};function c_(){const[t,e]=W({width:null,height:null});return ae(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const l_=()=>{const t=c_();return!t.width||!t.height?!1:t.width>t.height?t.width<=rd||t.height<=jy:t.width<=rd},u_=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=G(),r=l_(),i=!t&&e.length,o={position:"fixed",inset:"0px",width:"100%",height:"100%",zIndex:9999,transformOrigin:"bottom right"},s={position:"fixed",bottom:"110px",right:"30px",width:"400px",height:"700px",maxWidth:"calc(100% - 60px)",maxHeight:"calc(100% - 124px)",zIndex:9999,transformOrigin:"bottom right"};return w(_o,{children:n&&w(Qt.div,{initial:{opacity:0,scale:.8,y:r?0:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:r?0:20},transition:r?{duration:.2,ease:"easeInOut"}:{type:"spring",stiffness:500,damping:28,mass:.8},style:r?o:s,children:w("div",{className:`flex flex-col h-full bg-white shadow-xl overflow-hidden ${r?"":"rounded-xl"}`,children:[w(a_,{}),i?w(n_,{}):w(Bw,{})]})},"chatbox")})};async function d_(){const{setGuildSettings:t,guildSettings:e}=G.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${Bt.domain}/guildSettings/${Bt.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function h_(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${Bt.domain}/guildSettings/status/${Bt.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function f_(t,e){const n=F(document.title),r=F(null),i=F(!1);U(()=>{n.current||(n.current=document.title)},[]),U(()=>{if(r.current!==null&&(clearInterval(r.current),r.current=null),e&&t>0){const o=()=>{const s=t>1?"s":"";return`(${t}) New message${s} - ${n.current}`};document.title=o(),i.current=!0,r.current=window.setInterval(()=>{i.current?(document.title=n.current,i.current=!1):(document.title=o(),i.current=!0)},5e3)}else document.title=n.current,i.current=!1;return()=>{r.current!==null&&(clearInterval(r.current),r.current=null),document.title=n.current}},[t,e]),U(()=>{if(e&&t>0&&i.current){const o=t>1?"s":"";document.title=`(${t}) New message${o} - ${n.current}`}},[t,e])}function p_(){const[t,e]=W(Us);return U(()=>{const n=()=>e(Us());return document.addEventListener("visibilitychange",n),window.addEventListener("focus",n),window.addEventListener("blur",n),()=>{document.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n),window.removeEventListener("blur",n)}},[]),t}const m_="#7289DA",g_=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function y_(t){return!!t&&g_.test(t.trim())}function Dh(t){const e=t.trim();return e.length===4?"#"+e.slice(1).split("").map(n=>n+n).join(""):e.toLowerCase()}function w_(t){const e=Dh(t),n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return[n,r,i]}function v_(t,e,n){const r=t/255,i=e/255,o=n/255,s=Math.max(r,i,o),a=Math.min(r,i,o);let c=0,h=0;const l=(s+a)/2;if(s!==a){const f=s-a;switch(h=l>.5?f/(2-s-a):f/(s+a),s){case r:c=(i-o)/f+(i<o?6:0);break;case i:c=(o-r)/f+2;break;default:c=(r-i)/f+4;break}c/=6}return[c*360,h*100,l*100]}function Lh(t,e,n){const r=Math.min(100,Math.max(0,e))/100,i=Math.min(100,Math.max(0,n))/100,o=h=>(h+t/30)%12,s=r*Math.min(i,1-i),a=h=>i-s*Math.max(-1,Math.min(o(h)-3,Math.min(9-o(h),1))),c=h=>Math.round(a(h)*255).toString(16).padStart(2,"0");return`#${c(0)}${c(8)}${c(4)}`}function __(t){const e=Dh(t),[n,r,i]=w_(e),[o,s,a]=v_(n,r,i);return{primary:e,primaryMid:Lh(o,s*.552,a*.789),primaryDark:Lh(o,s*.18,a*.229)}}function b_(t){const e=y_(t)?t:m_;return __(e)}function x_(t){const{primary:e,primaryMid:n,primaryDark:r}=b_(t);return{"--dc-primary":e,"--dc-primary-mid":n,"--dc-primary-dark":r}}function C_(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:c,_REHYDRATED_:h,networkError:l,isLoading:f,unreadCount:m,markMessagesAsReadWithSync:g,syncUnreadCountFromServer:_,initializeUnreadState:v,guildSettings:x}=G(),b=x_(x==null?void 0:x.primary_color),[k,E]=W(!1),I=p_();f_(m,m>0&&(!t||!I)),U(()=>{t&&I&&m>0&&g()},[t,I,m,g]),U(()=>{(async()=>{const P=await h_();E(P)})()},[]),U(()=>{v()},[v]);const T=et(()=>(!o||!s)&&!c.filter(M=>M.messages.filter(D=>D.customRenderer===cn.IntroduceYourself)).length?(a("TEMP",Jy),!0):!1,[o,s,a,c]);return U(()=>{h&&(async()=>(await d_(),!T()&&(o||s)&&!r&&(Jv(),i(!0),_())))()},[r,i,T,_,o,s,h]),U(()=>{if(t)e(!0);else{const P=setTimeout(()=>e(!1),300);return()=>clearTimeout(P)}},[t,e]),k?w("div",{style:b,children:[w(Gg,{onClick:()=>n(),isOpen:t,unreadCount:m}),w(u_,{}),w(()=>l?w("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#EF4444",color:"white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,maxWidth:"300px",fontSize:"14px"},children:[w("strong",{children:"Connection Error"}),w("p",{style:{margin:"4px 0 0 0",fontSize:"12px"},children:l})]}):null,{}),w(()=>!f||!t?null:w("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"var(--dc-primary)",color:"white",padding:"8px 12px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,fontSize:"12px"},children:"Loading..."}),{}),w("div",{id:"deskcord-lightbox-portal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:2147482e3,pointerEvents:"none"}})]}):null}const k_=()=>{const t=F(null),[e,n]=W(null),[r,i]=W(null);return U(()=>{if(!t.current)return;let o=t.current.shadowRoot;o||(o=t.current.attachShadow({mode:"open"}));let s=o.querySelector("#deskcord-shadow-container");s||(s=document.createElement("div"),s.id="deskcord-shadow-container",s.style.cssText=`
108
+ hover:scale-110 active:scale-95`,children:w(t,{})}),a_=({size:t})=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||26,height:t||26,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[w("path",{d:"M18 6 6 18"}),w("path",{d:"m6 6 12 12"})]}),c_=({size:t})=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||24,height:t||24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-left",children:w("path",{d:"m15 18-6-6 6-6"})}),js=3,l_=({members:t})=>{if(t.length===0)return null;const e=t.length>js,n=t.slice(0,e?js-1:js),r=t.length-n.length;return w("div",{className:"flex items-center -space-x-2 ml-3",children:[n.map((i,o)=>w("div",{className:"relative",style:{zIndex:n.length-o},children:[w("img",{src:i.displayAvatarURL,alt:i.displayName,title:i.displayName,className:"block w-7 h-7 rounded-full object-cover ring-1 ring-white dark:ring-neutral-900"}),w("span",{className:`absolute -bottom-0.5 -end-0.5 block size-2.5 rounded-full ring-1 ring-white dark:ring-neutral-900 ${Es(i.status,"bg")}`})]},`${i.displayName}-${o}`)),r>0&&w("div",{className:"relative flex items-center justify-center w-7 h-7 rounded-full bg-gray-500 text-white text-[10px] font-semibold ring-1 ring-white dark:ring-neutral-900",style:{zIndex:0},children:["+",r]})]})},Lh={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},u_="No one's online right now — leave a message and we'll get back to you.",d_=()=>{var _,v,x,b,k,S;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=Y(),o=r.find(M=>M.status==="open"),s=!!i,a=r.length===1&&r[0].status==="closed",c=r.length>1,h=s&&(a||c),l=!!(i&&(o!=null&&o.csMember)&&((_=o==null?void 0:o.csMember)==null?void 0:_.displayName)!=="Customer support"),f=n==null?void 0:n.onlineCsMembers,m=Array.isArray(f)&&f.length===0,g=l?{title:(v=o==null?void 0:o.csMember)==null?void 0:v.displayName,subtitle:(x=o==null?void 0:o.csMember)!=null&&x.status?$w((b=o==null?void 0:o.csMember)==null?void 0:b.status):null,avatar:(k=o==null?void 0:o.csMember)==null?void 0:k.displayAvatarURL,status:(S=o==null?void 0:o.csMember)==null?void 0:S.status}:{title:(n==null?void 0:n.header_title)??Lh.title,subtitle:m?u_:(n==null?void 0:n.header_subtitle)??Lh.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://i.imgur.com/ecjl5HR.png",status:Array.isArray(f)?f.length>0?"online":"offline":void 0};return w("div",{style:{background:"linear-gradient(135deg, var(--dc-primary), var(--dc-primary-mid))",boxShadow:"0 4px 4px rgba(0, 0, 0, 0.1)"},className:"flex flex-row items-center py-5 px-4 text-white",children:[h&&w(Dh,{onClick:()=>e(null),IconComponent:c_}),w("div",{className:"relative inline-block mr-3",children:[w("img",{className:"inline-block w-[40px] rounded-full",src:g.avatar}),g.status&&w("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-1 ring-white dark:ring-neutral-900 ${Es(g.status,"bg")}`})]}),w("div",{className:"flex-1 flex-col",children:[w("p",{className:"text-lg/5 font-regular",children:g.title}),g.subtitle&&w("p",{className:"flex-1 text-xs/4 line-clamp-2",children:g.subtitle})]}),!l&&f&&w(l_,{members:f}),w(Dh,{onClick:()=>t(!1),IconComponent:a_})]})};function h_(){const[t,e]=W({width:null,height:null});return ae(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const f_=()=>{const t=h_();return!t.width||!t.height?!1:t.width>t.height?t.width<=od||t.height<=Hy:t.width<=od},p_=()=>{const{openConversationId:t,conversations:e,isChatVisible:n,guildSettings:r}=Y(),i=f_(),o=!t&&e.length,s=cs(r==null?void 0:r.widget_position),a=s==="bottom-left"?"bottom left":"bottom right",c={position:"fixed",inset:"0px",width:"100%",height:"100%",zIndex:9999,transformOrigin:a},h={position:"fixed",bottom:"110px",...zr(s,30),width:"400px",height:"700px",maxWidth:"calc(100% - 60px)",maxHeight:"calc(100% - 124px)",zIndex:9999,transformOrigin:a};return w(bo,{children:n&&w(Qt.div,{initial:{opacity:0,scale:.8,y:i?0:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:i?0:20},transition:i?{duration:.2,ease:"easeInOut"}:{type:"spring",stiffness:500,damping:28,mass:.8},style:i?c:h,children:w("div",{className:`flex flex-col h-full bg-white shadow-xl overflow-hidden ${i?"":"rounded-xl"}`,children:[w(d_,{}),o?w(s_,{}):w(Uw,{})]})},"chatbox")})};async function m_(){const{setGuildSettings:t,guildSettings:e}=Y.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${Bt.domain}/guildSettings/${Bt.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function g_(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${Bt.domain}/guildSettings/status/${Bt.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function y_(t,e){const n=F(document.title),r=F(null),i=F(!1);U(()=>{n.current||(n.current=document.title)},[]),U(()=>{if(r.current!==null&&(clearInterval(r.current),r.current=null),e&&t>0){const o=()=>{const s=t>1?"s":"";return`(${t}) New message${s} - ${n.current}`};document.title=o(),i.current=!0,r.current=window.setInterval(()=>{i.current?(document.title=n.current,i.current=!1):(document.title=o(),i.current=!0)},5e3)}else document.title=n.current,i.current=!1;return()=>{r.current!==null&&(clearInterval(r.current),r.current=null),document.title=n.current}},[t,e]),U(()=>{if(e&&t>0&&i.current){const o=t>1?"s":"";document.title=`(${t}) New message${o} - ${n.current}`}},[t,e])}function w_(){const[t,e]=W(zs);return U(()=>{const n=()=>e(zs());return document.addEventListener("visibilitychange",n),window.addEventListener("focus",n),window.addEventListener("blur",n),()=>{document.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n),window.removeEventListener("blur",n)}},[]),t}const v_="#7289DA",__=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function b_(t){return!!t&&__.test(t.trim())}function Bh(t){const e=t.trim();return e.length===4?"#"+e.slice(1).split("").map(n=>n+n).join(""):e.toLowerCase()}function x_(t){const e=Bh(t),n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return[n,r,i]}function C_(t,e,n){const r=t/255,i=e/255,o=n/255,s=Math.max(r,i,o),a=Math.min(r,i,o);let c=0,h=0;const l=(s+a)/2;if(s!==a){const f=s-a;switch(h=l>.5?f/(2-s-a):f/(s+a),s){case r:c=(i-o)/f+(i<o?6:0);break;case i:c=(o-r)/f+2;break;default:c=(r-i)/f+4;break}c/=6}return[c*360,h*100,l*100]}function Oh(t,e,n){const r=Math.min(100,Math.max(0,e))/100,i=Math.min(100,Math.max(0,n))/100,o=h=>(h+t/30)%12,s=r*Math.min(i,1-i),a=h=>i-s*Math.max(-1,Math.min(o(h)-3,Math.min(9-o(h),1))),c=h=>Math.round(a(h)*255).toString(16).padStart(2,"0");return`#${c(0)}${c(8)}${c(4)}`}function k_(t){const e=Bh(t),[n,r,i]=x_(e),[o,s,a]=C_(n,r,i);return{primary:e,primaryMid:Oh(o,s*.552,a*.789),primaryDark:Oh(o,s*.18,a*.229)}}function E_(t){const e=b_(t)?t:v_;return k_(e)}function S_(t){const{primary:e,primaryMid:n,primaryDark:r}=E_(t);return{"--dc-primary":e,"--dc-primary-mid":n,"--dc-primary-dark":r}}function T_(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:c,_REHYDRATED_:h,networkError:l,isLoading:f,unreadCount:m,markMessagesAsReadWithSync:g,syncUnreadCountFromServer:_,initializeUnreadState:v,guildSettings:x}=Y(),b=S_(x==null?void 0:x.primary_color),k=cs(x==null?void 0:x.widget_position),[S,M]=W(!1),T=w_();y_(m,m>0&&(!t||!T)),U(()=>{t&&T&&m>0&&g()},[t,T,m,g]),U(()=>{(async()=>{const I=await g_();M(I)})()},[]),U(()=>{v()},[v]);const R=et(()=>(!o||!s)&&!c.filter(D=>D.messages.filter(O=>O.customRenderer===cn.IntroduceYourself)).length?(a("TEMP",n1),!0):!1,[o,s,a,c]);return U(()=>{h&&(async()=>(await m_(),!R()&&(o||s)&&!r&&(n_(),i(!0),_())))()},[r,i,R,_,o,s,h]),U(()=>{if(t)e(!0);else{const I=setTimeout(()=>e(!1),300);return()=>clearTimeout(I)}},[t,e]),S?w("div",{style:b,children:[w(Qy,{onClick:()=>n(),isOpen:t,unreadCount:m}),w(p_,{}),w(()=>l?w("div",{style:{position:"fixed",bottom:"90px",...zr(k,20),backgroundColor:"#EF4444",color:"white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,maxWidth:"300px",fontSize:"14px"},children:[w("strong",{children:"Connection Error"}),w("p",{style:{margin:"4px 0 0 0",fontSize:"12px"},children:l})]}):null,{}),w(()=>!f||!t?null:w("div",{style:{position:"fixed",bottom:"90px",...zr(k,20),backgroundColor:"var(--dc-primary)",color:"white",padding:"8px 12px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,fontSize:"12px"},children:"Loading..."}),{}),w("div",{id:"deskcord-lightbox-portal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:2147482e3,pointerEvents:"none"}})]}):null}const A_=()=>{const t=F(null),[e,n]=W(null),[r,i]=W(null);return U(()=>{if(!t.current)return;let o=t.current.shadowRoot;o||(o=t.current.attachShadow({mode:"open"}));let s=o.querySelector("#deskcord-shadow-container");s||(s=document.createElement("div"),s.id="deskcord-shadow-container",s.style.cssText=`
109
109
  all: initial;
110
110
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
111
111
  font-size: 16px;
112
112
  line-height: 1.5;
113
113
  color: #000;
114
114
  box-sizing: border-box;
115
- `,o.appendChild(s));let a=o.querySelector("#deskcord-tailwind-styles");a||(a=document.createElement("style"),a.id="deskcord-tailwind-styles",a.textContent=cf,o.insertBefore(a,o.firstChild));let c=o.querySelector("#deskcord-lightbox-styles");c||(c=document.createElement("style"),c.id="deskcord-lightbox-styles",c.textContent=lf,o.insertBefore(c,a.nextSibling));let h=o.querySelector("#deskcord-reset-styles");return h||(h=document.createElement("style"),h.id="deskcord-reset-styles",h.textContent=`
115
+ `,o.appendChild(s));let a=o.querySelector("#deskcord-tailwind-styles");a||(a=document.createElement("style"),a.id="deskcord-tailwind-styles",a.textContent=uf,o.insertBefore(a,o.firstChild));let c=o.querySelector("#deskcord-lightbox-styles");c||(c=document.createElement("style"),c.id="deskcord-lightbox-styles",c.textContent=df,o.insertBefore(c,a.nextSibling));let h=o.querySelector("#deskcord-reset-styles");return h||(h=document.createElement("style"),h.id="deskcord-reset-styles",h.textContent=`
116
116
  /* Reset styles to ensure isolation from parent page */
117
117
  :host {
118
118
  all: initial;
@@ -143,4 +143,4 @@
143
143
  -webkit-font-smoothing: antialiased;
144
144
  -moz-osx-font-smoothing: grayscale;
145
145
  }
146
- `,o.insertBefore(h,o.firstChild)),n(o),i(s),()=>{}},[]),w(tt,{children:[w("div",{ref:t,id:"deskcord-shadow-host",style:{position:"fixed",top:0,left:0,width:0,height:0,overflow:"visible",zIndex:2147483647,pointerEvents:"none"}}),e&&r&&We.createPortal(w(S_,{value:e,children:w(C_,{})}),r)]})},Bh=We.createContext(null),S_=({value:t,children:e})=>w(Bh.Provider,{value:t,children:e});window.deskcord?window.deskcord.openChatbox=()=>{G.getState().setChatOpen(!0)}:window.deskcord={settings:{app_id:""},openChatbox:()=>{}};let nr=document.getElementById("deskcord-root");nr||(nr=document.createElement("div"),nr.id="deskcord-root",document.body.appendChild(nr)),We.render(w(We.StrictMode,{children:w(k_,{})}),nr)})();
146
+ `,o.insertBefore(h,o.firstChild)),n(o),i(s),()=>{}},[]),w(tt,{children:[w("div",{ref:t,id:"deskcord-shadow-host",style:{position:"fixed",top:0,left:0,width:0,height:0,overflow:"visible",zIndex:2147483647,pointerEvents:"none"}}),e&&r&&We.createPortal(w(P_,{value:e,children:w(T_,{})}),r)]})},Fh=We.createContext(null),P_=({value:t,children:e})=>w(Fh.Provider,{value:t,children:e});window.deskcord?window.deskcord.openChatbox=()=>{Y.getState().setChatOpen(!0)}:window.deskcord={settings:{app_id:""},openChatbox:()=>{}};let nr=document.getElementById("deskcord-root");nr||(nr=document.createElement("div"),nr.id="deskcord-root",document.body.appendChild(nr)),We.render(w(We.StrictMode,{children:w(A_,{})}),nr)})();