@flarehr/promoted-benefits-admin 0.3.5683 → 0.3.5847
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__typeError=t=>{throw TypeError(t)},__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__publicField=(t,e,n)=>__defNormalProp(t,"symbol"!=typeof e?e+"":e,n),__accessCheck=(t,e,n)=>e.has(t)||__typeError("Cannot "+n),__privateGet=(t,e,n)=>(__accessCheck(t,e,"read from private field"),n?n.call(t):e.get(t)),__privateAdd=(t,e,n)=>e.has(t)?__typeError("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),__privateSet=(t,e,n,r)=>(__accessCheck(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),__privateMethod=(t,e,n)=>(__accessCheck(t,e,"access private method"),n),__privateWrapper=(t,e,n,r)=>({set _(r){__privateSet(t,e,r,n)},get _(){return __privateGet(t,e,r)}});!function(){"use strict";var t,e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P,T,A,C,R,O,M,F,L,D,V,I,j,B,N,U,G,W,H,$,z,q,K,Y,Q,X,Z,J,tt,et,nt,rt,it,ot,st,at,lt,ut,ct,dt,ht,pt,ft,mt,vt,gt,yt,_t,wt,bt,xt,St,kt,Et,Pt,Tt,At,Ct={},Rt=[],Ot=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mt=Array.isArray;function Ft(t,e){for(var n in e)t[n]=e[n];return t}function Lt(t){var e=t.parentNode;e&&e.removeChild(t)}function Dt(t,e,n){var r,i,o,s={};for(o in e)"key"==o?r=e[o]:"ref"==o?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?yt.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return Vt(t,s,r,i,null)}function Vt(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++wt:i,__i:-1,__u:0};return null==i&&null!=_t.vnode&&_t.vnode(o),o}function It(){return{current:null}}function jt(t){return t.children}function Bt(t,e){this.props=t,this.context=e}function Nt(t,e){if(null==e)return t.__?Nt(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Nt(t):null}function Ut(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Ut(t)}}function Gt(t){(!t.__d&&(t.__d=!0)&&bt.push(t)&&!Wt.__r++||xt!==_t.debounceRendering)&&((xt=_t.debounceRendering)||St)(Wt)}function Wt(){var t,e,n,r,i,o,s,a;for(bt.sort(kt);t=bt.shift();)t.__d&&(e=bt.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=Ft({},i)).__v=i.__v+1,_t.vnode&&_t.vnode(r),Xt(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?Nt(i):o,!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Zt(s,r,a),r.__e!=o&&Ut(r)),bt.length>e&&bt.sort(kt));Wt.__r=0}function Ht(t,e,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||Rt,g=e.length;for(n.__d=l,function(t,e,n){var r,i,o,s,a,l=e.length,u=n.length,c=u,d=0;for(t.__k=[],r=0;r<l;r++)s=r+d,null!=(i=t.__k[r]=null==(i=e[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Vt(null,i,null,null,null):Mt(i)?Vt(jt,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Vt(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,a=qt(i,n,s,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:a>s?c>l-s?d+=a-s:d--:a<s&&(a==s-d?d-=a-s:d++),a!==r+d&&(i.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=Nt(o)),te(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=Nt(o)),te(o,o))}(n,e,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?Ct:v[p.__i]||Ct,p.__i=d,Xt(t,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Jt(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),65536&p.__u||h.__k===p.__k?l=$t(p,l,t):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=m}function $t(t,e,n){var r,i;if("function"==typeof t.type){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=$t(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Nt(t)),n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function zt(t,e){return e=e||[],null==t||"boolean"==typeof t||(Mt(t)?t.some((function(t){zt(t,e)})):e.push(t)),e}function qt(t,e,n,r){var i=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function Kt(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||Ot.test(e)?n:n+"px"}function Yt(t,e,n,r,i){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Kt(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Kt(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Et,t.addEventListener(e,o?Tt:Pt,o)):t.removeEventListener(e,o?Tt:Pt,o);else{if("http://www.w3.org/2000/svg"==i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function Qt(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=Et++;else if(e.t<n.u)return;return n(_t.event?_t.event(e):e)}}}function Xt(t,e,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=_t.__b)&&c(e);t:if("function"==typeof P)try{if(g=e.props,y="prototype"in P&&P.prototype.render,_=(c=P.contextType)&&r[c.__c],w=c?_?_.props.value:c.__:r,n.__c?v=(d=e.__c=n.__c).__=d.__E:(y?e.__c=d=new P(g,w):(e.__c=d=new Bt(g,w),d.constructor=P,d.render=ee),_&&_.sub(d),d.props=g,d.state||(d.state={}),d.context=w,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Ft({},d.__s)),Ft(d.__s,P.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=e,h)y&&null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,w)||e.__v===n.__v)){for(e.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,w),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,m)}))}if(d.context=w,d.props=g,d.__P=t,d.__e=!1,x=_t.__r,S=0,y){for(d.state=d.__s,d.__d=!1,x&&x(e),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(e),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Ft(Ft({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),Ht(t,Mt(E=null!=c&&c.type===jt&&null==c.key?c.props.children:c)?E:[E],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(e.__v=null,l||null!=o){for(e.__u|=l?160:32;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else e.__e=n.__e,e.__k=n.__k;_t.__e(T,e,n)}else null==o&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(t,e,n,r,i,o,s,a,l){var u,c,d,h,p,f,m,v=n.props,g=e.props,y=e.type;if("svg"===y?i="http://www.w3.org/2000/svg":"math"===y?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){t=p,o[u]=null;break}if(null==t){if(null===y)return document.createTextNode(g);t=document.createElementNS(i,y,g.is&&g),o=null,a=!1}if(null===y)v===g||a&&t.data===g||(t.data=g);else{if(o=o&&yt.call(t.childNodes),v=n.props||Ct,!a&&null!=o)for(v={},u=0;u<t.attributes.length;u++)v[(p=t.attributes[u]).name]=p.value;for(u in v)if(p=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=p;else if("key"!==u&&!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;Yt(t,u,null,p,i)}for(u in g)p=g[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?f=p:"checked"==u?m=p:"key"===u||a&&"function"!=typeof p||v[u]===p||Yt(t,u,p,v[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),Ht(t,Mt(h)?h:[h],e,n,r,"foreignObject"===y?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Nt(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&Lt(o[u]);a||(u="value",void 0!==f&&(f!==t[u]||"progress"===y&&!f||"option"===y&&f!==v[u])&&Yt(t,u,f,v[u],i),u="checked",void 0!==m&&m!==t[u]&&Yt(t,u,m,v[u],i))}return t}(n.__e,e,n,r,i,o,s,l,u);(c=_t.diffed)&&c(e)}function Zt(t,e,n){e.__d=void 0;for(var r=0;r<n.length;r++)Jt(n[r],n[++r],n[++r]);_t.__c&&_t.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(n){_t.__e(n,e.__v)}}))}function Jt(t,e,n){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==e||(t.__u=t(e))}else t.current=e}catch(i){_t.__e(i,n)}}function te(t,e,n){var r,i;if(_t.unmount&&_t.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Jt(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){_t.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&te(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||Lt(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function ee(t,e,n){return this.constructor(t,n)}function ne(t,e,n){var r,i,o,s;_t.__&&_t.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,o=[],s=[],Xt(e,t=(!r&&n||e).__k=Dt(jt,null,[t]),i||Ct,Ct,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?yt.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Zt(o,t,s)}function re(t,e){ne(t,e,re)}function ie(t,e,n){var r,i,o,s,a=Ft({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==o?r=e[o]:"ref"==o?i=e[o]:a[o]=void 0===e[o]&&void 0!==s?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?yt.call(arguments,2):n),Vt(t.type,a,r||t.key,i||t.ref,null)}function oe(t,e){var n={__c:e="__cC"+At++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,Gt(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}function se(){return(se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}yt=Rt.slice,_t={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},wt=0,Bt.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),"function"==typeof t&&(t=t(Ft({},n),this.props)),t&&Ft(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),Gt(this))},Bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Gt(this))},Bt.prototype.render=jt,bt=[],St="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kt=function(t,e){return t.__v.__b-e.__v.__b},Wt.__r=0,Et=0,Pt=Qt(!1),Tt=Qt(!0),At=0;var ae=["context","children"];function le(t){return this.getChildContext=function(){return t.context},ie(t.children,function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}(t,ae))}function ue(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=Dt(le,se({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var r=[],i={},o=0,s=e.attributes,a=e.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[ce(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=t(a[o],null),u=a[o].slot;u?i[u]=Dt(pe,{name:u},l):r[o]=l}var c=n?Dt(pe,null,r):r;return Dt(n||e.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?re:ne)(this._vdom,this._root)}function ce(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function de(t,e,n){if(this._vdom){var r={};r[t]=n=null==n?void 0:n,r[ce(t)]=n,this._vdom=ie(this._vdom,r),ne(this._vdom,this._root)}}function he(){ne(this._vdom=null,this._root)}function pe(t,e){var n=this;return Dt("slot",se({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var fe=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(Ty){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)})),this.tags=[],this.ctr=0},t}(),me="-ms-",ve="-moz-",ge="-webkit-",ye="comm",_e="rule",we="decl",be="@keyframes",xe=Math.abs,Se=String.fromCharCode,ke=Object.assign;function Ee(t){return t.trim()}function Pe(t,e,n){return t.replace(e,n)}function Te(t,e){return t.indexOf(e)}function Ae(t,e){return 0|t.charCodeAt(e)}function Ce(t,e,n){return t.slice(e,n)}function Re(t){return t.length}function Oe(t){return t.length}function Me(t,e){return e.push(t),t}var Fe=1,Le=1,De=0,Ve=0,Ie=0,je="";function Be(t,e,n,r,i,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Fe,column:Le,length:s,return:""}}function Ne(t,e){return ke(Be("",null,null,"",null,null,0),t,{length:-t.length},e)}function Ue(){return Ie=Ve<De?Ae(je,Ve++):0,Le++,10===Ie&&(Le=1,Fe++),Ie}function Ge(){return Ae(je,Ve)}function We(){return Ve}function He(t,e){return Ce(je,t,e)}function $e(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ze(t){return Fe=Le=1,De=Re(je=t),Ve=0,[]}function qe(t){return je="",t}function Ke(t){return Ee(He(Ve-1,Xe(91===t?t+2:40===t?t+1:t)))}function Ye(t){for(;(Ie=Ge())&&Ie<33;)Ue();return $e(t)>2||$e(Ie)>3?"":" "}function Qe(t,e){for(;--e&&Ue()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return He(t,We()+(e<6&&32==Ge()&&32==Ue()))}function Xe(t){for(;Ue();)switch(Ie){case t:return Ve;case 34:case 39:34!==t&&39!==t&&Xe(Ie);break;case 40:41===t&&Xe(t);break;case 92:Ue()}return Ve}function Ze(t,e){for(;Ue()&&t+Ie!==57&&(t+Ie!==84||47!==Ge()););return"/*"+He(e,Ve-1)+"*"+Se(47===t?t:Ue())}function Je(t){for(;!$e(Ge());)Ue();return He(t,Ve)}function tn(t){return qe(en("",null,null,null,[""],t=ze(t),0,[0],t))}function en(t,e,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,f=0,m=1,v=1,g=1,y=0,_="",w=i,b=o,x=r,S=_;v;)switch(f=y,y=Ue()){case 40:if(108!=f&&58==Ae(S,d-1)){-1!=Te(S+=Pe(Ke(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Ke(y);break;case 9:case 10:case 13:case 32:S+=Ye(f);break;case 92:S+=Qe(We()-1,7);continue;case 47:switch(Ge()){case 42:case 47:Me(rn(Ze(Ue(),We()),e,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Re(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=Pe(S,/\f/g,"")),p>0&&Re(S)-d&&Me(p>32?on(S+";",r,n,d-1):on(Pe(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Me(x=nn(S,e,n,u,c,i,a,_,w=[],b=[],d),o),123===y)if(0===c)en(S,e,x,x,w,o,d,a,b);else switch(99===h&&110===Ae(S,3)?100:h){case 100:case 108:case 109:case 115:en(t,x,x,r&&Me(nn(t,x,x,0,0,i,a,_,i,w=[],d),b),i,b,d,a,r?w:b);break;default:en(S,x,x,x,[""],b,0,a,b)}}u=c=p=0,m=g=1,_=S="",d=s;break;case 58:d=1+Re(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(Ie=Ve>0?Ae(je,--Ve):0,Le--,10===Ie&&(Le=1,Fe--),Ie))continue;switch(S+=Se(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Re(S)-1)*g,g=1;break;case 64:45===Ge()&&(S+=Ke(Ue())),h=Ge(),c=d=Re(_=S+=Je(We())),y++;break;case 45:45===f&&2==Re(S)&&(m=0)}}return o}function nn(t,e,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Oe(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=Ce(t,d+1,d=xe(m=s[f])),_=t;g<p;++g)(_=Ee(m>0?h[g]+" "+y:Pe(y,/&\f/g,h[g])))&&(l[v++]=_);return Be(t,e,n,0===i?_e:a,l,u,c)}function rn(t,e,n){return Be(t,e,n,ye,Se(Ie),Ce(t,2,-2),0)}function on(t,e,n,r){return Be(t,e,n,we,Ce(t,0,r),Ce(t,r+1,-1),r)}function sn(t,e){for(var n="",r=Oe(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function an(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case we:return t.return=t.return||t.value;case ye:return"";case be:return t.return=t.value+"{"+sn(t.children,r)+"}";case _e:t.value=t.props.join(",")}return Re(n=sn(t.children,r))?t.return=t.value+"{"+n+"}":""}function ln(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}var un=function(t,e,n){for(var r=0,i=0;r=i,i=Ge(),38===r&&12===i&&(e[n]=1),!$e(i);)Ue();return He(t,Ve)},cn=function(t,e){return qe(function(t,e){var n=-1,r=44;do{switch($e(r)){case 0:38===r&&12===Ge()&&(e[n]=1),t[n]+=un(Ve-1,e,n);break;case 2:t[n]+=Ke(r);break;case 4:if(44===r){t[++n]=58===Ge()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=Se(r)}}while(r=Ue());return t}(ze(t),e))},dn=new WeakMap,hn=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||dn.get(n))&&!r){dn.set(t,!0);for(var i=[],o=cn(e,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},pn=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function fn(t,e){switch(function(t,e){return 45^Ae(t,0)?(((e<<2^Ae(t,0))<<2^Ae(t,1))<<2^Ae(t,2))<<2^Ae(t,3):0}(t,e)){case 5103:return ge+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ge+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ge+t+ve+t+me+t+t;case 6828:case 4268:return ge+t+me+t+t;case 6165:return ge+t+me+"flex-"+t+t;case 5187:return ge+t+Pe(t,/(\w+).+(:[^]+)/,ge+"box-$1$2"+me+"flex-$1$2")+t;case 5443:return ge+t+me+"flex-item-"+Pe(t,/flex-|-self/,"")+t;case 4675:return ge+t+me+"flex-line-pack"+Pe(t,/align-content|flex-|-self/,"")+t;case 5548:return ge+t+me+Pe(t,"shrink","negative")+t;case 5292:return ge+t+me+Pe(t,"basis","preferred-size")+t;case 6060:return ge+"box-"+Pe(t,"-grow","")+ge+t+me+Pe(t,"grow","positive")+t;case 4554:return ge+Pe(t,/([^-])(transform)/g,"$1"+ge+"$2")+t;case 6187:return Pe(Pe(Pe(t,/(zoom-|grab)/,ge+"$1"),/(image-set)/,ge+"$1"),t,"")+t;case 5495:case 3959:return Pe(t,/(image-set\([^]*)/,ge+"$1$`$1");case 4968:return Pe(Pe(t,/(.+:)(flex-)?(.*)/,ge+"box-pack:$3"+me+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ge+t+t;case 4095:case 3583:case 4068:case 2532:return Pe(t,/(.+)-inline(.+)/,ge+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Re(t)-1-e>6)switch(Ae(t,e+1)){case 109:if(45!==Ae(t,e+4))break;case 102:return Pe(t,/(.+:)(.+)-([^]+)/,"$1"+ge+"$2-$3$1"+ve+(108==Ae(t,e+3)?"$3":"$2-$3"))+t;case 115:return~Te(t,"stretch")?fn(Pe(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==Ae(t,e+1))break;case 6444:switch(Ae(t,Re(t)-3-(~Te(t,"!important")&&10))){case 107:return Pe(t,":",":"+ge)+t;case 101:return Pe(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ge+(45===Ae(t,14)?"inline-":"")+"box$3$1"+ge+"$2$3$1"+me+"$2box$3")+t}break;case 5936:switch(Ae(t,e+11)){case 114:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ge+t+me+t+t}return t}var mn,vn,gn,yn,_n=[function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case we:t.return=fn(t.value,t.length);break;case be:return sn([Ne(t,{value:Pe(t.value,"@","@"+ge)})],r);case _e:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=e.exec(t))?t[0]:t}(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sn([Ne(t,{props:[Pe(e,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sn([Ne(t,{props:[Pe(e,/:(plac\w+)/,":"+ge+"input-$1")]}),Ne(t,{props:[Pe(e,/:(plac\w+)/,":-moz-$1")]}),Ne(t,{props:[Pe(e,/:(plac\w+)/,me+"input-$1")]})],r)}return""}))}}],wn=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var r,i,o=t.stylisPlugins||_n,s={},a=[];r=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n<e.length;n++)s[e[n]]=!0;a.push(t)}));var l,u,c,d,h=[an,(d=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&d(t)})],p=(u=[hn,pn].concat(o,h),c=Oe(u),function(t,e,n,r){for(var i="",o=0;o<c;o++)i+=u[o](t,e,n,r)||"";return i});i=function(t,e,n,r){l=n,sn(tn(t?t+"{"+e.styles+"}":e.styles),p),r&&(f.inserted[e.name]=!0)};var f={key:e,sheet:new fe({key:e,container:r,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},bn=0,xn=[],Sn=_t,kn=Sn.__b,En=Sn.__r,Pn=Sn.diffed,Tn=Sn.__c,An=Sn.unmount,Cn=Sn.__;function Rn(t,e){Sn.__h&&Sn.__h(vn,t,bn||e),bn=0;var n=vn.__H||(vn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function On(t){return bn=1,Mn(Kn,t)}function Mn(t,e,n){var r=Rn(mn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Kn(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vn,!vn.u)){var i=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&r.__c.props===t)&&(!o||o.call(this,t,e,n))};vn.u=!0;var o=vn.shouldComponentUpdate,s=vn.componentWillUpdate;vn.componentWillUpdate=function(t,e,n){if(this.__e){var r=o;o=void 0,i(t,e,n),o=r}s&&s.call(this,t,e,n)},vn.shouldComponentUpdate=i}return r.__N||r.__}function Fn(t,e){var n=Rn(mn++,3);!Sn.__s&&qn(n.__H,e)&&(n.__=t,n.i=e,vn.__H.__h.push(n))}function Ln(t,e){var n=Rn(mn++,4);!Sn.__s&&qn(n.__H,e)&&(n.__=t,n.i=e,vn.__h.push(n))}function Dn(t){return bn=5,In((function(){return{current:t}}),[])}function Vn(t,e,n){bn=6,Ln((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function In(t,e){var n=Rn(mn++,7);return qn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function jn(t,e){return bn=8,In((function(){return t}),e)}function Bn(t){var e=vn.context[t.__c],n=Rn(mn++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(vn)),e.props.value):t.__}function Nn(t,e){Sn.useDebugValue&&Sn.useDebugValue(e?e(t):t)}function Un(){var t=Rn(mn++,11);if(!t.__){for(var e=vn.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Gn(){for(var t;t=xn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($n),t.__H.__h.forEach(zn),t.__H.__h=[]}catch(O_){t.__H.__h=[],Sn.__e(O_,t.__v)}}Sn.__b=function(t){vn=null,kn&&kn(t)},Sn.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Cn&&Cn(t,e)},Sn.__r=function(t){En&&En(t),mn=0;var e=(vn=t.__c).__H;e&&(gn===vn?(e.__h=[],vn.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0}))):(e.__h.forEach($n),e.__h.forEach(zn),e.__h=[],mn=0)),gn=vn},Sn.diffed=function(t){Pn&&Pn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==xn.push(e)&&yn===Sn.requestAnimationFrame||((yn=Sn.requestAnimationFrame)||Hn)(Gn)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.i=void 0}))),gn=vn=null},Sn.__c=function(t,e){e.some((function(t){try{t.__h.forEach($n),t.__h=t.__h.filter((function(t){return!t.__||zn(t)}))}catch(c_){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Sn.__e(c_,t.__v)}})),Tn&&Tn(t,e)},Sn.unmount=function(t){An&&An(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{$n(t)}catch(n){e=n}})),n.__H=void 0,e&&Sn.__e(e,n.__v))};var Wn="function"==typeof requestAnimationFrame;function Hn(t){var e,n=function(){clearTimeout(r),Wn&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Wn&&(e=requestAnimationFrame(n))}function $n(t){var e=vn,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),vn=e}function zn(t){var e=vn;t.__c=t.__(),vn=e}function qn(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Kn(t,e){return"function"==typeof e?e(t):e}function Yn(t,e){for(var n in e)t[n]=e[n];return t}function Qn(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function Xn(t,e){this.props=t,this.context=e}function Zn(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:Qn(this.props,t)}function r(e){return this.shouldComponentUpdate=n,Dt(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xn.prototype=new Bt).isPureReactComponent=!0,Xn.prototype.shouldComponentUpdate=function(t,e){return Qn(this.props,t)||Qn(this.state,e)};var Jn=_t.__b;_t.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Jn&&Jn(t)};var tr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function er(t){function e(e){var n=Yn({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=tr,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var nr=function(t,e){return null==t?null:zt(zt(t).map(e))},rr={map:nr,forEach:nr,count:function(t){return t?zt(t).length:0},only:function(t){var e=zt(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:zt},ir=_t.__e;_t.__e=function(t,e,n,r){if(t.then)for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);ir(t,e,n,r)};var or=_t.unmount;function sr(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Yn({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return sr(t,e,n)}))),t}function ar(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return ar(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function lr(){this.__u=0,this.t=null,this.__b=null}function ur(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function cr(t){var e,n,r;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return Dt(n,i)}return i.displayName="Lazy",i.__f=!0,i}function dr(){this.u=null,this.o=null}_t.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),or&&or(t)},(lr.prototype=new Bt).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=ur(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 t=r.state.__a;r.__v.__k[0]=ar(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},lr.prototype.componentWillUnmount=function(){this.t=[]},lr.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]=sr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Dt(jt,null,t.fallback);return i&&(i.__u&=-33),[Dt(jt,null,e.__a?null:t.children),i]};var hr=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function pr(t){return this.getChildContext=function(){return t.context},t.children}function fr(t){var e=this,n=t.i;e.componentWillUnmount=function(){ne(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),ne(Dt(pr,{context:e.context},t.__v),e.l)}function mr(t,e){var n=Dt(fr,{__v:t,i:e});return n.containerInfo=e,n}(dr.prototype=new Bt).__a=function(t){var e=this,n=ur(e.__v),r=e.o.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),hr(e,t,r)):i()};n?n(o):o()}},dr.prototype.render=function(t){this.u=null,this.o=new Map;var e=zt(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},dr.prototype.componentDidUpdate=dr.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){hr(t,n,e)}))};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,gr=/^(?: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]/,yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_r=/[A-Z0-9]/g,wr="undefined"!=typeof document,br=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function xr(t,e,n){return null==e.__k&&(e.textContent=""),ne(t,e),"function"==typeof n&&n(),t?t.__c:null}function Sr(t,e,n){return re(t,e),"function"==typeof n&&n(),t?t.__c:null}Bt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(Bt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var kr=_t.event;function Er(){}function Pr(){return this.cancelBubble}function Tr(){return this.defaultPrevented}_t.event=function(t){return kr&&(t=kr(t)),t.persist=Er,t.isPropagationStopped=Pr,t.isDefaultPrevented=Tr,t.nativeEvent=t};var Ar,Cr={enumerable:!1,configurable:!0,get:function(){return this.class}},Rr=_t.vnode;_t.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},i=-1===n.indexOf("-");for(var o in e){var s=e[o];if(!("value"===o&&"defaultValue"in e&&null==s||wr&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||br(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":yr.test(o)&&(o=a):a=o="oninput":i&&gr.test(o)?o=o.replace(_r,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=zt(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=zt(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Cr)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=vr,Rr&&Rr(t)};var Or=_t.__r;_t.__r=function(t){Or&&Or(t),Ar=t.__c};var Mr=_t.diffed;_t.diffed=function(t){Mr&&Mr(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),Ar=null};var Fr={ReactCurrentDispatcher:{current:{readContext:function(t){return Ar.__n[t.__c].props.value},useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Fn,useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Mn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr}}};function Lr(t){return Dt.bind(null,t)}function Dr(t){return!!t&&t.$$typeof===vr}function Vr(t){return Dr(t)&&t.type===jt}function Ir(t){return!!t&&!!t.displayName&&("string"==typeof t.displayName||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function jr(t){return Dr(t)?ie.apply(null,arguments):t}function Br(t){return!!t.__k&&(ne(null,t),!0)}function Nr(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ur=function(t,e){return t(e)},Gr=function(t,e){return t(e)},Wr=jt;function Hr(t){t()}function $r(t){return t}function zr(){return[!1,Hr]}var qr=Ln,Kr=Dr;function Yr(t,e){var n=e(),r=On({h:{__:n,v:e}}),i=r[0].h,o=r[1];return Ln((function(){i.__=n,i.v=e,Qr(i)&&o({h:i})}),[t,n,e]),Fn((function(){return Qr(i)&&o({h:i}),t((function(){Qr(i)&&o({h:i})}))}),[t]),n}function Qr(t){var e,n,r=t.v,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}var Xr={useState:On,useId:Un,useReducer:Mn,useEffect:Fn,useLayoutEffect:Ln,useInsertionEffect:qr,useTransition:zr,useDeferredValue:$r,useSyncExternalStore:Yr,startTransition:Hr,useRef:Dn,useImperativeHandle:Vn,useMemo:In,useCallback:jn,useContext:Bn,useDebugValue:Nn,version:"17.0.2",Children:rr,render:xr,hydrate:Sr,unmountComponentAtNode:Br,createPortal:mr,createElement:Dt,createContext:oe,createFactory:Lr,cloneElement:jr,createRef:It,Fragment:jt,isValidElement:Dr,isElement:Kr,isFragment:Vr,isMemo:Ir,findDOMNode:Nr,Component:Bt,PureComponent:Xn,memo:Zn,forwardRef:er,flushSync:Gr,unstable_batchedUpdates:Ur,StrictMode:Wr,Suspense:lr,SuspenseList:dr,lazy:cr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fr};const Zr=Object.freeze(Object.defineProperty({__proto__:null,Children:rr,Component:Bt,Fragment:jt,PureComponent:Xn,StrictMode:Wr,Suspense:lr,SuspenseList:dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fr,cloneElement:jr,createContext:oe,createElement:Dt,createFactory:Lr,createPortal:mr,createRef:It,default:Xr,findDOMNode:Nr,flushSync:Gr,forwardRef:er,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Ur,useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Fn,useErrorBoundary:function(t){var e=Rn(mn++,10),n=On();return e.__=t,vn.componentDidCatch||(vn.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Mn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jr.apply(null,arguments)}var ti={exports:{}},ei={},ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,ii=ni?Symbol.for("react.portal"):60106,oi=ni?Symbol.for("react.fragment"):60107,si=ni?Symbol.for("react.strict_mode"):60108,ai=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,di=ni?Symbol.for("react.concurrent_mode"):60111,hi=ni?Symbol.for("react.forward_ref"):60112,pi=ni?Symbol.for("react.suspense"):60113,fi=ni?Symbol.for("react.suspense_list"):60120,mi=ni?Symbol.for("react.memo"):60115,vi=ni?Symbol.for("react.lazy"):60116,gi=ni?Symbol.for("react.block"):60121,yi=ni?Symbol.for("react.fundamental"):60117,_i=ni?Symbol.for("react.responder"):60118,wi=ni?Symbol.for("react.scope"):60119;function bi(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case ri:switch(t=t.type){case ci:case di:case oi:case ai:case si:case pi:return t;default:switch(t=t&&t.$$typeof){case ui:case hi:case vi:case mi:case li:return t;default:return e}}case ii:return e}}}function xi(t){return bi(t)===di}ei.AsyncMode=ci,ei.ConcurrentMode=di,ei.ContextConsumer=ui,ei.ContextProvider=li,ei.Element=ri,ei.ForwardRef=hi,ei.Fragment=oi,ei.Lazy=vi,ei.Memo=mi,ei.Portal=ii,ei.Profiler=ai,ei.StrictMode=si,ei.Suspense=pi,ei.isAsyncMode=function(t){return xi(t)||bi(t)===ci},ei.isConcurrentMode=xi,ei.isContextConsumer=function(t){return bi(t)===ui},ei.isContextProvider=function(t){return bi(t)===li},ei.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===ri},ei.isForwardRef=function(t){return bi(t)===hi},ei.isFragment=function(t){return bi(t)===oi},ei.isLazy=function(t){return bi(t)===vi},ei.isMemo=function(t){return bi(t)===mi},ei.isPortal=function(t){return bi(t)===ii},ei.isProfiler=function(t){return bi(t)===ai},ei.isStrictMode=function(t){return bi(t)===si},ei.isSuspense=function(t){return bi(t)===pi},ei.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===oi||t===di||t===ai||t===si||t===pi||t===fi||"object"==typeof t&&null!==t&&(t.$$typeof===vi||t.$$typeof===mi||t.$$typeof===li||t.$$typeof===ui||t.$$typeof===hi||t.$$typeof===yi||t.$$typeof===_i||t.$$typeof===wi||t.$$typeof===gi)},ei.typeOf=bi,ti.exports=ei;var Si=ti.exports,ki={};ki[Si.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ki[Si.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Ei(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}var Pi=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},Ti=function(t,e,n){Pi(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}};var Ai={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ci=!1,Ri=/[A-Z]|^ms/g,Oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mi=function(t){return 45===t.charCodeAt(1)},Fi=function(t){return null!=t&&"boolean"!=typeof t},Li=ln((function(t){return Mi(t)?t:t.replace(Ri,"-$&").toLowerCase()})),Di=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(Oi,(function(t,e,n){return ji={name:e,styles:n,next:ji},e}))}return 1===Ai[t]||Mi(t)||"number"!=typeof e||0===e?e:e+"px"},Vi="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ii(t,e,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ji={name:i.name,styles:i.styles,next:ji},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)ji={name:s.name,styles:s.styles,next:ji},s=s.next;return o.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(t,e,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=e&&void 0!==e[a]?r+=o+"{"+e[a]+"}":Fi(a)&&(r+=Li(o)+":"+Di(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&Ci)throw new Error(Vi);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var l=Ii(t,e,s);switch(o){case"animation":case"animationName":r+=Li(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)Fi(s[u])&&(r+=Li(o)+":"+Di(o,s[u])+";")}}return r}(t,e,n);case"function":if(void 0!==t){var a=ji,l=n(t);return ji=a,Ii(t,e,l)}}var u=n;if(null==e)return u;var c=e[u];return void 0!==c?c:u}var ji,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Ni(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,i="";ji=void 0;var o=t[0];null==o||void 0===o.raw?(r=!1,i+=Ii(n,e,o)):i+=o[0];for(var s=1;s<t.length;s++){if(i+=Ii(n,e,t[s]),r)i+=o[s]}Bi.lastIndex=0;for(var a,l="";null!==(a=Bi.exec(i));)l+="-"+a[1];var u=function(t){for(var e,n=0,r=0,i=t.length;i>=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ji}}var Ui=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Gi=Ui||function(t){return t()},Wi=Ui||Ln,Hi=oe("undefined"!=typeof HTMLElement?wn({key:"css"}):null),$i=Hi.Provider,zi=function(t){return er((function(e,n){var r=Bn(Hi);return t(e,r,n)}))},qi=oe({}),Ki={}.hasOwnProperty,Yi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qi=function(t,e){var n={};for(var r in e)Ki.call(e,r)&&(n[r]=e[r]);return n[Yi]=t,n},Xi=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return Pi(e,n,r),Gi((function(){return Ti(e,n,r)})),null},Zi=zi((function(t,e,n){var r=t.css;"string"==typeof r&&void 0!==e.registered[r]&&(r=e.registered[r]);var i=t[Yi],o=[r],s="";"string"==typeof t.className?s=Ei(e.registered,o,t.className):null!=t.className&&(s=t.className+" ");var a=Ni(o,void 0,Bn(qi));s+=e.key+"-"+a.name;var l={};for(var u in t)Ki.call(t,u)&&"css"!==u&&u!==Yi&&(l[u]=t[u]);return l.className=s,n&&(l.ref=n),Dt(jt,null,Dt(Xi,{cache:e,serialized:a,isStringTag:"string"==typeof i}),Dt(i,l))})),Ji=zi((function(t,e){var n=Ni([t.styles],void 0,Bn(qi)),r=Dn();return Wi((function(){var t=e.key+"-global",i=new e.sheet.constructor({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+t+" "+n.name+'"]');return e.sheet.tags.length&&(i.before=e.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",t),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[e]),Wi((function(){var t=r.current,i=t[0];if(t[1])t[1]=!1;else{if(void 0!==n.next&&Ti(e,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}e.insert("",n,i,!1)}}),[e,n.name]),null}));function to(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ni(e)}var eo=0;function no(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)"ref"==a?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return _t.vnode&&_t.vnode(u),u}var ro=jt;function io(t,e,n){return Ki.call(e,"css")?no(Zi,Qi(t,e),n):no(t,e,n)}function oo(t,e,n){return Ki.call(e,"css")?no(Zi,Qi(t,e),n):no(t,e,n)}const so=to({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),ao=()=>oo(jt,{children:[io(Ji,{styles:to`
|
|
1
|
+
var __defProp=Object.defineProperty,__typeError=t=>{throw TypeError(t)},__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__publicField=(t,e,n)=>__defNormalProp(t,"symbol"!=typeof e?e+"":e,n),__accessCheck=(t,e,n)=>e.has(t)||__typeError("Cannot "+n),__privateGet=(t,e,n)=>(__accessCheck(t,e,"read from private field"),n?n.call(t):e.get(t)),__privateAdd=(t,e,n)=>e.has(t)?__typeError("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),__privateSet=(t,e,n,r)=>(__accessCheck(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),__privateMethod=(t,e,n)=>(__accessCheck(t,e,"access private method"),n),__privateWrapper=(t,e,n,r)=>({set _(r){__privateSet(t,e,r,n)},get _(){return __privateGet(t,e,r)}});!function(){"use strict";var t,e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P,T,A,C,R,O,M,F,L,D,V,I,j,B,N,U,G,W,H,$,z,q,K,Y,Q,X,Z,J,tt,et,nt,rt,it,ot,st,at,lt,ut,ct,dt,ht,pt,ft,mt,vt,gt,yt,_t,wt,bt,xt,St,kt,Et,Pt,Tt,At,Ct={},Rt=[],Ot=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mt=Array.isArray;function Ft(t,e){for(var n in e)t[n]=e[n];return t}function Lt(t){var e=t.parentNode;e&&e.removeChild(t)}function Dt(t,e,n){var r,i,o,s={};for(o in e)"key"==o?r=e[o]:"ref"==o?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?yt.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return Vt(t,s,r,i,null)}function Vt(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++wt:i,__i:-1,__u:0};return null==i&&null!=_t.vnode&&_t.vnode(o),o}function It(){return{current:null}}function jt(t){return t.children}function Bt(t,e){this.props=t,this.context=e}function Nt(t,e){if(null==e)return t.__?Nt(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Nt(t):null}function Ut(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Ut(t)}}function Gt(t){(!t.__d&&(t.__d=!0)&&bt.push(t)&&!Wt.__r++||xt!==_t.debounceRendering)&&((xt=_t.debounceRendering)||St)(Wt)}function Wt(){var t,e,n,r,i,o,s,a;for(bt.sort(kt);t=bt.shift();)t.__d&&(e=bt.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=Ft({},i)).__v=i.__v+1,_t.vnode&&_t.vnode(r),Xt(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?Nt(i):o,!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Zt(s,r,a),r.__e!=o&&Ut(r)),bt.length>e&&bt.sort(kt));Wt.__r=0}function Ht(t,e,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||Rt,g=e.length;for(n.__d=l,function(t,e,n){var r,i,o,s,a,l=e.length,u=n.length,c=u,d=0;for(t.__k=[],r=0;r<l;r++)s=r+d,null!=(i=t.__k[r]=null==(i=e[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Vt(null,i,null,null,null):Mt(i)?Vt(jt,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Vt(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,a=qt(i,n,s,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:a>s?c>l-s?d+=a-s:d--:a<s&&(a==s-d?d-=a-s:d++),a!==r+d&&(i.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=Nt(o)),te(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=Nt(o)),te(o,o))}(n,e,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?Ct:v[p.__i]||Ct,p.__i=d,Xt(t,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Jt(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),65536&p.__u||h.__k===p.__k?l=$t(p,l,t):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=m}function $t(t,e,n){var r,i;if("function"==typeof t.type){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=$t(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Nt(t)),n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function zt(t,e){return e=e||[],null==t||"boolean"==typeof t||(Mt(t)?t.some((function(t){zt(t,e)})):e.push(t)),e}function qt(t,e,n,r){var i=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function Kt(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||Ot.test(e)?n:n+"px"}function Yt(t,e,n,r,i){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Kt(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Kt(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Et,t.addEventListener(e,o?Tt:Pt,o)):t.removeEventListener(e,o?Tt:Pt,o);else{if("http://www.w3.org/2000/svg"==i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function Qt(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=Et++;else if(e.t<n.u)return;return n(_t.event?_t.event(e):e)}}}function Xt(t,e,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g,y,_,w,b,x,S,k,E,P=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=_t.__b)&&c(e);t:if("function"==typeof P)try{if(g=e.props,y="prototype"in P&&P.prototype.render,_=(c=P.contextType)&&r[c.__c],w=c?_?_.props.value:c.__:r,n.__c?v=(d=e.__c=n.__c).__=d.__E:(y?e.__c=d=new P(g,w):(e.__c=d=new Bt(g,w),d.constructor=P,d.render=ee),_&&_.sub(d),d.props=g,d.state||(d.state={}),d.context=w,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Ft({},d.__s)),Ft(d.__s,P.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=e,h)y&&null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,w)||e.__v===n.__v)){for(e.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,w),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,m)}))}if(d.context=w,d.props=g,d.__P=t,d.__e=!1,x=_t.__r,S=0,y){for(d.state=d.__s,d.__d=!1,x&&x(e),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(e),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Ft(Ft({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),Ht(t,Mt(E=null!=c&&c.type===jt&&null==c.key?c.props.children:c)?E:[E],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(e.__v=null,l||null!=o){for(e.__u|=l?160:32;a&&8===a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else e.__e=n.__e,e.__k=n.__k;_t.__e(T,e,n)}else null==o&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(t,e,n,r,i,o,s,a,l){var u,c,d,h,p,f,m,v=n.props,g=e.props,y=e.type;if("svg"===y?i="http://www.w3.org/2000/svg":"math"===y?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){t=p,o[u]=null;break}if(null==t){if(null===y)return document.createTextNode(g);t=document.createElementNS(i,y,g.is&&g),o=null,a=!1}if(null===y)v===g||a&&t.data===g||(t.data=g);else{if(o=o&&yt.call(t.childNodes),v=n.props||Ct,!a&&null!=o)for(v={},u=0;u<t.attributes.length;u++)v[(p=t.attributes[u]).name]=p.value;for(u in v)if(p=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=p;else if("key"!==u&&!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;Yt(t,u,null,p,i)}for(u in g)p=g[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?f=p:"checked"==u?m=p:"key"===u||a&&"function"!=typeof p||v[u]===p||Yt(t,u,p,v[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),Ht(t,Mt(h)?h:[h],e,n,r,"foreignObject"===y?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Nt(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&Lt(o[u]);a||(u="value",void 0!==f&&(f!==t[u]||"progress"===y&&!f||"option"===y&&f!==v[u])&&Yt(t,u,f,v[u],i),u="checked",void 0!==m&&m!==t[u]&&Yt(t,u,m,v[u],i))}return t}(n.__e,e,n,r,i,o,s,l,u);(c=_t.diffed)&&c(e)}function Zt(t,e,n){e.__d=void 0;for(var r=0;r<n.length;r++)Jt(n[r],n[++r],n[++r]);_t.__c&&_t.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(n){_t.__e(n,e.__v)}}))}function Jt(t,e,n){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==e||(t.__u=t(e))}else t.current=e}catch(i){_t.__e(i,n)}}function te(t,e,n){var r,i;if(_t.unmount&&_t.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Jt(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){_t.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&te(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||Lt(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function ee(t,e,n){return this.constructor(t,n)}function ne(t,e,n){var r,i,o,s;_t.__&&_t.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,o=[],s=[],Xt(e,t=(!r&&n||e).__k=Dt(jt,null,[t]),i||Ct,Ct,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?yt.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Zt(o,t,s)}function re(t,e){ne(t,e,re)}function ie(t,e,n){var r,i,o,s,a=Ft({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==o?r=e[o]:"ref"==o?i=e[o]:a[o]=void 0===e[o]&&void 0!==s?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?yt.call(arguments,2):n),Vt(t.type,a,r||t.key,i||t.ref,null)}function oe(t,e){var n={__c:e="__cC"+At++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,Gt(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}function se(){return(se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}yt=Rt.slice,_t={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},wt=0,Bt.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),"function"==typeof t&&(t=t(Ft({},n),this.props)),t&&Ft(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),Gt(this))},Bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Gt(this))},Bt.prototype.render=jt,bt=[],St="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kt=function(t,e){return t.__v.__b-e.__v.__b},Wt.__r=0,Et=0,Pt=Qt(!1),Tt=Qt(!0),At=0;var ae=["context","children"];function le(t){return this.getChildContext=function(){return t.context},ie(t.children,function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}(t,ae))}function ue(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=Dt(le,se({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var r=[],i={},o=0,s=e.attributes,a=e.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[ce(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=t(a[o],null),u=a[o].slot;u?i[u]=Dt(pe,{name:u},l):r[o]=l}var c=n?Dt(pe,null,r):r;return Dt(n||e.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?re:ne)(this._vdom,this._root)}function ce(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function de(t,e,n){if(this._vdom){var r={};r[t]=n=null==n?void 0:n,r[ce(t)]=n,this._vdom=ie(this._vdom,r),ne(this._vdom,this._root)}}function he(){ne(this._vdom=null,this._root)}function pe(t,e){var n=this;return Dt("slot",se({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var fe=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(Cy){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)})),this.tags=[],this.ctr=0},t}(),me="-ms-",ve="-moz-",ge="-webkit-",ye="comm",_e="rule",we="decl",be="@keyframes",xe=Math.abs,Se=String.fromCharCode,ke=Object.assign;function Ee(t){return t.trim()}function Pe(t,e,n){return t.replace(e,n)}function Te(t,e){return t.indexOf(e)}function Ae(t,e){return 0|t.charCodeAt(e)}function Ce(t,e,n){return t.slice(e,n)}function Re(t){return t.length}function Oe(t){return t.length}function Me(t,e){return e.push(t),t}var Fe=1,Le=1,De=0,Ve=0,Ie=0,je="";function Be(t,e,n,r,i,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Fe,column:Le,length:s,return:""}}function Ne(t,e){return ke(Be("",null,null,"",null,null,0),t,{length:-t.length},e)}function Ue(){return Ie=Ve<De?Ae(je,Ve++):0,Le++,10===Ie&&(Le=1,Fe++),Ie}function Ge(){return Ae(je,Ve)}function We(){return Ve}function He(t,e){return Ce(je,t,e)}function $e(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ze(t){return Fe=Le=1,De=Re(je=t),Ve=0,[]}function qe(t){return je="",t}function Ke(t){return Ee(He(Ve-1,Xe(91===t?t+2:40===t?t+1:t)))}function Ye(t){for(;(Ie=Ge())&&Ie<33;)Ue();return $e(t)>2||$e(Ie)>3?"":" "}function Qe(t,e){for(;--e&&Ue()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return He(t,We()+(e<6&&32==Ge()&&32==Ue()))}function Xe(t){for(;Ue();)switch(Ie){case t:return Ve;case 34:case 39:34!==t&&39!==t&&Xe(Ie);break;case 40:41===t&&Xe(t);break;case 92:Ue()}return Ve}function Ze(t,e){for(;Ue()&&t+Ie!==57&&(t+Ie!==84||47!==Ge()););return"/*"+He(e,Ve-1)+"*"+Se(47===t?t:Ue())}function Je(t){for(;!$e(Ge());)Ue();return He(t,Ve)}function tn(t){return qe(en("",null,null,null,[""],t=ze(t),0,[0],t))}function en(t,e,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,h=0,p=0,f=0,m=1,v=1,g=1,y=0,_="",w=i,b=o,x=r,S=_;v;)switch(f=y,y=Ue()){case 40:if(108!=f&&58==Ae(S,d-1)){-1!=Te(S+=Pe(Ke(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Ke(y);break;case 9:case 10:case 13:case 32:S+=Ye(f);break;case 92:S+=Qe(We()-1,7);continue;case 47:switch(Ge()){case 42:case 47:Me(rn(Ze(Ue(),We()),e,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Re(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=Pe(S,/\f/g,"")),p>0&&Re(S)-d&&Me(p>32?on(S+";",r,n,d-1):on(Pe(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Me(x=nn(S,e,n,u,c,i,a,_,w=[],b=[],d),o),123===y)if(0===c)en(S,e,x,x,w,o,d,a,b);else switch(99===h&&110===Ae(S,3)?100:h){case 100:case 108:case 109:case 115:en(t,x,x,r&&Me(nn(t,x,x,0,0,i,a,_,i,w=[],d),b),i,b,d,a,r?w:b);break;default:en(S,x,x,x,[""],b,0,a,b)}}u=c=p=0,m=g=1,_=S="",d=s;break;case 58:d=1+Re(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(Ie=Ve>0?Ae(je,--Ve):0,Le--,10===Ie&&(Le=1,Fe--),Ie))continue;switch(S+=Se(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Re(S)-1)*g,g=1;break;case 64:45===Ge()&&(S+=Ke(Ue())),h=Ge(),c=d=Re(_=S+=Je(We())),y++;break;case 45:45===f&&2==Re(S)&&(m=0)}}return o}function nn(t,e,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Oe(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=Ce(t,d+1,d=xe(m=s[f])),_=t;g<p;++g)(_=Ee(m>0?h[g]+" "+y:Pe(y,/&\f/g,h[g])))&&(l[v++]=_);return Be(t,e,n,0===i?_e:a,l,u,c)}function rn(t,e,n){return Be(t,e,n,ye,Se(Ie),Ce(t,2,-2),0)}function on(t,e,n,r){return Be(t,e,n,we,Ce(t,0,r),Ce(t,r+1,-1),r)}function sn(t,e){for(var n="",r=Oe(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function an(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case we:return t.return=t.return||t.value;case ye:return"";case be:return t.return=t.value+"{"+sn(t.children,r)+"}";case _e:t.value=t.props.join(",")}return Re(n=sn(t.children,r))?t.return=t.value+"{"+n+"}":""}function ln(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}var un=function(t,e,n){for(var r=0,i=0;r=i,i=Ge(),38===r&&12===i&&(e[n]=1),!$e(i);)Ue();return He(t,Ve)},cn=function(t,e){return qe(function(t,e){var n=-1,r=44;do{switch($e(r)){case 0:38===r&&12===Ge()&&(e[n]=1),t[n]+=un(Ve-1,e,n);break;case 2:t[n]+=Ke(r);break;case 4:if(44===r){t[++n]=58===Ge()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=Se(r)}}while(r=Ue());return t}(ze(t),e))},dn=new WeakMap,hn=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||dn.get(n))&&!r){dn.set(t,!0);for(var i=[],o=cn(e,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},pn=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function fn(t,e){switch(function(t,e){return 45^Ae(t,0)?(((e<<2^Ae(t,0))<<2^Ae(t,1))<<2^Ae(t,2))<<2^Ae(t,3):0}(t,e)){case 5103:return ge+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ge+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ge+t+ve+t+me+t+t;case 6828:case 4268:return ge+t+me+t+t;case 6165:return ge+t+me+"flex-"+t+t;case 5187:return ge+t+Pe(t,/(\w+).+(:[^]+)/,ge+"box-$1$2"+me+"flex-$1$2")+t;case 5443:return ge+t+me+"flex-item-"+Pe(t,/flex-|-self/,"")+t;case 4675:return ge+t+me+"flex-line-pack"+Pe(t,/align-content|flex-|-self/,"")+t;case 5548:return ge+t+me+Pe(t,"shrink","negative")+t;case 5292:return ge+t+me+Pe(t,"basis","preferred-size")+t;case 6060:return ge+"box-"+Pe(t,"-grow","")+ge+t+me+Pe(t,"grow","positive")+t;case 4554:return ge+Pe(t,/([^-])(transform)/g,"$1"+ge+"$2")+t;case 6187:return Pe(Pe(Pe(t,/(zoom-|grab)/,ge+"$1"),/(image-set)/,ge+"$1"),t,"")+t;case 5495:case 3959:return Pe(t,/(image-set\([^]*)/,ge+"$1$`$1");case 4968:return Pe(Pe(t,/(.+:)(flex-)?(.*)/,ge+"box-pack:$3"+me+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ge+t+t;case 4095:case 3583:case 4068:case 2532:return Pe(t,/(.+)-inline(.+)/,ge+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Re(t)-1-e>6)switch(Ae(t,e+1)){case 109:if(45!==Ae(t,e+4))break;case 102:return Pe(t,/(.+:)(.+)-([^]+)/,"$1"+ge+"$2-$3$1"+ve+(108==Ae(t,e+3)?"$3":"$2-$3"))+t;case 115:return~Te(t,"stretch")?fn(Pe(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==Ae(t,e+1))break;case 6444:switch(Ae(t,Re(t)-3-(~Te(t,"!important")&&10))){case 107:return Pe(t,":",":"+ge)+t;case 101:return Pe(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ge+(45===Ae(t,14)?"inline-":"")+"box$3$1"+ge+"$2$3$1"+me+"$2box$3")+t}break;case 5936:switch(Ae(t,e+11)){case 114:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ge+t+me+Pe(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ge+t+me+t+t}return t}var mn,vn,gn,yn,_n=[function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case we:t.return=fn(t.value,t.length);break;case be:return sn([Ne(t,{value:Pe(t.value,"@","@"+ge)})],r);case _e:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=e.exec(t))?t[0]:t}(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sn([Ne(t,{props:[Pe(e,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sn([Ne(t,{props:[Pe(e,/:(plac\w+)/,":"+ge+"input-$1")]}),Ne(t,{props:[Pe(e,/:(plac\w+)/,":-moz-$1")]}),Ne(t,{props:[Pe(e,/:(plac\w+)/,me+"input-$1")]})],r)}return""}))}}],wn=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var r,i,o=t.stylisPlugins||_n,s={},a=[];r=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n<e.length;n++)s[e[n]]=!0;a.push(t)}));var l,u,c,d,h=[an,(d=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&d(t)})],p=(u=[hn,pn].concat(o,h),c=Oe(u),function(t,e,n,r){for(var i="",o=0;o<c;o++)i+=u[o](t,e,n,r)||"";return i});i=function(t,e,n,r){l=n,sn(tn(t?t+"{"+e.styles+"}":e.styles),p),r&&(f.inserted[e.name]=!0)};var f={key:e,sheet:new fe({key:e,container:r,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},bn=0,xn=[],Sn=_t,kn=Sn.__b,En=Sn.__r,Pn=Sn.diffed,Tn=Sn.__c,An=Sn.unmount,Cn=Sn.__;function Rn(t,e){Sn.__h&&Sn.__h(vn,t,bn||e),bn=0;var n=vn.__H||(vn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function On(t){return bn=1,Mn(Kn,t)}function Mn(t,e,n){var r=Rn(mn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Kn(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vn,!vn.u)){var i=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&r.__c.props===t)&&(!o||o.call(this,t,e,n))};vn.u=!0;var o=vn.shouldComponentUpdate,s=vn.componentWillUpdate;vn.componentWillUpdate=function(t,e,n){if(this.__e){var r=o;o=void 0,i(t,e,n),o=r}s&&s.call(this,t,e,n)},vn.shouldComponentUpdate=i}return r.__N||r.__}function Fn(t,e){var n=Rn(mn++,3);!Sn.__s&&qn(n.__H,e)&&(n.__=t,n.i=e,vn.__H.__h.push(n))}function Ln(t,e){var n=Rn(mn++,4);!Sn.__s&&qn(n.__H,e)&&(n.__=t,n.i=e,vn.__h.push(n))}function Dn(t){return bn=5,In((function(){return{current:t}}),[])}function Vn(t,e,n){bn=6,Ln((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function In(t,e){var n=Rn(mn++,7);return qn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function jn(t,e){return bn=8,In((function(){return t}),e)}function Bn(t){var e=vn.context[t.__c],n=Rn(mn++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(vn)),e.props.value):t.__}function Nn(t,e){Sn.useDebugValue&&Sn.useDebugValue(e?e(t):t)}function Un(){var t=Rn(mn++,11);if(!t.__){for(var e=vn.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Gn(){for(var t;t=xn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($n),t.__H.__h.forEach(zn),t.__H.__h=[]}catch(F_){t.__H.__h=[],Sn.__e(F_,t.__v)}}Sn.__b=function(t){vn=null,kn&&kn(t)},Sn.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Cn&&Cn(t,e)},Sn.__r=function(t){En&&En(t),mn=0;var e=(vn=t.__c).__H;e&&(gn===vn?(e.__h=[],vn.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0}))):(e.__h.forEach($n),e.__h.forEach(zn),e.__h=[],mn=0)),gn=vn},Sn.diffed=function(t){Pn&&Pn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==xn.push(e)&&yn===Sn.requestAnimationFrame||((yn=Sn.requestAnimationFrame)||Hn)(Gn)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.i=void 0}))),gn=vn=null},Sn.__c=function(t,e){e.some((function(t){try{t.__h.forEach($n),t.__h=t.__h.filter((function(t){return!t.__||zn(t)}))}catch(h_){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Sn.__e(h_,t.__v)}})),Tn&&Tn(t,e)},Sn.unmount=function(t){An&&An(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{$n(t)}catch(n){e=n}})),n.__H=void 0,e&&Sn.__e(e,n.__v))};var Wn="function"==typeof requestAnimationFrame;function Hn(t){var e,n=function(){clearTimeout(r),Wn&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Wn&&(e=requestAnimationFrame(n))}function $n(t){var e=vn,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),vn=e}function zn(t){var e=vn;t.__c=t.__(),vn=e}function qn(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Kn(t,e){return"function"==typeof e?e(t):e}function Yn(t,e){for(var n in e)t[n]=e[n];return t}function Qn(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function Xn(t,e){this.props=t,this.context=e}function Zn(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:Qn(this.props,t)}function r(e){return this.shouldComponentUpdate=n,Dt(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xn.prototype=new Bt).isPureReactComponent=!0,Xn.prototype.shouldComponentUpdate=function(t,e){return Qn(this.props,t)||Qn(this.state,e)};var Jn=_t.__b;_t.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Jn&&Jn(t)};var tr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function er(t){function e(e){var n=Yn({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=tr,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var nr=function(t,e){return null==t?null:zt(zt(t).map(e))},rr={map:nr,forEach:nr,count:function(t){return t?zt(t).length:0},only:function(t){var e=zt(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:zt},ir=_t.__e;_t.__e=function(t,e,n,r){if(t.then)for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);ir(t,e,n,r)};var or=_t.unmount;function sr(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Yn({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return sr(t,e,n)}))),t}function ar(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return ar(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function lr(){this.__u=0,this.t=null,this.__b=null}function ur(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function cr(t){var e,n,r;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return Dt(n,i)}return i.displayName="Lazy",i.__f=!0,i}function dr(){this.u=null,this.o=null}_t.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),or&&or(t)},(lr.prototype=new Bt).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=ur(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 t=r.state.__a;r.__v.__k[0]=ar(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},lr.prototype.componentWillUnmount=function(){this.t=[]},lr.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]=sr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Dt(jt,null,t.fallback);return i&&(i.__u&=-33),[Dt(jt,null,e.__a?null:t.children),i]};var hr=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function pr(t){return this.getChildContext=function(){return t.context},t.children}function fr(t){var e=this,n=t.i;e.componentWillUnmount=function(){ne(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),ne(Dt(pr,{context:e.context},t.__v),e.l)}function mr(t,e){var n=Dt(fr,{__v:t,i:e});return n.containerInfo=e,n}(dr.prototype=new Bt).__a=function(t){var e=this,n=ur(e.__v),r=e.o.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),hr(e,t,r)):i()};n?n(o):o()}},dr.prototype.render=function(t){this.u=null,this.o=new Map;var e=zt(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},dr.prototype.componentDidUpdate=dr.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){hr(t,n,e)}))};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,gr=/^(?: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]/,yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_r=/[A-Z0-9]/g,wr="undefined"!=typeof document,br=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function xr(t,e,n){return null==e.__k&&(e.textContent=""),ne(t,e),"function"==typeof n&&n(),t?t.__c:null}function Sr(t,e,n){return re(t,e),"function"==typeof n&&n(),t?t.__c:null}Bt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(Bt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var kr=_t.event;function Er(){}function Pr(){return this.cancelBubble}function Tr(){return this.defaultPrevented}_t.event=function(t){return kr&&(t=kr(t)),t.persist=Er,t.isPropagationStopped=Pr,t.isDefaultPrevented=Tr,t.nativeEvent=t};var Ar,Cr={enumerable:!1,configurable:!0,get:function(){return this.class}},Rr=_t.vnode;_t.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},i=-1===n.indexOf("-");for(var o in e){var s=e[o];if(!("value"===o&&"defaultValue"in e&&null==s||wr&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||br(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":yr.test(o)&&(o=a):a=o="oninput":i&&gr.test(o)?o=o.replace(_r,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=zt(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=zt(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Cr)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=vr,Rr&&Rr(t)};var Or=_t.__r;_t.__r=function(t){Or&&Or(t),Ar=t.__c};var Mr=_t.diffed;_t.diffed=function(t){Mr&&Mr(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),Ar=null};var Fr={ReactCurrentDispatcher:{current:{readContext:function(t){return Ar.__n[t.__c].props.value},useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Fn,useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Mn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr}}};function Lr(t){return Dt.bind(null,t)}function Dr(t){return!!t&&t.$$typeof===vr}function Vr(t){return Dr(t)&&t.type===jt}function Ir(t){return!!t&&!!t.displayName&&("string"==typeof t.displayName||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function jr(t){return Dr(t)?ie.apply(null,arguments):t}function Br(t){return!!t.__k&&(ne(null,t),!0)}function Nr(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ur=function(t,e){return t(e)},Gr=function(t,e){return t(e)},Wr=jt;function Hr(t){t()}function $r(t){return t}function zr(){return[!1,Hr]}var qr=Ln,Kr=Dr;function Yr(t,e){var n=e(),r=On({h:{__:n,v:e}}),i=r[0].h,o=r[1];return Ln((function(){i.__=n,i.v=e,Qr(i)&&o({h:i})}),[t,n,e]),Fn((function(){return Qr(i)&&o({h:i}),t((function(){Qr(i)&&o({h:i})}))}),[t]),n}function Qr(t){var e,n,r=t.v,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}var Xr={useState:On,useId:Un,useReducer:Mn,useEffect:Fn,useLayoutEffect:Ln,useInsertionEffect:qr,useTransition:zr,useDeferredValue:$r,useSyncExternalStore:Yr,startTransition:Hr,useRef:Dn,useImperativeHandle:Vn,useMemo:In,useCallback:jn,useContext:Bn,useDebugValue:Nn,version:"17.0.2",Children:rr,render:xr,hydrate:Sr,unmountComponentAtNode:Br,createPortal:mr,createElement:Dt,createContext:oe,createFactory:Lr,cloneElement:jr,createRef:It,Fragment:jt,isValidElement:Dr,isElement:Kr,isFragment:Vr,isMemo:Ir,findDOMNode:Nr,Component:Bt,PureComponent:Xn,memo:Zn,forwardRef:er,flushSync:Gr,unstable_batchedUpdates:Ur,StrictMode:Wr,Suspense:lr,SuspenseList:dr,lazy:cr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fr};const Zr=Object.freeze(Object.defineProperty({__proto__:null,Children:rr,Component:Bt,Fragment:jt,PureComponent:Xn,StrictMode:Wr,Suspense:lr,SuspenseList:dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fr,cloneElement:jr,createContext:oe,createElement:Dt,createFactory:Lr,createPortal:mr,createRef:It,default:Xr,findDOMNode:Nr,flushSync:Gr,forwardRef:er,hydrate:Sr,isElement:Kr,isFragment:Vr,isMemo:Ir,isValidElement:Dr,lazy:cr,memo:Zn,render:xr,startTransition:Hr,unmountComponentAtNode:Br,unstable_batchedUpdates:Ur,useCallback:jn,useContext:Bn,useDebugValue:Nn,useDeferredValue:$r,useEffect:Fn,useErrorBoundary:function(t){var e=Rn(mn++,10),n=On();return e.__=t,vn.componentDidCatch||(vn.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Vn,useInsertionEffect:qr,useLayoutEffect:Ln,useMemo:In,useReducer:Mn,useRef:Dn,useState:On,useSyncExternalStore:Yr,useTransition:zr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jr.apply(null,arguments)}var ti={exports:{}},ei={},ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,ii=ni?Symbol.for("react.portal"):60106,oi=ni?Symbol.for("react.fragment"):60107,si=ni?Symbol.for("react.strict_mode"):60108,ai=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,di=ni?Symbol.for("react.concurrent_mode"):60111,hi=ni?Symbol.for("react.forward_ref"):60112,pi=ni?Symbol.for("react.suspense"):60113,fi=ni?Symbol.for("react.suspense_list"):60120,mi=ni?Symbol.for("react.memo"):60115,vi=ni?Symbol.for("react.lazy"):60116,gi=ni?Symbol.for("react.block"):60121,yi=ni?Symbol.for("react.fundamental"):60117,_i=ni?Symbol.for("react.responder"):60118,wi=ni?Symbol.for("react.scope"):60119;function bi(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case ri:switch(t=t.type){case ci:case di:case oi:case ai:case si:case pi:return t;default:switch(t=t&&t.$$typeof){case ui:case hi:case vi:case mi:case li:return t;default:return e}}case ii:return e}}}function xi(t){return bi(t)===di}ei.AsyncMode=ci,ei.ConcurrentMode=di,ei.ContextConsumer=ui,ei.ContextProvider=li,ei.Element=ri,ei.ForwardRef=hi,ei.Fragment=oi,ei.Lazy=vi,ei.Memo=mi,ei.Portal=ii,ei.Profiler=ai,ei.StrictMode=si,ei.Suspense=pi,ei.isAsyncMode=function(t){return xi(t)||bi(t)===ci},ei.isConcurrentMode=xi,ei.isContextConsumer=function(t){return bi(t)===ui},ei.isContextProvider=function(t){return bi(t)===li},ei.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===ri},ei.isForwardRef=function(t){return bi(t)===hi},ei.isFragment=function(t){return bi(t)===oi},ei.isLazy=function(t){return bi(t)===vi},ei.isMemo=function(t){return bi(t)===mi},ei.isPortal=function(t){return bi(t)===ii},ei.isProfiler=function(t){return bi(t)===ai},ei.isStrictMode=function(t){return bi(t)===si},ei.isSuspense=function(t){return bi(t)===pi},ei.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===oi||t===di||t===ai||t===si||t===pi||t===fi||"object"==typeof t&&null!==t&&(t.$$typeof===vi||t.$$typeof===mi||t.$$typeof===li||t.$$typeof===ui||t.$$typeof===hi||t.$$typeof===yi||t.$$typeof===_i||t.$$typeof===wi||t.$$typeof===gi)},ei.typeOf=bi,ti.exports=ei;var Si=ti.exports,ki={};ki[Si.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ki[Si.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Ei(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}var Pi=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},Ti=function(t,e,n){Pi(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}};var Ai={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ci=!1,Ri=/[A-Z]|^ms/g,Oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mi=function(t){return 45===t.charCodeAt(1)},Fi=function(t){return null!=t&&"boolean"!=typeof t},Li=ln((function(t){return Mi(t)?t:t.replace(Ri,"-$&").toLowerCase()})),Di=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(Oi,(function(t,e,n){return ji={name:e,styles:n,next:ji},e}))}return 1===Ai[t]||Mi(t)||"number"!=typeof e||0===e?e:e+"px"},Vi="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ii(t,e,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ji={name:i.name,styles:i.styles,next:ji},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)ji={name:s.name,styles:s.styles,next:ji},s=s.next;return o.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(t,e,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=e&&void 0!==e[a]?r+=o+"{"+e[a]+"}":Fi(a)&&(r+=Li(o)+":"+Di(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&Ci)throw new Error(Vi);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var l=Ii(t,e,s);switch(o){case"animation":case"animationName":r+=Li(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)Fi(s[u])&&(r+=Li(o)+":"+Di(o,s[u])+";")}}return r}(t,e,n);case"function":if(void 0!==t){var a=ji,l=n(t);return ji=a,Ii(t,e,l)}}var u=n;if(null==e)return u;var c=e[u];return void 0!==c?c:u}var ji,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Ni(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,i="";ji=void 0;var o=t[0];null==o||void 0===o.raw?(r=!1,i+=Ii(n,e,o)):i+=o[0];for(var s=1;s<t.length;s++){if(i+=Ii(n,e,t[s]),r)i+=o[s]}Bi.lastIndex=0;for(var a,l="";null!==(a=Bi.exec(i));)l+="-"+a[1];var u=function(t){for(var e,n=0,r=0,i=t.length;i>=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ji}}var Ui=!!Zr.useInsertionEffect&&Zr.useInsertionEffect,Gi=Ui||function(t){return t()},Wi=Ui||Ln,Hi=oe("undefined"!=typeof HTMLElement?wn({key:"css"}):null),$i=Hi.Provider,zi=function(t){return er((function(e,n){var r=Bn(Hi);return t(e,r,n)}))},qi=oe({}),Ki={}.hasOwnProperty,Yi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qi=function(t,e){var n={};for(var r in e)Ki.call(e,r)&&(n[r]=e[r]);return n[Yi]=t,n},Xi=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return Pi(e,n,r),Gi((function(){return Ti(e,n,r)})),null},Zi=zi((function(t,e,n){var r=t.css;"string"==typeof r&&void 0!==e.registered[r]&&(r=e.registered[r]);var i=t[Yi],o=[r],s="";"string"==typeof t.className?s=Ei(e.registered,o,t.className):null!=t.className&&(s=t.className+" ");var a=Ni(o,void 0,Bn(qi));s+=e.key+"-"+a.name;var l={};for(var u in t)Ki.call(t,u)&&"css"!==u&&u!==Yi&&(l[u]=t[u]);return l.className=s,n&&(l.ref=n),Dt(jt,null,Dt(Xi,{cache:e,serialized:a,isStringTag:"string"==typeof i}),Dt(i,l))})),Ji=zi((function(t,e){var n=Ni([t.styles],void 0,Bn(qi)),r=Dn();return Wi((function(){var t=e.key+"-global",i=new e.sheet.constructor({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+t+" "+n.name+'"]');return e.sheet.tags.length&&(i.before=e.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",t),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[e]),Wi((function(){var t=r.current,i=t[0];if(t[1])t[1]=!1;else{if(void 0!==n.next&&Ti(e,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}e.insert("",n,i,!1)}}),[e,n.name]),null}));function to(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ni(e)}var eo=0;function no(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)"ref"==a?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return _t.vnode&&_t.vnode(u),u}var ro=jt;function io(t,e,n){return Ki.call(e,"css")?no(Zi,Qi(t,e),n):no(t,e,n)}function oo(t,e,n){return Ki.call(e,"css")?no(Zi,Qi(t,e),n):no(t,e,n)}const so=to({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),ao=()=>oo(jt,{children:[io(Ji,{styles:to`
|
|
2
2
|
${{"*, ::before, ::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"#e5e7eb","--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":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--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-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"::before, ::after":{"--tw-content":"''"},"html, :host":{lineHeight:"1.5",WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:"4",fontFamily:'Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',fontFeatureSettings:" normal",fontVariationSettings:" normal",WebkitTapHighlightColor:"transparent"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1, h2, h3, h4, h5, h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b, strong":{fontWeight:"bolder"},"code, kbd, samp, pre":{fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontFeatureSettings:" normal",fontVariationSettings:" normal",fontSize:"1em"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button, input, optgroup, select, textarea":{fontFamily:"inherit",fontFeatureSettings:"inherit",fontVariationSettings:"inherit",fontSize:"100%",fontWeight:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",margin:"0",padding:"0"},"button, select":{textTransform:"none"},"button, input:where([type='button']), input:where([type='reset']), input:where([type='submit'])":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"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":{listStyle:"none",margin:"0",padding:"0"},dialog:{padding:"0"},textarea:{resize:"vertical"},"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",verticalAlign:"middle"},"img, video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"},"::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":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--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-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select":{appearance:"none",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px",borderRadius:"0px",paddingTop:"0.5rem",paddingRight:"0.75rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 0 #0000"},"[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)",borderColor:"#2563eb"},"input::placeholder,textarea::placeholder":{color:"#6b7280",opacity:"1"},"::-webkit-datetime-edit-fields-wrapper":{padding:"0"},"::-webkit-date-and-time-value":{minHeight:"1.5em",textAlign:"inherit"},"::-webkit-datetime-edit":{display:"inline-flex"},"::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field":{paddingTop:"0",paddingBottom:"0"},select:{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")",backgroundPosition:"right 0.5rem center",backgroundRepeat:"no-repeat",backgroundSize:"1.5em 1.5em",paddingRight:"2.5rem",printColorAdjust:"exact"},'[multiple],[size]:where(select:not([size="1"]))':{backgroundImage:"initial",backgroundPosition:"initial",backgroundRepeat:"unset",backgroundSize:"initial",paddingRight:"0.75rem",printColorAdjust:"unset"},"[type='checkbox'],[type='radio']":{appearance:"none",padding:"0",printColorAdjust:"exact",display:"inline-block",verticalAlign:"middle",backgroundOrigin:"border-box",userSelect:"none",flexShrink:"0",height:"1rem",width:"1rem",color:"#2563eb",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px","--tw-shadow":"0 0 #0000"},"[type='checkbox']":{borderRadius:"0px"},"[type='radio']":{borderRadius:"100%"},"[type='checkbox']:focus,[type='radio']:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"},"[type='checkbox']:checked,[type='radio']:checked":{borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")"},"@media (forced-colors: active)":{"[type='checkbox']:checked":{appearance:"auto"},"[type='radio']:checked":{appearance:"auto"},"[type='checkbox']:indeterminate":{appearance:"auto"}},"[type='radio']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")"},"[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='checkbox']:indeterminate":{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\")",borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='file']":{background:"unset",borderColor:"inherit",borderWidth:"0",borderRadius:"0",padding:"0",fontSize:"unset",lineHeight:"inherit"},"[type='file']:focus":{outline:"1px auto -webkit-focus-ring-color"}}}
|
|
3
|
-
`}),io(Ji,{styles:so})]});let lo;const uo=()=>Bn(lo);class co extends Error{constructor(t,e){super(t),__publicField(this,"response"),this.response=e}}const ho=async(t,e,n,r)=>{await po(t,e,n,r,!0)},po=async(t,e,n,r,i)=>{const o=await fetch(t,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"0.3.5683",authorization:`Bearer ${e}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!o.ok)throw new co(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},fo=t=>async e=>{const n=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return ho(n,t.accessToken,"POST",e)},mo=t=>e=>async n=>{const r=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`);return ho(r,t.accessToken,"PUT",n)},vo=()=>{const t=uo();return{getAllPromotions:(e=t.backend,async()=>{const t=new URL(`${e.url}/promoted-benefits/admin/v1.0/promotion`);return po(t,e.accessToken,"GET")}),createPromotion:fo(t.backend),updatePromotion:mo(t.backend)};var e};var go=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yo="undefined"==typeof window||"Deno"in globalThis;function _o(){}function wo(t){return"number"==typeof t&&t>=0&&t!==1/0}function bo(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xo(t,e){return"function"==typeof t?t(e):t}function So(t,e){return"function"==typeof t?t(e):t}function ko(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=t;if(s)if(r){if(e.queryHash!==Po(s,e.options))return!1}else if(!Ao(e.queryKey,s))return!1;if("all"!==n){const t=e.isActive();if("active"===n&&!t)return!1;if("inactive"===n&&t)return!1}return("boolean"!=typeof a||e.isStale()===a)&&((!i||i===e.state.fetchStatus)&&!(o&&!o(e)))}function Eo(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(To(e.options.mutationKey)!==To(o))return!1}else if(!Ao(e.options.mutationKey,o))return!1}return(!r||e.state.status===r)&&!(i&&!i(e))}function Po(t,e){return((null==e?void 0:e.queryKeyHashFn)||To)(t)}function To(t){return JSON.stringify(t,((t,e)=>Mo(e)?Object.keys(e).sort().reduce(((t,n)=>(t[n]=e[n],t)),{}):e))}function Ao(t,e){return t===e||typeof t==typeof e&&(!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some((n=>!Ao(t[n],e[n]))))}function Co(t,e){if(t===e)return t;const n=Oo(t)&&Oo(e);if(n||Mo(t)&&Mo(e)){const r=n?t:Object.keys(t),i=r.length,o=n?e:Object.keys(e),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const i=n?u:o[u];(!n&&r.includes(i)||n)&&void 0===t[i]&&void 0===e[i]?(a[i]=void 0,l++):(a[i]=Co(t[i],e[i]),a[i]===t[i]&&void 0!==t[i]&&l++)}return i===s&&l===i?t:a}return e}function Ro(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Oo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Mo(t){if(!Fo(t))return!1;const e=t.constructor;if(void 0===e)return!0;const n=e.prototype;return!!Fo(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype)}function Fo(t){return"[object Object]"===Object.prototype.toString.call(t)}function Lo(t,e,n){return"function"==typeof n.structuralSharing?n.structuralSharing(t,e):!1!==n.structuralSharing?Co(t,e):e}function Do(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Vo(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Io=Symbol();function jo(t,e){return!t.queryFn&&(null==e?void 0:e.initialPromise)?()=>e.initialPromise:t.queryFn&&t.queryFn!==Io?t.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`))}var Bo=new(r=class extends go{constructor(){super(),__privateAdd(this,t),__privateAdd(this,e),__privateAdd(this,n),__privateSet(this,n,(t=>{if(!yo&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}))}onSubscribe(){__privateGet(this,e)||this.setEventListener(__privateGet(this,n))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=__privateGet(this,e))||t.call(this),__privateSet(this,e,void 0))}setEventListener(t){var r;__privateSet(this,n,t),null==(r=__privateGet(this,e))||r.call(this),__privateSet(this,e,t((t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})))}setFocused(e){__privateGet(this,t)!==e&&(__privateSet(this,t,e),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach((e=>{e(t)}))}isFocused(){var e;return"boolean"==typeof __privateGet(this,t)?__privateGet(this,t):"hidden"!==(null==(e=globalThis.document)?void 0:e.visibilityState)}},t=new WeakMap,e=new WeakMap,n=new WeakMap,r),No=new(a=class extends go{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,s),__privateSet(this,s,(t=>{if(!yo&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,s))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,void 0))}setEventListener(t){var e;__privateSet(this,s,t),null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,t(this.setOnline.bind(this)))}setOnline(t){__privateGet(this,i)!==t&&(__privateSet(this,i,t),this.listeners.forEach((e=>{e(t)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,s=new WeakMap,a);function Uo(t){return Math.min(1e3*2**t,3e4)}function Go(t){return"online"!==(t??"online")||No.isOnline()}var Wo=class extends Error{constructor(t){super("CancelledError"),this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}};function Ho(t){return t instanceof Wo}function $o(t){let e,n,r,i=!1,o=0,s=!1;const a=new Promise(((t,e)=>{n=t,r=e})),l=()=>Bo.isFocused()&&("always"===t.networkMode||No.isOnline())&&t.canRun(),u=()=>Go(t.networkMode)&&t.canRun(),c=r=>{var i;s||(s=!0,null==(i=t.onSuccess)||i.call(t,r),null==e||e(),n(r))},d=n=>{var i;s||(s=!0,null==(i=t.onError)||i.call(t,n),null==e||e(),r(n))},h=()=>new Promise((n=>{var r;e=t=>{(s||l())&&n(t)},null==(r=t.onPause)||r.call(t)})).then((()=>{var n;e=void 0,s||null==(n=t.onContinue)||n.call(t)})),p=()=>{if(s)return;let e;const n=0===o?t.initialPromise:void 0;try{e=n??t.fn()}catch(r){e=Promise.reject(r)}Promise.resolve(e).then(c).catch((e=>{var n;if(s)return;const r=t.retry??(yo?0:3),a=t.retryDelay??Uo,u="function"==typeof a?a(o,e):a,c=!0===r||"number"==typeof r&&o<r||"function"==typeof r&&r(o,e);var f;!i&&c?(o++,null==(n=t.onFail)||n.call(t,o,e),(f=u,new Promise((t=>{setTimeout(t,f)}))).then((()=>l()?void 0:h())).then((()=>{i?d(e):p()}))):d(e)}))};return{promise:a,cancel:e=>{var n;s||(d(new Wo(e)),null==(n=t.abort)||n.call(t))},continue:()=>(null==e||e(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var zo=function(){let t=[],e=0,n=t=>{t()},r=t=>{t()},i=t=>setTimeout(t,0);const o=r=>{e?t.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;e++;try{s=o()}finally{e--,e||(()=>{const e=t;t=[],e.length&&i((()=>{r((()=>{e.forEach((t=>{n(t)}))}))}))})()}return s},batchCalls:t=>(...e)=>{o((()=>{t(...e)}))},schedule:o,setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{i=t}}}(),qo=(u=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wo(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(yo?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,u),Ko=(y=class extends qo{constructor(t){super(),__privateAdd(this,v),__privateAdd(this,c),__privateAdd(this,d),__privateAdd(this,h),__privateAdd(this,p),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,t.defaultOptions),this.setOptions(t.options),this.observers=[],__privateSet(this,h,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,__privateSet(this,c,function(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,n=void 0!==e,r=n?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=t.state??__privateGet(this,c),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return null==(t=__privateGet(this,p))?void 0:t.promise}setOptions(t){this.options={...__privateGet(this,f),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,h).remove(this)}setData(t,e){const n=Lo(this.state.data,t,this.options);return __privateMethod(this,v,g).call(this,{data:n,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),n}setState(t,e){__privateMethod(this,v,g).call(this,{type:"setState",state:t,setStateOptions:e})}cancel(t){var e,n;const r=null==(e=__privateGet(this,p))?void 0:e.promise;return null==(n=__privateGet(this,p))||n.cancel(t),r?r.then(_o).catch(_o):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,c))}isActive(){return this.observers.some((t=>!1!==So(t.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((t=>t.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(t=0){return this.state.isInvalidated||void 0===this.state.data||!bo(this.state.dataUpdatedAt,t)}onFocus(){var t;const e=this.observers.find((t=>t.shouldFetchOnWindowFocus()));null==e||e.refetch({cancelRefetch:!1}),null==(t=__privateGet(this,p))||t.continue()}onOnline(){var t;const e=this.observers.find((t=>t.shouldFetchOnReconnect()));null==e||e.refetch({cancelRefetch:!1}),null==(t=__privateGet(this,p))||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),__privateGet(this,h).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter((e=>e!==t)),this.observers.length||(__privateGet(this,p)&&(__privateGet(this,m)?__privateGet(this,p).cancel({revert:!0}):__privateGet(this,p).cancelRetry()),this.scheduleGc()),__privateGet(this,h).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(t,e){var n,r,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==e?void 0:e.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,p))return __privateGet(this,p).continueRetry(),__privateGet(this,p).promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find((t=>t.options.queryFn));t&&this.setOptions(t.options)}const o=new AbortController,s=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},a={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const t=jo(this.options,e),n={queryKey:this.queryKey,meta:this.meta};return s(n),__privateSet(this,m,!1),this.options.persister?this.options.persister(t,n,this):t(n)}};s(a),null==(n=this.options.behavior)||n.onFetch(a,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(r=a.fetchOptions)?void 0:r.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=a.fetchOptions)?void 0:i.meta});const l=t=>{var e,n,r,i;Ho(t)&&t.silent||__privateMethod(this,v,g).call(this,{type:"error",error:t}),Ho(t)||(null==(n=(e=__privateGet(this,h).config).onError)||n.call(e,t,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return __privateSet(this,p,$o({initialPromise:null==e?void 0:e.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:t=>{var e,n,r,i;if(void 0!==t){try{this.setData(t)}catch(o){return void l(o)}null==(n=(e=__privateGet(this,h).config).onSuccess)||n.call(e,t,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(t,e)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),__privateGet(this,p).start()}},c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...Yo(e.data,this.options),fetchMeta:t.meta??null};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=t.error;return Ho(n)&&n.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...e,error:n,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),zo.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate()})),__privateGet(this,h).notify({query:this,type:"updated",action:t})}))},y);function Yo(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Go(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}var Qo=(w=class extends go{constructor(t={}){super(),__privateAdd(this,_),this.config=t,__privateSet(this,_,new Map)}build(t,e,n){const r=e.queryKey,i=e.queryHash??Po(r,e);let o=this.get(i);return o||(o=new Ko({cache:this,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){__privateGet(this,_).has(t.queryHash)||(__privateGet(this,_).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=__privateGet(this,_).get(t.queryHash);e&&(t.destroy(),e===t&&__privateGet(this,_).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){zo.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}get(t){return __privateGet(this,_).get(t)}getAll(){return[...__privateGet(this,_).values()]}find(t){const e={exact:!0,...t};return this.getAll().find((t=>ko(e,t)))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter((e=>ko(t,e))):e}notify(t){zo.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}onFocus(){zo.batch((()=>{this.getAll().forEach((t=>{t.onFocus()}))}))}onOnline(){zo.batch((()=>{this.getAll().forEach((t=>{t.onOnline()}))}))}},_=new WeakMap,w),Xo=(P=class extends qo{constructor(t){super(),__privateAdd(this,k),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,S),this.mutationId=t.mutationId,__privateSet(this,x,t.mutationCache),__privateSet(this,b,[]),this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){__privateGet(this,b).includes(t)||(__privateGet(this,b).push(t),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){__privateSet(this,b,__privateGet(this,b).filter((e=>e!==t))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var t;return(null==(t=__privateGet(this,S))?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w;__privateSet(this,S,$o({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{__privateMethod(this,k,E).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{__privateMethod(this,k,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,k,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,P=!__privateGet(this,S).canStart();try{if(!b){__privateMethod(this,k,E).call(this,{type:"pending",variables:t,isPaused:P}),await(null==(n=(e=__privateGet(this,x).config).onMutate)?void 0:n.call(e,t,this));const o=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,t));o!==this.state.context&&__privateMethod(this,k,E).call(this,{type:"pending",context:o,variables:t,isPaused:P})}const p=await __privateGet(this,S).start();return await(null==(s=(o=__privateGet(this,x).config).onSuccess)?void 0:s.call(o,p,t,this.state.context,this)),await(null==(l=(a=this.options).onSuccess)?void 0:l.call(a,p,t,this.state.context)),await(null==(c=(u=__privateGet(this,x).config).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context,this)),await(null==(h=(d=this.options).onSettled)?void 0:h.call(d,p,null,t,this.state.context)),__privateMethod(this,k,E).call(this,{type:"success",data:p}),p}catch(T){try{throw await(null==(f=(p=__privateGet(this,x).config).onError)?void 0:f.call(p,T,t,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,t,this.state.context)),await(null==(y=(g=__privateGet(this,x).config).onSettled)?void 0:y.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(_=this.options).onSettled)?void 0:w.call(_,void 0,T,t,this.state.context)),T}finally{__privateMethod(this,k,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakSet,E=function(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),zo.batch((()=>{__privateGet(this,b).forEach((e=>{e.onMutationUpdate(t)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:t})}))},P);var Zo=(C=class extends go{constructor(t={}){super(),__privateAdd(this,T),__privateAdd(this,A),this.config=t,__privateSet(this,T,new Map),__privateSet(this,A,Date.now())}build(t,e,n){const r=new Xo({mutationCache:this,mutationId:++__privateWrapper(this,A)._,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){const e=Jo(t),n=__privateGet(this,T).get(e)??[];n.push(t),__privateGet(this,T).set(e,n),this.notify({type:"added",mutation:t})}remove(t){var e;const n=Jo(t);if(__privateGet(this,T).has(n)){const r=null==(e=__privateGet(this,T).get(n))?void 0:e.filter((e=>e!==t));r&&(0===r.length?__privateGet(this,T).delete(n):__privateGet(this,T).set(n,r))}this.notify({type:"removed",mutation:t})}canRun(t){var e;const n=null==(e=__privateGet(this,T).get(Jo(t)))?void 0:e.find((t=>"pending"===t.state.status));return!n||n===t}runNext(t){var e;const n=null==(e=__privateGet(this,T).get(Jo(t)))?void 0:e.find((e=>e!==t&&e.state.isPaused));return(null==n?void 0:n.continue())??Promise.resolve()}clear(){zo.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(t){const e={exact:!0,...t};return this.getAll().find((t=>Eo(e,t)))}findAll(t={}){return this.getAll().filter((e=>Eo(t,e)))}notify(t){zo.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}resumePausedMutations(){const t=this.getAll().filter((t=>t.state.isPaused));return zo.batch((()=>Promise.all(t.map((t=>t.continue().catch(_o))))))}},T=new WeakMap,A=new WeakMap,C);function Jo(t){var e;return(null==(e=t.options.scope)?void 0:e.id)??String(t.mutationId)}function ts(t){return{onFetch:(e,n)=>{var r,i,o,s,a;const l=e.options,u=null==(o=null==(i=null==(r=e.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:o.direction,c=(null==(s=e.state.data)?void 0:s.pages)||[],d=(null==(a=e.state.data)?void 0:a.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const f=async()=>{let n=!1;const r=jo(e.options,e.fetchOptions),i=async(t,i,o)=>{if(n)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const s={queryKey:e.queryKey,pageParam:i,direction:o?"backward":"forward",meta:e.options.meta};var a;a=s,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(e.signal.aborted?n=!0:e.signal.addEventListener("abort",(()=>{n=!0})),e.signal)});const l=await r(s),{maxPages:u}=e.options,c=o?Vo:Do;return{pages:c(t.pages,l,u),pageParams:c(t.pageParams,i,u)}};if(u&&c.length){const t="backward"===u,e={pages:c,pageParams:d},n=(t?ns:es)(l,e);h=await i(e,n,t)}else{const e=t??c.length;do{const t=0===p?d[0]??l.initialPageParam:es(l,h);if(p>0&&null==t)break;h=await i(h,t),p++}while(p<e)}return h};e.options.persister?e.fetchFn=()=>{var t,r;return null==(r=(t=e.options).persister)?void 0:r.call(t,f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=f}}}function es(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ns(t,{pages:e,pageParams:n}){var r;return e.length>0?null==(r=t.getPreviousPageParam)?void 0:r.call(t,e[0],e,n[0],n):void 0}var rs=(j=class{constructor(t={}){__privateAdd(this,R),__privateAdd(this,O),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,L),__privateAdd(this,D),__privateAdd(this,V),__privateAdd(this,I),__privateSet(this,R,t.queryCache||new Qo),__privateSet(this,O,t.mutationCache||new Zo),__privateSet(this,M,t.defaultOptions||{}),__privateSet(this,F,new Map),__privateSet(this,L,new Map),__privateSet(this,D,0)}mount(){__privateWrapper(this,D)._++,1===__privateGet(this,D)&&(__privateSet(this,V,Bo.subscribe((async t=>{t&&(await this.resumePausedMutations(),__privateGet(this,R).onFocus())}))),__privateSet(this,I,No.subscribe((async t=>{t&&(await this.resumePausedMutations(),__privateGet(this,R).onOnline())}))))}unmount(){var t,e;__privateWrapper(this,D)._--,0===__privateGet(this,D)&&(null==(t=__privateGet(this,V))||t.call(this),__privateSet(this,V,void 0),null==(e=__privateGet(this,I))||e.call(this),__privateSet(this,I,void 0))}isFetching(t){return __privateGet(this,R).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return __privateGet(this,O).findAll({...t,status:"pending"}).length}getQueryData(t){var e;const n=this.defaultQueryOptions({queryKey:t});return null==(e=__privateGet(this,R).get(n.queryHash))?void 0:e.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(void 0===e)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=__privateGet(this,R).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(xo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return __privateGet(this,R).findAll(t).map((({queryKey:t,state:e})=>[t,e.data]))}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=__privateGet(this,R).get(r.queryHash),o=function(t,e){return"function"==typeof t?t(e):t}(e,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,R).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return zo.batch((()=>__privateGet(this,R).findAll(t).map((({queryKey:t})=>[t,this.setQueryData(t,e,n)]))))}getQueryState(t){var e;const n=this.defaultQueryOptions({queryKey:t});return null==(e=__privateGet(this,R).get(n.queryHash))?void 0:e.state}removeQueries(t){const e=__privateGet(this,R);zo.batch((()=>{e.findAll(t).forEach((t=>{e.remove(t)}))}))}resetQueries(t,e){const n=__privateGet(this,R),r={type:"active",...t};return zo.batch((()=>(n.findAll(t).forEach((t=>{t.reset()})),this.refetchQueries(r,e))))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=zo.batch((()=>__privateGet(this,R).findAll(t).map((t=>t.cancel(n)))));return Promise.all(r).then(_o).catch(_o)}invalidateQueries(t={},e={}){return zo.batch((()=>{if(__privateGet(this,R).findAll(t).forEach((t=>{t.invalidate()})),"none"===t.refetchType)return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)}))}refetchQueries(t={},e){const n={...e,cancelRefetch:(null==e?void 0:e.cancelRefetch)??!0},r=zo.batch((()=>__privateGet(this,R).findAll(t).filter((t=>!t.isDisabled())).map((t=>{let e=t.fetch(void 0,n);return n.throwOnError||(e=e.catch(_o)),"paused"===t.state.fetchStatus?Promise.resolve():e}))));return Promise.all(r).then(_o)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const n=__privateGet(this,R).build(this,e);return n.isStaleByTime(xo(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(_o).catch(_o)}fetchInfiniteQuery(t){return t.behavior=ts(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(_o).catch(_o)}ensureInfiniteQueryData(t){return t.behavior=ts(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return No.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,R)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,M)}setDefaultOptions(t){__privateSet(this,M,t)}setQueryDefaults(t,e){__privateGet(this,F).set(To(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...__privateGet(this,F).values()];let n={};return e.forEach((e=>{Ao(t,e.queryKey)&&(n={...n,...e.defaultOptions})})),n}setMutationDefaults(t,e){__privateGet(this,L).set(To(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...__privateGet(this,L).values()];let n={};return e.forEach((e=>{Ao(t,e.mutationKey)&&(n={...n,...e.defaultOptions})})),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...__privateGet(this,M).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Po(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),!0!==e.enabled&&e.queryFn===Io&&(e.enabled=!1),e}defaultMutationOptions(t){return(null==t?void 0:t._defaulted)?t:{...__privateGet(this,M).mutations,...(null==t?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){__privateGet(this,R).clear(),__privateGet(this,O).clear()}},R=new WeakMap,O=new WeakMap,M=new WeakMap,F=new WeakMap,L=new WeakMap,D=new WeakMap,V=new WeakMap,I=new WeakMap,j),is=(ut=class extends go{constructor(t,e){super(),__privateAdd(this,J),__privateAdd(this,B),__privateAdd(this,N),__privateAdd(this,U),__privateAdd(this,G),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,$),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,Y),__privateAdd(this,Q),__privateAdd(this,X),__privateAdd(this,Z,new Set),this.options=e,__privateSet(this,B,t),__privateSet(this,$,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,N).addObserver(this),os(__privateGet(this,N),this.options)?__privateMethod(this,J,tt).call(this):this.updateResult(),__privateMethod(this,J,it).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ss(__privateGet(this,N),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ss(__privateGet(this,N),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,J,ot).call(this),__privateMethod(this,J,st).call(this),__privateGet(this,N).removeObserver(this)}setOptions(t,e){const n=this.options,r=__privateGet(this,N);if(this.options=__privateGet(this,B).defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof So(this.options.enabled,__privateGet(this,N)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,J,at).call(this),__privateGet(this,N).setOptions(this.options),n._defaulted&&!Ro(this.options,n)&&__privateGet(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,N),observer:this});const i=this.hasListeners();i&&as(__privateGet(this,N),r,this.options,n)&&__privateMethod(this,J,tt).call(this),this.updateResult(e),!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&xo(this.options.staleTime,__privateGet(this,N))===xo(n.staleTime,__privateGet(this,N))||__privateMethod(this,J,et).call(this);const o=__privateMethod(this,J,nt).call(this);!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&o===__privateGet(this,X)||__privateMethod(this,J,rt).call(this,o)}getOptimisticResult(t){const e=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),t),n=this.createResult(e,t);return function(t,e){if(!Ro(t.getCurrentResult(),e))return!0;return!1}(this,n)&&(__privateSet(this,G,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,G)}trackResult(t,e){const n={};return Object.keys(t).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==e||e(r),t[r])})})),n}trackProp(t){__privateGet(this,Z).add(t)}getCurrentQuery(){return __privateGet(this,N)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=__privateGet(this,B).defaultQueryOptions(t),n=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),e);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,e)))}fetch(t){return __privateMethod(this,J,tt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,G))))}createResult(t,e){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,G),s=__privateGet(this,W),a=__privateGet(this,H),l=t!==r?t.state:__privateGet(this,U),{state:u}=t;let c,d={...u},h=!1;if(e._optimisticResults){const n=this.hasListeners(),o=!n&&os(t,e),s=n&&as(t,r,e,i);(o||s)&&(d={...d,...Yo(u.data,t.options)}),"isRestoring"===e._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:f,status:m}=d;if(e.select&&void 0!==d.data)if(o&&d.data===(null==s?void 0:s.data)&&e.select===__privateGet(this,z))c=__privateGet(this,q);else try{__privateSet(this,z,e.select),c=e.select(d.data),c=Lo(null==o?void 0:o.data,c,e),__privateSet(this,q,c),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}else c=d.data;if(void 0!==e.placeholderData&&void 0===c&&"pending"===m){let t;if((null==o?void 0:o.isPlaceholderData)&&e.placeholderData===(null==a?void 0:a.placeholderData))t=o.data;else if(t="function"==typeof e.placeholderData?e.placeholderData(null==(n=__privateGet(this,K))?void 0:n.state.data,__privateGet(this,K)):e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}void 0!==t&&(m="success",c=Lo(null==o?void 0:o.data,t,e),h=!0)}__privateGet(this,$)&&(p=__privateGet(this,$),c=__privateGet(this,q),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,y="error"===m,_=g&&v,w=void 0!==c;return{status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:y,isInitialLoading:_,isLoading:_,data:c,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:y&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:h,isRefetchError:y&&w,isStale:ls(t,e),refetch:this.refetch}}updateResult(t){const e=__privateGet(this,G),n=this.createResult(__privateGet(this,N),this.options);if(__privateSet(this,W,__privateGet(this,N).state),__privateSet(this,H,this.options),void 0!==__privateGet(this,W).data&&__privateSet(this,K,__privateGet(this,N)),Ro(n,e))return;__privateSet(this,G,n);const r={};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!__privateGet(this,Z).size)return!0;const r=new Set(n??__privateGet(this,Z));return this.options.throwOnError&&r.add("error"),Object.keys(__privateGet(this,G)).some((t=>{const n=t;return __privateGet(this,G)[n]!==e[n]&&r.has(n)}))})()&&(r.listeners=!0),__privateMethod(this,J,lt).call(this,{...r,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,J,it).call(this)}},B=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,$=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,Y=new WeakMap,Q=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakSet,tt=function(t){__privateMethod(this,J,at).call(this);let e=__privateGet(this,N).fetch(this.options,t);return(null==t?void 0:t.throwOnError)||(e=e.catch(_o)),e},et=function(){__privateMethod(this,J,ot).call(this);const t=xo(this.options.staleTime,__privateGet(this,N));if(yo||__privateGet(this,G).isStale||!wo(t))return;const e=bo(__privateGet(this,G).dataUpdatedAt,t);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,G).isStale||this.updateResult()}),e+1))},nt=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,N)):this.options.refetchInterval)??!1},rt=function(t){__privateMethod(this,J,st).call(this),__privateSet(this,X,t),!yo&&!1!==So(this.options.enabled,__privateGet(this,N))&&wo(__privateGet(this,X))&&0!==__privateGet(this,X)&&__privateSet(this,Q,setInterval((()=>{(this.options.refetchIntervalInBackground||Bo.isFocused())&&__privateMethod(this,J,tt).call(this)}),__privateGet(this,X)))},it=function(){__privateMethod(this,J,et).call(this),__privateMethod(this,J,rt).call(this,__privateMethod(this,J,nt).call(this))},ot=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},st=function(){__privateGet(this,Q)&&(clearInterval(__privateGet(this,Q)),__privateSet(this,Q,void 0))},at=function(){const t=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),this.options);if(t===__privateGet(this,N))return;const e=__privateGet(this,N);__privateSet(this,N,t),__privateSet(this,U,t.state),this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))},lt=function(t){zo.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t(__privateGet(this,G))})),__privateGet(this,B).getQueryCache().notify({query:__privateGet(this,N),type:"observerResultsUpdated"})}))},ut);function os(t,e){return function(t,e){return!1!==So(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&ss(t,e,e.refetchOnMount)}function ss(t,e,n){if(!1!==So(e.enabled,t)){const r="function"==typeof n?n(t):n;return"always"===r||!1!==r&&ls(t,e)}return!1}function as(t,e,n,r){return(t!==e||!1===So(r.enabled,t))&&(!n.suspense||"error"!==t.state.status)&&ls(t,n)}function ls(t,e){return!1!==So(e.enabled,t)&&t.isStaleByTime(xo(e.staleTime,t))}var us=(gt=class extends go{constructor(t,e){super(),__privateAdd(this,ft),__privateAdd(this,ct),__privateAdd(this,dt),__privateAdd(this,ht),__privateAdd(this,pt),__privateSet(this,ct,t),this.setOptions(e),this.bindMethods(),__privateMethod(this,ft,mt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const n=this.options;this.options=__privateGet(this,ct).defaultMutationOptions(t),Ro(this.options,n)||__privateGet(this,ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,ht),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&To(n.mutationKey)!==To(this.options.mutationKey)?this.reset():"pending"===(null==(e=__privateGet(this,ht))?void 0:e.state.status)&&__privateGet(this,ht).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||null==(t=__privateGet(this,ht))||t.removeObserver(this)}onMutationUpdate(t){__privateMethod(this,ft,mt).call(this),__privateMethod(this,ft,vt).call(this,t)}getCurrentResult(){return __privateGet(this,dt)}reset(){var t;null==(t=__privateGet(this,ht))||t.removeObserver(this),__privateSet(this,ht,void 0),__privateMethod(this,ft,mt).call(this),__privateMethod(this,ft,vt).call(this)}mutate(t,e){var n;return __privateSet(this,pt,e),null==(n=__privateGet(this,ht))||n.removeObserver(this),__privateSet(this,ht,__privateGet(this,ct).getMutationCache().build(__privateGet(this,ct),this.options)),__privateGet(this,ht).addObserver(this),__privateGet(this,ht).execute(t)}},ct=new WeakMap,dt=new WeakMap,ht=new WeakMap,pt=new WeakMap,ft=new WeakSet,mt=function(){var t;const e=(null==(t=__privateGet(this,ht))?void 0:t.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,dt,{...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset})},vt=function(t){zo.batch((()=>{var e,n,r,i,o,s,a,l;if(__privateGet(this,pt)&&this.hasListeners()){const u=__privateGet(this,dt).variables,c=__privateGet(this,dt).context;"success"===(null==t?void 0:t.type)?(null==(n=(e=__privateGet(this,pt)).onSuccess)||n.call(e,t.data,u,c),null==(i=(r=__privateGet(this,pt)).onSettled)||i.call(r,t.data,null,u,c)):"error"===(null==t?void 0:t.type)&&(null==(s=(o=__privateGet(this,pt)).onError)||s.call(o,t.error,u,c),null==(l=(a=__privateGet(this,pt)).onSettled)||l.call(a,void 0,t.error,u,c))}this.listeners.forEach((t=>{t(__privateGet(this,dt))}))}))},gt),cs=oe(void 0),ds=t=>{const e=Bn(cs);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hs=({client:t,children:e})=>(Fn((()=>(t.mount(),()=>{t.unmount()})),[t]),no(cs.Provider,{value:t,children:e})),ps=oe(!1),fs=()=>Bn(ps);ps.Provider;var ms=oe(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),vs=()=>Bn(ms);function gs(t,e){return"function"==typeof t?t(...e):!!t}function ys(){}var _s=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},ws=t=>{Fn((()=>{t.clearReset()}),[t])},bs=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&gs(n,[t.error,r]),xs=t=>{t.suspense&&("number"!=typeof t.staleTime&&(t.staleTime=1e3),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3)))},Ss=(t,e)=>(null==t?void 0:t.suspense)&&e.isPending,ks=(t,e,n)=>e.fetchOptimistic(t).catch((()=>{n.clearReset()}));function Es(t,e){return function(t,e){var n,r,i,o;const s=ds(),a=fs(),l=vs(),u=s.defaultQueryOptions(t);null==(r=null==(n=s.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||r.call(n,u),u._optimisticResults=a?"isRestoring":"optimistic",xs(u),_s(u,l),ws(l);const[c]=On((()=>new e(s,u))),d=c.getOptimisticResult(u);if(Yr(jn((t=>{const e=a?()=>{}:c.subscribe(zo.batchCalls(t));return c.updateResult(),e}),[c,a]),(()=>c.getCurrentResult())),Fn((()=>{c.setOptions(u,{listeners:!1})}),[u,c]),Ss(u,d))throw ks(u,c,l);if(bs({result:d,errorResetBoundary:l,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash)}))throw d.error;return null==(o=null==(i=s.getDefaultOptions().queries)?void 0:i._experimental_afterQuery)||o.call(i,u,d),u.notifyOnChangeProps?d:c.trackResult(d)}(t,is)}var Ps=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ts=ln((function(t){return Ps.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),As=function(t){return"theme"!==t},Cs=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?Ts:As},Rs=function(t,e,n){var r;if(e){var i=e.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof r&&n&&(r=t.__emotion_forwardProp),r},Os=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return Pi(e,n,r),Gi((function(){return Ti(e,n,r)})),null},Ms=function t(e,n){var r,i,o=e.__emotion_real===e,s=o&&e.__emotion_base||e;void 0!==n&&(r=n.label,i=n.target);var a=Rs(e,n,o),l=a||Cs(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],c[0][p])}var f=zi((function(t,e,n){var r=u&&t.as||s,o="",c=[],h=t;if(null==t.theme){for(var p in h={},t)h[p]=t[p];h.theme=Bn(qi)}"string"==typeof t.className?o=Ei(e.registered,c,t.className):null!=t.className&&(o=t.className+" ");var f=Ni(d.concat(c),e.registered,h);o+=e.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?Cs(r):l,v={};for(var g in t)u&&"as"===g||m(g)&&(v[g]=t[g]);return v.className=o,n&&(v.ref=n),Dt(jt,null,Dt(Os,{cache:e,serialized:f,isStringTag:"string"==typeof r}),Dt(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=e.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=d,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(e,r){return t(e,Jr({},n,r,{shouldForwardProp:Rs(f,r,!0)})).apply(void 0,d)},f}}.bind();function Fs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(t){Ms[t]=Ms(t)}));const Ls=er(Fs),Ds=Ms.td`
|
|
3
|
+
`}),io(Ji,{styles:so})]});let lo;const uo=()=>Bn(lo);class co extends Error{constructor(t,e){super(t),__publicField(this,"response"),this.response=e}}const ho=async(t,e,n,r)=>{await po(t,e,n,r,!0)},po=async(t,e,n,r,i)=>{const o=await fetch(t,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"0.3.5847",authorization:`Bearer ${e}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!o.ok)throw new co(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},fo=t=>async e=>{const n=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`);return ho(n,t.accessToken,"POST",e)},mo=t=>e=>async n=>{const r=new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`);return ho(r,t.accessToken,"PUT",n)},vo=()=>{const t=uo();return{getAllPromotions:(e=t.backend,async()=>{const t=new URL(`${e.url}/promoted-benefits/admin/v1.0/promotion`);return po(t,e.accessToken,"GET")}),createPromotion:fo(t.backend),updatePromotion:mo(t.backend)};var e};var go=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yo="undefined"==typeof window||"Deno"in globalThis;function _o(){}function wo(t){return"number"==typeof t&&t>=0&&t!==1/0}function bo(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xo(t,e){return"function"==typeof t?t(e):t}function So(t,e){return"function"==typeof t?t(e):t}function ko(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=t;if(s)if(r){if(e.queryHash!==Po(s,e.options))return!1}else if(!Ao(e.queryKey,s))return!1;if("all"!==n){const t=e.isActive();if("active"===n&&!t)return!1;if("inactive"===n&&t)return!1}return("boolean"!=typeof a||e.isStale()===a)&&((!i||i===e.state.fetchStatus)&&!(o&&!o(e)))}function Eo(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(To(e.options.mutationKey)!==To(o))return!1}else if(!Ao(e.options.mutationKey,o))return!1}return(!r||e.state.status===r)&&!(i&&!i(e))}function Po(t,e){return((null==e?void 0:e.queryKeyHashFn)||To)(t)}function To(t){return JSON.stringify(t,((t,e)=>Mo(e)?Object.keys(e).sort().reduce(((t,n)=>(t[n]=e[n],t)),{}):e))}function Ao(t,e){return t===e||typeof t==typeof e&&(!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some((n=>!Ao(t[n],e[n]))))}function Co(t,e){if(t===e)return t;const n=Oo(t)&&Oo(e);if(n||Mo(t)&&Mo(e)){const r=n?t:Object.keys(t),i=r.length,o=n?e:Object.keys(e),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const i=n?u:o[u];(!n&&r.includes(i)||n)&&void 0===t[i]&&void 0===e[i]?(a[i]=void 0,l++):(a[i]=Co(t[i],e[i]),a[i]===t[i]&&void 0!==t[i]&&l++)}return i===s&&l===i?t:a}return e}function Ro(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Oo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Mo(t){if(!Fo(t))return!1;const e=t.constructor;if(void 0===e)return!0;const n=e.prototype;return!!Fo(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype)}function Fo(t){return"[object Object]"===Object.prototype.toString.call(t)}function Lo(t,e,n){return"function"==typeof n.structuralSharing?n.structuralSharing(t,e):!1!==n.structuralSharing?Co(t,e):e}function Do(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Vo(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Io=Symbol();function jo(t,e){return!t.queryFn&&(null==e?void 0:e.initialPromise)?()=>e.initialPromise:t.queryFn&&t.queryFn!==Io?t.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`))}var Bo=new(r=class extends go{constructor(){super(),__privateAdd(this,t),__privateAdd(this,e),__privateAdd(this,n),__privateSet(this,n,(t=>{if(!yo&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}))}onSubscribe(){__privateGet(this,e)||this.setEventListener(__privateGet(this,n))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=__privateGet(this,e))||t.call(this),__privateSet(this,e,void 0))}setEventListener(t){var r;__privateSet(this,n,t),null==(r=__privateGet(this,e))||r.call(this),__privateSet(this,e,t((t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})))}setFocused(e){__privateGet(this,t)!==e&&(__privateSet(this,t,e),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach((e=>{e(t)}))}isFocused(){var e;return"boolean"==typeof __privateGet(this,t)?__privateGet(this,t):"hidden"!==(null==(e=globalThis.document)?void 0:e.visibilityState)}},t=new WeakMap,e=new WeakMap,n=new WeakMap,r),No=new(a=class extends go{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,s),__privateSet(this,s,(t=>{if(!yo&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,s))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,void 0))}setEventListener(t){var e;__privateSet(this,s,t),null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,t(this.setOnline.bind(this)))}setOnline(t){__privateGet(this,i)!==t&&(__privateSet(this,i,t),this.listeners.forEach((e=>{e(t)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,s=new WeakMap,a);function Uo(t){return Math.min(1e3*2**t,3e4)}function Go(t){return"online"!==(t??"online")||No.isOnline()}var Wo=class extends Error{constructor(t){super("CancelledError"),this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}};function Ho(t){return t instanceof Wo}function $o(t){let e,n,r,i=!1,o=0,s=!1;const a=new Promise(((t,e)=>{n=t,r=e})),l=()=>Bo.isFocused()&&("always"===t.networkMode||No.isOnline())&&t.canRun(),u=()=>Go(t.networkMode)&&t.canRun(),c=r=>{var i;s||(s=!0,null==(i=t.onSuccess)||i.call(t,r),null==e||e(),n(r))},d=n=>{var i;s||(s=!0,null==(i=t.onError)||i.call(t,n),null==e||e(),r(n))},h=()=>new Promise((n=>{var r;e=t=>{(s||l())&&n(t)},null==(r=t.onPause)||r.call(t)})).then((()=>{var n;e=void 0,s||null==(n=t.onContinue)||n.call(t)})),p=()=>{if(s)return;let e;const n=0===o?t.initialPromise:void 0;try{e=n??t.fn()}catch(r){e=Promise.reject(r)}Promise.resolve(e).then(c).catch((e=>{var n;if(s)return;const r=t.retry??(yo?0:3),a=t.retryDelay??Uo,u="function"==typeof a?a(o,e):a,c=!0===r||"number"==typeof r&&o<r||"function"==typeof r&&r(o,e);var f;!i&&c?(o++,null==(n=t.onFail)||n.call(t,o,e),(f=u,new Promise((t=>{setTimeout(t,f)}))).then((()=>l()?void 0:h())).then((()=>{i?d(e):p()}))):d(e)}))};return{promise:a,cancel:e=>{var n;s||(d(new Wo(e)),null==(n=t.abort)||n.call(t))},continue:()=>(null==e||e(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var zo=function(){let t=[],e=0,n=t=>{t()},r=t=>{t()},i=t=>setTimeout(t,0);const o=r=>{e?t.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;e++;try{s=o()}finally{e--,e||(()=>{const e=t;t=[],e.length&&i((()=>{r((()=>{e.forEach((t=>{n(t)}))}))}))})()}return s},batchCalls:t=>(...e)=>{o((()=>{t(...e)}))},schedule:o,setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{i=t}}}(),qo=(u=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wo(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(yo?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,u),Ko=(y=class extends qo{constructor(t){super(),__privateAdd(this,v),__privateAdd(this,c),__privateAdd(this,d),__privateAdd(this,h),__privateAdd(this,p),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,t.defaultOptions),this.setOptions(t.options),this.observers=[],__privateSet(this,h,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,__privateSet(this,c,function(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,n=void 0!==e,r=n?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=t.state??__privateGet(this,c),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return null==(t=__privateGet(this,p))?void 0:t.promise}setOptions(t){this.options={...__privateGet(this,f),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,h).remove(this)}setData(t,e){const n=Lo(this.state.data,t,this.options);return __privateMethod(this,v,g).call(this,{data:n,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),n}setState(t,e){__privateMethod(this,v,g).call(this,{type:"setState",state:t,setStateOptions:e})}cancel(t){var e,n;const r=null==(e=__privateGet(this,p))?void 0:e.promise;return null==(n=__privateGet(this,p))||n.cancel(t),r?r.then(_o).catch(_o):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,c))}isActive(){return this.observers.some((t=>!1!==So(t.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((t=>t.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(t=0){return this.state.isInvalidated||void 0===this.state.data||!bo(this.state.dataUpdatedAt,t)}onFocus(){var t;const e=this.observers.find((t=>t.shouldFetchOnWindowFocus()));null==e||e.refetch({cancelRefetch:!1}),null==(t=__privateGet(this,p))||t.continue()}onOnline(){var t;const e=this.observers.find((t=>t.shouldFetchOnReconnect()));null==e||e.refetch({cancelRefetch:!1}),null==(t=__privateGet(this,p))||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),__privateGet(this,h).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter((e=>e!==t)),this.observers.length||(__privateGet(this,p)&&(__privateGet(this,m)?__privateGet(this,p).cancel({revert:!0}):__privateGet(this,p).cancelRetry()),this.scheduleGc()),__privateGet(this,h).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(t,e){var n,r,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==e?void 0:e.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,p))return __privateGet(this,p).continueRetry(),__privateGet(this,p).promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find((t=>t.options.queryFn));t&&this.setOptions(t.options)}const o=new AbortController,s=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},a={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const t=jo(this.options,e),n={queryKey:this.queryKey,meta:this.meta};return s(n),__privateSet(this,m,!1),this.options.persister?this.options.persister(t,n,this):t(n)}};s(a),null==(n=this.options.behavior)||n.onFetch(a,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(r=a.fetchOptions)?void 0:r.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=a.fetchOptions)?void 0:i.meta});const l=t=>{var e,n,r,i;Ho(t)&&t.silent||__privateMethod(this,v,g).call(this,{type:"error",error:t}),Ho(t)||(null==(n=(e=__privateGet(this,h).config).onError)||n.call(e,t,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return __privateSet(this,p,$o({initialPromise:null==e?void 0:e.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:t=>{var e,n,r,i;if(void 0!==t){try{this.setData(t)}catch(o){return void l(o)}null==(n=(e=__privateGet(this,h).config).onSuccess)||n.call(e,t,this),null==(i=(r=__privateGet(this,h).config).onSettled)||i.call(r,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(t,e)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),__privateGet(this,p).start()}},c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...Yo(e.data,this.options),fetchMeta:t.meta??null};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=t.error;return Ho(n)&&n.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...e,error:n,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),zo.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate()})),__privateGet(this,h).notify({query:this,type:"updated",action:t})}))},y);function Yo(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Go(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}var Qo=(w=class extends go{constructor(t={}){super(),__privateAdd(this,_),this.config=t,__privateSet(this,_,new Map)}build(t,e,n){const r=e.queryKey,i=e.queryHash??Po(r,e);let o=this.get(i);return o||(o=new Ko({cache:this,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){__privateGet(this,_).has(t.queryHash)||(__privateGet(this,_).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=__privateGet(this,_).get(t.queryHash);e&&(t.destroy(),e===t&&__privateGet(this,_).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){zo.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}get(t){return __privateGet(this,_).get(t)}getAll(){return[...__privateGet(this,_).values()]}find(t){const e={exact:!0,...t};return this.getAll().find((t=>ko(e,t)))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter((e=>ko(t,e))):e}notify(t){zo.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}onFocus(){zo.batch((()=>{this.getAll().forEach((t=>{t.onFocus()}))}))}onOnline(){zo.batch((()=>{this.getAll().forEach((t=>{t.onOnline()}))}))}},_=new WeakMap,w),Xo=(P=class extends qo{constructor(t){super(),__privateAdd(this,k),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,S),this.mutationId=t.mutationId,__privateSet(this,x,t.mutationCache),__privateSet(this,b,[]),this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){__privateGet(this,b).includes(t)||(__privateGet(this,b).push(t),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){__privateSet(this,b,__privateGet(this,b).filter((e=>e!==t))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var t;return(null==(t=__privateGet(this,S))?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,v,g,y,_,w;__privateSet(this,S,$o({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{__privateMethod(this,k,E).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{__privateMethod(this,k,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,k,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,P=!__privateGet(this,S).canStart();try{if(!b){__privateMethod(this,k,E).call(this,{type:"pending",variables:t,isPaused:P}),await(null==(n=(e=__privateGet(this,x).config).onMutate)?void 0:n.call(e,t,this));const o=await(null==(i=(r=this.options).onMutate)?void 0:i.call(r,t));o!==this.state.context&&__privateMethod(this,k,E).call(this,{type:"pending",context:o,variables:t,isPaused:P})}const p=await __privateGet(this,S).start();return await(null==(s=(o=__privateGet(this,x).config).onSuccess)?void 0:s.call(o,p,t,this.state.context,this)),await(null==(l=(a=this.options).onSuccess)?void 0:l.call(a,p,t,this.state.context)),await(null==(c=(u=__privateGet(this,x).config).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context,this)),await(null==(h=(d=this.options).onSettled)?void 0:h.call(d,p,null,t,this.state.context)),__privateMethod(this,k,E).call(this,{type:"success",data:p}),p}catch(T){try{throw await(null==(f=(p=__privateGet(this,x).config).onError)?void 0:f.call(p,T,t,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,t,this.state.context)),await(null==(y=(g=__privateGet(this,x).config).onSettled)?void 0:y.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(_=this.options).onSettled)?void 0:w.call(_,void 0,T,t,this.state.context)),T}finally{__privateMethod(this,k,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakSet,E=function(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),zo.batch((()=>{__privateGet(this,b).forEach((e=>{e.onMutationUpdate(t)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:t})}))},P);var Zo=(C=class extends go{constructor(t={}){super(),__privateAdd(this,T),__privateAdd(this,A),this.config=t,__privateSet(this,T,new Map),__privateSet(this,A,Date.now())}build(t,e,n){const r=new Xo({mutationCache:this,mutationId:++__privateWrapper(this,A)._,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){const e=Jo(t),n=__privateGet(this,T).get(e)??[];n.push(t),__privateGet(this,T).set(e,n),this.notify({type:"added",mutation:t})}remove(t){var e;const n=Jo(t);if(__privateGet(this,T).has(n)){const r=null==(e=__privateGet(this,T).get(n))?void 0:e.filter((e=>e!==t));r&&(0===r.length?__privateGet(this,T).delete(n):__privateGet(this,T).set(n,r))}this.notify({type:"removed",mutation:t})}canRun(t){var e;const n=null==(e=__privateGet(this,T).get(Jo(t)))?void 0:e.find((t=>"pending"===t.state.status));return!n||n===t}runNext(t){var e;const n=null==(e=__privateGet(this,T).get(Jo(t)))?void 0:e.find((e=>e!==t&&e.state.isPaused));return(null==n?void 0:n.continue())??Promise.resolve()}clear(){zo.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(t){const e={exact:!0,...t};return this.getAll().find((t=>Eo(e,t)))}findAll(t={}){return this.getAll().filter((e=>Eo(t,e)))}notify(t){zo.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}resumePausedMutations(){const t=this.getAll().filter((t=>t.state.isPaused));return zo.batch((()=>Promise.all(t.map((t=>t.continue().catch(_o))))))}},T=new WeakMap,A=new WeakMap,C);function Jo(t){var e;return(null==(e=t.options.scope)?void 0:e.id)??String(t.mutationId)}function ts(t){return{onFetch:(e,n)=>{var r,i,o,s,a;const l=e.options,u=null==(o=null==(i=null==(r=e.fetchOptions)?void 0:r.meta)?void 0:i.fetchMore)?void 0:o.direction,c=(null==(s=e.state.data)?void 0:s.pages)||[],d=(null==(a=e.state.data)?void 0:a.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const f=async()=>{let n=!1;const r=jo(e.options,e.fetchOptions),i=async(t,i,o)=>{if(n)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const s={queryKey:e.queryKey,pageParam:i,direction:o?"backward":"forward",meta:e.options.meta};var a;a=s,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(e.signal.aborted?n=!0:e.signal.addEventListener("abort",(()=>{n=!0})),e.signal)});const l=await r(s),{maxPages:u}=e.options,c=o?Vo:Do;return{pages:c(t.pages,l,u),pageParams:c(t.pageParams,i,u)}};if(u&&c.length){const t="backward"===u,e={pages:c,pageParams:d},n=(t?ns:es)(l,e);h=await i(e,n,t)}else{const e=t??c.length;do{const t=0===p?d[0]??l.initialPageParam:es(l,h);if(p>0&&null==t)break;h=await i(h,t),p++}while(p<e)}return h};e.options.persister?e.fetchFn=()=>{var t,r;return null==(r=(t=e.options).persister)?void 0:r.call(t,f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=f}}}function es(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ns(t,{pages:e,pageParams:n}){var r;return e.length>0?null==(r=t.getPreviousPageParam)?void 0:r.call(t,e[0],e,n[0],n):void 0}var rs=(j=class{constructor(t={}){__privateAdd(this,R),__privateAdd(this,O),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,L),__privateAdd(this,D),__privateAdd(this,V),__privateAdd(this,I),__privateSet(this,R,t.queryCache||new Qo),__privateSet(this,O,t.mutationCache||new Zo),__privateSet(this,M,t.defaultOptions||{}),__privateSet(this,F,new Map),__privateSet(this,L,new Map),__privateSet(this,D,0)}mount(){__privateWrapper(this,D)._++,1===__privateGet(this,D)&&(__privateSet(this,V,Bo.subscribe((async t=>{t&&(await this.resumePausedMutations(),__privateGet(this,R).onFocus())}))),__privateSet(this,I,No.subscribe((async t=>{t&&(await this.resumePausedMutations(),__privateGet(this,R).onOnline())}))))}unmount(){var t,e;__privateWrapper(this,D)._--,0===__privateGet(this,D)&&(null==(t=__privateGet(this,V))||t.call(this),__privateSet(this,V,void 0),null==(e=__privateGet(this,I))||e.call(this),__privateSet(this,I,void 0))}isFetching(t){return __privateGet(this,R).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return __privateGet(this,O).findAll({...t,status:"pending"}).length}getQueryData(t){var e;const n=this.defaultQueryOptions({queryKey:t});return null==(e=__privateGet(this,R).get(n.queryHash))?void 0:e.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(void 0===e)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=__privateGet(this,R).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(xo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return __privateGet(this,R).findAll(t).map((({queryKey:t,state:e})=>[t,e.data]))}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=__privateGet(this,R).get(r.queryHash),o=function(t,e){return"function"==typeof t?t(e):t}(e,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,R).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return zo.batch((()=>__privateGet(this,R).findAll(t).map((({queryKey:t})=>[t,this.setQueryData(t,e,n)]))))}getQueryState(t){var e;const n=this.defaultQueryOptions({queryKey:t});return null==(e=__privateGet(this,R).get(n.queryHash))?void 0:e.state}removeQueries(t){const e=__privateGet(this,R);zo.batch((()=>{e.findAll(t).forEach((t=>{e.remove(t)}))}))}resetQueries(t,e){const n=__privateGet(this,R),r={type:"active",...t};return zo.batch((()=>(n.findAll(t).forEach((t=>{t.reset()})),this.refetchQueries(r,e))))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=zo.batch((()=>__privateGet(this,R).findAll(t).map((t=>t.cancel(n)))));return Promise.all(r).then(_o).catch(_o)}invalidateQueries(t={},e={}){return zo.batch((()=>{if(__privateGet(this,R).findAll(t).forEach((t=>{t.invalidate()})),"none"===t.refetchType)return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)}))}refetchQueries(t={},e){const n={...e,cancelRefetch:(null==e?void 0:e.cancelRefetch)??!0},r=zo.batch((()=>__privateGet(this,R).findAll(t).filter((t=>!t.isDisabled())).map((t=>{let e=t.fetch(void 0,n);return n.throwOnError||(e=e.catch(_o)),"paused"===t.state.fetchStatus?Promise.resolve():e}))));return Promise.all(r).then(_o)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const n=__privateGet(this,R).build(this,e);return n.isStaleByTime(xo(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(_o).catch(_o)}fetchInfiniteQuery(t){return t.behavior=ts(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(_o).catch(_o)}ensureInfiniteQueryData(t){return t.behavior=ts(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return No.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,R)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,M)}setDefaultOptions(t){__privateSet(this,M,t)}setQueryDefaults(t,e){__privateGet(this,F).set(To(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...__privateGet(this,F).values()];let n={};return e.forEach((e=>{Ao(t,e.queryKey)&&(n={...n,...e.defaultOptions})})),n}setMutationDefaults(t,e){__privateGet(this,L).set(To(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...__privateGet(this,L).values()];let n={};return e.forEach((e=>{Ao(t,e.mutationKey)&&(n={...n,...e.defaultOptions})})),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...__privateGet(this,M).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Po(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),!0!==e.enabled&&e.queryFn===Io&&(e.enabled=!1),e}defaultMutationOptions(t){return(null==t?void 0:t._defaulted)?t:{...__privateGet(this,M).mutations,...(null==t?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){__privateGet(this,R).clear(),__privateGet(this,O).clear()}},R=new WeakMap,O=new WeakMap,M=new WeakMap,F=new WeakMap,L=new WeakMap,D=new WeakMap,V=new WeakMap,I=new WeakMap,j),is=(ut=class extends go{constructor(t,e){super(),__privateAdd(this,J),__privateAdd(this,B),__privateAdd(this,N),__privateAdd(this,U),__privateAdd(this,G),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,$),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,Y),__privateAdd(this,Q),__privateAdd(this,X),__privateAdd(this,Z,new Set),this.options=e,__privateSet(this,B,t),__privateSet(this,$,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,N).addObserver(this),os(__privateGet(this,N),this.options)?__privateMethod(this,J,tt).call(this):this.updateResult(),__privateMethod(this,J,it).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ss(__privateGet(this,N),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ss(__privateGet(this,N),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,J,ot).call(this),__privateMethod(this,J,st).call(this),__privateGet(this,N).removeObserver(this)}setOptions(t,e){const n=this.options,r=__privateGet(this,N);if(this.options=__privateGet(this,B).defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof So(this.options.enabled,__privateGet(this,N)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,J,at).call(this),__privateGet(this,N).setOptions(this.options),n._defaulted&&!Ro(this.options,n)&&__privateGet(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,N),observer:this});const i=this.hasListeners();i&&as(__privateGet(this,N),r,this.options,n)&&__privateMethod(this,J,tt).call(this),this.updateResult(e),!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&xo(this.options.staleTime,__privateGet(this,N))===xo(n.staleTime,__privateGet(this,N))||__privateMethod(this,J,et).call(this);const o=__privateMethod(this,J,nt).call(this);!i||__privateGet(this,N)===r&&So(this.options.enabled,__privateGet(this,N))===So(n.enabled,__privateGet(this,N))&&o===__privateGet(this,X)||__privateMethod(this,J,rt).call(this,o)}getOptimisticResult(t){const e=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),t),n=this.createResult(e,t);return function(t,e){if(!Ro(t.getCurrentResult(),e))return!0;return!1}(this,n)&&(__privateSet(this,G,n),__privateSet(this,H,this.options),__privateSet(this,W,__privateGet(this,N).state)),n}getCurrentResult(){return __privateGet(this,G)}trackResult(t,e){const n={};return Object.keys(t).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==e||e(r),t[r])})})),n}trackProp(t){__privateGet(this,Z).add(t)}getCurrentQuery(){return __privateGet(this,N)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=__privateGet(this,B).defaultQueryOptions(t),n=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),e);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,e)))}fetch(t){return __privateMethod(this,J,tt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,G))))}createResult(t,e){var n;const r=__privateGet(this,N),i=this.options,o=__privateGet(this,G),s=__privateGet(this,W),a=__privateGet(this,H),l=t!==r?t.state:__privateGet(this,U),{state:u}=t;let c,d={...u},h=!1;if(e._optimisticResults){const n=this.hasListeners(),o=!n&&os(t,e),s=n&&as(t,r,e,i);(o||s)&&(d={...d,...Yo(u.data,t.options)}),"isRestoring"===e._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:f,status:m}=d;if(e.select&&void 0!==d.data)if(o&&d.data===(null==s?void 0:s.data)&&e.select===__privateGet(this,z))c=__privateGet(this,q);else try{__privateSet(this,z,e.select),c=e.select(d.data),c=Lo(null==o?void 0:o.data,c,e),__privateSet(this,q,c),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}else c=d.data;if(void 0!==e.placeholderData&&void 0===c&&"pending"===m){let t;if((null==o?void 0:o.isPlaceholderData)&&e.placeholderData===(null==a?void 0:a.placeholderData))t=o.data;else if(t="function"==typeof e.placeholderData?e.placeholderData(null==(n=__privateGet(this,K))?void 0:n.state.data,__privateGet(this,K)):e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),__privateSet(this,$,null)}catch(b){__privateSet(this,$,b)}void 0!==t&&(m="success",c=Lo(null==o?void 0:o.data,t,e),h=!0)}__privateGet(this,$)&&(p=__privateGet(this,$),c=__privateGet(this,q),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,y="error"===m,_=g&&v,w=void 0!==c;return{status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:y,isInitialLoading:_,isLoading:_,data:c,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:y&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:h,isRefetchError:y&&w,isStale:ls(t,e),refetch:this.refetch}}updateResult(t){const e=__privateGet(this,G),n=this.createResult(__privateGet(this,N),this.options);if(__privateSet(this,W,__privateGet(this,N).state),__privateSet(this,H,this.options),void 0!==__privateGet(this,W).data&&__privateSet(this,K,__privateGet(this,N)),Ro(n,e))return;__privateSet(this,G,n);const r={};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!__privateGet(this,Z).size)return!0;const r=new Set(n??__privateGet(this,Z));return this.options.throwOnError&&r.add("error"),Object.keys(__privateGet(this,G)).some((t=>{const n=t;return __privateGet(this,G)[n]!==e[n]&&r.has(n)}))})()&&(r.listeners=!0),__privateMethod(this,J,lt).call(this,{...r,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,J,it).call(this)}},B=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,$=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,Y=new WeakMap,Q=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakSet,tt=function(t){__privateMethod(this,J,at).call(this);let e=__privateGet(this,N).fetch(this.options,t);return(null==t?void 0:t.throwOnError)||(e=e.catch(_o)),e},et=function(){__privateMethod(this,J,ot).call(this);const t=xo(this.options.staleTime,__privateGet(this,N));if(yo||__privateGet(this,G).isStale||!wo(t))return;const e=bo(__privateGet(this,G).dataUpdatedAt,t);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,G).isStale||this.updateResult()}),e+1))},nt=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,N)):this.options.refetchInterval)??!1},rt=function(t){__privateMethod(this,J,st).call(this),__privateSet(this,X,t),!yo&&!1!==So(this.options.enabled,__privateGet(this,N))&&wo(__privateGet(this,X))&&0!==__privateGet(this,X)&&__privateSet(this,Q,setInterval((()=>{(this.options.refetchIntervalInBackground||Bo.isFocused())&&__privateMethod(this,J,tt).call(this)}),__privateGet(this,X)))},it=function(){__privateMethod(this,J,et).call(this),__privateMethod(this,J,rt).call(this,__privateMethod(this,J,nt).call(this))},ot=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},st=function(){__privateGet(this,Q)&&(clearInterval(__privateGet(this,Q)),__privateSet(this,Q,void 0))},at=function(){const t=__privateGet(this,B).getQueryCache().build(__privateGet(this,B),this.options);if(t===__privateGet(this,N))return;const e=__privateGet(this,N);__privateSet(this,N,t),__privateSet(this,U,t.state),this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))},lt=function(t){zo.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t(__privateGet(this,G))})),__privateGet(this,B).getQueryCache().notify({query:__privateGet(this,N),type:"observerResultsUpdated"})}))},ut);function os(t,e){return function(t,e){return!1!==So(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&ss(t,e,e.refetchOnMount)}function ss(t,e,n){if(!1!==So(e.enabled,t)){const r="function"==typeof n?n(t):n;return"always"===r||!1!==r&&ls(t,e)}return!1}function as(t,e,n,r){return(t!==e||!1===So(r.enabled,t))&&(!n.suspense||"error"!==t.state.status)&&ls(t,n)}function ls(t,e){return!1!==So(e.enabled,t)&&t.isStaleByTime(xo(e.staleTime,t))}var us=(gt=class extends go{constructor(t,e){super(),__privateAdd(this,ft),__privateAdd(this,ct),__privateAdd(this,dt),__privateAdd(this,ht),__privateAdd(this,pt),__privateSet(this,ct,t),this.setOptions(e),this.bindMethods(),__privateMethod(this,ft,mt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const n=this.options;this.options=__privateGet(this,ct).defaultMutationOptions(t),Ro(this.options,n)||__privateGet(this,ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,ht),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&To(n.mutationKey)!==To(this.options.mutationKey)?this.reset():"pending"===(null==(e=__privateGet(this,ht))?void 0:e.state.status)&&__privateGet(this,ht).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||null==(t=__privateGet(this,ht))||t.removeObserver(this)}onMutationUpdate(t){__privateMethod(this,ft,mt).call(this),__privateMethod(this,ft,vt).call(this,t)}getCurrentResult(){return __privateGet(this,dt)}reset(){var t;null==(t=__privateGet(this,ht))||t.removeObserver(this),__privateSet(this,ht,void 0),__privateMethod(this,ft,mt).call(this),__privateMethod(this,ft,vt).call(this)}mutate(t,e){var n;return __privateSet(this,pt,e),null==(n=__privateGet(this,ht))||n.removeObserver(this),__privateSet(this,ht,__privateGet(this,ct).getMutationCache().build(__privateGet(this,ct),this.options)),__privateGet(this,ht).addObserver(this),__privateGet(this,ht).execute(t)}},ct=new WeakMap,dt=new WeakMap,ht=new WeakMap,pt=new WeakMap,ft=new WeakSet,mt=function(){var t;const e=(null==(t=__privateGet(this,ht))?void 0:t.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,dt,{...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset})},vt=function(t){zo.batch((()=>{var e,n,r,i,o,s,a,l;if(__privateGet(this,pt)&&this.hasListeners()){const u=__privateGet(this,dt).variables,c=__privateGet(this,dt).context;"success"===(null==t?void 0:t.type)?(null==(n=(e=__privateGet(this,pt)).onSuccess)||n.call(e,t.data,u,c),null==(i=(r=__privateGet(this,pt)).onSettled)||i.call(r,t.data,null,u,c)):"error"===(null==t?void 0:t.type)&&(null==(s=(o=__privateGet(this,pt)).onError)||s.call(o,t.error,u,c),null==(l=(a=__privateGet(this,pt)).onSettled)||l.call(a,void 0,t.error,u,c))}this.listeners.forEach((t=>{t(__privateGet(this,dt))}))}))},gt),cs=oe(void 0),ds=t=>{const e=Bn(cs);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hs=({client:t,children:e})=>(Fn((()=>(t.mount(),()=>{t.unmount()})),[t]),no(cs.Provider,{value:t,children:e})),ps=oe(!1),fs=()=>Bn(ps);ps.Provider;var ms=oe(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),vs=()=>Bn(ms);function gs(t,e){return"function"==typeof t?t(...e):!!t}function ys(){}var _s=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},ws=t=>{Fn((()=>{t.clearReset()}),[t])},bs=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&gs(n,[t.error,r]),xs=t=>{t.suspense&&("number"!=typeof t.staleTime&&(t.staleTime=1e3),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3)))},Ss=(t,e)=>(null==t?void 0:t.suspense)&&e.isPending,ks=(t,e,n)=>e.fetchOptimistic(t).catch((()=>{n.clearReset()}));function Es(t,e){return function(t,e){var n,r,i,o;const s=ds(),a=fs(),l=vs(),u=s.defaultQueryOptions(t);null==(r=null==(n=s.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||r.call(n,u),u._optimisticResults=a?"isRestoring":"optimistic",xs(u),_s(u,l),ws(l);const[c]=On((()=>new e(s,u))),d=c.getOptimisticResult(u);if(Yr(jn((t=>{const e=a?()=>{}:c.subscribe(zo.batchCalls(t));return c.updateResult(),e}),[c,a]),(()=>c.getCurrentResult())),Fn((()=>{c.setOptions(u,{listeners:!1})}),[u,c]),Ss(u,d))throw ks(u,c,l);if(bs({result:d,errorResetBoundary:l,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash)}))throw d.error;return null==(o=null==(i=s.getDefaultOptions().queries)?void 0:i._experimental_afterQuery)||o.call(i,u,d),u.notifyOnChangeProps?d:c.trackResult(d)}(t,is)}var Ps=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ts=ln((function(t){return Ps.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),As=function(t){return"theme"!==t},Cs=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?Ts:As},Rs=function(t,e,n){var r;if(e){var i=e.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof r&&n&&(r=t.__emotion_forwardProp),r},Os=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return Pi(e,n,r),Gi((function(){return Ti(e,n,r)})),null},Ms=function t(e,n){var r,i,o=e.__emotion_real===e,s=o&&e.__emotion_base||e;void 0!==n&&(r=n.label,i=n.target);var a=Rs(e,n,o),l=a||Cs(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],c[0][p])}var f=zi((function(t,e,n){var r=u&&t.as||s,o="",c=[],h=t;if(null==t.theme){for(var p in h={},t)h[p]=t[p];h.theme=Bn(qi)}"string"==typeof t.className?o=Ei(e.registered,c,t.className):null!=t.className&&(o=t.className+" ");var f=Ni(d.concat(c),e.registered,h);o+=e.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?Cs(r):l,v={};for(var g in t)u&&"as"===g||m(g)&&(v[g]=t[g]);return v.className=o,n&&(v.ref=n),Dt(jt,null,Dt(Os,{cache:e,serialized:f,isStringTag:"string"==typeof r}),Dt(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=e.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=d,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(e,r){return t(e,Jr({},n,r,{shouldForwardProp:Rs(f,r,!0)})).apply(void 0,d)},f}}.bind();function Fs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(t){Ms[t]=Ms(t)}));const Ls=er(Fs);function Ds({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Vs=er(Ds),Is=Ms.td`
|
|
4
4
|
${{whiteSpace:"nowrap",paddingTop:"1rem",paddingBottom:"1rem",paddingLeft:"1rem",paddingRight:"0.75rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
|
|
5
|
-
`,
|
|
5
|
+
`,js=Ms.td`
|
|
6
6
|
${{whiteSpace:"nowrap",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"}}
|
|
7
|
-
`,
|
|
7
|
+
`,Bs=Ms.span({display:"inline-flex",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset"},(t=>t.className)),Ns=t=>{const e=new Date(t.value);return oo(Is,{children:[e.toLocaleDateString(),io("br",{}),e.toLocaleTimeString()]})},Us=t=>t.url?io(js,{children:oo(Bs,{as:"a",href:t.url,target:"_blank",rel:"noopener noreferrer",css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]})}):io(js,{children:io(Bs,{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})}),Gs=t=>io(js,{children:io("button",{as:"button",onClick:()=>t.onClick(t.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:t.children})}),Ws=(t,e,n)=>{var r;switch(null==n?void 0:n.kind){case"status":return io(js,{children:io(Bs,{className:null==(r=n.styleOverrides)?void 0:r[e],children:e})});case"date":return io(Ns,{value:e});case"link":return io(Us,{url:e});case"button":return io(Gs,{id:t,value:e,onClick:n.onClick,children:n.children});default:return io(Is,{children:e})}},Hs=Ms.input`
|
|
8
8
|
${()=>({display:"block",minHeight:"2.25rem",width:"100%",borderRadius:"0.375rem",borderWidth:"0px",paddingTop:"0.375rem",paddingBottom:"0.375rem",paddingRight:"5rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","::placeholder":{"--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"},":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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset"},":disabled":{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.5rem"}})}
|
|
9
9
|
|
|
10
|
-
${({prefix:t})=>t?{paddingLeft:"
|
|
10
|
+
${({prefix:t})=>t?{paddingLeft:"2.5rem"}:{paddingLeft:"0.75rem"}}
|
|
11
11
|
|
|
12
12
|
${({hasError:t})=>t?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
|
|
13
|
-
|
|
13
|
+
`,$s=er((({label:t,id:e,type:n,icon:r,placeholder:i,setPlaceholderOnFocus:o,value:s,className:a,onChange:l,onBlur:u,error:c,helperText:d,disabled:h},p)=>oo("div",{className:a,children:[io("label",{htmlFor:e,css:{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[r&&io("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:r}),io(Hs,{type:n,value:s,name:e,id:e,placeholder:i,onChange:t=>{const e=t;e.target instanceof HTMLInputElement&&l(e.target.value.trim())},onBlur:t=>{const e=t;e.target instanceof HTMLInputElement&&u&&u(e.target.value.trim())},onFocus:()=>{i&&o&&!(null==s?void 0:s.trim())&&l(i)},hasError:!!c,ref:p,disabled:h,prefix:!!r})]}),c&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:c}),d&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:d})]})));function zs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const qs=er(zs);function Ks({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z",clipRule:"evenodd"}))}const Ys=er(Ks);function Qs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const Xs=er(Qs);function Zs({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Js=er(Zs);function ta({title:t,titleId:e,...n},r){return Dt("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?Dt("title",{id:e},t):null,Dt("path",{d:"m5.433 13.917 1.262-3.155A4 4 0 0 1 7.58 9.42l6.92-6.918a2.121 2.121 0 0 1 3 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 0 1-.65-.65Z"}),Dt("path",{d:"M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H4.75A2.75 2.75 0 0 0 2 5.75v9.5A2.75 2.75 0 0 0 4.75 18h9.5A2.75 2.75 0 0 0 17 15.25V10a.75.75 0 0 0-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5Z"}))}const ea=er(ta),na=Ms.button({marginRight:"1rem",display:"inline-flex",alignItems:"center",borderRadius:"0.375rem",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},(t=>t.className),(({isActive:t})=>t&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"})),ra={name:"All",filterFunction:()=>!0},ia=t=>{const[e,n]=On(),[r,i]=On(ra),[o,s]=On(t.columns[0]),[a,l]=On("asc"),u=In((()=>o?[...t.data].sort(((t,e)=>{const n=o.sort?o.sort(t[o.field],e[o.field]):t[o.field].localeCompare(e[o.field]);return"desc"===a?-1*n:n})):t.data),[t.data,o,a]),c=In((()=>{const t=u.filter(r.filterFunction);return e?t.filter((t=>t.id.toLowerCase().includes(e.toLowerCase()))):t}),[u,e,r]),d=(t,e)=>{const n={name:t.name,filterFunction:n=>t.predicate(n[e.field])};return()=>i(n)};return io(ro,{children:oo("div",{css:{paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[oo("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[oo("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[io("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t.title}),io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"},children:t.subtitle}),io($s,{css:{marginTop:"0.5rem",maxWidth:"20rem"},label:"",icon:io(Vs,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"}}),placeholder:"Search...",id:"search",type:"text",onChange:t=>n(t)})]}),io("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:io("button",{type:"button",onClick:t.onAdd,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:t.addButtonText})})]}),io("div",{css:{marginTop:"2rem",display:"flow-root"},children:io("div",{css:{marginLeft:"-1rem",marginRight:"-1rem",marginTop:"-0.5rem",marginBottom:"-0.5rem",overflowX:"auto","@media (min-width: 640px)":{marginLeft:"-1.5rem",marginRight:"-1.5rem"},"@media (min-width: 1024px)":{marginLeft:"-2rem",marginRight:"-2rem"}},children:io("div",{css:{display:"inline-block",minWidth:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem",verticalAlign:"middle","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:io("div",{css:{overflow:"hidden","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--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)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:oo("table",{css:{minWidth:"100%","> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-divide-opacity))"}},children:[io("thead",{children:io("tr",{children:oo("td",{css:{padding:"1rem"},colspan:t.columns.length,children:[io(na,{onClick:()=>i(ra),isActive:r===ra,children:"All"}),t.columns.map((t=>{var e;return null==(e=t.filters)?void 0:e.map((e=>io(na,{onClick:d(e,t),isActive:r.name===e.name,children:e.name},e.name)))}))]})})}),io("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:io("tr",{children:t.columns.map((t=>io("th",{scope:"col",css:{paddingTop:"0.875rem",paddingBottom:"0.875rem",paddingLeft:"1rem",paddingRight:"0.75rem",textAlign:"left",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:oo("button",{disabled:!t.isSortable,onClick:()=>(t=>{o===t?l("asc"===a?"desc":"asc"):(s(t),l("asc"))})(t),css:{display:"inline-flex"},children:[io("span",{children:t.name}),oo("span",{css:{marginLeft:"0.5rem"},children:[o===t&&"asc"===a&&io(qs,{css:{height:"1.25rem",width:"1.25rem"}}),o===t&&"desc"===a&&io(Ys,{css:{height:"1.25rem",width:"1.25rem"}}),o!==t&&io("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},t.field)))})}),io("tbody",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-divide-opacity))"},"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},children:c.map(((e,n)=>io("tr",{children:t.columns.map(((t,r)=>io(jt,{children:Ws(e.id,e[t.field],t.type)},`${e[t.field]}-${n}-${r}`)))},`${e[t.columns[0].field]}-${n}`)))})]})})})})})]})})};
|
|
14
14
|
/**
|
|
15
15
|
* @remix-run/router v1.19.2
|
|
16
16
|
*
|
|
@@ -21,7 +21,7 @@ var __defProp=Object.defineProperty,__typeError=t=>{throw TypeError(t)},__defNor
|
|
|
21
21
|
*
|
|
22
22
|
* @license MIT
|
|
23
23
|
*/
|
|
24
|
-
function
|
|
24
|
+
function oa(){return oa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},oa.apply(this,arguments)}var sa,aa;(aa=sa||(sa={})).Pop="POP",aa.Push="PUSH",aa.Replace="REPLACE";const la="popstate";function ua(t){return void 0===t&&(t={}),function(t,e,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=sa.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(oa({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=sa.Pop;let t=c(),e=null==t?null:t-u;u=t,l&&l({action:a,location:m.location,delta:e})}function h(t,e){a=sa.Push;let r=pa(m.location,t,e);n&&n(r,t),u=c()+1;let d=ha(r,u),h=m.createHref(r);try{s.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}o&&l&&l({action:a,location:m.location,delta:1})}function p(t,e){a=sa.Replace;let r=pa(m.location,t,e);n&&n(r,t),u=c();let i=ha(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:fa(t);return n=n.replace(/ $/,"%20"),ca(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}let m={get action(){return a},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(la,d),l=t,()=>{i.removeEventListener(la,d),l=null}},createHref:t=>e(i,t),createURL:f,encodeLocation(t){let e=f(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:h,replace:p,go:t=>s.go(t)};return m}((function(t,e){let{pathname:n="/",search:r="",hash:i=""}=ma(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),pa("",{pathname:n,search:r,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");r=-1===n?e:e.slice(0,n)}return r+"#"+("string"==typeof e?e:fa(e))}),(function(t,e){da("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}function ca(t,e){if(!1===t||null==t)throw new Error(e)}function da(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(Cy){}}}function ha(t,e){return{usr:t.state,key:t.key,idx:e}}function pa(t,e,n,r){return void 0===n&&(n=null),oa({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?ma(e):e,{state:n,key:e&&e.key||r||Math.random().toString(36).substr(2,8)})}function fa(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function ma(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}var va,ga;function ya(t,e,n){return void 0===n&&(n="/"),function(t,e,n,r){let i="string"==typeof e?ma(e):e,o=Ma(i.pathname||"/",n);if(null==o)return null;let s=_a(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){let n=t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]));return n?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let a=null;for(let l=0;null==a&&l<s.length;++l){let t=Oa(o);a=Ca(s[l],t,r)}return a}(t,e,n,!1)}function _a(t,e,n,r){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(t,i,o)=>{let s={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(ca(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=Da([r,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(ca(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),_a(t.children,e,l,a)),(null!=t.path||t.index)&&e.push({path:a,score:Aa(a,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let r of wa(t.path))i(t,e,r);else i(t,e)})),e}function wa(t){let e=t.split("/");if(0===e.length)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=wa(r.join("/")),a=[];return a.push(...s.map((t=>""===t?o:[o,t].join("/")))),i&&a.push(...s),a.map((e=>t.startsWith("/")&&""===e?"/":e))}(ga=va||(va={})).data="data",ga.deferred="deferred",ga.redirect="redirect",ga.error="error";const ba=/^:[\w-]+$/,xa=3,Sa=2,ka=1,Ea=10,Pa=-2,Ta=t=>"*"===t;function Aa(t,e){let n=t.split("/"),r=n.length;return n.some(Ta)&&(r+=Pa),e&&(r+=Sa),n.filter((t=>!Ta(t))).reduce(((t,e)=>t+(ba.test(e)?xa:""===e?ka:Ea)),r)}function Ca(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a<r.length;++a){let t=r[a],l=a===r.length-1,u="/"===o?e:e.slice(o.length)||"/",c=Ra({path:t.relativePath,caseSensitive:t.caseSensitive,end:l},u),d=t.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=Ra({path:t.relativePath,caseSensitive:t.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:Da([o,c.pathname]),pathnameBase:Va(Da([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Da([o,c.pathnameBase]))}return s}function Ra(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=function(t,e,n){void 0===e&&(e=!1);void 0===n&&(n=!0);da("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(r.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));t.endsWith("*")?(r.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,e?void 0:"i");return[o,r]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((t,e,n)=>{let{paramName:r,isOptional:i}=e;if("*"===r){let t=a[n]||"";s=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}const l=a[n];return t[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:o,pathnameBase:s,pattern:t}}function Oa(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return da(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function Ma(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?null:t.slice(n)||"/"}function Fa(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function La(t,e,n,r){let i;void 0===r&&(r=!1),"string"==typeof t?i=ma(t):(i=oa({},t),ca(!i.pathname||!i.pathname.includes("?"),Fa("?","pathname","search",i)),ca(!i.pathname||!i.pathname.includes("#"),Fa("#","pathname","hash",i)),ca(!i.search||!i.search.includes("#"),Fa("#","search","hash",i)));let o,s=""===t||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let t=e.length-1;if(!r&&a.startsWith("..")){let e=a.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}o=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof t?ma(t):t,o=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:o,search:Ia(r),hash:ja(i)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Da=t=>t.join("/").replace(/\/\/+/g,"/"),Va=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Ia=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",ja=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";const Ba=["post","put","patch","delete"];new Set(Ba);const Na=["get",...Ba];
|
|
25
25
|
/**
|
|
26
26
|
* React Router v6.26.2
|
|
27
27
|
*
|
|
@@ -32,7 +32,7 @@ function ra(){return ra=Object.assign?Object.assign.bind():function(t){for(var e
|
|
|
32
32
|
*
|
|
33
33
|
* @license MIT
|
|
34
34
|
*/
|
|
35
|
-
function
|
|
35
|
+
function Ua(){return Ua=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ua.apply(this,arguments)}new Set(Na);const Ga=oe(null),Wa=oe(null),Ha=oe(null),$a=oe(null),za=oe({outlet:null,matches:[],isDataRoute:!1}),qa=oe(null);function Ka(){return null!=Bn($a)}function Ya(){return Ka()||ca(!1),Bn($a).location}function Qa(t){Bn(Ha).static||Ln(t)}function Xa(){let{isDataRoute:t}=Bn(za);return t?function(){let{router:t}=function(){let t=Bn(Ga);return t||ca(!1),t}(rl.UseNavigateStable),e=ol(il.UseNavigateStable),n=Dn(!1);return Qa((()=>{n.current=!0})),jn((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?t.navigate(r):t.navigate(r,Ua({fromRouteId:e},i)))}),[t,e])}():function(){Ka()||ca(!1);let t=Bn(Ga),{basename:e,future:n,navigator:r}=Bn(Ha),{matches:i}=Bn(za),{pathname:o}=Ya(),s=JSON.stringify(function(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((t,e)=>e===n.length-1?t.pathname:t.pathnameBase)):n.map((t=>t.pathnameBase))}(i,n.v7_relativeSplatPath)),a=Dn(!1);return Qa((()=>{a.current=!0})),jn((function(n,i){if(void 0===i&&(i={}),!a.current)return;if("number"==typeof n)return void r.go(n);let l=La(n,JSON.parse(s),o,"path"===i.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:Da([e,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[e,r,s,o,t])}()}function Za(t,e){return function(t,e,n,r){Ka()||ca(!1);let{navigator:i}=Bn(Ha),{matches:o}=Bn(za),s=o[o.length-1],a=s?s.params:{};!s||s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=Ya();if(e){var d;let t="string"==typeof e?ma(e):e;"/"===l||(null==(d=t.pathname)?void 0:d.startsWith(l))||ca(!1),u=t}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let t=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(t.length).join("/")}let f=ya(t,{pathname:p}),m=function(t,e,n,r){var i;void 0===e&&(e=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==t){var o;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===e.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let s=t,a=null==(i=n)?void 0:i.errors;if(null!=a){let t=s.findIndex((t=>t.route.id&&void 0!==(null==a?void 0:a[t.route.id])));t>=0||ca(!1),s=s.slice(0,Math.min(s.length,t+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let t=s[c];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=c),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((t,r,i)=>{let o,c=!1,d=null,h=null;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||tl,l&&(u<0&&0===i?(c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let p=e.concat(s.slice(0,i+1)),f=()=>{let e;return e=o?d:c?h:r.route.Component?Dt(r.route.Component,null):r.route.element?r.route.element:t,Dt(nl,{match:r,routeContext:{outlet:t,matches:p,isDataRoute:null!=n},children:e})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?Dt(el,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()}),null)}(f&&f.map((t=>Object.assign({},t,{params:Object.assign({},a,t.params),pathname:Da([l,i.encodeLocation?i.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:Da([l,i.encodeLocation?i.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,r);if(e&&m)return Dt($a.Provider,{value:{location:Ua({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:sa.Pop}},m);return m}(t,e)}function Ja(){let t=function(){var t;let e=Bn(qa),n=function(){let t=Bn(Wa);return t||ca(!1),t}(il.UseRouteError),r=ol(il.UseRouteError);if(void 0!==e)return e;return null==(t=n.errors)?void 0:t[r]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return Dt(jt,null,Dt("h2",null,"Unexpected Application Error!"),Dt("h3",{style:{fontStyle:"italic"}},e),n?Dt("pre",{style:r},n):null,null)}const tl=Dt(Ja,null);class el extends Bt{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?Dt(za.Provider,{value:this.props.routeContext},Dt(qa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function nl(t){let{routeContext:e,match:n,children:r}=t,i=Bn(Ga);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),Dt(za.Provider,{value:e},r)}var rl=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(rl||{}),il=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(il||{});function ol(t){let e=function(){let t=Bn(za);return t||ca(!1),t}(),n=e.matches[e.matches.length-1];return n.route.id||ca(!1),n.route.id}function sl(t){ca(!1)}function al(t){let{basename:e="/",children:n=null,location:r,navigationType:i=sa.Pop,navigator:o,static:s=!1,future:a}=t;Ka()&&ca(!1);let l=e.replace(/^\/*/,"/"),u=In((()=>({basename:l,navigator:o,static:s,future:Ua({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=ma(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=In((()=>{let t=Ma(c,l);return null==t?null:{location:{pathname:t,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:Dt(Ha.Provider,{value:u},Dt($a.Provider,{children:n,value:m}))}function ll(t){let{children:e,location:n}=t;return Za(ul(e),n)}function ul(t,e){void 0===e&&(e=[]);let n=[];return rr.forEach(t,((t,r)=>{if(!Dr(t))return;let i=[...e,r];if(t.type===jt)return void n.push.apply(n,ul(t.props.children,i));t.type!==sl&&ca(!1),t.props.index&&t.props.children&&ca(!1);let o={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=ul(t.props.children,i)),n.push(o)})),n}
|
|
36
36
|
/**
|
|
37
37
|
* React Router DOM v6.26.2
|
|
38
38
|
*
|
|
@@ -42,10 +42,10 @@ function Ba(){return Ba=Object.assign?Object.assign.bind():function(t){for(var e
|
|
|
42
42
|
* LICENSE.md file in the root directory of this source tree.
|
|
43
43
|
*
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch(Ty){}const ll=Zr.startTransition;function ul(t){let{basename:e,children:n,future:r,window:i}=t,o=Dn();null==o.current&&(o.current=aa({window:i,v5Compat:!0}));let s=o.current,[a,l]=On({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=jn((t=>{u&&ll?ll((()=>l(t))):l(t)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),Dt(ol,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var cl,dl,hl,pl;let fl;(dl=cl||(cl={})).UseScrollRestoration="useScrollRestoration",dl.UseSubmit="useSubmit",dl.UseSubmitFetcher="useSubmitFetcher",dl.UseFetcher="useFetcher",dl.useViewTransitionState="useViewTransitionState",(pl=hl||(hl={})).UseFetcher="useFetcher",pl.UseFetchers="useFetchers",pl.UseScrollRestoration="useScrollRestoration";const ml=()=>{if(fl)return fl;return fl=new rs({defaultOptions:{queries:{retry:(t,e)=>{var n;return e instanceof co&&![401,403].includes((null==(n=e.response)?void 0:n.status)||0)}}}}),fl},vl="getAllPromotions",gl=/^https:\/\/([A-Za-z]+)-partner/,yl=t=>{switch((t=>{if(t.startsWith("http://localhost"))return"local";const e=t.toLowerCase().match(gl);return e&&e.length>1?e[1]:"prod"})(t.url)){case"local":case"autodev":case"test":return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/staging/";default:return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/master/"}},_l=()=>{const{getAllPromotions:t}=vo(),e=Ya(),{isPending:n,error:r,data:i}=Es({queryKey:[vl],queryFn:t}),o=uo(),s=In((()=>{return t=o.backend,((null==(e=i)?void 0:e.data)||[]).map((e=>{var n;return{id:e.id,category:e.category.title,promotionStatus:e.status,contentfulUrl:(null==(n=e.contentfulContent)?void 0:n.contentId)?`${yl(t)}entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0,createdAt:e.createdAt,updatedAt:e.updatedAt,edit:"Edit"}})).sort(((t,e)=>new Date(e.updatedAt).valueOf()-new Date(t.updatedAt).valueOf()));var t,e}),[o.backend,i]),a=In((()=>[{name:"Id",field:"id",isSortable:!0},{name:"Category",field:"category",isSortable:!0},{name:"Status",field:"promotionStatus",isSortable:!0,type:{kind:"status",styleOverrides:{Enabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},Disabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"}}}},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:t=>t?-1:1,type:{kind:"link"}},{name:"Created",field:"createdAt",isSortable:!0,sort:(t,e)=>new Date(e).valueOf()-new Date(t).valueOf(),type:{kind:"date"}},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(t,e)=>new Date(e).valueOf()-new Date(t).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:t=>e(`/promotion/${t}`),children:io(ea,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[e]);switch(!0){case n:return io(ro,{children:"Loading..."});case!!r:return oo(ro,{children:["An error has occurred: ",r.message]});case!!i:return io(na,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButtonText:"Add New Promotion",onAdd:()=>e("/promotion"),onClick:t=>e(`/promotion/${t}`)});default:return io(ro,{children:"No data returned from backend"})}};function wl(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,r)=>"create"===r?t:(e.has(r)||e.set(r,t(r)),e.get(r))})}function bl(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const xl=t=>Array.isArray(t);function Sl(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}function kl(t){return"string"==typeof t||Array.isArray(t)}function El(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Pl(t,e,n,r){if("function"==typeof e){const[i,o]=El(r);e=e(void 0!==n?n:t.custom,i,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,o]=El(r);e=e(void 0!==n?n:t.custom,i,o)}return e}function Tl(t,e,n){const r=t.getProps();return Pl(r,e,void 0!==n?n:r.custom,t)}const Al=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cl=["initial",...Al],Rl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ol=new Set(Rl),Ml=t=>1e3*t,Fl=t=>t/1e3,Ll={type:"spring",stiffness:500,damping:25,restSpeed:10},Dl={type:"keyframes",duration:.8},Vl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Il=(t,{keyframes:e})=>e.length>2?Dl:Ol.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ll:Vl;function jl(t,e){return t[e]||t.default||t}const Bl=!1,Nl=t=>null!==t;function Ul(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(Nl),o=e&&"loop"!==n&&e%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const Gl=t=>t;const Wl=["read","resolveKeyframes","update","preRender","render","postRender"];function Hl(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Wl.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(s)}const l={schedule:(t,i=!1,s=!1)=>{const a=s&&r?e:n;return i&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{s=t,r?i=!0:(r=!0,[e,n]=[n,e],n.clear(),e.forEach(a),r=!1,i&&(i=!1,l.process(t)))}};return l}(o),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(p))};return{schedule:Wl.reduce(((e,o)=>{const a=s[o];return e[o]=(e,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(p)),a.schedule(e,o,s)),e}),{}),cancel:t=>{for(let e=0;e<Wl.length;e++)s[Wl[e]].cancel(t)},state:i,steps:s}}const{schedule:$l,cancel:zl,state:ql,steps:Kl}=Hl("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Gl,!0),Yl=t=>/^0[^.\s]+$/u.test(t);let Ql=Gl;const Xl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Zl=t=>e=>"string"==typeof e&&e.startsWith(t),Jl=Zl("--"),tu=Zl("var(--"),eu=t=>!!tu(t)&&nu.test(t.split("/*")[0].trim()),nu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ru=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iu(t,e,n=1){const[r,i]=function(t){const e=ru.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${null!=n?n:r}`,i]}(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const t=o.trim();return Xl(t)?parseFloat(t):t}return eu(i)?iu(i,e,n+1):i}const ou=(t,e,n)=>n>e?e:n<t?t:n,su={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},au={...su,transform:t=>ou(0,1,t)},lu={...su,default:1},uu=t=>Math.round(1e5*t)/1e5,cu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,du=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,hu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function pu(t){return"string"==typeof t}const fu=t=>({test:e=>pu(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),mu=fu("deg"),vu=fu("%"),gu=fu("px"),yu=fu("vh"),_u=fu("vw"),wu={...vu,parse:t=>vu.parse(t)/100,transform:t=>vu.transform(100*t)},bu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),xu=t=>t===su||t===gu,Su=(t,e)=>parseFloat(t.split(", ")[e]),ku=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Su(i[1],e);{const e=r.match(/^matrix\((.+)\)$/u);return e?Su(e[1],t):0}},Eu=new Set(["x","y","z"]),Pu=Rl.filter((t=>!Eu.has(t)));const Tu={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:ku(4,13),y:ku(5,14)};Tu.translateX=Tu.x,Tu.translateY=Tu.y;const Au=t=>e=>e.test(t),Cu=[su,gu,vu,mu,_u,yu,{test:t=>"auto"===t,parse:t=>t}],Ru=t=>Cu.find(Au(t)),Ou=new Set;let Mu=!1,Fu=!1;function Lu(){if(Fu){const t=Array.from(Ou).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Pu.forEach((n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var r;null===(r=t.getValue(e))||void 0===r||r.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Fu=!1,Mu=!1,Ou.forEach((t=>t.complete())),Ou.clear()}function Du(){Ou.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Fu=!0)}))}class Vu{constructor(t,e,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ou.add(this),Mu||(Mu=!0,$l.read(Du),$l.resolveKeyframes(Lu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:r}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==r?void 0:r.get(),o=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const r=n.readValue(e,o);null!=r&&(t[0]=r)}void 0===t[0]&&(t[0]=o),r&&void 0===i&&r.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ou.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ou.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Iu=(t,e)=>n=>Boolean(pu(n)&&hu.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ju=(t,e,n)=>r=>{if(!pu(r))return r;const[i,o,s,a]=r.match(cu);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Bu={...su,transform:t=>Math.round((t=>ou(0,255,t))(t))},Nu={test:Iu("rgb","red"),parse:ju("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Bu.transform(t)+", "+Bu.transform(e)+", "+Bu.transform(n)+", "+uu(au.transform(r))+")"};const Uu={test:Iu("#"),parse:function(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}},transform:Nu.transform},Gu={test:Iu("hsl","hue"),parse:ju("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+vu.transform(uu(e))+", "+vu.transform(uu(n))+", "+uu(au.transform(r))+")"},Wu={test:t=>Nu.test(t)||Uu.test(t)||Gu.test(t),parse:t=>Nu.test(t)?Nu.parse(t):Gu.test(t)?Gu.parse(t):Uu.parse(t),transform:t=>pu(t)?t:t.hasOwnProperty("red")?Nu.transform(t):Gu.transform(t)};const Hu="number",$u="color",zu="var",qu="var(",Ku="${}",Yu=/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 Qu(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=e.replace(Yu,(t=>(Wu.test(t)?(r.color.push(o),i.push($u),n.push(Wu.parse(t))):t.startsWith(qu)?(r.var.push(o),i.push(zu),n.push(t)):(r.number.push(o),i.push(Hu),n.push(parseFloat(t))),++o,Ku))).split(Ku);return{values:n,split:s,indexes:r,types:i}}function Xu(t){return Qu(t).values}function Zu(t){const{split:e,types:n}=Qu(t),r=e.length;return t=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],void 0!==t[o]){const e=n[o];i+=e===Hu?uu(t[o]):e===$u?Wu.transform(t[o]):t[o]}return i}}const Ju=t=>"number"==typeof t?0:t;const tc={test:function(t){var e,n;return isNaN(t)&&pu(t)&&((null===(e=t.match(cu))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(du))||void 0===n?void 0:n.length)||0)>0},parse:Xu,createTransformer:Zu,getAnimatableNone:function(t){const e=Xu(t);return Zu(t)(e.map(Ju))}},ec=new Set(["brightness","contrast","saturate","opacity"]);function nc(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(cu)||[];if(!r)return t;const i=n.replace(r,"");let o=ec.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const rc=/\b([a-z-]*)\(.*?\)/gu,ic={...tc,getAnimatableNone:t=>{const e=t.match(rc);return e?e.map(nc).join(" "):t}},oc={...su,transform:Math.round},sc={borderWidth:gu,borderTopWidth:gu,borderRightWidth:gu,borderBottomWidth:gu,borderLeftWidth:gu,borderRadius:gu,radius:gu,borderTopLeftRadius:gu,borderTopRightRadius:gu,borderBottomRightRadius:gu,borderBottomLeftRadius:gu,width:gu,maxWidth:gu,height:gu,maxHeight:gu,size:gu,top:gu,right:gu,bottom:gu,left:gu,padding:gu,paddingTop:gu,paddingRight:gu,paddingBottom:gu,paddingLeft:gu,margin:gu,marginTop:gu,marginRight:gu,marginBottom:gu,marginLeft:gu,rotate:mu,rotateX:mu,rotateY:mu,rotateZ:mu,scale:lu,scaleX:lu,scaleY:lu,scaleZ:lu,skew:mu,skewX:mu,skewY:mu,distance:gu,translateX:gu,translateY:gu,translateZ:gu,x:gu,y:gu,z:gu,perspective:gu,transformPerspective:gu,opacity:au,originX:wu,originY:wu,originZ:gu,zIndex:oc,backgroundPositionX:gu,backgroundPositionY:gu,fillOpacity:au,strokeOpacity:au,numOctaves:oc},ac={...sc,color:Wu,backgroundColor:Wu,outlineColor:Wu,fill:Wu,stroke:Wu,borderColor:Wu,borderTopColor:Wu,borderRightColor:Wu,borderBottomColor:Wu,borderLeftColor:Wu,filter:ic,WebkitFilter:ic},lc=t=>ac[t];function uc(t,e){let n=lc(t);return n!==ic&&(n=tc),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const cc=new Set(["auto","none","0"]);class dc extends Vu{constructor(t,e,n,r,i){super(t,e,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),eu(n))){const r=iu(n,e.current);void 0!==r&&(t[a]=r),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!bu.has(n)||2!==t.length)return;const[r,i]=t,o=Ru(r),s=Ru(i);if(o!==s)if(xu(o)&&xu(s))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let i=0;i<t.length;i++)("number"==typeof(r=t[i])?0===r:null===r||"none"===r||"0"===r||Yl(r))&&n.push(i);var r;n.length&&function(t,e,n){let r,i=0;for(;i<t.length&&!r;){const e=t[i];"string"==typeof e&&!cc.has(e)&&Qu(e).values.length&&(r=t[i]),i++}if(r&&n)for(const o of e)t[o]=uc(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const r=e[e.length-1];void 0!==r&&t.getValue(n,r).jump(r,!1)}measureEndState(){var t;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]=Tu[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function hc(t){let e;return()=>(void 0===e&&(e=t()),e)}let pc;function fc(){pc=void 0}const mc={now:()=>(void 0===pc&&mc.set(ql.isProcessing||Bl?ql.timestamp:performance.now()),pc),set:t=>{pc=t,queueMicrotask(fc)}},vc=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!tc.test(t)&&"0"!==t||t.startsWith("url(")));class gc{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=mc.now(),this.options={autoplay:t,delay:e,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Du(),Lu()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=mc.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,r){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],s=vc(i,e),a=vc(o,e);return!(!s||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&r)}(t,n,r,i)){if(!o)return null==a||a(Ul(t,this.options,e)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function yc(t,e){return e?t*(1e3/e):0}const _c=5;function wc(t,e,n){const r=Math.max(e-_c,0);return yc(n-t(r),e-r)}const bc=.001,xc=.01,Sc=10,kc=.05,Ec=1;function Pc({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o,s=1-e;s=ou(kc,Ec,s),t=ou(xc,Sc,Fl(t)),s<1?(i=e=>{const r=e*s,i=r*t,o=r-n,a=Ac(e,s),l=Math.exp(-i);return bc-o/a*l},o=e=>{const r=e*s*t,o=r*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-r),u=Ac(Math.pow(e,2),s);return(-i(e)+bc>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-bc,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let i=1;i<Tc;i++)r-=t(r)/e(r);return r}(i,o,5/t);if(t=Ml(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*s*Math.sqrt(r*e),duration:t}}}const Tc=12;function Ac(t,e){return t*Math.sqrt(1-e*e)}const Cc=["duration","bounce"],Rc=["stiffness","damping","mass"];function Oc(t,e){return e.some((e=>void 0!==t[e]))}function Mc({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Oc(t,Rc)&&Oc(t,Cc)){const n=Pc(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...r,velocity:-Fl(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=Fl(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),e||(e=g?.005:.5),f<1){const t=Ac(v,f);y=e=>{const n=Math.exp(-f*v*e);return o-n*((p+f*v*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>o-Math.exp(-v*t)*(m+(p+v*m)*t);else{const t=v*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*v*e),r=Math.min(t*e,300);return o-n*((p+f*v*m)*Math.sinh(r)+t*m*Math.cosh(r))/t}}return{calculatedDuration:h&&c||null,next:t=>{const r=y(t);if(h)s.done=t>=c;else{let i=0;f<1&&(i=0===t?Ml(p):wc(y,t,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=e;s.done=a&&l}return s.value=s.done?o:r,s}}}function Fc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=t=>-f*Math.exp(-t/r),y=t=>v+g(t),_=t=>{const e=g(t),n=y(t);h.done=Math.abs(e)<=u,h.value=h.done?v:n};let w,b;const x=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=Mc({keyframes:[h.value,p(h.value)],velocity:wc(y,t,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,_(t),x(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&_(t),h)}}}const Lc=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Dc=1e-7,Vc=12;function Ic(t,e,n,r){if(t===e&&n===r)return Gl;const i=e=>function(t,e,n,r,i){let o,s,a=0;do{s=e+(n-e)/2,o=Lc(s,r,i)-t,o>0?n=s:e=s}while(Math.abs(o)>Dc&&++a<Vc);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Lc(i(t),e,r)}const jc=Ic(.42,0,1,1),Bc=Ic(0,0,.58,1),Nc=Ic(.42,0,.58,1),Uc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Gc=t=>e=>1-t(1-e),Wc=t=>1-Math.sin(Math.acos(t)),Hc=Gc(Wc),$c=Uc(Wc),zc=Ic(.33,1.53,.69,.99),qc=Gc(zc),Kc={linear:Gl,easeIn:jc,easeInOut:Nc,easeOut:Bc,circIn:Wc,circInOut:$c,circOut:Hc,backIn:qc,backInOut:Uc(qc),backOut:zc,anticipate:t=>(t*=2)<1?.5*qc(t):.5*(2-Math.pow(2,-10*(t-1)))},Yc=t=>{if(Array.isArray(t)){Ql(4===t.length);const[e,n,r,i]=t;return Ic(e,n,r,i)}return"string"==typeof t?(Ql(void 0!==Kc[t]),Kc[t]):t},Qc=(t,e)=>n=>e(t(n)),Xc=(...t)=>t.reduce(Qc),Zc=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},Jc=(t,e,n)=>t+(e-t)*n;function td(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ed(t,e){return n=>n>0?e:t}const nd=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},rd=[Uu,Nu,Gu];function id(t){const e=(n=t,rd.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let r=e.parse(t);return e===Gu&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let i=0,o=0,s=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;i=td(a,r,t+1/3),o=td(a,r,t),s=td(a,r,t-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const od=(t,e)=>{const n=id(t),r=id(e);if(!n||!r)return ed(t,e);const i={...n};return t=>(i.red=nd(n.red,r.red,t),i.green=nd(n.green,r.green,t),i.blue=nd(n.blue,r.blue,t),i.alpha=Jc(n.alpha,r.alpha,t),Nu.transform(i))},sd=new Set(["none","hidden"]);function ad(t,e){return n=>Jc(t,e,n)}function ld(t){return"number"==typeof t?ad:"string"==typeof t?eu(t)?ed:Wu.test(t)?od:dd:Array.isArray(t)?ud:"object"==typeof t?Wu.test(t)?od:cd:ed}function ud(t,e){const n=[...t],r=n.length,i=t.map(((t,n)=>ld(t)(t,e[n])));return t=>{for(let e=0;e<r;e++)n[e]=i[e](t);return n}}function cd(t,e){const n={...t,...e},r={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=ld(t[i])(t[i],e[i]));return t=>{for(const e in r)n[e]=r[e](t);return n}}const dd=(t,e)=>{const n=tc.createTransformer(e),r=Qu(t),i=Qu(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?sd.has(t)&&!i.values.length||sd.has(e)&&!r.values.length?function(t,e){return sd.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Xc(ud(function(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][i[s]],l=null!==(n=t.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):ed(t,e)};function hd(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Jc(t,e,n);return ld(t)(t,e)}function pd(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Ql(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const r=[],i=n||hd,o=t.length-1;for(let s=0;s<o;s++){let n=i(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||Gl:e;n=Xc(t,n)}r.push(n)}return r}(e,r,i),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=Zc(t[n],t[n+1],e);return s[n](r)};return n?e=>l(ou(t[0],t[o-1],e)):l}function fd(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Zc(0,e,r);t.push(Jc(n,1,i))}}(e,t.length-1),e}function md({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(r)?r.map(Yc):Yc(r),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:fd(e),t),a=pd(s,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map((()=>u||Nc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const vd=t=>{const e=({timestamp:e})=>t(e);return{start:()=>$l.update(e,!0),stop:()=>zl(e),now:()=>ql.isProcessing?ql.timestamp:mc.now()}},gd={decay:Fc,inertia:Fc,tween:md,keyframes:md,spring:Mc},yd=t=>t/100;class _d extends gc{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||Vu;this.resolver=new o(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,r),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=gd[e]||md;let a,l;s!==md&&"number"!=typeof t[0]&&(a=Xc(yd,hd(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});"mirror"===i&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(u));const{calculatedDuration:c}=u,d=c+r;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,_=i;if(h){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(_=o)),y=ou(0,1,n)*c}const w=g?{done:!1,value:a[0]}:_.next(y);s&&(w.value=s(w.value));let{done:b}=w;g||null===l||(b=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return x&&void 0!==r&&(w.value=Ul(a,this.options,r)),m&&m(w.value),x&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Fl(t.calculatedDuration):0}get time(){return Fl(this.currentTime)}set time(t){t=Ml(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Fl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=vd,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const wd=new Set(["opacity","clipPath","filter","transform"]),bd=t=>Array.isArray(t)&&"number"==typeof t[0];function xd(t){return Boolean(!t||"string"==typeof t&&t in kd||bd(t)||Array.isArray(t)&&t.every(xd))}const Sd=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,kd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sd([0,.65,.55,1]),circOut:Sd([.55,0,1,.45]),backIn:Sd([.31,.01,.66,-.59]),backOut:Sd([.33,1.53,.69,.99])};function Ed(t){return Pd(t)||kd.easeOut}function Pd(t){return t?bd(t)?Sd(t):Array.isArray(t)?t.map(Ed):kd[t]:void 0}const Td=hc((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Ad extends gc{constructor(t){super(t);const{name:e,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new dc(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,r),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!xd(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new _d({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const i=[];let o=0;for(;!r.done&&o<2e4;)r=n.sample(o),i.push(r.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Pd(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:o});return d.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set(Ul(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Fl(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Fl(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Ml(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Gl;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return Gl}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:r,type:i,ease:o,times:s}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new _d({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=Ml(this.time);t.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;return Td()&&n&&wd.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const Cd=hc((()=>void 0!==window.ScrollTimeline));class Rd{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map((e=>{if(!Cd()||!e.attachTimeline)return e.pause(),function(t,e){let n;const r=()=>{const{currentTime:r}=e,i=(null===r?0:r.value)/100;n!==i&&t(i),n=i};return $l.update(r,!0),()=>zl(r)}((t=>{e.time=e.duration*t}),t);e.attachTimeline(t)}));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Od=(t,e,n,r={},i,o,s)=>a=>{const l=jl(r,t)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=Ml(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(d={...d,...Il(t,d)}),d.duration&&(d.duration=Ml(d.duration)),d.repeatDelay&&(d.repeatDelay=Ml(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!o&&void 0!==e.get()){const t=Ul(d.keyframes,l);if(void 0!==t)return $l.update((()=>{d.onUpdate(t),d.onComplete()})),new Rd([])}return!o&&Ad.supports(d)?new Ad(d):new _d(d)},Md=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Fd=t=>xl(t)?t[t.length-1]||0:t;function Ld(t,e){-1===t.indexOf(e)&&t.push(e)}function Dd(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Vd{constructor(){this.subscriptions=[]}add(t){return Ld(this.subscriptions,t),()=>Dd(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Id{constructor(t,e={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=mc.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=mc.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Vd);const n=this.events[t].add(e);return"change"===t?()=>{n(),$l.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=mc.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return yc(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jd(t,e){return new Id(t,e)}function Bd(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jd(n))}const Nd=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ud="data-"+Nd("framerAppearId");function Gd(t){return t.props[Ud]}function Wd(t){return Ol.has(t)?"transform":wd.has(t)?Nd(t):void 0}class Hd extends Id{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=Wd(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let r=!1;return()=>{if(r)return;r=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(Dd(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const $d=t=>Boolean(t&&t.getVelocity);function zd(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");return r||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(r=new Hd("auto"),t.addValue("willChange",r)),i=r,Boolean($d(i)&&i.add)?r.add(e):void 0;var i}function qd({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}function Kd(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const d in l){const e=t.getValue(d,null!==(o=t.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&qd(c,d))continue;const i={delay:n,...jl(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const e=Gd(t);if(e){const t=window.MotionHandoffAnimation(e,d,$l);null!==t&&(i.startTime=t,a=!0)}}e.start(Od(d,e,r,t.shouldReduceMotion&&Ol.has(d)?{type:!1}:i,t,a,zd(t,d)));const h=e.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{$l.update((()=>{a&&function(t,e){const n=Tl(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)Bd(t,s,Fd(o[s]))}(t,a)}))})),u}function Yd(t,e,n={}){var r;const i=Tl(t,e,"exit"===n.type?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Kd(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=1===i?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Qd).forEach(((t,r)=>{t.notify("AnimationStart",e),s.push(Yd(t,e,{...o,delay:n+l(r)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then((()=>e()))}return Promise.all([s(),a(n.delay)])}function Qd(t,e){return t.sortNodePosition(e)}const Xd=[...Al].reverse(),Zd=Al.length;function Jd(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map((e=>Yd(t,e,n)));r=Promise.all(i)}else if("string"==typeof e)r=Yd(t,e,n);else{const i="function"==typeof e?Tl(t,e,n.custom):e;r=Promise.all(Kd(t,i,n))}return r.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function th(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Sl(e,t)}function eh(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nh(){return{animate:eh(!0),whileInView:eh(),whileHover:eh(),whileTap:eh(),whileDrag:eh(),whileFocus:eh(),exit:eh()}}class rh{constructor(t){this.isMounted=!1,this.node=t}update(){}}let ih=0;const oh={animation:{Feature:class extends rh{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=Jd(t),n=nh(),r=!0;const i=e=>(n,r)=>{var i;const o=Tl(t,r,"exit"===e?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:t,transitionEnd:e,...r}=o;n={...n,...r,...e}}return n};function o(o){const s=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let e=0;e<Zd;e++){const h=Xd[e],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=kl(f),v=h===o?p.isActive:null;!1===v&&(d=e);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||bl(f)||"boolean"==typeof f)continue;let y=th(p.prevProp,f)||h===o&&p.isActive&&!g&&m||e>d&&m,_=!1;const w=Array.isArray(f)?f:[f];let b=w.reduce(i(h),{});!1===v&&(b={});const{prevResolvedValues:x={}}=p,S={...x,...b},k=e=>{y=!0,u.has(e)&&(_=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=b[t],n=x[t];if(c.hasOwnProperty(t))continue;let r=!1;r=xl(e)&&xl(n)?!Sl(e,n):e!==n,r?null!=e?k(t):u.add(t):void 0!==e&&u.has(t)?k(t):p.protectedKeys[t]=!0}p.prevProp=f,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),r&&t.blockInitialAnimation&&(y=!1),!y||g&&!_||l.push(...w.map((t=>({animation:t,options:{type:h}}))))}if(u.size){const e={};u.forEach((n=>{const r=t.getBaseTarget(n),i=t.getValue(n);i&&(i.liveStyle=!0),e[n]=null!=r?r:null})),l.push({animation:e})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||t.manuallyAnimateOnMount||(h=!1),r=!1,h?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,r){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)})),n[e].isActive=r;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=nh(),r=!0}}}(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends rh{constructor(){super(...arguments),this.id=ih++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);e&&!t&&r.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},sh=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function ah(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const lh=t=>e=>sh(e)&&t(e,ah(e));function uh(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function ch(t,e,n,r){return uh(t,e,lh(n),r)}const dh=(t,e)=>Math.abs(t-e);class hh{constructor(t,e,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=mh(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=dh(t.x,e.x),r=dh(t.y,e.y);return Math.sqrt(n**2+r**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:r}=t,{timestamp:i}=ql;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ph(e,this.transformPagePoint),$l.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=mh("pointercancel"===t.type?this.lastMoveEventInfo:ph(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),r&&r(t,o)},!sh(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=r||window;const o=ph(ah(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=ql;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,mh(o,this.history)),this.removeListeners=Xc(ch(this.contextWindow,"pointermove",this.handlePointerMove),ch(this.contextWindow,"pointerup",this.handlePointerUp),ch(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zl(this.updatePoint)}}function ph(t,e){return e?{point:e(t.point)}:t}function fh(t,e){return{x:t.x-e.x,y:t.y-e.y}}function mh({point:t},e){return{point:t,delta:fh(t,gh(e)),offset:fh(t,vh(e)),velocity:yh(e,.1)}}function vh(t){return t[0]}function gh(t){return t[t.length-1]}function yh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=gh(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Ml(e)));)n--;if(!r)return{x:0,y:0};const o=Fl(i.timestamp-r.timestamp);if(0===o)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 _h(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const wh=_h("dragHorizontal"),bh=_h("dragVertical");function xh(t){let e=!1;if("y"===t)e=bh();else if("x"===t)e=wh();else{const t=wh(),n=bh();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Sh(){const t=xh(!0);return!t||(t(),!1)}function kh(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Eh=.9999,Ph=1.0001,Th=-.01,Ah=.01;function Ch(t){return t.max-t.min}function Rh(t,e,n,r=.5){t.origin=r,t.originPoint=Jc(e.min,e.max,t.origin),t.scale=Ch(n)/Ch(e),t.translate=Jc(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Eh&&t.scale<=Ph||isNaN(t.scale))&&(t.scale=1),(t.translate>=Th&&t.translate<=Ah||isNaN(t.translate))&&(t.translate=0)}function Oh(t,e,n,r){Rh(t.x,e.x,n.x,r?r.originX:void 0),Rh(t.y,e.y,n.y,r?r.originY:void 0)}function Mh(t,e,n){t.min=n.min+e.min,t.max=t.min+Ch(e)}function Fh(t,e,n){t.min=e.min-n.min,t.max=t.min+Ch(e)}function Lh(t,e,n){Fh(t.x,e.x,n.x),Fh(t.y,e.y,n.y)}function Dh(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Vh(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}}const Ih=.35;function jh(t,e,n){return{min:Bh(t,e),max:Bh(t,n)}}function Bh(t,e){return"number"==typeof t?t:t[e]||0}const Nh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Uh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Gh(t){return[t("x"),t("y")]}function Wh({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Hh(t){return void 0===t||1===t}function $h({scale:t,scaleX:e,scaleY:n}){return!Hh(t)||!Hh(e)||!Hh(n)}function zh(t){return $h(t)||qh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function qh(t){return Kh(t.x)||Kh(t.y)}function Kh(t){return t&&"0%"!==t}function Yh(t,e,n){return n+e*(t-n)}function Qh(t,e,n,r,i){return void 0!==i&&(t=Yh(t,i,r)),Yh(t,n,r)+e}function Xh(t,e=0,n=1,r,i){t.min=Qh(t.min,e,n,r,i),t.max=Qh(t.max,e,n,r,i)}function Zh(t,{x:e,y:n}){Xh(t.x,e.translate,e.scale,e.originPoint),Xh(t.y,n.translate,n.scale,n.originPoint)}const Jh=.999999999999,tp=1.0000000000001;function ep(t,e){t.min=t.min+e,t.max=t.max+e}function np(t,e,n,r,i=.5){Xh(t,e,n,Jc(t.min,t.max,i),r)}function rp(t,e){np(t.x,e.x,e.scaleX,e.scale,e.originX),np(t.y,e.y,e.scaleY,e.scale,e.originY)}function ip(t,e){return Wh(function(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}}(t.getBoundingClientRect(),e))}const op=({current:t})=>t?t.ownerDocument.defaultView:null,sp=new WeakMap;class ap{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Uh(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new hh(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ah(t,"page").point)},onStart:(t,e)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xh(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gh((t=>{let e=this.getAxisMotionValue(t).get()||0;if(vu.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[t];if(r){e=Ch(r)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),o&&$l.postRender((()=>o(t,e))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=zd(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(r&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Gh((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:op(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&$l.postRender((()=>o(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:r}=this.getProps();if(!n||!lp(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},r){return void 0!==e&&t<e?t=r?Jc(e,t,r.min):Math.max(t,e):void 0!==n&&t>n&&(t=r?Jc(n,t,r.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&kh(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!r)&&function(t,{top:e,left:n,bottom:r,right:i}){return{x:Dh(t.x,n,i),y:Dh(t.y,e,r)}}(r.layoutBox,e),this.elastic=function(t=Ih){return!1===t?t=0:!0===t&&(t=Ih),{x:jh(t,"left","right"),y:jh(t,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Gh((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(r.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!kh(t))return!1;const n=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(t,e,n){const r=ip(t,n),{scroll:i}=e;return i&&(ep(r.x,i.offset.x),ep(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Vh(t.x,e.x),y:Vh(t.y,e.y)}}(r.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Wh(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Gh((s=>{if(!lp(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?t[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Od(t,n,0,e,this.visualElement,!1,zd(this.visualElement,t)))}stopAnimation(){Gh((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Gh((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[e];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Gh((e=>{const{drag:n}=this.getProps();if(!lp(e,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(e);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[e];i.set(t[e]-Jc(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!kh(e)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Gh((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();r[t]=function(t,e){let n=.5;const r=Ch(t),i=Ch(e);return i>r?n=Zc(e.min,e.max-r,t.min):r>i&&(n=Zc(t.min,t.max-i,e.min)),ou(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Gh((e=>{if(!lp(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(Jc(i,o,r[e]))}))}addListeners(){if(!this.visualElement.current)return;sp.set(this.visualElement,this);const t=ch(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();kh(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),$l.read(e);const i=uh(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Gh((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{i(),t(),r(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Ih,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function lp(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const up=t=>(e,n)=>{t&&$l.postRender((()=>t(e,n)))};const cp=oe(null);const dp=oe({}),hp=oe({}),pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fp(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mp={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!gu.test(t))return t;t=parseFloat(t)}return`${fp(t,e.target.x)}% ${fp(t,e.target.y)}%`}},vp={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=tc.parse(t);if(i.length>5)return r;const o=tc.createTransformer(t),s="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=Jc(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},gp={};const{schedule:yp,cancel:_p}=Hl(queueMicrotask,!1);class wp extends Bt{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;var o;o=xp,Object.assign(gp,o),i&&(e.group&&e.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||$l.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yp.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bp(t){const[e,n]=function(){const t=Bn(cp);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=Un();Fn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!e&&n?[!1,o]:[!0]}(),r=Bn(dp);return no(wp,{...t,layoutGroup:r,switchLayoutGroup:Bn(hp),isPresent:e,safeToRemove:n})}const xp={borderRadius:{...mp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mp,borderTopRightRadius:mp,borderBottomLeftRadius:mp,borderBottomRightRadius:mp,boxShadow:vp},Sp=["TopLeft","TopRight","BottomLeft","BottomRight"],kp=Sp.length,Ep=t=>"string"==typeof t?parseFloat(t):t,Pp=t=>"number"==typeof t||gu.test(t);function Tp(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ap=Rp(0,.5,Hc),Cp=Rp(.5,.95,Gl);function Rp(t,e,n){return r=>r<t?0:r>e?1:n(Zc(t,e,r))}function Op(t,e){t.min=e.min,t.max=e.max}function Mp(t,e){Op(t.x,e.x),Op(t.y,e.y)}function Fp(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Lp(t,e,n,r,i){return t=Yh(t-=e,1/n,r),void 0!==i&&(t=Yh(t,1/i,r)),t}function Dp(t,e,[n,r,i],o,s){!function(t,e=0,n=1,r=.5,i,o=t,s=t){vu.test(e)&&(e=parseFloat(e),e=Jc(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=Jc(o.min,o.max,r);t===o&&(a-=e),t.min=Lp(t.min,e,n,a,i),t.max=Lp(t.max,e,n,a,i)}(t,e[n],e[r],e[i],e.scale,o,s)}const Vp=["x","scaleX","originX"],Ip=["y","scaleY","originY"];function jp(t,e,n,r){Dp(t.x,e,Vp,n?n.x:void 0,r?r.x:void 0),Dp(t.y,e,Ip,n?n.y:void 0,r?r.y:void 0)}function Bp(t){return 0===t.translate&&1===t.scale}function Np(t){return Bp(t.x)&&Bp(t.y)}function Up(t,e){return t.min===e.min&&t.max===e.max}function Gp(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Wp(t,e){return Gp(t.x,e.x)&&Gp(t.y,e.y)}function Hp(t){return Ch(t.x)/Ch(t.y)}function $p(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class zp{constructor(){this.members=[]}add(t){Ld(this.members,t),t.scheduleRender()}remove(t){if(Dd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let r=e;r>=0;r--){const t=this.members[r];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const qp=(t,e)=>t.depth-e.depth;class Kp{constructor(){this.children=[],this.isDirty=!1}add(t){Ld(this.children,t),this.isDirty=!0}remove(t){Dd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qp),this.isDirty=!1,this.children.forEach(t)}}function Yp(t){const e=$d(t)?t.get():t;return Md(e)?e.toValue():e}const Qp={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Xp="undefined"!=typeof window&&void 0!==window.MotionDebug,Zp=["","X","Y","Z"],Jp={visibility:"hidden"};let tf=0;function ef(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function nf(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Gd(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$l,!(e||r))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&nf(r)}function rf({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=tf++,this.animationId=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,Xp&&(Qp.totalNodes=Qp.resolvedTargetDeltas=Qp.recalculatedProjection=0),this.nodes.forEach(af),this.nodes.forEach(ff),this.nodes.forEach(mf),this.nodes.forEach(lf),Xp&&window.MotionDebug.record(Qp)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Kp)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Vd),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=e)instanceof SVGElement&&"svg"!==r.tagName,this.instance=e;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),t){let n;const r=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=mc.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(zl(r),t(o-e))};return $l.read(r,!0),()=>zl(r)}(r,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(pf))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||bf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Wp(this.targetLayout,r)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...jl(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||pf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zl(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(vf),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&nf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const t=this.path[i];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(cf);this.isUpdating||this.nodes.forEach(df),this.isUpdating=!1,this.nodes.forEach(hf),this.nodes.forEach(of),this.nodes.forEach(sf),this.clearAllSnapshots();const t=mc.now();ql.delta=ou(0,1e3/60,t-ql.timestamp),ql.timestamp=t,ql.isProcessing=!0,Kl.update.process(ql),Kl.preRender.process(ql),Kl.render.process(ql),ql.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(uf),this.sharedNodes.forEach(gf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$l.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$l.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Uh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=r(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Np(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;t&&(e||zh(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var r;return t&&(n=this.removeTransform(n)),kf((r=n).x),kf(r.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Uh();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Pf))){const{scroll:t}=this.root;t&&(ep(n.x,t.offset.x),ep(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Uh();if(Mp(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let r=0;r<this.path.length;r++){const e=this.path[r],{scroll:i,options:o}=e;e!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&Mp(n,t),ep(n.x,i.offset.x),ep(n.y,i.offset.y))}return n}applyTransform(t,e=!1){const n=Uh();Mp(n,t);for(let r=0;r<this.path.length;r++){const t=this.path[r];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&rp(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),zh(t.latestValues)&&rp(n,t.latestValues)}return zh(this.latestValues)&&rp(n,this.latestValues),n}removeTransform(t){const e=Uh();Mp(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!zh(t.latestValues))continue;$h(t.latestValues)&&t.updateSnapshot();const r=Uh();Mp(r,t.measurePageBox()),jp(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,r)}return zh(this.latestValues)&&jp(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==ql.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(t||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=ql.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Uh(),this.relativeTargetOrigin=Uh(),Lh(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Mp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Uh(),this.targetWithTransforms=Uh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Mh(s.x,a.x,l.x),Mh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Mp(this.target,this.layout.layoutBox),Zh(this.target,this.targetDelta)):Mp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Uh(),this.relativeTargetOrigin=Uh(),Lh(this.relativeTargetOrigin,this.target,t.target),Mp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Xp&&Qp.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!$h(this.parent.latestValues)&&!qh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let r=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===ql.timestamp&&(r=!1),r)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Mp(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,r=!1){const i=n.length;if(!i)return;let o,s;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&rp(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Zh(t,s)),r&&zh(o.latestValues)&&rp(t,o.latestValues))}e.x<tp&&e.x>Jh&&(e.x=1),e.y<tp&&e.y>Jh&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Uh());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Fp(this.prevProjectionDelta.x,this.projectionDelta.x),Fp(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Oh(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&$p(this.projectionDelta.x,this.prevProjectionDelta.x)&&$p(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Xp&&Qp.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Nh(),this.projectionDelta=Nh(),this.projectionDeltaWithTransform=Nh()}setAnimationOrigin(t,e=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Nh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Uh(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(wf));let d;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,f,m,v;yf(o.x,t.x,n),yf(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,_f(p.x,f.x,m.x,v),_f(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,Up(l.x,h.x)&&Up(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Uh()),Mp(d,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,r,i,o){i?(t.opacity=Jc(0,void 0!==n.opacity?n.opacity:1,Ap(r)),t.opacityExit=Jc(void 0!==e.opacity?e.opacity:1,0,Cp(r))):o&&(t.opacity=Jc(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<kp;s++){const i=`border${Sp[s]}Radius`;let o=Tp(e,i),a=Tp(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Pp(o)===Pp(a)?(t[i]=Math.max(Jc(Ep(o),Ep(a),r),0),(vu.test(a)||vu.test(o))&&(t[i]+="%")):t[i]=a)}(e.rotate||n.rotate)&&(t.rotate=Jc(e.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$l.update((()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const r=$d(t)?t:jd(t);return r.start(Od("",r,e,n)),r.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:r,latestValues:i}=t;if(e&&n&&r){if(this!==t&&this.layout&&r&&Ef(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Uh();const e=Ch(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const r=Ch(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+r}Mp(e,n),rp(e,i),Oh(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new zp);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const r={};n.z&&ef("z",t,r,this.animationValues);for(let i=0;i<Zp.length;i++)ef(`rotate${Zp[i]}`,t,r,this.animationValues),ef(`skew${Zp[i]}`,t,r,this.animationValues);t.render();for(const i in r)t.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Jp;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Yp(null==t?void 0:t.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Yp(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!zh(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===e.x&&1===e.y||(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;t&&(r=`perspective(${t}px) ${r}`),e&&(r+=`rotate(${e}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(e=s.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in gp){if(void 0===s[u])continue;const{correct:t,applyTo:e}=gp[u],n="none"===r.transform?s[u]:t(s[u],o);if(e){const t=e.length;for(let i=0;i<t;i++)r[e[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?Yp(null==t?void 0:t.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(cf),this.root.sharedNodes.clear()}}}function of(t){t.updateLayout()}function sf(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:r}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?Gh((t=>{const r=o?n.measuredBox[t]:n.layoutBox[t],i=Ch(r);r.min=e[t].min,r.max=r.min+i})):Ef(i,n.layoutBox,e)&&Gh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Ch(e[r]);i.max=i.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[r].max=t.relativeTarget[r].min+s)}));const s=Nh();Oh(s,e,n.layoutBox);const a=Nh();o?Oh(a,t.applyTransform(r,!0),n.measuredBox):Oh(a,e,n.layoutBox);const l=!Np(s);let u=!1;if(!t.resumeFrom){const r=t.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=Uh();Lh(s,n.layoutBox,i.layoutBox);const a=Uh();Lh(a,e,o.layoutBox),Wp(s,a)||(u=!0),r.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=r)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function af(t){Xp&&Qp.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function lf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function uf(t){t.clearSnapshot()}function cf(t){t.clearMeasurements()}function df(t){t.isLayoutDirty=!1}function hf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function pf(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ff(t){t.resolveTargetDelta()}function mf(t){t.calcProjection()}function vf(t){t.resetSkewAndRotation()}function gf(t){t.removeLeadSnapshot()}function yf(t,e,n){t.translate=Jc(e.translate,0,n),t.scale=Jc(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _f(t,e,n,r){t.min=Jc(e.min,n.min,r),t.max=Jc(e.max,n.max,r)}function wf(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const bf={duration:.45,ease:[.4,0,.1,1]},xf=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Sf=xf("applewebkit/")&&!xf("chrome/")?Math.round:Gl;function kf(t){t.min=Sf(t.min),t.max=Sf(t.max)}function Ef(t,e,n){return"position"===t||"preserve-aspect"===t&&(r=Hp(e),i=Hp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Pf(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Tf=rf({attachResizeListener:(t,e)=>uh(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Af={current:void 0},Cf=rf({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Af.current){const t=new Tf({});t.mount(window),t.setOptions({layoutScroll:!0}),Af.current=t}return Af.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Rf={pan:{Feature:class extends rh{constructor(){super(...arguments),this.removePointerDownListener=Gl}onPointerDown(t){this.session=new hh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:op(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:up(t),onStart:up(e),onMove:n,onEnd:(t,e)=>{delete this.session,r&&$l.postRender((()=>r(t,e)))}}}mount(){this.removePointerDownListener=ch(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends rh{constructor(t){super(t),this.removeGroupControls=Gl,this.removeListeners=Gl,this.controls=new ap(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Cf,MeasureLayout:bp}};function Of(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd";return ch(t.current,n,((n,i)=>{if("touch"===n.pointerType||Sh())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[r];s&&$l.postRender((()=>s(n,i)))}),{passive:!t.getProps()[r]})}const Mf=(t,e)=>!!e&&(t===e||Mf(t,e.parentElement));function Ff(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ah(n))}const Lf=new WeakMap,Df=new WeakMap,Vf=t=>{const e=Lf.get(t.target);e&&e(t)},If=t=>{t.forEach(Vf)};function jf(t,e,n){const r=function({root:t,...e}){const n=t||document;Df.has(n)||Df.set(n,{});const r=Df.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(If,{root:t,...e})),r[i]}(e);return Lf.set(t,n),r.observe(t),()=>{Lf.delete(t),r.unobserve(t)}}const Bf={some:0,all:1};const Nf={inView:{Feature:class extends rh{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:r="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Bf[r]};return jf(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=e?n:r;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends rh{constructor(){super(...arguments),this.removeStartListeners=Gl,this.removeEndListeners=Gl,this.removeAccessibleListeners=Gl,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=ch(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||Mf(this.node.current,t.target)?n:r;o&&$l.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),i=ch(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Xc(r,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=uh(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=uh(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&Ff("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&$l.postRender((()=>n(t,e)))}))})),Ff("down",((t,e)=>{this.startPress(t,e)}))})),e=uh(this.node.current,"blur",(()=>{this.isPressing&&Ff("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Xc(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&$l.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Sh()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&$l.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=ch(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=uh(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Xc(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends rh{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(Ty){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xc(uh(this.node.current,"focus",(()=>this.onFocus())),uh(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends rh{mount(){this.unmount=Xc(Of(this.node,!0),Of(this.node,!1))}unmount(){}}}},Uf={layout:{ProjectionNode:Cf,MeasureLayout:bp}},Gf=oe({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Wf=oe({}),Hf="undefined"!=typeof window,$f=Hf?Ln:Fn,zf=oe({strict:!1});let qf=!1;function Kf(t,e,n,r,i){var o;const{visualElement:s}=Bn(Wf),a=Bn(zf),l=Bn(cp),u=Bn(Gf).reducedMotion,c=Dn();r=r||a.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Bn(hp);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Qf(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&kh(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),qr((()=>{d&&d.update(n,l)}));const p=n[Ud],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return $f((()=>{d&&(d.updateFeatures(),yp.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Fn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,qf||(qf=!0,queueMicrotask(Yf)))})),d}function Yf(){window.MotionHandoffIsComplete=!0}function Qf(t){if(t)return!1!==t.options.allowProjection?t.projection:Qf(t.parent)}function Xf(t,e,n){return jn((r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&("function"==typeof n?n(r):kh(n)&&(n.current=r))}),[e])}function Zf(t){return bl(t.animate)||Cl.some((e=>kl(t[e])))}function Jf(t){return Boolean(Zf(t)||t.variants)}function tm(t){const{initial:e,animate:n}=function(t,e){if(Zf(t)){const{initial:e,animate:n}=t;return{initial:!1===e||kl(e)?e:void 0,animate:kl(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,Bn(Wf));return In((()=>({initial:e,animate:n})),[em(e),em(n)])}function em(t){return Array.isArray(t)?t.join(" "):t}const nm={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"]},rm={};for(const bS in nm)rm[bS]={isEnabled:t=>nm[bS].some((e=>!!t[e]))};const im=Symbol.for("motionComponentSymbol");function om({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&function(t){for(const e in t)rm[e]={...rm[e],...t[e]}}(t);const o=er((function(t,o){let s;const a={...Bn(Gf),...t,layoutId:sm(t)},{isStatic:l}=a,u=tm(t),c=r(t,l);if(!l&&Hf){Bn(zf).strict;const t=function(t){const{drag:e,layout:n}=rm;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=t.MeasureLayout,u.visualElement=Kf(i,c,a,e,t.ProjectionNode)}return no(Wf.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,t,Xf(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[im]=i,o}function sm({layoutId:t}){const e=Bn(dp).id;return e&&void 0!==t?e+"-"+t:t}const am=["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 lm(t){return"string"==typeof t&&!t.includes("-")&&!!(am.indexOf(t)>-1||/[A-Z]/u.test(t))}function um(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const cm=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 dm(t,e,n,r){um(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(cm.has(i)?i:Nd(i),e.attrs[i])}function hm(t,{layout:e,layoutId:n}){return Ol.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!gp[t]||"opacity"===t)}function pm(t,e,n){var r;const{style:i}=t,o={};for(const s in i)($d(i[s])||e.style&&$d(e.style[s])||hm(s,t)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function fm(t,e,n){const r=pm(t,e,n);for(const i in t)if($d(t[i])||$d(e[i])){r[-1!==Rl.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return r}function mm(t){const e=Dn(null);return null===e.current&&(e.current=t()),e.current}const vm=t=>(e,n)=>{const r=Bn(Wf),i=Bn(cp),o=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:_m(i,o,s,!a&&t,e),renderState:n()};return r&&(l.mount=t=>r(i,t,l)),l}(t,e,r,i,n);return n?o():mm(o)};function gm(t,e){const n=Wd(e);n&&Ld(t,n)}function ym(t,e,n){const r=Array.isArray(e)?e:[e];for(let i=0;i<r.length;i++){const e=Pl(t,r[i]);if(e){const{transitionEnd:t,transition:r,...i}=e;n(i,t)}}}function _m(t,e,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=i(t,{});for(const v in u)s[v]=Yp(u[v]);let{initial:c,animate:d}=t;const h=Zf(t),p=Jf(t);e&&p&&!h&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===d&&(d=e.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!bl(m)&&ym(t,m,((t,e)=>{for(const n in t){let e=t[n];if(Array.isArray(e)){e=e[f?e.length-1:0]}null!==e&&(s[n]=e)}for(const n in e)s[n]=e[n]})),l&&(d&&!1!==c&&!bl(d)&&ym(t,d,(t=>{for(const e in t)gm(a,e)})),a.length&&(s.willChange=a.join(","))),s}const wm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),bm=()=>({...wm(),attrs:{}}),xm=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Sm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},km=Rl.length;function Em(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const t=e[l];if(Ol.has(l))s=!0;else if(Jl(l))i[l]=t;else{const e=xm(t,sc[l]);l.startsWith("origin")?(a=!0,o[l]=e):r[l]=e}}if(e.transform||(s||n?r.transform=function(t,e,n){let r="",i=!0;for(let o=0;o<km;o++){const s=Rl[o],a=t[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=xm(a,sc[s]);l||(i=!1,r+=`${Sm[s]||s}(${t}) `),n&&(e[s]=t)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;r.transformOrigin=`${t} ${e} ${n}`}}function Pm(t,e,n){return"string"==typeof t?t:gu.transform(e+n*t)}const Tm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Am={offset:"strokeDashoffset",array:"strokeDasharray"};function Cm(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Em(t,u,d),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:f}=t;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Pm(e,t.x,t.width)} ${Pm(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Tm:Am;t[o.offset]=gu.transform(-r);const s=gu.transform(e),a=gu.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Rm=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Om={useVisualState:vm({scrapeMotionValuesFromProps:fm,createRenderState:bm,onMount:(t,e,{renderState:n,latestValues:r})=>{$l.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(Ty){n.dimensions={x:0,y:0,width:0,height:0}}})),$l.render((()=>{Cm(n,r,Rm(e.tagName),t.transformTemplate),dm(e,n)}))}})},Mm={useVisualState:vm({applyWillChange:!0,scrapeMotionValuesFromProps:pm,createRenderState:wm})};function Fm(t,e,n){for(const r in e)$d(e[r])||hm(r,n)||(t[r]=e[r])}function Lm(t,e){const n={};return Fm(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return In((()=>{const n=wm();return Em(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Dm(t,e){const n={},r=Lm(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const Vm=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 Im(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Vm.has(t)}let jm=t=>!Im(t);try{(Bm=require("@emotion/is-prop-valid").default)&&(jm=t=>t.startsWith("on")?!Im(t):Bm(t))}catch(wS){}var Bm;function Nm(t,e,n,r){const i=In((()=>{const n=bm();return Cm(n,e,Rm(r),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Fm(e,t.style,t),i.style={...e,...i.style}}return i}function Um(t=!1){return(e,n,r,{latestValues:i},o)=>{const s=(lm(e)?Nm:Dm)(n,i,o,e),a=function(t,e,n){const r={};for(const i in t)"values"===i&&"object"==typeof t.values||(jm(i)||!0===n&&Im(i)||!e&&!Im(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}(n,"string"==typeof e,t),l=e!==jt?{...a,...s,ref:r}:{},{children:u}=n;return Dt(e,{...l,children:In((()=>$d(u)?u.get():u),[u])})}}function Gm(t,e){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return om({...lm(n)?Om:Mm,preloadedFeatures:t,useRender:Um(r),createVisualElement:e,Component:n})}}const Wm={current:null},Hm={current:!1};const $m=new WeakMap,zm=[...Cu,Wu,tc],qm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Km=Cl.length;class Ym{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Vu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,$l.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Zf(e),this.isVariantNode=Jf(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const d in c){const t=c[d];void 0!==a[d]&&$d(t)&&t.set(a[d],!1)}}mount(t){this.current=t,$m.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Hm.current||function(){if(Hm.current=!0,Hf)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wm.current=t.matches;t.addListener(e),e()}else Wm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Wm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$m.delete(this.current),this.projection&&this.projection.unmount(),zl(this.notifyUpdate),zl(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ol.has(t),r=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$l.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{r(),i(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rm){const e=rm[t];if(!e)continue;const{isEnabled:n,Feature:r}=e;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Uh()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<qm.length;n++){const e=qm[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const r=t["on"+e];r&&(this.propEventSubscriptions[e]=this.on(e,r))}this.prevMotionValues=function(t,e,n){for(const r in e){const i=e[r],o=n[r];if($d(i))t.addValue(r,i);else if($d(o))t.addValue(r,jd(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,jd(void 0!==e?e:i,{owner:t}))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let n=0;n<Km;n++){const t=Cl[n],r=this.props[t];(kl(r)||!1===r)&&(e[t]=r)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=jd(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let r=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=r&&("string"==typeof r&&(Xl(r)||Yl(r))?r=parseFloat(r):(i=r,!zm.find(Au(i))&&tc.test(e)&&(r=uc(t,e))),this.setBaseTarget(t,$d(r)?r.get():r)),$d(r)?r.get():r}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Pl(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(r=i[t])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||$d(i)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Vd),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Qm extends Ym{constructor(){super(...arguments),this.KeyframeResolver=dc}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class Xm extends Qm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=um}readValueFromInstance(t,e){if(Ol.has(e)){const t=lc(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),i=(Jl(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ip(t,e)}build(t,e,n){Em(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return pm(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$d(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class Zm extends Qm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Uh}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ol.has(e)){const t=lc(e);return t&&t.default||0}return e=cm.has(e)?e:Nd(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return fm(t,e,n)}build(t,e,n){Cm(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,r){dm(t,e,0,r)}mount(t){this.isSVGTag=Rm(t.tagName),super.mount(t)}}const Jm=wl(Gm({...oh,...Nf,...Rf,...Uf},((t,e)=>lm(t)?new Zm(e):new Xm(e,{allowProjection:t!==jt}))));class tv extends Bt{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function ev({children:t,isPresent:e}){const n=Un(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Gf);return qr((()=>{const{width:t,height:s,top:a,left:l}=i.current;if(e||!r.current||!t||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[e]),no(tv,{isPresent:e,childRef:r,sizeRef:i,children:jr(t,{ref:r})})}const nv=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=mm(rv),l=Un(),u=In((()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:t=>{a.set(t,!0);for(const e of a.values())if(!e)return;r&&r()},register:t=>(a.set(t,!1),()=>a.delete(t))})),o?[Math.random()]:[n]);return In((()=>{a.forEach(((t,e)=>a.set(e,!1)))}),[n]),Fn((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(t=no(ev,{isPresent:n,children:t})),no(cp.Provider,{value:u,children:t})};function rv(){return new Map}const iv=t=>t.key||"";function ov(t){const e=[];return rr.forEach(t,(t=>{Dr(t)&&e.push(t)})),e}const sv=({children:t,exitBeforeEnter:e,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>ov(t)),[t]),l=a.map(iv),u=Dn(!0),c=Dn(a),d=mm((()=>new Map)),[h,p]=On(a),[f,m]=On(a);$f((()=>{u.current=!1,c.current=a;for(let t=0;t<f.length;t++){const e=iv(f[t]);l.includes(e)?d.delete(e):!0!==d.get(e)&&d.set(e,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let t=[...a];for(let e=0;e<f.length;e++){const n=f[e],r=iv(n);l.includes(r)||(t.splice(e,0,n),v.push(n))}return"wait"===s&&v.length&&(t=v),m(ov(t)),void p(a)}const{forceRender:g}=Bn(dp);return no(jt,{children:f.map((t=>{const e=iv(t),h=a===f||l.includes(e);return no(nv,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(e))return;d.set(e,!0);let t=!0;d.forEach((e=>{e||(t=!1)})),t&&(null==g||g(),m(c.current),i&&i())},children:t},e)}))})};var av=t=>"checkbox"===t.type,lv=t=>t instanceof Date,uv=t=>null==t;const cv=t=>"object"==typeof t;var dv=t=>!uv(t)&&!Array.isArray(t)&&cv(t)&&!lv(t),hv=t=>dv(t)&&t.target?av(t.target)?t.target.checked:t.target.value:t,pv=(t,e)=>t.has((t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t)(e)),fv=t=>{const e=t.constructor&&t.constructor.prototype;return dv(e)&&e.hasOwnProperty("isPrototypeOf")},mv="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function vv(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else{if(mv&&(t instanceof Blob||t instanceof FileList)||!n&&!dv(t))return t;if(e=n?[]:{},n||fv(t))for(const n in t)t.hasOwnProperty(n)&&(e[n]=vv(t[n]));else e=t}return e}var gv=t=>Array.isArray(t)?t.filter(Boolean):[],yv=t=>void 0===t,_v=(t,e,n)=>{if(!e||!dv(t))return n;const r=gv(e.split(/[,[\].]+?/)).reduce(((t,e)=>uv(t)?t:t[e]),t);return yv(r)||r===t?yv(t[e])?n:t[e]:r},wv=t=>"boolean"==typeof t,bv=t=>/^\w*$/.test(t),xv=t=>gv(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Sv=(t,e,n)=>{let r=-1;const i=bv(e)?[e]:xv(e),o=i.length,s=o-1;for(;++r<o;){const e=i[r];let o=n;if(r!==s){const n=t[e];o=dv(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===e)return;t[e]=o,t=t[e]}return t};const kv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ev={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pv="max",Tv="min",Av="maxLength",Cv="minLength",Rv="pattern",Ov="required",Mv="validate",Fv=Xr.createContext(null),Lv=()=>Xr.useContext(Fv);var Dv=(t,e,n,r=!0)=>{const i={defaultValues:e._defaultValues};for(const o in t)Object.defineProperty(i,o,{get:()=>{const i=o;return e._proxyFormState[i]!==Ev.all&&(e._proxyFormState[i]=!r||Ev.all),n&&(n[i]=!0),t[i]}});return i},Vv=t=>dv(t)&&!Object.keys(t).length,Iv=(t,e,n,r)=>{n(t);const{name:i,...o}=t;return Vv(o)||Object.keys(o).length>=Object.keys(e).length||Object.keys(o).find((t=>e[t]===(!r||Ev.all)))},jv=t=>Array.isArray(t)?t:[t],Bv=(t,e,n)=>!t||!e||t===e||jv(t).some((t=>t&&(n?t===e:t.startsWith(e)||e.startsWith(t))));function Nv(t){const e=Xr.useRef(t);e.current=t,Xr.useEffect((()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}}),[t.disabled])}var Uv=t=>"string"==typeof t,Gv=(t,e,n,r,i)=>Uv(t)?(r&&e.watch.add(t),_v(n,t,i)):Array.isArray(t)?t.map((t=>(r&&e.watch.add(t),_v(n,t)))):(r&&(e.watchAll=!0),n);function Wv(t){const e=Lv(),{name:n,disabled:r,control:i=e.control,shouldUnregister:o}=t,s=pv(i._names.array,n),a=function(t){const e=Lv(),{control:n=e.control,name:r,defaultValue:i,disabled:o,exact:s}=t||{},a=Xr.useRef(r);a.current=r,Nv({disabled:o,subject:n._subjects.values,next:t=>{Bv(a.current,t.name,s)&&u(vv(Gv(a.current,n._names,t.values||n._formValues,!1,i)))}});const[l,u]=Xr.useState(n._getWatch(r,i));return Xr.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:_v(i._formValues,n,_v(i._defaultValues,n,t.defaultValue)),exact:!0}),l=function(t){const e=Lv(),{control:n=e.control,disabled:r,name:i,exact:o}=t||{},[s,a]=Xr.useState(n._formState),l=Xr.useRef(!0),u=Xr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Xr.useRef(i);return c.current=i,Nv({disabled:r,next:t=>l.current&&Bv(c.current,t.name,o)&&Iv(t,u.current,n._updateFormState)&&a({...n._formState,...t}),subject:n._subjects.state}),Xr.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),Dv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...t.rules,value:a,...wv(t.disabled)?{disabled:t.disabled}:{}}));return Xr.useEffect((()=>{const t=i._options.shouldUnregister||o,e=(t,e)=>{const n=_v(i._fields,t);n&&n._f&&(n._f.mount=e)};if(e(n,!0),t){const t=vv(_v(i._options.defaultValues,n));Sv(i._defaultValues,n,t),yv(_v(i._formValues,n))&&Sv(i._formValues,n,t)}return()=>{(s?t&&!i._state.action:t)?i.unregister(n):e(n,!1)}}),[n,i,s,o]),Xr.useEffect((()=>{_v(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:_v(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...wv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((t=>u.current.onChange({target:{value:hv(t),name:n},type:kv.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:_v(i._formValues,n),name:n},type:kv.BLUR})),[n,i]),ref:Xr.useCallback((t=>{const e=_v(i._fields,n);e&&t&&(e._f.ref={focus:()=>t.focus(),select:()=>t.select(),setCustomValidity:e=>t.setCustomValidity(e),reportValidity:()=>t.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!_v(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!_v(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!_v(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!_v(l.validatingFields,n)},error:{enumerable:!0,get:()=>_v(l.errors,n)}})}}const Hv=t=>t.render(Wv(t));var $v=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},zv=t=>({isOnSubmit:!t||t===Ev.onSubmit,isOnBlur:t===Ev.onBlur,isOnChange:t===Ev.onChange,isOnAll:t===Ev.all,isOnTouch:t===Ev.onTouched}),qv=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some((e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length)))));const Kv=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const n=_v(t,i);if(n){const{_f:t,...o}=n;if(t){if(t.refs&&t.refs[0]&&e(t.refs[0],i)&&!r)return!0;if(t.ref&&e(t.ref,t.name)&&!r)return!0;if(Kv(o,e))break}else if(dv(o)&&Kv(o,e))break}}};var Yv=(t,e,n)=>{const r=jv(_v(t,n));return Sv(r,"root",e[n]),Sv(t,n,r),t},Qv=t=>"file"===t.type,Xv=t=>"function"==typeof t,Zv=t=>{if(!mv)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Jv=t=>Uv(t),tg=t=>"radio"===t.type,eg=t=>t instanceof RegExp;const ng={value:!1,isValid:!1},rg={value:!0,isValid:!0};var ig=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter((t=>t&&t.checked&&!t.disabled)).map((t=>t.value));return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!yv(t[0].attributes.value)?yv(t[0].value)||""===t[0].value?rg:{value:t[0].value,isValid:!0}:rg:ng}return ng};const og={isValid:!1,value:null};var sg=t=>Array.isArray(t)?t.reduce(((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t),og):og;function ag(t,e,n="validate"){if(Jv(t)||Array.isArray(t)&&t.every(Jv)||wv(t)&&!t)return{type:n,message:Jv(t)?t:"",ref:e}}var lg=t=>dv(t)&&!eg(t)?t:{value:t,message:""},ug=async(t,e,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=t._f,y=_v(e,f);if(!v||g)return{};const _=s?s[0]:o,w=t=>{r&&_.reportValidity&&(_.setCustomValidity(wv(t)?"":t||""),_.reportValidity())},b={},x=tg(o),S=av(o),k=x||S,E=(m||Qv(o))&&yv(o.value)&&yv(y)||Zv(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=$v.bind(null,f,n,b),T=(t,e,n,r=Av,i=Cv)=>{const s=t?e:n;b[f]={type:t?r:i,message:s,ref:o,...P(t?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!k&&(E||uv(y))||wv(y)&&!y||S&&!ig(s).isValid||x&&!sg(s).isValid)){const{value:t,message:e}=Jv(a)?{value:!!a,message:a}:lg(a);if(t&&(b[f]={type:Ov,message:e,ref:_,...P(Ov,e)},!n))return w(e),b}if(!(E||uv(c)&&uv(d))){let t,e;const r=lg(d),i=lg(c);if(uv(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=t=>new Date((new Date).toDateString()+" "+t),a="time"==o.type,l="week"==o.type;Uv(r.value)&&y&&(t=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Uv(i.value)&&y&&(e=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);uv(r.value)||(t=n>r.value),uv(i.value)||(e=n<i.value)}if((t||e)&&(T(!!t,r.message,i.message,Pv,Tv),!n))return w(b[f].message),b}if((l||u)&&!E&&(Uv(y)||i&&Array.isArray(y))){const t=lg(l),e=lg(u),r=!uv(t.value)&&y.length>+t.value,i=!uv(e.value)&&y.length<+e.value;if((r||i)&&(T(r,t.message,e.message),!n))return w(b[f].message),b}if(h&&!E&&Uv(y)){const{value:t,message:e}=lg(h);if(eg(t)&&!y.match(t)&&(b[f]={type:Rv,message:e,ref:o,...P(Rv,e)},!n))return w(e),b}if(p)if(Xv(p)){const t=ag(await p(y,e),_);if(t&&(b[f]={...t,...P(Mv,t.message)},!n))return w(t.message),b}else if(dv(p)){let t={};for(const r in p){if(!Vv(t)&&!n)break;const i=ag(await p[r](y,e),_,r);i&&(t={...i,...P(r,i.message)},w(i.message),n&&(b[f]=t))}if(!Vv(t)&&(b[f]={ref:_,...t},!n))return b}return w(!0),b};function cg(t,e){const n=Array.isArray(e)?e:bv(e)?[e]:xv(e),r=1===n.length?t:function(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=yv(t)?r++:t[e[r++]];return t}(t,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(dv(r)&&Vv(r)||Array.isArray(r)&&function(t){for(const e in t)if(t.hasOwnProperty(e)&&!yv(t[e]))return!1;return!0}(r))&&cg(t,n.slice(0,-1)),t}var dg=()=>{let t=[];return{get observers(){return t},next:e=>{for(const n of t)n.next&&n.next(e)},subscribe:e=>(t.push(e),{unsubscribe:()=>{t=t.filter((t=>t!==e))}}),unsubscribe:()=>{t=[]}}},hg=t=>uv(t)||!cv(t);function pg(t,e){if(hg(t)||hg(e))return t===e;if(lv(t)&&lv(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n){const n=t[i];if(!r.includes(i))return!1;if("ref"!==i){const t=e[i];if(lv(n)&&lv(t)||dv(n)&&dv(t)||Array.isArray(n)&&Array.isArray(t)?!pg(n,t):n!==t)return!1}}return!0}var fg=t=>"select-multiple"===t.type,mg=t=>tg(t)||av(t),vg=t=>Zv(t)&&t.isConnected,gg=t=>{for(const e in t)if(Xv(t[e]))return!0;return!1};function yg(t,e={}){const n=Array.isArray(t);if(dv(t)||n)for(const r in t)Array.isArray(t[r])||dv(t[r])&&!gg(t[r])?(e[r]=Array.isArray(t[r])?[]:{},yg(t[r],e[r])):uv(t[r])||(e[r]=!0);return e}function _g(t,e,n){const r=Array.isArray(t);if(dv(t)||r)for(const i in t)Array.isArray(t[i])||dv(t[i])&&!gg(t[i])?yv(e)||hg(n[i])?n[i]=Array.isArray(t[i])?yg(t[i],[]):{...yg(t[i])}:_g(t[i],uv(e)?{}:e[i],n[i]):n[i]=!pg(t[i],e[i]);return n}var wg=(t,e)=>_g(t,e,yg(e)),bg=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>yv(t)?t:e?""===t?NaN:t?+t:t:n&&Uv(t)?new Date(t):r?r(t):t;function xg(t){const e=t.ref;if(!(t.refs?t.refs.every((t=>t.disabled)):e.disabled))return Qv(e)?e.files:tg(e)?sg(t.refs).value:fg(e)?[...e.selectedOptions].map((({value:t})=>t)):av(e)?ig(t.refs).value:bg(yv(e.value)?t.ref.value:e.value,t)}var Sg=(t,e,n,r)=>{const i={};for(const o of t){const t=_v(e,o);t&&Sv(i,o,t._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},kg=t=>yv(t)?t:eg(t)?t.source:dv(t)?eg(t.value)?t.value.source:t.value:t;const Eg="AsyncFunction";var Pg=t=>!(t&&t.validate||!(Xv(t.validate)&&t.validate.constructor.name===Eg||dv(t.validate)&&Object.values(t.validate).find((t=>t.constructor.name===Eg)))),Tg=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function Ag(t,e,n){const r=_v(t,n);if(r||bv(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=_v(e,r),s=_v(t,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var Cg=(t,e,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:!(n?r.isOnChange:i.isOnChange)||t),Rg=(t,e)=>!gv(_v(t,e)).length&&cg(t,e);const Og={mode:Ev.onSubmit,reValidateMode:Ev.onChange,shouldFocusError:!0};function Mg(t={}){let e,n={...Og,...t},r={submitCount:0,isDirty:!1,isLoading:Xv(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(dv(n.defaultValues)||dv(n.values))&&vv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:vv(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:dg(),array:dg(),state:dg()},h=zv(n.mode),p=zv(n.reValidateMode),f=n.criteriaMode===Ev.all,m=async t=>{if(c.isValid||t){const t=n.resolver?Vv((await w()).errors):await b(i,!0);t!==r.isValid&&d.state.next({isValid:t})}},v=(t,e)=>{(c.isValidating||c.validatingFields)&&((t||Array.from(l.mount)).forEach((t=>{t&&(e?Sv(r.validatingFields,t,e):cg(r.validatingFields,t))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Vv(r.validatingFields)}))},g=(t,e,n,r)=>{const l=_v(i,t);if(l){const i=_v(s,t,yv(n)?_v(o,t):n);yv(i)||r&&r.defaultChecked||e?Sv(s,t,e?i:xg(l._f)):k(t,i),a.mount&&m()}},y=(t,e,n,s,a)=>{let l=!1,u=!1;const h={name:t},p=!!(_v(i,t)&&_v(i,t)._f&&_v(i,t)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||pg(_v(o,t),e);u=!(p||!_v(r.dirtyFields,t)),n||p?cg(r.dirtyFields,t):Sv(r.dirtyFields,t,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const e=_v(r.touchedFields,t);e||(Sv(r.touchedFields,t,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&e!==n)}return l&&a&&d.state.next(h),l?h:{}},_=(n,i,o,s)=>{const a=_v(r.errors,n),l=c.isValid&&wv(i)&&r.isValid!==i;var h;if(t.delayError&&o?(h=()=>((t,e)=>{Sv(r.errors,t,e),d.state.next({errors:r.errors})})(n,o),e=t=>{clearTimeout(u),u=setTimeout(h,t)},e(t.delayError)):(clearTimeout(u),e=null,o?Sv(r.errors,n,o):cg(r.errors,n)),(o?!pg(a,o):a)||!Vv(s)||l){const t={...s,...l&&wv(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...t},d.state.next(t)}},w=async t=>{v(t,!0);const e=await n.resolver(s,n.context,Sg(t||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(t),e},b=async(t,e,i={valid:!0})=>{for(const o in t){const a=t[o];if(a){const{_f:t,...u}=a;if(t){const u=l.array.has(t.name),d=a._f&&Pg(a._f);d&&c.validatingFields&&v([o],!0);const h=await ug(a,s,f,n.shouldUseNativeValidation&&!e,u);if(d&&c.validatingFields&&v([o]),h[t.name]&&(i.valid=!1,e))break;!e&&(_v(h,t.name)?u?Yv(r.errors,h,t.name):Sv(r.errors,t.name,h[t.name]):cg(r.errors,t.name))}!Vv(u)&&await b(u,e,i)}}return i.valid},x=(t,e)=>(t&&e&&Sv(s,t,e),!pg(R(),o)),S=(t,e,n)=>Gv(t,l,{...a.mount?s:yv(e)?o:Uv(t)?{[t]:e}:e},n,e),k=(t,e,n={})=>{const r=_v(i,t);let o=e;if(r){const n=r._f;n&&(!n.disabled&&Sv(s,t,bg(e,n)),o=Zv(n.ref)&&uv(e)?"":e,fg(n.ref)?[...n.ref.options].forEach((t=>t.selected=o.includes(t.value))):n.refs?av(n.ref)?n.refs.length>1?n.refs.forEach((t=>(!t.defaultChecked||!t.disabled)&&(t.checked=Array.isArray(o)?!!o.find((e=>e===t.value)):o===t.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((t=>t.checked=t.value===o)):Qv(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:t,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(t,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&C(t)},E=(t,e,n)=>{for(const r in e){const o=e[r],s=`${t}.${r}`,a=_v(i,s);!l.array.has(t)&&hg(o)&&(!a||a._f)||lv(o)?k(s,o,n):E(s,o,n)}},P=(t,e,n={})=>{const u=_v(i,t),h=l.array.has(t),p=vv(e);Sv(s,t,p),h?(d.array.next({name:t,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:t,dirtyFields:wg(o,s),isDirty:x(t,p)})):!u||u._f||uv(p)?k(t,p,n):E(t,p,n),qv(t,l)&&d.state.next({...r}),d.values.next({name:a.mount?t:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,x=!0;const S=_v(i,g),k=t=>{x=Number.isNaN(t)||pg(t,_v(s,g,t))};if(S){let a,E;const P=u.type?xg(S._f):hv(o),T=o.type===kv.BLUR||o.type===kv.FOCUS_OUT,A=!Tg(S._f)&&!n.resolver&&!_v(r.errors,g)&&!S._f.deps||Cg(T,_v(r.touchedFields,g),r.isSubmitted,p,h),R=qv(g,l,T);Sv(s,g,P),T?(S._f.onBlur&&S._f.onBlur(o),e&&e(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,P,T,!1),M=!Vv(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),A)return c.isValid&&("onBlur"===t.mode?T&&m():m()),M&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:t}=await w([g]);if(k(P),x){const e=Ag(r.errors,i,g),n=Ag(t,i,e.name||g);a=n.error,g=n.name,E=Vv(t)}}else v([g],!0),a=(await ug(S,s,f,n.shouldUseNativeValidation))[g],v([g]),k(P),x&&(a?E=!1:c.isValid&&(E=await b(i,!0)));x&&(S._f.deps&&C(S._f.deps),_(g,E,a,O))}},A=(t,e)=>{if(_v(r.errors,e)&&t.focus)return t.focus(),1},C=async(t,e={})=>{let o,s;const a=jv(t);if(n.resolver){const e=await(async t=>{const{errors:e}=await w(t);if(t)for(const n of t){const t=_v(e,n);t?Sv(r.errors,n,t):cg(r.errors,n)}else r.errors=e;return e})(yv(t)?t:a);o=Vv(e),s=t?!a.some((t=>_v(e,t))):o}else t?(s=(await Promise.all(a.map((async t=>{const e=_v(i,t);return await b(e&&e._f?{[t]:e}:e)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await b(i);return d.state.next({...!Uv(t)||c.isValid&&o!==r.isValid?{}:{name:t},...n.resolver||!t?{isValid:o}:{},errors:r.errors}),e.shouldFocus&&!s&&Kv(i,A,t?a:l.mount),s},R=t=>{const e={...a.mount?s:o};return yv(t)?e:Uv(t)?_v(e,t):t.map((t=>_v(e,t)))},O=(t,e)=>({invalid:!!_v((e||r).errors,t),isDirty:!!_v((e||r).dirtyFields,t),error:_v((e||r).errors,t),isValidating:!!_v(r.validatingFields,t),isTouched:!!_v((e||r).touchedFields,t)}),M=(t,e,n)=>{const o=(_v(i,t,{_f:{}})._f||{}).ref,s=_v(r.errors,t)||{},{ref:a,message:l,type:u,...c}=s;Sv(r.errors,t,{...c,...e,ref:o}),d.state.next({name:t,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},F=(t,e={})=>{for(const a of t?jv(t):l.mount)l.mount.delete(a),l.array.delete(a),e.keepValue||(cg(i,a),cg(s,a)),!e.keepError&&cg(r.errors,a),!e.keepDirty&&cg(r.dirtyFields,a),!e.keepTouched&&cg(r.touchedFields,a),!e.keepIsValidating&&cg(r.validatingFields,a),!n.shouldUnregister&&!e.keepDefaultValue&&cg(o,a);d.values.next({values:{...s}}),d.state.next({...r,...e.keepDirty?{isDirty:x()}:{}}),!e.keepIsValid&&m()},L=({disabled:t,name:e,field:n,fields:r,value:i})=>{if(wv(t)&&a.mount||t){const o=t?void 0:yv(i)?xg(n?n._f:_v(r,e)._f):i;Sv(s,e,o),y(e,o,!1,!1,!0)}},D=(e,r={})=>{let s=_v(i,e);const u=wv(r.disabled)||wv(t.disabled);return Sv(i,e,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...r}}),l.mount.add(e),s?L({field:s,disabled:wv(r.disabled)?r.disabled:t.disabled,name:e,value:r.value}):g(e,!0,r.value),{...u?{disabled:r.disabled||t.disabled}:{},...n.progressive?{required:!!r.required,min:kg(r.min),max:kg(r.max),minLength:kg(r.minLength),maxLength:kg(r.maxLength),pattern:kg(r.pattern)}:{},name:e,onChange:T,onBlur:T,ref:t=>{if(t){D(e,r),s=_v(i,e);const n=yv(t.value)&&t.querySelectorAll&&t.querySelectorAll("input,select,textarea")[0]||t,a=mg(n),l=s._f.refs||[];if(a?l.find((t=>t===n)):n===s._f.ref)return;Sv(i,e,{_f:{...s._f,...a?{refs:[...l.filter(vg),n,...Array.isArray(_v(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else s=_v(i,e,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!pv(l.array,e)||!a.action)&&l.unMount.add(e)}}},V=()=>n.shouldFocusError&&Kv(i,A,l.mount),I=(t,e)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=vv(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:t,values:e}=await w();r.errors=t,l=e}else await b(i);if(cg(r.errors,"root"),Vv(r.errors)){d.state.next({errors:{}});try{await t(l,o)}catch(u){a=u}}else e&&await e({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Vv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,n={})=>{const u=e?vv(e):o,h=vv(u),p=Vv(e),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const t of l.mount)_v(r.dirtyFields,t)?Sv(f,t,_v(s,t)):P(t,_v(f,t));else{if(mv&&yv(e))for(const t of l.mount){const e=_v(i,t);if(e&&e._f){const t=Array.isArray(e._f.refs)?e._f.refs[0]:e._f.ref;if(Zv(t)){const e=t.closest("form");if(e){e.reset();break}}}}i={}}s=t.shouldUnregister?n.keepDefaultValues?vv(o):{}:vv(f),d.array.next({values:{...f}}),d.values.next({values:{...f}})}l={mount:n.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||pg(e,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?wg(o,s):r.dirtyFields:n.keepDefaultValues&&e?wg(o,e):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(t,e)=>j(Xv(t)?t(s):t,e);return{control:{register:D,unregister:F,getFieldState:O,handleSubmit:I,setError:M,_executeSchema:w,_getWatch:S,_getDirty:x,_updateValid:m,_removeUnmounted:()=>{for(const t of l.unMount){const e=_v(i,t);e&&(e._f.refs?e._f.refs.every((t=>!vg(t))):!vg(e._f.ref))&&F(t)}l.unMount=new Set},_updateFieldArray:(t,e=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(_v(i,t))){const e=n(_v(i,t),l.argA,l.argB);u&&Sv(i,t,e)}if(h&&Array.isArray(_v(r.errors,t))){const e=n(_v(r.errors,t),l.argA,l.argB);u&&Sv(r.errors,t,e),Rg(r.errors,t)}if(c.touchedFields&&h&&Array.isArray(_v(r.touchedFields,t))){const e=n(_v(r.touchedFields,t),l.argA,l.argB);u&&Sv(r.touchedFields,t,e)}c.dirtyFields&&(r.dirtyFields=wg(o,s)),d.state.next({name:t,isDirty:x(t,e),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Sv(s,t,e)},_updateDisabledField:L,_getFieldArray:e=>gv(_v(a.mount?s:o,e,t.shouldUnregister?_v(o,e,[]):[])),_reset:j,_resetDefaultValues:()=>Xv(n.defaultValues)&&n.defaultValues().then((t=>{B(t,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:t=>{r={...r,...t}},_disableForm:t=>{wv(t)&&(d.state.next({disabled:t}),Kv(i,((e,n)=>{const r=_v(i,n);r&&(e.disabled=r._f.disabled||t,Array.isArray(r._f.refs)&&r._f.refs.forEach((e=>{e.disabled=r._f.disabled||t})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:t=>{r.errors=t,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(t){a=t},get _defaultValues(){return o},get _names(){return l},set _names(t){l=t},get _formState(){return r},set _formState(t){r=t},get _options(){return n},set _options(t){n={...n,...t}}},trigger:C,register:D,handleSubmit:I,watch:(t,e)=>Xv(t)?d.values.subscribe({next:n=>t(S(void 0,e),n)}):S(t,e,!0),setValue:P,getValues:R,reset:B,resetField:(t,e={})=>{_v(i,t)&&(yv(e.defaultValue)?P(t,vv(_v(o,t))):(P(t,e.defaultValue),Sv(o,t,vv(e.defaultValue))),e.keepTouched||cg(r.touchedFields,t),e.keepDirty||(cg(r.dirtyFields,t),r.isDirty=e.defaultValue?x(t,vv(_v(o,t))):x()),e.keepError||(cg(r.errors,t),c.isValid&&m()),d.state.next({...r}))},clearErrors:t=>{t&&jv(t).forEach((t=>cg(r.errors,t))),d.state.next({errors:t?r.errors:{}})},unregister:F,setError:M,setFocus:(t,e={})=>{const n=_v(i,t),r=n&&n._f;if(r){const t=r.refs?r.refs[0]:r.ref;t.focus&&(t.focus(),e.shouldSelect&&t.select())}},getFieldState:O}}const Fg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Lg=t=>{var e;return null!==(e=null==t?void 0:t.ownerDocument)&&void 0!==e?e:document},Dg=t=>{if(t&&"window"in t&&t.window===t)return t;return Lg(t).defaultView||window};function Vg(t){let e=null;return()=>(null==e&&(e=t()),e)}const Ig=Vg((function(){return t=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&t.test((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.platform)||window.navigator.platform);var t,e})),jg=Vg((function(){return t=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.brands.some((e=>t.test(e.brand))))||t.test(window.navigator.userAgent));var t,e}));class Bg{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,e){this.nativeEvent=e,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.bubbles=e.bubbles,this.cancelable=e.cancelable,this.defaultPrevented=e.defaultPrevented,this.eventPhase=e.eventPhase,this.isTrusted=e.isTrusted,this.timeStamp=e.timeStamp,this.type=t}}function Ng(t){let e=Dn({isFocused:!1,observer:null});Fg((()=>{const t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}}),[]);let n=function(t){const e=Dn(null);return Fg((()=>{e.current=t}),[t]),jn(((...t)=>{const n=e.current;return null==n?void 0:n(...t)}),[])}((e=>{null==t||t(e)}));return jn((t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){e.current.isFocused=!0;let r=t.target,i=t=>{e.current.isFocused=!1,r.disabled&&n(new Bg("blur",t)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver((()=>{if(e.current.isFocused&&r.disabled){var t;null===(t=e.current.observer)||void 0===t||t.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),e.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let Ug=null,Gg=new Set,Wg=new Map,Hg=!1,$g=!1;const zg={Tab:!0,Escape:!0};function qg(t,e){for(let n of Gg)n(t,e)}function Kg(t){Hg=!0,function(t){return!(t.metaKey||!Ig()&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key)}(t)&&(Ug="keyboard",qg("keyboard",t))}function Yg(t){Ug="pointer","mousedown"!==t.type&&"pointerdown"!==t.type||(Hg=!0,qg("pointer",t))}function Qg(t){var e;(0===(e=t).mozInputSource&&e.isTrusted||(jg()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(Hg=!0,Ug="virtual")}function Xg(t){t.target!==window&&t.target!==document&&(Hg||$g||(Ug="virtual",qg("virtual",t)),Hg=!1,$g=!1)}function Zg(){Hg=!1,$g=!0}function Jg(t){if("undefined"==typeof window||Wg.get(Dg(t)))return;const e=Dg(t),n=Lg(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Hg=!0,r.apply(this,arguments)},n.addEventListener("keydown",Kg,!0),n.addEventListener("keyup",Kg,!0),n.addEventListener("click",Qg,!0),e.addEventListener("focus",Xg,!0),e.addEventListener("blur",Zg,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Yg,!0),n.addEventListener("pointermove",Yg,!0),n.addEventListener("pointerup",Yg,!0)):(n.addEventListener("mousedown",Yg,!0),n.addEventListener("mousemove",Yg,!0),n.addEventListener("mouseup",Yg,!0)),e.addEventListener("beforeunload",(()=>{ty(t)}),{once:!0}),Wg.set(e,{focus:r})}const ty=(t,e)=>{const n=Dg(t),r=Lg(t);e&&r.removeEventListener("DOMContentLoaded",e),Wg.has(n)&&(n.HTMLElement.prototype.focus=Wg.get(n).focus,r.removeEventListener("keydown",Kg,!0),r.removeEventListener("keyup",Kg,!0),r.removeEventListener("click",Qg,!0),n.removeEventListener("focus",Xg,!0),n.removeEventListener("blur",Zg,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Yg,!0),r.removeEventListener("pointermove",Yg,!0),r.removeEventListener("pointerup",Yg,!0)):(r.removeEventListener("mousedown",Yg,!0),r.removeEventListener("mousemove",Yg,!0),r.removeEventListener("mouseup",Yg,!0)),Wg.delete(n))};function ey(){return"pointer"!==Ug}"undefined"!=typeof document&&function(t){const e=Lg(t);let n;"loading"!==e.readyState?Jg(t):(n=()=>{Jg(t)},e.addEventListener("DOMContentLoaded",n))}();const ny=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ry(t,e,n){Jg(),Fn((()=>{let e=(e,r)=>{(function(t,e,n){var r;const i="undefined"!=typeof window?Dg(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Dg(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Dg(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Dg(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((t=t||(null==n?void 0:n.target)instanceof i&&!ny.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof o||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===e&&n instanceof a&&!zg[n.key])})(!!(null==n?void 0:n.isTextInput),e,r)&&t(ey())};return Gg.add(e),()=>{Gg.delete(e)}}),e)}let iy=!1,oy=0;function sy(){iy=!0,setTimeout((()=>{iy=!1}),50)}function ay(t){"touch"===t.pointerType&&sy()}function ly(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",ay):document.addEventListener("touchend",sy),oy++,()=>{oy--,oy>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",ay):document.removeEventListener("touchend",sy))}}function uy(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,s]=On(!1),a=Dn({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Fn(ly,[]);let{hoverProps:l,triggerHoverEnd:u}=In((()=>{let t=(t,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!t.currentTarget.contains(t.target))return;a.isHovered=!0;let o=t.currentTarget;a.target=o,e&&e({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(t,e)=>{if(a.pointerType="",a.target=null,"touch"===e||!a.isHovered)return;a.isHovered=!1;let i=t.currentTarget;r&&r({type:"hoverend",target:i,pointerType:e}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=e=>{iy&&"mouse"===e.pointerType||t(e,e.pointerType)},l.onPointerLeave=t=>{!i&&t.currentTarget.contains(t.target)&&o(t,t.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=e=>{a.ignoreEmulatedMouseEvents||iy||t(e,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=t=>{!i&&t.currentTarget.contains(t.target)&&o(t,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[e,n,r,i,a]);return Fn((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function cy(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=Dn({isFocused:!1,isFocusVisible:e||ey()}),[o,s]=On(!1),[a,l]=On((()=>i.current.isFocused&&i.current.isFocusVisible)),u=jn((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=jn((t=>{i.current.isFocused=t,s(t),u()}),[u]);ry((t=>{i.current.isFocusVisible=t,u()}),[],{isTextInput:n});let{focusProps:d}=function(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=jn((t=>{if(t.target===t.currentTarget)return r&&r(t),i&&i(!1),!0}),[r,i]),s=Ng(o),a=jn((t=>{const e=Lg(t.target);t.target===t.currentTarget&&e.activeElement===t.target&&(n&&n(t),i&&i(!0),s(t))}),[i,n,s]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:e||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=Dn({isFocusWithin:!1}),s=jn((t=>{o.current.isFocusWithin&&!t.currentTarget.contains(t.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(t),i&&i(!1))}),[n,i,o]),a=Ng(s),l=jn((t=>{o.current.isFocusWithin||document.activeElement!==t.target||(r&&r(t),i&&i(!0),o.current.isFocusWithin=!0,a(t))}),[r,i,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?h:d}}var dy=Object.defineProperty,hy=(t,e,n)=>(((t,e,n)=>{e in t?dy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);let py=new class{constructor(){hy(this,"current",this.detect()),hy(this,"handoffState","pending"),hy(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function fy(t){return py.isServer?null:t instanceof Node?t.ownerDocument:null!=t&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function my(t){"function"==typeof queueMicrotask?queueMicrotask(t):Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))}function vy(){let t=[],e={addEventListener:(t,n,r,i)=>(t.addEventListener(n,r,i),e.add((()=>t.removeEventListener(n,r,i)))),requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add((()=>cancelAnimationFrame(n)))},nextFrame:(...t)=>e.requestAnimationFrame((()=>e.requestAnimationFrame(...t))),setTimeout(...t){let n=setTimeout(...t);return e.add((()=>clearTimeout(n)))},microTask(...t){let n={current:!0};return my((()=>{n.current&&t[0]()})),e.add((()=>{n.current=!1}))},style(t,e,n){let r=t.style.getPropertyValue(e);return Object.assign(t.style,{[e]:n}),this.add((()=>{Object.assign(t.style,{[e]:r})}))},group(t){let e=vy();return t(e),this.add((()=>e.dispose()))},add:e=>(t.includes(e)||t.push(e),()=>{let n=t.indexOf(e);if(n>=0)for(let e of t.splice(n,1))e()}),dispose(){for(let e of t.splice(0))e()}};return e}function gy(){let[t]=On(vy);return Fn((()=>()=>t.dispose()),[t]),t}let yy=(t,e)=>{py.isServer?Fn(t,e):Ln(t,e)};function _y(t){let e=Dn(t);return yy((()=>{e.current=t}),[t]),e}let wy=function(t){let e=_y(t);return Xr.useCallback(((...t)=>e.current(...t)),[e])};function by({disabled:t=!1}={}){let e=Dn(null),[n,r]=On(!1),i=gy(),o=wy((()=>{e.current=null,r(!1),i.dispose()})),s=wy((t=>{if(i.dispose(),null===e.current){e.current=t.currentTarget,r(!0);{let n=fy(t.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(t=>{if(e.current){let n=function(t){let e=t.width/2,n=t.height/2;return{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}(t);r(function(t,e){return!(!t||!e||t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)}(n,e.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:t?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let xy=oe(void 0);function Sy(){return Bn(xy)}function ky({value:t,children:e}){return Xr.createElement(xy.Provider,{value:t},e)}function Ey(...t){return Array.from(new Set(t.flatMap((t=>"string"==typeof t?t.split(" "):[])))).filter(Boolean).join(" ")}function Py(t,e,...n){if(t in e){let r=e[t];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((t=>`"${t}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Py),r}var Ty,Ay,Cy=((Ay=Cy||{})[Ay.None=0]="None",Ay[Ay.RenderStrategy=1]="RenderStrategy",Ay[Ay.Static=2]="Static",Ay),Ry=((Ty=Ry||{})[Ty.Unmount=0]="Unmount",Ty[Ty.Hidden=1]="Hidden",Ty);function Oy({ourProps:t,theirProps:e,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Fy;let l=Ly(e,t);if(o)return My(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:t=!1,...e}=l;if(t)return My(e,n,r,s,a)}if(1&u){let{unmount:t=!0,...e}=l;return Py(t?0:1,{0:()=>null,1:()=>My({...e,hidden:!0,style:{display:"none"}},n,r,s,a)})}return My(l,n,r,s,a)}function My(t,e={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=jy(t,["unmount","static"]),u=void 0!==t.ref?{[a]:t.ref}:{},c="function"==typeof s?s(e):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(e)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(e){let t=!1,n=[];for(let[r,i]of Object.entries(e))"boolean"==typeof i&&(t=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(t=>`-${t.toLowerCase()}`)));if(t){d["data-headlessui-state"]=n.join(" ");for(let t of n)d[`data-${t}`]=""}}if(o===jt&&(Object.keys(Iy(l)).length>0||Object.keys(Iy(d)).length>0)){if(Dr(c)&&!(Array.isArray(c)&&c.length>1)){let t=c.props,e=null==t?void 0:t.className,n="function"==typeof e?(...t)=>Ey(e(...t),l.className):Ey(e,l.className),r=n?{className:n}:{},o=Ly(c.props,Iy(jy(l,["ref"])));for(let i in d)i in o&&delete d[i];return jr(c,Object.assign({},o,d,u,{ref:i(c.ref,u.ref)},r))}if(Object.keys(Iy(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Iy(l)).concat(Object.keys(Iy(d))).map((t=>` - ${t}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((t=>` - ${t}`)).join("\n")].join("\n"))}return Dt(o,Object.assign({},jy(l,["ref"]),o!==jt&&u,o!==jt&&d),c)}function Fy(...t){return t.every((t=>null==t))?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function Ly(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},n={};for(let r of t)for(let t in r)t.startsWith("on")&&"function"==typeof r[t]?(null!=n[t]||(n[t]=[]),n[t].push(r[t])):e[t]=r[t];if(e.disabled||e["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[t=>{var e;return null==(e=null==t?void 0:t.preventDefault)?void 0:e.call(t)}]);for(let r in n)Object.assign(e,{[r](t,...e){let i=n[r];for(let n of i){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...e)}}});return e}function Dy(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},n={};for(let r of t)for(let t in r)t.startsWith("on")&&"function"==typeof r[t]?(null!=n[t]||(n[t]=[]),n[t].push(r[t])):e[t]=r[t];for(let r in n)Object.assign(e,{[r](...t){let e=n[r];for(let n of e)null==n||n(...t)}});return e}function Vy(t){var e;return Object.assign(er(t),{displayName:null!=(e=t.displayName)?e:t.name})}function Iy(t){let e=Object.assign({},t);for(let n in e)void 0===e[n]&&delete e[n];return e}function jy(t,e=[]){let n=Object.assign({},t);for(let r of e)r in n&&delete n[r];return n}function By(t,e,n){let[r,i]=On(n),o=void 0!==t,s=Dn(o),a=Dn(!1),l=Dn(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?t:r,wy((t=>(o||i(t),null==e?void 0:e(t))))]}function Ny(t){let[e]=On(t);return e}function Uy(t={},e=null,n=[]){for(let[r,i]of Object.entries(t))Wy(n,Gy(e,r),i);return n}function Gy(t,e){return t?t+"["+e+"]":e}function Wy(t,e,n){if(Array.isArray(n))for(let[r,i]of n.entries())Wy(t,Gy(e,r.toString()),i);else n instanceof Date?t.push([e,n.toISOString()]):"boolean"==typeof n?t.push([e,n?"1":"0"]):"string"==typeof n?t.push([e,n]):"number"==typeof n?t.push([e,`${n}`]):null==n?t.push([e,""]):Uy(n,e,t)}function Hy(t){var e,n;let r=null!=(e=null==t?void 0:t.form)?e:t.closest("form");if(r){for(let e of r.elements)if(e!==t&&("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type))return void e.click();null==(n=r.requestSubmit)||n.call(r)}}var $y=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))($y||{});let zy=Vy((function(t,e){var n;let{features:r=1,...i}=t;return Oy({ourProps:{ref:e,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),qy=oe(null);function Ky(t){let[e,n]=On(null);return Xr.createElement(qy.Provider,{value:{target:e}},t.children,Xr.createElement(zy,{features:$y.Hidden,ref:n}))}function Yy({children:t}){let e=Bn(qy);if(!e)return Xr.createElement(Xr.Fragment,null,t);let{target:n}=e;return n?mr(Xr.createElement(Xr.Fragment,null,t),n):null}function Qy({data:t,form:e,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=gy();return Fn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,e,r]),Xr.createElement(Yy,null,Xr.createElement(Xy,{setForm:s,formId:e}),Uy(t).map((([t,r])=>Xr.createElement(zy,{features:$y.Hidden,...Iy({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:n,name:t,value:r,...i})}))))}function Xy({setForm:t,formId:e}){return Fn((()=>{if(e){let n=document.getElementById(e);n&&t(n)}}),[t,e]),e?null:Xr.createElement(zy,{features:$y.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}let Zy=oe(void 0);function Jy(){return Bn(Zy)}function t_({id:t,children:e}){return Xr.createElement(Zy.Provider,{value:t},e)}function e_(t){let e=t.parentElement,n=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(n=e),e=e.parentElement;let r=""===(null==e?void 0:e.getAttribute("disabled"));return(!r||!function(t){if(!t)return!1;let e=t.previousElementSibling;for(;null!==e;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}(n))&&r}let n_=Symbol();function r_(...t){let e=Dn(t);Fn((()=>{e.current=t}),[t]);let n=wy((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}));return t.every((t=>null==t||(null==t?void 0:t[n_])))?void 0:n}let i_=oe(null);function o_(){let t=Bn(i_);if(null===t){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,o_),t}return t}function s_(){var t,e;return null!=(e=null==(t=Bn(i_))?void 0:t.value)?e:void 0}function a_(){let[t,e]=On([]);return[t.length>0?t.join(" "):void 0,In((()=>function(t){let n=wy((t=>(e((e=>[...e,t])),()=>e((e=>{let n=e.slice(),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}))))),r=In((()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value})),[n,t.slot,t.name,t.props,t.value]);return Xr.createElement(i_.Provider,{value:r},t.children)}),[e])]}i_.displayName="DescriptionContext";let l_=Vy((function(t,e){let n=Un(),r=Sy(),{id:i=`headlessui-description-${n}`,...o}=t,s=o_(),a=r_(e);yy((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return Oy({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),u_=Object.assign(l_,{});var c_,d_=((c_=d_||{}).Space=" ",c_.Enter="Enter",c_.Escape="Escape",c_.Backspace="Backspace",c_.Delete="Delete",c_.ArrowLeft="ArrowLeft",c_.ArrowUp="ArrowUp",c_.ArrowRight="ArrowRight",c_.ArrowDown="ArrowDown",c_.Home="Home",c_.End="End",c_.PageUp="PageUp",c_.PageDown="PageDown",c_.Tab="Tab",c_);let h_=oe(null);function p_(){let t=Bn(h_);if(null===t){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,p_),t}return t}function f_(t){var e,n,r;let i=null!=(n=null==(e=Bn(h_))?void 0:e.value)?n:void 0;return(null!=(r=null==t?void 0:t.length)?r:0)>0?[i,...t].filter(Boolean).join(" "):i}function m_({inherit:t=!1}={}){let e=f_(),[n,r]=On([]),i=t?[e,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(t){let e=wy((t=>(r((e=>[...e,t])),()=>r((e=>{let n=e.slice(),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}))))),n=In((()=>({register:e,slot:t.slot,name:t.name,props:t.props,value:t.value})),[e,t.slot,t.name,t.props,t.value]);return Xr.createElement(h_.Provider,{value:n},t.children)}),[r])]}h_.displayName="LabelContext";let v_=Vy((function(t,e){var n;let r=Un(),i=p_(),o=Jy(),s=Sy(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=t,d=r_(e);yy((()=>i.register(a)),[a,i.register]);let h=wy((t=>{let e=t.currentTarget;if(e instanceof HTMLLabelElement&&t.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),e instanceof HTMLLabelElement){let t=document.getElementById(e.htmlFor);if(t){let e=t.getAttribute("disabled");if("true"===e||""===e)return;let n=t.getAttribute("aria-disabled");if("true"===n||""===n)return;(t instanceof HTMLInputElement&&("radio"===t.type||"checkbox"===t.type)||"radio"===t.role||"checkbox"===t.role||"switch"===t.role)&&t.click(),t.focus({preventScroll:!0})}}})),p=s||!1,f=In((()=>({...i.slot,disabled:p})),[i.slot,p]),m={ref:d,...i.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Oy({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),g_=Object.assign(v_,{});function y_(t,e){return null!==t&&null!==e&&"object"==typeof t&&"object"==typeof e&&"id"in t&&"id"in e?t.id===e.id:t===e}function __(t,e=!1){let[n,r]=Mn((()=>({})),{}),i=In((()=>function(t){if(null===t)return{width:0,height:0};let{width:e,height:n}=t.getBoundingClientRect();return{width:e,height:n}}(t)),[t,n]);return yy((()=>{if(!t)return;let e=new ResizeObserver(r);return e.observe(t),()=>{e.disconnect()}}),[t]),e?{width:`${i.width}px`,height:`${i.height}px`}:i}let w_=class extends Map{constructor(t){super(),this.factory=t}get(t){let e=super.get(t);return void 0===e&&(e=this.factory(t),this.set(t,e)),e}};function b_(t,e){let n=t(),r=new Set;return{getSnapshot:()=>n,subscribe:t=>(r.add(t),()=>r.delete(t)),dispatch(t,...i){let o=e[t].call(n,...i);o&&(n=o,r.forEach((t=>t())))}}}function x_(t){return Yr(t.subscribe,t.getSnapshot,t.getSnapshot)}let S_=new w_((()=>b_((()=>[]),{ADD(t){return this.includes(t)?this:[...this,t]},REMOVE(t){let e=this.indexOf(t);if(-1===e)return this;let n=this.slice();return n.splice(e,1),n}})));function k_(t,e){let n=S_.get(e),r=Un(),i=x_(n);if(yy((()=>{if(t)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,t]),!t)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}let E_=new Map,P_=new Map;function T_(t){var e;let n=null!=(e=P_.get(t))?e:0;return P_.set(t,n+1),0!==n||(E_.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0),()=>A_(t)}function A_(t){var e;let n=null!=(e=P_.get(t))?e:1;if(1===n?P_.delete(t):P_.set(t,n-1),1!==n)return;let r=E_.get(t);r&&(null===r["aria-hidden"]?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r["aria-hidden"]),t.inert=r.inert,E_.delete(t))}let C_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((t=>`${t}:not([tabindex='-1'])`)).join(","),R_=["[data-autofocus]"].map((t=>`${t}:not([tabindex='-1'])`)).join(",");var O_,M_,F_,L_=((F_=L_||{})[F_.First=1]="First",F_[F_.Previous=2]="Previous",F_[F_.Next=4]="Next",F_[F_.Last=8]="Last",F_[F_.WrapAround=16]="WrapAround",F_[F_.NoScroll=32]="NoScroll",F_[F_.AutoFocus=64]="AutoFocus",F_),D_=((M_=D_||{})[M_.Error=0]="Error",M_[M_.Overflow=1]="Overflow",M_[M_.Success=2]="Success",M_[M_.Underflow=3]="Underflow",M_),V_=((O_=V_||{})[O_.Previous=-1]="Previous",O_[O_.Next=1]="Next",O_);function I_(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(C_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}var j_=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(j_||{});function B_(t,e=0){var n;return t!==(null==(n=fy(t))?void 0:n.body)&&Py(e,{0:()=>t.matches(C_),1(){let e=t;for(;null!==e;){if(e.matches(C_))return!0;e=e.parentElement}return!1}})}var N_=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(N_||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(t=>{1===t.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===t.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let U_=["textarea","input"].join(",");function G_(t,e=t=>t){return t.slice().sort(((t,n)=>{let r=e(t),i=e(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function W_(t,e){return function(t,e,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,s=Array.isArray(t)?n?G_(t):t:64&e?function(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(R_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}(t):I_(t);i.length>0&&s.length>1&&(s=s.filter((t=>!i.some((e=>null!=e&&"current"in e?(null==e?void 0:e.current)===t:e===t))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&e)return 1;if(10&e)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&e)return 0;if(2&e)return Math.max(0,s.indexOf(r))-1;if(4&e)return Math.max(0,s.indexOf(r))+1;if(8&e)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&e?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let t=u+d;if(16&e)t=(t+h)%h;else{if(t<0)return 3;if(t>=h)return 1}a=s[t],null==a||a.focus(c),d+=l}while(a!==o.activeElement);return 6&e&&function(t){var e,n;return null!=(n=null==(e=null==t?void 0:t.matches)?void 0:e.call(t,U_))&&n}(a)&&a.select(),2}(I_(),e,{relativeTo:t})}function H_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $_(){return H_()||/Android/gi.test(window.navigator.userAgent)}function z_(t,e,n,r){let i=_y(n);Fn((()=>{if(t)return document.addEventListener(e,n,r),()=>document.removeEventListener(e,n,r);function n(t){i.current(t)}}),[t,e,r])}const q_=30;function K_(t,e,n){let r=k_(t,"outside-click"),i=_y(n),o=jn((function(t,n){if(t.defaultPrevented)return;let r=n(t);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function t(e){return"function"==typeof e?t(e()):Array.isArray(e)||e instanceof Set?e:[e]}(e);for(let e of o)if(null!==e&&(e.contains(r)||t.composed&&t.composedPath().includes(e)))return;return!B_(r,j_.Loose)&&-1!==r.tabIndex&&t.preventDefault(),i.current(t,r)}),[i,e]),s=Dn(null);z_(r,"pointerdown",(t=>{var e,n;s.current=(null==(n=null==(e=t.composedPath)?void 0:e.call(t))?void 0:n[0])||t.target}),!0),z_(r,"mousedown",(t=>{var e,n;s.current=(null==(n=null==(e=t.composedPath)?void 0:e.call(t))?void 0:n[0])||t.target}),!0),z_(r,"click",(t=>{$_()||s.current&&(o(t,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});z_(r,"touchstart",(t=>{a.current.x=t.touches[0].clientX,a.current.y=t.touches[0].clientY}),!0),z_(r,"touchend",(t=>{let e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(!(Math.abs(e-a.current.x)>=q_||Math.abs(n-a.current.y)>=q_))return o(t,(()=>t.target instanceof HTMLElement?t.target:null))}),!0),function(t,e,n,r){let i=_y(n);Fn((()=>{if(t)return window.addEventListener(e,n,r),()=>window.removeEventListener(e,n,r);function n(t){i.current(t)}}),[t,e,r])}(r,"blur",(t=>o(t,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function Y_(...t){return In((()=>fy(...t)),[...t])}function Q_(t,e){return In((()=>{var n;if(t.type)return t.type;let r=null!=(n=t.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==e?void 0:e.tagName)&&!e.hasAttribute("type")?"button":void 0}),[t.type,t.as,e])}function X_(){let t;return{before({doc:e}){var n;let r=e.documentElement,i=null!=(n=e.defaultView)?n:window;t=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:e,d:n}){let r=e.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,t-i);n.style(r,"paddingRight",`${o}px`)}}}function Z_(t){let e={};for(let n of t)Object.assign(e,n(e));return e}let J_=b_((()=>new Map),{PUSH(t,e){var n;let r=null!=(n=this.get(t))?n:{doc:t,count:0,d:vy(),meta:new Set};return r.count++,r.meta.add(e),this.set(t,r),this},POP(t,e){let n=this.get(t);return n&&(n.count--,n.meta.delete(e)),this},SCROLL_PREVENT({doc:t,d:e,meta:n}){let r={doc:t,d:e,meta:Z_(n)},i=[H_()?{before({doc:t,d:e,meta:n}){function r(t){return n.containers.flatMap((t=>t())).some((e=>e.contains(t)))}e.microTask((()=>{var n;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let n=vy();n.style(t.documentElement,"scrollBehavior","auto"),e.add((()=>e.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;e.addEventListener(t,"click",(e=>{if(e.target instanceof HTMLElement)try{let n=e.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=t.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),e.addEventListener(t,"touchstart",(t=>{if(t.target instanceof HTMLElement)if(r(t.target)){let n=t.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;e.style(n,"overscrollBehavior","contain")}else e.style(t.target,"touchAction","none")})),e.addEventListener(t,"touchmove",(t=>{if(t.target instanceof HTMLElement){if("INPUT"===t.target.tagName)return;if(r(t.target)){let e=t.target;for(;e.parentElement&&""!==e.dataset.headlessuiPortal&&!(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth);)e=e.parentElement;""===e.dataset.headlessuiPortal&&t.preventDefault()}else t.preventDefault()}}),{passive:!1}),e.add((()=>{var t;let e=null!=(t=window.scrollY)?t:window.pageYOffset;i!==e&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},X_(),{before({doc:t,d:e}){e.style(t.documentElement,"overflow","hidden")}}];i.forEach((({before:t})=>null==t?void 0:t(r))),i.forEach((({after:t})=>null==t?void 0:t(r)))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});function tw(t,e,n=()=>[document.body]){!function(t,e,n=()=>({containers:[]})){let r=x_(J_),i=e?r.get(e):void 0,o=!!i&&i.count>0;yy((()=>{if(e&&t)return J_.dispatch("PUSH",e,n),()=>J_.dispatch("POP",e,n)}),[t,e])}(k_(t,"scroll-lock"),e,(t=>{var e;return{containers:[...null!=(e=t.containers)?e:[],n]}}))}function ew(t){return[t.screenX,t.screenY]}J_.subscribe((()=>{let t=J_.getSnapshot(),e=new Map;for(let[n]of t)e.set(n,n.documentElement.style.overflow);for(let n of t.values()){let t="hidden"===e.get(n.doc),r=0!==n.count;(r&&!t||!r&&t)&&J_.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&J_.dispatch("TEARDOWN",n)}}));var nw;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(nw=null==process?void 0:{})?void 0:nw.NODE_ENV)&&void 0===Element.prototype.getAnimations&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var rw=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(rw||{});function iw(t){let e={};for(let n in t)!0===t[n]&&(e[`data-${n}`]="");return e}function ow(t,e,n,r){let[i,o]=On(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(t=0){let[e,n]=On(t),r=jn((t=>n(t)),[e]),i=jn((t=>n((e=>e|t))),[e]),o=jn((t=>(e&t)===t),[e]),s=jn((t=>n((e=>e&~t))),[n]),a=jn((t=>n((e=>e^t))),[n]);return{flags:e,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(t&&i?3:0),u=Dn(!1),c=Dn(!1),d=gy();return yy((()=>{var i;if(t)return n&&o(!0),e?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(t,{prepare:e,run:n,done:r,inFlight:i}){let o=vy();return function(t,{inFlight:e,prepare:n}){if(null!=e&&e.current)return void n();let r=t.style.transition;t.style.transition="none",n(),t.offsetHeight,t.style.transition=r}(t,{prepare:e,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(t,e){var n,r;let i=vy();if(!t)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=t.getAnimations)?void 0:n.call(t).filter((t=>t instanceof CSSTransition)))?r:[];return 0===s.length?(e(),i.dispose):(Promise.allSettled(s.map((t=>t.finished))).then((()=>{o||e()})),i.dispose)}(t,r))}))})),o.dispose}(e,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){c.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var t;c.current&&"function"==typeof e.getAnimations&&e.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(t=null==r?void 0:r.end)||t.call(r,n))}})):void(n&&a(3))}),[t,n,e,d]),t?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function sw(){return"undefined"!=typeof window}function aw(t){return cw(t)?(t.nodeName||"").toLowerCase():"#document"}function lw(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function uw(t){var e;return null==(e=(cw(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function cw(t){return!!sw()&&(t instanceof Node||t instanceof lw(t).Node)}function dw(t){return!!sw()&&(t instanceof Element||t instanceof lw(t).Element)}function hw(t){return!!sw()&&(t instanceof HTMLElement||t instanceof lw(t).HTMLElement)}function pw(t){return!(!sw()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof lw(t).ShadowRoot)}function fw(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ww(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function mw(t){return["table","td","th"].includes(aw(t))}function vw(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(Ty){return!1}}))}function gw(t){const e=yw(),n=dw(t)?ww(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function yw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _w(t){return["html","body","#document"].includes(aw(t))}function ww(t){return lw(t).getComputedStyle(t)}function bw(t){return dw(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xw(t){if("html"===aw(t))return t;const e=t.assignedSlot||t.parentNode||pw(t)&&t.host||uw(t);return pw(e)?e.host:e}function Sw(t){const e=xw(t);return _w(e)?t.ownerDocument?t.ownerDocument.body:t.body:hw(e)&&fw(e)?e:Sw(e)}function kw(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=Sw(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),s=lw(i);if(o){const t=Ew(s);return e.concat(s,s.visualViewport||[],fw(i)?i:[],t&&n?kw(t):[])}return e.concat(i,kw(i,[],n))}function Ew(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Pw=Math.min,Tw=Math.max,Aw=Math.round,Cw=Math.floor,Rw=t=>({x:t,y:t}),Ow={left:"right",right:"left",bottom:"top",top:"bottom"},Mw={start:"end",end:"start"};function Fw(t,e,n){return Tw(t,Pw(e,n))}function Lw(t,e){return"function"==typeof t?t(e):t}function Dw(t){return t.split("-")[0]}function Vw(t){return t.split("-")[1]}function Iw(t){return"x"===t?"y":"x"}function jw(t){return"y"===t?"height":"width"}function Bw(t){return["top","bottom"].includes(Dw(t))?"y":"x"}function Nw(t){return Iw(Bw(t))}function Uw(t){return t.replace(/start|end/g,(t=>Mw[t]))}function Gw(t){return t.replace(/left|right|bottom|top/g,(t=>Ow[t]))}function Ww(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Hw(t,e,n){let{reference:r,floating:i}=t;const o=Bw(e),s=Nw(e),a=jw(s),l=Dw(e),u="y"===o,c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Vw(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function $w(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Lw(e,t),f=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=Ww(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=Ww(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+f.top)/_.y,bottom:(w.bottom-v.bottom+f.bottom)/_.y,left:(v.left-w.left+f.left)/_.x,right:(w.right-v.right+f.right)/_.x}}function zw(t){const e=ww(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=hw(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Aw(n)!==o||Aw(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function qw(t){return dw(t)?t:t.contextElement}function Kw(t){const e=qw(t);if(!hw(e))return Rw(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=zw(e);let s=(o?Aw(n.width):n.width)/r,a=(o?Aw(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Yw=Rw(0);function Qw(t){const e=lw(t);return yw()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Yw}function Xw(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=qw(t);let s=Rw(1);e&&(r?dw(r)&&(s=Kw(r)):s=Kw(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==lw(t))&&e}(o,n,r)?Qw(o):Rw(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const t=lw(o),e=r&&dw(r)?lw(r):r;let n=t,i=Ew(n);for(;i&&r&&e!==n;){const t=Kw(i),e=i.getBoundingClientRect(),r=ww(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,u*=t.y,c*=t.x,d*=t.y,l+=o,u+=s,n=lw(i),i=Ew(n)}}return Ww({width:c,height:d,x:l,y:u})}function Zw(t,e){const n=bw(t).scrollLeft;return e?e.left+n:Xw(uw(t)).left+n}function Jw(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=lw(t),r=uw(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const t=yw();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(t,n);else if("document"===e)r=function(t){const e=uw(t),n=bw(t),r=t.ownerDocument.body,i=Tw(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Tw(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Zw(t);const a=-n.scrollTop;return"rtl"===ww(r).direction&&(s+=Tw(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(uw(t));else if(dw(e))r=function(t,e){const n=Xw(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=hw(t)?Kw(t):Rw(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=Qw(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return Ww(r)}function tb(t,e){const n=xw(t);return!(n===e||!dw(n)||_w(n))&&("fixed"===ww(n).position||tb(n,e))}function eb(t,e,n){const r=hw(e),i=uw(e),o="fixed"===n,s=Xw(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Rw(0);if(r||!r&&!o)if(("body"!==aw(e)||fw(i))&&(a=bw(e)),r){const t=Xw(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=Zw(i));let u=0,c=0;if(i&&!r&&!o){const t=i.getBoundingClientRect();c=t.top+a.scrollTop,u=t.left+a.scrollLeft-Zw(i,t)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function nb(t){return"static"===ww(t).position}function rb(t,e){if(!hw(t)||"fixed"===ww(t).position)return null;if(e)return e(t);let n=t.offsetParent;return uw(t)===n&&(n=n.ownerDocument.body),n}function ib(t,e){const n=lw(t);if(vw(t))return n;if(!hw(t)){let e=xw(t);for(;e&&!_w(e);){if(dw(e)&&!nb(e))return e;e=xw(e)}return n}let r=rb(t,e);for(;r&&mw(r)&&nb(r);)r=rb(r,e);return r&&_w(r)&&nb(r)&&!gw(r)?n:r||function(t){let e=xw(t);for(;hw(e)&&!_w(e);){if(gw(e))return e;if(vw(e))return null;e=xw(e)}return null}(t)||n}const ob={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,s=uw(r),a=!!e&&vw(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Rw(1);const c=Rw(0),d=hw(r);if((d||!d&&!o)&&(("body"!==aw(r)||fw(s))&&(l=bw(r)),hw(r))){const t=Xw(r);u=Kw(r),c.x=t.x+r.clientLeft,c.y=t.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:uw,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[..."clippingAncestors"===n?vw(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=kw(t,[],!1).filter((t=>dw(t)&&"body"!==aw(t))),i=null;const o="fixed"===ww(t).position;let s=o?xw(t):t;for(;dw(s)&&!_w(s);){const e=ww(s),n=gw(s);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||fw(s)&&!n&&tb(t,s))?r=r.filter((t=>t!==s)):i=e,s=xw(s)}return e.set(t,r),r}(e,this._c):[].concat(n),r],s=o[0],a=o.reduce(((t,n)=>{const r=Jw(e,n,i);return t.top=Tw(r.top,t.top),t.right=Pw(r.right,t.right),t.bottom=Pw(r.bottom,t.bottom),t.left=Tw(r.left,t.left),t}),Jw(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ib,getElementRects:async function(t){const e=this.getOffsetParent||ib,n=this.getDimensions,r=await n(t.floating);return{reference:eb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=zw(t);return{width:e,height:n}},getScale:Kw,isElement:dw,isRTL:function(t){return"rtl"===ww(t).direction}};function sb(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=qw(t),c=i||o?[...u?kw(u):[],...kw(e)]:[];c.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)}));const d=u&&a?function(t,e){let n,r=null;const i=uw(t);function o(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const{left:u,top:c,width:d,height:h}=t.getBoundingClientRect();if(a||e(),!d||!h)return;const p={rootMargin:-Cw(c)+"px "+-Cw(i.clientWidth-(u+d))+"px "+-Cw(i.clientHeight-(c+h))+"px "+-Cw(u)+"px",threshold:Tw(0,Pw(1,l))||1};let f=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return s();e?s(!1,e):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(Ty){r=new IntersectionObserver(m,p)}r.observe(t)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((t=>{let[r]=t;r&&r.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),n()})),u&&!l&&f.observe(u),f.observe(e));let m=l?Xw(t):null;return l&&function e(){const r=Xw(t);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(e)}(),n(),()=>{var t;c.forEach((t=>{i&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)})),null==d||d(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const ab=$w,lb=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:r,elements:i}=t,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Dw(n),a=Vw(n),l="y"===Bw(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Lw(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},ub=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=Lw(t,e),u={x:n,y:r},c=await $w(e,l),d=Bw(Dw(i)),h=Iw(d);let p=u[h],f=u[d];if(o){const t="y"===h?"bottom":"right";p=Fw(p+c["y"===h?"top":"left"],p,p-c[t])}if(s){const t="y"===d?"bottom":"right";f=Fw(f+c["y"===d?"top":"left"],f,f-c[t])}const m=a.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},cb=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Lw(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Dw(i),y=Bw(a),_=Dw(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(_||!m?[Gw(a)]:function(t){const e=Gw(t);return[Uw(t),e,Uw(e)]}(a)),x="none"!==f;!h&&x&&b.push(...function(t,e,n,r){const i=Vw(t);let o=function(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}(Dw(t),"start"===n,r);return i&&(o=o.map((t=>t+"-"+i)),e&&(o=o.concat(o.map(Uw)))),o}(a,m,f,w));const S=[a,...b],k=await $w(e,v),E=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&E.push(k[g]),d){const t=function(t,e,n){void 0===n&&(n=!1);const r=Vw(t),i=Nw(t),o=jw(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Gw(s)),[s,Gw(s)]}(i,s,w);E.push(k[t[0]],k[t[1]])}if(P=[...P,{placement:i,overflows:E}],!E.every((t=>t<=0))){var T,A;const t=((null==(T=o.flip)?void 0:T.index)||0)+1,e=S[t];if(e)return{data:{index:t,overflows:P},reset:{placement:e}};let n=null==(A=P.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var C;const t=null==(C=P.filter((t=>{if(x){const e=Bw(t.placement);return e===y||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},db=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...u}=Lw(t,e),c=await $w(e,u),d=Dw(i),h=Vw(i),p="y"===Bw(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,v="end"===h?"top":"bottom");const y=m-c.top-c.bottom,_=f-c.left-c.right,w=Pw(m-c[v],y),b=Pw(f-c[g],_),x=!e.middlewareData.shift;let S=w,k=b;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(k=_),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(S=y),x&&!h){const t=Tw(c.left,0),e=Tw(c.right,0),n=Tw(c.top,0),r=Tw(c.bottom,0);p?k=f-2*(0!==t||0!==e?t+e:Tw(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Tw(c.top,c.bottom))}await l({...e,availableWidth:k,availableHeight:S});const E=await s.getDimensions(a.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},hb=(t,e,n)=>{const r=new Map,i={platform:ob,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=Hw(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:v,y:g,data:y,reset:_}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(h=_.placement),_.rects&&(u=!0===_.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):_.rects),({x:c,y:d}=Hw(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(t,e,{...i,platform:o})};var pb="undefined"!=typeof document?Ln:Fn;function fb(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!fb(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!t.$$typeof)&&!fb(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function mb(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vb(t,e){const n=mb(t);return Math.round(e*n)/n}function gb(t){const e=Dn(t);return pb((()=>{e.current=t})),e}const yb=(t,e)=>({...lb(t),options:[t,e]}),_b=(t,e)=>({...ub(t),options:[t,e]}),wb=(t,e)=>({...cb(t),options:[t,e]}),bb=(t,e)=>({...db(t),options:[t,e]}),xb={...Zr},Sb=xb.useInsertionEffect||(t=>t());function kb(t){const e=Dn((()=>{}));return Sb((()=>{e.current=t})),jn((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null==e.current?void 0:e.current(...n)}),[])}var Eb="undefined"!=typeof document?Ln:Fn;let Pb=!1,Tb=0;const Ab=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Tb++;const Cb=xb.useId||function(){const[t,e]=On((()=>Pb?Ab():void 0));return Eb((()=>{null==t&&e(Ab())}),[]),Fn((()=>{Pb=!0}),[]),t};const Rb=oe(null),Ob=oe(null),Mb=()=>{var t;return(null==(t=Bn(Rb))?void 0:t.id)||null},Fb=()=>Bn(Ob),Lb="data-floating-ui-focusable";function Db(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Cb(),o=Dn({}),[s]=On((()=>function(){const t=new Map;return{emit(e,n){var r;null==(r=t.get(e))||r.forEach((t=>t(n)))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,(null==(r=t.get(e))?void 0:r.filter((t=>t!==n)))||[])}}}())),a=null!=Mb(),[l,u]=On(r.reference),c=kb(((t,e,r)=>{o.current.openEvent=t?e:void 0,s.emit("openchange",{open:t,event:e,reason:r,nested:a}),null==n||n(t,e,r)})),d=In((()=>({setPositionReference:u})),[]),h=In((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return In((()=>({dataRef:o,open:e,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[e,c,h,s,i,d])}function Vb(t){void 0===t&&(t={});const{nodeId:e}=t,n=Db({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=On(null),[a,l]=On(null),u=(null==i?void 0:i.reference)||o,c=Dn(null),d=Fb();Eb((()=>{u&&(c.current=u)}),[u]);const h=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=On({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=On(r);fb(h,r)||p(r);const[f,m]=On(null),[v,g]=On(null),y=jn((t=>{t!==x.current&&(x.current=t,m(t))}),[]),_=jn((t=>{t!==S.current&&(S.current=t,g(t))}),[]),w=o||f,b=s||v,x=Dn(null),S=Dn(null),k=Dn(c),E=null!=l,P=gb(l),T=gb(i),A=gb(u),C=jn((()=>{if(!x.current||!S.current)return;const t={placement:e,strategy:n,middleware:h};T.current&&(t.platform=T.current),hb(x.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==A.current};R.current&&!fb(k.current,e)&&(k.current=e,Gr((()=>{d(e)})))}))}),[h,e,n,T,A]);pb((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((t=>({...t,isPositioned:!1}))))}),[u]);const R=Dn(!1);pb((()=>(R.current=!0,()=>{R.current=!1})),[]),pb((()=>{if(w&&(x.current=w),b&&(S.current=b),w&&b){if(P.current)return P.current(w,b,C);C()}}),[w,b,C,P,E]);const O=In((()=>({reference:x,floating:S,setReference:y,setFloating:_})),[y,_]),M=In((()=>({reference:w,floating:b})),[w,b]),F=In((()=>{const t={position:n,left:0,top:0};if(!M.floating)return t;const e=vb(M.floating,c.x),r=vb(M.floating,c.y);return a?{...t,transform:"translate("+e+"px, "+r+"px)",...mb(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}}),[n,a,M.floating,c.x,c.y]);return In((()=>({...c,update:C,refs:O,elements:M,floatingStyles:F})),[c,C,O,M,F])}({...t,elements:{...i,...a&&{reference:a}}}),p=jn((t=>{const e=dw(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;l(e),h.refs.setReference(e)}),[h.refs]),f=jn((t=>{(dw(t)||null===t)&&(c.current=t,s(t)),(dw(h.refs.reference.current)||null===h.refs.reference.current||null!==t&&!dw(t))&&h.refs.setReference(t)}),[h.refs]),m=In((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=In((()=>({...h.elements,domReference:u})),[h.elements,u]),g=In((()=>({...h,...r,refs:m,elements:v,nodeId:e})),[h,m,v,e,r]);return Eb((()=>{r.dataRef.current.floatingContext=g;const t=null==d?void 0:d.nodesRef.current.find((t=>t.id===e));t&&(t.context=g)})),In((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}const Ib="active",jb="selected";function Bb(t,e,n){const r=new Map,i="item"===n;let o=t;if(i&&t){const{[Ib]:e,[jb]:n,...r}=t;o=r}return{..."floating"===n&&{tabIndex:-1,[Lb]:""},...o,...e.map((e=>{const r=e?e[n]:null;return"function"==typeof r?t?r(t):null:r})).concat(t).reduce(((t,e)=>e?(Object.entries(e).forEach((e=>{let[n,o]=e;var s;i&&[Ib,jb].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),t[n]=function(){for(var t,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return null==(t=r.get(n))?void 0:t.map((t=>t(...i))).find((t=>void 0!==t))})):t[n]=o)})),t):t),{})}}function Nb(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const Ub=t=>({name:"inner",options:t,async fn(e){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Lw(t,e),{rects:d,elements:{floating:h}}=e,p=n.current[s],f=(null==u?void 0:u.current)||h,m=h.clientTop||f.clientTop,v=0!==h.clientTop,g=0!==f.clientTop,y=h===f;if(!p)return{};const _={...e,...await yb(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(e)},w=await ab(Nb(_,f.scrollHeight+m+h.clientTop),c),b=await ab(_,{...c,elementContext:"reference"}),x=Tw(0,w.top),S=_.y+x,k=Aw(Tw(0,f.scrollHeight+(v&&y||g?2*m:0)-x-Tw(0,w.bottom)));if(f.style.maxHeight=k+"px",f.scrollTop=x,i){const t=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||b.top>=-l||b.bottom>=-l;Gr((()=>i(t)))}return r&&(r.current=await ab(Nb({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Gb(t,e){const{open:n,elements:r}=t,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=e,l=kb(a),u=Dn(!1),c=Dn(null),d=Dn(null);Fn((()=>{if(!i)return;function t(t){if(t.ctrlKey||!e||null==o.current)return;const n=t.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=e.scrollHeight-e.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";e.scrollHeight<=e.clientHeight||(!r&&n>0||!i&&n<0?(t.preventDefault(),Gr((()=>{l((t=>t+Math[u](n,s*a)))}))):/firefox/i.test(function(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}())&&(e.scrollTop+=n))}const e=(null==s?void 0:s.current)||r.floating;return n&&e?(e.addEventListener("wheel",t),requestAnimationFrame((()=>{c.current=e.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,e.removeEventListener("wheel",t)}):void 0}),[i,n,r.floating,o,s,l]);const h=In((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const t=(null==s?void 0:s.current)||r.floating;if(o.current&&t&&u.current){if(null!==c.current){const e=t.scrollTop-c.current;(o.current.bottom<-.5&&e<-1||o.current.top<-.5&&e>1)&&Gr((()=>l((t=>t+e))))}requestAnimationFrame((()=>{c.current=t.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let Wb=oe({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Wb.displayName="FloatingContext";let Hb=oe(null);Hb.displayName="PlacementContext";let $b=4;function zb({children:t,enabled:e=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(t){yy((()=>{if(!t)return;let e=new MutationObserver((()=>{let e=window.getComputedStyle(t).maxHeight,n=parseFloat(e);if(isNaN(n))return;let r=parseInt(e);isNaN(r)||n!==r&&(t.style.maxHeight=`${Math.ceil(n)}px`)}));return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}}),[t])}(a);let u=e&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(t,e){var n,r,i;let o=qb(null!=(n=null==t?void 0:t.gap)?n:"var(--anchor-gap, 0)",e),s=qb(null!=(r=null==t?void 0:t.offset)?r:"var(--anchor-offset, 0)",e),a=qb(null!=(i=null==t?void 0:t.padding)?i:"var(--anchor-padding, 0)",e);return{...t,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");yy((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=Vb({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[yb({mainAxis:"selection"===m?0:d,crossAxis:h}),_b({padding:p}),"selection"!==m&&wb({padding:p}),"selection"===m&&f?Ub({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:$b,referenceOverflowThreshold:p,onFallbackChange(t){var e,n;if(!t)return;let r=_.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min($b,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(e=_.elements.floating)?void 0:e.childNodes)?n:[])if(o instanceof HTMLElement){let t=o.offsetTop,e=t+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(t>=n&&e<=u)){l=Math.max(0,Math.min(e,u)-Math.max(t,n)),a=o.clientHeight;break}s--}s>=1&&o((t=>{let e=a*s-l+i;return t>=e?t:e}))}}):null,bb({padding:p,apply({availableWidth:t,availableHeight:e,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${t}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${e}px)`})}})].filter(Boolean),whileElementsMounted:sb}),[w=m,b=v]=_.placement.split("-");"selection"===m&&(w="selection");let x=In((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),S=Gb(_,{overflowRef:s,onChange:o}),{getReferenceProps:k,getFloatingProps:E}=function(t){void 0===t&&(t=[]);const e=t.map((t=>null==t?void 0:t.reference)),n=t.map((t=>null==t?void 0:t.floating)),r=t.map((t=>null==t?void 0:t.item)),i=jn((e=>Bb(e,t,"reference")),e),o=jn((e=>Bb(e,t,"floating")),n),s=jn((e=>Bb(e,t,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=wy((t=>{l(t),g.setFloating(t)}));return Dt(Hb.Provider,{value:r},Dt(Wb.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},t))}function qb(t,e,n=void 0){let r=gy(),i=wy(((t,e)=>{if(null==t)return[n,null];if("number"==typeof t)return[t,null];if("string"==typeof t){if(!e)return[n,null];let i=Yb(t,e);return[i,n=>{let o=Kb(t);{let s=o.map((t=>window.getComputedStyle(e).getPropertyValue(t)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[t,n]of o.entries()){let r=window.getComputedStyle(e).getPropertyValue(n);if(s[t]!==r){s[t]=r,l=!0;break}}if(!l)return;let u=Yb(t,e);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=In((()=>i(t,e)[0]),[t,e]),[s=o,a]=On();return yy((()=>{let[n,r]=i(t,e);if(a(n),r)return r(a)}),[t,e]),s}function Kb(t){let e=/var\((.*)\)/.exec(t);if(e){let t=e[1].indexOf(",");if(-1===t)return[e[1]];let n=e[1].slice(0,t).trim(),r=e[1].slice(t+1).trim();return r?[n,...Kb(r)]:[n]}return[]}function Yb(t,e){let n=document.createElement("div");e.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",t,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return e.removeChild(n),r}let Qb=oe(null);Qb.displayName="OpenClosedContext";var Xb=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Xb||{});function Zb(){return Bn(Qb)}function Jb({value:t,children:e}){return Xr.createElement(Qb.Provider,{value:t},e)}var tx,ex=((tx=ex||{})[tx.First=0]="First",tx[tx.Previous=1]="Previous",tx[tx.Next=2]="Next",tx[tx.Last=3]="Last",tx[tx.Specific=4]="Specific",tx[tx.Nothing=5]="Nothing",tx);function nx(t,e){let n=e.resolveItems();if(n.length<=0)return null;let r=e.resolveActiveIndex(),i=null!=r?r:-1;switch(t.focus){case 0:for(let t=0;t<n.length;++t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 1:-1===i&&(i=n.length);for(let t=i-1;t>=0;--t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 2:for(let t=i+1;t<n.length;++t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 3:for(let t=n.length-1;t>=0;--t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 4:for(let r=0;r<n.length;++r)if(e.resolveId(n[r],r,n)===t.id)return r;return r;case 5:return null;default:!function(t){throw new Error("Unexpected object: "+t)}(t)}}function rx(){let t=function(){let t="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(t=>t.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!t))}(),[e,n]=On(py.isHandoffComplete);return e&&!1===py.isHandoffComplete&&n(!1),Fn((()=>{!0!==e&&n(!0)}),[e]),Fn((()=>py.handoff()),[]),!t&&e}let ix=oe(!1);function ox(t){let e=Bn(ix),n=Bn(ux),r=Y_(t),[i,o]=On((()=>{var t;if(!e&&null!==n)return null!=(t=n.current)?t:null;if(py.isServer)return null;let i=null==r?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)}));return Fn((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Fn((()=>{e||null!==n&&o(n.current)}),[n,o,e]),i}let sx=jt,ax=Vy((function(t,e){let n=t,r=Dn(null),i=r_(function(t,e=!0){return Object.assign(t,{[n_]:e})}((t=>{r.current=t})),e),o=Y_(r),s=ox(r),[a]=On((()=>{var t;return py.isServer?null:null!=(t=null==o?void 0:o.createElement("div"))?t:null})),l=Bn(cx),u=rx();return yy((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),yy((()=>{if(a&&l)return l.register(a)}),[l,a]),function(t){let e=wy(t),n=Dn(!1);Fn((()=>(n.current=!1,()=>{n.current=!0,my((()=>{n.current&&e()}))})),[e])}((()=>{var t;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(t=s.parentElement)||t.removeChild(s)))})),u&&s&&a?mr(Oy({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:sx,name:"Portal"}),a):null}));let lx=jt,ux=oe(null);let cx=oe(null),dx=Vy((function(t,e){let n=r_(e),{enabled:r=!0,...i}=t;return r?Xr.createElement(ax,{...i,ref:n}):Oy({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:sx,name:"Portal"})})),hx=Vy((function(t,e){let{target:n,...r}=t,i={ref:r_(e)};return Xr.createElement(ux.Provider,{value:n},Oy({ourProps:i,theirProps:r,defaultTag:lx,name:"Popover.Group"}))})),px=Object.assign(dx,{Group:hx});function fx(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||(null!=(e=t.as)?e:wx)!==jt||1===Xr.Children.count(t.children)}let mx=oe(null);mx.displayName="TransitionContext";var vx=(t=>(t.Visible="visible",t.Hidden="hidden",t))(vx||{});let gx=oe(null);function yx(t){return"children"in t?yx(t.children):t.current.filter((({el:t})=>null!==t.current)).filter((({state:t})=>"visible"===t)).length>0}function _x(t,e){let n=_y(t),r=Dn([]),i=function(){let t=Dn(!1);return yy((()=>(t.current=!0,()=>{t.current=!1})),[]),t}(),o=gy(),s=wy(((t,e=Ry.Hidden)=>{let s=r.current.findIndex((({el:e})=>e===t));-1!==s&&(Py(e,{[Ry.Unmount](){r.current.splice(s,1)},[Ry.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var t;!yx(r)&&i.current&&(null==(t=n.current)||t.call(n))})))})),a=wy((t=>{let e=r.current.find((({el:e})=>e===t));return e?"visible"!==e.state&&(e.state="visible"):r.current.push({el:t,state:"visible"}),()=>s(t,Ry.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=wy(((t,n,r)=>{l.current.splice(0),e&&(e.chains.current[n]=e.chains.current[n].filter((([e])=>e!==t))),null==e||e.chains.current[n].push([t,new Promise((t=>{l.current.push(t)}))]),null==e||e.chains.current[n].push([t,new Promise((t=>{Promise.all(c.current[n].map((([t,e])=>e))).then((()=>t()))}))]),"enter"===n?u.current=u.current.then((()=>null==e?void 0:e.wait.current)).then((()=>r(n))):r(n)})),h=wy(((t,e,n)=>{Promise.all(c.current[e].splice(0).map((([t,e])=>e))).then((()=>{var t;null==(t=l.current.shift())||t()})).then((()=>n(e)))}));return In((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}gx.displayName="NestingContext";let wx=jt,bx=Cy.RenderStrategy;let xx=Vy((function(t,e){let{show:n,appear:r=!1,unmount:i=!0,...o}=t,s=Dn(null),a=r_(...fx(t)?[s,e]:null===e?[]:[e]);rx();let l=Zb();if(void 0===n&&null!==l&&(n=(l&Xb.Open)===Xb.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=On(n?"visible":"hidden"),d=_x((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);yy((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=In((()=>({show:n,appear:r,initial:h})),[n,r,h]);yy((()=>{n?c("visible"):!yx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=wy((()=>{var e;h&&p(!1),null==(e=t.beforeEnter)||e.call(t)})),y=wy((()=>{var e;h&&p(!1),null==(e=t.beforeLeave)||e.call(t)}));return Xr.createElement(gx.Provider,{value:d},Xr.createElement(mx.Provider,{value:m},Oy({ourProps:{...v,as:jt,children:Xr.createElement(Sx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:jt,features:bx,visible:"visible"===u,name:"Transition"})))})),Sx=Vy((function(t,e){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:d,entered:h,leave:p,leaveFrom:f,leaveTo:m,...v}=t,[g,y]=On(null),_=Dn(null),w=fx(t),b=r_(...w?[_,e,y]:null===e?[]:[e]),x=null==(n=v.unmount)||n?Ry.Unmount:Ry.Hidden,{show:S,appear:k,initial:E}=function(){let t=Bn(mx);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),[P,T]=On(S?"visible":"hidden"),A=function(){let t=Bn(gx);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),{register:C,unregister:R}=A;yy((()=>C(_)),[C,_]),yy((()=>{if(x===Ry.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):Py(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=rx();yy((()=>{if(w&&O&&"visible"===P&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,P,O,w]);let M=E&&!k,F=k&&S&&E,L=Dn(!1),D=_x((()=>{L.current||(T("hidden"),R(_))}),A),V=wy((t=>{L.current=!0;let e=t?"enter":"leave";D.onStart(_,e,(t=>{"enter"===t?null==o||o():"leave"===t&&(null==a||a())}))})),I=wy((t=>{let e=t?"enter":"leave";L.current=!1,D.onStop(_,e,(t=>{"enter"===t?null==s||s():"leave"===t&&(null==l||l())})),"leave"===e&&!yx(D)&&(T("hidden"),R(_))}));Fn((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let j=(()=>!(!i||!w||!O||M))(),[,B]=ow(j,g,S,{start:V,end:I}),N=Iy({ref:b,className:(null==(r=Ey(v.className,F&&u,F&&c,B.enter&&u,B.enter&&B.closed&&c,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&f,B.leave&&B.closed&&m,!B.transition&&S&&h))?void 0:r.trim())||void 0,...iw(B)}),U=0;return"visible"===P&&(U|=Xb.Open),"hidden"===P&&(U|=Xb.Closed),B.enter&&(U|=Xb.Opening),B.leave&&(U|=Xb.Closing),Xr.createElement(gx.Provider,{value:D},Xr.createElement(Jb,{value:U},Oy({ourProps:N,theirProps:v,defaultTag:wx,features:bx,visible:"visible"===P,name:"Transition.Child"})))})),kx=Vy((function(t,e){let n=null!==Bn(mx),r=null!==Zb();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(xx,{ref:e,...t}):Xr.createElement(Sx,{ref:e,...t}))})),Ex=Object.assign(xx,{Child:kx,Root:xx});let Px=Vy((function(t,e){let n=`headlessui-control-${Un()}`,[r,i]=m_(),[o,s]=a_(),a=Sy(),{disabled:l=a||!1,...u}=t,c=In((()=>({disabled:l})),[l]);return Xr.createElement(ky,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(t_,{id:n},Oy({ourProps:{ref:e,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(Ky,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let Tx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ax(t){var e,n;let r=null!=(e=t.innerText)?e:"",i=t.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?null!=(n=i.innerText)?n:"":r;return Tx.test(s)&&(s=s.replace(Tx,"")),s}function Cx(t){let e=Dn(""),n=Dn("");return wy((()=>{let r=t.current;if(!r)return"";let i=r.innerText;if(e.current===i)return n.current;let o=function(t){let e=t.getAttribute("aria-label");if("string"==typeof e)return e.trim();let n=t.getAttribute("aria-labelledby");if(n){let t=n.split(" ").map((t=>{let e=document.getElementById(t);if(e){let t=e.getAttribute("aria-label");return"string"==typeof t?t.trim():Ax(e).trim()}return null})).filter(Boolean);if(t.length>0)return t.join(", ")}return Ax(t).trim()}(r).trim().toLowerCase();return e.current=i,n.current=o,o}))}var Rx=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Rx||{}),Ox=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Ox||{}),Mx=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Mx||{}),Fx=(t=>(t[t.OpenListbox=0]="OpenListbox",t[t.CloseListbox=1]="CloseListbox",t[t.GoToOption=2]="GoToOption",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterOption=5]="RegisterOption",t[t.UnregisterOption=6]="UnregisterOption",t[t.SetButtonElement=7]="SetButtonElement",t[t.SetOptionsElement=8]="SetOptionsElement",t))(Fx||{});function Lx(t,e=t=>t){let n=null!==t.activeOptionIndex?t.options[t.activeOptionIndex]:null,r=G_(e(t.options.slice()),(t=>t.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Dx={1:t=>t.dataRef.current.disabled||1===t.listboxState?t:{...t,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(t){if(t.dataRef.current.disabled||0===t.listboxState)return t;let e=t.activeOptionIndex,{isSelected:n}=t.dataRef.current,r=t.options.findIndex((t=>n(t.dataRef.current.value)));return-1!==r&&(e=r),{...t,listboxState:0,activeOptionIndex:e,__demoMode:!1}},2(t,e){var n,r,i,o,s;if(t.dataRef.current.disabled||1===t.listboxState)return t;let a={...t,searchQuery:"",activationTrigger:null!=(n=e.trigger)?n:1,__demoMode:!1};if(e.focus===ex.Nothing)return{...a,activeOptionIndex:null};if(e.focus===ex.Specific)return{...a,activeOptionIndex:t.options.findIndex((t=>t.id===e.id))};if(e.focus===ex.Previous){let n=t.activeOptionIndex;if(null!==n){let o=t.options[n].dataRef.current.domRef,s=nx(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});if(null!==s){let e=t.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===e.current||null===(null==(i=e.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(e.focus===ex.Next){let n=t.activeOptionIndex;if(null!==n){let r=t.options[n].dataRef.current.domRef,i=nx(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});if(null!==i){let e=t.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===e.current||null===(null==(s=e.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Lx(t),u=nx(e,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(t,e)=>{if(t.dataRef.current.disabled||1===t.listboxState)return t;let n=""!==t.searchQuery?0:1,r=t.searchQuery+e.value.toLowerCase(),i=(null!==t.activeOptionIndex?t.options.slice(t.activeOptionIndex+n).concat(t.options.slice(0,t.activeOptionIndex+n)):t.options).find((t=>{var e;return!t.dataRef.current.disabled&&(null==(e=t.dataRef.current.textValue)?void 0:e.startsWith(r))})),o=i?t.options.indexOf(i):-1;return-1===o||o===t.activeOptionIndex?{...t,searchQuery:r}:{...t,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:t=>t.dataRef.current.disabled||1===t.listboxState||""===t.searchQuery?t:{...t,searchQuery:""},5:(t,e)=>{let n={id:e.id,dataRef:e.dataRef},r=Lx(t,(t=>[...t,n]));return null===t.activeOptionIndex&&t.dataRef.current.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...t,...r}},6:(t,e)=>{let n=Lx(t,(t=>{let n=t.findIndex((t=>t.id===e.id));return-1!==n&&t.splice(n,1),t}));return{...t,...n,activationTrigger:1}},7:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},8:(t,e)=>t.optionsElement===e.element?t:{...t,optionsElement:e.element}},Vx=oe(null);function Ix(t){let e=Bn(Vx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ix),e}return e}Vx.displayName="ListboxActionsContext";let jx=oe(null);function Bx(t){let e=Bn(jx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Bx),e}return e}function Nx(t,e){return Py(e.type,Dx,t,e)}jx.displayName="ListboxDataContext";let Ux=jt;let Gx=oe(!1),Wx=Cy.RenderStrategy|Cy.Static;let Hx=jt;let $x=Vy((function(t,e){var n;let r=Sy(),{value:i,defaultValue:o,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:f=!1,...m}=t;const v=h?"horizontal":"vertical";let g=r_(e),y=Ny(o),[_=(p?[]:void 0),w]=By(i,l,y),[b,x]=Mn(Nx,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=Dn({static:!1,hold:!1}),k=Dn(new Map),E=function(t=y_){return jn(((e,n)=>{if("string"==typeof t){let r=t;return(null==e?void 0:e[r])===(null==n?void 0:n[r])}return t(e,n)}),[t])}(u),P=jn((t=>Py(T.mode,{1:()=>_.some((e=>E(e,t))),0:()=>E(_,t)})),[_]),T=In((()=>({...b,value:_,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:E,isSelected:P,optionsPropsRef:S,listRef:k})),[_,d,c,p,b,k]);yy((()=>{b.dataRef.current=T}),[T]),K_(0===T.listboxState,[T.buttonElement,T.optionsElement],((t,e)=>{var n;x({type:1}),B_(e,j_.Loose)||(t.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let A=In((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:_})),[T,d,_,c]),C=wy((t=>{let e=T.options.find((e=>e.id===t));e&&V(e.dataRef.current.value)})),R=wy((()=>{if(null!==T.activeOptionIndex){let{dataRef:t,id:e}=T.options[T.activeOptionIndex];V(t.current.value),x({type:2,focus:ex.Specific,id:e})}})),O=wy((()=>x({type:0}))),M=wy((()=>x({type:1}))),F=gy(),L=wy(((t,e,n)=>{F.dispose(),F.microTask((()=>t===ex.Specific?x({type:2,focus:ex.Specific,id:e,trigger:n}):x({type:2,focus:t,trigger:n})))})),D=wy(((t,e)=>(x({type:5,id:t,dataRef:e}),()=>x({type:6,id:t})))),V=wy((t=>Py(T.mode,{0:()=>null==w?void 0:w(t),1(){let e=T.value.slice(),n=e.findIndex((e=>E(e,t)));return-1===n?e.push(t):e.splice(n,1),null==w?void 0:w(e)}}))),I=wy((t=>x({type:3,value:t}))),j=wy((()=>x({type:4}))),B=wy((t=>{x({type:7,element:t})})),N=wy((t=>{x({type:8,element:t})})),U=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:M,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[G,W]=m_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Xr.createElement(W,{value:G,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(zb,null,Xr.createElement(Vx.Provider,{value:U},Xr.createElement(jx.Provider,{value:T},Xr.createElement(Jb,{value:Py(T.listboxState,{0:Xb.Open,1:Xb.Closed})},null!=a&&null!=_&&Xr.createElement(Qy,{disabled:d,data:{[a]:_},form:s,onReset:$}),Oy({ourProps:H,theirProps:m,slot:A,defaultTag:Ux,name:"Listbox"}))))))})),zx=Vy((function(t,e){var n;let r=Bx("Listbox.Button"),i=Ix("Listbox.Button"),o=Un(),s=Jy(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=t,d=function(){let t=Dn([]),e=jn((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}),[]);return(...n)=>{if(!n.every((t=>null==t)))return t.current=n,e}}(),h=r_(e,Bn(Wb).setReference,i.setButtonElement),p=Bn(Wb).getReferenceProps,f=wy((t=>{switch(t.key){case d_.Enter:Hy(t.currentTarget);break;case d_.Space:case d_.ArrowDown:t.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(ex.First);break;case d_.ArrowUp:t.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(ex.Last)}})),m=wy((t=>{if(t.key===d_.Space)t.preventDefault()})),v=wy((t=>{var e;if(e_(t.currentTarget))return t.preventDefault();0===r.listboxState?(Gr((()=>i.closeListbox())),null==(e=r.buttonElement)||e.focus({preventScroll:!0})):(t.preventDefault(),i.openListbox())})),g=wy((t=>t.preventDefault())),y=f_([a]),_=s_(),{isFocusVisible:w,focusProps:b}=cy({autoFocus:u}),{isHovered:x,hoverProps:S}=uy({isDisabled:l}),{pressed:k,pressProps:E}=by({disabled:l}),P=In((()=>({open:0===r.listboxState,active:k||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:x,focus:w,autofocus:u})),[r.listboxState,r.value,l,x,w,k,r.invalid,u]);return Oy({mergeRefs:d,ourProps:Dy(p(),{ref:h,id:a,type:Q_(t,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":_,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},b,S,E),theirProps:c,slot:P,defaultTag:"button",name:"Listbox.Button"})})),qx=g_,Kx=Vy((function(t,e){var n,r;let i=Un(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=t,d=function(t){return In((()=>t?"string"==typeof t?{to:t}:t:null),[t])}(s),[h,p]=On(null);d&&(a=!0);let f=Bx("Listbox.Options"),m=Ix("Listbox.Options"),v=Y_(f.optionsElement),g=Zb(),[y,_]=ow(u,h,null!==g?(g&Xb.Open)===Xb.Open:0===f.listboxState);!function(t,e,n){let r=_y((t=>{let e=t.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&n()}));Fn((()=>{if(!t)return;let n=null===e?null:e instanceof HTMLElement?e:e.current;if(!n)return;let i=vy();if("undefined"!=typeof ResizeObserver){let t=new ResizeObserver((()=>r.current(n)));t.observe(n),i.add((()=>t.disconnect()))}if("undefined"!=typeof IntersectionObserver){let t=new IntersectionObserver((()=>r.current(n)));t.observe(n),i.add((()=>t.disconnect()))}return()=>i.dispose()}),[e,r,t])}(y,f.buttonElement,m.closeListbox),tw(!f.__demoMode&&(l&&0===f.listboxState),v),function(t,{allowed:e,disallowed:n}={}){let r=k_(t,"inert-others");yy((()=>{var t,i;if(!r)return;let o=vy();for(let e of null!=(t=null==n?void 0:n())?t:[])e&&o.add(T_(e));let s=null!=(i=null==e?void 0:e())?i:[];for(let e of s){if(!e)continue;let t=fy(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let t of n.children)s.some((e=>t.contains(e)))||o.add(T_(t));n=n.parentElement}}return o.dispose}),[r,e,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:jn((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let w=!function(t,e){let n=Dn({left:0,top:0});if(yy((()=>{if(!e)return;let t=e.getBoundingClientRect();t&&(n.current=t)}),[t,e]),null==e||!t||e===document.activeElement)return!1;let r=e.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,b=function(t,e){let[n,r]=On(e);return!t&&n!==e&&r(e),t?n:e}(y&&1===f.listboxState,f.value),x=wy((t=>f.compare(b,t))),S=In((()=>{var t;if(null==d||null==(t=null==d?void 0:d.to)||!t.includes("selection"))return null;let e=f.options.findIndex((t=>x(t.dataRef.current.value)));return-1===e&&(e=0),e}),[d,f.options]),k=(()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let t=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:t},index:S}}})(),[E,P]=function(t=null){!1===t&&(t=null),"string"==typeof t&&(t={to:t});let e=Bn(Hb),n=In((()=>t),[JSON.stringify(t,"undefined"!=typeof HTMLElement?(t,e)=>e instanceof HTMLElement?e.outerHTML:e:void 0)]);yy((()=>{null==e||e(null!=n?n:null)}),[e,n]);let r=Bn(Wb);return In((()=>[r.setFloating,t?r.styles:{}]),[r.setFloating,t,r.styles])}(k),T=function(){let{getFloatingProps:t,slot:e}=Bn(Wb);return jn(((...n)=>Object.assign({},t(...n),{"data-anchor":e.anchor})),[t,e])}(),A=r_(e,d?E:null,m.setOptionsElement,p),C=gy();Fn((()=>{var t;let e=f.optionsElement;e&&0===f.listboxState&&e!==(null==(t=fy(e))?void 0:t.activeElement)&&(null==e||e.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=wy((t=>{var e,n;switch(C.dispose(),t.key){case d_.Space:if(""!==f.searchQuery)return t.preventDefault(),t.stopPropagation(),m.search(t.key);case d_.Enter:if(t.preventDefault(),t.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:t}=f.options[f.activeOptionIndex];m.onChange(t.current.value)}0===f.mode&&(Gr((()=>m.closeListbox())),null==(e=f.buttonElement)||e.focus({preventScroll:!0}));break;case Py(f.orientation,{vertical:d_.ArrowDown,horizontal:d_.ArrowRight}):return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.Next);case Py(f.orientation,{vertical:d_.ArrowUp,horizontal:d_.ArrowLeft}):return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.Previous);case d_.Home:case d_.PageUp:return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.First);case d_.End:case d_.PageDown:return t.preventDefault(),t.stopPropagation(),m.goToOption(ex.Last);case d_.Escape:return t.preventDefault(),t.stopPropagation(),Gr((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case d_.Tab:t.preventDefault(),t.stopPropagation(),Gr((()=>m.closeListbox())),W_(f.buttonElement,t.shiftKey?L_.Previous:L_.Next);break;default:1===t.key.length&&(m.search(t.key),C.setTimeout((()=>m.clearSearch()),350))}})),O=null==(n=f.buttonElement)?void 0:n.id,M=In((()=>({open:0===f.listboxState})),[f.listboxState]),F=Dy(d?T():{},{id:o,ref:A,"aria-activedescendant":null===f.activeOptionIndex||null==(r=f.options[f.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===f.mode||void 0,"aria-labelledby":O,"aria-orientation":f.orientation,onKeyDown:R,role:"listbox",tabIndex:0===f.listboxState?0:void 0,style:{...c.style,...P,"--button-width":__(f.buttonElement,!0).width},...iw(_)});return Xr.createElement(px,{enabled:!!a&&(t.static||y)},Xr.createElement(jx.Provider,{value:1===f.mode?f:{...f,isSelected:x}},Oy({ourProps:F,theirProps:c,slot:M,defaultTag:"div",features:Wx,visible:w,name:"Listbox.Options"})))})),Yx=Vy((function(t,e){let n=Un(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=t,a=!0===Bn(Gx),l=Bx("Listbox.Option"),u=Ix("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=Cx(h),f=_y({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=r_(e,h,(t=>{t?l.listRef.current.set(r,t):l.listRef.current.delete(r)}));yy((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return vy().requestAnimationFrame((()=>{var t,e;null==(e=null==(t=h.current)?void 0:t.scrollIntoView)||e.call(t,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),yy((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=wy((t=>{var e;if(i)return t.preventDefault();u.onChange(o),0===l.mode&&(Gr((()=>u.closeListbox())),null==(e=l.buttonElement)||e.focus({preventScroll:!0}))})),g=wy((()=>{if(i)return u.goToOption(ex.Nothing);u.goToOption(ex.Specific,r)})),y=function(){let t=Dn([-1,-1]);return{wasMoved(e){let n=ew(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=ew(e)}}}(),_=wy((t=>{y.update(t),!i&&(c||u.goToOption(ex.Specific,r,0))})),w=wy((t=>{y.wasMoved(t)&&(i||c||u.goToOption(ex.Specific,r,0))})),b=wy((t=>{y.wasMoved(t)&&(i||c&&u.goToOption(ex.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Oy({ourProps:a?{}:{id:r,ref:m,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":d,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:_,onMouseEnter:_,onPointerMove:w,onMouseMove:w,onPointerLeave:b,onMouseLeave:b},theirProps:s,slot:x,defaultTag:"div",name:"Listbox.Option"})})),Qx=Vy((function(t,e){let{options:n,placeholder:r,...i}=t,o={ref:r_(e)},s=Bx("ListboxSelectedOption"),a=In((()=>({})),[]),l=void 0===s.value||null===s.value||1===s.mode&&Array.isArray(s.value)&&0===s.value.length;return Xr.createElement(Gx.Provider,{value:!0},Oy({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:Hx,name:"ListboxSelectedOption"}))})),Xx=Object.assign($x,{Button:zx,Label:qx,Options:Kx,Option:Yx,SelectedOption:Qx}),Zx=oe(null);Zx.displayName="GroupContext";let Jx=jt;let tS=Vy((function(t,e){var n;let r=Un(),i=Jy(),o=Sy(),{id:s=i||`headlessui-switch-${r}`,disabled:a=o||!1,checked:l,defaultChecked:u,onChange:c,name:d,value:h,form:p,autoFocus:f=!1,...m}=t,v=Bn(Zx),[g,y]=On(null),_=r_(Dn(null),e,null===v?null:v.setSwitch,y),w=Ny(u),[b,x]=By(l,c,null!=w&&w),S=gy(),[k,E]=On(!1),P=wy((()=>{E(!0),null==x||x(!b),S.nextFrame((()=>{E(!1)}))})),T=wy((t=>{if(e_(t.currentTarget))return t.preventDefault();t.preventDefault(),P()})),A=wy((t=>{t.key===d_.Space?(t.preventDefault(),P()):t.key===d_.Enter&&Hy(t.currentTarget)})),C=wy((t=>t.preventDefault())),R=f_(),O=s_(),{isFocusVisible:M,focusProps:F}=cy({autoFocus:f}),{isHovered:L,hoverProps:D}=uy({isDisabled:a}),{pressed:V,pressProps:I}=by({disabled:a}),j=In((()=>({checked:b,disabled:a,hover:L,focus:M,active:V,autofocus:f,changing:k})),[b,L,M,V,a,k,f]),B=Dy({id:s,ref:_,role:"switch",type:Q_(t,g),tabIndex:-1===t.tabIndex?0:null!=(n=t.tabIndex)?n:0,"aria-checked":b,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:A,onKeyPress:C},F,D,I),N=jn((()=>{if(void 0!==w)return null==x?void 0:x(w)}),[x,w]);return Xr.createElement(Xr.Fragment,null,null!=d&&Xr.createElement(Qy,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:b},form:p,onReset:N}),Oy({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),eS=function(t){var e;let[n,r]=On(null),[i,o]=m_(),[s,a]=a_(),l=In((()=>({switch:n,setSwitch:r})),[n,r]),u=t;return Xr.createElement(a,{name:"Switch.Description",value:s},Xr.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(e=l.switch)?void 0:e.id,onClick(t){n&&(t.currentTarget instanceof HTMLLabelElement&&t.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Xr.createElement(Zx.Provider,{value:l},Oy({ourProps:{},theirProps:u,slot:{},defaultTag:Jx,name:"Switch.Group"}))))},nS=g_,rS=u_,iS=Object.assign(tS,{Group:eS,Label:nS,Description:rS});function oS(t,e){if(void 0===t.inserted[e.name])return t.insert("",e,t.sheet,!0)}function sS(t,e,n){var r=[],i=Ei(t,r,n);return r.length<2?n:i+e(r)}var aS=function t(e){for(var n="",r=0;r<e.length;r++){var i=e[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=t(i);else for(var s in o="",i)i[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},lS=function(t){var e=wn(t);e.sheet.speedy=function(t){this.isSpeedy=t},e.compat=!0;var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered,void 0);return Ti(e,i,!1),e.key+"-"+i.name};return{css:n,cx:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return sS(e.registered,n,aS(r))},injectGlobal:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered);oS(e,i)},keyframes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered),o="animation-"+i.name;return oS(e,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Ei.bind(null,e.registered),merge:sS.bind(null,e.registered,n)}}({key:"css"}),uS=lS.cx,cS=lS.css;const dS=Ms(zx)`
|
|
45
|
+
*/new Promise((()=>{}));try{window.__reactRouterVersion="6"}catch(Cy){}const cl=Zr.startTransition;function dl(t){let{basename:e,children:n,future:r,window:i}=t,o=Dn();null==o.current&&(o.current=ua({window:i,v5Compat:!0}));let s=o.current,[a,l]=On({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=jn((t=>{u&&cl?cl((()=>l(t))):l(t)}),[l,u]);return Ln((()=>s.listen(c)),[s,c]),Dt(al,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var hl,pl,fl,ml;let vl;(pl=hl||(hl={})).UseScrollRestoration="useScrollRestoration",pl.UseSubmit="useSubmit",pl.UseSubmitFetcher="useSubmitFetcher",pl.UseFetcher="useFetcher",pl.useViewTransitionState="useViewTransitionState",(ml=fl||(fl={})).UseFetcher="useFetcher",ml.UseFetchers="useFetchers",ml.UseScrollRestoration="useScrollRestoration";const gl=()=>{if(vl)return vl;return vl=new rs({defaultOptions:{queries:{retry:(t,e)=>{var n;return e instanceof co&&![401,403].includes((null==(n=e.response)?void 0:n.status)||0)}}}}),vl},yl="getAllPromotions",_l=/^https:\/\/([A-Za-z]+)-partner/,wl=t=>{switch((t=>{if(t.startsWith("http://localhost"))return"local";const e=t.toLowerCase().match(_l);return e&&e.length>1?e[1]:"prod"})(t.url)){case"local":case"autodev":case"test":return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/staging/";default:return"https://app.contentful.com/spaces/hos0i9i3wvo7/environments/master/"}},bl=()=>{const{getAllPromotions:t}=vo(),e=Xa(),{isPending:n,error:r,data:i}=Es({queryKey:[yl],queryFn:t}),o=uo(),s=In((()=>{return t=o.backend,((null==(e=i)?void 0:e.data)||[]).map((e=>{var n;return{id:e.id,category:e.category.title,promotionStatus:e.status,contentfulUrl:(null==(n=e.contentfulContent)?void 0:n.contentId)?`${wl(t)}entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0,createdAt:e.createdAt,updatedAt:e.updatedAt,edit:"Edit"}})).sort(((t,e)=>new Date(e.updatedAt).valueOf()-new Date(t.updatedAt).valueOf()));var t,e}),[o.backend,i]),a=In((()=>[{name:"Id",field:"id",isSortable:!0},{name:"Category",field:"category",isSortable:!0},{name:"Status",field:"promotionStatus",isSortable:!0,type:{kind:"status",styleOverrides:{Enabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-color":"rgb(22 163 74 / 0.2)"},Disabled:{"--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--tw-ring-color":"rgb(220 38 38 / 0.2)"}}},filters:[{name:"Enabled",predicate:t=>"Enabled"===t},{name:"Disabled",predicate:t=>"Disabled"===t}]},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:t=>t?-1:1,type:{kind:"link"},filters:[{name:"Linked",predicate:t=>!!t},{name:"Unlinked",predicate:t=>!t}]},{name:"Created",field:"createdAt",isSortable:!0,sort:(t,e)=>new Date(e).valueOf()-new Date(t).valueOf(),type:{kind:"date"}},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(t,e)=>new Date(e).valueOf()-new Date(t).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:t=>e(`/promotion/${t}`),children:io(ea,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[e]);switch(!0){case n:return io(ro,{children:"Loading..."});case!!r:return oo(ro,{children:["An error has occurred: ",r.message]});case!!i:return io(ia,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButtonText:"Add New Promotion",onAdd:()=>e("/promotion"),onClick:t=>e(`/promotion/${t}`)});default:return io(ro,{children:"No data returned from backend"})}};function xl(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,r)=>"create"===r?t:(e.has(r)||e.set(r,t(r)),e.get(r))})}function Sl(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const kl=t=>Array.isArray(t);function El(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}function Pl(t){return"string"==typeof t||Array.isArray(t)}function Tl(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Al(t,e,n,r){if("function"==typeof e){const[i,o]=Tl(r);e=e(void 0!==n?n:t.custom,i,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,o]=Tl(r);e=e(void 0!==n?n:t.custom,i,o)}return e}function Cl(t,e,n){const r=t.getProps();return Al(r,e,void 0!==n?n:r.custom,t)}const Rl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ol=["initial",...Rl],Ml=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fl=new Set(Ml),Ll=t=>1e3*t,Dl=t=>t/1e3,Vl={type:"spring",stiffness:500,damping:25,restSpeed:10},Il={type:"keyframes",duration:.8},jl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Bl=(t,{keyframes:e})=>e.length>2?Il:Fl.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Vl:jl;function Nl(t,e){return t[e]||t.default||t}const Ul=!1,Gl=t=>null!==t;function Wl(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(Gl),o=e&&"loop"!==n&&e%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}const Hl=t=>t;const $l=["read","resolveKeyframes","update","preRender","render","postRender"];function zl(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=$l.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(s)}const l={schedule:(t,i=!1,s=!1)=>{const a=s&&r?e:n;return i&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{s=t,r?i=!0:(r=!0,[e,n]=[n,e],n.clear(),e.forEach(a),r=!1,i&&(i=!1,l.process(t)))}};return l}(o),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(p))};return{schedule:$l.reduce(((e,o)=>{const a=s[o];return e[o]=(e,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(p)),a.schedule(e,o,s)),e}),{}),cancel:t=>{for(let e=0;e<$l.length;e++)s[$l[e]].cancel(t)},state:i,steps:s}}const{schedule:ql,cancel:Kl,state:Yl,steps:Ql}=zl("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Hl,!0),Xl=t=>/^0[^.\s]+$/u.test(t);let Zl=Hl;const Jl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),tu=t=>e=>"string"==typeof e&&e.startsWith(t),eu=tu("--"),nu=tu("var(--"),ru=t=>!!nu(t)&&iu.test(t.split("/*")[0].trim()),iu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ou=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function su(t,e,n=1){const[r,i]=function(t){const e=ou.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${null!=n?n:r}`,i]}(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const t=o.trim();return Jl(t)?parseFloat(t):t}return ru(i)?su(i,e,n+1):i}const au=(t,e,n)=>n>e?e:n<t?t:n,lu={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},uu={...lu,transform:t=>au(0,1,t)},cu={...lu,default:1},du=t=>Math.round(1e5*t)/1e5,hu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,pu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,fu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function mu(t){return"string"==typeof t}const vu=t=>({test:e=>mu(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),gu=vu("deg"),yu=vu("%"),_u=vu("px"),wu=vu("vh"),bu=vu("vw"),xu={...yu,parse:t=>yu.parse(t)/100,transform:t=>yu.transform(100*t)},Su=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ku=t=>t===lu||t===_u,Eu=(t,e)=>parseFloat(t.split(", ")[e]),Pu=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Eu(i[1],e);{const e=r.match(/^matrix\((.+)\)$/u);return e?Eu(e[1],t):0}},Tu=new Set(["x","y","z"]),Au=Ml.filter((t=>!Tu.has(t)));const Cu={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:Pu(4,13),y:Pu(5,14)};Cu.translateX=Cu.x,Cu.translateY=Cu.y;const Ru=t=>e=>e.test(t),Ou=[lu,_u,yu,gu,bu,wu,{test:t=>"auto"===t,parse:t=>t}],Mu=t=>Ou.find(Ru(t)),Fu=new Set;let Lu=!1,Du=!1;function Vu(){if(Du){const t=Array.from(Fu).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Au.forEach((n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var r;null===(r=t.getValue(e))||void 0===r||r.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Du=!1,Lu=!1,Fu.forEach((t=>t.complete())),Fu.clear()}function Iu(){Fu.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Du=!0)}))}class ju{constructor(t,e,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Fu.add(this),Lu||(Lu=!0,ql.read(Iu),ql.resolveKeyframes(Vu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:r}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==r?void 0:r.get(),o=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const r=n.readValue(e,o);null!=r&&(t[0]=r)}void 0===t[0]&&(t[0]=o),r&&void 0===i&&r.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Fu.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Fu.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bu=(t,e)=>n=>Boolean(mu(n)&&fu.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Nu=(t,e,n)=>r=>{if(!mu(r))return r;const[i,o,s,a]=r.match(hu);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Uu={...lu,transform:t=>Math.round((t=>au(0,255,t))(t))},Gu={test:Bu("rgb","red"),parse:Nu("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Uu.transform(t)+", "+Uu.transform(e)+", "+Uu.transform(n)+", "+du(uu.transform(r))+")"};const Wu={test:Bu("#"),parse:function(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}},transform:Gu.transform},Hu={test:Bu("hsl","hue"),parse:Nu("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+yu.transform(du(e))+", "+yu.transform(du(n))+", "+du(uu.transform(r))+")"},$u={test:t=>Gu.test(t)||Wu.test(t)||Hu.test(t),parse:t=>Gu.test(t)?Gu.parse(t):Hu.test(t)?Hu.parse(t):Wu.parse(t),transform:t=>mu(t)?t:t.hasOwnProperty("red")?Gu.transform(t):Hu.transform(t)};const zu="number",qu="color",Ku="var",Yu="var(",Qu="${}",Xu=/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 Zu(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=e.replace(Xu,(t=>($u.test(t)?(r.color.push(o),i.push(qu),n.push($u.parse(t))):t.startsWith(Yu)?(r.var.push(o),i.push(Ku),n.push(t)):(r.number.push(o),i.push(zu),n.push(parseFloat(t))),++o,Qu))).split(Qu);return{values:n,split:s,indexes:r,types:i}}function Ju(t){return Zu(t).values}function tc(t){const{split:e,types:n}=Zu(t),r=e.length;return t=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],void 0!==t[o]){const e=n[o];i+=e===zu?du(t[o]):e===qu?$u.transform(t[o]):t[o]}return i}}const ec=t=>"number"==typeof t?0:t;const nc={test:function(t){var e,n;return isNaN(t)&&mu(t)&&((null===(e=t.match(hu))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(pu))||void 0===n?void 0:n.length)||0)>0},parse:Ju,createTransformer:tc,getAnimatableNone:function(t){const e=Ju(t);return tc(t)(e.map(ec))}},rc=new Set(["brightness","contrast","saturate","opacity"]);function ic(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(hu)||[];if(!r)return t;const i=n.replace(r,"");let o=rc.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const oc=/\b([a-z-]*)\(.*?\)/gu,sc={...nc,getAnimatableNone:t=>{const e=t.match(oc);return e?e.map(ic).join(" "):t}},ac={...lu,transform:Math.round},lc={borderWidth:_u,borderTopWidth:_u,borderRightWidth:_u,borderBottomWidth:_u,borderLeftWidth:_u,borderRadius:_u,radius:_u,borderTopLeftRadius:_u,borderTopRightRadius:_u,borderBottomRightRadius:_u,borderBottomLeftRadius:_u,width:_u,maxWidth:_u,height:_u,maxHeight:_u,size:_u,top:_u,right:_u,bottom:_u,left:_u,padding:_u,paddingTop:_u,paddingRight:_u,paddingBottom:_u,paddingLeft:_u,margin:_u,marginTop:_u,marginRight:_u,marginBottom:_u,marginLeft:_u,rotate:gu,rotateX:gu,rotateY:gu,rotateZ:gu,scale:cu,scaleX:cu,scaleY:cu,scaleZ:cu,skew:gu,skewX:gu,skewY:gu,distance:_u,translateX:_u,translateY:_u,translateZ:_u,x:_u,y:_u,z:_u,perspective:_u,transformPerspective:_u,opacity:uu,originX:xu,originY:xu,originZ:_u,zIndex:ac,backgroundPositionX:_u,backgroundPositionY:_u,fillOpacity:uu,strokeOpacity:uu,numOctaves:ac},uc={...lc,color:$u,backgroundColor:$u,outlineColor:$u,fill:$u,stroke:$u,borderColor:$u,borderTopColor:$u,borderRightColor:$u,borderBottomColor:$u,borderLeftColor:$u,filter:sc,WebkitFilter:sc},cc=t=>uc[t];function dc(t,e){let n=cc(t);return n!==sc&&(n=nc),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const hc=new Set(["auto","none","0"]);class pc extends ju{constructor(t,e,n,r,i){super(t,e,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),ru(n))){const r=su(n,e.current);void 0!==r&&(t[a]=r),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Su.has(n)||2!==t.length)return;const[r,i]=t,o=Mu(r),s=Mu(i);if(o!==s)if(ku(o)&&ku(s))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let i=0;i<t.length;i++)("number"==typeof(r=t[i])?0===r:null===r||"none"===r||"0"===r||Xl(r))&&n.push(i);var r;n.length&&function(t,e,n){let r,i=0;for(;i<t.length&&!r;){const e=t[i];"string"==typeof e&&!hc.has(e)&&Zu(e).values.length&&(r=t[i]),i++}if(r&&n)for(const o of e)t[o]=dc(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Cu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const r=e[e.length-1];void 0!==r&&t.getValue(n,r).jump(r,!1)}measureEndState(){var t;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]=Cu[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function fc(t){let e;return()=>(void 0===e&&(e=t()),e)}let mc;function vc(){mc=void 0}const gc={now:()=>(void 0===mc&&gc.set(Yl.isProcessing||Ul?Yl.timestamp:performance.now()),mc),set:t=>{mc=t,queueMicrotask(vc)}},yc=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!nc.test(t)&&"0"!==t||t.startsWith("url(")));class _c{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=gc.now(),this.options={autoplay:t,delay:e,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Iu(),Vu()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=gc.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,r){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],s=yc(i,e),a=yc(o,e);return!(!s||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&r)}(t,n,r,i)){if(!o)return null==a||a(Wl(t,this.options,e)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function wc(t,e){return e?t*(1e3/e):0}const bc=5;function xc(t,e,n){const r=Math.max(e-bc,0);return wc(n-t(r),e-r)}const Sc=.001,kc=.01,Ec=10,Pc=.05,Tc=1;function Ac({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o,s=1-e;s=au(Pc,Tc,s),t=au(kc,Ec,Dl(t)),s<1?(i=e=>{const r=e*s,i=r*t,o=r-n,a=Rc(e,s),l=Math.exp(-i);return Sc-o/a*l},o=e=>{const r=e*s*t,o=r*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-r),u=Rc(Math.pow(e,2),s);return(-i(e)+Sc>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-Sc,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let i=1;i<Cc;i++)r-=t(r)/e(r);return r}(i,o,5/t);if(t=Ll(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*s*Math.sqrt(r*e),duration:t}}}const Cc=12;function Rc(t,e){return t*Math.sqrt(1-e*e)}const Oc=["duration","bounce"],Mc=["stiffness","damping","mass"];function Fc(t,e){return e.some((e=>void 0!==t[e]))}function Lc({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Fc(t,Mc)&&Fc(t,Oc)){const n=Ac(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...r,velocity:-Dl(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=Dl(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),e||(e=g?.005:.5),f<1){const t=Rc(v,f);y=e=>{const n=Math.exp(-f*v*e);return o-n*((p+f*v*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>o-Math.exp(-v*t)*(m+(p+v*m)*t);else{const t=v*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*v*e),r=Math.min(t*e,300);return o-n*((p+f*v*m)*Math.sinh(r)+t*m*Math.cosh(r))/t}}return{calculatedDuration:h&&c||null,next:t=>{const r=y(t);if(h)s.done=t>=c;else{let i=0;f<1&&(i=0===t?Ll(p):xc(y,t,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=e;s.done=a&&l}return s.value=s.done?o:r,s}}}function Dc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=t=>-f*Math.exp(-t/r),y=t=>v+g(t),_=t=>{const e=g(t),n=y(t);h.done=Math.abs(e)<=u,h.value=h.done?v:n};let w,b;const x=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=Lc({keyframes:[h.value,p(h.value)],velocity:xc(y,t,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,_(t),x(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&_(t),h)}}}const Vc=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ic=1e-7,jc=12;function Bc(t,e,n,r){if(t===e&&n===r)return Hl;const i=e=>function(t,e,n,r,i){let o,s,a=0;do{s=e+(n-e)/2,o=Vc(s,r,i)-t,o>0?n=s:e=s}while(Math.abs(o)>Ic&&++a<jc);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Vc(i(t),e,r)}const Nc=Bc(.42,0,1,1),Uc=Bc(0,0,.58,1),Gc=Bc(.42,0,.58,1),Wc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Hc=t=>e=>1-t(1-e),$c=t=>1-Math.sin(Math.acos(t)),zc=Hc($c),qc=Wc($c),Kc=Bc(.33,1.53,.69,.99),Yc=Hc(Kc),Qc={linear:Hl,easeIn:Nc,easeInOut:Gc,easeOut:Uc,circIn:$c,circInOut:qc,circOut:zc,backIn:Yc,backInOut:Wc(Yc),backOut:Kc,anticipate:t=>(t*=2)<1?.5*Yc(t):.5*(2-Math.pow(2,-10*(t-1)))},Xc=t=>{if(Array.isArray(t)){Zl(4===t.length);const[e,n,r,i]=t;return Bc(e,n,r,i)}return"string"==typeof t?(Zl(void 0!==Qc[t]),Qc[t]):t},Zc=(t,e)=>n=>e(t(n)),Jc=(...t)=>t.reduce(Zc),td=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},ed=(t,e,n)=>t+(e-t)*n;function nd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function rd(t,e){return n=>n>0?e:t}const id=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},od=[Wu,Gu,Hu];function sd(t){const e=(n=t,od.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let r=e.parse(t);return e===Hu&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let i=0,o=0,s=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;i=nd(a,r,t+1/3),o=nd(a,r,t),s=nd(a,r,t-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const ad=(t,e)=>{const n=sd(t),r=sd(e);if(!n||!r)return rd(t,e);const i={...n};return t=>(i.red=id(n.red,r.red,t),i.green=id(n.green,r.green,t),i.blue=id(n.blue,r.blue,t),i.alpha=ed(n.alpha,r.alpha,t),Gu.transform(i))},ld=new Set(["none","hidden"]);function ud(t,e){return n=>ed(t,e,n)}function cd(t){return"number"==typeof t?ud:"string"==typeof t?ru(t)?rd:$u.test(t)?ad:pd:Array.isArray(t)?dd:"object"==typeof t?$u.test(t)?ad:hd:rd}function dd(t,e){const n=[...t],r=n.length,i=t.map(((t,n)=>cd(t)(t,e[n])));return t=>{for(let e=0;e<r;e++)n[e]=i[e](t);return n}}function hd(t,e){const n={...t,...e},r={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=cd(t[i])(t[i],e[i]));return t=>{for(const e in r)n[e]=r[e](t);return n}}const pd=(t,e)=>{const n=nc.createTransformer(e),r=Zu(t),i=Zu(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?ld.has(t)&&!i.values.length||ld.has(e)&&!r.values.length?function(t,e){return ld.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Jc(dd(function(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][i[s]],l=null!==(n=t.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):rd(t,e)};function fd(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ed(t,e,n);return cd(t)(t,e)}function md(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Zl(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const r=[],i=n||fd,o=t.length-1;for(let s=0;s<o;s++){let n=i(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||Hl:e;n=Jc(t,n)}r.push(n)}return r}(e,r,i),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=td(t[n],t[n+1],e);return s[n](r)};return n?e=>l(au(t[0],t[o-1],e)):l}function vd(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=td(0,e,r);t.push(ed(n,1,i))}}(e,t.length-1),e}function gd({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(r)?r.map(Xc):Xc(r),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:vd(e),t),a=md(s,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map((()=>u||Gc)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const yd=t=>{const e=({timestamp:e})=>t(e);return{start:()=>ql.update(e,!0),stop:()=>Kl(e),now:()=>Yl.isProcessing?Yl.timestamp:gc.now()}},_d={decay:Dc,inertia:Dc,tween:gd,keyframes:gd,spring:Lc},wd=t=>t/100;class bd extends _c{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||ju;this.resolver=new o(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,r),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=_d[e]||gd;let a,l;s!==gd&&"number"!=typeof t[0]&&(a=Jc(wd,fd(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});"mirror"===i&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(u));const{calculatedDuration:c}=u,d=c+r;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,_=i;if(h){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(_=o)),y=au(0,1,n)*c}const w=g?{done:!1,value:a[0]}:_.next(y);s&&(w.value=s(w.value));let{done:b}=w;g||null===l||(b=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return x&&void 0!==r&&(w.value=Wl(a,this.options,r)),m&&m(w.value),x&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Dl(t.calculatedDuration):0}get time(){return Dl(this.currentTime)}set time(t){t=Ll(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Dl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=yd,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const xd=new Set(["opacity","clipPath","filter","transform"]),Sd=t=>Array.isArray(t)&&"number"==typeof t[0];function kd(t){return Boolean(!t||"string"==typeof t&&t in Pd||Sd(t)||Array.isArray(t)&&t.every(kd))}const Ed=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Pd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ed([0,.65,.55,1]),circOut:Ed([.55,0,1,.45]),backIn:Ed([.31,.01,.66,-.59]),backOut:Ed([.33,1.53,.69,.99])};function Td(t){return Ad(t)||Pd.easeOut}function Ad(t){return t?Sd(t)?Ed(t):Array.isArray(t)?t.map(Td):Pd[t]:void 0}const Cd=fc((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Rd extends _c{constructor(t){super(t);const{name:e,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new pc(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,r),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!kd(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new bd({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const i=[];let o=0;for(;!r.done&&o<2e4;)r=n.sample(o),i.push(r.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Ad(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:o});return d.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set(Wl(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Dl(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Dl(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Ll(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Hl;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return Hl}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:r,type:i,ease:o,times:s}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new bd({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=Ll(this.time);t.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;return Cd()&&n&&xd.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}const Od=fc((()=>void 0!==window.ScrollTimeline));class Md{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map((e=>{if(!Od()||!e.attachTimeline)return e.pause(),function(t,e){let n;const r=()=>{const{currentTime:r}=e,i=(null===r?0:r.value)/100;n!==i&&t(i),n=i};return ql.update(r,!0),()=>Kl(r)}((t=>{e.time=e.duration*t}),t);e.attachTimeline(t)}));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Fd=(t,e,n,r={},i,o,s)=>a=>{const l=Nl(r,t)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=Ll(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(d={...d,...Bl(t,d)}),d.duration&&(d.duration=Ll(d.duration)),d.repeatDelay&&(d.repeatDelay=Ll(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!o&&void 0!==e.get()){const t=Wl(d.keyframes,l);if(void 0!==t)return ql.update((()=>{d.onUpdate(t),d.onComplete()})),new Md([])}return!o&&Rd.supports(d)?new Rd(d):new bd(d)},Ld=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Dd=t=>kl(t)?t[t.length-1]||0:t;function Vd(t,e){-1===t.indexOf(e)&&t.push(e)}function Id(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class jd{constructor(){this.subscriptions=[]}add(t){return Vd(this.subscriptions,t),()=>Id(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Bd{constructor(t,e={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=gc.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=gc.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new jd);const n=this.events[t].add(e);return"change"===t?()=>{n(),ql.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=gc.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return wc(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Nd(t,e){return new Bd(t,e)}function Ud(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Nd(n))}const Gd=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wd="data-"+Gd("framerAppearId");function Hd(t){return t.props[Wd]}function $d(t){return Fl.has(t)?"transform":xd.has(t)?Gd(t):void 0}class zd extends Bd{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=$d(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let r=!1;return()=>{if(r)return;r=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(Id(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const qd=t=>Boolean(t&&t.getVelocity);function Kd(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");return r||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(r=new zd("auto"),t.addValue("willChange",r)),i=r,Boolean(qd(i)&&i.add)?r.add(e):void 0;var i}function Yd({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}function Qd(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const d in l){const e=t.getValue(d,null!==(o=t.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&Yd(c,d))continue;const i={delay:n,...Nl(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const e=Hd(t);if(e){const t=window.MotionHandoffAnimation(e,d,ql);null!==t&&(i.startTime=t,a=!0)}}e.start(Fd(d,e,r,t.shouldReduceMotion&&Fl.has(d)?{type:!1}:i,t,a,Kd(t,d)));const h=e.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{ql.update((()=>{a&&function(t,e){const n=Cl(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o)Ud(t,s,Dd(o[s]))}(t,a)}))})),u}function Xd(t,e,n={}){var r;const i=Cl(t,e,"exit"===n.type?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Qd(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=1===i?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Zd).forEach(((t,r)=>{t.notify("AnimationStart",e),s.push(Xd(t,e,{...o,delay:n+l(r)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then((()=>e()))}return Promise.all([s(),a(n.delay)])}function Zd(t,e){return t.sortNodePosition(e)}const Jd=[...Rl].reverse(),th=Rl.length;function eh(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map((e=>Xd(t,e,n)));r=Promise.all(i)}else if("string"==typeof e)r=Xd(t,e,n);else{const i="function"==typeof e?Cl(t,e,n.custom):e;r=Promise.all(Qd(t,i,n))}return r.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function nh(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!El(e,t)}function rh(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ih(){return{animate:rh(!0),whileInView:rh(),whileHover:rh(),whileTap:rh(),whileDrag:rh(),whileFocus:rh(),exit:rh()}}class oh{constructor(t){this.isMounted=!1,this.node=t}update(){}}let sh=0;const ah={animation:{Feature:class extends oh{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=eh(t),n=ih(),r=!0;const i=e=>(n,r)=>{var i;const o=Cl(t,r,"exit"===e?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:t,transitionEnd:e,...r}=o;n={...n,...r,...e}}return n};function o(o){const s=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let e=0;e<th;e++){const h=Jd[e],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=Pl(f),v=h===o?p.isActive:null;!1===v&&(d=e);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||Sl(f)||"boolean"==typeof f)continue;let y=nh(p.prevProp,f)||h===o&&p.isActive&&!g&&m||e>d&&m,_=!1;const w=Array.isArray(f)?f:[f];let b=w.reduce(i(h),{});!1===v&&(b={});const{prevResolvedValues:x={}}=p,S={...x,...b},k=e=>{y=!0,u.has(e)&&(_=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=b[t],n=x[t];if(c.hasOwnProperty(t))continue;let r=!1;r=kl(e)&&kl(n)?!El(e,n):e!==n,r?null!=e?k(t):u.add(t):void 0!==e&&u.has(t)?k(t):p.protectedKeys[t]=!0}p.prevProp=f,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),r&&t.blockInitialAnimation&&(y=!1),!y||g&&!_||l.push(...w.map((t=>({animation:t,options:{type:h}}))))}if(u.size){const e={};u.forEach((n=>{const r=t.getBaseTarget(n),i=t.getValue(n);i&&(i.liveStyle=!0),e[n]=null!=r?r:null})),l.push({animation:e})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||t.manuallyAnimateOnMount||(h=!1),r=!1,h?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,r){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)})),n[e].isActive=r;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ih(),r=!0}}}(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Sl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends oh{constructor(){super(...arguments),this.id=sh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);e&&!t&&r.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},lh=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function uh(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const ch=t=>e=>lh(e)&&t(e,uh(e));function dh(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function hh(t,e,n,r){return dh(t,e,ch(n),r)}const ph=(t,e)=>Math.abs(t-e);class fh{constructor(t,e,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=gh(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=ph(t.x,e.x),r=ph(t.y,e.y);return Math.sqrt(n**2+r**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:r}=t,{timestamp:i}=Yl;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=mh(e,this.transformPagePoint),ql.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=gh("pointercancel"===t.type?this.lastMoveEventInfo:mh(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),r&&r(t,o)},!lh(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=r||window;const o=mh(uh(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=Yl;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,gh(o,this.history)),this.removeListeners=Jc(hh(this.contextWindow,"pointermove",this.handlePointerMove),hh(this.contextWindow,"pointerup",this.handlePointerUp),hh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Kl(this.updatePoint)}}function mh(t,e){return e?{point:e(t.point)}:t}function vh(t,e){return{x:t.x-e.x,y:t.y-e.y}}function gh({point:t},e){return{point:t,delta:vh(t,_h(e)),offset:vh(t,yh(e)),velocity:wh(e,.1)}}function yh(t){return t[0]}function _h(t){return t[t.length-1]}function wh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=_h(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Ll(e)));)n--;if(!r)return{x:0,y:0};const o=Dl(i.timestamp-r.timestamp);if(0===o)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 bh(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const xh=bh("dragHorizontal"),Sh=bh("dragVertical");function kh(t){let e=!1;if("y"===t)e=Sh();else if("x"===t)e=xh();else{const t=xh(),n=Sh();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Eh(){const t=kh(!0);return!t||(t(),!1)}function Ph(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Th=.9999,Ah=1.0001,Ch=-.01,Rh=.01;function Oh(t){return t.max-t.min}function Mh(t,e,n,r=.5){t.origin=r,t.originPoint=ed(e.min,e.max,t.origin),t.scale=Oh(n)/Oh(e),t.translate=ed(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Th&&t.scale<=Ah||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ch&&t.translate<=Rh||isNaN(t.translate))&&(t.translate=0)}function Fh(t,e,n,r){Mh(t.x,e.x,n.x,r?r.originX:void 0),Mh(t.y,e.y,n.y,r?r.originY:void 0)}function Lh(t,e,n){t.min=n.min+e.min,t.max=t.min+Oh(e)}function Dh(t,e,n){t.min=e.min-n.min,t.max=t.min+Oh(e)}function Vh(t,e,n){Dh(t.x,e.x,n.x),Dh(t.y,e.y,n.y)}function Ih(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function jh(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}}const Bh=.35;function Nh(t,e,n){return{min:Uh(t,e),max:Uh(t,n)}}function Uh(t,e){return"number"==typeof t?t:t[e]||0}const Gh=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Wh=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Hh(t){return[t("x"),t("y")]}function $h({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function zh(t){return void 0===t||1===t}function qh({scale:t,scaleX:e,scaleY:n}){return!zh(t)||!zh(e)||!zh(n)}function Kh(t){return qh(t)||Yh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yh(t){return Qh(t.x)||Qh(t.y)}function Qh(t){return t&&"0%"!==t}function Xh(t,e,n){return n+e*(t-n)}function Zh(t,e,n,r,i){return void 0!==i&&(t=Xh(t,i,r)),Xh(t,n,r)+e}function Jh(t,e=0,n=1,r,i){t.min=Zh(t.min,e,n,r,i),t.max=Zh(t.max,e,n,r,i)}function tp(t,{x:e,y:n}){Jh(t.x,e.translate,e.scale,e.originPoint),Jh(t.y,n.translate,n.scale,n.originPoint)}const ep=.999999999999,np=1.0000000000001;function rp(t,e){t.min=t.min+e,t.max=t.max+e}function ip(t,e,n,r,i=.5){Jh(t,e,n,ed(t.min,t.max,i),r)}function op(t,e){ip(t.x,e.x,e.scaleX,e.scale,e.originX),ip(t.y,e.y,e.scaleY,e.scale,e.originY)}function sp(t,e){return $h(function(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}}(t.getBoundingClientRect(),e))}const ap=({current:t})=>t?t.ownerDocument.defaultView:null,lp=new WeakMap;class up{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wh(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new fh(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(uh(t,"page").point)},onStart:(t,e)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=kh(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Hh((t=>{let e=this.getAxisMotionValue(t).get()||0;if(yu.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[t];if(r){e=Oh(r)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),o&&ql.postRender((()=>o(t,e))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=Kd(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(r&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Hh((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:ap(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&ql.postRender((()=>o(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:r}=this.getProps();if(!n||!cp(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},r){return void 0!==e&&t<e?t=r?ed(e,t,r.min):Math.max(t,e):void 0!==n&&t>n&&(t=r?ed(n,t,r.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&Ph(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!r)&&function(t,{top:e,left:n,bottom:r,right:i}){return{x:Ih(t.x,n,i),y:Ih(t.y,e,r)}}(r.layoutBox,e),this.elastic=function(t=Bh){return!1===t?t=0:!0===t&&(t=Bh),{x:Nh(t,"left","right"),y:Nh(t,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Hh((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(r.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Ph(t))return!1;const n=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(t,e,n){const r=sp(t,n),{scroll:i}=e;return i&&(rp(r.x,i.offset.x),rp(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:jh(t.x,e.x),y:jh(t.y,e.y)}}(r.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=$h(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Hh((s=>{if(!cp(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?t[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Fd(t,n,0,e,this.visualElement,!1,Kd(this.visualElement,t)))}stopAnimation(){Hh((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Hh((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[e];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Hh((e=>{const{drag:n}=this.getProps();if(!cp(e,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(e);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[e];i.set(t[e]-ed(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ph(e)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Hh((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();r[t]=function(t,e){let n=.5;const r=Oh(t),i=Oh(e);return i>r?n=td(e.min,e.max-r,t.min):r>i&&(n=td(t.min,t.max-i,e.min)),au(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Hh((e=>{if(!cp(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(ed(i,o,r[e]))}))}addListeners(){if(!this.visualElement.current)return;lp.set(this.visualElement,this);const t=hh(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();Ph(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ql.read(e);const i=dh(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Hh((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{i(),t(),r(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Bh,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function cp(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const dp=t=>(e,n)=>{t&&ql.postRender((()=>t(e,n)))};const hp=oe(null);const pp=oe({}),fp=oe({}),mp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vp(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gp={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!_u.test(t))return t;t=parseFloat(t)}return`${vp(t,e.target.x)}% ${vp(t,e.target.y)}%`}},yp={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=nc.parse(t);if(i.length>5)return r;const o=nc.createTransformer(t),s="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=ed(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},_p={};const{schedule:wp,cancel:bp}=zl(queueMicrotask,!1);class xp extends Bt{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;var o;o=kp,Object.assign(_p,o),i&&(e.group&&e.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),mp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ql.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),wp.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Sp(t){const[e,n]=function(){const t=Bn(hp);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=Un();Fn((()=>r(i)),[]);const o=jn((()=>n&&n(i)),[i,n]);return!e&&n?[!1,o]:[!0]}(),r=Bn(pp);return no(xp,{...t,layoutGroup:r,switchLayoutGroup:Bn(fp),isPresent:e,safeToRemove:n})}const kp={borderRadius:{...gp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gp,borderTopRightRadius:gp,borderBottomLeftRadius:gp,borderBottomRightRadius:gp,boxShadow:yp},Ep=["TopLeft","TopRight","BottomLeft","BottomRight"],Pp=Ep.length,Tp=t=>"string"==typeof t?parseFloat(t):t,Ap=t=>"number"==typeof t||_u.test(t);function Cp(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Rp=Mp(0,.5,zc),Op=Mp(.5,.95,Hl);function Mp(t,e,n){return r=>r<t?0:r>e?1:n(td(t,e,r))}function Fp(t,e){t.min=e.min,t.max=e.max}function Lp(t,e){Fp(t.x,e.x),Fp(t.y,e.y)}function Dp(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Vp(t,e,n,r,i){return t=Xh(t-=e,1/n,r),void 0!==i&&(t=Xh(t,1/i,r)),t}function Ip(t,e,[n,r,i],o,s){!function(t,e=0,n=1,r=.5,i,o=t,s=t){yu.test(e)&&(e=parseFloat(e),e=ed(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=ed(o.min,o.max,r);t===o&&(a-=e),t.min=Vp(t.min,e,n,a,i),t.max=Vp(t.max,e,n,a,i)}(t,e[n],e[r],e[i],e.scale,o,s)}const jp=["x","scaleX","originX"],Bp=["y","scaleY","originY"];function Np(t,e,n,r){Ip(t.x,e,jp,n?n.x:void 0,r?r.x:void 0),Ip(t.y,e,Bp,n?n.y:void 0,r?r.y:void 0)}function Up(t){return 0===t.translate&&1===t.scale}function Gp(t){return Up(t.x)&&Up(t.y)}function Wp(t,e){return t.min===e.min&&t.max===e.max}function Hp(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function $p(t,e){return Hp(t.x,e.x)&&Hp(t.y,e.y)}function zp(t){return Oh(t.x)/Oh(t.y)}function qp(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Kp{constructor(){this.members=[]}add(t){Vd(this.members,t),t.scheduleRender()}remove(t){if(Id(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let r=e;r>=0;r--){const t=this.members[r];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Yp=(t,e)=>t.depth-e.depth;class Qp{constructor(){this.children=[],this.isDirty=!1}add(t){Vd(this.children,t),this.isDirty=!0}remove(t){Id(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Yp),this.isDirty=!1,this.children.forEach(t)}}function Xp(t){const e=qd(t)?t.get():t;return Ld(e)?e.toValue():e}const Zp={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Jp="undefined"!=typeof window&&void 0!==window.MotionDebug,tf=["","X","Y","Z"],ef={visibility:"hidden"};let nf=0;function rf(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function of(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Hd(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ql,!(e||r))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&of(r)}function sf({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=nf++,this.animationId=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,Jp&&(Zp.totalNodes=Zp.resolvedTargetDeltas=Zp.recalculatedProjection=0),this.nodes.forEach(uf),this.nodes.forEach(vf),this.nodes.forEach(gf),this.nodes.forEach(cf),Jp&&window.MotionDebug.record(Zp)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Qp)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new jd),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=e)instanceof SVGElement&&"svg"!==r.tagName,this.instance=e;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),t){let n;const r=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=gc.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Kl(r),t(o-e))};return ql.read(r,!0),()=>Kl(r)}(r,250),mp.hasAnimatedSinceResize&&(mp.hasAnimatedSinceResize=!1,this.nodes.forEach(mf))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||Sf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!$p(this.targetLayout,r)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Nl(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Kl(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(yf),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&of(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const t=this.path[i];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(hf);this.isUpdating||this.nodes.forEach(pf),this.isUpdating=!1,this.nodes.forEach(ff),this.nodes.forEach(af),this.nodes.forEach(lf),this.clearAllSnapshots();const t=gc.now();Yl.delta=au(0,1e3/60,t-Yl.timestamp),Yl.timestamp=t,Yl.isProcessing=!0,Ql.update.process(Yl),Ql.preRender.process(Yl),Ql.render.process(Yl),Yl.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(df),this.sharedNodes.forEach(_f)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ql.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ql.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wh(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=r(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Gp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;t&&(e||Kh(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var r;return t&&(n=this.removeTransform(n)),Pf((r=n).x),Pf(r.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Wh();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Af))){const{scroll:t}=this.root;t&&(rp(n.x,t.offset.x),rp(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Wh();if(Lp(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let r=0;r<this.path.length;r++){const e=this.path[r],{scroll:i,options:o}=e;e!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&Lp(n,t),rp(n.x,i.offset.x),rp(n.y,i.offset.y))}return n}applyTransform(t,e=!1){const n=Wh();Lp(n,t);for(let r=0;r<this.path.length;r++){const t=this.path[r];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&op(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),Kh(t.latestValues)&&op(n,t.latestValues)}return Kh(this.latestValues)&&op(n,this.latestValues),n}removeTransform(t){const e=Wh();Lp(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!Kh(t.latestValues))continue;qh(t.latestValues)&&t.updateSnapshot();const r=Wh();Lp(r,t.measurePageBox()),Np(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,r)}return Kh(this.latestValues)&&Np(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==Yl.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(t||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=Yl.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wh(),this.relativeTargetOrigin=Wh(),Vh(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Lp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Wh(),this.targetWithTransforms=Wh()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Lh(s.x,a.x,l.x),Lh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Lp(this.target,this.layout.layoutBox),tp(this.target,this.targetDelta)):Lp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wh(),this.relativeTargetOrigin=Wh(),Vh(this.relativeTargetOrigin,this.target,t.target),Lp(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Jp&&Zp.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!qh(this.parent.latestValues)&&!Yh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let r=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Yl.timestamp&&(r=!1),r)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Lp(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,r=!1){const i=n.length;if(!i)return;let o,s;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&op(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,tp(t,s)),r&&Kh(o.latestValues)&&op(t,o.latestValues))}e.x<np&&e.x>ep&&(e.x=1),e.y<np&&e.y>ep&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Wh());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Dp(this.prevProjectionDelta.x,this.projectionDelta.x),Dp(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Fh(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&qp(this.projectionDelta.x,this.prevProjectionDelta.x)&&qp(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Jp&&Zp.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gh(),this.projectionDelta=Gh(),this.projectionDeltaWithTransform=Gh()}setAnimationOrigin(t,e=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Gh();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Wh(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(xf));let d;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,f,m,v;wf(o.x,t.x,n),wf(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=s,v=n,bf(p.x,f.x,m.x,v),bf(p.y,f.y,m.y,v),d&&(l=this.relativeTarget,h=d,Wp(l.x,h.x)&&Wp(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Wh()),Lp(d,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,r,i,o){i?(t.opacity=ed(0,void 0!==n.opacity?n.opacity:1,Rp(r)),t.opacityExit=ed(void 0!==e.opacity?e.opacity:1,0,Op(r))):o&&(t.opacity=ed(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<Pp;s++){const i=`border${Ep[s]}Radius`;let o=Cp(e,i),a=Cp(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Ap(o)===Ap(a)?(t[i]=Math.max(ed(Tp(o),Tp(a),r),0),(yu.test(a)||yu.test(o))&&(t[i]+="%")):t[i]=a)}(e.rotate||n.rotate)&&(t.rotate=ed(e.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Kl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ql.update((()=>{mp.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const r=qd(t)?t:Nd(t);return r.start(Fd("",r,e,n)),r.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:r,latestValues:i}=t;if(e&&n&&r){if(this!==t&&this.layout&&r&&Tf(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Wh();const e=Oh(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const r=Oh(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+r}Lp(e,n),op(e,i),Fh(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Kp);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const r={};n.z&&rf("z",t,r,this.animationValues);for(let i=0;i<tf.length;i++)rf(`rotate${tf[i]}`,t,r,this.animationValues),rf(`skew${tf[i]}`,t,r,this.animationValues);t.render();for(const i in r)t.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ef;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Xp(null==t?void 0:t.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Xp(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!Kh(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===e.x&&1===e.y||(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;t&&(r=`perspective(${t}px) ${r}`),e&&(r+=`rotate(${e}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(e=s.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in _p){if(void 0===s[u])continue;const{correct:t,applyTo:e}=_p[u],n="none"===r.transform?s[u]:t(s[u],o);if(e){const t=e.length;for(let i=0;i<t;i++)r[e[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?Xp(null==t?void 0:t.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(hf),this.root.sharedNodes.clear()}}}function af(t){t.updateLayout()}function lf(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:r}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?Hh((t=>{const r=o?n.measuredBox[t]:n.layoutBox[t],i=Oh(r);r.min=e[t].min,r.max=r.min+i})):Tf(i,n.layoutBox,e)&&Hh((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Oh(e[r]);i.max=i.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[r].max=t.relativeTarget[r].min+s)}));const s=Gh();Fh(s,e,n.layoutBox);const a=Gh();o?Fh(a,t.applyTransform(r,!0),n.measuredBox):Fh(a,e,n.layoutBox);const l=!Gp(s);let u=!1;if(!t.resumeFrom){const r=t.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=Wh();Vh(s,n.layoutBox,i.layoutBox);const a=Wh();Vh(a,e,o.layoutBox),$p(s,a)||(u=!0),r.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=r)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function uf(t){Jp&&Zp.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function cf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function df(t){t.clearSnapshot()}function hf(t){t.clearMeasurements()}function pf(t){t.isLayoutDirty=!1}function ff(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function mf(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function vf(t){t.resolveTargetDelta()}function gf(t){t.calcProjection()}function yf(t){t.resetSkewAndRotation()}function _f(t){t.removeLeadSnapshot()}function wf(t,e,n){t.translate=ed(e.translate,0,n),t.scale=ed(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bf(t,e,n,r){t.min=ed(e.min,n.min,r),t.max=ed(e.max,n.max,r)}function xf(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Sf={duration:.45,ease:[.4,0,.1,1]},kf=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ef=kf("applewebkit/")&&!kf("chrome/")?Math.round:Hl;function Pf(t){t.min=Ef(t.min),t.max=Ef(t.max)}function Tf(t,e,n){return"position"===t||"preserve-aspect"===t&&(r=zp(e),i=zp(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Af(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Cf=sf({attachResizeListener:(t,e)=>dh(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rf={current:void 0},Of=sf({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rf.current){const t=new Cf({});t.mount(window),t.setOptions({layoutScroll:!0}),Rf.current=t}return Rf.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Mf={pan:{Feature:class extends oh{constructor(){super(...arguments),this.removePointerDownListener=Hl}onPointerDown(t){this.session=new fh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ap(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:dp(t),onStart:dp(e),onMove:n,onEnd:(t,e)=>{delete this.session,r&&ql.postRender((()=>r(t,e)))}}}mount(){this.removePointerDownListener=hh(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends oh{constructor(t){super(t),this.removeGroupControls=Hl,this.removeListeners=Hl,this.controls=new up(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Hl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Of,MeasureLayout:Sp}};function Ff(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd";return hh(t.current,n,((n,i)=>{if("touch"===n.pointerType||Eh())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[r];s&&ql.postRender((()=>s(n,i)))}),{passive:!t.getProps()[r]})}const Lf=(t,e)=>!!e&&(t===e||Lf(t,e.parentElement));function Df(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,uh(n))}const Vf=new WeakMap,If=new WeakMap,jf=t=>{const e=Vf.get(t.target);e&&e(t)},Bf=t=>{t.forEach(jf)};function Nf(t,e,n){const r=function({root:t,...e}){const n=t||document;If.has(n)||If.set(n,{});const r=If.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Bf,{root:t,...e})),r[i]}(e);return Vf.set(t,n),r.observe(t),()=>{Vf.delete(t),r.unobserve(t)}}const Uf={some:0,all:1};const Gf={inView:{Feature:class extends oh{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:r="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Uf[r]};return Nf(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=e?n:r;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends oh{constructor(){super(...arguments),this.removeStartListeners=Hl,this.removeEndListeners=Hl,this.removeAccessibleListeners=Hl,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=hh(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||Lf(this.node.current,t.target)?n:r;o&&ql.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),i=hh(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Jc(r,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=dh(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=dh(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&Df("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&ql.postRender((()=>n(t,e)))}))})),Df("down",((t,e)=>{this.startPress(t,e)}))})),e=dh(this.node.current,"blur",(()=>{this.isPressing&&Df("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Jc(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&ql.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Eh()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&ql.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=hh(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=dh(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Jc(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends oh{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(Cy){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Jc(dh(this.node.current,"focus",(()=>this.onFocus())),dh(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends oh{mount(){this.unmount=Jc(Ff(this.node,!0),Ff(this.node,!1))}unmount(){}}}},Wf={layout:{ProjectionNode:Of,MeasureLayout:Sp}},Hf=oe({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),$f=oe({}),zf="undefined"!=typeof window,qf=zf?Ln:Fn,Kf=oe({strict:!1});let Yf=!1;function Qf(t,e,n,r,i){var o;const{visualElement:s}=Bn($f),a=Bn(Kf),l=Bn(hp),u=Bn(Hf).reducedMotion,c=Dn();r=r||a.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Bn(fp);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Zf(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Ph(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),qr((()=>{d&&d.update(n,l)}));const p=n[Wd],f=Dn(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return qf((()=>{d&&(d.updateFeatures(),wp.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Fn((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,Yf||(Yf=!0,queueMicrotask(Xf)))})),d}function Xf(){window.MotionHandoffIsComplete=!0}function Zf(t){if(t)return!1!==t.options.allowProjection?t.projection:Zf(t.parent)}function Jf(t,e,n){return jn((r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&("function"==typeof n?n(r):Ph(n)&&(n.current=r))}),[e])}function tm(t){return Sl(t.animate)||Ol.some((e=>Pl(t[e])))}function em(t){return Boolean(tm(t)||t.variants)}function nm(t){const{initial:e,animate:n}=function(t,e){if(tm(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Pl(e)?e:void 0,animate:Pl(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,Bn($f));return In((()=>({initial:e,animate:n})),[rm(e),rm(n)])}function rm(t){return Array.isArray(t)?t.join(" "):t}const im={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"]},om={};for(const SS in im)om[SS]={isEnabled:t=>im[SS].some((e=>!!t[e]))};const sm=Symbol.for("motionComponentSymbol");function am({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&function(t){for(const e in t)om[e]={...om[e],...t[e]}}(t);const o=er((function(t,o){let s;const a={...Bn(Hf),...t,layoutId:lm(t)},{isStatic:l}=a,u=nm(t),c=r(t,l);if(!l&&zf){Bn(Kf).strict;const t=function(t){const{drag:e,layout:n}=om;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=t.MeasureLayout,u.visualElement=Qf(i,c,a,e,t.ProjectionNode)}return no($f.Provider,{value:u,children:[s&&u.visualElement?no(s,{visualElement:u.visualElement,...a}):null,n(i,t,Jf(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[sm]=i,o}function lm({layoutId:t}){const e=Bn(pp).id;return e&&void 0!==t?e+"-"+t:t}const um=["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 cm(t){return"string"==typeof t&&!t.includes("-")&&!!(um.indexOf(t)>-1||/[A-Z]/u.test(t))}function dm(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const hm=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 pm(t,e,n,r){dm(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(hm.has(i)?i:Gd(i),e.attrs[i])}function fm(t,{layout:e,layoutId:n}){return Fl.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!_p[t]||"opacity"===t)}function mm(t,e,n){var r;const{style:i}=t,o={};for(const s in i)(qd(i[s])||e.style&&qd(e.style[s])||fm(s,t)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function vm(t,e,n){const r=mm(t,e,n);for(const i in t)if(qd(t[i])||qd(e[i])){r[-1!==Ml.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return r}function gm(t){const e=Dn(null);return null===e.current&&(e.current=t()),e.current}const ym=t=>(e,n)=>{const r=Bn($f),i=Bn(hp),o=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:bm(i,o,s,!a&&t,e),renderState:n()};return r&&(l.mount=t=>r(i,t,l)),l}(t,e,r,i,n);return n?o():gm(o)};function _m(t,e){const n=$d(e);n&&Vd(t,n)}function wm(t,e,n){const r=Array.isArray(e)?e:[e];for(let i=0;i<r.length;i++){const e=Al(t,r[i]);if(e){const{transitionEnd:t,transition:r,...i}=e;n(i,t)}}}function bm(t,e,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=i(t,{});for(const v in u)s[v]=Xp(u[v]);let{initial:c,animate:d}=t;const h=tm(t),p=em(t);e&&p&&!h&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===d&&(d=e.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!Sl(m)&&wm(t,m,((t,e)=>{for(const n in t){let e=t[n];if(Array.isArray(e)){e=e[f?e.length-1:0]}null!==e&&(s[n]=e)}for(const n in e)s[n]=e[n]})),l&&(d&&!1!==c&&!Sl(d)&&wm(t,d,(t=>{for(const e in t)_m(a,e)})),a.length&&(s.willChange=a.join(","))),s}const xm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Sm=()=>({...xm(),attrs:{}}),km=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Em={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pm=Ml.length;function Tm(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const t=e[l];if(Fl.has(l))s=!0;else if(eu(l))i[l]=t;else{const e=km(t,lc[l]);l.startsWith("origin")?(a=!0,o[l]=e):r[l]=e}}if(e.transform||(s||n?r.transform=function(t,e,n){let r="",i=!0;for(let o=0;o<Pm;o++){const s=Ml[o],a=t[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=km(a,lc[s]);l||(i=!1,r+=`${Em[s]||s}(${t}) `),n&&(e[s]=t)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;r.transformOrigin=`${t} ${e} ${n}`}}function Am(t,e,n){return"string"==typeof t?t:_u.transform(e+n*t)}const Cm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rm={offset:"strokeDashoffset",array:"strokeDasharray"};function Om(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Tm(t,u,d),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:f}=t;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Am(e,t.x,t.width)} ${Am(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Cm:Rm;t[o.offset]=_u.transform(-r);const s=_u.transform(e),a=_u.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Mm=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Fm={useVisualState:ym({scrapeMotionValuesFromProps:vm,createRenderState:Sm,onMount:(t,e,{renderState:n,latestValues:r})=>{ql.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(Cy){n.dimensions={x:0,y:0,width:0,height:0}}})),ql.render((()=>{Om(n,r,Mm(e.tagName),t.transformTemplate),pm(e,n)}))}})},Lm={useVisualState:ym({applyWillChange:!0,scrapeMotionValuesFromProps:mm,createRenderState:xm})};function Dm(t,e,n){for(const r in e)qd(e[r])||fm(r,n)||(t[r]=e[r])}function Vm(t,e){const n={};return Dm(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return In((()=>{const n=xm();return Tm(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Im(t,e){const n={},r=Vm(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const jm=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 Bm(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||jm.has(t)}let Nm=t=>!Bm(t);try{(Um=require("@emotion/is-prop-valid").default)&&(Nm=t=>t.startsWith("on")?!Bm(t):Um(t))}catch(xS){}var Um;function Gm(t,e,n,r){const i=In((()=>{const n=Sm();return Om(n,e,Mm(r),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Dm(e,t.style,t),i.style={...e,...i.style}}return i}function Wm(t=!1){return(e,n,r,{latestValues:i},o)=>{const s=(cm(e)?Gm:Im)(n,i,o,e),a=function(t,e,n){const r={};for(const i in t)"values"===i&&"object"==typeof t.values||(Nm(i)||!0===n&&Bm(i)||!e&&!Bm(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}(n,"string"==typeof e,t),l=e!==jt?{...a,...s,ref:r}:{},{children:u}=n;return Dt(e,{...l,children:In((()=>qd(u)?u.get():u),[u])})}}function Hm(t,e){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return am({...cm(n)?Fm:Lm,preloadedFeatures:t,useRender:Wm(r),createVisualElement:e,Component:n})}}const $m={current:null},zm={current:!1};const qm=new WeakMap,Km=[...Ou,$u,nc],Ym=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Qm=Ol.length;class Xm{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ju,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,ql.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=tm(e),this.isVariantNode=em(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const d in c){const t=c[d];void 0!==a[d]&&qd(t)&&t.set(a[d],!1)}}mount(t){this.current=t,qm.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),zm.current||function(){if(zm.current=!0,zf)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$m.current=t.matches;t.addListener(e),e()}else $m.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||$m.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){qm.delete(this.current),this.projection&&this.projection.unmount(),Kl(this.notifyUpdate),Kl(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Fl.has(t),r=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&ql.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{r(),i(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in om){const e=om[t];if(!e)continue;const{isEnabled:n,Feature:r}=e;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wh()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Ym.length;n++){const e=Ym[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const r=t["on"+e];r&&(this.propEventSubscriptions[e]=this.on(e,r))}this.prevMotionValues=function(t,e,n){for(const r in e){const i=e[r],o=n[r];if(qd(i))t.addValue(r,i);else if(qd(o))t.addValue(r,Nd(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,Nd(void 0!==e?e:i,{owner:t}))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let n=0;n<Qm;n++){const t=Ol[n],r=this.props[t];(Pl(r)||!1===r)&&(e[t]=r)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Nd(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let r=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=r&&("string"==typeof r&&(Jl(r)||Xl(r))?r=parseFloat(r):(i=r,!Km.find(Ru(i))&&nc.test(e)&&(r=dc(t,e))),this.setBaseTarget(t,qd(r)?r.get():r)),qd(r)?r.get():r}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Al(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(r=i[t])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||qd(i)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new jd),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Zm extends Xm{constructor(){super(...arguments),this.KeyframeResolver=pc}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class Jm extends Zm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=dm}readValueFromInstance(t,e){if(Fl.has(e)){const t=cc(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),i=(eu(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return sp(t,e)}build(t,e,n){Tm(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return mm(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qd(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class tv extends Zm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wh}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Fl.has(e)){const t=cc(e);return t&&t.default||0}return e=hm.has(e)?e:Gd(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return vm(t,e,n)}build(t,e,n){Om(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,r){pm(t,e,0,r)}mount(t){this.isSVGTag=Mm(t.tagName),super.mount(t)}}const ev=xl(Hm({...ah,...Gf,...Mf,...Wf},((t,e)=>cm(t)?new tv(e):new Jm(e,{allowProjection:t!==jt}))));class nv extends Bt{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function rv({children:t,isPresent:e}){const n=Un(),r=Dn(null),i=Dn({width:0,height:0,top:0,left:0}),{nonce:o}=Bn(Hf);return qr((()=>{const{width:t,height:s,top:a,left:l}=i.current;if(e||!r.current||!t||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[e]),no(nv,{isPresent:e,childRef:r,sizeRef:i,children:jr(t,{ref:r})})}const iv=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=gm(ov),l=Un(),u=In((()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:t=>{a.set(t,!0);for(const e of a.values())if(!e)return;r&&r()},register:t=>(a.set(t,!1),()=>a.delete(t))})),o?[Math.random()]:[n]);return In((()=>{a.forEach(((t,e)=>a.set(e,!1)))}),[n]),Fn((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(t=no(rv,{isPresent:n,children:t})),no(hp.Provider,{value:u,children:t})};function ov(){return new Map}const sv=t=>t.key||"";function av(t){const e=[];return rr.forEach(t,(t=>{Dr(t)&&e.push(t)})),e}const lv=({children:t,exitBeforeEnter:e,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=In((()=>av(t)),[t]),l=a.map(sv),u=Dn(!0),c=Dn(a),d=gm((()=>new Map)),[h,p]=On(a),[f,m]=On(a);qf((()=>{u.current=!1,c.current=a;for(let t=0;t<f.length;t++){const e=sv(f[t]);l.includes(e)?d.delete(e):!0!==d.get(e)&&d.set(e,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let t=[...a];for(let e=0;e<f.length;e++){const n=f[e],r=sv(n);l.includes(r)||(t.splice(e,0,n),v.push(n))}return"wait"===s&&v.length&&(t=v),m(av(t)),void p(a)}const{forceRender:g}=Bn(pp);return no(jt,{children:f.map((t=>{const e=sv(t),h=a===f||l.includes(e);return no(iv,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(e))return;d.set(e,!0);let t=!0;d.forEach((e=>{e||(t=!1)})),t&&(null==g||g(),m(c.current),i&&i())},children:t},e)}))})};var uv=t=>"checkbox"===t.type,cv=t=>t instanceof Date,dv=t=>null==t;const hv=t=>"object"==typeof t;var pv=t=>!dv(t)&&!Array.isArray(t)&&hv(t)&&!cv(t),fv=t=>pv(t)&&t.target?uv(t.target)?t.target.checked:t.target.value:t,mv=(t,e)=>t.has((t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t)(e)),vv=t=>{const e=t.constructor&&t.constructor.prototype;return pv(e)&&e.hasOwnProperty("isPrototypeOf")},gv="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function yv(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else{if(gv&&(t instanceof Blob||t instanceof FileList)||!n&&!pv(t))return t;if(e=n?[]:{},n||vv(t))for(const n in t)t.hasOwnProperty(n)&&(e[n]=yv(t[n]));else e=t}return e}var _v=t=>Array.isArray(t)?t.filter(Boolean):[],wv=t=>void 0===t,bv=(t,e,n)=>{if(!e||!pv(t))return n;const r=_v(e.split(/[,[\].]+?/)).reduce(((t,e)=>dv(t)?t:t[e]),t);return wv(r)||r===t?wv(t[e])?n:t[e]:r},xv=t=>"boolean"==typeof t,Sv=t=>/^\w*$/.test(t),kv=t=>_v(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Ev=(t,e,n)=>{let r=-1;const i=Sv(e)?[e]:kv(e),o=i.length,s=o-1;for(;++r<o;){const e=i[r];let o=n;if(r!==s){const n=t[e];o=pv(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===e)return;t[e]=o,t=t[e]}return t};const Pv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Tv={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Av="max",Cv="min",Rv="maxLength",Ov="minLength",Mv="pattern",Fv="required",Lv="validate",Dv=Xr.createContext(null),Vv=()=>Xr.useContext(Dv);var Iv=(t,e,n,r=!0)=>{const i={defaultValues:e._defaultValues};for(const o in t)Object.defineProperty(i,o,{get:()=>{const i=o;return e._proxyFormState[i]!==Tv.all&&(e._proxyFormState[i]=!r||Tv.all),n&&(n[i]=!0),t[i]}});return i},jv=t=>pv(t)&&!Object.keys(t).length,Bv=(t,e,n,r)=>{n(t);const{name:i,...o}=t;return jv(o)||Object.keys(o).length>=Object.keys(e).length||Object.keys(o).find((t=>e[t]===(!r||Tv.all)))},Nv=t=>Array.isArray(t)?t:[t],Uv=(t,e,n)=>!t||!e||t===e||Nv(t).some((t=>t&&(n?t===e:t.startsWith(e)||e.startsWith(t))));function Gv(t){const e=Xr.useRef(t);e.current=t,Xr.useEffect((()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}}),[t.disabled])}var Wv=t=>"string"==typeof t,Hv=(t,e,n,r,i)=>Wv(t)?(r&&e.watch.add(t),bv(n,t,i)):Array.isArray(t)?t.map((t=>(r&&e.watch.add(t),bv(n,t)))):(r&&(e.watchAll=!0),n);function $v(t){const e=Vv(),{name:n,disabled:r,control:i=e.control,shouldUnregister:o}=t,s=mv(i._names.array,n),a=function(t){const e=Vv(),{control:n=e.control,name:r,defaultValue:i,disabled:o,exact:s}=t||{},a=Xr.useRef(r);a.current=r,Gv({disabled:o,subject:n._subjects.values,next:t=>{Uv(a.current,t.name,s)&&u(yv(Hv(a.current,n._names,t.values||n._formValues,!1,i)))}});const[l,u]=Xr.useState(n._getWatch(r,i));return Xr.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:bv(i._formValues,n,bv(i._defaultValues,n,t.defaultValue)),exact:!0}),l=function(t){const e=Vv(),{control:n=e.control,disabled:r,name:i,exact:o}=t||{},[s,a]=Xr.useState(n._formState),l=Xr.useRef(!0),u=Xr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Xr.useRef(i);return c.current=i,Gv({disabled:r,next:t=>l.current&&Uv(c.current,t.name,o)&&Bv(t,u.current,n._updateFormState)&&a({...n._formState,...t}),subject:n._subjects.state}),Xr.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),Iv(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Xr.useRef(i.register(n,{...t.rules,value:a,...xv(t.disabled)?{disabled:t.disabled}:{}}));return Xr.useEffect((()=>{const t=i._options.shouldUnregister||o,e=(t,e)=>{const n=bv(i._fields,t);n&&n._f&&(n._f.mount=e)};if(e(n,!0),t){const t=yv(bv(i._options.defaultValues,n));Ev(i._defaultValues,n,t),wv(bv(i._formValues,n))&&Ev(i._formValues,n,t)}return()=>{(s?t&&!i._state.action:t)?i.unregister(n):e(n,!1)}}),[n,i,s,o]),Xr.useEffect((()=>{bv(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:bv(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...xv(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Xr.useCallback((t=>u.current.onChange({target:{value:fv(t),name:n},type:Pv.CHANGE})),[n]),onBlur:Xr.useCallback((()=>u.current.onBlur({target:{value:bv(i._formValues,n),name:n},type:Pv.BLUR})),[n,i]),ref:Xr.useCallback((t=>{const e=bv(i._fields,n);e&&t&&(e._f.ref={focus:()=>t.focus(),select:()=>t.select(),setCustomValidity:e=>t.setCustomValidity(e),reportValidity:()=>t.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!bv(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!bv(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!bv(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!bv(l.validatingFields,n)},error:{enumerable:!0,get:()=>bv(l.errors,n)}})}}const zv=t=>t.render($v(t));var qv=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},Kv=t=>({isOnSubmit:!t||t===Tv.onSubmit,isOnBlur:t===Tv.onBlur,isOnChange:t===Tv.onChange,isOnAll:t===Tv.all,isOnTouch:t===Tv.onTouched}),Yv=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some((e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length)))));const Qv=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const n=bv(t,i);if(n){const{_f:t,...o}=n;if(t){if(t.refs&&t.refs[0]&&e(t.refs[0],i)&&!r)return!0;if(t.ref&&e(t.ref,t.name)&&!r)return!0;if(Qv(o,e))break}else if(pv(o)&&Qv(o,e))break}}};var Xv=(t,e,n)=>{const r=Nv(bv(t,n));return Ev(r,"root",e[n]),Ev(t,n,r),t},Zv=t=>"file"===t.type,Jv=t=>"function"==typeof t,tg=t=>{if(!gv)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},eg=t=>Wv(t),ng=t=>"radio"===t.type,rg=t=>t instanceof RegExp;const ig={value:!1,isValid:!1},og={value:!0,isValid:!0};var sg=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter((t=>t&&t.checked&&!t.disabled)).map((t=>t.value));return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!wv(t[0].attributes.value)?wv(t[0].value)||""===t[0].value?og:{value:t[0].value,isValid:!0}:og:ig}return ig};const ag={isValid:!1,value:null};var lg=t=>Array.isArray(t)?t.reduce(((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t),ag):ag;function ug(t,e,n="validate"){if(eg(t)||Array.isArray(t)&&t.every(eg)||xv(t)&&!t)return{type:n,message:eg(t)?t:"",ref:e}}var cg=t=>pv(t)&&!rg(t)?t:{value:t,message:""},dg=async(t,e,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=t._f,y=bv(e,f);if(!v||g)return{};const _=s?s[0]:o,w=t=>{r&&_.reportValidity&&(_.setCustomValidity(xv(t)?"":t||""),_.reportValidity())},b={},x=ng(o),S=uv(o),k=x||S,E=(m||Zv(o))&&wv(o.value)&&wv(y)||tg(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,P=qv.bind(null,f,n,b),T=(t,e,n,r=Rv,i=Ov)=>{const s=t?e:n;b[f]={type:t?r:i,message:s,ref:o,...P(t?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!k&&(E||dv(y))||xv(y)&&!y||S&&!sg(s).isValid||x&&!lg(s).isValid)){const{value:t,message:e}=eg(a)?{value:!!a,message:a}:cg(a);if(t&&(b[f]={type:Fv,message:e,ref:_,...P(Fv,e)},!n))return w(e),b}if(!(E||dv(c)&&dv(d))){let t,e;const r=cg(d),i=cg(c);if(dv(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=t=>new Date((new Date).toDateString()+" "+t),a="time"==o.type,l="week"==o.type;Wv(r.value)&&y&&(t=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Wv(i.value)&&y&&(e=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);dv(r.value)||(t=n>r.value),dv(i.value)||(e=n<i.value)}if((t||e)&&(T(!!t,r.message,i.message,Av,Cv),!n))return w(b[f].message),b}if((l||u)&&!E&&(Wv(y)||i&&Array.isArray(y))){const t=cg(l),e=cg(u),r=!dv(t.value)&&y.length>+t.value,i=!dv(e.value)&&y.length<+e.value;if((r||i)&&(T(r,t.message,e.message),!n))return w(b[f].message),b}if(h&&!E&&Wv(y)){const{value:t,message:e}=cg(h);if(rg(t)&&!y.match(t)&&(b[f]={type:Mv,message:e,ref:o,...P(Mv,e)},!n))return w(e),b}if(p)if(Jv(p)){const t=ug(await p(y,e),_);if(t&&(b[f]={...t,...P(Lv,t.message)},!n))return w(t.message),b}else if(pv(p)){let t={};for(const r in p){if(!jv(t)&&!n)break;const i=ug(await p[r](y,e),_,r);i&&(t={...i,...P(r,i.message)},w(i.message),n&&(b[f]=t))}if(!jv(t)&&(b[f]={ref:_,...t},!n))return b}return w(!0),b};function hg(t,e){const n=Array.isArray(e)?e:Sv(e)?[e]:kv(e),r=1===n.length?t:function(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=wv(t)?r++:t[e[r++]];return t}(t,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(pv(r)&&jv(r)||Array.isArray(r)&&function(t){for(const e in t)if(t.hasOwnProperty(e)&&!wv(t[e]))return!1;return!0}(r))&&hg(t,n.slice(0,-1)),t}var pg=()=>{let t=[];return{get observers(){return t},next:e=>{for(const n of t)n.next&&n.next(e)},subscribe:e=>(t.push(e),{unsubscribe:()=>{t=t.filter((t=>t!==e))}}),unsubscribe:()=>{t=[]}}},fg=t=>dv(t)||!hv(t);function mg(t,e){if(fg(t)||fg(e))return t===e;if(cv(t)&&cv(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n){const n=t[i];if(!r.includes(i))return!1;if("ref"!==i){const t=e[i];if(cv(n)&&cv(t)||pv(n)&&pv(t)||Array.isArray(n)&&Array.isArray(t)?!mg(n,t):n!==t)return!1}}return!0}var vg=t=>"select-multiple"===t.type,gg=t=>ng(t)||uv(t),yg=t=>tg(t)&&t.isConnected,_g=t=>{for(const e in t)if(Jv(t[e]))return!0;return!1};function wg(t,e={}){const n=Array.isArray(t);if(pv(t)||n)for(const r in t)Array.isArray(t[r])||pv(t[r])&&!_g(t[r])?(e[r]=Array.isArray(t[r])?[]:{},wg(t[r],e[r])):dv(t[r])||(e[r]=!0);return e}function bg(t,e,n){const r=Array.isArray(t);if(pv(t)||r)for(const i in t)Array.isArray(t[i])||pv(t[i])&&!_g(t[i])?wv(e)||fg(n[i])?n[i]=Array.isArray(t[i])?wg(t[i],[]):{...wg(t[i])}:bg(t[i],dv(e)?{}:e[i],n[i]):n[i]=!mg(t[i],e[i]);return n}var xg=(t,e)=>bg(t,e,wg(e)),Sg=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>wv(t)?t:e?""===t?NaN:t?+t:t:n&&Wv(t)?new Date(t):r?r(t):t;function kg(t){const e=t.ref;if(!(t.refs?t.refs.every((t=>t.disabled)):e.disabled))return Zv(e)?e.files:ng(e)?lg(t.refs).value:vg(e)?[...e.selectedOptions].map((({value:t})=>t)):uv(e)?sg(t.refs).value:Sg(wv(e.value)?t.ref.value:e.value,t)}var Eg=(t,e,n,r)=>{const i={};for(const o of t){const t=bv(e,o);t&&Ev(i,o,t._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},Pg=t=>wv(t)?t:rg(t)?t.source:pv(t)?rg(t.value)?t.value.source:t.value:t;const Tg="AsyncFunction";var Ag=t=>!(t&&t.validate||!(Jv(t.validate)&&t.validate.constructor.name===Tg||pv(t.validate)&&Object.values(t.validate).find((t=>t.constructor.name===Tg)))),Cg=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function Rg(t,e,n){const r=bv(t,n);if(r||Sv(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=bv(e,r),s=bv(t,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var Og=(t,e,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:!(n?r.isOnChange:i.isOnChange)||t),Mg=(t,e)=>!_v(bv(t,e)).length&&hg(t,e);const Fg={mode:Tv.onSubmit,reValidateMode:Tv.onChange,shouldFocusError:!0};function Lg(t={}){let e,n={...Fg,...t},r={submitCount:0,isDirty:!1,isLoading:Jv(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(pv(n.defaultValues)||pv(n.values))&&yv(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:yv(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:pg(),array:pg(),state:pg()},h=Kv(n.mode),p=Kv(n.reValidateMode),f=n.criteriaMode===Tv.all,m=async t=>{if(c.isValid||t){const t=n.resolver?jv((await w()).errors):await b(i,!0);t!==r.isValid&&d.state.next({isValid:t})}},v=(t,e)=>{(c.isValidating||c.validatingFields)&&((t||Array.from(l.mount)).forEach((t=>{t&&(e?Ev(r.validatingFields,t,e):hg(r.validatingFields,t))})),d.state.next({validatingFields:r.validatingFields,isValidating:!jv(r.validatingFields)}))},g=(t,e,n,r)=>{const l=bv(i,t);if(l){const i=bv(s,t,wv(n)?bv(o,t):n);wv(i)||r&&r.defaultChecked||e?Ev(s,t,e?i:kg(l._f)):k(t,i),a.mount&&m()}},y=(t,e,n,s,a)=>{let l=!1,u=!1;const h={name:t},p=!!(bv(i,t)&&bv(i,t)._f&&bv(i,t)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=x(),l=u!==h.isDirty);const n=p||mg(bv(o,t),e);u=!(p||!bv(r.dirtyFields,t)),n||p?hg(r.dirtyFields,t):Ev(r.dirtyFields,t,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const e=bv(r.touchedFields,t);e||(Ev(r.touchedFields,t,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&e!==n)}return l&&a&&d.state.next(h),l?h:{}},_=(n,i,o,s)=>{const a=bv(r.errors,n),l=c.isValid&&xv(i)&&r.isValid!==i;var h;if(t.delayError&&o?(h=()=>((t,e)=>{Ev(r.errors,t,e),d.state.next({errors:r.errors})})(n,o),e=t=>{clearTimeout(u),u=setTimeout(h,t)},e(t.delayError)):(clearTimeout(u),e=null,o?Ev(r.errors,n,o):hg(r.errors,n)),(o?!mg(a,o):a)||!jv(s)||l){const t={...s,...l&&xv(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...t},d.state.next(t)}},w=async t=>{v(t,!0);const e=await n.resolver(s,n.context,Eg(t||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(t),e},b=async(t,e,i={valid:!0})=>{for(const o in t){const a=t[o];if(a){const{_f:t,...u}=a;if(t){const u=l.array.has(t.name),d=a._f&&Ag(a._f);d&&c.validatingFields&&v([o],!0);const h=await dg(a,s,f,n.shouldUseNativeValidation&&!e,u);if(d&&c.validatingFields&&v([o]),h[t.name]&&(i.valid=!1,e))break;!e&&(bv(h,t.name)?u?Xv(r.errors,h,t.name):Ev(r.errors,t.name,h[t.name]):hg(r.errors,t.name))}!jv(u)&&await b(u,e,i)}}return i.valid},x=(t,e)=>(t&&e&&Ev(s,t,e),!mg(R(),o)),S=(t,e,n)=>Hv(t,l,{...a.mount?s:wv(e)?o:Wv(t)?{[t]:e}:e},n,e),k=(t,e,n={})=>{const r=bv(i,t);let o=e;if(r){const n=r._f;n&&(!n.disabled&&Ev(s,t,Sg(e,n)),o=tg(n.ref)&&dv(e)?"":e,vg(n.ref)?[...n.ref.options].forEach((t=>t.selected=o.includes(t.value))):n.refs?uv(n.ref)?n.refs.length>1?n.refs.forEach((t=>(!t.defaultChecked||!t.disabled)&&(t.checked=Array.isArray(o)?!!o.find((e=>e===t.value)):o===t.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((t=>t.checked=t.value===o)):Zv(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:t,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(t,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&C(t)},E=(t,e,n)=>{for(const r in e){const o=e[r],s=`${t}.${r}`,a=bv(i,s);!l.array.has(t)&&fg(o)&&(!a||a._f)||cv(o)?k(s,o,n):E(s,o,n)}},P=(t,e,n={})=>{const u=bv(i,t),h=l.array.has(t),p=yv(e);Ev(s,t,p),h?(d.array.next({name:t,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:t,dirtyFields:xg(o,s),isDirty:x(t,p)})):!u||u._f||dv(p)?k(t,p,n):E(t,p,n),Yv(t,l)&&d.state.next({...r}),d.values.next({name:a.mount?t:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,x=!0;const S=bv(i,g),k=t=>{x=Number.isNaN(t)||mg(t,bv(s,g,t))};if(S){let a,E;const P=u.type?kg(S._f):fv(o),T=o.type===Pv.BLUR||o.type===Pv.FOCUS_OUT,A=!Cg(S._f)&&!n.resolver&&!bv(r.errors,g)&&!S._f.deps||Og(T,bv(r.touchedFields,g),r.isSubmitted,p,h),R=Yv(g,l,T);Ev(s,g,P),T?(S._f.onBlur&&S._f.onBlur(o),e&&e(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,P,T,!1),M=!jv(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),A)return c.isValid&&("onBlur"===t.mode?T&&m():m()),M&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:t}=await w([g]);if(k(P),x){const e=Rg(r.errors,i,g),n=Rg(t,i,e.name||g);a=n.error,g=n.name,E=jv(t)}}else v([g],!0),a=(await dg(S,s,f,n.shouldUseNativeValidation))[g],v([g]),k(P),x&&(a?E=!1:c.isValid&&(E=await b(i,!0)));x&&(S._f.deps&&C(S._f.deps),_(g,E,a,O))}},A=(t,e)=>{if(bv(r.errors,e)&&t.focus)return t.focus(),1},C=async(t,e={})=>{let o,s;const a=Nv(t);if(n.resolver){const e=await(async t=>{const{errors:e}=await w(t);if(t)for(const n of t){const t=bv(e,n);t?Ev(r.errors,n,t):hg(r.errors,n)}else r.errors=e;return e})(wv(t)?t:a);o=jv(e),s=t?!a.some((t=>bv(e,t))):o}else t?(s=(await Promise.all(a.map((async t=>{const e=bv(i,t);return await b(e&&e._f?{[t]:e}:e)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await b(i);return d.state.next({...!Wv(t)||c.isValid&&o!==r.isValid?{}:{name:t},...n.resolver||!t?{isValid:o}:{},errors:r.errors}),e.shouldFocus&&!s&&Qv(i,A,t?a:l.mount),s},R=t=>{const e={...a.mount?s:o};return wv(t)?e:Wv(t)?bv(e,t):t.map((t=>bv(e,t)))},O=(t,e)=>({invalid:!!bv((e||r).errors,t),isDirty:!!bv((e||r).dirtyFields,t),error:bv((e||r).errors,t),isValidating:!!bv(r.validatingFields,t),isTouched:!!bv((e||r).touchedFields,t)}),M=(t,e,n)=>{const o=(bv(i,t,{_f:{}})._f||{}).ref,s=bv(r.errors,t)||{},{ref:a,message:l,type:u,...c}=s;Ev(r.errors,t,{...c,...e,ref:o}),d.state.next({name:t,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},F=(t,e={})=>{for(const a of t?Nv(t):l.mount)l.mount.delete(a),l.array.delete(a),e.keepValue||(hg(i,a),hg(s,a)),!e.keepError&&hg(r.errors,a),!e.keepDirty&&hg(r.dirtyFields,a),!e.keepTouched&&hg(r.touchedFields,a),!e.keepIsValidating&&hg(r.validatingFields,a),!n.shouldUnregister&&!e.keepDefaultValue&&hg(o,a);d.values.next({values:{...s}}),d.state.next({...r,...e.keepDirty?{isDirty:x()}:{}}),!e.keepIsValid&&m()},L=({disabled:t,name:e,field:n,fields:r,value:i})=>{if(xv(t)&&a.mount||t){const o=t?void 0:wv(i)?kg(n?n._f:bv(r,e)._f):i;Ev(s,e,o),y(e,o,!1,!1,!0)}},D=(e,r={})=>{let s=bv(i,e);const u=xv(r.disabled)||xv(t.disabled);return Ev(i,e,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...r}}),l.mount.add(e),s?L({field:s,disabled:xv(r.disabled)?r.disabled:t.disabled,name:e,value:r.value}):g(e,!0,r.value),{...u?{disabled:r.disabled||t.disabled}:{},...n.progressive?{required:!!r.required,min:Pg(r.min),max:Pg(r.max),minLength:Pg(r.minLength),maxLength:Pg(r.maxLength),pattern:Pg(r.pattern)}:{},name:e,onChange:T,onBlur:T,ref:t=>{if(t){D(e,r),s=bv(i,e);const n=wv(t.value)&&t.querySelectorAll&&t.querySelectorAll("input,select,textarea")[0]||t,a=gg(n),l=s._f.refs||[];if(a?l.find((t=>t===n)):n===s._f.ref)return;Ev(i,e,{_f:{...s._f,...a?{refs:[...l.filter(yg),n,...Array.isArray(bv(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else s=bv(i,e,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!mv(l.array,e)||!a.action)&&l.unMount.add(e)}}},V=()=>n.shouldFocusError&&Qv(i,A,l.mount),I=(t,e)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=yv(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:t,values:e}=await w();r.errors=t,l=e}else await b(i);if(hg(r.errors,"root"),jv(r.errors)){d.state.next({errors:{}});try{await t(l,o)}catch(u){a=u}}else e&&await e({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:jv(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,n={})=>{const u=e?yv(e):o,h=yv(u),p=jv(e),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const t of l.mount)bv(r.dirtyFields,t)?Ev(f,t,bv(s,t)):P(t,bv(f,t));else{if(gv&&wv(e))for(const t of l.mount){const e=bv(i,t);if(e&&e._f){const t=Array.isArray(e._f.refs)?e._f.refs[0]:e._f.ref;if(tg(t)){const e=t.closest("form");if(e){e.reset();break}}}}i={}}s=t.shouldUnregister?n.keepDefaultValues?yv(o):{}:yv(f),d.array.next({values:{...f}}),d.values.next({values:{...f}})}l={mount:n.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||mg(e,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?xg(o,s):r.dirtyFields:n.keepDefaultValues&&e?xg(o,e):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(t,e)=>j(Jv(t)?t(s):t,e);return{control:{register:D,unregister:F,getFieldState:O,handleSubmit:I,setError:M,_executeSchema:w,_getWatch:S,_getDirty:x,_updateValid:m,_removeUnmounted:()=>{for(const t of l.unMount){const e=bv(i,t);e&&(e._f.refs?e._f.refs.every((t=>!yg(t))):!yg(e._f.ref))&&F(t)}l.unMount=new Set},_updateFieldArray:(t,e=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(bv(i,t))){const e=n(bv(i,t),l.argA,l.argB);u&&Ev(i,t,e)}if(h&&Array.isArray(bv(r.errors,t))){const e=n(bv(r.errors,t),l.argA,l.argB);u&&Ev(r.errors,t,e),Mg(r.errors,t)}if(c.touchedFields&&h&&Array.isArray(bv(r.touchedFields,t))){const e=n(bv(r.touchedFields,t),l.argA,l.argB);u&&Ev(r.touchedFields,t,e)}c.dirtyFields&&(r.dirtyFields=xg(o,s)),d.state.next({name:t,isDirty:x(t,e),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ev(s,t,e)},_updateDisabledField:L,_getFieldArray:e=>_v(bv(a.mount?s:o,e,t.shouldUnregister?bv(o,e,[]):[])),_reset:j,_resetDefaultValues:()=>Jv(n.defaultValues)&&n.defaultValues().then((t=>{B(t,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:t=>{r={...r,...t}},_disableForm:t=>{xv(t)&&(d.state.next({disabled:t}),Qv(i,((e,n)=>{const r=bv(i,n);r&&(e.disabled=r._f.disabled||t,Array.isArray(r._f.refs)&&r._f.refs.forEach((e=>{e.disabled=r._f.disabled||t})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:t=>{r.errors=t,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(t){a=t},get _defaultValues(){return o},get _names(){return l},set _names(t){l=t},get _formState(){return r},set _formState(t){r=t},get _options(){return n},set _options(t){n={...n,...t}}},trigger:C,register:D,handleSubmit:I,watch:(t,e)=>Jv(t)?d.values.subscribe({next:n=>t(S(void 0,e),n)}):S(t,e,!0),setValue:P,getValues:R,reset:B,resetField:(t,e={})=>{bv(i,t)&&(wv(e.defaultValue)?P(t,yv(bv(o,t))):(P(t,e.defaultValue),Ev(o,t,yv(e.defaultValue))),e.keepTouched||hg(r.touchedFields,t),e.keepDirty||(hg(r.dirtyFields,t),r.isDirty=e.defaultValue?x(t,yv(bv(o,t))):x()),e.keepError||(hg(r.errors,t),c.isValid&&m()),d.state.next({...r}))},clearErrors:t=>{t&&Nv(t).forEach((t=>hg(r.errors,t))),d.state.next({errors:t?r.errors:{}})},unregister:F,setError:M,setFocus:(t,e={})=>{const n=bv(i,t),r=n&&n._f;if(r){const t=r.refs?r.refs[0]:r.ref;t.focus&&(t.focus(),e.shouldSelect&&t.select())}},getFieldState:O}}const Dg="undefined"!=typeof document?Xr.useLayoutEffect:()=>{};const Vg=t=>{var e;return null!==(e=null==t?void 0:t.ownerDocument)&&void 0!==e?e:document},Ig=t=>{if(t&&"window"in t&&t.window===t)return t;return Vg(t).defaultView||window};function jg(t){let e=null;return()=>(null==e&&(e=t()),e)}const Bg=jg((function(){return t=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&t.test((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.platform)||window.navigator.platform);var t,e})),Ng=jg((function(){return t=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.brands.some((e=>t.test(e.brand))))||t.test(window.navigator.userAgent));var t,e}));class Ug{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,e){this.nativeEvent=e,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.bubbles=e.bubbles,this.cancelable=e.cancelable,this.defaultPrevented=e.defaultPrevented,this.eventPhase=e.eventPhase,this.isTrusted=e.isTrusted,this.timeStamp=e.timeStamp,this.type=t}}function Gg(t){let e=Dn({isFocused:!1,observer:null});Dg((()=>{const t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}}),[]);let n=function(t){const e=Dn(null);return Dg((()=>{e.current=t}),[t]),jn(((...t)=>{const n=e.current;return null==n?void 0:n(...t)}),[])}((e=>{null==t||t(e)}));return jn((t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){e.current.isFocused=!0;let r=t.target,i=t=>{e.current.isFocused=!1,r.disabled&&n(new Ug("blur",t)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver((()=>{if(e.current.isFocused&&r.disabled){var t;null===(t=e.current.observer)||void 0===t||t.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),e.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let Wg=null,Hg=new Set,$g=new Map,zg=!1,qg=!1;const Kg={Tab:!0,Escape:!0};function Yg(t,e){for(let n of Hg)n(t,e)}function Qg(t){zg=!0,function(t){return!(t.metaKey||!Bg()&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key)}(t)&&(Wg="keyboard",Yg("keyboard",t))}function Xg(t){Wg="pointer","mousedown"!==t.type&&"pointerdown"!==t.type||(zg=!0,Yg("pointer",t))}function Zg(t){var e;(0===(e=t).mozInputSource&&e.isTrusted||(Ng()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(zg=!0,Wg="virtual")}function Jg(t){t.target!==window&&t.target!==document&&(zg||qg||(Wg="virtual",Yg("virtual",t)),zg=!1,qg=!1)}function ty(){zg=!1,qg=!0}function ey(t){if("undefined"==typeof window||$g.get(Ig(t)))return;const e=Ig(t),n=Vg(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){zg=!0,r.apply(this,arguments)},n.addEventListener("keydown",Qg,!0),n.addEventListener("keyup",Qg,!0),n.addEventListener("click",Zg,!0),e.addEventListener("focus",Jg,!0),e.addEventListener("blur",ty,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Xg,!0),n.addEventListener("pointermove",Xg,!0),n.addEventListener("pointerup",Xg,!0)):(n.addEventListener("mousedown",Xg,!0),n.addEventListener("mousemove",Xg,!0),n.addEventListener("mouseup",Xg,!0)),e.addEventListener("beforeunload",(()=>{ny(t)}),{once:!0}),$g.set(e,{focus:r})}const ny=(t,e)=>{const n=Ig(t),r=Vg(t);e&&r.removeEventListener("DOMContentLoaded",e),$g.has(n)&&(n.HTMLElement.prototype.focus=$g.get(n).focus,r.removeEventListener("keydown",Qg,!0),r.removeEventListener("keyup",Qg,!0),r.removeEventListener("click",Zg,!0),n.removeEventListener("focus",Jg,!0),n.removeEventListener("blur",ty,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Xg,!0),r.removeEventListener("pointermove",Xg,!0),r.removeEventListener("pointerup",Xg,!0)):(r.removeEventListener("mousedown",Xg,!0),r.removeEventListener("mousemove",Xg,!0),r.removeEventListener("mouseup",Xg,!0)),$g.delete(n))};function ry(){return"pointer"!==Wg}"undefined"!=typeof document&&function(t){const e=Vg(t);let n;"loading"!==e.readyState?ey(t):(n=()=>{ey(t)},e.addEventListener("DOMContentLoaded",n))}();const iy=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function oy(t,e,n){ey(),Fn((()=>{let e=(e,r)=>{(function(t,e,n){var r;const i="undefined"!=typeof window?Ig(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Ig(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Ig(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Ig(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((t=t||(null==n?void 0:n.target)instanceof i&&!iy.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof o||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===e&&n instanceof a&&!Kg[n.key])})(!!(null==n?void 0:n.isTextInput),e,r)&&t(ry())};return Hg.add(e),()=>{Hg.delete(e)}}),e)}let sy=!1,ay=0;function ly(){sy=!0,setTimeout((()=>{sy=!1}),50)}function uy(t){"touch"===t.pointerType&&ly()}function cy(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",uy):document.addEventListener("touchend",ly),ay++,()=>{ay--,ay>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",uy):document.removeEventListener("touchend",ly))}}function dy(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,s]=On(!1),a=Dn({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Fn(cy,[]);let{hoverProps:l,triggerHoverEnd:u}=In((()=>{let t=(t,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!t.currentTarget.contains(t.target))return;a.isHovered=!0;let o=t.currentTarget;a.target=o,e&&e({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(t,e)=>{if(a.pointerType="",a.target=null,"touch"===e||!a.isHovered)return;a.isHovered=!1;let i=t.currentTarget;r&&r({type:"hoverend",target:i,pointerType:e}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=e=>{sy&&"mouse"===e.pointerType||t(e,e.pointerType)},l.onPointerLeave=t=>{!i&&t.currentTarget.contains(t.target)&&o(t,t.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=e=>{a.ignoreEmulatedMouseEvents||sy||t(e,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=t=>{!i&&t.currentTarget.contains(t.target)&&o(t,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[e,n,r,i,a]);return Fn((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function hy(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=Dn({isFocused:!1,isFocusVisible:e||ry()}),[o,s]=On(!1),[a,l]=On((()=>i.current.isFocused&&i.current.isFocusVisible)),u=jn((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=jn((t=>{i.current.isFocused=t,s(t),u()}),[u]);oy((t=>{i.current.isFocusVisible=t,u()}),[],{isTextInput:n});let{focusProps:d}=function(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=jn((t=>{if(t.target===t.currentTarget)return r&&r(t),i&&i(!1),!0}),[r,i]),s=Gg(o),a=jn((t=>{const e=Vg(t.target);t.target===t.currentTarget&&e.activeElement===t.target&&(n&&n(t),i&&i(!0),s(t))}),[i,n,s]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:e||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=Dn({isFocusWithin:!1}),s=jn((t=>{o.current.isFocusWithin&&!t.currentTarget.contains(t.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(t),i&&i(!1))}),[n,i,o]),a=Gg(s),l=jn((t=>{o.current.isFocusWithin||document.activeElement!==t.target||(r&&r(t),i&&i(!0),o.current.isFocusWithin=!0,a(t))}),[r,i,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?h:d}}var py=Object.defineProperty,fy=(t,e,n)=>(((t,e,n)=>{e in t?py(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);let my=new class{constructor(){fy(this,"current",this.detect()),fy(this,"handoffState","pending"),fy(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function vy(t){return my.isServer?null:t instanceof Node?t.ownerDocument:null!=t&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function gy(t){"function"==typeof queueMicrotask?queueMicrotask(t):Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))}function yy(){let t=[],e={addEventListener:(t,n,r,i)=>(t.addEventListener(n,r,i),e.add((()=>t.removeEventListener(n,r,i)))),requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add((()=>cancelAnimationFrame(n)))},nextFrame:(...t)=>e.requestAnimationFrame((()=>e.requestAnimationFrame(...t))),setTimeout(...t){let n=setTimeout(...t);return e.add((()=>clearTimeout(n)))},microTask(...t){let n={current:!0};return gy((()=>{n.current&&t[0]()})),e.add((()=>{n.current=!1}))},style(t,e,n){let r=t.style.getPropertyValue(e);return Object.assign(t.style,{[e]:n}),this.add((()=>{Object.assign(t.style,{[e]:r})}))},group(t){let e=yy();return t(e),this.add((()=>e.dispose()))},add:e=>(t.includes(e)||t.push(e),()=>{let n=t.indexOf(e);if(n>=0)for(let e of t.splice(n,1))e()}),dispose(){for(let e of t.splice(0))e()}};return e}function _y(){let[t]=On(yy);return Fn((()=>()=>t.dispose()),[t]),t}let wy=(t,e)=>{my.isServer?Fn(t,e):Ln(t,e)};function by(t){let e=Dn(t);return wy((()=>{e.current=t}),[t]),e}let xy=function(t){let e=by(t);return Xr.useCallback(((...t)=>e.current(...t)),[e])};function Sy({disabled:t=!1}={}){let e=Dn(null),[n,r]=On(!1),i=_y(),o=xy((()=>{e.current=null,r(!1),i.dispose()})),s=xy((t=>{if(i.dispose(),null===e.current){e.current=t.currentTarget,r(!0);{let n=vy(t.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(t=>{if(e.current){let n=function(t){let e=t.width/2,n=t.height/2;return{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}(t);r(function(t,e){return!(!t||!e||t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)}(n,e.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:t?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let ky=oe(void 0);function Ey(){return Bn(ky)}function Py({value:t,children:e}){return Xr.createElement(ky.Provider,{value:t},e)}function Ty(...t){return Array.from(new Set(t.flatMap((t=>"string"==typeof t?t.split(" "):[])))).filter(Boolean).join(" ")}function Ay(t,e,...n){if(t in e){let r=e[t];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((t=>`"${t}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ay),r}var Cy,Ry,Oy=((Ry=Oy||{})[Ry.None=0]="None",Ry[Ry.RenderStrategy=1]="RenderStrategy",Ry[Ry.Static=2]="Static",Ry),My=((Cy=My||{})[Cy.Unmount=0]="Unmount",Cy[Cy.Hidden=1]="Hidden",Cy);function Fy({ourProps:t,theirProps:e,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Dy;let l=Vy(e,t);if(o)return Ly(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:t=!1,...e}=l;if(t)return Ly(e,n,r,s,a)}if(1&u){let{unmount:t=!0,...e}=l;return Ay(t?0:1,{0:()=>null,1:()=>Ly({...e,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Ly(l,n,r,s,a)}function Ly(t,e={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=Ny(t,["unmount","static"]),u=void 0!==t.ref?{[a]:t.ref}:{},c="function"==typeof s?s(e):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(e)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(e){let t=!1,n=[];for(let[r,i]of Object.entries(e))"boolean"==typeof i&&(t=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(t=>`-${t.toLowerCase()}`)));if(t){d["data-headlessui-state"]=n.join(" ");for(let t of n)d[`data-${t}`]=""}}if(o===jt&&(Object.keys(By(l)).length>0||Object.keys(By(d)).length>0)){if(Dr(c)&&!(Array.isArray(c)&&c.length>1)){let t=c.props,e=null==t?void 0:t.className,n="function"==typeof e?(...t)=>Ty(e(...t),l.className):Ty(e,l.className),r=n?{className:n}:{},o=Vy(c.props,By(Ny(l,["ref"])));for(let i in d)i in o&&delete d[i];return jr(c,Object.assign({},o,d,u,{ref:i(c.ref,u.ref)},r))}if(Object.keys(By(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(By(l)).concat(Object.keys(By(d))).map((t=>` - ${t}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((t=>` - ${t}`)).join("\n")].join("\n"))}return Dt(o,Object.assign({},Ny(l,["ref"]),o!==jt&&u,o!==jt&&d),c)}function Dy(...t){return t.every((t=>null==t))?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function Vy(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},n={};for(let r of t)for(let t in r)t.startsWith("on")&&"function"==typeof r[t]?(null!=n[t]||(n[t]=[]),n[t].push(r[t])):e[t]=r[t];if(e.disabled||e["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[t=>{var e;return null==(e=null==t?void 0:t.preventDefault)?void 0:e.call(t)}]);for(let r in n)Object.assign(e,{[r](t,...e){let i=n[r];for(let n of i){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...e)}}});return e}function Iy(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},n={};for(let r of t)for(let t in r)t.startsWith("on")&&"function"==typeof r[t]?(null!=n[t]||(n[t]=[]),n[t].push(r[t])):e[t]=r[t];for(let r in n)Object.assign(e,{[r](...t){let e=n[r];for(let n of e)null==n||n(...t)}});return e}function jy(t){var e;return Object.assign(er(t),{displayName:null!=(e=t.displayName)?e:t.name})}function By(t){let e=Object.assign({},t);for(let n in e)void 0===e[n]&&delete e[n];return e}function Ny(t,e=[]){let n=Object.assign({},t);for(let r of e)r in n&&delete n[r];return n}function Uy(t,e,n){let[r,i]=On(n),o=void 0!==t,s=Dn(o),a=Dn(!1),l=Dn(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?t:r,xy((t=>(o||i(t),null==e?void 0:e(t))))]}function Gy(t){let[e]=On(t);return e}function Wy(t={},e=null,n=[]){for(let[r,i]of Object.entries(t))$y(n,Hy(e,r),i);return n}function Hy(t,e){return t?t+"["+e+"]":e}function $y(t,e,n){if(Array.isArray(n))for(let[r,i]of n.entries())$y(t,Hy(e,r.toString()),i);else n instanceof Date?t.push([e,n.toISOString()]):"boolean"==typeof n?t.push([e,n?"1":"0"]):"string"==typeof n?t.push([e,n]):"number"==typeof n?t.push([e,`${n}`]):null==n?t.push([e,""]):Wy(n,e,t)}function zy(t){var e,n;let r=null!=(e=null==t?void 0:t.form)?e:t.closest("form");if(r){for(let e of r.elements)if(e!==t&&("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type))return void e.click();null==(n=r.requestSubmit)||n.call(r)}}var qy=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(qy||{});let Ky=jy((function(t,e){var n;let{features:r=1,...i}=t;return Fy({ourProps:{ref:e,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),Yy=oe(null);function Qy(t){let[e,n]=On(null);return Xr.createElement(Yy.Provider,{value:{target:e}},t.children,Xr.createElement(Ky,{features:qy.Hidden,ref:n}))}function Xy({children:t}){let e=Bn(Yy);if(!e)return Xr.createElement(Xr.Fragment,null,t);let{target:n}=e;return n?mr(Xr.createElement(Xr.Fragment,null,t),n):null}function Zy({data:t,form:e,disabled:n,onReset:r,overrides:i}){let[o,s]=On(null),a=_y();return Fn((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,e,r]),Xr.createElement(Xy,null,Xr.createElement(Jy,{setForm:s,formId:e}),Wy(t).map((([t,r])=>Xr.createElement(Ky,{features:qy.Hidden,...By({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:n,name:t,value:r,...i})}))))}function Jy({setForm:t,formId:e}){return Fn((()=>{if(e){let n=document.getElementById(e);n&&t(n)}}),[t,e]),e?null:Xr.createElement(Ky,{features:qy.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}let t_=oe(void 0);function e_(){return Bn(t_)}function n_({id:t,children:e}){return Xr.createElement(t_.Provider,{value:t},e)}function r_(t){let e=t.parentElement,n=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(n=e),e=e.parentElement;let r=""===(null==e?void 0:e.getAttribute("disabled"));return(!r||!function(t){if(!t)return!1;let e=t.previousElementSibling;for(;null!==e;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}(n))&&r}let i_=Symbol();function o_(...t){let e=Dn(t);Fn((()=>{e.current=t}),[t]);let n=xy((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}));return t.every((t=>null==t||(null==t?void 0:t[i_])))?void 0:n}let s_=oe(null);function a_(){let t=Bn(s_);if(null===t){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,a_),t}return t}function l_(){var t,e;return null!=(e=null==(t=Bn(s_))?void 0:t.value)?e:void 0}function u_(){let[t,e]=On([]);return[t.length>0?t.join(" "):void 0,In((()=>function(t){let n=xy((t=>(e((e=>[...e,t])),()=>e((e=>{let n=e.slice(),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}))))),r=In((()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value})),[n,t.slot,t.name,t.props,t.value]);return Xr.createElement(s_.Provider,{value:r},t.children)}),[e])]}s_.displayName="DescriptionContext";let c_=jy((function(t,e){let n=Un(),r=Ey(),{id:i=`headlessui-description-${n}`,...o}=t,s=a_(),a=o_(e);wy((()=>s.register(i)),[i,s.register]);let l=r||!1,u=In((()=>({...s.slot,disabled:l})),[s.slot,l]);return Fy({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),d_=Object.assign(c_,{});var h_,p_=((h_=p_||{}).Space=" ",h_.Enter="Enter",h_.Escape="Escape",h_.Backspace="Backspace",h_.Delete="Delete",h_.ArrowLeft="ArrowLeft",h_.ArrowUp="ArrowUp",h_.ArrowRight="ArrowRight",h_.ArrowDown="ArrowDown",h_.Home="Home",h_.End="End",h_.PageUp="PageUp",h_.PageDown="PageDown",h_.Tab="Tab",h_);let f_=oe(null);function m_(){let t=Bn(f_);if(null===t){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,m_),t}return t}function v_(t){var e,n,r;let i=null!=(n=null==(e=Bn(f_))?void 0:e.value)?n:void 0;return(null!=(r=null==t?void 0:t.length)?r:0)>0?[i,...t].filter(Boolean).join(" "):i}function g_({inherit:t=!1}={}){let e=v_(),[n,r]=On([]),i=t?[e,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,In((()=>function(t){let e=xy((t=>(r((e=>[...e,t])),()=>r((e=>{let n=e.slice(),r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}))))),n=In((()=>({register:e,slot:t.slot,name:t.name,props:t.props,value:t.value})),[e,t.slot,t.name,t.props,t.value]);return Xr.createElement(f_.Provider,{value:n},t.children)}),[r])]}f_.displayName="LabelContext";let y_=jy((function(t,e){var n;let r=Un(),i=m_(),o=e_(),s=Ey(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=t,d=o_(e);wy((()=>i.register(a)),[a,i.register]);let h=xy((t=>{let e=t.currentTarget;if(e instanceof HTMLLabelElement&&t.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),e instanceof HTMLLabelElement){let t=document.getElementById(e.htmlFor);if(t){let e=t.getAttribute("disabled");if("true"===e||""===e)return;let n=t.getAttribute("aria-disabled");if("true"===n||""===n)return;(t instanceof HTMLInputElement&&("radio"===t.type||"checkbox"===t.type)||"radio"===t.role||"checkbox"===t.role||"switch"===t.role)&&t.click(),t.focus({preventScroll:!0})}}})),p=s||!1,f=In((()=>({...i.slot,disabled:p})),[i.slot,p]),m={ref:d,...i.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Fy({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),__=Object.assign(y_,{});function w_(t,e){return null!==t&&null!==e&&"object"==typeof t&&"object"==typeof e&&"id"in t&&"id"in e?t.id===e.id:t===e}function b_(t,e=!1){let[n,r]=Mn((()=>({})),{}),i=In((()=>function(t){if(null===t)return{width:0,height:0};let{width:e,height:n}=t.getBoundingClientRect();return{width:e,height:n}}(t)),[t,n]);return wy((()=>{if(!t)return;let e=new ResizeObserver(r);return e.observe(t),()=>{e.disconnect()}}),[t]),e?{width:`${i.width}px`,height:`${i.height}px`}:i}let x_=class extends Map{constructor(t){super(),this.factory=t}get(t){let e=super.get(t);return void 0===e&&(e=this.factory(t),this.set(t,e)),e}};function S_(t,e){let n=t(),r=new Set;return{getSnapshot:()=>n,subscribe:t=>(r.add(t),()=>r.delete(t)),dispatch(t,...i){let o=e[t].call(n,...i);o&&(n=o,r.forEach((t=>t())))}}}function k_(t){return Yr(t.subscribe,t.getSnapshot,t.getSnapshot)}let E_=new x_((()=>S_((()=>[]),{ADD(t){return this.includes(t)?this:[...this,t]},REMOVE(t){let e=this.indexOf(t);if(-1===e)return this;let n=this.slice();return n.splice(e,1),n}})));function P_(t,e){let n=E_.get(e),r=Un(),i=k_(n);if(wy((()=>{if(t)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,t]),!t)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}let T_=new Map,A_=new Map;function C_(t){var e;let n=null!=(e=A_.get(t))?e:0;return A_.set(t,n+1),0!==n||(T_.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0),()=>R_(t)}function R_(t){var e;let n=null!=(e=A_.get(t))?e:1;if(1===n?A_.delete(t):A_.set(t,n-1),1!==n)return;let r=T_.get(t);r&&(null===r["aria-hidden"]?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r["aria-hidden"]),t.inert=r.inert,T_.delete(t))}let O_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((t=>`${t}:not([tabindex='-1'])`)).join(","),M_=["[data-autofocus]"].map((t=>`${t}:not([tabindex='-1'])`)).join(",");var F_,L_,D_,V_=((D_=V_||{})[D_.First=1]="First",D_[D_.Previous=2]="Previous",D_[D_.Next=4]="Next",D_[D_.Last=8]="Last",D_[D_.WrapAround=16]="WrapAround",D_[D_.NoScroll=32]="NoScroll",D_[D_.AutoFocus=64]="AutoFocus",D_),I_=((L_=I_||{})[L_.Error=0]="Error",L_[L_.Overflow=1]="Overflow",L_[L_.Success=2]="Success",L_[L_.Underflow=3]="Underflow",L_),j_=((F_=j_||{})[F_.Previous=-1]="Previous",F_[F_.Next=1]="Next",F_);function B_(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(O_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}var N_=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(N_||{});function U_(t,e=0){var n;return t!==(null==(n=vy(t))?void 0:n.body)&&Ay(e,{0:()=>t.matches(O_),1(){let e=t;for(;null!==e;){if(e.matches(O_))return!0;e=e.parentElement}return!1}})}var G_=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(G_||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(t=>{1===t.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===t.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let W_=["textarea","input"].join(",");function H_(t,e=t=>t){return t.slice().sort(((t,n)=>{let r=e(t),i=e(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function $_(t,e){return function(t,e,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,s=Array.isArray(t)?n?H_(t):t:64&e?function(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(M_)).sort(((t,e)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER))))}(t):B_(t);i.length>0&&s.length>1&&(s=s.filter((t=>!i.some((e=>null!=e&&"current"in e?(null==e?void 0:e.current)===t:e===t))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&e)return 1;if(10&e)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&e)return 0;if(2&e)return Math.max(0,s.indexOf(r))-1;if(4&e)return Math.max(0,s.indexOf(r))+1;if(8&e)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&e?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let t=u+d;if(16&e)t=(t+h)%h;else{if(t<0)return 3;if(t>=h)return 1}a=s[t],null==a||a.focus(c),d+=l}while(a!==o.activeElement);return 6&e&&function(t){var e,n;return null!=(n=null==(e=null==t?void 0:t.matches)?void 0:e.call(t,W_))&&n}(a)&&a.select(),2}(B_(),e,{relativeTo:t})}function z_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function q_(){return z_()||/Android/gi.test(window.navigator.userAgent)}function K_(t,e,n,r){let i=by(n);Fn((()=>{if(t)return document.addEventListener(e,n,r),()=>document.removeEventListener(e,n,r);function n(t){i.current(t)}}),[t,e,r])}const Y_=30;function Q_(t,e,n){let r=P_(t,"outside-click"),i=by(n),o=jn((function(t,n){if(t.defaultPrevented)return;let r=n(t);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function t(e){return"function"==typeof e?t(e()):Array.isArray(e)||e instanceof Set?e:[e]}(e);for(let e of o)if(null!==e&&(e.contains(r)||t.composed&&t.composedPath().includes(e)))return;return!U_(r,N_.Loose)&&-1!==r.tabIndex&&t.preventDefault(),i.current(t,r)}),[i,e]),s=Dn(null);K_(r,"pointerdown",(t=>{var e,n;s.current=(null==(n=null==(e=t.composedPath)?void 0:e.call(t))?void 0:n[0])||t.target}),!0),K_(r,"mousedown",(t=>{var e,n;s.current=(null==(n=null==(e=t.composedPath)?void 0:e.call(t))?void 0:n[0])||t.target}),!0),K_(r,"click",(t=>{q_()||s.current&&(o(t,(()=>s.current)),s.current=null)}),!0);let a=Dn({x:0,y:0});K_(r,"touchstart",(t=>{a.current.x=t.touches[0].clientX,a.current.y=t.touches[0].clientY}),!0),K_(r,"touchend",(t=>{let e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(!(Math.abs(e-a.current.x)>=Y_||Math.abs(n-a.current.y)>=Y_))return o(t,(()=>t.target instanceof HTMLElement?t.target:null))}),!0),function(t,e,n,r){let i=by(n);Fn((()=>{if(t)return window.addEventListener(e,n,r),()=>window.removeEventListener(e,n,r);function n(t){i.current(t)}}),[t,e,r])}(r,"blur",(t=>o(t,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function X_(...t){return In((()=>vy(...t)),[...t])}function Z_(t,e){return In((()=>{var n;if(t.type)return t.type;let r=null!=(n=t.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==e?void 0:e.tagName)&&!e.hasAttribute("type")?"button":void 0}),[t.type,t.as,e])}function J_(){let t;return{before({doc:e}){var n;let r=e.documentElement,i=null!=(n=e.defaultView)?n:window;t=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:e,d:n}){let r=e.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,t-i);n.style(r,"paddingRight",`${o}px`)}}}function tw(t){let e={};for(let n of t)Object.assign(e,n(e));return e}let ew=S_((()=>new Map),{PUSH(t,e){var n;let r=null!=(n=this.get(t))?n:{doc:t,count:0,d:yy(),meta:new Set};return r.count++,r.meta.add(e),this.set(t,r),this},POP(t,e){let n=this.get(t);return n&&(n.count--,n.meta.delete(e)),this},SCROLL_PREVENT({doc:t,d:e,meta:n}){let r={doc:t,d:e,meta:tw(n)},i=[z_()?{before({doc:t,d:e,meta:n}){function r(t){return n.containers.flatMap((t=>t())).some((e=>e.contains(t)))}e.microTask((()=>{var n;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let n=yy();n.style(t.documentElement,"scrollBehavior","auto"),e.add((()=>e.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;e.addEventListener(t,"click",(e=>{if(e.target instanceof HTMLElement)try{let n=e.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=t.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),e.addEventListener(t,"touchstart",(t=>{if(t.target instanceof HTMLElement)if(r(t.target)){let n=t.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;e.style(n,"overscrollBehavior","contain")}else e.style(t.target,"touchAction","none")})),e.addEventListener(t,"touchmove",(t=>{if(t.target instanceof HTMLElement){if("INPUT"===t.target.tagName)return;if(r(t.target)){let e=t.target;for(;e.parentElement&&""!==e.dataset.headlessuiPortal&&!(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth);)e=e.parentElement;""===e.dataset.headlessuiPortal&&t.preventDefault()}else t.preventDefault()}}),{passive:!1}),e.add((()=>{var t;let e=null!=(t=window.scrollY)?t:window.pageYOffset;i!==e&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},J_(),{before({doc:t,d:e}){e.style(t.documentElement,"overflow","hidden")}}];i.forEach((({before:t})=>null==t?void 0:t(r))),i.forEach((({after:t})=>null==t?void 0:t(r)))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});function nw(t,e,n=()=>[document.body]){!function(t,e,n=()=>({containers:[]})){let r=k_(ew),i=e?r.get(e):void 0,o=!!i&&i.count>0;wy((()=>{if(e&&t)return ew.dispatch("PUSH",e,n),()=>ew.dispatch("POP",e,n)}),[t,e])}(P_(t,"scroll-lock"),e,(t=>{var e;return{containers:[...null!=(e=t.containers)?e:[],n]}}))}function rw(t){return[t.screenX,t.screenY]}ew.subscribe((()=>{let t=ew.getSnapshot(),e=new Map;for(let[n]of t)e.set(n,n.documentElement.style.overflow);for(let n of t.values()){let t="hidden"===e.get(n.doc),r=0!==n.count;(r&&!t||!r&&t)&&ew.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&ew.dispatch("TEARDOWN",n)}}));var iw;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(iw=null==process?void 0:{})?void 0:iw.NODE_ENV)&&void 0===Element.prototype.getAnimations&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var ow=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(ow||{});function sw(t){let e={};for(let n in t)!0===t[n]&&(e[`data-${n}`]="");return e}function aw(t,e,n,r){let[i,o]=On(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(t=0){let[e,n]=On(t),r=jn((t=>n(t)),[e]),i=jn((t=>n((e=>e|t))),[e]),o=jn((t=>(e&t)===t),[e]),s=jn((t=>n((e=>e&~t))),[n]),a=jn((t=>n((e=>e^t))),[n]);return{flags:e,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(t&&i?3:0),u=Dn(!1),c=Dn(!1),d=_y();return wy((()=>{var i;if(t)return n&&o(!0),e?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(t,{prepare:e,run:n,done:r,inFlight:i}){let o=yy();return function(t,{inFlight:e,prepare:n}){if(null!=e&&e.current)return void n();let r=t.style.transition;t.style.transition="none",n(),t.offsetHeight,t.style.transition=r}(t,{prepare:e,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(t,e){var n,r;let i=yy();if(!t)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=t.getAnimations)?void 0:n.call(t).filter((t=>t instanceof CSSTransition)))?r:[];return 0===s.length?(e(),i.dispose):(Promise.allSettled(s.map((t=>t.finished))).then((()=>{o||e()})),i.dispose)}(t,r))}))})),o.dispose}(e,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){c.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var t;c.current&&"function"==typeof e.getAnimations&&e.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(t=null==r?void 0:r.end)||t.call(r,n))}})):void(n&&a(3))}),[t,n,e,d]),t?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function lw(){return"undefined"!=typeof window}function uw(t){return hw(t)?(t.nodeName||"").toLowerCase():"#document"}function cw(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function dw(t){var e;return null==(e=(hw(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function hw(t){return!!lw()&&(t instanceof Node||t instanceof cw(t).Node)}function pw(t){return!!lw()&&(t instanceof Element||t instanceof cw(t).Element)}function fw(t){return!!lw()&&(t instanceof HTMLElement||t instanceof cw(t).HTMLElement)}function mw(t){return!(!lw()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof cw(t).ShadowRoot)}function vw(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=xw(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function gw(t){return["table","td","th"].includes(uw(t))}function yw(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(Cy){return!1}}))}function _w(t){const e=ww(),n=pw(t)?xw(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function ww(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function bw(t){return["html","body","#document"].includes(uw(t))}function xw(t){return cw(t).getComputedStyle(t)}function Sw(t){return pw(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kw(t){if("html"===uw(t))return t;const e=t.assignedSlot||t.parentNode||mw(t)&&t.host||dw(t);return mw(e)?e.host:e}function Ew(t){const e=kw(t);return bw(e)?t.ownerDocument?t.ownerDocument.body:t.body:fw(e)&&vw(e)?e:Ew(e)}function Pw(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=Ew(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),s=cw(i);if(o){const t=Tw(s);return e.concat(s,s.visualViewport||[],vw(i)?i:[],t&&n?Pw(t):[])}return e.concat(i,Pw(i,[],n))}function Tw(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Aw=Math.min,Cw=Math.max,Rw=Math.round,Ow=Math.floor,Mw=t=>({x:t,y:t}),Fw={left:"right",right:"left",bottom:"top",top:"bottom"},Lw={start:"end",end:"start"};function Dw(t,e,n){return Cw(t,Aw(e,n))}function Vw(t,e){return"function"==typeof t?t(e):t}function Iw(t){return t.split("-")[0]}function jw(t){return t.split("-")[1]}function Bw(t){return"x"===t?"y":"x"}function Nw(t){return"y"===t?"height":"width"}function Uw(t){return["top","bottom"].includes(Iw(t))?"y":"x"}function Gw(t){return Bw(Uw(t))}function Ww(t){return t.replace(/start|end/g,(t=>Lw[t]))}function Hw(t){return t.replace(/left|right|bottom|top/g,(t=>Fw[t]))}function $w(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function zw(t,e,n){let{reference:r,floating:i}=t;const o=Uw(e),s=Gw(e),a=Nw(s),l=Iw(e),u="y"===o,c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(jw(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function qw(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Vw(e,t),f=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=$w(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=$w(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+f.top)/_.y,bottom:(w.bottom-v.bottom+f.bottom)/_.y,left:(v.left-w.left+f.left)/_.x,right:(w.right-v.right+f.right)/_.x}}function Kw(t){const e=xw(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=fw(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Rw(n)!==o||Rw(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Yw(t){return pw(t)?t:t.contextElement}function Qw(t){const e=Yw(t);if(!fw(e))return Mw(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=Kw(e);let s=(o?Rw(n.width):n.width)/r,a=(o?Rw(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Xw=Mw(0);function Zw(t){const e=cw(t);return ww()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Xw}function Jw(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=Yw(t);let s=Mw(1);e&&(r?pw(r)&&(s=Qw(r)):s=Qw(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==cw(t))&&e}(o,n,r)?Zw(o):Mw(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const t=cw(o),e=r&&pw(r)?cw(r):r;let n=t,i=Tw(n);for(;i&&r&&e!==n;){const t=Qw(i),e=i.getBoundingClientRect(),r=xw(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,u*=t.y,c*=t.x,d*=t.y,l+=o,u+=s,n=cw(i),i=Tw(n)}}return $w({width:c,height:d,x:l,y:u})}function tb(t,e){const n=Sw(t).scrollLeft;return e?e.left+n:Jw(dw(t)).left+n}function eb(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=cw(t),r=dw(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const t=ww();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(t,n);else if("document"===e)r=function(t){const e=dw(t),n=Sw(t),r=t.ownerDocument.body,i=Cw(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Cw(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+tb(t);const a=-n.scrollTop;return"rtl"===xw(r).direction&&(s+=Cw(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(dw(t));else if(pw(e))r=function(t,e){const n=Jw(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=fw(t)?Qw(t):Mw(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=Zw(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return $w(r)}function nb(t,e){const n=kw(t);return!(n===e||!pw(n)||bw(n))&&("fixed"===xw(n).position||nb(n,e))}function rb(t,e,n){const r=fw(e),i=dw(e),o="fixed"===n,s=Jw(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Mw(0);if(r||!r&&!o)if(("body"!==uw(e)||vw(i))&&(a=Sw(e)),r){const t=Jw(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=tb(i));let u=0,c=0;if(i&&!r&&!o){const t=i.getBoundingClientRect();c=t.top+a.scrollTop,u=t.left+a.scrollLeft-tb(i,t)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function ib(t){return"static"===xw(t).position}function ob(t,e){if(!fw(t)||"fixed"===xw(t).position)return null;if(e)return e(t);let n=t.offsetParent;return dw(t)===n&&(n=n.ownerDocument.body),n}function sb(t,e){const n=cw(t);if(yw(t))return n;if(!fw(t)){let e=kw(t);for(;e&&!bw(e);){if(pw(e)&&!ib(e))return e;e=kw(e)}return n}let r=ob(t,e);for(;r&&gw(r)&&ib(r);)r=ob(r,e);return r&&bw(r)&&ib(r)&&!_w(r)?n:r||function(t){let e=kw(t);for(;fw(e)&&!bw(e);){if(_w(e))return e;if(yw(e))return null;e=kw(e)}return null}(t)||n}const ab={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,s=dw(r),a=!!e&&yw(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Mw(1);const c=Mw(0),d=fw(r);if((d||!d&&!o)&&(("body"!==uw(r)||vw(s))&&(l=Sw(r)),fw(r))){const t=Jw(r);u=Qw(r),c.x=t.x+r.clientLeft,c.y=t.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:dw,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[..."clippingAncestors"===n?yw(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Pw(t,[],!1).filter((t=>pw(t)&&"body"!==uw(t))),i=null;const o="fixed"===xw(t).position;let s=o?kw(t):t;for(;pw(s)&&!bw(s);){const e=xw(s),n=_w(s);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||vw(s)&&!n&&nb(t,s))?r=r.filter((t=>t!==s)):i=e,s=kw(s)}return e.set(t,r),r}(e,this._c):[].concat(n),r],s=o[0],a=o.reduce(((t,n)=>{const r=eb(e,n,i);return t.top=Cw(r.top,t.top),t.right=Aw(r.right,t.right),t.bottom=Aw(r.bottom,t.bottom),t.left=Cw(r.left,t.left),t}),eb(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:sb,getElementRects:async function(t){const e=this.getOffsetParent||sb,n=this.getDimensions,r=await n(t.floating);return{reference:rb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Kw(t);return{width:e,height:n}},getScale:Qw,isElement:pw,isRTL:function(t){return"rtl"===xw(t).direction}};function lb(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=Yw(t),c=i||o?[...u?Pw(u):[],...Pw(e)]:[];c.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)}));const d=u&&a?function(t,e){let n,r=null;const i=dw(t);function o(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const{left:u,top:c,width:d,height:h}=t.getBoundingClientRect();if(a||e(),!d||!h)return;const p={rootMargin:-Ow(c)+"px "+-Ow(i.clientWidth-(u+d))+"px "+-Ow(i.clientHeight-(c+h))+"px "+-Ow(u)+"px",threshold:Cw(0,Aw(1,l))||1};let f=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return s();e?s(!1,e):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(Cy){r=new IntersectionObserver(m,p)}r.observe(t)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((t=>{let[r]=t;r&&r.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),n()})),u&&!l&&f.observe(u),f.observe(e));let m=l?Jw(t):null;return l&&function e(){const r=Jw(t);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(e)}(),n(),()=>{var t;c.forEach((t=>{i&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)})),null==d||d(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const ub=qw,cb=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:r,elements:i}=t,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Iw(n),a=jw(n),l="y"===Uw(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Vw(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},db=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=Vw(t,e),u={x:n,y:r},c=await qw(e,l),d=Uw(Iw(i)),h=Bw(d);let p=u[h],f=u[d];if(o){const t="y"===h?"bottom":"right";p=Dw(p+c["y"===h?"top":"left"],p,p-c[t])}if(s){const t="y"===d?"bottom":"right";f=Dw(f+c["y"===d?"top":"left"],f,f-c[t])}const m=a.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},hb=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Vw(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Iw(i),y=Uw(a),_=Iw(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(_||!m?[Hw(a)]:function(t){const e=Hw(t);return[Ww(t),e,Ww(e)]}(a)),x="none"!==f;!h&&x&&b.push(...function(t,e,n,r){const i=jw(t);let o=function(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}(Iw(t),"start"===n,r);return i&&(o=o.map((t=>t+"-"+i)),e&&(o=o.concat(o.map(Ww)))),o}(a,m,f,w));const S=[a,...b],k=await qw(e,v),E=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&E.push(k[g]),d){const t=function(t,e,n){void 0===n&&(n=!1);const r=jw(t),i=Gw(t),o=Nw(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Hw(s)),[s,Hw(s)]}(i,s,w);E.push(k[t[0]],k[t[1]])}if(P=[...P,{placement:i,overflows:E}],!E.every((t=>t<=0))){var T,A;const t=((null==(T=o.flip)?void 0:T.index)||0)+1,e=S[t];if(e)return{data:{index:t,overflows:P},reset:{placement:e}};let n=null==(A=P.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var C;const t=null==(C=P.filter((t=>{if(x){const e=Uw(t.placement);return e===y||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},pb=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...u}=Vw(t,e),c=await qw(e,u),d=Iw(i),h=jw(i),p="y"===Uw(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,v="end"===h?"top":"bottom");const y=m-c.top-c.bottom,_=f-c.left-c.right,w=Aw(m-c[v],y),b=Aw(f-c[g],_),x=!e.middlewareData.shift;let S=w,k=b;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(k=_),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(S=y),x&&!h){const t=Cw(c.left,0),e=Cw(c.right,0),n=Cw(c.top,0),r=Cw(c.bottom,0);p?k=f-2*(0!==t||0!==e?t+e:Cw(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Cw(c.top,c.bottom))}await l({...e,availableWidth:k,availableHeight:S});const E=await s.getDimensions(a.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},fb=(t,e,n)=>{const r=new Map,i={platform:ab,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=zw(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:v,y:g,data:y,reset:_}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(h=_.placement),_.rects&&(u=!0===_.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):_.rects),({x:c,y:d}=zw(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(t,e,{...i,platform:o})};var mb="undefined"!=typeof document?Ln:Fn;function vb(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!vb(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!t.$$typeof)&&!vb(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function gb(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yb(t,e){const n=gb(t);return Math.round(e*n)/n}function _b(t){const e=Dn(t);return mb((()=>{e.current=t})),e}const wb=(t,e)=>({...cb(t),options:[t,e]}),bb=(t,e)=>({...db(t),options:[t,e]}),xb=(t,e)=>({...hb(t),options:[t,e]}),Sb=(t,e)=>({...pb(t),options:[t,e]}),kb={...Zr},Eb=kb.useInsertionEffect||(t=>t());function Pb(t){const e=Dn((()=>{}));return Eb((()=>{e.current=t})),jn((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null==e.current?void 0:e.current(...n)}),[])}var Tb="undefined"!=typeof document?Ln:Fn;let Ab=!1,Cb=0;const Rb=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Cb++;const Ob=kb.useId||function(){const[t,e]=On((()=>Ab?Rb():void 0));return Tb((()=>{null==t&&e(Rb())}),[]),Fn((()=>{Ab=!0}),[]),t};const Mb=oe(null),Fb=oe(null),Lb=()=>{var t;return(null==(t=Bn(Mb))?void 0:t.id)||null},Db=()=>Bn(Fb),Vb="data-floating-ui-focusable";function Ib(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Ob(),o=Dn({}),[s]=On((()=>function(){const t=new Map;return{emit(e,n){var r;null==(r=t.get(e))||r.forEach((t=>t(n)))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,(null==(r=t.get(e))?void 0:r.filter((t=>t!==n)))||[])}}}())),a=null!=Lb(),[l,u]=On(r.reference),c=Pb(((t,e,r)=>{o.current.openEvent=t?e:void 0,s.emit("openchange",{open:t,event:e,reason:r,nested:a}),null==n||n(t,e,r)})),d=In((()=>({setPositionReference:u})),[]),h=In((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return In((()=>({dataRef:o,open:e,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[e,c,h,s,i,d])}function jb(t){void 0===t&&(t={});const{nodeId:e}=t,n=Ib({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=On(null),[a,l]=On(null),u=(null==i?void 0:i.reference)||o,c=Dn(null),d=Db();Tb((()=>{u&&(c.current=u)}),[u]);const h=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=On({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=On(r);vb(h,r)||p(r);const[f,m]=On(null),[v,g]=On(null),y=jn((t=>{t!==x.current&&(x.current=t,m(t))}),[]),_=jn((t=>{t!==S.current&&(S.current=t,g(t))}),[]),w=o||f,b=s||v,x=Dn(null),S=Dn(null),k=Dn(c),E=null!=l,P=_b(l),T=_b(i),A=_b(u),C=jn((()=>{if(!x.current||!S.current)return;const t={placement:e,strategy:n,middleware:h};T.current&&(t.platform=T.current),fb(x.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==A.current};R.current&&!vb(k.current,e)&&(k.current=e,Gr((()=>{d(e)})))}))}),[h,e,n,T,A]);mb((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((t=>({...t,isPositioned:!1}))))}),[u]);const R=Dn(!1);mb((()=>(R.current=!0,()=>{R.current=!1})),[]),mb((()=>{if(w&&(x.current=w),b&&(S.current=b),w&&b){if(P.current)return P.current(w,b,C);C()}}),[w,b,C,P,E]);const O=In((()=>({reference:x,floating:S,setReference:y,setFloating:_})),[y,_]),M=In((()=>({reference:w,floating:b})),[w,b]),F=In((()=>{const t={position:n,left:0,top:0};if(!M.floating)return t;const e=yb(M.floating,c.x),r=yb(M.floating,c.y);return a?{...t,transform:"translate("+e+"px, "+r+"px)",...gb(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}}),[n,a,M.floating,c.x,c.y]);return In((()=>({...c,update:C,refs:O,elements:M,floatingStyles:F})),[c,C,O,M,F])}({...t,elements:{...i,...a&&{reference:a}}}),p=jn((t=>{const e=pw(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;l(e),h.refs.setReference(e)}),[h.refs]),f=jn((t=>{(pw(t)||null===t)&&(c.current=t,s(t)),(pw(h.refs.reference.current)||null===h.refs.reference.current||null!==t&&!pw(t))&&h.refs.setReference(t)}),[h.refs]),m=In((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=In((()=>({...h.elements,domReference:u})),[h.elements,u]),g=In((()=>({...h,...r,refs:m,elements:v,nodeId:e})),[h,m,v,e,r]);return Tb((()=>{r.dataRef.current.floatingContext=g;const t=null==d?void 0:d.nodesRef.current.find((t=>t.id===e));t&&(t.context=g)})),In((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}const Bb="active",Nb="selected";function Ub(t,e,n){const r=new Map,i="item"===n;let o=t;if(i&&t){const{[Bb]:e,[Nb]:n,...r}=t;o=r}return{..."floating"===n&&{tabIndex:-1,[Vb]:""},...o,...e.map((e=>{const r=e?e[n]:null;return"function"==typeof r?t?r(t):null:r})).concat(t).reduce(((t,e)=>e?(Object.entries(e).forEach((e=>{let[n,o]=e;var s;i&&[Bb,Nb].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),t[n]=function(){for(var t,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return null==(t=r.get(n))?void 0:t.map((t=>t(...i))).find((t=>void 0!==t))})):t[n]=o)})),t):t),{})}}function Gb(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const Wb=t=>({name:"inner",options:t,async fn(e){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Vw(t,e),{rects:d,elements:{floating:h}}=e,p=n.current[s],f=(null==u?void 0:u.current)||h,m=h.clientTop||f.clientTop,v=0!==h.clientTop,g=0!==f.clientTop,y=h===f;if(!p)return{};const _={...e,...await wb(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(e)},w=await ub(Gb(_,f.scrollHeight+m+h.clientTop),c),b=await ub(_,{...c,elementContext:"reference"}),x=Cw(0,w.top),S=_.y+x,k=Rw(Cw(0,f.scrollHeight+(v&&y||g?2*m:0)-x-Cw(0,w.bottom)));if(f.style.maxHeight=k+"px",f.scrollTop=x,i){const t=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||b.top>=-l||b.bottom>=-l;Gr((()=>i(t)))}return r&&(r.current=await ub(Gb({..._,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Hb(t,e){const{open:n,elements:r}=t,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=e,l=Pb(a),u=Dn(!1),c=Dn(null),d=Dn(null);Fn((()=>{if(!i)return;function t(t){if(t.ctrlKey||!e||null==o.current)return;const n=t.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=e.scrollHeight-e.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";e.scrollHeight<=e.clientHeight||(!r&&n>0||!i&&n<0?(t.preventDefault(),Gr((()=>{l((t=>t+Math[u](n,s*a)))}))):/firefox/i.test(function(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}())&&(e.scrollTop+=n))}const e=(null==s?void 0:s.current)||r.floating;return n&&e?(e.addEventListener("wheel",t),requestAnimationFrame((()=>{c.current=e.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,e.removeEventListener("wheel",t)}):void 0}),[i,n,r.floating,o,s,l]);const h=In((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const t=(null==s?void 0:s.current)||r.floating;if(o.current&&t&&u.current){if(null!==c.current){const e=t.scrollTop-c.current;(o.current.bottom<-.5&&e<-1||o.current.top<-.5&&e>1)&&Gr((()=>l((t=>t+e))))}requestAnimationFrame((()=>{c.current=t.scrollTop}))}}})),[r.floating,l,o,s]);return In((()=>i?{floating:h}:{}),[i,h])}let $b=oe({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$b.displayName="FloatingContext";let zb=oe(null);zb.displayName="PlacementContext";let qb=4;function Kb({children:t,enabled:e=!0}){let[n,r]=On(null),[i,o]=On(0),s=Dn(null),[a,l]=On(null);!function(t){wy((()=>{if(!t)return;let e=new MutationObserver((()=>{let e=window.getComputedStyle(t).maxHeight,n=parseFloat(e);if(isNaN(n))return;let r=parseInt(e);isNaN(r)||n!==r&&(t.style.maxHeight=`${Math.ceil(n)}px`)}));return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}}),[t])}(a);let u=e&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(t,e){var n,r,i;let o=Yb(null!=(n=null==t?void 0:t.gap)?n:"var(--anchor-gap, 0)",e),s=Yb(null!=(r=null==t?void 0:t.offset)?r:"var(--anchor-offset, 0)",e),a=Yb(null!=(i=null==t?void 0:t.padding)?i:"var(--anchor-padding, 0)",e);return{...t,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");wy((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:_}=jb({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[wb({mainAxis:"selection"===m?0:d,crossAxis:h}),bb({padding:p}),"selection"!==m&&xb({padding:p}),"selection"===m&&f?Wb({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:qb,referenceOverflowThreshold:p,onFallbackChange(t){var e,n;if(!t)return;let r=_.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(qb,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(e=_.elements.floating)?void 0:e.childNodes)?n:[])if(o instanceof HTMLElement){let t=o.offsetTop,e=t+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(t>=n&&e<=u)){l=Math.max(0,Math.min(e,u)-Math.max(t,n)),a=o.clientHeight;break}s--}s>=1&&o((t=>{let e=a*s-l+i;return t>=e?t:e}))}}):null,Sb({padding:p,apply({availableWidth:t,availableHeight:e,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${t}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${e}px)`})}})].filter(Boolean),whileElementsMounted:lb}),[w=m,b=v]=_.placement.split("-");"selection"===m&&(w="selection");let x=In((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),S=Hb(_,{overflowRef:s,onChange:o}),{getReferenceProps:k,getFloatingProps:E}=function(t){void 0===t&&(t=[]);const e=t.map((t=>null==t?void 0:t.reference)),n=t.map((t=>null==t?void 0:t.floating)),r=t.map((t=>null==t?void 0:t.item)),i=jn((e=>Ub(e,t,"reference")),e),o=jn((e=>Ub(e,t,"floating")),n),s=jn((e=>Ub(e,t,"item")),r);return In((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([S]),P=xy((t=>{l(t),g.setFloating(t)}));return Dt(zb.Provider,{value:r},Dt($b.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:k,getFloatingProps:E,slot:x}},t))}function Yb(t,e,n=void 0){let r=_y(),i=xy(((t,e)=>{if(null==t)return[n,null];if("number"==typeof t)return[t,null];if("string"==typeof t){if(!e)return[n,null];let i=Xb(t,e);return[i,n=>{let o=Qb(t);{let s=o.map((t=>window.getComputedStyle(e).getPropertyValue(t)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[t,n]of o.entries()){let r=window.getComputedStyle(e).getPropertyValue(n);if(s[t]!==r){s[t]=r,l=!0;break}}if(!l)return;let u=Xb(t,e);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=In((()=>i(t,e)[0]),[t,e]),[s=o,a]=On();return wy((()=>{let[n,r]=i(t,e);if(a(n),r)return r(a)}),[t,e]),s}function Qb(t){let e=/var\((.*)\)/.exec(t);if(e){let t=e[1].indexOf(",");if(-1===t)return[e[1]];let n=e[1].slice(0,t).trim(),r=e[1].slice(t+1).trim();return r?[n,...Qb(r)]:[n]}return[]}function Xb(t,e){let n=document.createElement("div");e.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",t,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return e.removeChild(n),r}let Zb=oe(null);Zb.displayName="OpenClosedContext";var Jb=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Jb||{});function tx(){return Bn(Zb)}function ex({value:t,children:e}){return Xr.createElement(Zb.Provider,{value:t},e)}var nx,rx=((nx=rx||{})[nx.First=0]="First",nx[nx.Previous=1]="Previous",nx[nx.Next=2]="Next",nx[nx.Last=3]="Last",nx[nx.Specific=4]="Specific",nx[nx.Nothing=5]="Nothing",nx);function ix(t,e){let n=e.resolveItems();if(n.length<=0)return null;let r=e.resolveActiveIndex(),i=null!=r?r:-1;switch(t.focus){case 0:for(let t=0;t<n.length;++t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 1:-1===i&&(i=n.length);for(let t=i-1;t>=0;--t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 2:for(let t=i+1;t<n.length;++t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 3:for(let t=n.length-1;t>=0;--t)if(!e.resolveDisabled(n[t],t,n))return t;return r;case 4:for(let r=0;r<n.length;++r)if(e.resolveId(n[r],r,n)===t.id)return r;return r;case 5:return null;default:!function(t){throw new Error("Unexpected object: "+t)}(t)}}function ox(){let t=function(){let t="undefined"==typeof document;return"useSyncExternalStore"in Zr&&(t=>t.useSyncExternalStore)(Zr)((()=>()=>{}),(()=>!1),(()=>!t))}(),[e,n]=On(my.isHandoffComplete);return e&&!1===my.isHandoffComplete&&n(!1),Fn((()=>{!0!==e&&n(!0)}),[e]),Fn((()=>my.handoff()),[]),!t&&e}let sx=oe(!1);function ax(t){let e=Bn(sx),n=Bn(dx),r=X_(t),[i,o]=On((()=>{var t;if(!e&&null!==n)return null!=(t=n.current)?t:null;if(my.isServer)return null;let i=null==r?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)}));return Fn((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Fn((()=>{e||null!==n&&o(n.current)}),[n,o,e]),i}let lx=jt,ux=jy((function(t,e){let n=t,r=Dn(null),i=o_(function(t,e=!0){return Object.assign(t,{[i_]:e})}((t=>{r.current=t})),e),o=X_(r),s=ax(r),[a]=On((()=>{var t;return my.isServer?null:null!=(t=null==o?void 0:o.createElement("div"))?t:null})),l=Bn(hx),u=ox();return wy((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),wy((()=>{if(a&&l)return l.register(a)}),[l,a]),function(t){let e=xy(t),n=Dn(!1);Fn((()=>(n.current=!1,()=>{n.current=!0,gy((()=>{n.current&&e()}))})),[e])}((()=>{var t;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(t=s.parentElement)||t.removeChild(s)))})),u&&s&&a?mr(Fy({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:lx,name:"Portal"}),a):null}));let cx=jt,dx=oe(null);let hx=oe(null),px=jy((function(t,e){let n=o_(e),{enabled:r=!0,...i}=t;return r?Xr.createElement(ux,{...i,ref:n}):Fy({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:lx,name:"Portal"})})),fx=jy((function(t,e){let{target:n,...r}=t,i={ref:o_(e)};return Xr.createElement(dx.Provider,{value:n},Fy({ourProps:i,theirProps:r,defaultTag:cx,name:"Popover.Group"}))})),mx=Object.assign(px,{Group:fx});function vx(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||(null!=(e=t.as)?e:xx)!==jt||1===Xr.Children.count(t.children)}let gx=oe(null);gx.displayName="TransitionContext";var yx=(t=>(t.Visible="visible",t.Hidden="hidden",t))(yx||{});let _x=oe(null);function wx(t){return"children"in t?wx(t.children):t.current.filter((({el:t})=>null!==t.current)).filter((({state:t})=>"visible"===t)).length>0}function bx(t,e){let n=by(t),r=Dn([]),i=function(){let t=Dn(!1);return wy((()=>(t.current=!0,()=>{t.current=!1})),[]),t}(),o=_y(),s=xy(((t,e=My.Hidden)=>{let s=r.current.findIndex((({el:e})=>e===t));-1!==s&&(Ay(e,{[My.Unmount](){r.current.splice(s,1)},[My.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var t;!wx(r)&&i.current&&(null==(t=n.current)||t.call(n))})))})),a=xy((t=>{let e=r.current.find((({el:e})=>e===t));return e?"visible"!==e.state&&(e.state="visible"):r.current.push({el:t,state:"visible"}),()=>s(t,My.Unmount)})),l=Dn([]),u=Dn(Promise.resolve()),c=Dn({enter:[],leave:[]}),d=xy(((t,n,r)=>{l.current.splice(0),e&&(e.chains.current[n]=e.chains.current[n].filter((([e])=>e!==t))),null==e||e.chains.current[n].push([t,new Promise((t=>{l.current.push(t)}))]),null==e||e.chains.current[n].push([t,new Promise((t=>{Promise.all(c.current[n].map((([t,e])=>e))).then((()=>t()))}))]),"enter"===n?u.current=u.current.then((()=>null==e?void 0:e.wait.current)).then((()=>r(n))):r(n)})),h=xy(((t,e,n)=>{Promise.all(c.current[e].splice(0).map((([t,e])=>e))).then((()=>{var t;null==(t=l.current.shift())||t()})).then((()=>n(e)))}));return In((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}_x.displayName="NestingContext";let xx=jt,Sx=Oy.RenderStrategy;let kx=jy((function(t,e){let{show:n,appear:r=!1,unmount:i=!0,...o}=t,s=Dn(null),a=o_(...vx(t)?[s,e]:null===e?[]:[e]);ox();let l=tx();if(void 0===n&&null!==l&&(n=(l&Jb.Open)===Jb.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=On(n?"visible":"hidden"),d=bx((()=>{n||c("hidden")})),[h,p]=On(!0),f=Dn([n]);wy((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=In((()=>({show:n,appear:r,initial:h})),[n,r,h]);wy((()=>{n?c("visible"):!wx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=xy((()=>{var e;h&&p(!1),null==(e=t.beforeEnter)||e.call(t)})),y=xy((()=>{var e;h&&p(!1),null==(e=t.beforeLeave)||e.call(t)}));return Xr.createElement(_x.Provider,{value:d},Xr.createElement(gx.Provider,{value:m},Fy({ourProps:{...v,as:jt,children:Xr.createElement(Ex,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:jt,features:Sx,visible:"visible"===u,name:"Transition"})))})),Ex=jy((function(t,e){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:d,entered:h,leave:p,leaveFrom:f,leaveTo:m,...v}=t,[g,y]=On(null),_=Dn(null),w=vx(t),b=o_(...w?[_,e,y]:null===e?[]:[e]),x=null==(n=v.unmount)||n?My.Unmount:My.Hidden,{show:S,appear:k,initial:E}=function(){let t=Bn(gx);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),[P,T]=On(S?"visible":"hidden"),A=function(){let t=Bn(_x);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),{register:C,unregister:R}=A;wy((()=>C(_)),[C,_]),wy((()=>{if(x===My.Hidden&&_.current)return S&&"visible"!==P?void T("visible"):Ay(P,{hidden:()=>R(_),visible:()=>C(_)})}),[P,_,C,R,S,x]);let O=ox();wy((()=>{if(w&&O&&"visible"===P&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,P,O,w]);let M=E&&!k,F=k&&S&&E,L=Dn(!1),D=bx((()=>{L.current||(T("hidden"),R(_))}),A),V=xy((t=>{L.current=!0;let e=t?"enter":"leave";D.onStart(_,e,(t=>{"enter"===t?null==o||o():"leave"===t&&(null==a||a())}))})),I=xy((t=>{let e=t?"enter":"leave";L.current=!1,D.onStop(_,e,(t=>{"enter"===t?null==s||s():"leave"===t&&(null==l||l())})),"leave"===e&&!wx(D)&&(T("hidden"),R(_))}));Fn((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let j=(()=>!(!i||!w||!O||M))(),[,B]=aw(j,g,S,{start:V,end:I}),N=By({ref:b,className:(null==(r=Ty(v.className,F&&u,F&&c,B.enter&&u,B.enter&&B.closed&&c,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&f,B.leave&&B.closed&&m,!B.transition&&S&&h))?void 0:r.trim())||void 0,...sw(B)}),U=0;return"visible"===P&&(U|=Jb.Open),"hidden"===P&&(U|=Jb.Closed),B.enter&&(U|=Jb.Opening),B.leave&&(U|=Jb.Closing),Xr.createElement(_x.Provider,{value:D},Xr.createElement(ex,{value:U},Fy({ourProps:N,theirProps:v,defaultTag:xx,features:Sx,visible:"visible"===P,name:"Transition.Child"})))})),Px=jy((function(t,e){let n=null!==Bn(gx),r=null!==tx();return Xr.createElement(Xr.Fragment,null,!n&&r?Xr.createElement(kx,{ref:e,...t}):Xr.createElement(Ex,{ref:e,...t}))})),Tx=Object.assign(kx,{Child:Px,Root:kx});let Ax=jy((function(t,e){let n=`headlessui-control-${Un()}`,[r,i]=g_(),[o,s]=u_(),a=Ey(),{disabled:l=a||!1,...u}=t,c=In((()=>({disabled:l})),[l]);return Xr.createElement(Py,{value:l},Xr.createElement(i,{value:r},Xr.createElement(s,{value:o},Xr.createElement(n_,{id:n},Fy({ourProps:{ref:e,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Xr.createElement(Qy,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));let Cx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Rx(t){var e,n;let r=null!=(e=t.innerText)?e:"",i=t.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?null!=(n=i.innerText)?n:"":r;return Cx.test(s)&&(s=s.replace(Cx,"")),s}function Ox(t){let e=Dn(""),n=Dn("");return xy((()=>{let r=t.current;if(!r)return"";let i=r.innerText;if(e.current===i)return n.current;let o=function(t){let e=t.getAttribute("aria-label");if("string"==typeof e)return e.trim();let n=t.getAttribute("aria-labelledby");if(n){let t=n.split(" ").map((t=>{let e=document.getElementById(t);if(e){let t=e.getAttribute("aria-label");return"string"==typeof t?t.trim():Rx(e).trim()}return null})).filter(Boolean);if(t.length>0)return t.join(", ")}return Rx(t).trim()}(r).trim().toLowerCase();return e.current=i,n.current=o,o}))}var Mx=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Mx||{}),Fx=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Fx||{}),Lx=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Lx||{}),Dx=(t=>(t[t.OpenListbox=0]="OpenListbox",t[t.CloseListbox=1]="CloseListbox",t[t.GoToOption=2]="GoToOption",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterOption=5]="RegisterOption",t[t.UnregisterOption=6]="UnregisterOption",t[t.SetButtonElement=7]="SetButtonElement",t[t.SetOptionsElement=8]="SetOptionsElement",t))(Dx||{});function Vx(t,e=t=>t){let n=null!==t.activeOptionIndex?t.options[t.activeOptionIndex]:null,r=H_(e(t.options.slice()),(t=>t.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Ix={1:t=>t.dataRef.current.disabled||1===t.listboxState?t:{...t,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(t){if(t.dataRef.current.disabled||0===t.listboxState)return t;let e=t.activeOptionIndex,{isSelected:n}=t.dataRef.current,r=t.options.findIndex((t=>n(t.dataRef.current.value)));return-1!==r&&(e=r),{...t,listboxState:0,activeOptionIndex:e,__demoMode:!1}},2(t,e){var n,r,i,o,s;if(t.dataRef.current.disabled||1===t.listboxState)return t;let a={...t,searchQuery:"",activationTrigger:null!=(n=e.trigger)?n:1,__demoMode:!1};if(e.focus===rx.Nothing)return{...a,activeOptionIndex:null};if(e.focus===rx.Specific)return{...a,activeOptionIndex:t.options.findIndex((t=>t.id===e.id))};if(e.focus===rx.Previous){let n=t.activeOptionIndex;if(null!==n){let o=t.options[n].dataRef.current.domRef,s=ix(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});if(null!==s){let e=t.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===e.current||null===(null==(i=e.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(e.focus===rx.Next){let n=t.activeOptionIndex;if(null!==n){let r=t.options[n].dataRef.current.domRef,i=ix(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});if(null!==i){let e=t.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===e.current||null===(null==(s=e.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Vx(t),u=ix(e,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(t,e)=>{if(t.dataRef.current.disabled||1===t.listboxState)return t;let n=""!==t.searchQuery?0:1,r=t.searchQuery+e.value.toLowerCase(),i=(null!==t.activeOptionIndex?t.options.slice(t.activeOptionIndex+n).concat(t.options.slice(0,t.activeOptionIndex+n)):t.options).find((t=>{var e;return!t.dataRef.current.disabled&&(null==(e=t.dataRef.current.textValue)?void 0:e.startsWith(r))})),o=i?t.options.indexOf(i):-1;return-1===o||o===t.activeOptionIndex?{...t,searchQuery:r}:{...t,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:t=>t.dataRef.current.disabled||1===t.listboxState||""===t.searchQuery?t:{...t,searchQuery:""},5:(t,e)=>{let n={id:e.id,dataRef:e.dataRef},r=Vx(t,(t=>[...t,n]));return null===t.activeOptionIndex&&t.dataRef.current.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...t,...r}},6:(t,e)=>{let n=Vx(t,(t=>{let n=t.findIndex((t=>t.id===e.id));return-1!==n&&t.splice(n,1),t}));return{...t,...n,activationTrigger:1}},7:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},8:(t,e)=>t.optionsElement===e.element?t:{...t,optionsElement:e.element}},jx=oe(null);function Bx(t){let e=Bn(jx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Bx),e}return e}jx.displayName="ListboxActionsContext";let Nx=oe(null);function Ux(t){let e=Bn(Nx);if(null===e){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ux),e}return e}function Gx(t,e){return Ay(e.type,Ix,t,e)}Nx.displayName="ListboxDataContext";let Wx=jt;let Hx=oe(!1),$x=Oy.RenderStrategy|Oy.Static;let zx=jt;let qx=jy((function(t,e){var n;let r=Ey(),{value:i,defaultValue:o,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:f=!1,...m}=t;const v=h?"horizontal":"vertical";let g=o_(e),y=Gy(o),[_=(p?[]:void 0),w]=Uy(i,l,y),[b,x]=Mn(Gx,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=Dn({static:!1,hold:!1}),k=Dn(new Map),E=function(t=w_){return jn(((e,n)=>{if("string"==typeof t){let r=t;return(null==e?void 0:e[r])===(null==n?void 0:n[r])}return t(e,n)}),[t])}(u),P=jn((t=>Ay(T.mode,{1:()=>_.some((e=>E(e,t))),0:()=>E(_,t)})),[_]),T=In((()=>({...b,value:_,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:E,isSelected:P,optionsPropsRef:S,listRef:k})),[_,d,c,p,b,k]);wy((()=>{b.dataRef.current=T}),[T]),Q_(0===T.listboxState,[T.buttonElement,T.optionsElement],((t,e)=>{var n;x({type:1}),U_(e,N_.Loose)||(t.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let A=In((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:_})),[T,d,_,c]),C=xy((t=>{let e=T.options.find((e=>e.id===t));e&&V(e.dataRef.current.value)})),R=xy((()=>{if(null!==T.activeOptionIndex){let{dataRef:t,id:e}=T.options[T.activeOptionIndex];V(t.current.value),x({type:2,focus:rx.Specific,id:e})}})),O=xy((()=>x({type:0}))),M=xy((()=>x({type:1}))),F=_y(),L=xy(((t,e,n)=>{F.dispose(),F.microTask((()=>t===rx.Specific?x({type:2,focus:rx.Specific,id:e,trigger:n}):x({type:2,focus:t,trigger:n})))})),D=xy(((t,e)=>(x({type:5,id:t,dataRef:e}),()=>x({type:6,id:t})))),V=xy((t=>Ay(T.mode,{0:()=>null==w?void 0:w(t),1(){let e=T.value.slice(),n=e.findIndex((e=>E(e,t)));return-1===n?e.push(t):e.splice(n,1),null==w?void 0:w(e)}}))),I=xy((t=>x({type:3,value:t}))),j=xy((()=>x({type:4}))),B=xy((t=>{x({type:7,element:t})})),N=xy((t=>{x({type:8,element:t})})),U=In((()=>({onChange:V,registerOption:D,goToOption:L,closeListbox:M,openListbox:O,selectActiveOption:R,selectOption:C,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[G,W]=g_({inherit:!0}),H={ref:g},$=jn((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Xr.createElement(W,{value:G,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Xr.createElement(Kb,null,Xr.createElement(jx.Provider,{value:U},Xr.createElement(Nx.Provider,{value:T},Xr.createElement(ex,{value:Ay(T.listboxState,{0:Jb.Open,1:Jb.Closed})},null!=a&&null!=_&&Xr.createElement(Zy,{disabled:d,data:{[a]:_},form:s,onReset:$}),Fy({ourProps:H,theirProps:m,slot:A,defaultTag:Wx,name:"Listbox"}))))))})),Kx=jy((function(t,e){var n;let r=Ux("Listbox.Button"),i=Bx("Listbox.Button"),o=Un(),s=e_(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=t,d=function(){let t=Dn([]),e=jn((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}),[]);return(...n)=>{if(!n.every((t=>null==t)))return t.current=n,e}}(),h=o_(e,Bn($b).setReference,i.setButtonElement),p=Bn($b).getReferenceProps,f=xy((t=>{switch(t.key){case p_.Enter:zy(t.currentTarget);break;case p_.Space:case p_.ArrowDown:t.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(rx.First);break;case p_.ArrowUp:t.preventDefault(),Gr((()=>i.openListbox())),r.value||i.goToOption(rx.Last)}})),m=xy((t=>{if(t.key===p_.Space)t.preventDefault()})),v=xy((t=>{var e;if(r_(t.currentTarget))return t.preventDefault();0===r.listboxState?(Gr((()=>i.closeListbox())),null==(e=r.buttonElement)||e.focus({preventScroll:!0})):(t.preventDefault(),i.openListbox())})),g=xy((t=>t.preventDefault())),y=v_([a]),_=l_(),{isFocusVisible:w,focusProps:b}=hy({autoFocus:u}),{isHovered:x,hoverProps:S}=dy({isDisabled:l}),{pressed:k,pressProps:E}=Sy({disabled:l}),P=In((()=>({open:0===r.listboxState,active:k||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:x,focus:w,autofocus:u})),[r.listboxState,r.value,l,x,w,k,r.invalid,u]);return Fy({mergeRefs:d,ourProps:Iy(p(),{ref:h,id:a,type:Z_(t,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":_,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},b,S,E),theirProps:c,slot:P,defaultTag:"button",name:"Listbox.Button"})})),Yx=__,Qx=jy((function(t,e){var n,r;let i=Un(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=t,d=function(t){return In((()=>t?"string"==typeof t?{to:t}:t:null),[t])}(s),[h,p]=On(null);d&&(a=!0);let f=Ux("Listbox.Options"),m=Bx("Listbox.Options"),v=X_(f.optionsElement),g=tx(),[y,_]=aw(u,h,null!==g?(g&Jb.Open)===Jb.Open:0===f.listboxState);!function(t,e,n){let r=by((t=>{let e=t.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&n()}));Fn((()=>{if(!t)return;let n=null===e?null:e instanceof HTMLElement?e:e.current;if(!n)return;let i=yy();if("undefined"!=typeof ResizeObserver){let t=new ResizeObserver((()=>r.current(n)));t.observe(n),i.add((()=>t.disconnect()))}if("undefined"!=typeof IntersectionObserver){let t=new IntersectionObserver((()=>r.current(n)));t.observe(n),i.add((()=>t.disconnect()))}return()=>i.dispose()}),[e,r,t])}(y,f.buttonElement,m.closeListbox),nw(!f.__demoMode&&(l&&0===f.listboxState),v),function(t,{allowed:e,disallowed:n}={}){let r=P_(t,"inert-others");wy((()=>{var t,i;if(!r)return;let o=yy();for(let e of null!=(t=null==n?void 0:n())?t:[])e&&o.add(C_(e));let s=null!=(i=null==e?void 0:e())?i:[];for(let e of s){if(!e)continue;let t=vy(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let t of n.children)s.some((e=>t.contains(e)))||o.add(C_(t));n=n.parentElement}}return o.dispose}),[r,e,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:jn((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let w=!function(t,e){let n=Dn({left:0,top:0});if(wy((()=>{if(!e)return;let t=e.getBoundingClientRect();t&&(n.current=t)}),[t,e]),null==e||!t||e===document.activeElement)return!1;let r=e.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,b=function(t,e){let[n,r]=On(e);return!t&&n!==e&&r(e),t?n:e}(y&&1===f.listboxState,f.value),x=xy((t=>f.compare(b,t))),S=In((()=>{var t;if(null==d||null==(t=null==d?void 0:d.to)||!t.includes("selection"))return null;let e=f.options.findIndex((t=>x(t.dataRef.current.value)));return-1===e&&(e=0),e}),[d,f.options]),k=(()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let t=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:t},index:S}}})(),[E,P]=function(t=null){!1===t&&(t=null),"string"==typeof t&&(t={to:t});let e=Bn(zb),n=In((()=>t),[JSON.stringify(t,"undefined"!=typeof HTMLElement?(t,e)=>e instanceof HTMLElement?e.outerHTML:e:void 0)]);wy((()=>{null==e||e(null!=n?n:null)}),[e,n]);let r=Bn($b);return In((()=>[r.setFloating,t?r.styles:{}]),[r.setFloating,t,r.styles])}(k),T=function(){let{getFloatingProps:t,slot:e}=Bn($b);return jn(((...n)=>Object.assign({},t(...n),{"data-anchor":e.anchor})),[t,e])}(),A=o_(e,d?E:null,m.setOptionsElement,p),C=_y();Fn((()=>{var t;let e=f.optionsElement;e&&0===f.listboxState&&e!==(null==(t=vy(e))?void 0:t.activeElement)&&(null==e||e.focus({preventScroll:!0}))}),[f.listboxState,f.optionsElement]);let R=xy((t=>{var e,n;switch(C.dispose(),t.key){case p_.Space:if(""!==f.searchQuery)return t.preventDefault(),t.stopPropagation(),m.search(t.key);case p_.Enter:if(t.preventDefault(),t.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:t}=f.options[f.activeOptionIndex];m.onChange(t.current.value)}0===f.mode&&(Gr((()=>m.closeListbox())),null==(e=f.buttonElement)||e.focus({preventScroll:!0}));break;case Ay(f.orientation,{vertical:p_.ArrowDown,horizontal:p_.ArrowRight}):return t.preventDefault(),t.stopPropagation(),m.goToOption(rx.Next);case Ay(f.orientation,{vertical:p_.ArrowUp,horizontal:p_.ArrowLeft}):return t.preventDefault(),t.stopPropagation(),m.goToOption(rx.Previous);case p_.Home:case p_.PageUp:return t.preventDefault(),t.stopPropagation(),m.goToOption(rx.First);case p_.End:case p_.PageDown:return t.preventDefault(),t.stopPropagation(),m.goToOption(rx.Last);case p_.Escape:return t.preventDefault(),t.stopPropagation(),Gr((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case p_.Tab:t.preventDefault(),t.stopPropagation(),Gr((()=>m.closeListbox())),$_(f.buttonElement,t.shiftKey?V_.Previous:V_.Next);break;default:1===t.key.length&&(m.search(t.key),C.setTimeout((()=>m.clearSearch()),350))}})),O=null==(n=f.buttonElement)?void 0:n.id,M=In((()=>({open:0===f.listboxState})),[f.listboxState]),F=Iy(d?T():{},{id:o,ref:A,"aria-activedescendant":null===f.activeOptionIndex||null==(r=f.options[f.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===f.mode||void 0,"aria-labelledby":O,"aria-orientation":f.orientation,onKeyDown:R,role:"listbox",tabIndex:0===f.listboxState?0:void 0,style:{...c.style,...P,"--button-width":b_(f.buttonElement,!0).width},...sw(_)});return Xr.createElement(mx,{enabled:!!a&&(t.static||y)},Xr.createElement(Nx.Provider,{value:1===f.mode?f:{...f,isSelected:x}},Fy({ourProps:F,theirProps:c,slot:M,defaultTag:"div",features:$x,visible:w,name:"Listbox.Options"})))})),Xx=jy((function(t,e){let n=Un(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=t,a=!0===Bn(Hx),l=Ux("Listbox.Option"),u=Bx("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=Dn(null),p=Ox(h),f=by({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=o_(e,h,(t=>{t?l.listRef.current.set(r,t):l.listRef.current.delete(r)}));wy((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return yy().requestAnimationFrame((()=>{var t,e;null==(e=null==(t=h.current)?void 0:t.scrollIntoView)||e.call(t,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),wy((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=xy((t=>{var e;if(i)return t.preventDefault();u.onChange(o),0===l.mode&&(Gr((()=>u.closeListbox())),null==(e=l.buttonElement)||e.focus({preventScroll:!0}))})),g=xy((()=>{if(i)return u.goToOption(rx.Nothing);u.goToOption(rx.Specific,r)})),y=function(){let t=Dn([-1,-1]);return{wasMoved(e){let n=rw(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=rw(e)}}}(),_=xy((t=>{y.update(t),!i&&(c||u.goToOption(rx.Specific,r,0))})),w=xy((t=>{y.wasMoved(t)&&(i||c||u.goToOption(rx.Specific,r,0))})),b=xy((t=>{y.wasMoved(t)&&(i||c&&u.goToOption(rx.Nothing))})),x=In((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Fy({ourProps:a?{}:{id:r,ref:m,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":d,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:_,onMouseEnter:_,onPointerMove:w,onMouseMove:w,onPointerLeave:b,onMouseLeave:b},theirProps:s,slot:x,defaultTag:"div",name:"Listbox.Option"})})),Zx=jy((function(t,e){let{options:n,placeholder:r,...i}=t,o={ref:o_(e)},s=Ux("ListboxSelectedOption"),a=In((()=>({})),[]),l=void 0===s.value||null===s.value||1===s.mode&&Array.isArray(s.value)&&0===s.value.length;return Xr.createElement(Hx.Provider,{value:!0},Fy({ourProps:o,theirProps:{...i,children:Xr.createElement(Xr.Fragment,null,r&&l?r:n)},slot:a,defaultTag:zx,name:"ListboxSelectedOption"}))})),Jx=Object.assign(qx,{Button:Kx,Label:Yx,Options:Qx,Option:Xx,SelectedOption:Zx}),tS=oe(null);tS.displayName="GroupContext";let eS=jt;let nS=jy((function(t,e){var n;let r=Un(),i=e_(),o=Ey(),{id:s=i||`headlessui-switch-${r}`,disabled:a=o||!1,checked:l,defaultChecked:u,onChange:c,name:d,value:h,form:p,autoFocus:f=!1,...m}=t,v=Bn(tS),[g,y]=On(null),_=o_(Dn(null),e,null===v?null:v.setSwitch,y),w=Gy(u),[b,x]=Uy(l,c,null!=w&&w),S=_y(),[k,E]=On(!1),P=xy((()=>{E(!0),null==x||x(!b),S.nextFrame((()=>{E(!1)}))})),T=xy((t=>{if(r_(t.currentTarget))return t.preventDefault();t.preventDefault(),P()})),A=xy((t=>{t.key===p_.Space?(t.preventDefault(),P()):t.key===p_.Enter&&zy(t.currentTarget)})),C=xy((t=>t.preventDefault())),R=v_(),O=l_(),{isFocusVisible:M,focusProps:F}=hy({autoFocus:f}),{isHovered:L,hoverProps:D}=dy({isDisabled:a}),{pressed:V,pressProps:I}=Sy({disabled:a}),j=In((()=>({checked:b,disabled:a,hover:L,focus:M,active:V,autofocus:f,changing:k})),[b,L,M,V,a,k,f]),B=Iy({id:s,ref:_,role:"switch",type:Z_(t,g),tabIndex:-1===t.tabIndex?0:null!=(n=t.tabIndex)?n:0,"aria-checked":b,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:A,onKeyPress:C},F,D,I),N=jn((()=>{if(void 0!==w)return null==x?void 0:x(w)}),[x,w]);return Xr.createElement(Xr.Fragment,null,null!=d&&Xr.createElement(Zy,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:b},form:p,onReset:N}),Fy({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),rS=function(t){var e;let[n,r]=On(null),[i,o]=g_(),[s,a]=u_(),l=In((()=>({switch:n,setSwitch:r})),[n,r]),u=t;return Xr.createElement(a,{name:"Switch.Description",value:s},Xr.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(e=l.switch)?void 0:e.id,onClick(t){n&&(t.currentTarget instanceof HTMLLabelElement&&t.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Xr.createElement(tS.Provider,{value:l},Fy({ourProps:{},theirProps:u,slot:{},defaultTag:eS,name:"Switch.Group"}))))},iS=__,oS=d_,sS=Object.assign(nS,{Group:rS,Label:iS,Description:oS});function aS(t,e){if(void 0===t.inserted[e.name])return t.insert("",e,t.sheet,!0)}function lS(t,e,n){var r=[],i=Ei(t,r,n);return r.length<2?n:i+e(r)}var uS=function t(e){for(var n="",r=0;r<e.length;r++){var i=e[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=t(i);else for(var s in o="",i)i[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},cS=function(t){var e=wn(t);e.sheet.speedy=function(t){this.isSpeedy=t},e.compat=!0;var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered,void 0);return Ti(e,i,!1),e.key+"-"+i.name};return{css:n,cx:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return lS(e.registered,n,uS(r))},injectGlobal:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered);aS(e,i)},keyframes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ni(n,e.registered),o="animation-"+i.name;return aS(e,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Ei.bind(null,e.registered),merge:lS.bind(null,e.registered,n)}}({key:"css"}),dS=cS.cx,hS=cS.css;const pS=Ms(Kx)`
|
|
46
46
|
${{position:"relative",minHeight:"2.25rem",width:"100%",cursor:"pointer",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.5rem",textAlign:"left",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--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)","--tw-ring-inset":"inset",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.5rem"},"@media (min-width: 768px)":{paddingTop:"0.375rem",paddingBottom:"0.375rem"}}}
|
|
47
47
|
|
|
48
48
|
${({hasError:t})=>t?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
|
|
49
|
-
`,
|
|
49
|
+
`,fS=Ms(__)`
|
|
50
50
|
${{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
|
|
51
|
-
`,pS=(t,e)=>{var n;return t?(null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue)??"Select":"Select"},fS=(t,e)=>t&&Array.isArray(t)&&0!==t.length?t.map((t=>{var n;return null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue})).join(", "):"Select",mS=er((({label:t,items:e,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io(Xx,{value:n||(a?[]:""),onChange:t=>{if(a){const n=t,r=t.findIndex((t=>{var n;return null==(n=e.find((e=>e.key==t)))?void 0:n.isReset}));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:t)}else i(t)},multiple:a,children:({open:r})=>oo(ro,{children:[io(hS,{children:t}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(dS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?fS(n,e):pS(n,e)}),io("span",{css:{pointerEvents:"none",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"#4b5563",paddingRight:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:io(Js,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(Ex,{show:r,leave:uS(cS({transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)",transitionDuration:"100ms"})),leaveFrom:uS(cS({opacity:"1"})),leaveTo:uS(cS({opacity:"0"})),children:io(Kx,{css:{position:"absolute",zIndex:"10",marginTop:"0.25rem",maxHeight:"15rem",width:"100%",overflow:"auto",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--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)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},children:e.map((t=>oo(Yx,{className:"group",css:{position:"relative",cursor:"default",userSelect:"none",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&[data-active]":{backgroundColor:"var(--fl-color-primary-600)","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},"&[data-selected]":{fontWeight:"600"}},value:t.key,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.displayValue}),io("span",{css:{visibility:"hidden",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingRight:"0.75rem",".group[data-selected] &":{visibility:"visible"},".group[data-active] &":{fill:"#fff"}},children:io(Xs,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},t.key)))})})]})]})}),o&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:o}),s&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:s})]}))),vS=t=>oo("div",{children:[oo(Px,{children:[io(g_,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t.label})}),io(iS,{checked:t.value,onChange:t.onChange,className:"group",css:{position:"relative",marginTop:"0.5rem",display:"inline-flex",height:"1.5rem",width:"2.75rem",flexShrink:"0",cursor:"pointer",borderRadius:"9999px",borderWidth:"2px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(79 70 229 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},"&[data-checked]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}},children:io("span",{"aria-hidden":"true",css:{pointerEvents:"none",display:"inline-block",height:"1.25rem",width:"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",".group[data-checked] &":{"--tw-translate-x":"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}})})]}),t.helperText&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:t.helperText})]}),gS=()=>{const t=function(){let{matches:t}=Bn(Ha),e=t[t.length-1];return e?e.params:{}}(),e=Ya(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=vo(),o=ds(),{isPending:s,error:a,data:l}=Es({queryKey:[vl],queryFn:i}),u=function(t){const e=ds(),[n]=On((()=>new us(e,t)));Fn((()=>{n.setOptions(t)}),[n,t]);const r=Yr(jn((t=>n.subscribe(zo.batchCalls(t))),[n]),(()=>n.getCurrentResult())),i=jn(((t,e)=>{n.mutate(t,e).catch(ys)}),[n]);if(r.error&&gs(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}({mutationFn:t.promotionId?r(t.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[vl]})}),c=uo(),d=In((()=>((t,e)=>{var n;return e?{id:e.id,category:e.category.title,promotionStatus:"Enabled"===e.status,contentfulUrl:(null==(n=e.contentfulContent)?void 0:n.contentId)?`${yl(t)}/entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:e.ignoreAudiencesIfUserNotFound??!1}:void 0})(c.backend,null==l?void 0:l.data.find((e=>e.id===t.promotionId)))),[c.backend,null==l?void 0:l.data,t.promotionId]),{handleSubmit:h,control:p}=function(t={}){const e=Xr.useRef(),n=Xr.useRef(),[r,i]=Xr.useState({isDirty:!1,isValidating:!1,isLoading:Xv(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Xv(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Mg(t),formState:r});const o=e.current.control;return o._options=t,Nv({subject:o._subjects.state,next:t=>{Iv(t,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Xr.useEffect((()=>o._disableForm(t.disabled)),[o,t.disabled]),Xr.useEffect((()=>{if(o._proxyFormState.isDirty){const t=o._getDirty();t!==r.isDirty&&o._subjects.state.next({isDirty:t})}}),[o,r.isDirty]),Xr.useEffect((()=>{t.values&&!pg(t.values,n.current)?(o._reset(t.values,o._options.resetOptions),n.current=t.values,i((t=>({...t})))):o._resetDefaultValues()}),[t.values,o]),Xr.useEffect((()=>{t.errors&&o._setErrors(t.errors)}),[t.errors,o]),Xr.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Xr.useEffect((()=>{t.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[t.shouldUnregister,o]),e.current.formState=Dv(r,o),e.current}({mode:"onBlur",values:{id:t.promotionId||"",category:(null==d?void 0:d.category)||"",isEnabled:(null==d?void 0:d.promotionStatus)||!1,ignoreAudiencesIfUserNotFound:(null==d?void 0:d.ignoreAudiencesIfUserNotFound)||!1}}),f=t=>{const e={promotionId:(n=t).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound};var n;u.mutate(e)};Fn((()=>{u.isSuccess&&e("/")}),[e,u]);const m=t.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return io("div",{children:"Loading..."});case"Edit"===m&&!!a:return oo("div",{children:[io("p",{children:a.message}),io("button",{css:{marginTop:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},onClick:()=>e("/"),children:"Back"})]});default:return oo("div",{css:{display:"flex",gap:"2rem",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[io("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:io("button",{onClick:()=>e("/"),children:"<"})}),oo("form",{onSubmit:h(f),children:[io("div",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(3rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(3rem * var(--tw-space-y-reverse))"}},children:oo("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[oo("h2",{css:{fontSize:"1rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:[m," Promotion"]}),oo("p",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:[m," a promoted benefit"]}),oo("div",{css:{marginTop:"2.5rem",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",columnGap:"1.5rem",rowGap:"2rem","@media (min-width: 640px)":{gridTemplateColumns:"repeat(6, minmax(0, 1fr))"}},children:[io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"id",control:p,rules:{required:"Please provide an ID",pattern:{value:/^[a-z0-9\\-]+$/i,message:"Id must be lowercase and can only contain letters, numbers and hyphens."}},render:({field:t,fieldState:e})=>{var n;return io(Ws,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:null==(n=e.error)?void 0:n.message,...t})}})}),"Edit"===m&&d&&oo("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[io("label",{css:{marginBottom:"0.5rem",display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contentful"}),d.contentfulUrl?oo("a",{href:d.contentfulUrl,target:"_blank",rel:"noopener noreferrer",css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]}):io("div",{css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})]}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:t,fieldState:e})=>{var n;return io(mS,{items:[{key:"cars",displayValue:"Cars"},{key:"health",displayValue:"Health"},{key:"energy",displayValue:"Energy"},{key:"everyday",displayValue:"Everyday"},{key:"savingsAccount",displayValue:"Savings Account"},{key:"homeLoan",displayValue:"Home Loan"}],label:"Category",error:null==(n=e.error)?void 0:n.message,...t})}})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"isEnabled",control:p,render:({field:t})=>io(vS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...t})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(Hv,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:t})=>io(vS,{label:"Ignore audiences if user does not exist",id:"id",helperText:"Show this promotion to a user even if they do not exist in Segment, regardless of the configured audiences.",...t})})})]})]})}),u.isError&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:u.error.message}),io("div",{css:{marginTop:"1.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end",columnGap:"1.5rem"},children:u.isPending?io("div",{css:{fontSize:"0.875rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Loading..."}):io("button",{type:"submit",css:{borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:"Save"})})]})]})}},yS=t=>io(Jm.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===t.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===t.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:io("div",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:io("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:t.children})})}),_S=t=>{const e=qa(),[n,r]=On("forward");var i;return i={backend:{url:t.backendUrl,accessToken:t.accessToken}},lo=oe({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Fn((()=>{if("/"===e.pathname)r("forward");else r("backward")}),[e.pathname]),io("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:io(sv,{initial:!1,children:oo(sl,{location:e,children:[io(il,{path:"/",element:io(yS,{direction:n,children:io(_l,{})})}),io(il,{path:"/promotion",element:io(yS,{direction:n,children:io(gS,{})})}),io(il,{path:"/promotion/:promotionId",element:io(yS,{direction:n,children:io(gS,{})})})]},e.pathname)})})};!function(t,e,n,r){function i(){var e=Reflect.construct(HTMLElement,[],i);return e._vdomComponent=t,e._root=r&&r.shadow?e.attachShadow({mode:r.mode||"open"}):e,e}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ue,i.prototype.attributeChangedCallback=de,i.prototype.disconnectedCallback=he,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),i.observedAttributes=n,n.forEach((function(t){Object.defineProperty(i.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,i)}((t=>{const e=Dn(null),{EmotionProvider:n}=((t,e)=>{const[n,r]=On();return Fn((()=>{if(e&&e.current){const n=e=>{document.getElementsByTagName(t).length>0?e():requestAnimationFrame((()=>n(e)))};n((()=>{r(wn({container:e.current,key:t}))}))}}),[t,e]),{EmotionProvider:({children:t})=>n?io($i,{value:n,children:t}):io(ro,{})}})("promoted-benefits-admin",e);return oo(ro,{children:[io("head",{ref:e}),io(n,{children:io(hs,{client:ml(),children:oo(ul,{basename:t.hashRouteBase,children:[io(ao,{}),io("body",{children:io(_S,{...t})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();
|
|
51
|
+
`,mS=(t,e)=>{var n;return t?(null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue)??"Select":"Select"},vS=(t,e)=>t&&Array.isArray(t)&&0!==t.length?t.map((t=>{var n;return null==(n=e.find((e=>e.key==t)))?void 0:n.displayValue})).join(", "):"Select",gS=er((({label:t,items:e,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>oo("div",{className:r,children:[io(Jx,{value:n||(a?[]:""),onChange:t=>{if(a){const n=t,r=t.findIndex((t=>{var n;return null==(n=e.find((e=>e.key==t)))?void 0:n.isReset}));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:t)}else i(t)},multiple:a,children:({open:r})=>oo(ro,{children:[io(fS,{children:t}),oo("div",{css:{position:"relative",marginTop:"0.5rem"},children:[oo(pS,{as:"button",ref:l,hasError:!!o,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?vS(n,e):mS(n,e)}),io("span",{css:{pointerEvents:"none",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"#4b5563",paddingRight:"0.75rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:io(Js,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),io(Tx,{show:r,leave:dS(hS({transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)",transitionDuration:"100ms"})),leaveFrom:dS(hS({opacity:"1"})),leaveTo:dS(hS({opacity:"0"})),children:io(Qx,{css:{position:"absolute",zIndex:"10",marginTop:"0.25rem",maxHeight:"15rem",width:"100%",overflow:"auto",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--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)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"@media (min-width: 640px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}},children:e.map((t=>oo(Xx,{className:"group",css:{position:"relative",cursor:"default",userSelect:"none",paddingTop:"0.5rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",paddingRight:"2.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&[data-active]":{backgroundColor:"var(--fl-color-primary-600)","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},"&[data-selected]":{fontWeight:"600"}},value:t.key,children:[io("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.displayValue}),io("span",{css:{visibility:"hidden",position:"absolute",top:"0px",bottom:"0px",right:"0px",display:"flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingRight:"0.75rem",".group[data-selected] &":{visibility:"visible"},".group[data-active] &":{fill:"#fff"}},children:io(Xs,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},t.key)))})})]})]})}),o&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:o}),s&&io("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:s})]}))),yS=t=>oo("div",{children:[oo(Ax,{children:[io(__,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:io("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:t.label})}),io(sS,{checked:t.value,onChange:t.onChange,className:"group",css:{position:"relative",marginTop:"0.5rem",display:"inline-flex",height:"1.5rem",width:"2.75rem",flexShrink:"0",cursor:"pointer",borderRadius:"9999px",borderWidth:"2px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(79 70 229 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},"&[data-checked]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}},children:io("span",{"aria-hidden":"true",css:{pointerEvents:"none",display:"inline-block",height:"1.25rem",width:"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms",".group[data-checked] &":{"--tw-translate-x":"1.25rem",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}})})]}),t.helperText&&io("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:t.helperText})]}),_S=()=>{const t=function(){let{matches:t}=Bn(za),e=t[t.length-1];return e?e.params:{}}(),e=Xa(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=vo(),o=ds(),{isPending:s,error:a,data:l}=Es({queryKey:[yl],queryFn:i}),u=function(t){const e=ds(),[n]=On((()=>new us(e,t)));Fn((()=>{n.setOptions(t)}),[n,t]);const r=Yr(jn((t=>n.subscribe(zo.batchCalls(t))),[n]),(()=>n.getCurrentResult())),i=jn(((t,e)=>{n.mutate(t,e).catch(ys)}),[n]);if(r.error&&gs(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}({mutationFn:t.promotionId?r(t.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[yl]})}),c=uo(),d=In((()=>((t,e)=>{var n;return e?{id:e.id,category:e.category.title,promotionStatus:"Enabled"===e.status,contentfulUrl:(null==(n=e.contentfulContent)?void 0:n.contentId)?`${wl(t)}/entries/${e.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:e.ignoreAudiencesIfUserNotFound??!1}:void 0})(c.backend,null==l?void 0:l.data.find((e=>e.id===t.promotionId)))),[c.backend,null==l?void 0:l.data,t.promotionId]),{handleSubmit:h,control:p}=function(t={}){const e=Xr.useRef(),n=Xr.useRef(),[r,i]=Xr.useState({isDirty:!1,isValidating:!1,isLoading:Jv(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Jv(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Lg(t),formState:r});const o=e.current.control;return o._options=t,Gv({subject:o._subjects.state,next:t=>{Bv(t,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Xr.useEffect((()=>o._disableForm(t.disabled)),[o,t.disabled]),Xr.useEffect((()=>{if(o._proxyFormState.isDirty){const t=o._getDirty();t!==r.isDirty&&o._subjects.state.next({isDirty:t})}}),[o,r.isDirty]),Xr.useEffect((()=>{t.values&&!mg(t.values,n.current)?(o._reset(t.values,o._options.resetOptions),n.current=t.values,i((t=>({...t})))):o._resetDefaultValues()}),[t.values,o]),Xr.useEffect((()=>{t.errors&&o._setErrors(t.errors)}),[t.errors,o]),Xr.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Xr.useEffect((()=>{t.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[t.shouldUnregister,o]),e.current.formState=Iv(r,o),e.current}({mode:"onBlur",values:{id:t.promotionId||"",category:(null==d?void 0:d.category)||"",isEnabled:(null==d?void 0:d.promotionStatus)||!1,ignoreAudiencesIfUserNotFound:(null==d?void 0:d.ignoreAudiencesIfUserNotFound)||!1}}),f=t=>{const e={promotionId:(n=t).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound};var n;u.mutate(e)};Fn((()=>{u.isSuccess&&e("/")}),[e,u]);const m=t.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return io("div",{children:"Loading..."});case"Edit"===m&&!!a:return oo("div",{children:[io("p",{children:a.message}),io("button",{css:{marginTop:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},onClick:()=>e("/"),children:"Back"})]});default:return oo("div",{css:{display:"flex",gap:"2rem",paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[io("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:io("button",{onClick:()=>e("/"),children:"<"})}),oo("form",{onSubmit:h(f),children:[io("div",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(3rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(3rem * var(--tw-space-y-reverse))"}},children:oo("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[oo("h2",{css:{fontSize:"1rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:[m," Promotion"]}),oo("p",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},children:[m," a promoted benefit"]}),oo("div",{css:{marginTop:"2.5rem",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",columnGap:"1.5rem",rowGap:"2rem","@media (min-width: 640px)":{gridTemplateColumns:"repeat(6, minmax(0, 1fr))"}},children:[io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(zv,{name:"id",control:p,rules:{required:"Please provide an ID",pattern:{value:/^[a-z0-9\\-]+$/i,message:"Id must be lowercase and can only contain letters, numbers and hyphens."}},render:({field:t,fieldState:e})=>{var n;return io($s,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:null==(n=e.error)?void 0:n.message,...t})}})}),"Edit"===m&&d&&oo("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[io("label",{css:{marginBottom:"0.5rem",display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contentful"}),d.contentfulUrl?oo("a",{href:d.contentfulUrl,target:"_blank",rel:"noopener noreferrer",css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:[io("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),io(Ls,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]}):io("div",{css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(185 28 28 / var(--tw-text-opacity))","--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)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(220 38 38 / 0.2)"},children:"Unlinked"})]}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(zv,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:t,fieldState:e})=>{var n;return io(gS,{items:[{key:"cars",displayValue:"Cars"},{key:"health",displayValue:"Health"},{key:"energy",displayValue:"Energy"},{key:"everyday",displayValue:"Everyday"},{key:"savingsAccount",displayValue:"Savings Account"},{key:"homeLoan",displayValue:"Home Loan"}],label:"Category",error:null==(n=e.error)?void 0:n.message,...t})}})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(zv,{name:"isEnabled",control:p,render:({field:t})=>io(yS,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...t})})}),io("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:io(zv,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:t})=>io(yS,{label:"Ignore audiences if user does not exist",id:"id",helperText:"Show this promotion to a user even if they do not exist in Segment, regardless of the configured audiences.",...t})})})]})]})}),u.isError&&io("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:u.error.message}),io("div",{css:{marginTop:"1.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end",columnGap:"1.5rem"},children:u.isPending?io("div",{css:{fontSize:"0.875rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Loading..."}):io("button",{type:"submit",css:{borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:"Save"})})]})]})}},wS=t=>io(ev.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===t.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===t.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:io("div",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:io("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:t.children})})}),bS=t=>{const e=Ya(),[n,r]=On("forward");var i;return i={backend:{url:t.backendUrl,accessToken:t.accessToken}},lo=oe({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Fn((()=>{if("/"===e.pathname)r("forward");else r("backward")}),[e.pathname]),io("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:io(lv,{initial:!1,children:oo(ll,{location:e,children:[io(sl,{path:"/",element:io(wS,{direction:n,children:io(bl,{})})}),io(sl,{path:"/promotion",element:io(wS,{direction:n,children:io(_S,{})})}),io(sl,{path:"/promotion/:promotionId",element:io(wS,{direction:n,children:io(_S,{})})})]},e.pathname)})})};!function(t,e,n,r){function i(){var e=Reflect.construct(HTMLElement,[],i);return e._vdomComponent=t,e._root=r&&r.shadow?e.attachShadow({mode:r.mode||"open"}):e,e}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ue,i.prototype.attributeChangedCallback=de,i.prototype.disconnectedCallback=he,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),i.observedAttributes=n,n.forEach((function(t){Object.defineProperty(i.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,i)}((t=>{const e=Dn(null),{EmotionProvider:n}=((t,e)=>{const[n,r]=On();return Fn((()=>{if(e&&e.current){const n=e=>{document.getElementsByTagName(t).length>0?e():requestAnimationFrame((()=>n(e)))};n((()=>{r(wn({container:e.current,key:t}))}))}}),[t,e]),{EmotionProvider:({children:t})=>n?io($i,{value:n,children:t}):io(ro,{})}})("promoted-benefits-admin",e);return oo(ro,{children:[io("head",{ref:e}),io(n,{children:io(hs,{client:gl(),children:oo(dl,{basename:t.hashRouteBase,children:[io(ao,{}),io("body",{children:io(bS,{...t})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();
|