@flarehr/promoted-benefits-admin 0.4.21156 → 0.4.30346

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(){var e,t,n,r,i,o,s,a,l,u,c,d=Object.create,h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,m=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty,g=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(nx){throw n=[nx],nx}},y=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),b=(e,t)=>{let n={};for(var r in e)h(n,r,{get:e[r],enumerable:!0});return t||h(n,Symbol.toStringTag,{value:"Module"}),n},w=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=f(t),s=0,a=o.length;s<a;s++)i=o[s],v.call(e,i)||i===n||h(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=p(t,i))||r.enumerable});return e},x=(e,t,n)=>(n=null!=e?d(m(e)):{},w(!t&&e&&e.__esModule?n:h(n,"default",{value:e,enumerable:!0}),e)),_={},S=[],E=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,P=Array.isArray;function k(e,t){for(var n in t)e[n]=t[n];return e}function T(e){var t=e.parentNode;t&&t.removeChild(e)}function C(t,n,r){var i,o,s,a={};for(s in n)"key"==s?i=n[s]:"ref"==s?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return A(t,a,i,o,null)}function A(e,r,i,o,s){var a={type:e,props:r,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=t.vnode&&t.vnode(a),a}function R(){return{current:null}}function O(e){return e.children}function F(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!V.__r++||i!==t.debounceRendering)&&((i=t.debounceRendering)||o)(V)}function V(){var e,n,i,o,a,l,u,c;for(r.sort(s);e=r.shift();)e.__d&&(n=r.length,o=void 0,l=(a=(i=e).__v).__e,u=[],c=[],i.__P&&((o=k({},a)).__v=a.__v+1,t.vnode&&t.vnode(o),W(i.__P,o,a,i.__n,i.__P.namespaceURI,32&a.__u?[l]:null,u,null==l?L(a):l,!!(32&a.__u),c),o.__v=a.__v,o.__.__k[o.__i]=o,z(u,o,c),o.__e!=l&&D(o)),r.length>n&&r.sort(s));V.__r=0}function I(e,t,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||S,g=t.length;for(n.__d=l,function(e,t,n){var r,i,o,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)s=r+d,null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?A(null,i,null,null,null):P(i)?A(O,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?A(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=N(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==e.__d&&(e.__d=L(o)),Q(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=L(o)),Q(o,o))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?_:v[p.__i]||_,p.__i=d,W(e,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&q(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=j(p,l,e):"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 j(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=j(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=L(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(P(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function N(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[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<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function U(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||E.test(t)?n:n+"px"}function H(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||U(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||U(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=a,e.addEventListener(t,o?u:l,o)):e.removeEventListener(t,o?u:l,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function $(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n.t)n.t=a++;else if(n.t<r.u)return;return r(t.event?t.event(n):n)}}}function W(n,r,i,o,s,a,l,u,c,d){var h,p,f,m,v,g,y,b,w,x,S,E,C,A,R,D,M=r.type;if(void 0!==r.constructor)return null;128&i.__u&&(c=!!(32&i.__u),a=[u=r.__e=i.__e]),(h=t.__b)&&h(r);e:if("function"==typeof M)try{if(b=r.props,w="prototype"in M&&M.prototype.render,x=(h=M.contextType)&&o[h.__c],S=h?x?x.props.value:h.__:o,i.__c?y=(p=r.__c=i.__c).__=p.__E:(w?r.__c=p=new M(b,S):(r.__c=p=new F(b,S),p.constructor=M,p.render=K),x&&x.sub(p),p.props=b,p.state||(p.state={}),p.context=S,p.__n=o,f=p.__d=!0,p.__h=[],p._sb=[]),w&&null==p.__s&&(p.__s=p.state),w&&null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=k({},p.__s)),k(p.__s,M.getDerivedStateFromProps(b,p.__s))),m=p.props,v=p.state,p.__v=r,f)w&&null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),w&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(w&&null==M.getDerivedStateFromProps&&b!==m&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,S),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,S)||r.__v===i.__v)){for(r.__v!==i.__v&&(p.props=b,p.state=p.__s,p.__d=!1),r.__e=i.__e,r.__k=i.__k,r.__k.forEach((function(e){e&&(e.__=r)})),E=0;E<p._sb.length;E++)p.__h.push(p._sb[E]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,S),w&&null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(m,v,g)}))}if(p.context=S,p.props=b,p.__P=n,p.__e=!1,C=t.__r,A=0,w){for(p.state=p.__s,p.__d=!1,C&&C(r),h=p.render(p.props,p.state,p.context),R=0;R<p._sb.length;R++)p.__h.push(p._sb[R]);p._sb=[]}else do{p.__d=!1,C&&C(r),h=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++A<25);p.state=p.__s,null!=p.getChildContext&&(o=k(k({},o),p.getChildContext())),w&&!f&&null!=p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(m,v)),I(n,P(D=null!=h&&h.type===O&&null==h.key?h.props.children:h)?D:[D],r,i,o,s,a,l,u,c,d),p.base=r.__e,r.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(n){if(r.__v=null,c||null!=a){for(r.__u|=c?160:32;u&&8===u.nodeType&&u.nextSibling;)u=u.nextSibling;a[a.indexOf(u)]=null,r.__e=u}else r.__e=i.__e,r.__k=i.__k;t.__e(n,r,i)}else null==a&&r.__v===i.__v?(r.__k=i.__k,r.__e=i.__e):r.__e=function(t,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g=r.props,y=n.props,b=n.type;if("svg"===b?o="http://www.w3.org/2000/svg":"math"===b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=s)for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!b&&(b?f.localName===b:3===f.nodeType)){t=f,s[c]=null;break}if(null==t){if(null===b)return document.createTextNode(y);t=document.createElementNS(o,b,y.is&&y),s=null,l=!1}if(null===b)g===y||l&&t.data===y||(t.data=y);else{if(s=s&&e.call(t.childNodes),g=r.props||_,!l&&null!=s)for(g={},c=0;c<t.attributes.length;c++)g[(f=t.attributes[c]).name]=f.value;for(c in g)if(f=g[c],"children"==c);else if("dangerouslySetInnerHTML"==c)h=f;else if("key"!==c&&!(c in y)){if("value"==c&&"defaultValue"in y||"checked"==c&&"defaultChecked"in y)continue;H(t,c,null,f,o)}for(c in y)f=y[c],"children"==c?p=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?m=f:"checked"==c?v=f:"key"===c||l&&"function"!=typeof f||g[c]===f||H(t,c,f,g[c],o);if(d)l||h&&(d.__html===h.__html||d.__html===t.innerHTML)||(t.innerHTML=d.__html),n.__k=[];else if(h&&(t.innerHTML=""),I(t,P(p)?p:[p],n,r,i,"foreignObject"===b?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:r.__k&&L(r,0),l,u),null!=s)for(c=s.length;c--;)null!=s[c]&&T(s[c]);l||(c="value",void 0!==m&&(m!==t[c]||"progress"===b&&!m||"option"===b&&m!==g[c])&&H(t,c,m,g[c],o),c="checked",void 0!==v&&v!==t[c]&&H(t,c,v,g[c],o))}return t}(i.__e,r,i,o,s,a,l,c,d);(h=t.diffed)&&h(r)}function z(e,n,r){n.__d=void 0;for(var i=0;i<r.length;i++)q(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function q(e,n,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function Q(e,n,r){var i,o;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||q(i,null,n)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Q(i[o],n,r||"function"!=typeof e.type);r||null==e.__e||T(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function K(e,t,n){return this.constructor(e,n)}function G(n,r,i){var o,s,a,l;t.__&&t.__(n,r),s=(o="function"==typeof i)?null:i&&i.__k||r.__k,a=[],l=[],W(r,n=(!o&&i||r).__k=C(O,null,[n]),s||_,_,r.namespaceURI,!o&&i?[i]:s?null:r.firstChild?e.call(r.childNodes):null,a,!o&&i?i:s?s.__e:r.firstChild,o,l),z(a,n,l)}function Y(e,t){G(e,t,Y)}function X(t,n,r){var i,o,s,a,l=k({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),n)"key"==s?i=n[s]:"ref"==s?o=n[s]:l[s]=void 0===n[s]&&void 0!==a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),A(t.type,l,i||t.key,o||t.ref,null)}function Z(e,t){var n={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e=S.slice,t={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},n=0,F.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=k({},this.state);"function"==typeof e&&(e=e(k({},n),this.props)),e&&k(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},F.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},F.prototype.render=O,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},V.__r=0,a=0,l=$(!1),u=$(!0),c=0;var ee=["context","children"];function te(e){return this.getChildContext=function(){return e.context},X(e.children,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,ee))}function ne(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=C(te,J({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[re(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),u=a[o].slot;u?i[u]=C(se,{name:u},l):r[o]=l}var c=n?C(se,null,r):r;return C(n||t.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Y:G)(this._vdom,this._root)}function re(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function ie(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[re(e)]=n,this._vdom=X(this._vdom,r),G(this._vdom,this._root)}}function oe(){G(this._vdom=null,this._root)}function se(e,t){var n=this;return C("slot",J({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var ae=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(nx){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),le="-ms-",ue="-moz-",ce="-webkit-",de="comm",he="rule",pe="decl",fe="@keyframes",me=Math.abs,ve=String.fromCharCode,ge=Object.assign;function ye(e){return e.trim()}function be(e,t,n){return e.replace(t,n)}function we(e,t){return e.indexOf(t)}function xe(e,t){return 0|e.charCodeAt(t)}function _e(e,t,n){return e.slice(t,n)}function Se(e){return e.length}function Ee(e){return e.length}function Pe(e,t){return t.push(e),e}var ke=1,Te=1,Ce=0,Ae=0,Re=0,Oe="";function Fe(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ke,column:Te,length:s,return:""}}function Le(e,t){return ge(Fe("",null,null,"",null,null,0),e,{length:-e.length},t)}function De(){return Re=Ae>0?xe(Oe,--Ae):0,Te--,10===Re&&(Te=1,ke--),Re}function Me(){return Re=Ae<Ce?xe(Oe,Ae++):0,Te++,10===Re&&(Te=1,ke++),Re}function Ve(){return xe(Oe,Ae)}function Ie(){return Ae}function je(e,t){return _e(Oe,e,t)}function Be(e){switch(e){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 Ne(e){return ke=Te=1,Ce=Se(Oe=e),Ae=0,[]}function Ue(e){return Oe="",e}function He(e){return ye(je(Ae-1,ze(91===e?e+2:40===e?e+1:e)))}function $e(e){for(;(Re=Ve())&&Re<33;)Me();return Be(e)>2||Be(Re)>3?"":" "}function We(e,t){for(;--t&&Me()&&!(Re<48||Re>102||Re>57&&Re<65||Re>70&&Re<97););return je(e,Ie()+(t<6&&32==Ve()&&32==Me()))}function ze(e){for(;Me();)switch(Re){case e:return Ae;case 34:case 39:34!==e&&39!==e&&ze(Re);break;case 40:41===e&&ze(e);break;case 92:Me()}return Ae}function qe(e,t){for(;Me()&&e+Re!==57&&(e+Re!==84||47!==Ve()););return"/*"+je(t,Ae-1)+"*"+ve(47===e?e:Me())}function Qe(e){for(;!Be(Ve());)Me();return je(e,Ae)}function Ke(e){return Ue(Ge("",null,null,null,[""],e=Ne(e),0,[0],e))}function Ge(e,t,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,b="",w=i,x=o,_=r,S=b;v;)switch(f=y,y=Me()){case 40:if(108!=f&&58==xe(S,d-1)){-1!=we(S+=be(He(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=He(y);break;case 9:case 10:case 13:case 32:S+=$e(f);break;case 92:S+=We(Ie()-1,7);continue;case 47:switch(Ve()){case 42:case 47:Pe(Xe(qe(Me(),Ie()),t,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Se(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=be(S,/\f/g,"")),p>0&&Se(S)-d&&Pe(p>32?Ze(S+";",r,n,d-1):Ze(be(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Pe(_=Ye(S,t,n,u,c,i,a,b,w=[],x=[],d),o),123===y)if(0===c)Ge(S,t,_,_,w,o,d,a,x);else switch(99===h&&110===xe(S,3)?100:h){case 100:case 108:case 109:case 115:Ge(e,_,_,r&&Pe(Ye(e,_,_,0,0,i,a,b,i,w=[],d),x),i,x,d,a,r?w:x);break;default:Ge(S,_,_,_,[""],x,0,a,x)}}u=c=p=0,m=g=1,b=S="",d=s;break;case 58:d=1+Se(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==De())continue;switch(S+=ve(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Se(S)-1)*g,g=1;break;case 64:45===Ve()&&(S+=He(Me())),h=Ve(),c=d=Se(b=S+=Qe(Ie())),y++;break;case 45:45===f&&2==Se(S)&&(m=0)}}return o}function Ye(e,t,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Ee(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=_e(e,d+1,d=me(m=s[f])),b=e;g<p;++g)(b=ye(m>0?h[g]+" "+y:be(y,/&\f/g,h[g])))&&(l[v++]=b);return Fe(e,t,n,0===i?he:a,l,u,c)}function Xe(e,t,n){return Fe(e,t,n,de,ve(Re),_e(e,2,-2),0)}function Ze(e,t,n,r){return Fe(e,t,n,pe,_e(e,0,r),_e(e,r+1,-1),r)}function Je(e,t){for(var n="",r=Ee(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function et(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case pe:return e.return=e.return||e.value;case de:return"";case fe:return e.return=e.value+"{"+Je(e.children,r)+"}";case he:e.value=e.props.join(",")}return Se(n=Je(e.children,r))?e.return=e.value+"{"+n+"}":""}function tt(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var nt=g((()=>{})),rt=function(e,t,n){for(var r=0,i=0;r=i,i=Ve(),38===r&&12===i&&(t[n]=1),!Be(i);)Me();return je(e,Ae)},it=function(e,t){return Ue(function(e,t){var n=-1,r=44;do{switch(Be(r)){case 0:38===r&&12===Ve()&&(t[n]=1),e[n]+=rt(Ae-1,t,n);break;case 2:e[n]+=He(r);break;case 4:if(44===r){e[++n]=58===Ve()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ve(r)}}while(r=Me());return e}(Ne(e),t))},ot=new WeakMap,st=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ot.get(n))&&!r){ot.set(e,!0);for(var i=[],o=it(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},at=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function lt(e,t){switch(function(e,t){return 45^xe(e,0)?(((t<<2^xe(e,0))<<2^xe(e,1))<<2^xe(e,2))<<2^xe(e,3):0}(e,t)){case 5103:return ce+"print-"+e+e;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 ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ce+e+ue+e+le+e+e;case 6828:case 4268:return ce+e+le+e+e;case 6165:return ce+e+le+"flex-"+e+e;case 5187:return ce+e+be(e,/(\w+).+(:[^]+)/,ce+"box-$1$2"+le+"flex-$1$2")+e;case 5443:return ce+e+le+"flex-item-"+be(e,/flex-|-self/,"")+e;case 4675:return ce+e+le+"flex-line-pack"+be(e,/align-content|flex-|-self/,"")+e;case 5548:return ce+e+le+be(e,"shrink","negative")+e;case 5292:return ce+e+le+be(e,"basis","preferred-size")+e;case 6060:return ce+"box-"+be(e,"-grow","")+ce+e+le+be(e,"grow","positive")+e;case 4554:return ce+be(e,/([^-])(transform)/g,"$1"+ce+"$2")+e;case 6187:return be(be(be(e,/(zoom-|grab)/,ce+"$1"),/(image-set)/,ce+"$1"),e,"")+e;case 5495:case 3959:return be(e,/(image-set\([^]*)/,ce+"$1$`$1");case 4968:return be(be(e,/(.+:)(flex-)?(.*)/,ce+"box-pack:$3"+le+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ce+e+e;case 4095:case 3583:case 4068:case 2532:return be(e,/(.+)-inline(.+)/,ce+"$1$2")+e;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(Se(e)-1-t>6)switch(xe(e,t+1)){case 109:if(45!==xe(e,t+4))break;case 102:return be(e,/(.+:)(.+)-([^]+)/,"$1"+ce+"$2-$3$1"+ue+(108==xe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~we(e,"stretch")?lt(be(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==xe(e,t+1))break;case 6444:switch(xe(e,Se(e)-3-(~we(e,"!important")&&10))){case 107:return be(e,":",":"+ce)+e;case 101:return be(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ce+(45===xe(e,14)?"inline-":"")+"box$3$1"+ce+"$2$3$1"+le+"$2box$3")+e}break;case 5936:switch(xe(e,t+11)){case 114:return ce+e+le+be(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ce+e+le+be(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ce+e+le+be(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ce+e+le+e+e}return e}var ut,ct,dt,ht,pt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case pe:e.return=lt(e.value,e.length);break;case fe:return Je([Le(e,{value:be(e.value,"@","@"+ce)})],r);case he:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Je([Le(e,{props:[be(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Je([Le(e,{props:[be(t,/:(plac\w+)/,":"+ce+"input-$1")]}),Le(e,{props:[be(t,/:(plac\w+)/,":-moz-$1")]}),Le(e,{props:[be(t,/:(plac\w+)/,le+"input-$1")]})],r)}return""}))}}],ft=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||pt,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,u,c=[et,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=Ee(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}([st,at].concat(o,c));i=function(e,t,n,r){l=n,Je(Ke(e?e+"{"+t.styles+"}":t.styles),d),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new ae({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h},mt=0,vt=[],gt=t,yt=gt.__b,bt=gt.__r,wt=gt.diffed,xt=gt.__c,_t=gt.unmount,St=gt.__;function Et(e,t){gt.__h&&gt.__h(ct,e,mt||t),mt=0;var n=ct.__H||(ct.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Pt(e){return mt=1,kt($t,e)}function kt(e,t,n){var r=Et(ut++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$t(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ct,!ct.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};ct.u=!0;var o=ct.shouldComponentUpdate,s=ct.componentWillUpdate;ct.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},ct.shouldComponentUpdate=i}return r.__N||r.__}function Tt(e,t){var n=Et(ut++,3);!gt.__s&&Ht(n.__H,t)&&(n.__=e,n.i=t,ct.__H.__h.push(n))}function Ct(e,t){var n=Et(ut++,4);!gt.__s&&Ht(n.__H,t)&&(n.__=e,n.i=t,ct.__h.push(n))}function At(e){return mt=5,Ot((function(){return{current:e}}),[])}function Rt(e,t,n){mt=6,Ct((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function Ot(e,t){var n=Et(ut++,7);return Ht(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ft(e,t){return mt=8,Ot((function(){return e}),t)}function Lt(e){var t=ct.context[e.__c],n=Et(ut++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(ct)),t.props.value):e.__}function Dt(e,t){gt.useDebugValue&&gt.useDebugValue(t?t(e):e)}function Mt(e){var t=Et(ut++,10),n=Pt();return t.__=e,ct.componentDidCatch||(ct.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Vt(){var e=Et(ut++,11);if(!e.__){for(var t=ct.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function It(){for(var e;e=vt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Nt),e.__H.__h.forEach(Ut),e.__H.__h=[]}catch(Jy){e.__H.__h=[],gt.__e(Jy,e.__v)}}gt.__b=function(e){ct=null,yt&&yt(e)},gt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),St&&St(e,t)},gt.__r=function(e){bt&&bt(e),ut=0;var t=(ct=e.__c).__H;t&&(dt===ct?(t.__h=[],ct.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(Nt),t.__h.forEach(Ut),t.__h=[],ut=0)),dt=ct},gt.diffed=function(e){wt&&wt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==vt.push(t)&&ht===gt.requestAnimationFrame||((ht=gt.requestAnimationFrame)||Bt)(It)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),dt=ct=null},gt.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Nt),e.__h=e.__h.filter((function(e){return!e.__||Ut(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],gt.__e(n,e.__v)}})),xt&&xt(e,t)},gt.unmount=function(e){_t&&_t(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Nt(e)}catch(e){t=e}})),n.__H=void 0,t&&gt.__e(t,n.__v))};var jt="function"==typeof requestAnimationFrame;function Bt(e){var t,n=function(){clearTimeout(r),jt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);jt&&(t=requestAnimationFrame(n))}function Nt(e){var t=ct,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ct=t}function Ut(e){var t=ct;e.__c=e.__(),ct=t}function Ht(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function $t(e,t){return"function"==typeof t?t(e):t}var Wt=b({Children:()=>Jt,Component:()=>F,Fragment:()=>O,PureComponent:()=>Qt,StrictMode:()=>Un,Suspense:()=>on,SuspenseList:()=>ln,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Rn,cloneElement:()=>Vn,createContext:()=>Z,createElement:()=>C,createFactory:()=>Fn,createPortal:()=>hn,createRef:()=>R,default:()=>Gn,findDOMNode:()=>jn,flushSync:()=>Nn,forwardRef:()=>Xt,hydrate:()=>wn,isElement:()=>qn,isFragment:()=>Dn,isMemo:()=>Mn,isValidElement:()=>Ln,lazy:()=>an,memo:()=>Kt,render:()=>bn,startTransition:()=>Hn,unmountComponentAtNode:()=>In,unstable_batchedUpdates:()=>Bn,useCallback:()=>Ft,useContext:()=>Lt,useDebugValue:()=>Dt,useDeferredValue:()=>$n,useEffect:()=>Tt,useErrorBoundary:()=>Mt,useId:()=>Vt,useImperativeHandle:()=>Rt,useInsertionEffect:()=>zn,useLayoutEffect:()=>Ct,useMemo:()=>Ot,useReducer:()=>kt,useRef:()=>At,useState:()=>Pt,useSyncExternalStore:()=>Qn,useTransition:()=>Wn,version:()=>On});function zt(e,t){for(var n in t)e[n]=t[n];return e}function qt(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Qt(e,t){this.props=e,this.context=t}function Kt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:qt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,C(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Qt.prototype=new F).isPureReactComponent=!0,Qt.prototype.shouldComponentUpdate=function(e,t){return qt(this.props,e)||qt(this.state,t)};var Gt=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Gt&&Gt(e)};var Yt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Xt(e){function t(t){var n=zt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Yt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Zt=function(e,t){return null==e?null:B(B(e).map(t))},Jt={map:Zt,forEach:Zt,count:function(e){return e?B(e).length:0},only:function(e){var t=B(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:B},en=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);en(e,t,n,r)};var tn=t.unmount;function nn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=zt({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return nn(e,t,n)}))),e}function rn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return rn(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function on(){this.__u=0,this.t=null,this.__b=null}function sn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function an(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return C(n,i)}return i.displayName="Lazy",i.__f=!0,i}function ln(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),tn&&tn(e)},(on.prototype=new F).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=sn(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 e=r.state.__a;r.__v.__k[0]=rn(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},on.prototype.componentWillUnmount=function(){this.t=[]},on.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=nn(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&C(O,null,e.fallback);return i&&(i.__u&=-33),[C(O,null,t.__a?null:e.children),i]};var un=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function cn(e){return this.getChildContext=function(){return e.context},e.children}function dn(e){var t=this,n=e.i;t.componentWillUnmount=function(){G(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),G(C(cn,{context:t.context},e.__v),t.l)}function hn(e,t){var n=C(dn,{__v:e,i:t});return n.containerInfo=t,n}(ln.prototype=new F).__a=function(e){var t=this,n=sn(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),un(t,e,r)):i()};n?n(o):o()}},ln.prototype.render=function(e){this.u=null,this.o=new Map;var t=B(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ln.prototype.componentDidUpdate=ln.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){un(e,n,t)}))};var pn="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,fn=/^(?: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]/,mn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,vn=/[A-Z0-9]/g,gn="undefined"!=typeof document,yn=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function bn(e,t,n){return t.__k??(t.textContent=""),G(e,t),"function"==typeof n&&n(),e?e.__c:null}function wn(e,t,n){return Y(e,t),"function"==typeof n&&n(),e?e.__c:null}F.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(F.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var xn,_n=t.event;function Sn(){}function En(){return this.cancelBubble}function Pn(){return this.defaultPrevented}t.event=function(e){return _n&&(e=_n(e)),e.persist=Sn,e.isPropagationStopped=En,e.isDefaultPrevented=Pn,e.nativeEvent=e};var kn={enumerable:!1,configurable:!0,get:function(){return this.class}},Tn=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},i=-1===n.indexOf("-");for(var o in t){var s=t[o];if(!("value"===o&&"defaultValue"in t&&null==s||gn&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.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||yn(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":mn.test(o)&&(o=a):a=o="oninput":i&&fn.test(o)?o=o.replace(vn,"-$&").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=B(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=B(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",kn)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=pn,Tn&&Tn(e)};var Cn=t.__r;t.__r=function(e){Cn&&Cn(e),xn=e.__c};var An=t.diffed;t.diffed=function(e){An&&An(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),xn=null};var Rn={ReactCurrentDispatcher:{current:{readContext:function(e){return xn.__n[e.__c].props.value},useCallback:Ft,useContext:Lt,useDebugValue:Dt,useDeferredValue:$n,useEffect:Tt,useId:Vt,useImperativeHandle:Rt,useInsertionEffect:zn,useLayoutEffect:Ct,useMemo:Ot,useReducer:kt,useRef:At,useState:Pt,useSyncExternalStore:Qn,useTransition:Wn}}},On="17.0.2";function Fn(e){return C.bind(null,e)}function Ln(e){return!!e&&e.$$typeof===pn}function Dn(e){return Ln(e)&&e.type===O}function Mn(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Vn(e){return Ln(e)?X.apply(null,arguments):e}function In(e){return!!e.__k&&(G(null,e),!0)}function jn(e){return e&&(e.base||1===e.nodeType&&e)||null}var Bn=function(e,t){return e(t)},Nn=function(e,t){return e(t)},Un=O;function Hn(e){e()}function $n(e){return e}function Wn(){return[!1,Hn]}var zn=Ct,qn=Ln;function Qn(e,t){var n=t(),r=Pt({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ct((function(){i.__=n,i.v=t,Kn(i)&&o({h:i})}),[e,n,t]),Tt((function(){return Kn(i)&&o({h:i}),e((function(){Kn(i)&&o({h:i})}))}),[e]),n}function Kn(e){var t,n,r=e.v,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Gn={useState:Pt,useId:Vt,useReducer:kt,useEffect:Tt,useLayoutEffect:Ct,useInsertionEffect:zn,useTransition:Wn,useDeferredValue:$n,useSyncExternalStore:Qn,startTransition:Hn,useRef:At,useImperativeHandle:Rt,useMemo:Ot,useCallback:Ft,useContext:Lt,useDebugValue:Dt,version:"17.0.2",Children:Jt,render:bn,hydrate:wn,unmountComponentAtNode:In,createPortal:hn,createElement:C,createContext:Z,createFactory:Fn,cloneElement:Vn,createRef:R,Fragment:O,isValidElement:Ln,isElement:qn,isFragment:Dn,isMemo:Mn,findDOMNode:jn,Component:F,PureComponent:Qt,memo:Kt,forwardRef:Xt,flushSync:Nn,unstable_batchedUpdates:Bn,StrictMode:Un,Suspense:on,SuspenseList:ln,lazy:an,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rn};function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yn.apply(null,arguments)}var Xn=y((e=>{var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case c:case i:case s:case o:case h:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case f:case a:return e;default:return t}}case r:return t}}}function x(e){return w(e)===c}e.AsyncMode=u,e.ConcurrentMode=c,e.ContextConsumer=l,e.ContextProvider=a,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=f,e.Portal=r,e.Profiler=s,e.StrictMode=o,e.Suspense=h,e.isAsyncMode=function(e){return x(e)||w(e)===u},e.isConcurrentMode=x,e.isContextConsumer=function(e){return w(e)===l},e.isContextProvider=function(e){return w(e)===a},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===i},e.isLazy=function(e){return w(e)===m},e.isMemo=function(e){return w(e)===f},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===s},e.isStrictMode=function(e){return w(e)===o},e.isSuspense=function(e){return w(e)===h},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===s||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===v)},e.typeOf=w})),Zn=y(((e,t)=>{t.exports=Xn()})),Jn=y(((e,t)=>{var n=Zn(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return n.isMemo(e)?o:s[e.$$typeof]||r}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var s=u(n);c&&(s=s.concat(c(n)));for(var f=a(t),m=a(n),v=0;v<s.length;++v){var g=s[v];if(!(i[g]||r&&r[g]||m&&m[g]||f&&f[g])){var y=d(n,g);try{l(t,g,y)}catch(nx){}}}}return t}}));function er(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var tr=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},nr=function(e,t,n){tr(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};function rr(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}var ir={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};nt();var or=!1,sr=/[A-Z]|^ms/g,ar=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lr=function(e){return 45===e.charCodeAt(1)},ur=function(e){return null!=e&&"boolean"!=typeof e},cr=tt((function(e){return lr(e)?e:e.replace(sr,"-$&").toLowerCase()})),dr=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ar,(function(e,t,n){return fr={name:t,styles:n,next:fr},t}))}return 1===ir[e]||lr(e)||"number"!=typeof t||0===t?t:t+"px"},hr="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function pr(e,t,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 fr={name:i.name,styles:i.styles,next:fr},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)fr={name:s.name,styles:s.styles,next:fr},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=pr(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":ur(a)&&(r+=cr(o)+":"+dr(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&or)throw new Error(hr);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=pr(e,t,s);switch(o){case"animation":case"animationName":r+=cr(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)ur(s[u])&&(r+=cr(o)+":"+dr(o,s[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=fr,l=n(e);return fr=a,pr(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var fr,mr=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function vr(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";fr=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=pr(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++)i+=pr(n,t,e[s]),r&&(i+=o[s]);mr.lastIndex=0;for(var a,l="";null!==(a=mr.exec(i));)l+="-"+a[1];return{name:rr(i)+l,styles:i,next:fr}}var gr=zn||!1,yr=gr||function(e){return e()},br=gr||Ct,wr=Z("undefined"!=typeof HTMLElement?ft({key:"css"}):null),xr=wr.Provider,_r=function(e){return Xt((function(t,n){return e(t,Lt(wr),n)}))},Sr=Z({}),Er={}.hasOwnProperty,Pr="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",kr=function(e,t){var n={};for(var r in t)Er.call(t,r)&&(n[r]=t[r]);return n[Pr]=e,n},Tr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return tr(t,n,r),yr((function(){return nr(t,n,r)})),null},Cr=_r((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Pr],o=[r],s="";"string"==typeof e.className?s=er(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=vr(o,void 0,Lt(Sr));s+=t.key+"-"+a.name;var l={};for(var u in e)Er.call(e,u)&&"css"!==u&&u!==Pr&&(l[u]=e[u]);return l.className=s,n&&(l.ref=n),C(O,null,C(Tr,{cache:t,serialized:a,isStringTag:"string"==typeof i}),C(i,l))})),Ar=(Jn(),_r((function(e,t){var n=vr([e.styles],void 0,Lt(Sr)),r=At();return br((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",e),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[t]),br((function(){var e=r.current,i=e[0];e[1]?e[1]=!1:(void 0!==n.next&&nr(t,n.next,!0),i.tags.length&&(i.before=i.tags[i.tags.length-1].nextElementSibling,i.flush()),t.insert("",n,i,!1))}),[t,n.name]),null})));function Rr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vr(t)}var Or=0;Array.isArray;function Fr(e,n,r,i,o,s){n||(n={});var a,l,u=n;if("ref"in u)for(l in u={},n)"ref"==l?a=n[l]:u[l]=n[l];var c={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Or,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===u[l]&&(u[l]=a[l]);return t.vnode&&t.vnode(c),c}var Lr=O;function Dr(e,t,n){return Er.call(t,"css")?Fr(Cr,kr(e,t),n):Fr(e,t,n)}function Mr(e,t,n){return Er.call(t,"css")?Fr(Cr,kr(e,t),n):Fr(e,t,n)}var Vr,Ir=Rr({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"}}),jr=()=>Mr(O,{children:[Dr(Ar,{styles:Rr`
1
+ !function(){var e,t,n,r,i,o,s,a,l,u,c,d=Object.create,h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,m=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty,g=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(ex){throw n=[ex],ex}},y=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),b=(e,t)=>{let n={};for(var r in e)h(n,r,{get:e[r],enumerable:!0});return t||h(n,Symbol.toStringTag,{value:"Module"}),n},w=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=f(t),s=0,a=o.length;s<a;s++)i=o[s],v.call(e,i)||i===n||h(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=p(t,i))||r.enumerable});return e},x=(e,t,n)=>(n=null!=e?d(m(e)):{},w(!t&&e&&e.__esModule?n:h(n,"default",{value:e,enumerable:!0}),e)),_={},S=[],E=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,P=Array.isArray;function k(e,t){for(var n in t)e[n]=t[n];return e}function T(e){var t=e.parentNode;t&&t.removeChild(e)}function C(t,n,r){var i,o,s,a={};for(s in n)"key"==s?i=n[s]:"ref"==s?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return A(t,a,i,o,null)}function A(e,r,i,o,s){var a={type:e,props:r,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=t.vnode&&t.vnode(a),a}function R(){return{current:null}}function O(e){return e.children}function F(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!V.__r++||i!==t.debounceRendering)&&((i=t.debounceRendering)||o)(V)}function V(){var e,n,i,o,a,l,u,c;for(r.sort(s);e=r.shift();)e.__d&&(n=r.length,o=void 0,l=(a=(i=e).__v).__e,u=[],c=[],i.__P&&((o=k({},a)).__v=a.__v+1,t.vnode&&t.vnode(o),W(i.__P,o,a,i.__n,i.__P.namespaceURI,32&a.__u?[l]:null,u,null==l?L(a):l,!!(32&a.__u),c),o.__v=a.__v,o.__.__k[o.__i]=o,z(u,o,c),o.__e!=l&&D(o)),r.length>n&&r.sort(s));V.__r=0}function I(e,t,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,v=r&&r.__k||S,g=t.length;for(n.__d=l,function(e,t,n){var r,i,o,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)s=r+d,null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?A(null,i,null,null,null):P(i)?A(O,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?A(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=N(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==e.__d&&(e.__d=L(o)),Q(o,o,!1),n[s]=null,c--);if(c)for(r=0;r<u;r++)null!=(o=n[r])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=L(o)),Q(o,o))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?_:v[p.__i]||_,p.__i=d,W(e,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&q(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=j(p,l,e):"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 j(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=j(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=L(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(P(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function N(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[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<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return-1}function U(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||E.test(t)?n:n+"px"}function H(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||U(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||U(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=a,e.addEventListener(t,o?u:l,o)):e.removeEventListener(t,o?u:l,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function $(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n.t)n.t=a++;else if(n.t<r.u)return;return r(t.event?t.event(n):n)}}}function W(n,r,i,o,s,a,l,u,c,d){var h,p,f,m,v,g,y,b,w,x,S,E,C,A,R,D,M=r.type;if(void 0!==r.constructor)return null;128&i.__u&&(c=!!(32&i.__u),a=[u=r.__e=i.__e]),(h=t.__b)&&h(r);e:if("function"==typeof M)try{if(b=r.props,w="prototype"in M&&M.prototype.render,x=(h=M.contextType)&&o[h.__c],S=h?x?x.props.value:h.__:o,i.__c?y=(p=r.__c=i.__c).__=p.__E:(w?r.__c=p=new M(b,S):(r.__c=p=new F(b,S),p.constructor=M,p.render=K),x&&x.sub(p),p.props=b,p.state||(p.state={}),p.context=S,p.__n=o,f=p.__d=!0,p.__h=[],p._sb=[]),w&&null==p.__s&&(p.__s=p.state),w&&null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=k({},p.__s)),k(p.__s,M.getDerivedStateFromProps(b,p.__s))),m=p.props,v=p.state,p.__v=r,f)w&&null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),w&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(w&&null==M.getDerivedStateFromProps&&b!==m&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,S),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,S)||r.__v===i.__v)){for(r.__v!==i.__v&&(p.props=b,p.state=p.__s,p.__d=!1),r.__e=i.__e,r.__k=i.__k,r.__k.forEach((function(e){e&&(e.__=r)})),E=0;E<p._sb.length;E++)p.__h.push(p._sb[E]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,S),w&&null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(m,v,g)}))}if(p.context=S,p.props=b,p.__P=n,p.__e=!1,C=t.__r,A=0,w){for(p.state=p.__s,p.__d=!1,C&&C(r),h=p.render(p.props,p.state,p.context),R=0;R<p._sb.length;R++)p.__h.push(p._sb[R]);p._sb=[]}else do{p.__d=!1,C&&C(r),h=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++A<25);p.state=p.__s,null!=p.getChildContext&&(o=k(k({},o),p.getChildContext())),w&&!f&&null!=p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(m,v)),I(n,P(D=null!=h&&h.type===O&&null==h.key?h.props.children:h)?D:[D],r,i,o,s,a,l,u,c,d),p.base=r.__e,r.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(n){if(r.__v=null,c||null!=a){for(r.__u|=c?160:32;u&&8===u.nodeType&&u.nextSibling;)u=u.nextSibling;a[a.indexOf(u)]=null,r.__e=u}else r.__e=i.__e,r.__k=i.__k;t.__e(n,r,i)}else null==a&&r.__v===i.__v?(r.__k=i.__k,r.__e=i.__e):r.__e=function(t,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,v,g=r.props,y=n.props,b=n.type;if("svg"===b?o="http://www.w3.org/2000/svg":"math"===b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=s)for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!b&&(b?f.localName===b:3===f.nodeType)){t=f,s[c]=null;break}if(null==t){if(null===b)return document.createTextNode(y);t=document.createElementNS(o,b,y.is&&y),s=null,l=!1}if(null===b)g===y||l&&t.data===y||(t.data=y);else{if(s=s&&e.call(t.childNodes),g=r.props||_,!l&&null!=s)for(g={},c=0;c<t.attributes.length;c++)g[(f=t.attributes[c]).name]=f.value;for(c in g)if(f=g[c],"children"==c);else if("dangerouslySetInnerHTML"==c)h=f;else if("key"!==c&&!(c in y)){if("value"==c&&"defaultValue"in y||"checked"==c&&"defaultChecked"in y)continue;H(t,c,null,f,o)}for(c in y)f=y[c],"children"==c?p=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?m=f:"checked"==c?v=f:"key"===c||l&&"function"!=typeof f||g[c]===f||H(t,c,f,g[c],o);if(d)l||h&&(d.__html===h.__html||d.__html===t.innerHTML)||(t.innerHTML=d.__html),n.__k=[];else if(h&&(t.innerHTML=""),I(t,P(p)?p:[p],n,r,i,"foreignObject"===b?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:r.__k&&L(r,0),l,u),null!=s)for(c=s.length;c--;)null!=s[c]&&T(s[c]);l||(c="value",void 0!==m&&(m!==t[c]||"progress"===b&&!m||"option"===b&&m!==g[c])&&H(t,c,m,g[c],o),c="checked",void 0!==v&&v!==t[c]&&H(t,c,v,g[c],o))}return t}(i.__e,r,i,o,s,a,l,c,d);(h=t.diffed)&&h(r)}function z(e,n,r){n.__d=void 0;for(var i=0;i<r.length;i++)q(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function q(e,n,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function Q(e,n,r){var i,o;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||q(i,null,n)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Q(i[o],n,r||"function"!=typeof e.type);r||null==e.__e||T(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function K(e,t,n){return this.constructor(e,n)}function G(n,r,i){var o,s,a,l;t.__&&t.__(n,r),s=(o="function"==typeof i)?null:i&&i.__k||r.__k,a=[],l=[],W(r,n=(!o&&i||r).__k=C(O,null,[n]),s||_,_,r.namespaceURI,!o&&i?[i]:s?null:r.firstChild?e.call(r.childNodes):null,a,!o&&i?i:s?s.__e:r.firstChild,o,l),z(a,n,l)}function Y(e,t){G(e,t,Y)}function X(t,n,r){var i,o,s,a,l=k({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),n)"key"==s?i=n[s]:"ref"==s?o=n[s]:l[s]=void 0===n[s]&&void 0!==a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),A(t.type,l,i||t.key,o||t.ref,null)}function Z(e,t){var n={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e=S.slice,t={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},n=0,F.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=k({},this.state);"function"==typeof e&&(e=e(k({},n),this.props)),e&&k(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},F.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},F.prototype.render=O,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},V.__r=0,a=0,l=$(!1),u=$(!0),c=0;var ee=["context","children"];function te(e){return this.getChildContext=function(){return e.context},X(e.children,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,ee))}function ne(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=C(te,J({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[re(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),u=a[o].slot;u?i[u]=C(se,{name:u},l):r[o]=l}var c=n?C(se,null,r):r;return C(n||t.nodeName.toLowerCase(),i,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Y:G)(this._vdom,this._root)}function re(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function ie(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[re(e)]=n,this._vdom=X(this._vdom,r),G(this._vdom,this._root)}}function oe(){G(this._vdom=null,this._root)}function se(e,t){var n=this;return C("slot",J({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}var ae=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(ex){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),le="-ms-",ue="-moz-",ce="-webkit-",de="comm",he="rule",pe="decl",fe="@keyframes",me=Math.abs,ve=String.fromCharCode,ge=Object.assign;function ye(e){return e.trim()}function be(e,t,n){return e.replace(t,n)}function we(e,t){return e.indexOf(t)}function xe(e,t){return 0|e.charCodeAt(t)}function _e(e,t,n){return e.slice(t,n)}function Se(e){return e.length}function Ee(e){return e.length}function Pe(e,t){return t.push(e),e}var ke=1,Te=1,Ce=0,Ae=0,Re=0,Oe="";function Fe(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ke,column:Te,length:s,return:""}}function Le(e,t){return ge(Fe("",null,null,"",null,null,0),e,{length:-e.length},t)}function De(){return Re=Ae>0?xe(Oe,--Ae):0,Te--,10===Re&&(Te=1,ke--),Re}function Me(){return Re=Ae<Ce?xe(Oe,Ae++):0,Te++,10===Re&&(Te=1,ke++),Re}function Ve(){return xe(Oe,Ae)}function Ie(){return Ae}function je(e,t){return _e(Oe,e,t)}function Be(e){switch(e){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 Ne(e){return ke=Te=1,Ce=Se(Oe=e),Ae=0,[]}function Ue(e){return Oe="",e}function He(e){return ye(je(Ae-1,ze(91===e?e+2:40===e?e+1:e)))}function $e(e){for(;(Re=Ve())&&Re<33;)Me();return Be(e)>2||Be(Re)>3?"":" "}function We(e,t){for(;--t&&Me()&&!(Re<48||Re>102||Re>57&&Re<65||Re>70&&Re<97););return je(e,Ie()+(t<6&&32==Ve()&&32==Me()))}function ze(e){for(;Me();)switch(Re){case e:return Ae;case 34:case 39:34!==e&&39!==e&&ze(Re);break;case 40:41===e&&ze(e);break;case 92:Me()}return Ae}function qe(e,t){for(;Me()&&e+Re!==57&&(e+Re!==84||47!==Ve()););return"/*"+je(t,Ae-1)+"*"+ve(47===e?e:Me())}function Qe(e){for(;!Be(Ve());)Me();return je(e,Ae)}function Ke(e){return Ue(Ge("",null,null,null,[""],e=Ne(e),0,[0],e))}function Ge(e,t,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,b="",w=i,x=o,_=r,S=b;v;)switch(f=y,y=Me()){case 40:if(108!=f&&58==xe(S,d-1)){-1!=we(S+=be(He(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=He(y);break;case 9:case 10:case 13:case 32:S+=$e(f);break;case 92:S+=We(Ie()-1,7);continue;case 47:switch(Ve()){case 42:case 47:Pe(Xe(qe(Me(),Ie()),t,n),l);break;default:S+="/"}break;case 123*m:a[u++]=Se(S)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(S=be(S,/\f/g,"")),p>0&&Se(S)-d&&Pe(p>32?Ze(S+";",r,n,d-1):Ze(be(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Pe(_=Ye(S,t,n,u,c,i,a,b,w=[],x=[],d),o),123===y)if(0===c)Ge(S,t,_,_,w,o,d,a,x);else switch(99===h&&110===xe(S,3)?100:h){case 100:case 108:case 109:case 115:Ge(e,_,_,r&&Pe(Ye(e,_,_,0,0,i,a,b,i,w=[],d),x),i,x,d,a,r?w:x);break;default:Ge(S,_,_,_,[""],x,0,a,x)}}u=c=p=0,m=g=1,b=S="",d=s;break;case 58:d=1+Se(S),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==De())continue;switch(S+=ve(y),y*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:a[u++]=(Se(S)-1)*g,g=1;break;case 64:45===Ve()&&(S+=He(Me())),h=Ve(),c=d=Se(b=S+=Qe(Ie())),y++;break;case 45:45===f&&2==Se(S)&&(m=0)}}return o}function Ye(e,t,n,r,i,o,s,a,l,u,c){for(var d=i-1,h=0===i?o:[""],p=Ee(h),f=0,m=0,v=0;f<r;++f)for(var g=0,y=_e(e,d+1,d=me(m=s[f])),b=e;g<p;++g)(b=ye(m>0?h[g]+" "+y:be(y,/&\f/g,h[g])))&&(l[v++]=b);return Fe(e,t,n,0===i?he:a,l,u,c)}function Xe(e,t,n){return Fe(e,t,n,de,ve(Re),_e(e,2,-2),0)}function Ze(e,t,n,r){return Fe(e,t,n,pe,_e(e,0,r),_e(e,r+1,-1),r)}function Je(e,t){for(var n="",r=Ee(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function et(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case pe:return e.return=e.return||e.value;case de:return"";case fe:return e.return=e.value+"{"+Je(e.children,r)+"}";case he:e.value=e.props.join(",")}return Se(n=Je(e.children,r))?e.return=e.value+"{"+n+"}":""}function tt(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var nt=g((()=>{})),rt=function(e,t,n){for(var r=0,i=0;r=i,i=Ve(),38===r&&12===i&&(t[n]=1),!Be(i);)Me();return je(e,Ae)},it=function(e,t){return Ue(function(e,t){var n=-1,r=44;do{switch(Be(r)){case 0:38===r&&12===Ve()&&(t[n]=1),e[n]+=rt(Ae-1,t,n);break;case 2:e[n]+=He(r);break;case 4:if(44===r){e[++n]=58===Ve()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ve(r)}}while(r=Me());return e}(Ne(e),t))},ot=new WeakMap,st=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ot.get(n))&&!r){ot.set(e,!0);for(var i=[],o=it(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},at=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function lt(e,t){switch(function(e,t){return 45^xe(e,0)?(((t<<2^xe(e,0))<<2^xe(e,1))<<2^xe(e,2))<<2^xe(e,3):0}(e,t)){case 5103:return ce+"print-"+e+e;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 ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ce+e+ue+e+le+e+e;case 6828:case 4268:return ce+e+le+e+e;case 6165:return ce+e+le+"flex-"+e+e;case 5187:return ce+e+be(e,/(\w+).+(:[^]+)/,ce+"box-$1$2"+le+"flex-$1$2")+e;case 5443:return ce+e+le+"flex-item-"+be(e,/flex-|-self/,"")+e;case 4675:return ce+e+le+"flex-line-pack"+be(e,/align-content|flex-|-self/,"")+e;case 5548:return ce+e+le+be(e,"shrink","negative")+e;case 5292:return ce+e+le+be(e,"basis","preferred-size")+e;case 6060:return ce+"box-"+be(e,"-grow","")+ce+e+le+be(e,"grow","positive")+e;case 4554:return ce+be(e,/([^-])(transform)/g,"$1"+ce+"$2")+e;case 6187:return be(be(be(e,/(zoom-|grab)/,ce+"$1"),/(image-set)/,ce+"$1"),e,"")+e;case 5495:case 3959:return be(e,/(image-set\([^]*)/,ce+"$1$`$1");case 4968:return be(be(e,/(.+:)(flex-)?(.*)/,ce+"box-pack:$3"+le+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ce+e+e;case 4095:case 3583:case 4068:case 2532:return be(e,/(.+)-inline(.+)/,ce+"$1$2")+e;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(Se(e)-1-t>6)switch(xe(e,t+1)){case 109:if(45!==xe(e,t+4))break;case 102:return be(e,/(.+:)(.+)-([^]+)/,"$1"+ce+"$2-$3$1"+ue+(108==xe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~we(e,"stretch")?lt(be(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==xe(e,t+1))break;case 6444:switch(xe(e,Se(e)-3-(~we(e,"!important")&&10))){case 107:return be(e,":",":"+ce)+e;case 101:return be(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ce+(45===xe(e,14)?"inline-":"")+"box$3$1"+ce+"$2$3$1"+le+"$2box$3")+e}break;case 5936:switch(xe(e,t+11)){case 114:return ce+e+le+be(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ce+e+le+be(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ce+e+le+be(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ce+e+le+e+e}return e}var ut,ct,dt,ht,pt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case pe:e.return=lt(e.value,e.length);break;case fe:return Je([Le(e,{value:be(e.value,"@","@"+ce)})],r);case he:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Je([Le(e,{props:[be(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Je([Le(e,{props:[be(t,/:(plac\w+)/,":"+ce+"input-$1")]}),Le(e,{props:[be(t,/:(plac\w+)/,":-moz-$1")]}),Le(e,{props:[be(t,/:(plac\w+)/,le+"input-$1")]})],r)}return""}))}}],ft=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||pt,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,u,c=[et,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=Ee(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}([st,at].concat(o,c));i=function(e,t,n,r){l=n,Je(Ke(e?e+"{"+t.styles+"}":t.styles),d),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new ae({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h},mt=0,vt=[],gt=t,yt=gt.__b,bt=gt.__r,wt=gt.diffed,xt=gt.__c,_t=gt.unmount,St=gt.__;function Et(e,t){gt.__h&&gt.__h(ct,e,mt||t),mt=0;var n=ct.__H||(ct.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Pt(e){return mt=1,kt($t,e)}function kt(e,t,n){var r=Et(ut++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$t(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ct,!ct.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};ct.u=!0;var o=ct.shouldComponentUpdate,s=ct.componentWillUpdate;ct.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},ct.shouldComponentUpdate=i}return r.__N||r.__}function Tt(e,t){var n=Et(ut++,3);!gt.__s&&Ht(n.__H,t)&&(n.__=e,n.i=t,ct.__H.__h.push(n))}function Ct(e,t){var n=Et(ut++,4);!gt.__s&&Ht(n.__H,t)&&(n.__=e,n.i=t,ct.__h.push(n))}function At(e){return mt=5,Ot((function(){return{current:e}}),[])}function Rt(e,t,n){mt=6,Ct((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function Ot(e,t){var n=Et(ut++,7);return Ht(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ft(e,t){return mt=8,Ot((function(){return e}),t)}function Lt(e){var t=ct.context[e.__c],n=Et(ut++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(ct)),t.props.value):e.__}function Dt(e,t){gt.useDebugValue&&gt.useDebugValue(t?t(e):e)}function Mt(e){var t=Et(ut++,10),n=Pt();return t.__=e,ct.componentDidCatch||(ct.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Vt(){var e=Et(ut++,11);if(!e.__){for(var t=ct.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function It(){for(var e;e=vt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Nt),e.__H.__h.forEach(Ut),e.__H.__h=[]}catch(Xy){e.__H.__h=[],gt.__e(Xy,e.__v)}}gt.__b=function(e){ct=null,yt&&yt(e)},gt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),St&&St(e,t)},gt.__r=function(e){bt&&bt(e),ut=0;var t=(ct=e.__c).__H;t&&(dt===ct?(t.__h=[],ct.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(Nt),t.__h.forEach(Ut),t.__h=[],ut=0)),dt=ct},gt.diffed=function(e){wt&&wt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==vt.push(t)&&ht===gt.requestAnimationFrame||((ht=gt.requestAnimationFrame)||Bt)(It)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),dt=ct=null},gt.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Nt),e.__h=e.__h.filter((function(e){return!e.__||Ut(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],gt.__e(n,e.__v)}})),xt&&xt(e,t)},gt.unmount=function(e){_t&&_t(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Nt(e)}catch(e){t=e}})),n.__H=void 0,t&&gt.__e(t,n.__v))};var jt="function"==typeof requestAnimationFrame;function Bt(e){var t,n=function(){clearTimeout(r),jt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);jt&&(t=requestAnimationFrame(n))}function Nt(e){var t=ct,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ct=t}function Ut(e){var t=ct;e.__c=e.__(),ct=t}function Ht(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function $t(e,t){return"function"==typeof t?t(e):t}var Wt=b({Children:()=>Jt,Component:()=>F,Fragment:()=>O,PureComponent:()=>Qt,StrictMode:()=>Un,Suspense:()=>on,SuspenseList:()=>ln,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Rn,cloneElement:()=>Vn,createContext:()=>Z,createElement:()=>C,createFactory:()=>Fn,createPortal:()=>hn,createRef:()=>R,default:()=>Gn,findDOMNode:()=>jn,flushSync:()=>Nn,forwardRef:()=>Xt,hydrate:()=>wn,isElement:()=>qn,isFragment:()=>Dn,isMemo:()=>Mn,isValidElement:()=>Ln,lazy:()=>an,memo:()=>Kt,render:()=>bn,startTransition:()=>Hn,unmountComponentAtNode:()=>In,unstable_batchedUpdates:()=>Bn,useCallback:()=>Ft,useContext:()=>Lt,useDebugValue:()=>Dt,useDeferredValue:()=>$n,useEffect:()=>Tt,useErrorBoundary:()=>Mt,useId:()=>Vt,useImperativeHandle:()=>Rt,useInsertionEffect:()=>zn,useLayoutEffect:()=>Ct,useMemo:()=>Ot,useReducer:()=>kt,useRef:()=>At,useState:()=>Pt,useSyncExternalStore:()=>Qn,useTransition:()=>Wn,version:()=>On});function zt(e,t){for(var n in t)e[n]=t[n];return e}function qt(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Qt(e,t){this.props=e,this.context=t}function Kt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:qt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,C(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Qt.prototype=new F).isPureReactComponent=!0,Qt.prototype.shouldComponentUpdate=function(e,t){return qt(this.props,e)||qt(this.state,t)};var Gt=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Gt&&Gt(e)};var Yt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Xt(e){function t(t){var n=zt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Yt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Zt=function(e,t){return null==e?null:B(B(e).map(t))},Jt={map:Zt,forEach:Zt,count:function(e){return e?B(e).length:0},only:function(e){var t=B(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:B},en=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);en(e,t,n,r)};var tn=t.unmount;function nn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=zt({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return nn(e,t,n)}))),e}function rn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return rn(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function on(){this.__u=0,this.t=null,this.__b=null}function sn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function an(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return C(n,i)}return i.displayName="Lazy",i.__f=!0,i}function ln(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),tn&&tn(e)},(on.prototype=new F).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=sn(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 e=r.state.__a;r.__v.__k[0]=rn(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},on.prototype.componentWillUnmount=function(){this.t=[]},on.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=nn(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&C(O,null,e.fallback);return i&&(i.__u&=-33),[C(O,null,t.__a?null:e.children),i]};var un=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function cn(e){return this.getChildContext=function(){return e.context},e.children}function dn(e){var t=this,n=e.i;t.componentWillUnmount=function(){G(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),G(C(cn,{context:t.context},e.__v),t.l)}function hn(e,t){var n=C(dn,{__v:e,i:t});return n.containerInfo=t,n}(ln.prototype=new F).__a=function(e){var t=this,n=sn(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),un(t,e,r)):i()};n?n(o):o()}},ln.prototype.render=function(e){this.u=null,this.o=new Map;var t=B(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ln.prototype.componentDidUpdate=ln.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){un(e,n,t)}))};var pn="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,fn=/^(?: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]/,mn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,vn=/[A-Z0-9]/g,gn="undefined"!=typeof document,yn=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function bn(e,t,n){return t.__k??(t.textContent=""),G(e,t),"function"==typeof n&&n(),e?e.__c:null}function wn(e,t,n){return Y(e,t),"function"==typeof n&&n(),e?e.__c:null}F.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(F.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var xn,_n=t.event;function Sn(){}function En(){return this.cancelBubble}function Pn(){return this.defaultPrevented}t.event=function(e){return _n&&(e=_n(e)),e.persist=Sn,e.isPropagationStopped=En,e.isDefaultPrevented=Pn,e.nativeEvent=e};var kn={enumerable:!1,configurable:!0,get:function(){return this.class}},Tn=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},i=-1===n.indexOf("-");for(var o in t){var s=t[o];if(!("value"===o&&"defaultValue"in t&&null==s||gn&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.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||yn(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":mn.test(o)&&(o=a):a=o="oninput":i&&fn.test(o)?o=o.replace(vn,"-$&").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=B(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=B(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",kn)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=pn,Tn&&Tn(e)};var Cn=t.__r;t.__r=function(e){Cn&&Cn(e),xn=e.__c};var An=t.diffed;t.diffed=function(e){An&&An(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),xn=null};var Rn={ReactCurrentDispatcher:{current:{readContext:function(e){return xn.__n[e.__c].props.value},useCallback:Ft,useContext:Lt,useDebugValue:Dt,useDeferredValue:$n,useEffect:Tt,useId:Vt,useImperativeHandle:Rt,useInsertionEffect:zn,useLayoutEffect:Ct,useMemo:Ot,useReducer:kt,useRef:At,useState:Pt,useSyncExternalStore:Qn,useTransition:Wn}}},On="17.0.2";function Fn(e){return C.bind(null,e)}function Ln(e){return!!e&&e.$$typeof===pn}function Dn(e){return Ln(e)&&e.type===O}function Mn(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Vn(e){return Ln(e)?X.apply(null,arguments):e}function In(e){return!!e.__k&&(G(null,e),!0)}function jn(e){return e&&(e.base||1===e.nodeType&&e)||null}var Bn=function(e,t){return e(t)},Nn=function(e,t){return e(t)},Un=O;function Hn(e){e()}function $n(e){return e}function Wn(){return[!1,Hn]}var zn=Ct,qn=Ln;function Qn(e,t){var n=t(),r=Pt({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ct((function(){i.__=n,i.v=t,Kn(i)&&o({h:i})}),[e,n,t]),Tt((function(){return Kn(i)&&o({h:i}),e((function(){Kn(i)&&o({h:i})}))}),[e]),n}function Kn(e){var t,n,r=e.v,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Gn={useState:Pt,useId:Vt,useReducer:kt,useEffect:Tt,useLayoutEffect:Ct,useInsertionEffect:zn,useTransition:Wn,useDeferredValue:$n,useSyncExternalStore:Qn,startTransition:Hn,useRef:At,useImperativeHandle:Rt,useMemo:Ot,useCallback:Ft,useContext:Lt,useDebugValue:Dt,version:"17.0.2",Children:Jt,render:bn,hydrate:wn,unmountComponentAtNode:In,createPortal:hn,createElement:C,createContext:Z,createFactory:Fn,cloneElement:Vn,createRef:R,Fragment:O,isValidElement:Ln,isElement:qn,isFragment:Dn,isMemo:Mn,findDOMNode:jn,Component:F,PureComponent:Qt,memo:Kt,forwardRef:Xt,flushSync:Nn,unstable_batchedUpdates:Bn,StrictMode:Un,Suspense:on,SuspenseList:ln,lazy:an,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rn};function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yn.apply(null,arguments)}var Xn=y((e=>{var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case c:case i:case s:case o:case h:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case f:case a:return e;default:return t}}case r:return t}}}function x(e){return w(e)===c}e.AsyncMode=u,e.ConcurrentMode=c,e.ContextConsumer=l,e.ContextProvider=a,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=f,e.Portal=r,e.Profiler=s,e.StrictMode=o,e.Suspense=h,e.isAsyncMode=function(e){return x(e)||w(e)===u},e.isConcurrentMode=x,e.isContextConsumer=function(e){return w(e)===l},e.isContextProvider=function(e){return w(e)===a},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===i},e.isLazy=function(e){return w(e)===m},e.isMemo=function(e){return w(e)===f},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===s},e.isStrictMode=function(e){return w(e)===o},e.isSuspense=function(e){return w(e)===h},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===s||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===v)},e.typeOf=w})),Zn=y(((e,t)=>{t.exports=Xn()})),Jn=y(((e,t)=>{var n=Zn(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return n.isMemo(e)?o:s[e.$$typeof]||r}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var s=u(n);c&&(s=s.concat(c(n)));for(var f=a(t),m=a(n),v=0;v<s.length;++v){var g=s[v];if(!(i[g]||r&&r[g]||m&&m[g]||f&&f[g])){var y=d(n,g);try{l(t,g,y)}catch(ex){}}}}return t}}));function er(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var tr=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},nr=function(e,t,n){tr(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};function rr(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}var ir={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};nt();var or=!1,sr=/[A-Z]|^ms/g,ar=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lr=function(e){return 45===e.charCodeAt(1)},ur=function(e){return null!=e&&"boolean"!=typeof e},cr=tt((function(e){return lr(e)?e:e.replace(sr,"-$&").toLowerCase()})),dr=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ar,(function(e,t,n){return fr={name:t,styles:n,next:fr},t}))}return 1===ir[e]||lr(e)||"number"!=typeof t||0===t?t:t+"px"},hr="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function pr(e,t,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 fr={name:i.name,styles:i.styles,next:fr},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)fr={name:s.name,styles:s.styles,next:fr},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=pr(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":ur(a)&&(r+=cr(o)+":"+dr(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&or)throw new Error(hr);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=pr(e,t,s);switch(o){case"animation":case"animationName":r+=cr(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<s.length;u++)ur(s[u])&&(r+=cr(o)+":"+dr(o,s[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=fr,l=n(e);return fr=a,pr(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var fr,mr=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function vr(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";fr=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=pr(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++)i+=pr(n,t,e[s]),r&&(i+=o[s]);mr.lastIndex=0;for(var a,l="";null!==(a=mr.exec(i));)l+="-"+a[1];return{name:rr(i)+l,styles:i,next:fr}}var gr=zn||!1,yr=gr||function(e){return e()},br=gr||Ct,wr=Z("undefined"!=typeof HTMLElement?ft({key:"css"}):null),xr=wr.Provider,_r=function(e){return Xt((function(t,n){return e(t,Lt(wr),n)}))},Sr=Z({}),Er={}.hasOwnProperty,Pr="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",kr=function(e,t){var n={};for(var r in t)Er.call(t,r)&&(n[r]=t[r]);return n[Pr]=e,n},Tr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return tr(t,n,r),yr((function(){return nr(t,n,r)})),null},Cr=_r((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Pr],o=[r],s="";"string"==typeof e.className?s=er(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=vr(o,void 0,Lt(Sr));s+=t.key+"-"+a.name;var l={};for(var u in e)Er.call(e,u)&&"css"!==u&&u!==Pr&&(l[u]=e[u]);return l.className=s,n&&(l.ref=n),C(O,null,C(Tr,{cache:t,serialized:a,isStringTag:"string"==typeof i}),C(i,l))})),Ar=(Jn(),_r((function(e,t){var n=vr([e.styles],void 0,Lt(Sr)),r=At();return br((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",e),i.hydrate([s])),r.current=[i,o],function(){i.flush()}}),[t]),br((function(){var e=r.current,i=e[0];e[1]?e[1]=!1:(void 0!==n.next&&nr(t,n.next,!0),i.tags.length&&(i.before=i.tags[i.tags.length-1].nextElementSibling,i.flush()),t.insert("",n,i,!1))}),[t,n.name]),null})));function Rr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vr(t)}var Or=0;Array.isArray;function Fr(e,n,r,i,o,s){n||(n={});var a,l,u=n;if("ref"in u)for(l in u={},n)"ref"==l?a=n[l]:u[l]=n[l];var c={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Or,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===u[l]&&(u[l]=a[l]);return t.vnode&&t.vnode(c),c}var Lr=O;function Dr(e,t,n){return Er.call(t,"css")?Fr(Cr,kr(e,t),n):Fr(e,t,n)}function Mr(e,t,n){return Er.call(t,"css")?Fr(Cr,kr(e,t),n):Fr(e,t,n)}var Vr,Ir=Rr({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"}}),jr=()=>Mr(O,{children:[Dr(Ar,{styles:Rr`
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
- `}),Dr(Ar,{styles:Ir})]}),Br=()=>Lt(Vr),Nr=class extends Error{response;constructor(e,t){super(e),this.response=t}},Ur=async(e,t,n,r)=>{await Hr(e,t,n,r,!0)},Hr=async(e,t,n,r,i)=>{const o=await fetch(e,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"0.4.21156",authorization:`Bearer ${t}`},signal:AbortSignal?.timeout&&AbortSignal.timeout(15e3)});if(!o.ok)throw new Nr(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},$r=()=>{const e=Br();return{getAllPromotions:Ot((()=>{return t=e.backend,async()=>Hr(new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`),t.accessToken,"GET");var t}),[e.backend]),createPromotion:Ot((()=>{return t=e.backend,async e=>Ur(new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`),t.accessToken,"POST",e);var t}),[e.backend]),updatePromotion:Ot((()=>{return t=e.backend,e=>async n=>Ur(new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`),t.accessToken,"PUT",n);var t}),[e.backend])}},Wr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zr="undefined"==typeof window||"Deno"in globalThis;function qr(){}function Qr(e){return"number"==typeof e&&e>=0&&e!==1/0}function Kr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gr(e,t){return"function"==typeof e?e(t):e}function Yr(e,t){return"function"==typeof e?e(t):e}function Xr(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==Jr(s,t.options))return!1}else if(!ti(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function Zr(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(ei(t.options.mutationKey)!==ei(o))return!1}else if(!ti(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function Jr(e,t){return(t?.queryKeyHashFn||ei)(e)}function ei(e){return JSON.stringify(e,((e,t)=>oi(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function ti(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!ti(e[n],t[n]))))}function ni(e,t){if(e===t)return e;const n=ii(e)&&ii(t);if(n||oi(e)&&oi(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),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===e[i]&&void 0===t[i]?(a[i]=void 0,l++):(a[i]=ni(e[i],t[i]),a[i]===e[i]&&void 0!==e[i]&&l++)}return i===s&&l===i?e:a}return t}function ri(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ii(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oi(e){if(!si(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!si(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function si(e){return"[object Object]"===Object.prototype.toString.call(e)}function ai(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?ni(e,t):t}function li(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ui(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ci=Symbol();function di(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==ci?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var hi=new class extends Wr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!zr&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},pi=new class extends Wr{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!zr&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#r}};function fi(e){return Math.min(1e3*2**e,3e4)}function mi(e){return"online"!==(e??"online")||pi.isOnline()}var vi=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function gi(e){return e instanceof vi}function yi(e){let t,n,r,i=!1,o=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),l=()=>hi.isFocused()&&("always"===e.networkMode||pi.isOnline())&&e.canRun(),u=()=>mi(e.networkMode)&&e.canRun(),c=r=>{s||(s=!0,e.onSuccess?.(r),t?.(),n(r))},d=n=>{s||(s=!0,e.onError?.(n),t?.(),r(n))},h=()=>new Promise((n=>{t=e=>{(s||l())&&n(e)},e.onPause?.()})).then((()=>{t=void 0,s||e.onContinue?.()})),p=()=>{if(s)return;let t;const n=0===o?e.initialPromise:void 0;try{t=n??e.fn()}catch(r){t=Promise.reject(r)}Promise.resolve(t).then(c).catch((t=>{if(s)return;const n=e.retry??(zr?0:3),r=e.retryDelay??fi,a="function"==typeof r?r(o,t):r,u=!0===n||"number"==typeof n&&o<n||"function"==typeof n&&n(o,t);!i&&u?(o++,e.onFail?.(o,t),function(e){return new Promise((t=>{setTimeout(t,e)}))}(a).then((()=>l()?void 0:h())).then((()=>{i?d(t):p()}))):d(t)}))};return{promise:a,cancel:t=>{s||(d(new vi(t)),e.abort?.())},continue:()=>(t?.(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var bi=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const o=r=>{t?e.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),wi=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qr(this.gcTime)&&(this.#i=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zr?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},xi=class extends wi{#o;#s;#a;#l;#u;#c;constructor(e){super(),this.#c=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){const n=ai(this.state.data,e,this.options);return this.#d({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(qr).catch(qr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some((e=>!1!==Yr(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Kr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find((e=>e.shouldFetchOnWindowFocus()))?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){this.observers.find((e=>e.shouldFetchOnReconnect()))?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#l&&(this.#c?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#c=!0,n.signal)})},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=di(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return r(n),this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)}};r(i),this.options.behavior?.onFetch(i,this),this.#s=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===i.fetchOptions?.meta||this.#d({type:"fetch",meta:i.fetchOptions?.meta});const o=e=>{gi(e)&&e.silent||this.#d({type:"error",error:e}),gi(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#l=yi({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0!==e){try{this.setData(e)}catch(t){return void o(t)}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else o(new Error(`${this.queryHash} data is undefined`))},onError:o,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#l.start()}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,..._i(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return gi(n)&&n.revert&&this.#s?{...this.#s,fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),bi.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#a.notify({query:this,type:"updated",action:e})}))}};function _i(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mi(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Si=class extends Wr{constructor(e={}){super(),this.config=e,this.#h=new Map}#h;build(e,t,n){const r=t.queryKey,i=t.queryHash??Jr(r,t);let o=this.get(i);return o||(o=new xi({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#h.has(e.queryHash)||(this.#h.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#h.get(e.queryHash);t&&(e.destroy(),t===e&&this.#h.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bi.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#h.get(e)}getAll(){return[...this.#h.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Xr(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>Xr(e,t))):t}notify(e){bi.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){bi.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){bi.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},Ei=class extends wi{#p;#f;#l;constructor(e){super(),this.mutationId=e.mutationId,this.#f=e.mutationCache,this.#p=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#p.includes(e)||(this.#p.push(e),this.clearGcTimeout(),this.#f.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#p=this.#p.filter((t=>t!==e)),this.scheduleGc(),this.#f.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#p.length||("pending"===this.state.status?this.scheduleGc():this.#f.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){this.#l=yi({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#f.canRun(this)});const t="pending"===this.state.status,n=!this.#l.canStart();try{if(!t){this.#d({type:"pending",variables:e,isPaused:n}),await(this.#f.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:n})}const r=await this.#l.start();return await(this.#f.config.onSuccess?.(r,e,this.state.context,this)),await(this.options.onSuccess?.(r,e,this.state.context)),await(this.#f.config.onSettled?.(r,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(r,null,e,this.state.context)),this.#d({type:"success",data:r}),r}catch(r){try{throw await(this.#f.config.onError?.(r,e,this.state.context,this)),await(this.options.onError?.(r,e,this.state.context)),await(this.#f.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,r,e,this.state.context)),r}finally{this.#d({type:"error",error:r})}}finally{this.#f.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),bi.batch((()=>{this.#p.forEach((t=>{t.onMutationUpdate(e)})),this.#f.notify({mutation:this,type:"updated",action:e})}))}};var Pi=class extends Wr{constructor(e={}){super(),this.config=e,this.#m=new Map,this.#v=Date.now()}#m;#v;build(e,t,n){const r=new Ei({mutationCache:this,mutationId:++this.#v,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=ki(e),n=this.#m.get(t)??[];n.push(e),this.#m.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=ki(e);if(this.#m.has(t)){const n=this.#m.get(t)?.filter((t=>t!==e));n&&(0===n.length?this.#m.delete(t):this.#m.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#m.get(ki(e))?.find((e=>"pending"===e.state.status));return!t||t===e}runNext(e){return(this.#m.get(ki(e))?.find((t=>t!==e&&t.state.isPaused)))?.continue()??Promise.resolve()}clear(){bi.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...this.#m.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Zr(t,e)))}findAll(e={}){return this.getAll().filter((t=>Zr(e,t)))}notify(e){bi.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return bi.batch((()=>Promise.all(e.map((e=>e.continue().catch(qr))))))}};function ki(e){return e.options.scope?.id??String(e.mutationId)}function Ti(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=di(t.options,t.fetchOptions),c=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const o={queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};var s;s=o,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)});const a=await u(o),{maxPages:l}=t.options,c=i?ui:li;return{pages:c(e.pages,a,l),pageParams:c(e.pageParams,r,l)}};if(i&&o.length){const e="backward"===i,t=e?Ai:Ci,n={pages:o,pageParams:s};a=await c(n,t(r,n),e)}else{const t=e??o.length;do{const e=0===l?s[0]??r.initialPageParam:Ci(r,a);if(l>0&&null==e)break;a=await c(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Ci(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ai(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ri=class{#g;#f;#u;#y;#b;#w;#x;#_;constructor(e={}){this.#g=e.queryCache||new Si,this.#f=e.mutationCache||new Pi,this.#u=e.defaultOptions||{},this.#y=new Map,this.#b=new Map,this.#w=0}mount(){this.#w++,1===this.#w&&(this.#x=hi.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#g.onFocus())})),this.#_=pi.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#g.onOnline())})))}unmount(){this.#w--,0===this.#w&&(this.#x?.(),this.#x=void 0,this.#_?.(),this.#_=void 0)}isFetching(e){return this.#g.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#f.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#g.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=this.#g.build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Gr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#g.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#g.get(r.queryHash)?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==o)return this.#g.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return bi.batch((()=>this.#g.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#g.get(t.queryHash)?.state}removeQueries(e){const t=this.#g;bi.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=this.#g,r={type:"active",...e};return bi.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=bi.batch((()=>this.#g.findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(qr).catch(qr)}invalidateQueries(e={},t={}){return bi.batch((()=>{if(this.#g.findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e={},t){const n={...t,cancelRefetch:t?.cancelRefetch??!0},r=bi.batch((()=>this.#g.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(qr)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(qr)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#g.build(this,t);return n.isStaleByTime(Gr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qr).catch(qr)}fetchInfiniteQuery(e){return e.behavior=Ti(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qr).catch(qr)}ensureInfiniteQueryData(e){return e.behavior=Ti(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pi.isOnline()?this.#f.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#g}getMutationCache(){return this.#f}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#y.set(ei(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#y.values()];let n={};return t.forEach((t=>{ti(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){this.#b.set(ei(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#b.values()];let n={};return t.forEach((t=>{ti(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Jr(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===ci&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#g.clear(),this.#f.clear()}},Oi=class extends Wr{constructor(e,t){super(),this.options=t,this.#S=e,this.#E=null,this.bindMethods(),this.setOptions(t)}#S;#P=void 0;#k=void 0;#T=void 0;#C;#A;#E;#R;#O;#F;#L;#D;#M;#V=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#P.addObserver(this),Fi(this.#P,this.options)?this.#I():this.updateResult(),this.#j())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Li(this.#P,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Li(this.#P,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#B(),this.#N(),this.#P.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#P;if(this.options=this.#S.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof Yr(this.options.enabled,this.#P))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#U(),this.#P.setOptions(this.options),n._defaulted&&!ri(this.options,n)&&this.#S.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#P,observer:this});const i=this.hasListeners();i&&Di(this.#P,r,this.options,n)&&this.#I(),this.updateResult(t),!i||this.#P===r&&Yr(this.options.enabled,this.#P)===Yr(n.enabled,this.#P)&&Gr(this.options.staleTime,this.#P)===Gr(n.staleTime,this.#P)||this.#H();const o=this.#$();!i||this.#P===r&&Yr(this.options.enabled,this.#P)===Yr(n.enabled,this.#P)&&o===this.#M||this.#W(o)}getOptimisticResult(e){const t=this.#S.getQueryCache().build(this.#S,e),n=this.createResult(t,e);var r;return r=n,ri(this.getCurrentResult(),r)||(this.#T=n,this.#A=this.options,this.#C=this.#P.state),n}getCurrentResult(){return this.#T}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})})),n}trackProp(e){this.#V.add(e)}getCurrentQuery(){return this.#P}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#S.defaultQueryOptions(e),n=this.#S.getQueryCache().build(this.#S,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return this.#I({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#T)))}#I(e){this.#U();let t=this.#P.fetch(this.options,e);return e?.throwOnError||(t=t.catch(qr)),t}#H(){this.#B();const e=Gr(this.options.staleTime,this.#P);if(zr||this.#T.isStale||!Qr(e))return;const t=Kr(this.#T.dataUpdatedAt,e)+1;this.#L=setTimeout((()=>{this.#T.isStale||this.updateResult()}),t)}#$(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#P):this.options.refetchInterval)??!1}#W(e){this.#N(),this.#M=e,!zr&&!1!==Yr(this.options.enabled,this.#P)&&Qr(this.#M)&&0!==this.#M&&(this.#D=setInterval((()=>{(this.options.refetchIntervalInBackground||hi.isFocused())&&this.#I()}),this.#M))}#j(){this.#H(),this.#W(this.#$())}#B(){this.#L&&(clearTimeout(this.#L),this.#L=void 0)}#N(){this.#D&&(clearInterval(this.#D),this.#D=void 0)}createResult(e,t){const n=this.#P,r=this.options,i=this.#T,o=this.#C,s=this.#A,a=e!==n?e.state:this.#k,{state:l}=e;let u,c={...l},d=!1;if(t._optimisticResults){const i=this.hasListeners(),o=!i&&Fi(e,t),s=i&&Di(e,n,t,r);(o||s)&&(c={...c,..._i(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:h,errorUpdatedAt:p,status:f}=c;if(t.select&&void 0!==c.data)if(i&&c.data===o?.data&&t.select===this.#R)u=this.#O;else try{this.#R=t.select,u=t.select(c.data),u=ai(i?.data,u,t),this.#O=u,this.#E=null}catch(w){this.#E=w}else u=c.data;if(void 0!==t.placeholderData&&void 0===u&&"pending"===f){let e;if(i?.isPlaceholderData&&t.placeholderData===s?.placeholderData)e=i.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#F?.state.data,this.#F):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#E=null}catch(w){this.#E=w}void 0!==e&&(f="success",u=ai(i?.data,e,t),d=!0)}this.#E&&(h=this.#E,u=this.#O,p=Date.now(),f="error");const m="fetching"===c.fetchStatus,v="pending"===f,g="error"===f,y=v&&m,b=void 0!==u;return{status:f,fetchStatus:c.fetchStatus,isPending:v,isSuccess:"success"===f,isError:g,isInitialLoading:y,isLoading:y,data:u,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:p,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:g&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:d,isRefetchError:g&&b,isStale:Mi(e,t),refetch:this.refetch}}updateResult(e){const t=this.#T,n=this.createResult(this.#P,this.options);if(this.#C=this.#P.state,this.#A=this.options,void 0!==this.#C.data&&(this.#F=this.#P),ri(n,t))return;this.#T=n;const r={};!1!==e?.listeners&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#V.size)return!0;const r=new Set(n??this.#V);return this.options.throwOnError&&r.add("error"),Object.keys(this.#T).some((e=>{const n=e;return this.#T[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),this.#z({...r,...e})}#U(){const e=this.#S.getQueryCache().build(this.#S,this.options);if(e===this.#P)return;const t=this.#P;this.#P=e,this.#k=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#j()}#z(e){bi.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#T)})),this.#S.getQueryCache().notify({query:this.#P,type:"observerResultsUpdated"})}))}};function Fi(e,t){return function(e,t){return!1!==Yr(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Li(e,t,t.refetchOnMount)}function Li(e,t,n){if(!1!==Yr(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Mi(e,t)}return!1}function Di(e,t,n,r){return(e!==t||!1===Yr(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Mi(e,n)}function Mi(e,t){return!1!==Yr(t.enabled,e)&&e.isStaleByTime(Gr(t.staleTime,e))}var Vi=class extends Wr{#S;#T=void 0;#q;#Q;constructor(e,t){super(),this.#S=e,this.setOptions(t),this.bindMethods(),this.#K()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#S.defaultMutationOptions(e),ri(this.options,t)||this.#S.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#q,observer:this}),t?.mutationKey&&this.options.mutationKey&&ei(t.mutationKey)!==ei(this.options.mutationKey)?this.reset():"pending"===this.#q?.state.status&&this.#q.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#q?.removeObserver(this)}onMutationUpdate(e){this.#K(),this.#z(e)}getCurrentResult(){return this.#T}reset(){this.#q?.removeObserver(this),this.#q=void 0,this.#K(),this.#z()}mutate(e,t){return this.#Q=t,this.#q?.removeObserver(this),this.#q=this.#S.getMutationCache().build(this.#S,this.options),this.#q.addObserver(this),this.#q.execute(e)}#K(){const e=this.#q?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#T={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){bi.batch((()=>{if(this.#Q&&this.hasListeners()){const t=this.#T.variables,n=this.#T.context;"success"===e?.type?(this.#Q.onSuccess?.(e.data,t,n),this.#Q.onSettled?.(e.data,null,t,n)):"error"===e?.type&&(this.#Q.onError?.(e.error,t,n),this.#Q.onSettled?.(void 0,e.error,t,n))}this.listeners.forEach((e=>{e(this.#T)}))}))}},Ii=Z(void 0),ji=e=>{const t=Lt(Ii);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Bi=({client:e,children:t})=>(Tt((()=>(e.mount(),()=>{e.unmount()})),[e]),Fr(Ii.Provider,{value:e,children:t})),Ni=Z(!1),Ui=()=>Lt(Ni);Ni.Provider;var Hi=Z(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),$i=()=>Lt(Hi);function Wi(e,t){return"function"==typeof e?e(...t):!!e}function zi(){}var qi=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Qi=e=>{Tt((()=>{e.clearReset()}),[e])},Ki=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Wi(n,[e.error,r]),Gi=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},Yi=(e,t)=>e?.suspense&&t.isPending,Xi=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function Zi(e,t){return function(e,t,n){const r=ji(n),i=Ui(),o=$i(),s=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=i?"isRestoring":"optimistic",Gi(s),qi(s,o),Qi(o);const[a]=Pt((()=>new t(r,s))),l=a.getOptimisticResult(s);if(Qn(Ft((e=>{const t=i?()=>{}:a.subscribe(bi.batchCalls(e));return a.updateResult(),t}),[a,i]),(()=>a.getCurrentResult())),Tt((()=>{a.setOptions(s,{listeners:!1})}),[s,a]),Yi(s,l))throw Xi(s,a,o);if(Ki({result:l,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(s,l),s.notifyOnChangeProps?l:a.trackResult(l)}(e,Oi,t)}var Ji,eo,to=b({default:()=>eo}),no=g((()=>{nt(),Ji=/^((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)-.*))$/,eo=tt((function(e){return Ji.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))}));no();var ro=eo,io=function(e){return"theme"!==e},oo=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ro:io},so=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},ao=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return tr(t,n,r),yr((function(){return nr(t,n,r)})),null},lo=function e(t,n){var r,i,o=t.__emotion_real===t,s=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var a=so(t,n,o),l=a||oo(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==t.__emotion_styles?t.__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=_r((function(e,t,n){var r=u&&e.as||s,o="",c=[],h=e;if(null==e.theme){for(var p in h={},e)h[p]=e[p];h.theme=Lt(Sr)}"string"==typeof e.className?o=er(t.registered,c,e.className):null!=e.className&&(o=e.className+" ");var f=vr(d.concat(c),t.registered,h);o+=t.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?oo(r):l,v={};for(var g in e)u&&"as"===g||m(g)&&(v[g]=e[g]);return v.className=o,n&&(v.ref=n),C(O,null,C(ao,{cache:t,serialized:f,isStringTag:"string"==typeof r}),C(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.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(t,r){return e(t,Yn({},n,r,{shouldForwardProp:so(f,r,!0)})).apply(void 0,d)},f}}.bind();function uo({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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(e){lo[e]=lo(e)}));var co=Xt(uo);function ho({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var po=Xt(ho),fo=lo.td`
3
+ `}),Dr(Ar,{styles:Ir})]}),Br=()=>Lt(Vr),Nr=class extends Error{response;constructor(e,t){super(e),this.response=t}},Ur=async(e,t,n,r)=>{await Hr(e,t,n,r,!0)},Hr=async(e,t,n,r,i)=>{const o=await fetch(e,{method:n,body:r?JSON.stringify(r):void 0,headers:{"content-type":"application/json","x-app-version":"0.4.30346",authorization:`Bearer ${t}`},signal:AbortSignal?.timeout&&AbortSignal.timeout(15e3)});if(!o.ok)throw new Nr(`[API Error] Status: ${o.statusText}. Response: ${await o.text()}`,o);return i?{}:await o.json()},$r=()=>{const e=Br();return{getAllPromotions:Ot((()=>{return t=e.backend,async()=>Hr(new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`),t.accessToken,"GET");var t}),[e.backend]),createPromotion:Ot((()=>{return t=e.backend,async e=>Ur(new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion`),t.accessToken,"POST",e);var t}),[e.backend]),updatePromotion:Ot((()=>{return t=e.backend,e=>async n=>Ur(new URL(`${t.url}/promoted-benefits/admin/v1.0/promotion/${e}`),t.accessToken,"PUT",n);var t}),[e.backend])}},Wr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zr="undefined"==typeof window||"Deno"in globalThis;function qr(){}function Qr(e){return"number"==typeof e&&e>=0&&e!==1/0}function Kr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gr(e,t){return"function"==typeof e?e(t):e}function Yr(e,t){return"function"==typeof e?e(t):e}function Xr(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==Jr(s,t.options))return!1}else if(!ti(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function Zr(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(ei(t.options.mutationKey)!==ei(o))return!1}else if(!ti(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function Jr(e,t){return(t?.queryKeyHashFn||ei)(e)}function ei(e){return JSON.stringify(e,((e,t)=>oi(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function ti(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!ti(e[n],t[n]))))}function ni(e,t){if(e===t)return e;const n=ii(e)&&ii(t);if(n||oi(e)&&oi(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),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===e[i]&&void 0===t[i]?(a[i]=void 0,l++):(a[i]=ni(e[i],t[i]),a[i]===e[i]&&void 0!==e[i]&&l++)}return i===s&&l===i?e:a}return t}function ri(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ii(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oi(e){if(!si(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!si(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function si(e){return"[object Object]"===Object.prototype.toString.call(e)}function ai(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?ni(e,t):t}function li(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ui(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ci=Symbol();function di(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==ci?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var hi=new class extends Wr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!zr&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},pi=new class extends Wr{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!zr&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#r}};function fi(e){return Math.min(1e3*2**e,3e4)}function mi(e){return"online"!==(e??"online")||pi.isOnline()}var vi=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function gi(e){return e instanceof vi}function yi(e){let t,n,r,i=!1,o=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),l=()=>hi.isFocused()&&("always"===e.networkMode||pi.isOnline())&&e.canRun(),u=()=>mi(e.networkMode)&&e.canRun(),c=r=>{s||(s=!0,e.onSuccess?.(r),t?.(),n(r))},d=n=>{s||(s=!0,e.onError?.(n),t?.(),r(n))},h=()=>new Promise((n=>{t=e=>{(s||l())&&n(e)},e.onPause?.()})).then((()=>{t=void 0,s||e.onContinue?.()})),p=()=>{if(s)return;let t;const n=0===o?e.initialPromise:void 0;try{t=n??e.fn()}catch(r){t=Promise.reject(r)}Promise.resolve(t).then(c).catch((t=>{if(s)return;const n=e.retry??(zr?0:3),r=e.retryDelay??fi,a="function"==typeof r?r(o,t):r,u=!0===n||"number"==typeof n&&o<n||"function"==typeof n&&n(o,t);!i&&u?(o++,e.onFail?.(o,t),function(e){return new Promise((t=>{setTimeout(t,e)}))}(a).then((()=>l()?void 0:h())).then((()=>{i?d(t):p()}))):d(t)}))};return{promise:a,cancel:t=>{s||(d(new vi(t)),e.abort?.())},continue:()=>(t?.(),a),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:u,start:()=>(u()?p():h().then(p),a)}}var bi=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const o=r=>{t?e.push(r):i((()=>{n(r)}))};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),wi=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qr(this.gcTime)&&(this.#i=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zr?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},xi=class extends wi{#o;#s;#a;#l;#u;#c;constructor(e){super(),this.#c=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){const n=ai(this.state.data,e,this.options);return this.#d({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(qr).catch(qr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some((e=>!1!==Yr(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Kr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find((e=>e.shouldFetchOnWindowFocus()))?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){this.observers.find((e=>e.shouldFetchOnReconnect()))?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#l&&(this.#c?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#c=!0,n.signal)})},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=di(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return r(n),this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)}};r(i),this.options.behavior?.onFetch(i,this),this.#s=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===i.fetchOptions?.meta||this.#d({type:"fetch",meta:i.fetchOptions?.meta});const o=e=>{gi(e)&&e.silent||this.#d({type:"error",error:e}),gi(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#l=yi({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0!==e){try{this.setData(e)}catch(t){return void o(t)}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else o(new Error(`${this.queryHash} data is undefined`))},onError:o,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#l.start()}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,..._i(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return gi(n)&&n.revert&&this.#s?{...this.#s,fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),bi.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#a.notify({query:this,type:"updated",action:e})}))}};function _i(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mi(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Si=class extends Wr{constructor(e={}){super(),this.config=e,this.#h=new Map}#h;build(e,t,n){const r=t.queryKey,i=t.queryHash??Jr(r,t);let o=this.get(i);return o||(o=new xi({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#h.has(e.queryHash)||(this.#h.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#h.get(e.queryHash);t&&(e.destroy(),t===e&&this.#h.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bi.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#h.get(e)}getAll(){return[...this.#h.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Xr(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>Xr(e,t))):t}notify(e){bi.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){bi.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){bi.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},Ei=class extends wi{#p;#f;#l;constructor(e){super(),this.mutationId=e.mutationId,this.#f=e.mutationCache,this.#p=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#p.includes(e)||(this.#p.push(e),this.clearGcTimeout(),this.#f.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#p=this.#p.filter((t=>t!==e)),this.scheduleGc(),this.#f.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#p.length||("pending"===this.state.status?this.scheduleGc():this.#f.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){this.#l=yi({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#f.canRun(this)});const t="pending"===this.state.status,n=!this.#l.canStart();try{if(!t){this.#d({type:"pending",variables:e,isPaused:n}),await(this.#f.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:n})}const r=await this.#l.start();return await(this.#f.config.onSuccess?.(r,e,this.state.context,this)),await(this.options.onSuccess?.(r,e,this.state.context)),await(this.#f.config.onSettled?.(r,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(r,null,e,this.state.context)),this.#d({type:"success",data:r}),r}catch(r){try{throw await(this.#f.config.onError?.(r,e,this.state.context,this)),await(this.options.onError?.(r,e,this.state.context)),await(this.#f.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,r,e,this.state.context)),r}finally{this.#d({type:"error",error:r})}}finally{this.#f.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),bi.batch((()=>{this.#p.forEach((t=>{t.onMutationUpdate(e)})),this.#f.notify({mutation:this,type:"updated",action:e})}))}};var Pi=class extends Wr{constructor(e={}){super(),this.config=e,this.#m=new Map,this.#v=Date.now()}#m;#v;build(e,t,n){const r=new Ei({mutationCache:this,mutationId:++this.#v,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=ki(e),n=this.#m.get(t)??[];n.push(e),this.#m.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=ki(e);if(this.#m.has(t)){const n=this.#m.get(t)?.filter((t=>t!==e));n&&(0===n.length?this.#m.delete(t):this.#m.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#m.get(ki(e))?.find((e=>"pending"===e.state.status));return!t||t===e}runNext(e){return(this.#m.get(ki(e))?.find((t=>t!==e&&t.state.isPaused)))?.continue()??Promise.resolve()}clear(){bi.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...this.#m.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Zr(t,e)))}findAll(e={}){return this.getAll().filter((t=>Zr(e,t)))}notify(e){bi.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return bi.batch((()=>Promise.all(e.map((e=>e.continue().catch(qr))))))}};function ki(e){return e.options.scope?.id??String(e.mutationId)}function Ti(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=di(t.options,t.fetchOptions),c=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const o={queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};var s;s=o,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)});const a=await u(o),{maxPages:l}=t.options,c=i?ui:li;return{pages:c(e.pages,a,l),pageParams:c(e.pageParams,r,l)}};if(i&&o.length){const e="backward"===i,t=e?Ai:Ci,n={pages:o,pageParams:s};a=await c(n,t(r,n),e)}else{const t=e??o.length;do{const e=0===l?s[0]??r.initialPageParam:Ci(r,a);if(l>0&&null==e)break;a=await c(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Ci(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ai(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ri=class{#g;#f;#u;#y;#b;#w;#x;#_;constructor(e={}){this.#g=e.queryCache||new Si,this.#f=e.mutationCache||new Pi,this.#u=e.defaultOptions||{},this.#y=new Map,this.#b=new Map,this.#w=0}mount(){this.#w++,1===this.#w&&(this.#x=hi.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#g.onFocus())})),this.#_=pi.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#g.onOnline())})))}unmount(){this.#w--,0===this.#w&&(this.#x?.(),this.#x=void 0,this.#_?.(),this.#_=void 0)}isFetching(e){return this.#g.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#f.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#g.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=this.#g.build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Gr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#g.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#g.get(r.queryHash)?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==o)return this.#g.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return bi.batch((()=>this.#g.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#g.get(t.queryHash)?.state}removeQueries(e){const t=this.#g;bi.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=this.#g,r={type:"active",...e};return bi.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=bi.batch((()=>this.#g.findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(qr).catch(qr)}invalidateQueries(e={},t={}){return bi.batch((()=>{if(this.#g.findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e={},t){const n={...t,cancelRefetch:t?.cancelRefetch??!0},r=bi.batch((()=>this.#g.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(qr)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(qr)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#g.build(this,t);return n.isStaleByTime(Gr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qr).catch(qr)}fetchInfiniteQuery(e){return e.behavior=Ti(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qr).catch(qr)}ensureInfiniteQueryData(e){return e.behavior=Ti(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pi.isOnline()?this.#f.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#g}getMutationCache(){return this.#f}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#y.set(ei(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#y.values()];let n={};return t.forEach((t=>{ti(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){this.#b.set(ei(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#b.values()];let n={};return t.forEach((t=>{ti(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Jr(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===ci&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#g.clear(),this.#f.clear()}},Oi=class extends Wr{constructor(e,t){super(),this.options=t,this.#S=e,this.#E=null,this.bindMethods(),this.setOptions(t)}#S;#P=void 0;#k=void 0;#T=void 0;#C;#A;#E;#R;#O;#F;#L;#D;#M;#V=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#P.addObserver(this),Fi(this.#P,this.options)?this.#I():this.updateResult(),this.#j())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Li(this.#P,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Li(this.#P,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#B(),this.#N(),this.#P.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#P;if(this.options=this.#S.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof Yr(this.options.enabled,this.#P))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#U(),this.#P.setOptions(this.options),n._defaulted&&!ri(this.options,n)&&this.#S.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#P,observer:this});const i=this.hasListeners();i&&Di(this.#P,r,this.options,n)&&this.#I(),this.updateResult(t),!i||this.#P===r&&Yr(this.options.enabled,this.#P)===Yr(n.enabled,this.#P)&&Gr(this.options.staleTime,this.#P)===Gr(n.staleTime,this.#P)||this.#H();const o=this.#$();!i||this.#P===r&&Yr(this.options.enabled,this.#P)===Yr(n.enabled,this.#P)&&o===this.#M||this.#W(o)}getOptimisticResult(e){const t=this.#S.getQueryCache().build(this.#S,e),n=this.createResult(t,e);var r;return r=n,ri(this.getCurrentResult(),r)||(this.#T=n,this.#A=this.options,this.#C=this.#P.state),n}getCurrentResult(){return this.#T}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})})),n}trackProp(e){this.#V.add(e)}getCurrentQuery(){return this.#P}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#S.defaultQueryOptions(e),n=this.#S.getQueryCache().build(this.#S,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return this.#I({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#T)))}#I(e){this.#U();let t=this.#P.fetch(this.options,e);return e?.throwOnError||(t=t.catch(qr)),t}#H(){this.#B();const e=Gr(this.options.staleTime,this.#P);if(zr||this.#T.isStale||!Qr(e))return;const t=Kr(this.#T.dataUpdatedAt,e)+1;this.#L=setTimeout((()=>{this.#T.isStale||this.updateResult()}),t)}#$(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#P):this.options.refetchInterval)??!1}#W(e){this.#N(),this.#M=e,!zr&&!1!==Yr(this.options.enabled,this.#P)&&Qr(this.#M)&&0!==this.#M&&(this.#D=setInterval((()=>{(this.options.refetchIntervalInBackground||hi.isFocused())&&this.#I()}),this.#M))}#j(){this.#H(),this.#W(this.#$())}#B(){this.#L&&(clearTimeout(this.#L),this.#L=void 0)}#N(){this.#D&&(clearInterval(this.#D),this.#D=void 0)}createResult(e,t){const n=this.#P,r=this.options,i=this.#T,o=this.#C,s=this.#A,a=e!==n?e.state:this.#k,{state:l}=e;let u,c={...l},d=!1;if(t._optimisticResults){const i=this.hasListeners(),o=!i&&Fi(e,t),s=i&&Di(e,n,t,r);(o||s)&&(c={...c,..._i(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:h,errorUpdatedAt:p,status:f}=c;if(t.select&&void 0!==c.data)if(i&&c.data===o?.data&&t.select===this.#R)u=this.#O;else try{this.#R=t.select,u=t.select(c.data),u=ai(i?.data,u,t),this.#O=u,this.#E=null}catch(w){this.#E=w}else u=c.data;if(void 0!==t.placeholderData&&void 0===u&&"pending"===f){let e;if(i?.isPlaceholderData&&t.placeholderData===s?.placeholderData)e=i.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#F?.state.data,this.#F):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#E=null}catch(w){this.#E=w}void 0!==e&&(f="success",u=ai(i?.data,e,t),d=!0)}this.#E&&(h=this.#E,u=this.#O,p=Date.now(),f="error");const m="fetching"===c.fetchStatus,v="pending"===f,g="error"===f,y=v&&m,b=void 0!==u;return{status:f,fetchStatus:c.fetchStatus,isPending:v,isSuccess:"success"===f,isError:g,isInitialLoading:y,isLoading:y,data:u,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:p,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:g&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:d,isRefetchError:g&&b,isStale:Mi(e,t),refetch:this.refetch}}updateResult(e){const t=this.#T,n=this.createResult(this.#P,this.options);if(this.#C=this.#P.state,this.#A=this.options,void 0!==this.#C.data&&(this.#F=this.#P),ri(n,t))return;this.#T=n;const r={};!1!==e?.listeners&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#V.size)return!0;const r=new Set(n??this.#V);return this.options.throwOnError&&r.add("error"),Object.keys(this.#T).some((e=>{const n=e;return this.#T[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),this.#z({...r,...e})}#U(){const e=this.#S.getQueryCache().build(this.#S,this.options);if(e===this.#P)return;const t=this.#P;this.#P=e,this.#k=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#j()}#z(e){bi.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#T)})),this.#S.getQueryCache().notify({query:this.#P,type:"observerResultsUpdated"})}))}};function Fi(e,t){return function(e,t){return!1!==Yr(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Li(e,t,t.refetchOnMount)}function Li(e,t,n){if(!1!==Yr(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Mi(e,t)}return!1}function Di(e,t,n,r){return(e!==t||!1===Yr(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Mi(e,n)}function Mi(e,t){return!1!==Yr(t.enabled,e)&&e.isStaleByTime(Gr(t.staleTime,e))}var Vi=class extends Wr{#S;#T=void 0;#q;#Q;constructor(e,t){super(),this.#S=e,this.setOptions(t),this.bindMethods(),this.#K()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#S.defaultMutationOptions(e),ri(this.options,t)||this.#S.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#q,observer:this}),t?.mutationKey&&this.options.mutationKey&&ei(t.mutationKey)!==ei(this.options.mutationKey)?this.reset():"pending"===this.#q?.state.status&&this.#q.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#q?.removeObserver(this)}onMutationUpdate(e){this.#K(),this.#z(e)}getCurrentResult(){return this.#T}reset(){this.#q?.removeObserver(this),this.#q=void 0,this.#K(),this.#z()}mutate(e,t){return this.#Q=t,this.#q?.removeObserver(this),this.#q=this.#S.getMutationCache().build(this.#S,this.options),this.#q.addObserver(this),this.#q.execute(e)}#K(){const e=this.#q?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#T={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){bi.batch((()=>{if(this.#Q&&this.hasListeners()){const t=this.#T.variables,n=this.#T.context;"success"===e?.type?(this.#Q.onSuccess?.(e.data,t,n),this.#Q.onSettled?.(e.data,null,t,n)):"error"===e?.type&&(this.#Q.onError?.(e.error,t,n),this.#Q.onSettled?.(void 0,e.error,t,n))}this.listeners.forEach((e=>{e(this.#T)}))}))}},Ii=Z(void 0),ji=e=>{const t=Lt(Ii);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Bi=({client:e,children:t})=>(Tt((()=>(e.mount(),()=>{e.unmount()})),[e]),Fr(Ii.Provider,{value:e,children:t})),Ni=Z(!1),Ui=()=>Lt(Ni);Ni.Provider;var Hi=Z(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),$i=()=>Lt(Hi);function Wi(e,t){return"function"==typeof e?e(...t):!!e}function zi(){}var qi=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Qi=e=>{Tt((()=>{e.clearReset()}),[e])},Ki=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Wi(n,[e.error,r]),Gi=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},Yi=(e,t)=>e?.suspense&&t.isPending,Xi=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function Zi(e,t){return function(e,t,n){const r=ji(n),i=Ui(),o=$i(),s=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=i?"isRestoring":"optimistic",Gi(s),qi(s,o),Qi(o);const[a]=Pt((()=>new t(r,s))),l=a.getOptimisticResult(s);if(Qn(Ft((e=>{const t=i?()=>{}:a.subscribe(bi.batchCalls(e));return a.updateResult(),t}),[a,i]),(()=>a.getCurrentResult())),Tt((()=>{a.setOptions(s,{listeners:!1})}),[s,a]),Yi(s,l))throw Xi(s,a,o);if(Ki({result:l,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(s,l),s.notifyOnChangeProps?l:a.trackResult(l)}(e,Oi,t)}var Ji,eo,to=b({default:()=>eo}),no=g((()=>{nt(),Ji=/^((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)-.*))$/,eo=tt((function(e){return Ji.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))}));no();var ro=eo,io=function(e){return"theme"!==e},oo=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ro:io},so=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},ao=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return tr(t,n,r),yr((function(){return nr(t,n,r)})),null},lo=function e(t,n){var r,i,o=t.__emotion_real===t,s=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var a=so(t,n,o),l=a||oo(s),u=!l("as");return function(){var c=arguments,d=o&&void 0!==t.__emotion_styles?t.__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=_r((function(e,t,n){var r=u&&e.as||s,o="",c=[],h=e;if(null==e.theme){for(var p in h={},e)h[p]=e[p];h.theme=Lt(Sr)}"string"==typeof e.className?o=er(t.registered,c,e.className):null!=e.className&&(o=e.className+" ");var f=vr(d.concat(c),t.registered,h);o+=t.key+"-"+f.name,void 0!==i&&(o+=" "+i);var m=u&&void 0===a?oo(r):l,v={};for(var g in e)u&&"as"===g||m(g)&&(v[g]=e[g]);return v.className=o,n&&(v.ref=n),C(O,null,C(ao,{cache:t,serialized:f,isStringTag:"string"==typeof r}),C(r,v))}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.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(t,r){return e(t,Yn({},n,r,{shouldForwardProp:so(f,r,!0)})).apply(void 0,d)},f}}.bind();function uo({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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(e){lo[e]=lo(e)}));var co=Xt(uo);function ho({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var po=Xt(ho),fo=lo.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
  `,mo=lo.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))"}}
@@ -10,10 +10,10 @@
10
10
  ${({prefix:e})=>e?{paddingLeft:"2.5rem"}:{paddingLeft:"0.75rem"}}
11
11
 
12
12
  ${({hasError:e})=>e?{"--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
- `;function So({title:e,titleId:t,...n},r){return C("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C("title",{id:t},e):null,C("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}var Eo=Xt(So);function Po({title:e,titleId:t,...n},r){return C("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C("title",{id:t},e):null,C("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}var ko=Xt(Po),To=Xt((({label:e,id:t,type:n,icon:r,placeholder:i,setPlaceholderOnFocus:o,value:s,className:a,onChange:l,onBlur:u,error:c,helperText:d,disabled:h,remove:p},f)=>Mr("div",{className:a,children:[e&&Dr("label",{htmlFor:t,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:e}),Mr("div",{css:{position:"relative",marginTop:"0.5rem"},children:[r&&Dr("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:r}),Mr("div",{css:{marginTop:"0.5rem",display:"flex",alignItems:"center"},children:[Dr(_o,{type:n,value:s,name:t,id:t,placeholder:i,onChange:e=>{const t=e;t.target instanceof HTMLInputElement&&l(t.target.value.trim())},onBlur:e=>{const t=e;t.target instanceof HTMLInputElement&&u&&u(t.target.value.trim())},onFocus:()=>{i&&o&&!s?.trim()&&l(i)},hasError:!!c,ref:f,disabled:h,prefix:!!r}),p&&Mr("button",{type:"button",children:[Dr(ko,{css:{marginLeft:"0.5rem",height:"1.25rem",width:"1.25rem"},onClick:()=>p()})," "]})]})]}),c&&Dr("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&&Dr("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 Co({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Ao=Xt(Co);function Ro({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Oo=Xt(Ro);function Fo({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Lo=Xt(Fo);function Do({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Mo=Xt(Do);function Vo({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}),C("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"}))}var Io,jo=Xt(Vo),Bo=lo.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))"},(e=>e.className),(({isActive:e})=>e&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"})),No=e=>{const[t,n]=Pt(),[r,i]=Pt([]),[o,s]=Pt(e.columns[0]),[a,l]=Pt("asc"),u=Ot((()=>o?[...e.data].sort(((e,t)=>{const n=o.sort?o.sort(e[o.field],t[o.field]):e[o.field].localeCompare(t[o.field]);return"desc"===a?-1*n:n})):e.data),[e.data,o,a]),c=Ot((()=>{const e=r.reduce(((e,t)=>e.filter(t.filterFunction)),u);return t?e.filter((e=>e.id.toLowerCase().includes(t.toLowerCase()))):e}),[u,t,r]),d=Ot((()=>e.columns.filter((e=>e.filters&&e.filters.length>0)).length>0),[e.columns]),h=(e,t)=>{const n={name:e.name,filterFunction:n=>e.predicate(n[t.field])},o=r.filter((e=>e.name!==n.name));return()=>o.length<r.length?i([...o]):i([...o,n])};return Dr(Lr,{children:Mr("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:[Mr("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[Mr("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[Dr("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.title}),e.subtitle&&Dr("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:e.subtitle}),Dr(To,{css:{marginTop:"0.5rem",maxWidth:"20rem"},label:"",icon:Dr(po,{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:e=>n(e)})]}),e.addButton&&Dr("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:Dr("button",{type:"button",onClick:e.addButton.onClick,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:e.addButton.text})})]}),Dr("div",{css:{marginTop:"2rem",display:"flow-root"},children:Dr("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:Dr("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:Dr("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:Mr("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:[d&&Dr("thead",{children:Dr("tr",{children:Mr("td",{css:{padding:"1rem"},colspan:e.columns.length,children:[Dr(Bo,{onClick:()=>i([]),isActive:0==r.length,children:"All"}),e.columns.map((e=>e.filters?.map((t=>Dr(Bo,{onClick:h(t,e),isActive:!!r.find((e=>e.name===t.name)),children:t.name},t.name)))))]})})}),Dr("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:Dr("tr",{children:e.columns.map((e=>Dr("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:Mr("button",{disabled:!e.isSortable,onClick:()=>(e=>{o===e?l("asc"===a?"desc":"asc"):(s(e),l("asc"))})(e),css:{display:"inline-flex"},children:[Dr("span",{children:e.name}),Mr("span",{css:{marginLeft:"0.5rem"},children:[o===e&&"asc"===a&&Dr(Ao,{css:{height:"1.25rem",width:"1.25rem"}}),o===e&&"desc"===a&&Dr(Oo,{css:{height:"1.25rem",width:"1.25rem"}}),o!==e&&Dr("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},e.field)))})}),Dr("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(((t,n)=>Dr("tr",{children:e.columns.map(((e,r)=>Dr(O,{children:xo(t.id,t[e.field],e.type)},`${t[e.field]}-${n}-${r}`)))},`${t[e.columns[0].field]}-${n}`)))})]})})})})})]})})};function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(null,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Io||(Io={}));var Ho,$o="popstate";function Wo(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Io.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(Uo({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Io.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:a,location:m.location,delta:t})}function h(e,t){a=Io.Push;let r=Ko(m.location,e,t);n&&n(r,e),u=c()+1;let d=Qo(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(e,t){a=Io.Replace;let r=Ko(m.location,e,t);n&&n(r,e),u=c();let i=Qo(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:Go(e);return n=n.replace(/ $/,"%20"),zo(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($o,d),l=e,()=>{i.removeEventListener($o,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:p,go:e=>s.go(e)};return m}((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=Yo(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),Ko("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:Go(t))}),(function(e,t){qo("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function zo(e,t){if(!1===e||null==e)throw new Error(t)}function qo(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(nx){}}}function Qo(e,t){return{usr:e.state,key:e.key,idx:t}}function Ko(e,t,n,r){return void 0===n&&(n=null),Uo({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Yo(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Go(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Yo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Xo(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let i=cs(("string"==typeof t?Yo(t):t).pathname||"/",n);if(null==i)return null;let o=Zo(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let s=null,a=function(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return qo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}(i);for(let l=0;null==s&&l<o.length;++l)s=ls(o[l],a,r);return s}(e,t,n,!1)}function Zo(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(zo(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=gs([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(zo(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Zo(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:as(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Jo(e.path))i(e,t,r);else i(e,t)})),t}function Jo(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=Jo(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ho||(Ho={}));var es=/^:[\w-]+$/,ts=3,ns=2,rs=1,is=10,os=-2,ss=e=>"*"===e;function as(e,t){let n=e.split("/"),r=n.length;return n.some(ss)&&(r+=os),t&&(r+=ns),n.filter((e=>!ss(e))).reduce(((e,t)=>e+(es.test(t)?ts:""===t?rs:is)),r)}function ls(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=us({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=us({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:gs([o,c.pathname]),pathnameBase:ys(gs([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=gs([o,c.pathnameBase]))}return s}function us(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);qo("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");return[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function cs(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var ds=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hs=e=>ds.test(e);function ps(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function fs(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` 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 ms(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=Yo(e):(i=Uo({},e),zo(!i.pathname||!i.pathname.includes("?"),fs("?","pathname","search",i)),zo(!i.pathname||!i.pathname.includes("#"),fs("#","pathname","hash",i)),zo(!i.search||!i.search.includes("#"),fs("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?Yo(e):e;if(r)if(hs(r))n=r;else{if(r.includes("//")){let e=r;r=vs(r),qo(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?ps(r.substring(1),"/"):ps(r,t)}else n=t;return{pathname:n,search:bs(i),hash:ws(o)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}var vs=e=>e.replace(/\/\/+/g,"/"),gs=e=>vs(e.join("/")),ys=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bs=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ws=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;var xs=["post","put","patch","delete"],_s=(new Set(xs),["get",...xs]);new Set(_s);function Ss(){return Ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ss.apply(null,arguments)}var Es=Z(null),Ps=Z(null),ks=Z(null),Ts=Z(null),Cs=Z({outlet:null,matches:[],isDataRoute:!1}),As=Z(null);function Rs(){return null!=Lt(Ts)}function Os(){return!Rs()&&zo(!1),Lt(Ts).location}function Fs(e){Lt(ks).static||Ct(e)}function Ls(){let{isDataRoute:e}=Lt(Cs);return e?function(){let{router:e}=function(){let e=Lt(Es);return!e&&zo(!1),e}(Bs.UseNavigateStable),t=Us(Ns.UseNavigateStable),n=At(!1);return Fs((()=>{n.current=!0})),Ft((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Ss({fromRouteId:t},i)))}),[e,t])}():function(){!Rs()&&zo(!1);let e=Lt(Es),{basename:t,future:n,navigator:r}=Lt(ks),{matches:i}=Lt(Cs),{pathname:o}=Os(),s=JSON.stringify(function(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}(i,n.v7_relativeSplatPath)),a=At(!1);return Fs((()=>{a.current=!0})),Ft((function(n,i){if(void 0===i&&(i={}),!a.current)return;if("number"==typeof n)return void r.go(n);let l=ms(n,JSON.parse(s),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:gs([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[t,r,s,o,e])}()}function Ds(e,t){return function(e,t,n,r){!Rs()&&zo(!1);let{navigator:i}=Lt(ks),{matches:o}=Lt(Cs),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=Os();if(t){var d;let e="string"==typeof t?Yo(t):t;"/"!==l&&!(null==(d=e.pathname)?void 0:d.startsWith(l))&&zo(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=Xo(e,{pathname:p}),m=function(e,t,n,r){var i;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=s.findIndex((e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id])));!(e>=0)&&zo(!1),s=s.slice(0,Math.min(s.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let e=s[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((e,r,i)=>{let o,c=!1,d=null,h=null;var p;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||Vs,l&&(u<0&&0===i?(p="route-fallback",!1||Hs[p]||(Hs[p]=!0),c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,i+1)),m=()=>{let t;return t=o?d:c?h:r.route.Component?C(r.route.Component,null):r.route.element?r.route.element:e,C(js,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?C(Is,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()}),null)}(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:gs([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:gs([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);return t&&m?C(Ts.Provider,{value:{location:Ss({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Io.Pop}},m):m}(e,t)}function Ms(){let e=function(){var e;let t=Lt(As),n=function(){let e=Lt(Ps);return!e&&zo(!1),e}(Ns.UseRouteError),r=Us(Ns.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return C(O,null,C("h2",null,"Unexpected Application Error!"),C("h3",{style:{fontStyle:"italic"}},t),n?C("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},n):null,null)}var Vs=C(Ms,null),Is=class extends F{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?C(Cs.Provider,{value:this.props.routeContext},C(As.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function js(e){let{routeContext:t,match:n,children:r}=e,i=Lt(Es);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C(Cs.Provider,{value:t},r)}var Bs=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Bs||{}),Ns=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ns||{});function Us(e){let t=function(){let e=Lt(Cs);return!e&&zo(!1),e}(),n=t.matches[t.matches.length-1];return!n.route.id&&zo(!1),n.route.id}var Hs={};var $s=(e,t,n)=>{};function Ws(e){zo(!1)}function zs(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Io.Pop,navigator:o,static:s=!1,future:a}=e;Rs()&&zo(!1);let l=t.replace(/^\/*/,"/"),u=Ot((()=>({basename:l,navigator:o,static:s,future:Ss({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=Yo(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=Ot((()=>{let e=cs(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:C(ks.Provider,{value:u},C(Ts.Provider,{children:n,value:m}))}function qs(e){let{children:t,location:n}=e;return Ds(Qs(t),n)}new Promise((()=>{}));function Qs(e,t){void 0===t&&(t=[]);let n=[];return Jt.forEach(e,((e,r)=>{if(!Ln(e))return;let i=[...t,r];if(e.type===O)return void n.push.apply(n,Qs(e.props.children,i));e.type!==Ws&&zo(!1),e.props.index&&e.props.children&&zo(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Qs(e.props.children,i)),n.push(o)})),n}try{window.__reactRouterVersion="6"}catch(nx){}var Ks=Hn;function Gs(e){let{basename:t,children:n,future:r,window:i}=e,o=At();null==o.current&&(o.current=Wo({window:i,v5Compat:!0}));let s=o.current,[a,l]=Pt({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=Ft((e=>{u&&Ks?Ks((()=>l(e))):l(e)}),[l,u]);return Ct((()=>s.listen(c)),[s,c]),Tt((()=>{return void 0===(null==(e=r)?void 0:e.v7_startTransition)&&$s("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&void 0!==t.v7_relativeSplatPath||$s("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),void(t&&(void 0===t.v7_fetcherPersist&&$s("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&$s("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&$s("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&$s("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation")));var e,t}),[r]),C(zs,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var Ys,Xs,Zs;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(Ys||(Ys={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Xs||(Xs={}));var Js="getAllPromotions",ea=/^https:\/\/([A-Za-z]+)-partner/,ta=e=>{switch((e=>{if(e.startsWith("http://localhost"))return"local";const t=e.toLowerCase().match(ea);return t&&t.length>1?t[1]:"prod"})(e.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/"}},na=()=>{const{getAllPromotions:e}=$r(),t=Ls(),{isPending:n,error:r,data:i}=Zi({queryKey:[Js],queryFn:e}),o=Br(),s=Ot((()=>{return e=o.backend,t=i,(t?.data||[]).map((t=>({id:t.id,category:t.category.title,promotionStatus:t.status,contentfulUrl:t.contentfulContent?.contentId?`${ta(e)}entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,audiences:t.audiences?.sort().join(", "),updatedAt:t.updatedAt,edit:"Edit"}))).sort(((e,t)=>new Date(t.updatedAt).valueOf()-new Date(e.updatedAt).valueOf()));var e,t}),[o.backend,i]),a=Ot((()=>[{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:e=>"Enabled"===e},{name:"Disabled",predicate:e=>"Disabled"===e}]},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:e=>e?-1:1,type:{kind:"link"},filters:[{name:"Linked",predicate:e=>!!e},{name:"Unlinked",predicate:e=>!e}]},{name:"Audiences",field:"audiences",isSortable:!0,type:{kind:"list"},filters:[{name:"Audiences",predicate:e=>!!e}]},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(e,t)=>new Date(t).valueOf()-new Date(e).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:e=>t(`/promotion/${e}`),children:Dr(jo,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[t]);switch(!0){case n:return Dr(Lr,{children:"Loading..."});case!!r:return Mr(Lr,{children:["An error has occurred: ",r.message]});case!!i:return Dr(No,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButton:{onClick:()=>t("/promotion"),text:"Add New Promotion"}});default:return Dr(Lr,{children:"No data returned from backend"})}};function ra(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function ia(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}var oa=e=>Array.isArray(e);function sa(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function aa(e){return"string"==typeof e||Array.isArray(e)}function la(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function ua(e,t,n,r){if("function"==typeof t){const[i,o]=la(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=la(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function ca(e,t,n){const r=e.getProps();return ua(r,t,void 0!==n?n:r.custom,e)}var da=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ha=["initial",...da],pa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fa=new Set(pa),ma=e=>1e3*e,va=e=>e/1e3,ga={type:"spring",stiffness:500,damping:25,restSpeed:10},ya={type:"keyframes",duration:.8},ba={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wa=(e,{keyframes:t})=>t.length>2?ya:fa.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ga:ba;function xa(e,t){return e[t]||e.default||e}var _a=!1,Sa=!1,Ea=!1,Pa=e=>null!==e;function ka(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Pa),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}var Ta=e=>e;var Ca=["read","resolveKeyframes","update","preRender","render","postRender"];function Aa(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Ca.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=Sa?i.timestamp: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&&t&&(r=!1,e(p))};return{schedule:Ca.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<Ca.length;t++)s[Ca[t]].cancel(e)},state:i,steps:s}}var{schedule:Ra,cancel:Oa,state:Fa,steps:La}=Aa("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ta,!0),Da=e=>/^0[^.\s]+$/u.test(e);var Ma=Ta,Va=Ta,Ia=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ja=e=>t=>"string"==typeof t&&t.startsWith(e),Ba=ja("--"),Na=ja("var(--"),Ua=e=>!!Na(e)&&Ha.test(e.split("/*")[0].trim()),Ha=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$a=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Wa(e,t,n=1){Va(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=function(e){const t=$a.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${null!=n?n:r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Ia(e)?parseFloat(e):e}return Ua(i)?Wa(i,t,n+1):i}var za=(e,t,n)=>n>t?t:n<e?e:n,qa={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Qa={...qa,transform:e=>za(0,1,e)},Ka={...qa,default:1},Ga=e=>Math.round(1e5*e)/1e5,Ya=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Xa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Za=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ja(e){return"string"==typeof e}var el=e=>({test:t=>Ja(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),tl=el("deg"),nl=el("%"),rl=el("px"),il=el("vh"),ol=el("vw"),sl={...nl,parse:e=>nl.parse(e)/100,transform:e=>nl.transform(100*e)},al=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ll=e=>e===qa||e===rl,ul=(e,t)=>parseFloat(e.split(", ")[t]),cl=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return ul(i[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?ul(t[1],e):0}},dl=new Set(["x","y","z"]),hl=pa.filter((e=>!dl.has(e)));var pl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:cl(4,13),y:cl(5,14)};pl.translateX=pl.x,pl.translateY=pl.y;var fl=e=>t=>t.test(e),ml=[qa,rl,nl,tl,ol,il,{test:e=>"auto"===e,parse:e=>e}],vl=e=>ml.find(fl(e)),gl=new Set,yl=!1,bl=!1;function wl(){if(bl){const e=Array.from(gl).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return hl.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}bl=!1,yl=!1,gl.forEach((e=>e.complete())),gl.clear()}function xl(){gl.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(bl=!0)}))}var _l=class{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gl.add(this),yl||(yl=!0,Ra.read(xl),Ra.resolveKeyframes(wl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gl.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gl.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},Sl=(e,t)=>n=>Boolean(Ja(n)&&Za.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),El=(e,t,n)=>r=>{if(!Ja(r))return r;const[i,o,s,a]=r.match(Ya);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Pl={...qa,transform:e=>Math.round((e=>za(0,255,e))(e))},kl={test:Sl("rgb","red"),parse:El("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pl.transform(e)+", "+Pl.transform(t)+", "+Pl.transform(n)+", "+Ga(Qa.transform(r))+")"};var Tl={test:Sl("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:kl.transform},Cl={test:Sl("hsl","hue"),parse:El("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+nl.transform(Ga(t))+", "+nl.transform(Ga(n))+", "+Ga(Qa.transform(r))+")"},Al={test:e=>kl.test(e)||Tl.test(e)||Cl.test(e),parse:e=>kl.test(e)?kl.parse(e):Cl.test(e)?Cl.parse(e):Tl.parse(e),transform:e=>Ja(e)?e:e.hasOwnProperty("red")?kl.transform(e):Cl.transform(e)};var Rl="number",Ol="color",Fl="var",Ll="var(",Dl="${}",Ml=/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 Vl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;return{values:n,split:t.replace(Ml,(e=>(Al.test(e)?(r.color.push(o),i.push(Ol),n.push(Al.parse(e))):e.startsWith(Ll)?(r.var.push(o),i.push(Fl),n.push(e)):(r.number.push(o),i.push(Rl),n.push(parseFloat(e))),++o,Dl))).split(Dl),indexes:r,types:i}}function Il(e){return Vl(e).values}function jl(e){const{split:t,types:n}=Vl(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===Rl?Ga(e[o]):t===Ol?Al.transform(e[o]):e[o]}return i}}var Bl=e=>"number"==typeof e?0:e;var Nl={test:function(e){var t,n;return isNaN(e)&&Ja(e)&&((null===(t=e.match(Ya))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Xa))||void 0===n?void 0:n.length)||0)>0},parse:Il,createTransformer:jl,getAnimatableNone:function(e){const t=Il(e);return jl(e)(t.map(Bl))}},Ul=new Set(["brightness","contrast","saturate","opacity"]);function Hl(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ya)||[];if(!r)return e;const i=n.replace(r,"");let o=Ul.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}var $l=/\b([a-z-]*)\(.*?\)/gu,Wl={...Nl,getAnimatableNone:e=>{const t=e.match($l);return t?t.map(Hl).join(" "):e}},zl={...qa,transform:Math.round},ql={borderWidth:rl,borderTopWidth:rl,borderRightWidth:rl,borderBottomWidth:rl,borderLeftWidth:rl,borderRadius:rl,radius:rl,borderTopLeftRadius:rl,borderTopRightRadius:rl,borderBottomRightRadius:rl,borderBottomLeftRadius:rl,width:rl,maxWidth:rl,height:rl,maxHeight:rl,size:rl,top:rl,right:rl,bottom:rl,left:rl,padding:rl,paddingTop:rl,paddingRight:rl,paddingBottom:rl,paddingLeft:rl,margin:rl,marginTop:rl,marginRight:rl,marginBottom:rl,marginLeft:rl,rotate:tl,rotateX:tl,rotateY:tl,rotateZ:tl,scale:Ka,scaleX:Ka,scaleY:Ka,scaleZ:Ka,skew:tl,skewX:tl,skewY:tl,distance:rl,translateX:rl,translateY:rl,translateZ:rl,x:rl,y:rl,z:rl,perspective:rl,transformPerspective:rl,opacity:Qa,originX:sl,originY:sl,originZ:rl,zIndex:zl,backgroundPositionX:rl,backgroundPositionY:rl,fillOpacity:Qa,strokeOpacity:Qa,numOctaves:zl},Ql={...ql,color:Al,backgroundColor:Al,outlineColor:Al,fill:Al,stroke:Al,borderColor:Al,borderTopColor:Al,borderRightColor:Al,borderBottomColor:Al,borderLeftColor:Al,filter:Wl,WebkitFilter:Wl},Kl=e=>Ql[e];function Gl(e,t){let n=Kl(e);return n!==Wl&&(n=Nl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Yl=new Set(["auto","none","0"]);var Xl,Zl=class extends _l{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),Ua(n))){const r=Wa(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!al.has(n)||2!==e.length)return;const[r,i]=e,o=vl(r),s=vl(i);if(o!==s)if(ll(o)&&ll(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)("number"==typeof(r=e[i])?0===r:null===r||"none"===r||"0"===r||Da(r))&&n.push(i);var r;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Yl.has(t)&&Vl(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=Gl(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pl[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=pl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}};function Jl(e){let t;return()=>(void 0===t&&(t=e()),t)}function eu(){Xl=void 0}var tu={now:()=>(void 0===Xl&&tu.set(Fa.isProcessing||Sa?Fa.timestamp:performance.now()),Xl),set:e=>{Xl=e,queueMicrotask(eu)}},nu=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Nl.test(e)&&"0"!==e||e.startsWith("url(")));var ru=class{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=tu.now(),this.options={autoplay:e,delay:t,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||(xl(),wl()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=tu.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=nu(i,t),a=nu(o,t);return Ma(s===a,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,i)){if(Ea||!o)return null==a||a(ka(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}};function iu(e,t){return t?e*(1e3/t):0}var ou=5;function su(e,t,n){const r=Math.max(t-ou,0);return iu(n-e(r),t-r)}var au=.001,lu=.01,uu=.05;function cu({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Ma(e<=ma(10),"Spring duration must be 10 seconds or less");let s=1-t;s=za(uu,1,s),e=za(lu,10,va(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=hu(t,s),l=Math.exp(-i);return au-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=hu(Math.pow(t,2),s);return(-i(t)+au>0?-1:1)*((o-a)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<du;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=ma(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}var du=12;function hu(e,t){return e*Math.sqrt(1-t*t)}var pu=["duration","bounce"],fu=["stiffness","damping","mass"];function mu(e,t){return t.some((t=>void 0!==e[t]))}function vu({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!mu(e,fu)&&mu(e,pu)){const n=cu(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-va(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=va(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),t||(t=g?.005:.5),f<1){const e=hu(v,f);y=t=>{const n=Math.exp(-f*v*t);return o-n*((p+f*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)y=e=>o-Math.exp(-v*e)*(m+(p+v*m)*e);else{const e=v*Math.sqrt(f*f-1);y=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return o-n*((p+f*v*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:h&&c||null,next:e=>{const r=y(e);if(h)s.done=e>=c;else{let i=0;f<1&&(i=0===e?ma(p):su(y,e,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=t;s.done=a&&l}return s.value=s.done?o:r,s}}}function gu({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=e=>-f*Math.exp(-e/r),y=e=>v+g(e),b=e=>{const t=g(e),n=y(e);h.done=Math.abs(t)<=u,h.value=h.done?v:n};let w,x;const _=e=>{(e=>void 0!==a&&e<a||void 0!==l&&e>l)(h.value)&&(w=e,x=vu({keyframes:[h.value,p(h.value)],velocity:su(y,e,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),h)}}}var yu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bu=1e-7,wu=12;function xu(e,t,n,r){if(e===t&&n===r)return Ta;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=yu(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>bu&&++a<wu);return s}(t,0,1,e,n);return e=>0===e||1===e?e:yu(i(e),t,r)}var _u=xu(.42,0,1,1),Su=xu(0,0,.58,1),Eu=xu(.42,0,.58,1),Pu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ku=e=>t=>1-e(1-t),Tu=e=>1-Math.sin(Math.acos(e)),Cu=ku(Tu),Au=Pu(Tu),Ru=xu(.33,1.53,.69,.99),Ou=ku(Ru),Fu={linear:Ta,easeIn:_u,easeInOut:Eu,easeOut:Su,circIn:Tu,circInOut:Au,circOut:Cu,backIn:Ou,backInOut:Pu(Ou),backOut:Ru,anticipate:e=>(e*=2)<1?.5*Ou(e):.5*(2-Math.pow(2,-10*(e-1)))},Lu=e=>{if(Array.isArray(e)){Va(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return xu(t,n,r,i)}return"string"==typeof e?(Va(void 0!==Fu[e],`Invalid easing type '${e}'`),Fu[e]):e},Du=(e,t)=>n=>t(e(n)),Mu=(...e)=>e.reduce(Du),Vu=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Iu=(e,t,n)=>e+(t-e)*n;function ju(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Bu(e,t){return n=>n>0?t:e}var Nu=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Uu=[Tl,kl,Cl];function Hu(e){const t=(e=>Uu.find((t=>t.test(e))))(e);if(Ma(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===Cl&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=ju(a,r,e+1/3),o=ju(a,r,e),s=ju(a,r,e-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}}(n)),n}var $u=(e,t)=>{const n=Hu(e),r=Hu(t);if(!n||!r)return Bu(e,t);const i={...n};return e=>(i.red=Nu(n.red,r.red,e),i.green=Nu(n.green,r.green,e),i.blue=Nu(n.blue,r.blue,e),i.alpha=Iu(n.alpha,r.alpha,e),kl.transform(i))},Wu=new Set(["none","hidden"]);function zu(e,t){return n=>Iu(e,t,n)}function qu(e){return"number"==typeof e?zu:"string"==typeof e?Ua(e)?Bu:Al.test(e)?$u:Gu:Array.isArray(e)?Qu:"object"==typeof e?Al.test(e)?$u:Ku:Bu}function Qu(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>qu(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ku(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=qu(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}var Gu=(e,t)=>{const n=Nl.createTransformer(t),r=Vl(e),i=Vl(t);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?Wu.has(e)&&!i.values.length||Wu.has(t)&&!r.values.length?function(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Mu(Qu(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]];r[o]=null!==(n=e.values[a])&&void 0!==n?n:0,i[s]++}return r}(r,i),i.values),n):(Ma(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Bu(e,t))};function Yu(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Iu(e,t,n):qu(e)(e,t)}function Xu(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Va(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||Yu,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);t&&(n=Mu(Array.isArray(t)?t[s]||Ta:t,n)),r.push(n)}return r}(t,r,i),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Vu(e[n],e[n+1],t);return s[n](r)};return n?t=>l(za(e[0],e[o-1],t)):l}function Zu(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Vu(0,t,r);e.push(Iu(n,1,i))}}(t,e.length-1),t}function Ju({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Lu):Lu(r),o={done:!1,value:t[0]},s=Xu(function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Zu(t),e),t,{ease:Array.isArray(i)?i:(a=t,l=i,a.map((()=>l||Eu)).splice(0,a.length-1))});var a,l;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}var ec=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Ra.update(t,!0),stop:()=>Oa(t),now:()=>Fa.isProcessing?Fa.timestamp:tu.now()}},tc={decay:gu,inertia:gu,tween:Ju,keyframes:Ju,spring:vu},nc=e=>e/100,rc=class extends ru{constructor(e){super(e),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:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||_l;this.resolver=new o(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=tc[t]||Ju;let a,l;s!==Ju&&"number"!=typeof e[0]&&(a=Mu(nc,Yu(e[0],e[1])),e=[0,100]);const u=s({...this.options,keyframes:e});"mirror"===i&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(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:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.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,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-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,b=i;if(h){const e=Math.min(this.currentTime,u)/c;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(b=o)),y=za(0,1,n)*c}const w=g?{done:!1,value:a[0]}:b.next(y);s&&(w.value=s(w.value));let{done:x}=w;g||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==r&&(w.value=ka(a,this.options,r)),m&&m(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?va(e.calculatedDuration):0}get time(){return va(this.currentTime)}set time(e){e=ma(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=va(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=ec,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();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 e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e: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:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}},ic=new Set(["opacity","clipPath","filter","transform"]),oc=e=>Array.isArray(e)&&"number"==typeof e[0];function sc(e){return Boolean(!e||"string"==typeof e&&e in lc||oc(e)||Array.isArray(e)&&e.every(sc))}var ac=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ac([0,.65,.55,1]),circOut:ac([.55,0,1,.45]),backIn:ac([.31,.01,.66,-.59]),backOut:ac([.33,1.53,.69,.99])};function uc(e){return cc(e)||lc.easeOut}function cc(e){return e?oc(e)?ac(e):Array.isArray(e)?e.map(uc):lc[e]:void 0}var dc=Jl((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));var hc=class extends ru{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new Zl(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){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||!sc(c.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(e,t){const n=new rc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[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"}}(e,u);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=cc(a);return Array.isArray(c)&&(u.easing=c),e.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,e,{...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(ka(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return va(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return va(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=ma(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Ta;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Ta}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...u}=this.options,c=new rc({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=ma(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;return dc()&&n&&ic.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}};var pc=Jl((()=>void 0!==window.ScrollTimeline)),fc=class{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map((t=>{if(!pc()||!t.attachTimeline)return t.pause(),function(e,t){let n;const r=()=>{const{currentTime:r}=t,i=(null===r?0:r.value)/100;n!==i&&e(i),n=i};return Ra.update(r,!0),()=>Oa(r)}((e=>{t.time=t.duration*e}),e);t.attachTimeline(e)}));return()=>{t.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}},mc=(e,t,n,r={},i,o,s)=>a=>{const l=xa(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=ma(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,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,...wa(e,d)}),d.duration&&(d.duration=ma(d.duration)),d.repeatDelay&&(d.repeatDelay=ma(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)),(Ea||_a)&&(h=!0,d.duration=0,d.delay=0),h&&!o&&void 0!==t.get()){const e=ka(d.keyframes,l);if(void 0!==e)return Ra.update((()=>{d.onUpdate(e),d.onComplete()})),new fc([])}return!o&&hc.supports(d)?new hc(d):new rc(d)},vc=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),gc=e=>oa(e)?e[e.length-1]||0:e;function yc(e,t){-1===e.indexOf(t)&&e.push(t)}function bc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}var wc=class{constructor(){this.subscriptions=[]}add(e){return yc(this.subscriptions,e),()=>bc(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},xc={current:void 0},_c=class{constructor(e,t={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=tu.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=tu.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new wc);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ra.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return xc.current&&xc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=tu.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return iu(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 Sc(e,t){return new _c(e,t)}function Ec(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Sc(n))}var Pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kc="data-"+Pc("framerAppearId");function Tc(e){return e.props[kc]}function Cc(e){return fa.has(e)?"transform":ic.has(e)?Pc(e):void 0}var Ac=class extends _c{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=Cc(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(bc(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}},Rc=e=>Boolean(e&&e.getVelocity);function Oc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new Ac("auto"),e.addValue("willChange",r)),i=r,Boolean(Rc(i)&&i.add)?r.add(t):void 0;var i}function Fc({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Lc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const t=e.getValue(d,null!==(o=e.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&Fc(c,d))continue;const i={delay:n,...xa(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const t=Tc(e);if(t){const e=window.MotionHandoffAnimation(t,d,Ra);null!==e&&(i.startTime=e,a=!0)}}t.start(mc(d,t,r,e.shouldReduceMotion&&fa.has(d)?{type:!1}:i,e,a,Oc(e,d)));const h=t.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{Ra.update((()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=ca(e,t)||{};i={...i,...n};for(const o in i)Ec(e,o,gc(i[o]))}(e,a)}))})),u}function Dc(e,t,n={}){var r;const i=ca(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Lc(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Mc).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Dc(e,t,{...o,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function Mc(e,t){return e.sortNodePosition(t)}var Vc=[...da].reverse(),Ic=da.length;function jc(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>Dc(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=Dc(e,t,n);else{const i="function"==typeof t?ca(e,t,n.custom):t;r=Promise.all(Lc(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Bc(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!sa(t,e)}function Nc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Uc(){return{animate:Nc(!0),whileInView:Nc(),whileHover:Nc(),whileTap:Nc(),whileDrag:Nc(),whileFocus:Nc(),exit:Nc()}}var Hc=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},$c=0,Wc={animation:{Feature:class extends Hc{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=jc(e),n=Uc(),r=!0;const i=t=>(n,r)=>{var i;const o=ca(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function o(o){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<Ic;t++){const h=Vc[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=aa(f),v=h===o?p.isActive:null;!1===v&&(d=t);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||ia(f)||"boolean"==typeof f)continue;let y=Bc(p.prevProp,f)||h===o&&p.isActive&&!g&&m||t>d&&m,b=!1;const w=Array.isArray(f)?f:[f];let x=w.reduce(i(h),{});!1===v&&(x={});const{prevResolvedValues:_={}}=p,S={..._,...x},E=t=>{y=!0,u.has(t)&&(b=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=x[e],n=_[e];if(c.hasOwnProperty(e))continue;let r=!1;r=oa(t)&&oa(n)?!sa(t,n):t!==n,r?null!=t?E(e):u.add(e):void 0!==t&&u.has(e)?E(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=x,p.isActive&&(c={...c,...x}),r&&e.blockInitialAnimation&&(y=!1),!y||g&&!b||l.push(...w.map((e=>({animation:e,options:{type:h}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Uc(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ia(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Hc{constructor(){super(...arguments),this.id=$c++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},zc=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function qc(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}var Qc=e=>t=>zc(t)&&e(t,qc(t));function Kc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gc(e,t,n,r){return Kc(e,t,Qc(n),r)}var Yc=(e,t)=>Math.abs(e-t);var Xc=class{constructor(e,t,{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 e=ed(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Yc(e.x,t.x),r=Yc(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Fa;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Zc(t,this.transformPagePoint),Ra.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ed("pointercancel"===e.type?this.lastMoveEventInfo:Zc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!zc(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=Zc(qc(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=Fa;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,ed(o,this.history)),this.removeListeners=Mu(Gc(this.contextWindow,"pointermove",this.handlePointerMove),Gc(this.contextWindow,"pointerup",this.handlePointerUp),Gc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Oa(this.updatePoint)}};function Zc(e,t){return t?{point:t(e.point)}:e}function Jc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ed({point:e},t){return{point:e,delta:Jc(e,nd(t)),offset:Jc(e,td(t)),velocity:rd(t,.1)}}function td(e){return e[0]}function nd(e){return e[e.length-1]}function rd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=nd(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ma(t)));)n--;if(!r)return{x:0,y:0};const o=va(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 id(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}var od=id("dragHorizontal"),sd=id("dragVertical");function ad(e){let t=!1;if("y"===e)t=sd();else if("x"===e)t=od();else{const e=od(),n=sd();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function ld(){const e=ad(!0);return!e||(e(),!1)}function ud(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var cd=.9999,dd=1.0001,hd=-.01,pd=.01;function fd(e){return e.max-e.min}function md(e,t,n,r=.5){e.origin=r,e.originPoint=Iu(t.min,t.max,e.origin),e.scale=fd(n)/fd(t),e.translate=Iu(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cd&&e.scale<=dd||isNaN(e.scale))&&(e.scale=1),(e.translate>=hd&&e.translate<=pd||isNaN(e.translate))&&(e.translate=0)}function vd(e,t,n,r){md(e.x,t.x,n.x,r?r.originX:void 0),md(e.y,t.y,n.y,r?r.originY:void 0)}function gd(e,t,n){e.min=n.min+t.min,e.max=e.min+fd(t)}function yd(e,t,n){e.min=t.min-n.min,e.max=e.min+fd(t)}function bd(e,t,n){yd(e.x,t.x,n.x),yd(e.y,t.y,n.y)}function wd(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function xd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}var _d=.35;function Sd(e,t,n){return{min:Ed(e,t),max:Ed(e,n)}}function Ed(e,t){return"number"==typeof e?e:e[t]||0}var Pd=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),kd=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Td(e){return[e("x"),e("y")]}function Cd({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ad(e){return void 0===e||1===e}function Rd({scale:e,scaleX:t,scaleY:n}){return!Ad(e)||!Ad(t)||!Ad(n)}function Od(e){return Rd(e)||Fd(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Fd(e){return Ld(e.x)||Ld(e.y)}function Ld(e){return e&&"0%"!==e}function Dd(e,t,n){return n+t*(e-n)}function Md(e,t,n,r,i){return void 0!==i&&(e=Dd(e,i,r)),Dd(e,n,r)+t}function Vd(e,t=0,n=1,r,i){e.min=Md(e.min,t,n,r,i),e.max=Md(e.max,t,n,r,i)}function Id(e,{x:t,y:n}){Vd(e.x,t.translate,t.scale,t.originPoint),Vd(e.y,n.translate,n.scale,n.originPoint)}var jd=.999999999999,Bd=1.0000000000001;function Nd(e,t){e.min=e.min+t,e.max=e.max+t}function Ud(e,t,n,r,i=.5){Vd(e,t,n,Iu(e.min,e.max,i),r)}function Hd(e,t){Ud(e.x,t.x,t.scaleX,t.scale,t.originX),Ud(e.y,t.y,t.scaleY,t.scale,t.originY)}function $d(e,t){return Cd(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var Wd=({current:e})=>e?e.ownerDocument.defaultView:null,zd=new WeakMap,qd=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kd(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Xc(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(qc(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ad(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),Td((e=>{let t=this.getAxisMotionValue(e).get()||0;if(nl.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=fd(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&Ra.postRender((()=>o(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=Oc(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Td((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Wd(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Ra.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Qd(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Iu(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Iu(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&ud(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:wd(e.x,n,i),y:wd(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=_d){return!1===e?e=0:!0===e&&(e=_d),{x:Sd(e,"left","right"),y:Sd(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Td((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ud(e))return!1;const n=e.current;Va(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=$d(e,n),{scroll:i}=t;return i&&(Nd(r.x,i.offset.x),Nd(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:xd(e.x,t.x),y:xd(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Cd(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Td((s=>{if(!Qd(s,t,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?e[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(e,t){const n=this.getAxisMotionValue(e);return n.start(mc(e,n,0,t,this.visualElement,!1,Oc(this.visualElement,e)))}stopAnimation(){Td((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Td((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Td((t=>{const{drag:n}=this.getProps();if(!Qd(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-Iu(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ud(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Td((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=fd(e),i=fd(t);return i>r?n=Vu(t.min,t.max-r,e.min):r>i&&(n=Vu(e.min,e.max-i,t.min)),za(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Td((t=>{if(!Qd(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(Iu(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;zd.set(this.visualElement,this);const e=Gc(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();ud(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Ra.read(t);const i=Kc(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Td((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=_d,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}};function Qd(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var Kd=e=>(t,n)=>{e&&Ra.postRender((()=>e(t,n)))},Gd=Z(null);var Yd=Z({}),Xd=Z({}),Zd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Jd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var eh={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!rl.test(e))return e;e=parseFloat(e)}return`${Jd(e,t.target.x)}% ${Jd(e,t.target.y)}%`}},th={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Nl.parse(e);if(i.length>5)return r;const o=Nl.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=Iu(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},nh={};var{schedule:rh,cancel:ih}=Aa(queueMicrotask,!1),oh=class extends F{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var o;o=ah,Object.assign(nh,o),i&&(t.group&&t.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()})),Zd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Ra.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),rh.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function sh(e){const[t,n]=function(){const e=Lt(Gd);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=Vt();Tt((()=>r(i)),[]);const o=Ft((()=>n&&n(i)),[i,n]);return!t&&n?[!1,o]:[!0]}(),r=Lt(Yd);return Fr(oh,{...e,layoutGroup:r,switchLayoutGroup:Lt(Xd),isPresent:t,safeToRemove:n})}var ah={borderRadius:{...eh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eh,borderTopRightRadius:eh,borderBottomLeftRadius:eh,borderBottomRightRadius:eh,boxShadow:th},lh=["TopLeft","TopRight","BottomLeft","BottomRight"],uh=lh.length,ch=e=>"string"==typeof e?parseFloat(e):e,dh=e=>"number"==typeof e||rl.test(e);function hh(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var ph=mh(0,.5,Cu),fh=mh(.5,.95,Ta);function mh(e,t,n){return r=>r<e?0:r>t?1:n(Vu(e,t,r))}function vh(e,t){e.min=t.min,e.max=t.max}function gh(e,t){vh(e.x,t.x),vh(e.y,t.y)}function yh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bh(e,t,n,r,i){return e=Dd(e-=t,1/n,r),void 0!==i&&(e=Dd(e,1/i,r)),e}function wh(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(nl.test(t)&&(t=parseFloat(t),t=Iu(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=Iu(o.min,o.max,r);e===o&&(a-=t),e.min=bh(e.min,t,n,a,i),e.max=bh(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}var xh=["x","scaleX","originX"],_h=["y","scaleY","originY"];function Sh(e,t,n,r){wh(e.x,t,xh,n?n.x:void 0,r?r.x:void 0),wh(e.y,t,_h,n?n.y:void 0,r?r.y:void 0)}function Eh(e){return 0===e.translate&&1===e.scale}function Ph(e){return Eh(e.x)&&Eh(e.y)}function kh(e,t){return e.min===t.min&&e.max===t.max}function Th(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ch(e,t){return Th(e.x,t.x)&&Th(e.y,t.y)}function Ah(e){return fd(e.x)/fd(e.y)}function Rh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Oh=class{constructor(){this.members=[]}add(e){yc(this.members,e),e.scheduleRender()}remove(e){if(bc(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};var Fh=(e,t)=>e.depth-t.depth,Lh=class{constructor(){this.children=[],this.isDirty=!1}add(e){yc(this.children,e),this.isDirty=!0}remove(e){bc(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Fh),this.isDirty=!1,this.children.forEach(e)}};function Dh(e){const t=Rc(e)?e.get():e;return vc(t)?t.toValue():t}var Mh={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Vh="undefined"!=typeof window&&void 0!==window.MotionDebug,Ih=["","X","Y","Z"],jh={visibility:"hidden"},Bh=0;function Nh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Uh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Tc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ra,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Uh(r)}function Hh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Bh++,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,Vh&&(Mh.totalNodes=Mh.resolvedTargetDeltas=Mh.recalculatedProjection=0),this.nodes.forEach(zh),this.nodes.forEach(Zh),this.nodes.forEach(Jh),this.nodes.forEach(qh),Vh&&window.MotionDebug.record(Mh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lh)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new wc),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=tu.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Oa(r),e(o-t))};return Ra.read(r,!0),()=>Oa(r)}(r,250),Zd.hasAnimatedSinceResize&&(Zd.hasAnimatedSinceResize=!1,this.nodes.forEach(Xh))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||op,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Ch(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...xa(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Xh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Oa(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(ep),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Uh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Kh);this.isUpdating||this.nodes.forEach(Gh),this.isUpdating=!1,this.nodes.forEach(Yh),this.nodes.forEach($h),this.nodes.forEach(Wh),this.clearAllSnapshots();const e=tu.now();Fa.delta=za(0,1e3/60,e-Fa.timestamp),Fa.timestamp=e,Fa.isProcessing=!0,La.update.process(Fa),La.preRender.process(Fa),La.render.process(Fa),Fa.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qh),this.sharedNodes.forEach(tp)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ra.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ra.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 e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=kd(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ph(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||Od(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),lp((r=n).x),lp(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return kd();const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(cp)){const{scroll:e}=this.root;e&&(Nd(n.x,e.offset.x),Nd(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=kd();if(gh(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&gh(n,e),Nd(n.x,i.offset.x),Nd(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n=kd();gh(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Hd(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Od(e.latestValues)&&Hd(n,e.latestValues)}return Od(this.latestValues)&&Hd(n,this.latestValues),n}removeTransform(e){const t=kd();gh(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Od(e.latestValues))continue;Rd(e.latestValues)&&e.updateSnapshot();const r=kd();gh(r,e.measurePageBox()),Sh(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Od(this.latestValues)&&Sh(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.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!==Fa.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;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(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=Fa.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kd(),this.relativeTargetOrigin=kd(),bd(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),gh(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=kd(),this.targetWithTransforms=kd()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,gd(s.x,a.x,l.x),gd(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):gh(this.target,this.layout.layoutBox),Id(this.target,this.targetDelta)):gh(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kd(),this.relativeTargetOrigin=kd(),bd(this.relativeTargetOrigin,this.target,e.target),gh(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Vh&&Mh.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Rd(this.parent.latestValues)&&!Fd(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 e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Fa.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;gh(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.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&&Hd(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Id(e,s)),r&&Od(o.latestValues)&&Hd(e,o.latestValues))}t.x<Bd&&t.x>jd&&(t.x=1),t.y<Bd&&t.y>jd&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=kd());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(yh(this.prevProjectionDelta.x,this.projectionDelta.x),yh(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),vd(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Rh(this.projectionDelta.x,this.prevProjectionDelta.x)&&Rh(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Vh&&Mh.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pd(),this.projectionDelta=Pd(),this.projectionDeltaWithTransform=Pd()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Pd();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=kd(),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(ip));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;np(o.x,e.x,n),np(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bd(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){rp(e.x,t.x,n.x,r),rp(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return kh(e.x,t.x)&&kh(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=kd()),gh(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=Iu(0,void 0!==n.opacity?n.opacity:1,ph(r)),e.opacityExit=Iu(void 0!==t.opacity?t.opacity:1,0,fh(r))):o&&(e.opacity=Iu(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<uh;s++){const i=`border${lh[s]}Radius`;let o=hh(t,i),a=hh(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||dh(o)===dh(a)?(e[i]=Math.max(Iu(ch(o),ch(a),r),0),(nl.test(a)||nl.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=Iu(t.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(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Oa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ra.update((()=>{Zd.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Rc(e)?e:Sc(e);return r.start(mc("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.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 e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&up(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||kd();const t=fd(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=fd(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}gh(t,n),Hd(t,i),vd(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Oh),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Nh("z",e,r,this.animationValues);for(let i=0;i<Ih.length;i++)Nh(`rotate${Ih[i]}`,e,r,this.animationValues),Nh(`skew${Ih[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jh;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Dh(null==e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Dh(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Od(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.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!==(t=s.opacity)&&void 0!==t?t: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 nh){if(void 0===s[u])continue;const{correct:e,applyTo:t}=nh[u],n="none"===r.transform?s[u]:e(s[u],o);if(t){const e=t.length;for(let i=0;i<e;i++)r[t[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?Dh(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Kh),this.root.sharedNodes.clear()}}}function $h(e){e.updateLayout()}function Wh(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?Td((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=fd(r);r.min=t[e].min,r.max=r.min+i})):up(i,n.layoutBox,t)&&Td((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=fd(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=Pd();vd(s,t,n.layoutBox);const a=Pd();o?vd(a,e.applyTransform(r,!0),n.measuredBox):vd(a,t,n.layoutBox);const l=!Ph(s);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=kd();bd(s,n.layoutBox,i.layoutBox);const a=kd();bd(a,t,o.layoutBox),Ch(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function zh(e){Vh&&Mh.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function qh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Qh(e){e.clearSnapshot()}function Kh(e){e.clearMeasurements()}function Gh(e){e.isLayoutDirty=!1}function Yh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Zh(e){e.resolveTargetDelta()}function Jh(e){e.calcProjection()}function ep(e){e.resetSkewAndRotation()}function tp(e){e.removeLeadSnapshot()}function np(e,t,n){e.translate=Iu(t.translate,0,n),e.scale=Iu(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rp(e,t,n,r){e.min=Iu(t.min,n.min,r),e.max=Iu(t.max,n.max,r)}function ip(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var op={duration:.45,ease:[.4,0,.1,1]},sp=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ap=sp("applewebkit/")&&!sp("chrome/")?Math.round:Ta;function lp(e){e.min=ap(e.min),e.max=ap(e.max)}function up(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Ah(t),i=Ah(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function cp(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}var dp=Hh({attachResizeListener:(e,t)=>Kc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hp={current:void 0},pp=Hh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hp.current){const e=new dp({});e.mount(window),e.setOptions({layoutScroll:!0}),hp.current=e}return hp.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),fp={pan:{Feature:class extends Hc{constructor(){super(...arguments),this.removePointerDownListener=Ta}onPointerDown(e){this.session=new Xc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wd(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Kd(e),onStart:Kd(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ra.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Gc(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Hc{constructor(e){super(e),this.removeGroupControls=Ta,this.removeListeners=Ta,this.controls=new qd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ta}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:pp,MeasureLayout:sh}};function mp(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Gc(e.current,n,((n,i)=>{if("touch"===n.pointerType||ld())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[r];s&&Ra.postRender((()=>s(n,i)))}),{passive:!e.getProps()[r]})}var vp=(e,t)=>!!t&&(e===t||vp(e,t.parentElement));function gp(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,qc(n))}var yp=new WeakMap,bp=new WeakMap,wp=e=>{const t=yp.get(e.target);t&&t(e)},xp=e=>{e.forEach(wp)};function _p(e,t,n){const r=function({root:e,...t}){const n=e||document;bp.has(n)||bp.set(n,{});const r=bp.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xp,{root:e,...t})),r[i]}(t);return yp.set(e,n),r.observe(e),()=>{yp.delete(e),r.unobserve(e)}}var Sp={some:0,all:1};var Ep={inView:{Feature:class extends Hc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Sp[r]};return _p(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Hc{constructor(){super(...arguments),this.removeStartListeners=Ta,this.removeEndListeners=Ta,this.removeAccessibleListeners=Ta,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Gc(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||vp(this.node.current,e.target)?n:r;o&&Ra.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),i=Gc(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Mu(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Kc(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Kc(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&gp("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Ra.postRender((()=>n(e,t)))}))})),gp("down",((e,t)=>{this.startPress(e,t)}))})),t=Kc(this.node.current,"blur",(()=>{this.isPressing&&gp("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Mu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ra.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ld()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ra.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Gc(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Kc(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Mu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Hc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(nx){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Mu(Kc(this.node.current,"focus",(()=>this.onFocus())),Kc(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Hc{mount(){this.unmount=Mu(mp(this.node,!0),mp(this.node,!1))}unmount(){}}}},Pp={layout:{ProjectionNode:pp,MeasureLayout:sh}},kp=Z({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Tp=Z({}),Cp="undefined"!=typeof window,Ap=Cp?Ct:Tt,Rp=Z({strict:!1}),Op=!1;function Fp(e,t,n,r,i){var o;const{visualElement:s}=Lt(Tp),a=Lt(Rp),l=Lt(Gd),u=Lt(kp).reducedMotion,c=At();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Lt(Xd);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Dp(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&ud(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),zn((()=>{d&&d.update(n,l)}));const p=n[kc],f=At(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return Ap((()=>{d&&(d.updateFeatures(),rh.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Tt((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,Op||(Op=!0,queueMicrotask(Lp)))})),d}function Lp(){window.MotionHandoffIsComplete=!0}function Dp(e){if(e)return!1!==e.options.allowProjection?e.projection:Dp(e.parent)}function Mp(e,t,n){return Ft((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):ud(n)&&(n.current=r))}),[t])}function Vp(e){return ia(e.animate)||ha.some((t=>aa(e[t])))}function Ip(e){return Boolean(Vp(e)||e.variants)}function jp(e){const{initial:t,animate:n}=function(e,t){if(Vp(e)){const{initial:t,animate:n}=e;return{initial:!1===t||aa(t)?t:void 0,animate:aa(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Lt(Tp));return Ot((()=>({initial:t,animate:n})),[Bp(t),Bp(n)])}function Bp(e){return Array.isArray(e)?e.join(" "):e}var Np={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"]},Up={};for(const w_ in Np)Up[w_]={isEnabled:e=>Np[w_].some((t=>!!e[t]))};var Hp=Symbol.for("motionComponentSymbol");function $p({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)Up[t]={...Up[t],...e[t]}}(e);const o=Xt((function(e,o){let s;const a={...Lt(kp),...e,layoutId:Wp(e)},{isStatic:l}=a,u=jp(e),c=r(e,l);if(!l&&Cp){Lt(Rp).strict;const e=function(e){const{drag:t,layout:n}=Up;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=e.MeasureLayout,u.visualElement=Fp(i,c,a,t,e.ProjectionNode)}return Fr(Tp.Provider,{value:u,children:[s&&u.visualElement?Fr(s,{visualElement:u.visualElement,...a}):null,n(i,e,Mp(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[Hp]=i,o}function Wp({layoutId:e}){const t=Lt(Yd).id;return t&&void 0!==e?t+"-"+e:e}var zp=["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 qp(e){return"string"==typeof e&&!e.includes("-")&&!!(zp.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qp(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}var Kp=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 Gp(e,t,n,r){Qp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Kp.has(i)?i:Pc(i),t.attrs[i])}function Yp(e,{layout:t,layoutId:n}){return fa.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!nh[e]||"opacity"===e)}function Xp(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Rc(i[s])||t.style&&Rc(t.style[s])||Yp(s,e)||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 Zp(e,t,n){const r=Xp(e,t,n);for(const i in e)if(Rc(e[i])||Rc(t[i])){r[-1!==pa.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}function Jp(e){const t=At(null);return null===t.current&&(t.current=e()),t.current}var ef=e=>(t,n)=>{const r=Lt(Tp),i=Lt(Gd),o=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:rf(i,o,s,!a&&e,t),renderState:n()};return r&&(l.mount=e=>r(i,e,l)),l}(e,t,r,i,n);return n?o():Jp(o)};function tf(e,t){const n=Cc(t);n&&yc(e,n)}function nf(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const t=ua(e,r[i]);if(t){const{transitionEnd:e,transition:r,...i}=t;n(i,e)}}}function rf(e,t,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=e.style)||void 0===o?void 0:o.willChange),u=i(e,{});for(const v in u)s[v]=Dh(u[v]);let{initial:c,animate:d}=e;const h=Vp(e),p=Ip(e);t&&p&&!h&&!1!==e.inherit&&(void 0===c&&(c=t.initial),void 0===d&&(d=t.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!ia(m)&&nf(e,m,((e,t)=>{for(const n in e){let t=e[n];if(Array.isArray(t)){t=t[f?t.length-1:0]}null!==t&&(s[n]=t)}for(const n in t)s[n]=t[n]})),l&&(d&&!1!==c&&!ia(d)&&nf(e,d,(e=>{for(const t in e)tf(a,t)})),a.length&&(s.willChange=a.join(","))),s}var of=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),sf=()=>({...of(),attrs:{}}),af=(e,t)=>t&&"number"==typeof e?t.transform(e):e,lf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uf=pa.length;function cf(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(fa.has(l))s=!0;else if(Ba(l))i[l]=e;else{const t=af(e,ql[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<uf;o++){const s=pa[o],a=e[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 e=af(a,ql[s]);l||(i=!1,r+=`${lf[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function df(e,t,n){return"string"==typeof e?e:rl.transform(t+n*e)}var hf={offset:"stroke-dashoffset",array:"stroke-dasharray"},pf={offset:"strokeDashoffset",array:"strokeDasharray"};function ff(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(cf(e,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${df(t,e.x,e.width)} ${df(n,e.y,e.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?hf:pf;e[o.offset]=rl.transform(-r);const s=rl.transform(t),a=rl.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}var mf=e=>"string"==typeof e&&"svg"===e.toLowerCase(),vf={useVisualState:ef({scrapeMotionValuesFromProps:Zp,createRenderState:sf,onMount:(e,t,{renderState:n,latestValues:r})=>{Ra.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(nx){n.dimensions={x:0,y:0,width:0,height:0}}})),Ra.render((()=>{ff(n,r,mf(t.tagName),e.transformTemplate),Gp(t,n)}))}})},gf={useVisualState:ef({applyWillChange:!0,scrapeMotionValuesFromProps:Xp,createRenderState:of})};function yf(e,t,n){for(const r in t)Rc(t[r])||Yp(r,n)||(e[r]=t[r])}function bf(e,t){const n={};return yf(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return Ot((()=>{const n=of();return cf(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function wf(e,t){const n={},r=bf(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var xf=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 _f(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xf.has(e)}var Sf,Ef,Pf=e=>!_f(e);try{(Sf=(no(),Ef=to,v.call(Ef,"module.exports")?Ef["module.exports"]:w(h({},"__esModule",{value:!0}),Ef)).default)&&(Pf=e=>e.startsWith("on")?!_f(e):Sf(e))}catch(b_){}function kf(e,t,n,r){const i=Ot((()=>{const n=sf();return ff(n,t,mf(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};yf(t,e.style,e),i.style={...t,...i.style}}return i}function Tf(e=!1){return(t,n,r,{latestValues:i},o)=>{const s=(qp(t)?kf:wf)(n,i,o,t),a=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Pf(i)||!0===n&&_f(i)||!t&&!_f(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==O?{...a,...s,ref:r}:{},{children:u}=n;return C(t,{...l,children:Ot((()=>Rc(u)?u.get():u),[u])})}}function Cf(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return $p({...qp(n)?vf:gf,preloadedFeatures:e,useRender:Tf(r),createVisualElement:t,Component:n})}}var Af={current:null},Rf={current:!1};var Of=new WeakMap,Ff=[...ml,Al,Nl],Lf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Df=ha.length,Mf=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,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=_l,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,Ra.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Vp(t),this.isVariantNode=Ip(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in c){const e=c[d];void 0!==a[d]&&Rc(e)&&e.set(a[d],!1)}}mount(e){this.current=e,Of.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Rf.current||function(){if(Rf.current=!0,Cp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Af.current=e.matches;e.addListener(t),t()}else Af.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Af.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Of.delete(this.current),this.projection&&this.projection.unmount(),Oa(this.notifyUpdate),Oa(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=fa.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Ra.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Up){const t=Up[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kd()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Lf.length;n++){const t=Lf[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Rc(i))e.addValue(r,i);else if(Rc(o))e.addValue(r,Sc(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Sc(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<Df;n++){const e=ha[n],r=this.props[e];(aa(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Sc(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Ia(r)||Da(r))?r=parseFloat(r):!(e=>Ff.find(fl(e)))(r)&&Nl.test(t)&&(r=Gl(e,t)),this.setBaseTarget(e,Rc(r)?r.get():r)),Rc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=ua(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Rc(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new wc),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},Vf=class extends Mf{constructor(){super(...arguments),this.KeyframeResolver=Zl}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}};var If=class extends Vf{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Qp}readValueFromInstance(e,t){if(fa.has(t)){const e=Kl(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(Ba(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return $d(e,t)}build(e,t,n){cf(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Xp(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Rc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}},jf=class extends Vf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kd}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(fa.has(t)){const e=Kl(t);return e&&e.default||0}return t=Kp.has(t)?t:Pc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Zp(e,t,n)}build(e,t,n){ff(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Gp(e,t,0,r)}mount(e){this.isSVGTag=mf(e.tagName),super.mount(e)}},Bf=ra(Cf({...Wc,...Ep,...fp,...Pp},((e,t)=>qp(e)?new jf(t):new If(t,{allowProjection:e!==O})))),Nf=class extends F{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function Uf({children:e,isPresent:t}){const n=Vt(),r=At(null),i=At({width:0,height:0,top:0,left:0}),{nonce:o}=Lt(kp);return zn((()=>{const{width:e,height:s,top:a,left:l}=i.current;if(t||!r.current||!e||!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: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),Fr(Nf,{isPresent:t,childRef:r,sizeRef:i,children:Vn(e,{ref:r})})}var Hf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Jp($f),l=Vt(),u=Ot((()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{a.set(e,!0);for(const t of a.values())if(!t)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),o?[Math.random()]:[n]);return Ot((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),Tt((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=Fr(Uf,{isPresent:n,children:e})),Fr(Gd.Provider,{value:u,children:e})};function $f(){return new Map}var Wf=e=>e.key||"";function zf(e){const t=[];return Jt.forEach(e,(e=>{Ln(e)&&t.push(e)})),t}var qf=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Va(!t,"Replace exitBeforeEnter with mode='wait'");const a=Ot((()=>zf(e)),[e]),l=a.map(Wf),u=At(!0),c=At(a),d=Jp((()=>new Map)),[h,p]=Pt(a),[f,m]=Pt(a);Ap((()=>{u.current=!1,c.current=a;for(let e=0;e<f.length;e++){const t=Wf(f[e]);l.includes(t)?d.delete(t):!0!==d.get(t)&&d.set(t,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let e=[...a];for(let t=0;t<f.length;t++){const n=f[t],r=Wf(n);l.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===s&&v.length&&(e=v),m(zf(e)),void p(a)}const{forceRender:g}=Lt(Yd);return Fr(O,{children:f.map((e=>{const t=Wf(e),h=a===f||l.includes(t);return Fr(Hf,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(t))return;d.set(t,!0);let e=!0;d.forEach((t=>{t||(e=!1)})),e&&(null==g||g(),m(c.current),i&&i())},children:e},t)}))})},Qf=e=>"checkbox"===e.type,Kf=e=>e instanceof Date,Gf=e=>null==e,Yf=e=>"object"==typeof e,Xf=e=>!Gf(e)&&!Array.isArray(e)&&Yf(e)&&!Kf(e),Zf=e=>Xf(e)&&e.target?Qf(e.target)?e.target.checked:e.target.value:e,Jf=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),em=e=>{const t=e.constructor&&e.constructor.prototype;return Xf(t)&&t.hasOwnProperty("isPrototypeOf")},tm="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function nm(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(tm&&(e instanceof Blob||e instanceof FileList)||!n&&!Xf(e))return e;if(t=n?[]:{},n||em(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=nm(e[n]));else t=e}return t}var rm=e=>Array.isArray(e)?e.filter(Boolean):[],im=e=>void 0===e,om=(e,t,n)=>{if(!t||!Xf(e))return n;const r=rm(t.split(/[,[\].]+?/)).reduce(((e,t)=>Gf(e)?e:e[t]),e);return im(r)||r===e?im(e[t])?n:e[t]:r},sm=e=>"boolean"==typeof e,am=e=>/^\w*$/.test(e),lm=e=>rm(e.replace(/["|']|\]/g,"").split(/\.|\[/)),um=(e,t,n)=>{let r=-1;const i=am(t)?[t]:lm(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=Xf(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t)return;e[t]=o,e=e[t]}return e},cm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},dm={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},hm="max",pm="min",fm="maxLength",mm="minLength",vm="pattern",gm="required",ym="validate",bm=Gn.createContext(null),wm=()=>Gn.useContext(bm),xm=e=>{const{children:t,...n}=e;return Gn.createElement(bm.Provider,{value:n},t)},_m=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==dm.all&&(t._proxyFormState[i]=!r||dm.all),n&&(n[i]=!0),e[i]}});return i},Sm=e=>Xf(e)&&!Object.keys(e).length,Em=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Sm(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||dm.all)))},Pm=e=>Array.isArray(e)?e:[e],km=(e,t,n)=>!e||!t||e===t||Pm(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function Tm(e){const t=Gn.useRef(e);t.current=e,Gn.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Cm=e=>"string"==typeof e,Am=(e,t,n,r,i)=>Cm(e)?(r&&t.watch.add(e),om(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),om(n,e)))):(r&&(t.watchAll=!0),n);function Rm(e){const t=wm(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=Jf(i._names.array,n),a=function(e){const t=wm(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},a=Gn.useRef(r);a.current=r,Tm({disabled:o,subject:n._subjects.values,next:e=>{km(a.current,e.name,s)&&u(nm(Am(a.current,n._names,e.values||n._formValues,!1,i)))}});const[l,u]=Gn.useState(n._getWatch(r,i));return Gn.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:om(i._formValues,n,om(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=wm(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,a]=Gn.useState(n._formState),l=Gn.useRef(!0),u=Gn.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Gn.useRef(i);return c.current=i,Tm({disabled:r,next:e=>l.current&&km(c.current,e.name,o)&&Em(e,u.current,n._updateFormState)&&a({...n._formState,...e}),subject:n._subjects.state}),Gn.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),_m(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Gn.useRef(i.register(n,{...e.rules,value:a,...sm(e.disabled)?{disabled:e.disabled}:{}}));return Gn.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=om(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=nm(om(i._options.defaultValues,n));um(i._defaultValues,n,e),im(om(i._formValues,n))&&um(i._formValues,n,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}}),[n,i,s,o]),Gn.useEffect((()=>{om(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:om(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...sm(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Gn.useCallback((e=>u.current.onChange({target:{value:Zf(e),name:n},type:cm.CHANGE})),[n]),onBlur:Gn.useCallback((()=>u.current.onBlur({target:{value:om(i._formValues,n),name:n},type:cm.BLUR})),[n,i]),ref:Gn.useCallback((e=>{const t=om(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!om(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!om(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!om(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!om(l.validatingFields,n)},error:{enumerable:!0,get:()=>om(l.errors,n)}})}}var Om=e=>e.render(Rm(e)),Fm=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Lm=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},Dm=(e,t,n={})=>n.shouldFocus||im(n.shouldFocus)?n.focusName||`${e}.${im(n.focusIndex)?t:n.focusIndex}.`:"",Mm=e=>({isOnSubmit:!e||e===dm.onSubmit,isOnBlur:e===dm.onBlur,isOnChange:e===dm.onChange,isOnAll:e===dm.all,isOnTouch:e===dm.onTouched}),Vm=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Im=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=om(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Im(o,t))break}else if(Xf(o)&&Im(o,t))break}}},jm=(e,t,n)=>{const r=Pm(om(e,n));return um(r,"root",t[n]),um(e,n,r),e},Bm=e=>"file"===e.type,Nm=e=>"function"==typeof e,Um=e=>{if(!tm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hm=e=>Cm(e),$m=e=>"radio"===e.type,Wm=e=>e instanceof RegExp,zm={value:!1,isValid:!1},qm={value:!0,isValid:!0},Qm=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!im(e[0].attributes.value)?im(e[0].value)||""===e[0].value?qm:{value:e[0].value,isValid:!0}:qm:zm}return zm},Km={isValid:!1,value:null},Gm=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Km):Km;function Ym(e,t,n="validate"){if(Hm(e)||Array.isArray(e)&&e.every(Hm)||sm(e)&&!e)return{type:n,message:Hm(e)?e:"",ref:t}}var Xm=e=>Xf(e)&&!Wm(e)?e:{value:e,message:""},Zm=async(e,t,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}=e._f,y=om(t,f);if(!v||g)return{};const b=s?s[0]:o,w=e=>{r&&b.reportValidity&&(b.setCustomValidity(sm(e)?"":e||""),b.reportValidity())},x={},_=$m(o),S=Qf(o),E=_||S,P=(m||Bm(o))&&im(o.value)&&im(y)||Um(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,k=Fm.bind(null,f,n,x),T=(e,t,n,r=fm,i=mm)=>{const s=e?t:n;x[f]={type:e?r:i,message:s,ref:o,...k(e?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!E&&(P||Gf(y))||sm(y)&&!y||S&&!Qm(s).isValid||_&&!Gm(s).isValid)){const{value:e,message:t}=Hm(a)?{value:!!a,message:a}:Xm(a);if(e&&(x[f]={type:gm,message:t,ref:b,...k(gm,t)},!n))return w(t),x}if(!(P||Gf(c)&&Gf(d))){let e,t;const r=Xm(d),i=Xm(c);if(Gf(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Cm(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Cm(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);Gf(r.value)||(e=n>r.value),Gf(i.value)||(t=n<i.value)}if((e||t)&&(T(!!e,r.message,i.message,hm,pm),!n))return w(x[f].message),x}if((l||u)&&!P&&(Cm(y)||i&&Array.isArray(y))){const e=Xm(l),t=Xm(u),r=!Gf(e.value)&&y.length>+e.value,i=!Gf(t.value)&&y.length<+t.value;if((r||i)&&(T(r,e.message,t.message),!n))return w(x[f].message),x}if(h&&!P&&Cm(y)){const{value:e,message:t}=Xm(h);if(Wm(e)&&!y.match(e)&&(x[f]={type:vm,message:t,ref:o,...k(vm,t)},!n))return w(t),x}if(p)if(Nm(p)){const e=Ym(await p(y,t),b);if(e&&(x[f]={...e,...k(ym,e.message)},!n))return w(e.message),x}else if(Xf(p)){let e={};for(const r in p){if(!Sm(e)&&!n)break;const i=Ym(await p[r](y,t),b,r);i&&(e={...i,...k(r,i.message)},w(i.message),n&&(x[f]=e))}if(!Sm(e)&&(x[f]={ref:b,...e},!n))return x}return w(!0),x},Jm=(e,t)=>[...e,...Pm(t)],ev=e=>Array.isArray(e)?e.map((()=>{})):void 0;function tv(e,t,n){return[...e.slice(0,t),...Pm(n),...e.slice(t)]}var nv=(e,t,n)=>Array.isArray(e)?(im(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],rv=(e,t)=>[...Pm(t),...Pm(e)];var iv=(e,t)=>im(t)?[]:function(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return rm(r).length?r:[]}(e,Pm(t).sort(((e,t)=>e-t))),ov=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function sv(e,t){const n=Array.isArray(t)?t:am(t)?[t]:lm(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=im(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(Xf(r)&&Sm(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!im(e[t]))return!1;return!0}(r))&&sv(e,n.slice(0,-1)),e}var av=(e,t,n)=>(e[t]=n,e);var lv=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},uv=e=>Gf(e)||!Yf(e);function cv(e,t){if(uv(e)||uv(t))return e===t;if(Kf(e)&&Kf(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Kf(n)&&Kf(e)||Xf(n)&&Xf(e)||Array.isArray(n)&&Array.isArray(e)?!cv(n,e):n!==e)return!1}}return!0}var dv=e=>"select-multiple"===e.type,hv=e=>$m(e)||Qf(e),pv=e=>Um(e)&&e.isConnected,fv=e=>{for(const t in e)if(Nm(e[t]))return!0;return!1};function mv(e,t={}){const n=Array.isArray(e);if(Xf(e)||n)for(const r in e)Array.isArray(e[r])||Xf(e[r])&&!fv(e[r])?(t[r]=Array.isArray(e[r])?[]:{},mv(e[r],t[r])):Gf(e[r])||(t[r]=!0);return t}function vv(e,t,n){const r=Array.isArray(e);if(Xf(e)||r)for(const i in e)Array.isArray(e[i])||Xf(e[i])&&!fv(e[i])?im(t)||uv(n[i])?n[i]=Array.isArray(e[i])?mv(e[i],[]):{...mv(e[i])}:vv(e[i],Gf(t)?{}:t[i],n[i]):n[i]=!cv(e[i],t[i]);return n}var gv=(e,t)=>vv(e,t,mv(t)),yv=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>im(e)?e:t?""===e?NaN:e?+e:e:n&&Cm(e)?new Date(e):r?r(e):e;function bv(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Bm(t)?t.files:$m(t)?Gm(e.refs).value:dv(t)?[...t.selectedOptions].map((({value:e})=>e)):Qf(t)?Qm(e.refs).value:yv(im(t.value)?e.ref.value:t.value,e)}var wv=(e,t,n,r)=>{const i={};for(const o of e){const e=om(t,o);e&&um(i,o,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},xv=e=>im(e)?e:Wm(e)?e.source:Xf(e)?Wm(e.value)?e.value.source:e.value:e,_v="AsyncFunction",Sv=e=>!(e&&e.validate||!(Nm(e.validate)&&e.validate.constructor.name===_v||Xf(e.validate)&&Object.values(e.validate).find((e=>e.constructor.name===_v)))),Ev=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Pv(e,t,n){const r=om(e,n);if(r||am(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=om(t,r),s=om(e,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 kv=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),Tv=(e,t)=>!rm(om(e,t)).length&&sv(e,t),Cv={mode:dm.onSubmit,reValidateMode:dm.onChange,shouldFocusError:!0};function Av(e={}){let t,n={...Cv,...e},r={submitCount:0,isDirty:!1,isLoading:Nm(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(Xf(n.defaultValues)||Xf(n.values))&&nm(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:nm(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:lv(),array:lv(),state:lv()},h=Mm(n.mode),p=Mm(n.reValidateMode),f=n.criteriaMode===dm.all,m=async e=>{if(c.isValid||e){const e=n.resolver?Sm((await w()).errors):await x(i,!0);e!==r.isValid&&d.state.next({isValid:e})}},v=(e,t)=>{(c.isValidating||c.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?um(r.validatingFields,e,t):sv(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!Sm(r.validatingFields)}))},g=(e,t,n,r)=>{const l=om(i,e);if(l){const i=om(s,e,im(n)?om(o,e):n);im(i)||r&&r.defaultChecked||t?um(s,e,t?i:bv(l._f)):E(e,i),a.mount&&m()}},y=(e,t,n,s,a)=>{let l=!1,u=!1;const h={name:e},p=!!(om(i,e)&&om(i,e)._f&&om(i,e)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=_(),l=u!==h.isDirty);const n=p||cv(om(o,e),t);u=!(p||!om(r.dirtyFields,e)),n||p?sv(r.dirtyFields,e):um(r.dirtyFields,e,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const t=om(r.touchedFields,e);t||(um(r.touchedFields,e,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&t!==n)}return l&&a&&d.state.next(h),l?h:{}},b=(n,i,o,s)=>{const a=om(r.errors,n),l=c.isValid&&sm(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{um(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=setTimeout(h,e)},t(e.delayError)):(clearTimeout(u),t=null,o?um(r.errors,n,o):sv(r.errors,n)),(o?!cv(a,o):a)||!Sm(s)||l){const e={...s,...l&&sm(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}},w=async e=>{v(e,!0);const t=await n.resolver(s,n.context,wv(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(e),t},x=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...u}=a;if(e){const u=l.array.has(e.name),d=a._f&&Sv(a._f);d&&c.validatingFields&&v([o],!0);const h=await Zm(a,s,f,n.shouldUseNativeValidation&&!t,u);if(d&&c.validatingFields&&v([o]),h[e.name]&&(i.valid=!1,t))break;!t&&(om(h,e.name)?u?jm(r.errors,h,e.name):um(r.errors,e.name,h[e.name]):sv(r.errors,e.name))}!Sm(u)&&await x(u,t,i)}}return i.valid},_=(e,t)=>(e&&t&&um(s,e,t),!cv(R(),o)),S=(e,t,n)=>Am(e,l,{...a.mount?s:im(t)?o:Cm(e)?{[e]:t}:t},n,t),E=(e,t,n={})=>{const r=om(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&um(s,e,yv(t,n)),o=Um(n.ref)&&Gf(t)?"":t,dv(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?Qf(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):Bm(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:e,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&A(e)},P=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=om(i,s);!l.array.has(e)&&uv(o)&&(!a||a._f)||Kf(o)?E(s,o,n):P(s,o,n)}},k=(e,t,n={})=>{const u=om(i,e),h=l.array.has(e),p=nm(t);um(s,e,p),h?(d.array.next({name:e,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:e,dirtyFields:gv(o,s),isDirty:_(e,p)})):!u||u._f||Gf(p)?E(e,p,n):P(e,p,n),Vm(e,l)&&d.state.next({...r}),d.values.next({name:a.mount?e:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,_=!0;const S=om(i,g),E=e=>{_=Number.isNaN(e)||cv(e,om(s,g,e))};if(S){let a,P;const k=u.type?bv(S._f):Zf(o),T=o.type===cm.BLUR||o.type===cm.FOCUS_OUT,C=!Ev(S._f)&&!n.resolver&&!om(r.errors,g)&&!S._f.deps||kv(T,om(r.touchedFields,g),r.isSubmitted,p,h),R=Vm(g,l,T);um(s,g,k),T?(S._f.onBlur&&S._f.onBlur(o),t&&t(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,k,T,!1),F=!Sm(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),C)return c.isValid&&("onBlur"===e.mode?T&&m():m()),F&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:e}=await w([g]);if(E(k),_){const t=Pv(r.errors,i,g),n=Pv(e,i,t.name||g);a=n.error,g=n.name,P=Sm(e)}}else v([g],!0),a=(await Zm(S,s,f,n.shouldUseNativeValidation))[g],v([g]),E(k),_&&(a?P=!1:c.isValid&&(P=await x(i,!0)));_&&(S._f.deps&&A(S._f.deps),b(g,P,a,O))}},C=(e,t)=>{if(om(r.errors,t)&&e.focus)return e.focus(),1},A=async(e,t={})=>{let o,s;const a=Pm(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await w(e);if(e)for(const n of e){const e=om(t,n);e?um(r.errors,n,e):sv(r.errors,n)}else r.errors=t;return t})(im(e)?e:a);o=Sm(t),s=e?!a.some((e=>om(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=om(i,e);return await x(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await x(i);return d.state.next({...!Cm(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!s&&Im(i,C,e?a:l.mount),s},R=e=>{const t={...a.mount?s:o};return im(e)?t:Cm(e)?om(t,e):e.map((e=>om(t,e)))},O=(e,t)=>({invalid:!!om((t||r).errors,e),isDirty:!!om((t||r).dirtyFields,e),error:om((t||r).errors,e),isValidating:!!om(r.validatingFields,e),isTouched:!!om((t||r).touchedFields,e)}),F=(e,t,n)=>{const o=(om(i,e,{_f:{}})._f||{}).ref,{ref:s,message:a,type:l,...u}=om(r.errors,e)||{};um(r.errors,e,{...u,...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},L=(e,t={})=>{for(const a of e?Pm(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(sv(i,a),sv(s,a)),!t.keepError&&sv(r.errors,a),!t.keepDirty&&sv(r.dirtyFields,a),!t.keepTouched&&sv(r.touchedFields,a),!t.keepIsValidating&&sv(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&sv(o,a);d.values.next({values:{...s}}),d.state.next({...r,...t.keepDirty?{isDirty:_()}:{}}),!t.keepIsValid&&m()},D=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(sm(e)&&a.mount||e){const o=e?void 0:im(i)?bv(n?n._f:om(r,t)._f):i;um(s,t,o),y(t,o,!1,!1,!0)}},M=(t,r={})=>{let s=om(i,t);const u=sm(r.disabled)||sm(e.disabled);return um(i,t,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:t}},name:t,mount:!0,...r}}),l.mount.add(t),s?D({field:s,disabled:sm(r.disabled)?r.disabled:e.disabled,name:t,value:r.value}):g(t,!0,r.value),{...u?{disabled:r.disabled||e.disabled}:{},...n.progressive?{required:!!r.required,min:xv(r.min),max:xv(r.max),minLength:xv(r.minLength),maxLength:xv(r.maxLength),pattern:xv(r.pattern)}:{},name:t,onChange:T,onBlur:T,ref:e=>{if(e){M(t,r),s=om(i,t);const n=im(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e,a=hv(n),l=s._f.refs||[];if(a?l.find((e=>e===n)):n===s._f.ref)return;um(i,t,{_f:{...s._f,...a?{refs:[...l.filter(pv),n,...Array.isArray(om(o,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),g(t,!1,void 0,n)}else s=om(i,t,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!Jf(l.array,t)||!a.action)&&l.unMount.add(t)}}},V=()=>n.shouldFocusError&&Im(i,C,l.mount),I=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=nm(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await w();r.errors=e,l=t}else await x(i);if(sv(r.errors,"root"),Sm(r.errors)){d.state.next({errors:{}});try{await e(l,o)}catch(u){a=u}}else t&&await t({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sm(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(t,n={})=>{const u=t?nm(t):o,h=nm(u),p=Sm(t),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)om(r.dirtyFields,e)?um(f,e,om(s,e)):k(e,om(f,e));else{if(tm&&im(t))for(const e of l.mount){const t=om(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Um(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?nm(o):{}:nm(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=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||cv(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?gv(o,s):r.dirtyFields:n.keepDefaultValues&&t?gv(o,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>j(Nm(e)?e(s):e,t);return{control:{register:M,unregister:L,getFieldState:O,handleSubmit:I,setError:F,_executeSchema:w,_getWatch:S,_getDirty:_,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=om(i,e);t&&(t._f.refs?t._f.refs.every((e=>!pv(e))):!pv(t._f.ref))&&L(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(om(i,e))){const t=n(om(i,e),l.argA,l.argB);u&&um(i,e,t)}if(h&&Array.isArray(om(r.errors,e))){const t=n(om(r.errors,e),l.argA,l.argB);u&&um(r.errors,e,t),Tv(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(om(r.touchedFields,e))){const t=n(om(r.touchedFields,e),l.argA,l.argB);u&&um(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=gv(o,s)),d.state.next({name:e,isDirty:_(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else um(s,e,t)},_updateDisabledField:D,_getFieldArray:t=>rm(om(a.mount?s:o,t,e.shouldUnregister?om(o,t,[]):[])),_reset:j,_resetDefaultValues:()=>Nm(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{sm(e)&&(d.state.next({disabled:e}),Im(i,((t,n)=>{const r=om(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:A,register:M,handleSubmit:I,watch:(e,t)=>Nm(e)?d.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:k,getValues:R,reset:B,resetField:(e,t={})=>{om(i,e)&&(im(t.defaultValue)?k(e,nm(om(o,e))):(k(e,t.defaultValue),um(o,e,nm(t.defaultValue))),t.keepTouched||sv(r.touchedFields,e),t.keepDirty||(sv(r.dirtyFields,e),r.isDirty=t.defaultValue?_(e,nm(om(o,e))):_()),t.keepError||(sv(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e&&Pm(e).forEach((e=>sv(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:L,setError:F,setFocus:(e,t={})=>{const n=om(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:O}}var Rv="undefined"!=typeof document?Gn.useLayoutEffect:()=>{};var Ov=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Fv=e=>e&&"window"in e&&e.window===e?e:Ov(e).defaultView||window;function Lv(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Dv(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Mv(e){let t=null;return()=>(null==t&&(t=e()),t)}var Vv=Mv((function(){return Dv(/^Mac/i)})),Iv=Mv((function(){return Dv(/^iPhone/i)})),jv=Mv((function(){return Dv(/^iPad/i)||Vv()&&navigator.maxTouchPoints>1})),Bv=Mv((function(){return Iv()||jv()})),Nv=(Mv((function(){return Vv()||Bv()})),Mv((function(){return Lv(/AppleWebKit/i)&&!Nv()})),Mv((function(){return Lv(/Chrome/i)}))),Uv=Mv((function(){return Lv(/Android/i)}));Mv((function(){return Lv(/Firefox/i)}));var Hv=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}};function $v(e){let t=At({isFocused:!1,observer:null});Rv((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=At(null);return Rv((()=>{t.current=e}),[e]),Ft(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return Ft((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,i=e=>{t.current.isFocused=!1,r.disabled&&n(new Hv("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.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}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}var Wv=null,zv=new Set,qv=new Map,Qv=!1,Kv=!1,Gv={Tab:!0,Escape:!0};function Yv(e,t){for(let n of zv)n(e,t)}function Xv(e){Qv=!0,function(e){return!(e.metaKey||!Vv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Wv="keyboard",Yv("keyboard",e))}function Zv(e){Wv="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Qv=!0,Yv("pointer",e))}function Jv(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Uv()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(Qv=!0,Wv="virtual")}function eg(e){e.target!==window&&e.target!==document&&(Qv||Kv||(Wv="virtual",Yv("virtual",e)),Qv=!1,Kv=!1)}function tg(){Qv=!1,Kv=!0}function ng(e){if("undefined"==typeof window||qv.get(Fv(e)))return;const t=Fv(e),n=Ov(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Qv=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xv,!0),n.addEventListener("keyup",Xv,!0),n.addEventListener("click",Jv,!0),t.addEventListener("focus",eg,!0),t.addEventListener("blur",tg,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Zv,!0),n.addEventListener("pointermove",Zv,!0),n.addEventListener("pointerup",Zv,!0)):(n.addEventListener("mousedown",Zv,!0),n.addEventListener("mousemove",Zv,!0),n.addEventListener("mouseup",Zv,!0)),t.addEventListener("beforeunload",(()=>{rg(e)}),{once:!0}),qv.set(t,{focus:r})}var rg=(e,t)=>{const n=Fv(e),r=Ov(e);t&&r.removeEventListener("DOMContentLoaded",t),qv.has(n)&&(n.HTMLElement.prototype.focus=qv.get(n).focus,r.removeEventListener("keydown",Xv,!0),r.removeEventListener("keyup",Xv,!0),r.removeEventListener("click",Jv,!0),n.removeEventListener("focus",eg,!0),n.removeEventListener("blur",tg,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Zv,!0),r.removeEventListener("pointermove",Zv,!0),r.removeEventListener("pointerup",Zv,!0)):(r.removeEventListener("mousedown",Zv,!0),r.removeEventListener("mousemove",Zv,!0),r.removeEventListener("mouseup",Zv,!0)),qv.delete(n))};function ig(){return"pointer"!==Wv}"undefined"!=typeof document&&function(e){const t=Ov(e);let n;"loading"!==t.readyState?ng(e):(n=()=>{ng(e)},t.addEventListener("DOMContentLoaded",n))}();var og=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function sg(e,t,n){ng(),Tt((()=>{let t=(t,r)=>{(function(e,t,n){var r;const i="undefined"!=typeof window?Fv(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Fv(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Fv(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Fv(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof i&&!og.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"===t&&n instanceof a&&!Gv[n.key])})(!!(null==n?void 0:n.isTextInput),t,r)&&e(ig())};return zv.add(t),()=>{zv.delete(t)}}),t)}var ag=!1,lg=0;function ug(){ag=!0,setTimeout((()=>{ag=!1}),50)}function cg(e){"touch"===e.pointerType&&ug()}function dg(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",cg):document.addEventListener("touchend",ug),lg++,()=>{--lg>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",cg):document.removeEventListener("touchend",ug))}}function hg(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=Pt(!1),a=At({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Tt(dg,[]);let{hoverProps:l,triggerHoverEnd:u}=Ot((()=>{let e=(e,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!e.currentTarget.contains(e.target))return;a.isHovered=!0;let o=e.currentTarget;a.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(e,t)=>{if(a.pointerType="",a.target=null,"touch"===t||!a.isHovered)return;a.isHovered=!1;let i=e.currentTarget;r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{ag&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{a.ignoreEmulatedMouseEvents||ag||e(t,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,n,r,i,a]);return Tt((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function pg(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=At({isFocused:!1,isFocusVisible:t||ig()}),[o,s]=Pt(!1),[a,l]=Pt((()=>i.current.isFocused&&i.current.isFocusVisible)),u=Ft((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=Ft((e=>{i.current.isFocused=e,s(e),u()}),[u]);sg((e=>{i.current.isFocusVisible=e,u()}),[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=Ft((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),s=$v(o),a=Ft((e=>{const t=Ov(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),s(e))}),[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:t||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=At({isFocusWithin:!1}),s=Ft((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,o]),a=$v(s),l=Ft((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),i&&i(!0),o.current.isFocusWithin=!0,a(e))}),[r,i,a]);return t?{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 fg=Object.defineProperty,mg=(e,t,n)=>(((e,t,n)=>{t in e?fg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),vg=new class{constructor(){mg(this,"current",this.detect()),mg(this,"handoffState","pending"),mg(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}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 gg(e){return vg.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function yg(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function bg(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return yg((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=bg();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function wg(){let[e]=Pt(bg);return Tt((()=>()=>e.dispose()),[e]),e}var xg=(e,t)=>{vg.isServer?Tt(e,t):Ct(e,t)};function _g(e){let t=At(e);return xg((()=>{t.current=e}),[e]),t}var Sg=function(e){let t=_g(e);return Gn.useCallback(((...e)=>t.current(...e)),[t])};function Eg({disabled:e=!1}={}){let t=At(null),[n,r]=Pt(!1),i=wg(),o=Sg((()=>{t.current=null,r(!1),i.dispose()})),s=Sg((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=gg(e.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);r(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}var Pg=Z(void 0);function kg(){return Lt(Pg)}function Tg({value:e,children:t}){return Gn.createElement(Pg.Provider,{value:e},t)}function Cg(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Ag(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ag),r}var Rg=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Rg||{}),Og=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Og||{});function Fg({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Dg;let l=Mg(t,e);if(o)return Lg(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:e=!1,...t}=l;if(e)return Lg(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return Ag(e?0:1,{0:()=>null,1:()=>Lg({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Lg(l,n,r,s,a)}function Lg(e,t={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=Bg(e,["unmount","static"]),u=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof s?s(t):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(o===O&&(Object.keys(jg(l)).length>0||Object.keys(jg(d)).length>0)){if(Ln(c)&&!(Array.isArray(c)&&c.length>1)){let e=c.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Cg(t(...e),l.className):Cg(t,l.className),r=n?{className:n}:{},o=Mg(c.props,jg(Bg(l,["ref"])));for(let i in d)i in o&&delete d[i];return Vn(c,Object.assign({},o,d,u,{ref:i(c.ref,u.ref)},r))}if(Object.keys(jg(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(jg(l)).concat(Object.keys(jg(d))).map((e=>` - ${e}`)).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((e=>` - ${e}`)).join("\n")].join("\n"))}return C(o,Object.assign({},Bg(l,["ref"]),o!==O&&u,o!==O&&d),c)}function Dg(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Mg(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Vg(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let r in n)Object.assign(t,{[r](...e){let t=n[r];for(let n of t)n?.(...e)}});return t}function Ig(e){var t;return Object.assign(Xt(e),{displayName:null!=(t=e.displayName)?t:e.name})}function jg(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Bg(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Ng(e,t,n){let[r,i]=Pt(n),o=void 0!==e,s=At(o),a=At(!1),l=At(!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?e:r,Sg((e=>(o||i(e),null==t?void 0:t(e))))]}function Ug(e){let[t]=Pt(e);return t}function Hg(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))Wg(n,$g(t,r),i);return n}function $g(e,t){return e?e+"["+t+"]":t}function Wg(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())Wg(e,$g(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):Hg(n,t,e)}function zg(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var qg=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(qg||{});var Qg=Ig((function(e,t){var n;let{features:r=1,...i}=e;return Fg({ourProps:{ref:t,"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"})})),Kg=Z(null);function Gg(e){let[t,n]=Pt(null);return Gn.createElement(Kg.Provider,{value:{target:t}},e.children,Gn.createElement(Qg,{features:qg.Hidden,ref:n}))}function Yg({children:e}){let t=Lt(Kg);if(!t)return Gn.createElement(Gn.Fragment,null,e);let{target:n}=t;return n?hn(Gn.createElement(Gn.Fragment,null,e),n):null}function Xg({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,s]=Pt(null),a=wg();return Tt((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,t,r]),Gn.createElement(Yg,null,Gn.createElement(Zg,{setForm:s,formId:t}),Hg(e).map((([e,r])=>Gn.createElement(Qg,{features:qg.Hidden,...jg({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})}))))}function Zg({setForm:e,formId:t}){return Tt((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:Gn.createElement(Qg,{features:qg.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}var Jg=Z(void 0);function ey(){return Lt(Jg)}function ty({id:e,children:t}){return Gn.createElement(Jg.Provider,{value:e},t)}function ny(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var ry=Symbol();function iy(...e){let t=At(e);Tt((()=>{t.current=e}),[e]);let n=Sg((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[ry])))?void 0:n}var oy=Z(null);function sy(){let e=Lt(oy);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,sy),e}return e}function ay(){var e,t;return null!=(t=null==(e=Lt(oy))?void 0:e.value)?t:void 0}function ly(){let[e,t]=Pt([]);return[e.length>0?e.join(" "):void 0,Ot((()=>function(e){let n=Sg((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=Ot((()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value})),[n,e.slot,e.name,e.props,e.value]);return Gn.createElement(oy.Provider,{value:r},e.children)}),[t])]}oy.displayName="DescriptionContext";var uy=Ig((function(e,t){let n=Vt(),r=kg(),{id:i=`headlessui-description-${n}`,...o}=e,s=sy(),a=iy(t);xg((()=>s.register(i)),[i,s.register]);let l=r||!1,u=Ot((()=>({...s.slot,disabled:l})),[s.slot,l]);return Fg({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),cy=Object.assign(uy,{}),dy=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(dy||{}),hy=Z(null);function py(){let e=Lt(hy);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,py),e}return e}function fy(e){var t,n,r;let i=null!=(n=null==(t=Lt(hy))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function my({inherit:e=!1}={}){let t=fy(),[n,r]=Pt([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,Ot((()=>function(e){let t=Sg((e=>(r((t=>[...t,e])),()=>r((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=Ot((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Gn.createElement(hy.Provider,{value:n},e.children)}),[r])]}hy.displayName="LabelContext";var vy=Ig((function(e,t){var n;let r=Vt(),i=py(),o=ey(),s=kg(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=iy(t);xg((()=>i.register(a)),[a,i.register]);let h=Sg((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=s||!1,f=Ot((()=>({...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),Fg({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),gy=Object.assign(vy,{});function yy(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function by(e,t=!1){let[n,r]=kt((()=>({})),{}),i=Ot((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return xg((()=>{if(!e)return;let t=new ResizeObserver(r);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}var wy=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function xy(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}function _y(e){return Qn(e.subscribe,e.getSnapshot,e.getSnapshot)}var Sy=new wy((()=>xy((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function Ey(e,t){let n=Sy.get(t),r=Vt(),i=_y(n);if(xg((()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,e]),!e)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}var Py=new Map,ky=new Map;function Ty(e){var t;let n=null!=(t=ky.get(e))?t:0;return ky.set(e,n+1),0!==n||(Py.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>Cy(e)}function Cy(e){var t;let n=null!=(t=ky.get(e))?t:1;if(1===n?ky.delete(e):ky.set(e,n-1),1!==n)return;let r=Py.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Py.delete(e))}var Ay=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),Ry=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),Oy=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Oy||{}),Fy=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Fy||{}),Ly=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ly||{});function Dy(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Ay)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var My=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(My||{});function Vy(e,t=0){var n;return e!==(null==(n=gg(e))?void 0:n.body)&&Ag(t,{0:()=>e.matches(Ay),1(){let t=e;for(;null!==t;){if(t.matches(Ay))return!0;t=t.parentElement}return!1}})}var Iy=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Iy||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));var jy=["textarea","input"].join(",");function By(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),i=t(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 Ny(e,t){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?By(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Ry)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):Dy(e);i.length>0&&s.length>1&&(s=s.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,s.indexOf(r))-1;if(4&t)return Math.max(0,s.indexOf(r))+1;if(8&t)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let e=u+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}a=s[e],a?.focus(c),d+=l}while(a!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,jy))&&n}(a)&&a.select(),2}(Dy(),t,{relativeTo:e})}function Uy(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Hy(){return Uy()||/Android/gi.test(window.navigator.userAgent)}function $y(e,t,n,r){let i=_g(n);Tt((()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}var Wy=30;function zy(e,t,n){let r=Ey(e,"outside-click"),i=_g(n),o=Ft((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!Vy(r,My.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),s=At(null);$y(r,"pointerdown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),$y(r,"mousedown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),$y(r,"click",(e=>{Hy()||s.current&&(o(e,(()=>s.current)),s.current=null)}),!0);let a=At({x:0,y:0});$y(r,"touchstart",(e=>{a.current.x=e.touches[0].clientX,a.current.y=e.touches[0].clientY}),!0),$y(r,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-a.current.x)>=Wy||Math.abs(n-a.current.y)>=Wy))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,r){let i=_g(n);Tt((()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}(r,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function qy(...e){return Ot((()=>gg(...e)),[...e])}function Qy(e,t){return Ot((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function Ky(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=null!=(n=t.defaultView)?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function Gy(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var Yy,Xy=xy((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:bg(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Gy(n)},i=[Uy()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=bg();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=e.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},Ky(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Zy(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=_y(Xy),i=t?r.get(t):void 0,o=!!i&&i.count>0;xg((()=>{if(t&&e)return Xy.dispatch("PUSH",t,n),()=>Xy.dispatch("POP",t,n)}),[e,t])}(Ey(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function Jy(e){return[e.screenX,e.screenY]}function eb(){let e=At([-1,-1]);return{wasMoved(t){let n=Jy(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=Jy(t)}}}Xy.subscribe((()=>{let e=Xy.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Xy.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Xy.dispatch("TEARDOWN",n)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(Yy=null==process?void 0:{})?void 0:Yy.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 tb=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(tb||{});function nb(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function rb(e,t,n,r){let[i,o]=Pt(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(e=0){let[t,n]=Pt(e);return{flags:t,setFlag:Ft((e=>n(e)),[t]),addFlag:Ft((e=>n((t=>t|e))),[t]),hasFlag:Ft((e=>(t&e)===e),[t]),removeFlag:Ft((e=>n((t=>t&~e))),[n]),toggleFlag:Ft((e=>n((t=>t^e))),[n])}}(e&&i?3:0),u=At(!1),c=At(!1);return xg((()=>{var i;if(e)return n&&o(!0),t?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:i}){let o=bg();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(e,t){var n,r;let i=bg();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),i.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,r))}))})),o.dispose}(t,{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 e;c.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&a(3))}),[e,n,t,wg()]),e?[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 ib(){return"undefined"!=typeof window}function ob(e){return lb(e)?(e.nodeName||"").toLowerCase():"#document"}function sb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ab(e){var t;return null==(t=(lb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lb(e){return!!ib()&&(e instanceof Node||e instanceof sb(e).Node)}function ub(e){return!!ib()&&(e instanceof Element||e instanceof sb(e).Element)}function cb(e){return!!ib()&&(e instanceof HTMLElement||e instanceof sb(e).HTMLElement)}function db(e){return!(!ib()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof sb(e).ShadowRoot)}function hb(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=yb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function pb(e){return["table","td","th"].includes(ob(e))}function fb(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(nx){return!1}}))}function mb(e){const t=vb(),n=ub(e)?yb(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function vb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function gb(e){return["html","body","#document"].includes(ob(e))}function yb(e){return sb(e).getComputedStyle(e)}function bb(e){return ub(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wb(e){if("html"===ob(e))return e;const t=e.assignedSlot||e.parentNode||db(e)&&e.host||ab(e);return db(t)?t.host:t}function xb(e){const t=wb(e);return gb(t)?e.ownerDocument?e.ownerDocument.body:e.body:cb(t)&&hb(t)?t:xb(t)}function _b(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=xb(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=sb(i);if(o){const e=Sb(s);return t.concat(s,s.visualViewport||[],hb(i)?i:[],e&&n?_b(e):[])}return t.concat(i,_b(i,[],n))}function Sb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Eb=Math.min,Pb=Math.max,kb=Math.round,Tb=Math.floor,Cb=e=>({x:e,y:e}),Ab={left:"right",right:"left",bottom:"top",top:"bottom"},Rb={start:"end",end:"start"};function Ob(e,t,n){return Pb(e,Eb(t,n))}function Fb(e,t){return"function"==typeof e?e(t):e}function Lb(e){return e.split("-")[0]}function Db(e){return e.split("-")[1]}function Mb(e){return"x"===e?"y":"x"}function Vb(e){return"y"===e?"height":"width"}function Ib(e){return["top","bottom"].includes(Lb(e))?"y":"x"}function jb(e){return Mb(Ib(e))}function Bb(e){return e.replace(/start|end/g,(e=>Rb[e]))}function Nb(e){return e.replace(/left|right|bottom|top/g,(e=>Ab[e]))}function Ub(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Hb(e,t,n){let{reference:r,floating:i}=e;const o=Ib(t),s=jb(t),a=Vb(s),l=Lb(t),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(Db(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function $b(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Fb(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=Ub(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)),b=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=Ub(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+f.top)/b.y,bottom:(w.bottom-v.bottom+f.bottom)/b.y,left:(v.left-w.left+f.left)/b.x,right:(w.right-v.right+f.right)/b.x}}function Wb(e){const t=yb(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=cb(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=kb(n)!==o||kb(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function zb(e){return ub(e)?e:e.contextElement}function qb(e){const t=zb(e);if(!cb(t))return Cb(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Wb(t);let s=(o?kb(n.width):n.width)/r,a=(o?kb(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}var Qb=Cb(0);function Kb(e){const t=sb(e);return vb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Qb}function Gb(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=zb(e);let s=Cb(1);t&&(r?ub(r)&&(s=qb(r)):s=qb(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==sb(e))&&t}(o,n,r)?Kb(o):Cb(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 e=sb(o),t=r&&ub(r)?sb(r):r;let n=e,i=Sb(n);for(;i&&r&&t!==n;){const e=qb(i),t=i.getBoundingClientRect(),r=yb(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=s,n=sb(i),i=Sb(n)}}return Ub({width:c,height:d,x:l,y:u})}function Yb(e,t){const n=bb(e).scrollLeft;return t?t.left+n:Gb(ab(e)).left+n}function Xb(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=sb(e),r=ab(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=vb();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=ab(e),n=bb(e),r=e.ownerDocument.body,i=Pb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Pb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Yb(e);const a=-n.scrollTop;return"rtl"===yb(r).direction&&(s+=Pb(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(ab(e));else if(ub(t))r=function(e,t){const n=Gb(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=cb(e)?qb(e):Cb(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=Kb(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Ub(r)}function Zb(e,t){const n=wb(e);return!(n===t||!ub(n)||gb(n))&&("fixed"===yb(n).position||Zb(n,t))}function Jb(e,t){const n=t.get(e);if(n)return n;let r=_b(e,[],!1).filter((e=>ub(e)&&"body"!==ob(e))),i=null;const o="fixed"===yb(e).position;let s=o?wb(e):e;for(;ub(s)&&!gb(s);){const t=yb(s),n=mb(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||hb(s)&&!n&&Zb(e,s))?r=r.filter((e=>e!==s)):i=t,s=wb(s)}return t.set(e,r),r}function ew(e,t,n){const r=cb(t),i=ab(t),o="fixed"===n,s=Gb(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Cb(0);if(r||!r&&!o)if(("body"!==ob(t)||hb(i))&&(a=bb(t)),r){const e=Gb(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Yb(i));let u=0,c=0;if(i&&!r&&!o){const e=i.getBoundingClientRect();c=e.top+a.scrollTop,u=e.left+a.scrollLeft-Yb(i,e)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function tw(e){return"static"===yb(e).position}function nw(e,t){if(!cb(e)||"fixed"===yb(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ab(e)===n&&(n=n.ownerDocument.body),n}function rw(e,t){const n=sb(e);if(fb(e))return n;if(!cb(e)){let t=wb(e);for(;t&&!gb(t);){if(ub(t)&&!tw(t))return t;t=wb(t)}return n}let r=nw(e,t);for(;r&&pb(r)&&tw(r);)r=nw(r,t);return r&&gb(r)&&tw(r)&&!mb(r)?n:r||function(e){let t=wb(e);for(;cb(t)&&!gb(t);){if(mb(t))return t;if(fb(t))return null;t=wb(t)}return null}(e)||n}var iw={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=ab(r),a=!!t&&fb(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Cb(1);const c=Cb(0),d=cb(r);if((d||!d&&!o)&&(("body"!==ob(r)||hb(s))&&(l=bb(r)),cb(r))){const e=Gb(r);u=qb(r),c.x=e.x+r.clientLeft,c.y=e.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:ab,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?fb(t)?[]:Jb(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=Xb(t,n,i);return e.top=Pb(r.top,e.top),e.right=Eb(r.right,e.right),e.bottom=Eb(r.bottom,e.bottom),e.left=Pb(r.left,e.left),e}),Xb(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:rw,getElementRects:async function(e){const t=this.getOffsetParent||rw,n=this.getDimensions,r=await n(e.floating);return{reference:ew(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Wb(e);return{width:t,height:n}},getScale:qb,isElement:ub,isRTL:function(e){return"rtl"===yb(e).direction}};function ow(e,t,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=zb(e),c=i||o?[...u?_b(u):[],..._b(t)]:[];c.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const i=ab(e);function o(){var e;clearTimeout(n),null==(e=r)||e.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}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-Tb(c)+"px "+-Tb(i.clientWidth-(u+d))+"px "+-Tb(i.clientHeight-(c+h))+"px "+-Tb(u)+"px",threshold:Pb(0,Eb(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(nx){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),u&&!l&&f.observe(u),f.observe(t));let m=l?Gb(e):null;return l&&function t(){const r=Gb(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),d?.(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}var sw=$b,aw=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Lb(n),a=Db(n),l="y"===Ib(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Fb(t,e);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}}(t,e);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}}}}},lw=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Fb(e,t),u={x:n,y:r},c=await $b(t,l),d=Ib(Lb(i)),h=Mb(d);let p=u[h],f=u[d];if(o){const e="y"===h?"bottom":"right";p=Ob(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";f=Ob(f+c["y"===d?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},uw=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Fb(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Lb(i),y=Ib(a),b=Lb(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),x=h||(b||!m?[Nb(a)]:function(e){const t=Nb(e);return[Bb(e),t,Bb(t)]}(a)),_="none"!==f;!h&&_&&x.push(...function(e,t,n,r){const i=Db(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(Lb(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Bb)))),o}(a,m,f,w));const S=[a,...x],E=await $b(t,v),P=[];let k=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&P.push(E[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Db(e),i=jb(e),o=Vb(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Nb(s)),[s,Nb(s)]}(i,s,w);P.push(E[e[0]],E[e[1]])}if(k=[...k,{placement:i,overflows:P}],!P.every((e=>e<=0))){var T,C;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n=null==(C=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=k.filter((e=>{if(_){const t=Ib(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},cw=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Fb(e,t),c=await $b(t,u),d=Lb(i),h=Db(i),p="y"===Ib(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,b=f-c.left-c.right,w=Eb(m-c[v],y),x=Eb(f-c[g],b),_=!t.middlewareData.shift;let S=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),_&&!h){const e=Pb(c.left,0),t=Pb(c.right,0),n=Pb(c.top,0),r=Pb(c.bottom,0);p?E=f-2*(0!==e||0!==t?e+t:Pb(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Pb(c.top,c.bottom))}await l({...t,availableWidth:E,availableHeight:S});const P=await s.getDimensions(a.floating);return f!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}},dw=(e,t,n)=>{const r=new Map,i={platform:iw,...n},o={...i.platform,_c:r};return(async(e,t,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(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Hb(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:b}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(u=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:c,y:d}=Hb(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})},hw="undefined"!=typeof document?Ct:Tt;function pw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!pw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!pw(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function fw(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mw(e,t){const n=fw(e);return Math.round(t*n)/n}function vw(e){const t=At(e);return hw((()=>{t.current=e})),t}var gw=(e,t)=>({...aw(e),options:[e,t]}),yw=(e,t)=>({...lw(e),options:[e,t]}),bw=(e,t)=>({...uw(e),options:[e,t]}),ww=(e,t)=>({...cw(e),options:[e,t]}),xw={...Wt},_w=xw.useInsertionEffect||(e=>e());function Sw(e){const t=At((()=>{}));return _w((()=>{t.current=e})),Ft((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Ew="undefined"!=typeof document?Ct:Tt,Pw=!1,kw=0,Tw=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+kw++;var Cw=xw.useId||function(){const[e,t]=Pt((()=>Pw?Tw():void 0));return Ew((()=>{null==e&&t(Tw())}),[]),Tt((()=>{Pw=!0}),[]),e};var Aw=Z(null),Rw=Z(null),Ow=()=>{var e;return(null==(e=Lt(Aw))?void 0:e.id)||null},Fw=()=>Lt(Rw),Lw="data-floating-ui-focusable";function Dw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Cw(),o=At({}),[s]=Pt((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),a=null!=Ow(),[l,u]=Pt(r.reference),c=Sw(((e,t,r)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),n?.(e,t,r)})),d=Ot((()=>({setPositionReference:u})),[]),h=Ot((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return Ot((()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[t,c,h,s,i,d])}function Mw(e){void 0===e&&(e={});const{nodeId:t}=e,n=Dw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=Pt(null),[a,l]=Pt(null),u=(null==i?void 0:i.reference)||o,c=At(null),d=Fw();Ew((()=>{u&&(c.current=u)}),[u]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=Pt({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=Pt(r);pw(h,r)||p(r);const[f,m]=Pt(null),[v,g]=Pt(null),y=Ft((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=Ft((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=o||f,x=s||v,_=At(null),S=At(null),E=At(c),P=null!=l,k=vw(l),T=vw(i),C=vw(u),A=Ft((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),dw(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==C.current};R.current&&!pw(E.current,t)&&(E.current=t,Nn((()=>{d(t)})))}))}),[h,t,n,T,C]);hw((()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const R=At(!1);hw((()=>(R.current=!0,()=>{R.current=!1})),[]),hw((()=>{if(w&&(_.current=w),x&&(S.current=x),w&&x){if(k.current)return k.current(w,x,A);A()}}),[w,x,A,k,P]);const O=Ot((()=>({reference:_,floating:S,setReference:y,setFloating:b})),[y,b]),F=Ot((()=>({reference:w,floating:x})),[w,x]),L=Ot((()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=mw(F.floating,c.x),r=mw(F.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...fw(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,F.floating,c.x,c.y]);return Ot((()=>({...c,update:A,refs:O,elements:F,floatingStyles:L})),[c,A,O,F,L])}({...e,elements:{...i,...a&&{reference:a}}}),p=Ft((e=>{const t=ub(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=Ft((e=>{(ub(e)||null===e)&&(c.current=e,s(e)),(ub(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!ub(e))&&h.refs.setReference(e)}),[h.refs]),m=Ot((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=Ot((()=>({...h.elements,domReference:u})),[h.elements,u]),g=Ot((()=>({...h,...r,refs:m,elements:v,nodeId:t})),[h,m,v,t,r]);return Ew((()=>{r.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),Ot((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}var Vw="active",Iw="selected";function jw(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Vw]:t,[Iw]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Lw]:""},...o,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var s;i&&[Vw,Iw].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}function Bw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Nw=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Fb(e,t),{rects:d,elements:{floating:h}}=t,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 b={...t,...await gw(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},w=await sw(Bw(b,f.scrollHeight+m+h.clientTop),c),x=await sw(b,{...c,elementContext:"reference"}),_=Pb(0,w.top),S=b.y+_,E=kb(Pb(0,f.scrollHeight+(v&&y||g?2*m:0)-_-Pb(0,w.bottom)));if(f.style.maxHeight=E+"px",f.scrollTop=_,i){const e=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||x.top>=-l||x.bottom>=-l;Nn((()=>i(e)))}return r&&(r.current=await sw(Bw({...b,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Uw(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=Sw(a),u=At(!1),c=At(null),d=At(null);Tt((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const n=e.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=t.scrollHeight-t.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),Nn((()=>{l((e=>e+Math[u](n,s*a)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{c.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,r.floating,o,s,l]);const h=Ot((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==s?void 0:s.current)||r.floating;if(o.current&&e&&u.current){if(null!==c.current){const t=e.scrollTop-c.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&Nn((()=>l((e=>e+t))))}requestAnimationFrame((()=>{c.current=e.scrollTop}))}}})),[r.floating,l,o,s]);return Ot((()=>i?{floating:h}:{}),[i,h])}var Hw=Z({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Hw.displayName="FloatingContext";var $w=Z(null);$w.displayName="PlacementContext";var Ww=4;function zw({children:e,enabled:t=!0}){let[n,r]=Pt(null),[i,o]=Pt(0),s=At(null),[a,l]=Pt(null);!function(e){xg((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(a);let u=t&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(e,t){var n,r,i;let o=qw(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=qw(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=qw(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");xg((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:b}=Mw({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[gw({mainAxis:"selection"===m?0:d,crossAxis:h}),yw({padding:p}),"selection"!==m&&bw({padding:p}),"selection"===m&&f?Nw({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:Ww,referenceOverflowThreshold:p,onFallbackChange(e){var t,n;if(!e)return;let r=b.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(Ww,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(t=b.elements.floating)?void 0:t.childNodes)?n:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(e>=n&&t<=u)){l=Math.max(0,Math.min(t,u)-Math.max(e,n)),a=o.clientHeight;break}s--}s>=1&&o((e=>{let t=a*s-l+i;return e>=t?e:t}))}}):null,ww({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:ow}),[w=m,x=v]=b.placement.split("-");"selection"===m&&(w="selection");let _=Ot((()=>({anchor:[w,x].filter(Boolean).join(" ")})),[w,x]),{getReferenceProps:S,getFloatingProps:E}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),i=Ft((t=>jw(t,e,"reference")),t),o=Ft((t=>jw(t,e,"floating")),n),s=Ft((t=>jw(t,e,"item")),r);return Ot((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([Uw(b,{overflowRef:s,onChange:o})]),P=Sg((e=>{l(e),g.setFloating(e)}));return C($w.Provider,{value:r},C(Hw.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:S,getFloatingProps:E,slot:_}},e))}function qw(e,t,n=void 0){let r=wg(),i=Sg(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=Kw(e,t);return[i,n=>{let o=Qw(e);{let s=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[e,n]of o.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=Kw(e,t);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=Ot((()=>i(e,t)[0]),[e,t]),[s=o,a]=Pt();return xg((()=>{let[n,r]=i(e,t);if(a(n),r)return r(a)}),[e,t]),s}function Qw(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...Qw(r)]:[n]}return[]}function Kw(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}var Gw=Z(null);Gw.displayName="OpenClosedContext";var Yw=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Yw||{});function Xw(){return Lt(Gw)}function Zw({value:e,children:t}){return Gn.createElement(Gw.Provider,{value:e},t)}var Jw=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Jw||{});function ex(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function tx(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Wt&&(e=>e.useSyncExternalStore)(Wt)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Pt(vg.isHandoffComplete);return t&&!1===vg.isHandoffComplete&&n(!1),Tt((()=>{!0!==t&&n(!0)}),[t]),Tt((()=>vg.handoff()),[]),!e&&t}var nx=Z(!1);function rx(){return Lt(nx)}var ix=O,ox=Ig((function(e,t){let n=e,r=At(null),i=iy(function(e,t=!0){return Object.assign(e,{[ry]:t})}((e=>{r.current=e})),t),o=qy(r),s=function(e){let t=rx(),n=Lt(ax),r=qy(e),[i,o]=Pt((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(vg.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 Tt((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Tt((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}(r),[a]=Pt((()=>{var e;return vg.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Lt(lx),u=tx();return xg((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),xg((()=>{if(a&&l)return l.register(a)}),[l,a]),function(e){let t=Sg(e),n=At(!1);Tt((()=>(n.current=!1,()=>{n.current=!0,yg((()=>{n.current&&t()}))})),[t])}((()=>{var e;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))})),u&&s&&a?hn(Fg({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:ix,name:"Portal"}),a):null}));var sx=O,ax=Z(null);var lx=Z(null),ux=Ig((function(e,t){let n=iy(t),{enabled:r=!0,...i}=e;return r?Gn.createElement(ox,{...i,ref:n}):Fg({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:ix,name:"Portal"})})),cx=Ig((function(e,t){let{target:n,...r}=e,i={ref:iy(t)};return Gn.createElement(ax.Provider,{value:n},Fg({ourProps:i,theirProps:r,defaultTag:sx,name:"Popover.Group"}))})),dx=Object.assign(ux,{Group:cx});function hx(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:yx)!==O||1===Gn.Children.count(e.children)}var px=Z(null);px.displayName="TransitionContext";var fx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fx||{});var mx=Z(null);function vx(e){return"children"in e?vx(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function gx(e,t){let n=_g(e),r=At([]),i=function(){let e=At(!1);return xg((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=wg(),s=Sg(((e,t=Og.Hidden)=>{let s=r.current.findIndex((({el:t})=>t===e));-1!==s&&(Ag(t,{[Og.Unmount](){r.current.splice(s,1)},[Og.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var e;!vx(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),a=Sg((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,Og.Unmount)})),l=At([]),u=At(Promise.resolve()),c=At({enter:[],leave:[]}),d=Sg(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),t?.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),t?.chains.current[n].push([e,new Promise((e=>{Promise.all(c.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?u.current=u.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=Sg(((e,t,n)=>{Promise.all(c.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return Ot((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}mx.displayName="NestingContext";var yx=O,bx=Rg.RenderStrategy;var wx=Ig((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=At(null),a=iy(...hx(e)?[s,t]:null===t?[]:[t]);tx();let l=Xw();if(void 0===n&&null!==l&&(n=(l&Yw.Open)===Yw.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=Pt(n?"visible":"hidden"),d=gx((()=>{n||c("hidden")})),[h,p]=Pt(!0),f=At([n]);xg((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=Ot((()=>({show:n,appear:r,initial:h})),[n,r,h]);xg((()=>{n?c("visible"):!vx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=Sg((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),y=Sg((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return Gn.createElement(mx.Provider,{value:d},Gn.createElement(px.Provider,{value:m},Fg({ourProps:{...v,as:O,children:Gn.createElement(xx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:O,features:bx,visible:"visible"===u,name:"Transition"})))})),xx=Ig((function(e,t){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}=e,[g,y]=Pt(null),b=At(null),w=hx(e),x=iy(...w?[b,t,y]:null===t?[]:[t]),_=null==(n=v.unmount)||n?Og.Unmount:Og.Hidden,{show:S,appear:E,initial:P}=function(){let e=Lt(px);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[k,T]=Pt(S?"visible":"hidden"),C=function(){let e=Lt(mx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:A,unregister:R}=C;xg((()=>A(b)),[A,b]),xg((()=>{if(_===Og.Hidden&&b.current)return S&&"visible"!==k?void T("visible"):Ag(k,{hidden:()=>R(b),visible:()=>A(b)})}),[k,b,A,R,S,_]);let O=tx();xg((()=>{if(w&&O&&"visible"===k&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[b,k,O,w]);let F=P&&!E,L=E&&S&&P,D=At(!1),M=gx((()=>{D.current||(T("hidden"),R(b))}),C),V=Sg((e=>{D.current=!0;let t=e?"enter":"leave";M.onStart(b,t,(e=>{"enter"===e?o?.():"leave"===e&&a?.()}))})),I=Sg((e=>{let t=e?"enter":"leave";D.current=!1,M.onStop(b,t,(e=>{"enter"===e?s?.():"leave"===e&&l?.()})),"leave"===t&&!vx(M)&&(T("hidden"),R(b))}));Tt((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let[,j]=rb(!(!i||!w||!O||F),g,S,{start:V,end:I}),B=jg({ref:x,className:(null==(r=Cg(v.className,L&&u,L&&c,j.enter&&u,j.enter&&j.closed&&c,j.enter&&!j.closed&&d,j.leave&&p,j.leave&&!j.closed&&f,j.leave&&j.closed&&m,!j.transition&&S&&h))?void 0:r.trim())||void 0,...nb(j)}),N=0;return"visible"===k&&(N|=Yw.Open),"hidden"===k&&(N|=Yw.Closed),j.enter&&(N|=Yw.Opening),j.leave&&(N|=Yw.Closing),Gn.createElement(mx.Provider,{value:M},Gn.createElement(Zw,{value:N},Fg({ourProps:B,theirProps:v,defaultTag:yx,features:bx,visible:"visible"===k,name:"Transition.Child"})))})),_x=Ig((function(e,t){let n=null!==Lt(px),r=null!==Xw();return Gn.createElement(Gn.Fragment,null,!n&&r?Gn.createElement(wx,{ref:t,...e}):Gn.createElement(xx,{ref:t,...e}))})),Sx=Object.assign(wx,{Child:_x,Root:wx});var Ex=Ig((function(e,t){let n=`headlessui-control-${Vt()}`,[r,i]=my(),[o,s]=ly(),a=kg(),{disabled:l=a||!1,...u}=e,c=Ot((()=>({disabled:l})),[l]);return Gn.createElement(Tg,{value:l},Gn.createElement(i,{value:r},Gn.createElement(s,{value:o},Gn.createElement(ty,{id:n},Fg({ourProps:{ref:t,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Gn.createElement(Gg,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));var Px=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function kx(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.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 Px.test(s)&&(s=s.replace(Px,"")),s}function Tx(e){let t=At(""),n=At("");return Sg((()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():kx(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return kx(e).trim()}(r).trim().toLowerCase();return t.current=i,n.current=o,o}))}var Cx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Cx||{}),Ax=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ax||{}),Rx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Rx||{}),Ox=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Ox||{});function Fx(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=By(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}var Lx={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,o,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===Jw.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Jw.Specific)return{...a,activeOptionIndex:e.options.findIndex((e=>e.id===t.id))};if(t.focus===Jw.Previous){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,s=ex(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(t.focus===Jw.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=ex(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===t.current||null===(null==(s=t.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Fx(e),u=ex(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Fx(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Fx(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Dx=Z(null);function Mx(e){let t=Lt(Dx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Mx),t}return t}Dx.displayName="ListboxActionsContext";var Vx=Z(null);function Ix(e){let t=Lt(Vx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ix),t}return t}function jx(e,t){return Ag(t.type,Lx,e,t)}Vx.displayName="ListboxDataContext";var Bx=O;var Nx=Z(!1),Ux=Rg.RenderStrategy|Rg.Static;var Hx=O;var $x=Ig((function(e,t){var n;let r=kg(),{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}=e;const v=h?"horizontal":"vertical";let g=iy(t),y=Ug(o),[b=(p?[]:void 0),w]=Ng(i,l,y),[x,_]=kt(jx,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=At({static:!1,hold:!1}),E=At(new Map),P=function(e=yy){return Ft(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(u),k=Ft((e=>Ag(T.mode,{1:()=>b.some((t=>P(t,e))),0:()=>P(b,e)})),[b]),T=Ot((()=>({...x,value:b,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:P,isSelected:k,optionsPropsRef:S,listRef:E})),[b,d,c,p,x,E]);xg((()=>{x.dataRef.current=T}),[T]),zy(0===T.listboxState,[T.buttonElement,T.optionsElement],((e,t)=>{var n;_({type:1}),Vy(t,My.Loose)||(e.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let C=Ot((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:b})),[T,d,b,c]),A=Sg((e=>{let t=T.options.find((t=>t.id===e));t&&V(t.dataRef.current.value)})),R=Sg((()=>{if(null!==T.activeOptionIndex){let{dataRef:e,id:t}=T.options[T.activeOptionIndex];V(e.current.value),_({type:2,focus:Jw.Specific,id:t})}})),O=Sg((()=>_({type:0}))),F=Sg((()=>_({type:1}))),L=wg(),D=Sg(((e,t,n)=>{L.dispose(),L.microTask((()=>e===Jw.Specific?_({type:2,focus:Jw.Specific,id:t,trigger:n}):_({type:2,focus:e,trigger:n})))})),M=Sg(((e,t)=>(_({type:5,id:e,dataRef:t}),()=>_({type:6,id:e})))),V=Sg((e=>Ag(T.mode,{0:()=>null==w?void 0:w(e),1(){let t=T.value.slice(),n=t.findIndex((t=>P(t,e)));return-1===n?t.push(e):t.splice(n,1),null==w?void 0:w(t)}}))),I=Sg((e=>_({type:3,value:e}))),j=Sg((()=>_({type:4}))),B=Sg((e=>{_({type:7,element:e})})),N=Sg((e=>{_({type:8,element:e})})),U=Ot((()=>({onChange:V,registerOption:M,goToOption:D,closeListbox:F,openListbox:O,selectActiveOption:R,selectOption:A,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[H,$]=my({inherit:!0}),W={ref:g},z=Ft((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Gn.createElement($,{value:H,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Gn.createElement(zw,null,Gn.createElement(Dx.Provider,{value:U},Gn.createElement(Vx.Provider,{value:T},Gn.createElement(Zw,{value:Ag(T.listboxState,{0:Yw.Open,1:Yw.Closed})},null!=a&&null!=b&&Gn.createElement(Xg,{disabled:d,data:{[a]:b},form:s,onReset:z}),Fg({ourProps:W,theirProps:m,slot:C,defaultTag:Bx,name:"Listbox"}))))))})),Wx=Ig((function(e,t){var n;let r=Ix("Listbox.Button"),i=Mx("Listbox.Button"),o=Vt(),s=ey(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=e,d=function(){let e=At([]),t=Ft((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}(),h=iy(t,Lt(Hw).setReference,i.setButtonElement),p=Lt(Hw).getReferenceProps,f=Sg((e=>{switch(e.key){case dy.Enter:zg(e.currentTarget);break;case dy.Space:case dy.ArrowDown:e.preventDefault(),Nn((()=>i.openListbox())),r.value||i.goToOption(Jw.First);break;case dy.ArrowUp:e.preventDefault(),Nn((()=>i.openListbox())),r.value||i.goToOption(Jw.Last)}})),m=Sg((e=>{if(e.key===dy.Space)e.preventDefault()})),v=Sg((e=>{var t;if(ny(e.currentTarget))return e.preventDefault();0===r.listboxState?(Nn((()=>i.closeListbox())),null==(t=r.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),i.openListbox())})),g=Sg((e=>e.preventDefault())),y=fy([a]),b=ay(),{isFocusVisible:w,focusProps:x}=pg({autoFocus:u}),{isHovered:_,hoverProps:S}=hg({isDisabled:l}),{pressed:E,pressProps:P}=Eg({disabled:l}),k=Ot((()=>({open:0===r.listboxState,active:E||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:_,focus:w,autofocus:u})),[r.listboxState,r.value,l,_,w,E,r.invalid,u]);return Fg({mergeRefs:d,ourProps:Vg(p(),{ref:h,id:a,type:Qy(e,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":b,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},x,S,P),theirProps:c,slot:k,defaultTag:"button",name:"Listbox.Button"})})),zx=gy,qx=Ig((function(e,t){var n,r;let i=Vt(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,d=function(e){return Ot((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(s),[h,p]=Pt(null);d&&(a=!0);let f=Ix("Listbox.Options"),m=Mx("Listbox.Options"),v=qy(f.optionsElement),g=Xw(),[y,b]=rb(u,h,null!==g?(g&Yw.Open)===Yw.Open:0===f.listboxState);!function(e,t,n){let r=_g((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));Tt((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let i=bg();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,r,e])}(y,f.buttonElement,m.closeListbox),Zy(!f.__demoMode&&(l&&0===f.listboxState),v),function(e,{allowed:t,disallowed:n}={}){let r=Ey(e,"inert-others");xg((()=>{var e,i;if(!r)return;let o=bg();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add(Ty(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=gg(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)s.some((t=>e.contains(t)))||o.add(Ty(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:Ft((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let w=!function(e,t){let n=At({left:0,top:0});if(xg((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(n.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,x=function(e,t){let[n,r]=Pt(t);return!e&&n!==t&&r(t),e?n:t}(y&&1===f.listboxState,f.value),_=Sg((e=>f.compare(x,e))),S=Ot((()=>{var e;if(null==d||null==(e=null==d?void 0:d.to)||!e.includes("selection"))return null;let t=f.options.findIndex((e=>_(e.dataRef.current.value)));return-1===t&&(t=0),t}),[d,f.options]),[E,P]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Lt($w),n=Ot((()=>e),[JSON.stringify(e,"undefined"!=typeof HTMLElement?(e,t)=>t instanceof HTMLElement?t.outerHTML:t:void 0)]);xg((()=>{t?.(null!=n?n:null)}),[t,n]);let r=Lt(Hw);return Ot((()=>[r.setFloating,e?r.styles:{}]),[r.setFloating,e,r.styles])}((()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let e=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:e},index:S}}})()),k=function(){let{getFloatingProps:e,slot:t}=Lt(Hw);return Ft(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),T=iy(t,d?E:null,m.setOptionsElement,p),C=wg();Tt((()=>{var e;let t=f.optionsElement;t&&0===f.listboxState&&t!==(null==(e=gg(t))?void 0:e.activeElement)&&t?.focus({preventScroll:!0})}),[f.listboxState,f.optionsElement]);let A=Sg((e=>{var t,n;switch(C.dispose(),e.key){case dy.Space:if(""!==f.searchQuery)return e.preventDefault(),e.stopPropagation(),m.search(e.key);case dy.Enter:if(e.preventDefault(),e.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:e}=f.options[f.activeOptionIndex];m.onChange(e.current.value)}0===f.mode&&(Nn((()=>m.closeListbox())),null==(t=f.buttonElement)||t.focus({preventScroll:!0}));break;case Ag(f.orientation,{vertical:dy.ArrowDown,horizontal:dy.ArrowRight}):return e.preventDefault(),e.stopPropagation(),m.goToOption(Jw.Next);case Ag(f.orientation,{vertical:dy.ArrowUp,horizontal:dy.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),m.goToOption(Jw.Previous);case dy.Home:case dy.PageUp:return e.preventDefault(),e.stopPropagation(),m.goToOption(Jw.First);case dy.End:case dy.PageDown:return e.preventDefault(),e.stopPropagation(),m.goToOption(Jw.Last);case dy.Escape:return e.preventDefault(),e.stopPropagation(),Nn((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case dy.Tab:e.preventDefault(),e.stopPropagation(),Nn((()=>m.closeListbox())),Ny(f.buttonElement,e.shiftKey?Oy.Previous:Oy.Next);break;default:1===e.key.length&&(m.search(e.key),C.setTimeout((()=>m.clearSearch()),350))}})),R=null==(n=f.buttonElement)?void 0:n.id,O=Ot((()=>({open:0===f.listboxState})),[f.listboxState]),F=Vg(d?k():{},{id:o,ref:T,"aria-activedescendant":null===f.activeOptionIndex||null==(r=f.options[f.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===f.mode||void 0,"aria-labelledby":R,"aria-orientation":f.orientation,onKeyDown:A,role:"listbox",tabIndex:0===f.listboxState?0:void 0,style:{...c.style,...P,"--button-width":by(f.buttonElement,!0).width},...nb(b)});return Gn.createElement(dx,{enabled:!!a&&(e.static||y)},Gn.createElement(Vx.Provider,{value:1===f.mode?f:{...f,isSelected:_}},Fg({ourProps:F,theirProps:c,slot:O,defaultTag:"div",features:Ux,visible:w,name:"Listbox.Options"})))})),Qx=Ig((function(e,t){let n=Vt(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=e,a=!0===Lt(Nx),l=Ix("Listbox.Option"),u=Mx("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=At(null),p=Tx(h),f=_g({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=iy(t,h,(e=>{e?l.listRef.current.set(r,e):l.listRef.current.delete(r)}));xg((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return bg().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),xg((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=Sg((e=>{var t;if(i)return e.preventDefault();u.onChange(o),0===l.mode&&(Nn((()=>u.closeListbox())),null==(t=l.buttonElement)||t.focus({preventScroll:!0}))})),g=Sg((()=>{if(i)return u.goToOption(Jw.Nothing);u.goToOption(Jw.Specific,r)})),y=eb(),b=Sg((e=>{y.update(e),!i&&(c||u.goToOption(Jw.Specific,r,0))})),w=Sg((e=>{y.wasMoved(e)&&(i||c||u.goToOption(Jw.Specific,r,0))})),x=Sg((e=>{y.wasMoved(e)&&(i||c&&u.goToOption(Jw.Nothing))})),_=Ot((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Fg({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:b,onMouseEnter:b,onPointerMove:w,onMouseMove:w,onPointerLeave:x,onMouseLeave:x},theirProps:s,slot:_,defaultTag:"div",name:"Listbox.Option"})})),Kx=Ig((function(e,t){let{options:n,placeholder:r,...i}=e,o={ref:iy(t)},s=Ix("ListboxSelectedOption"),a=Ot((()=>({})),[]),l=void 0===s.value||null===s.value||1===s.mode&&Array.isArray(s.value)&&0===s.value.length;return Gn.createElement(Nx.Provider,{value:!0},Fg({ourProps:o,theirProps:{...i,children:Gn.createElement(Gn.Fragment,null,r&&l?r:n)},slot:a,defaultTag:Hx,name:"ListboxSelectedOption"}))})),Gx=Object.assign($x,{Button:Wx,Label:zx,Options:qx,Option:Qx,SelectedOption:Kx}),Yx=Z(null);Yx.displayName="GroupContext";var Xx=O;var Zx=Ig((function(e,t){var n;let r=Vt(),i=ey(),o=kg(),{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}=e,v=Lt(Yx),[g,y]=Pt(null),b=iy(At(null),t,null===v?null:v.setSwitch,y),w=Ug(u),[x,_]=Ng(l,c,null!=w&&w),S=wg(),[E,P]=Pt(!1),k=Sg((()=>{P(!0),_?.(!x),S.nextFrame((()=>{P(!1)}))})),T=Sg((e=>{if(ny(e.currentTarget))return e.preventDefault();e.preventDefault(),k()})),C=Sg((e=>{e.key===dy.Space?(e.preventDefault(),k()):e.key===dy.Enter&&zg(e.currentTarget)})),A=Sg((e=>e.preventDefault())),R=fy(),O=ay(),{isFocusVisible:F,focusProps:L}=pg({autoFocus:f}),{isHovered:D,hoverProps:M}=hg({isDisabled:a}),{pressed:V,pressProps:I}=Eg({disabled:a}),j=Ot((()=>({checked:x,disabled:a,hover:D,focus:F,active:V,autofocus:f,changing:E})),[x,D,F,V,a,E,f]),B=Vg({id:s,ref:b,role:"switch",type:Qy(e,g),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":x,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:C,onKeyPress:A},L,M,I),N=Ft((()=>{if(void 0!==w)return null==_?void 0:_(w)}),[_,w]);return Gn.createElement(Gn.Fragment,null,null!=d&&Gn.createElement(Xg,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:x},form:p,onReset:N}),Fg({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),Jx=function(e){var t;let[n,r]=Pt(null),[i,o]=my(),[s,a]=ly(),l=Ot((()=>({switch:n,setSwitch:r})),[n,r]),u=e;return Gn.createElement(a,{name:"Switch.Description",value:s},Gn.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=l.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Gn.createElement(Yx.Provider,{value:l},Fg({ourProps:{},theirProps:u,slot:{},defaultTag:Xx,name:"Switch.Group"}))))},e_=gy,t_=cy,n_=Object.assign(Zx,{Group:Jx,Label:e_,Description:t_});function r_(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function i_(e,t,n){var r=[],i=er(e,r,n);return r.length<2?n:i+t(r)}var o_=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(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},s_=function(e){var t=ft(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=vr(n,t.registered,void 0);return nr(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return i_(t.registered,n,o_(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];r_(t,vr(n,t.registered))},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=vr(n,t.registered),o="animation-"+i.name;return r_(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:er.bind(null,t.registered),merge:i_.bind(null,t.registered,n)}}({key:"css"}),a_=(s_.flush,s_.hydrate,s_.cx),l_=(s_.merge,s_.getRegisteredStyles,s_.injectGlobal,s_.keyframes,s_.css),u_=(s_.sheet,s_.cache,lo(Wx)`
13
+ `;function So({title:e,titleId:t,...n},r){return C("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C("title",{id:t},e):null,C("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}var Eo=Xt(So);function Po({title:e,titleId:t,...n},r){return C("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C("title",{id:t},e):null,C("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}var ko=Xt(Po),To=Xt((({label:e,id:t,type:n,icon:r,placeholder:i,setPlaceholderOnFocus:o,value:s,className:a,onChange:l,onBlur:u,error:c,helperText:d,disabled:h,remove:p},f)=>Mr("div",{className:a,children:[e&&Dr("label",{htmlFor:t,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:e}),Mr("div",{css:{position:"relative",marginTop:"0.5rem"},children:[r&&Dr("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:r}),Mr("div",{css:{marginTop:"0.5rem",display:"flex",alignItems:"center"},children:[Dr(_o,{type:n,value:s,name:t,id:t,placeholder:i,onChange:e=>{const t=e;t.target instanceof HTMLInputElement&&l(t.target.value.trim())},onBlur:e=>{const t=e;t.target instanceof HTMLInputElement&&u&&u(t.target.value.trim())},onFocus:()=>{i&&o&&!s?.trim()&&l(i)},hasError:!!c,ref:f,disabled:h,prefix:!!r}),p&&Mr("button",{type:"button",children:[Dr(ko,{css:{marginLeft:"0.5rem",height:"1.25rem",width:"1.25rem"},onClick:()=>p()})," "]})]})]}),c&&Dr("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&&Dr("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 Co({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Ao=Xt(Co);function Ro({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Oo=Xt(Ro);function Fo({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Lo=Xt(Fo);function Do({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}))}var Mo=Xt(Do);function Vo({title:e,titleId:t,...n},r){return C("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":t},n),e?C("title",{id:t},e):null,C("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"}),C("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"}))}var Io,jo=Xt(Vo),Bo=lo.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))"},(e=>e.className),(({isActive:e})=>e&&{"--tw-bg-opacity":"1",backgroundColor:"rgb(229 231 235 / var(--tw-bg-opacity))"})),No=e=>{const[t,n]=Pt(),[r,i]=Pt([]),[o,s]=Pt(e.columns[0]),[a,l]=Pt("asc"),u=Ot((()=>o?[...e.data].sort(((e,t)=>{const n=o.sort?o.sort(e[o.field],t[o.field]):e[o.field].localeCompare(t[o.field]);return"desc"===a?-1*n:n})):e.data),[e.data,o,a]),c=Ot((()=>{const e=r.reduce(((e,t)=>e.filter(t.filterFunction)),u);return t?e.filter((e=>e.id.toLowerCase().includes(t.toLowerCase()))):e}),[u,t,r]),d=Ot((()=>e.columns.filter((e=>e.filters&&e.filters.length>0)).length>0),[e.columns]),h=(e,t)=>{const n={name:e.name,filterFunction:n=>e.predicate(n[t.field])},o=r.filter((e=>e.name!==n.name));return()=>o.length<r.length?i([...o]):i([...o,n])};return Dr(Lr,{children:Mr("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:[Mr("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[Mr("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[Dr("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.title}),e.subtitle&&Dr("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:e.subtitle}),Dr(To,{css:{marginTop:"0.5rem",maxWidth:"20rem"},label:"",icon:Dr(po,{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:e=>n(e)})]}),e.addButton&&Dr("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:Dr("button",{type:"button",onClick:e.addButton.onClick,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:e.addButton.text})})]}),Dr("div",{css:{marginTop:"2rem",display:"flow-root"},children:Dr("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:Dr("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:Dr("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:Mr("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:[d&&Dr("thead",{children:Dr("tr",{children:Mr("td",{css:{padding:"1rem"},colspan:e.columns.length,children:[Dr(Bo,{onClick:()=>i([]),isActive:0==r.length,children:"All"}),e.columns.map((e=>e.filters?.map((t=>Dr(Bo,{onClick:h(t,e),isActive:!!r.find((e=>e.name===t.name)),children:t.name},t.name)))))]})})}),Dr("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:Dr("tr",{children:e.columns.map((e=>Dr("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:Mr("button",{disabled:!e.isSortable,onClick:()=>(e=>{o===e?l("asc"===a?"desc":"asc"):(s(e),l("asc"))})(e),css:{display:"inline-flex"},children:[Dr("span",{children:e.name}),Mr("span",{css:{marginLeft:"0.5rem"},children:[o===e&&"asc"===a&&Dr(Ao,{css:{height:"1.25rem",width:"1.25rem"}}),o===e&&"desc"===a&&Dr(Oo,{css:{height:"1.25rem",width:"1.25rem"}}),o!==e&&Dr("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},e.field)))})}),Dr("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(((t,n)=>Dr("tr",{children:e.columns.map(((e,r)=>Dr(O,{children:xo(t.id,t[e.field],e.type)},`${t[e.field]}-${n}-${r}`)))},`${t[e.columns[0].field]}-${n}`)))})]})})})})})]})})};function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(null,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Io||(Io={}));var Ho,$o="popstate";function Wo(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Io.Pop,l=null,u=c();null==u&&(u=0,s.replaceState(Uo({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Io.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:a,location:m.location,delta:t})}function h(e,t){a=Io.Push;let r=Ko(m.location,e,t);n&&n(r,e),u=c()+1;let d=Qo(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(e,t){a=Io.Replace;let r=Ko(m.location,e,t);n&&n(r,e),u=c();let i=Qo(r,u),d=m.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:Go(e);return n=n.replace(/ $/,"%20"),zo(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($o,d),l=e,()=>{i.removeEventListener($o,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:p,go:e=>s.go(e)};return m}((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=Yo(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),Ko("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:Go(t))}),(function(e,t){qo("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function zo(e,t){if(!1===e||null==e)throw new Error(t)}function qo(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(ex){}}}function Qo(e,t){return{usr:e.state,key:e.key,idx:t}}function Ko(e,t,n,r){return void 0===n&&(n=null),Uo({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Yo(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Go(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Yo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Xo(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let i=cs(("string"==typeof t?Yo(t):t).pathname||"/",n);if(null==i)return null;let o=Zo(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let s=null,a=function(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return qo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}(i);for(let l=0;null==s&&l<o.length;++l)s=ls(o[l],a,r);return s}(e,t,n,!1)}function Zo(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(zo(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=ms([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(zo(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Zo(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:as(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Jo(e.path))i(e,t,r);else i(e,t)})),t}function Jo(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=Jo(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ho||(Ho={}));var es=/^:[\w-]+$/,ts=3,ns=2,rs=1,is=10,os=-2,ss=e=>"*"===e;function as(e,t){let n=e.split("/"),r=n.length;return n.some(ss)&&(r+=os),t&&(r+=ns),n.filter((e=>!ss(e))).reduce(((e,t)=>e+(es.test(t)?ts:""===t?rs:is)),r)}function ls(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=us({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=us({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:ms([o,c.pathname]),pathnameBase:vs(ms([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=ms([o,c.pathnameBase]))}return s}function us(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);qo("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");return[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function cs(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function ds(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function hs(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` 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 ps(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=Yo(e):(i=Uo({},e),zo(!i.pathname||!i.pathname.includes("?"),hs("?","pathname","search",i)),zo(!i.pathname||!i.pathname.includes("#"),hs("#","pathname","hash",i)),zo(!i.search||!i.search.includes("#"),hs("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?Yo(e):e;return r?(r=fs(r),n=r.startsWith("/")?ds(r.substring(1),"/"):ds(r,t)):n=t,{pathname:n,search:gs(i),hash:ys(o)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}var fs=e=>e.replace(/\/\/+/g,"/"),ms=e=>fs(e.join("/")),vs=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gs=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ys=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;var bs=["post","put","patch","delete"],ws=(new Set(bs),["get",...bs]);new Set(ws);function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xs.apply(null,arguments)}var _s=Z(null),Ss=Z(null),Es=Z(null),Ps=Z(null),ks=Z({outlet:null,matches:[],isDataRoute:!1}),Ts=Z(null);function Cs(){return null!=Lt(Ps)}function As(){return!Cs()&&zo(!1),Lt(Ps).location}function Rs(e){Lt(Es).static||Ct(e)}function Os(){let{isDataRoute:e}=Lt(ks);return e?function(){let{router:e}=function(){let e=Lt(_s);return!e&&zo(!1),e}(Is.UseNavigateStable),t=Bs(js.UseNavigateStable),n=At(!1);return Rs((()=>{n.current=!0})),Ft((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,xs({fromRouteId:t},i)))}),[e,t])}():function(){!Cs()&&zo(!1);let e=Lt(_s),{basename:t,future:n,navigator:r}=Lt(Es),{matches:i}=Lt(ks),{pathname:o}=As(),s=JSON.stringify(function(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}(i,n.v7_relativeSplatPath)),a=At(!1);return Rs((()=>{a.current=!0})),Ft((function(n,i){if(void 0===i&&(i={}),!a.current)return;if("number"==typeof n)return void r.go(n);let l=ps(n,JSON.parse(s),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:ms([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[t,r,s,o,e])}()}function Fs(e,t){return function(e,t,n,r){!Cs()&&zo(!1);let{navigator:i}=Lt(Es),{matches:o}=Lt(ks),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u,c=As();if(t){var d;let e="string"==typeof t?Yo(t):t;"/"!==l&&!(null==(d=e.pathname)?void 0:d.startsWith(l))&&zo(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=Xo(e,{pathname:p}),m=function(e,t,n,r){var i;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=s.findIndex((e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id])));!(e>=0)&&zo(!1),s=s.slice(0,Math.min(s.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let e=s[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((e,r,i)=>{let o,c=!1,d=null,h=null;var p;n&&(o=a&&r.route.id?a[r.route.id]:void 0,d=r.route.errorElement||Ds,l&&(u<0&&0===i?(p="route-fallback",!1||Ns[p]||(Ns[p]=!0),c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,i+1)),m=()=>{let t;return t=o?d:c?h:r.route.Component?C(r.route.Component,null):r.route.element?r.route.element:e,C(Vs,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?C(Ms,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()}),null)}(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:ms([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:ms([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);return t&&m?C(Ps.Provider,{value:{location:xs({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Io.Pop}},m):m}(e,t)}function Ls(){let e=function(){var e;let t=Lt(Ts),n=function(){let e=Lt(Ss);return!e&&zo(!1),e}(js.UseRouteError),r=Bs(js.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return C(O,null,C("h2",null,"Unexpected Application Error!"),C("h3",{style:{fontStyle:"italic"}},t),n?C("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},n):null,null)}var Ds=C(Ls,null),Ms=class extends F{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?C(ks.Provider,{value:this.props.routeContext},C(Ts.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Vs(e){let{routeContext:t,match:n,children:r}=e,i=Lt(_s);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C(ks.Provider,{value:t},r)}var Is=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Is||{}),js=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(js||{});function Bs(e){let t=function(){let e=Lt(ks);return!e&&zo(!1),e}(),n=t.matches[t.matches.length-1];return!n.route.id&&zo(!1),n.route.id}var Ns={};var Us=(e,t,n)=>{};function Hs(e){zo(!1)}function $s(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Io.Pop,navigator:o,static:s=!1,future:a}=e;Cs()&&zo(!1);let l=t.replace(/^\/*/,"/"),u=Ot((()=>({basename:l,navigator:o,static:s,future:xs({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"==typeof r&&(r=Yo(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=Ot((()=>{let e=cs(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,c,d,h,p,f,i]);return null==m?null:C(Es.Provider,{value:u},C(Ps.Provider,{children:n,value:m}))}function Ws(e){let{children:t,location:n}=e;return Fs(zs(t),n)}new Promise((()=>{}));function zs(e,t){void 0===t&&(t=[]);let n=[];return Jt.forEach(e,((e,r)=>{if(!Ln(e))return;let i=[...t,r];if(e.type===O)return void n.push.apply(n,zs(e.props.children,i));e.type!==Hs&&zo(!1),e.props.index&&e.props.children&&zo(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=zs(e.props.children,i)),n.push(o)})),n}try{window.__reactRouterVersion="6"}catch(ex){}var qs=Hn;function Qs(e){let{basename:t,children:n,future:r,window:i}=e,o=At();null==o.current&&(o.current=Wo({window:i,v5Compat:!0}));let s=o.current,[a,l]=Pt({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=Ft((e=>{u&&qs?qs((()=>l(e))):l(e)}),[l,u]);return Ct((()=>s.listen(c)),[s,c]),Tt((()=>{return void 0===(null==(e=r)?void 0:e.v7_startTransition)&&Us("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&void 0!==t.v7_relativeSplatPath||Us("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),void(t&&(void 0===t.v7_fetcherPersist&&Us("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&Us("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&Us("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&Us("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation")));var e,t}),[r]),C($s,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var Ks,Gs,Ys;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(Ks||(Ks={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Gs||(Gs={}));var Xs="getAllPromotions",Zs=/^https:\/\/([A-Za-z]+)-partner/,Js=e=>{switch((e=>{if(e.startsWith("http://localhost"))return"local";const t=e.toLowerCase().match(Zs);return t&&t.length>1?t[1]:"prod"})(e.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/"}},ea=()=>{const{getAllPromotions:e}=$r(),t=Os(),{isPending:n,error:r,data:i}=Zi({queryKey:[Xs],queryFn:e}),o=Br(),s=Ot((()=>{return e=o.backend,t=i,(t?.data||[]).map((t=>({id:t.id,category:t.category.title,promotionStatus:t.status,contentfulUrl:t.contentfulContent?.contentId?`${Js(e)}entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,audiences:t.audiences?.sort().join(", "),updatedAt:t.updatedAt,edit:"Edit"}))).sort(((e,t)=>new Date(t.updatedAt).valueOf()-new Date(e.updatedAt).valueOf()));var e,t}),[o.backend,i]),a=Ot((()=>[{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:e=>"Enabled"===e},{name:"Disabled",predicate:e=>"Disabled"===e}]},{name:"Contentful",field:"contentfulUrl",isSortable:!0,sort:e=>e?-1:1,type:{kind:"link"},filters:[{name:"Linked",predicate:e=>!!e},{name:"Unlinked",predicate:e=>!e}]},{name:"Audiences",field:"audiences",isSortable:!0,type:{kind:"list"},filters:[{name:"Audiences",predicate:e=>!!e}]},{name:"Updated",field:"updatedAt",isSortable:!0,sort:(e,t)=>new Date(t).valueOf()-new Date(e).valueOf(),type:{kind:"date"}},{name:"Edit",field:"edit",isSortable:!1,type:{kind:"button",onClick:e=>t(`/promotion/${e}`),children:Dr(jo,{alt:"edit","data-testid":"edit",css:{height:"1.25rem",width:"1.25rem",":hover":{fill:"var(--fl-color-primary-600)"}}})}}]),[t]);switch(!0){case n:return Dr(Lr,{children:"Loading..."});case!!r:return Mr(Lr,{children:["An error has occurred: ",r.message]});case!!i:return Dr(No,{columns:a,data:s,title:"Promotions",subtitle:"A list of currently configured promoted benefits",addButton:{onClick:()=>t("/promotion"),text:"Add New Promotion"}});default:return Dr(Lr,{children:"No data returned from backend"})}};function ta(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function na(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}var ra=e=>Array.isArray(e);function ia(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function oa(e){return"string"==typeof e||Array.isArray(e)}function sa(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function aa(e,t,n,r){if("function"==typeof t){const[i,o]=sa(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=sa(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function la(e,t,n){const r=e.getProps();return aa(r,t,void 0!==n?n:r.custom,e)}var ua=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ca=["initial",...ua],da=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ha=new Set(da),pa=e=>1e3*e,fa=e=>e/1e3,ma={type:"spring",stiffness:500,damping:25,restSpeed:10},va={type:"keyframes",duration:.8},ga={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ya=(e,{keyframes:t})=>t.length>2?va:ha.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ma:ga;function ba(e,t){return e[t]||e.default||e}var wa=!1,xa=!1,_a=!1,Sa=e=>null!==e;function Ea(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Sa),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}var Pa=e=>e;var ka=["read","resolveKeyframes","update","preRender","render","postRender"];function Ta(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=ka.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:h}=s,p=()=>{const o=xa?i.timestamp: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&&t&&(r=!1,e(p))};return{schedule:ka.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<ka.length;t++)s[ka[t]].cancel(e)},state:i,steps:s}}var{schedule:Ca,cancel:Aa,state:Ra,steps:Oa}=Ta("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Pa,!0),Fa=e=>/^0[^.\s]+$/u.test(e);var La=Pa,Da=Pa,Ma=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Va=e=>t=>"string"==typeof t&&t.startsWith(e),Ia=Va("--"),ja=Va("var(--"),Ba=e=>!!ja(e)&&Na.test(e.split("/*")[0].trim()),Na=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ua=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ha(e,t,n=1){Da(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=function(e){const t=Ua.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${null!=n?n:r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Ma(e)?parseFloat(e):e}return Ba(i)?Ha(i,t,n+1):i}var $a=(e,t,n)=>n>t?t:n<e?e:n,Wa={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},za={...Wa,transform:e=>$a(0,1,e)},qa={...Wa,default:1},Qa=e=>Math.round(1e5*e)/1e5,Ka=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ga=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ya=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Xa(e){return"string"==typeof e}var Za=e=>({test:t=>Xa(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Ja=Za("deg"),el=Za("%"),tl=Za("px"),nl=Za("vh"),rl=Za("vw"),il={...el,parse:e=>el.parse(e)/100,transform:e=>el.transform(100*e)},ol=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sl=e=>e===Wa||e===tl,al=(e,t)=>parseFloat(e.split(", ")[t]),ll=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return al(i[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?al(t[1],e):0}},ul=new Set(["x","y","z"]),cl=da.filter((e=>!ul.has(e)));var dl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ll(4,13),y:ll(5,14)};dl.translateX=dl.x,dl.translateY=dl.y;var hl=e=>t=>t.test(e),pl=[Wa,tl,el,Ja,rl,nl,{test:e=>"auto"===e,parse:e=>e}],fl=e=>pl.find(hl(e)),ml=new Set,vl=!1,gl=!1;function yl(){if(gl){const e=Array.from(ml).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return cl.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}gl=!1,vl=!1,ml.forEach((e=>e.complete())),ml.clear()}function bl(){ml.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(gl=!0)}))}var wl=class{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ml.add(this),vl||(vl=!0,Ca.read(bl),Ca.resolveKeyframes(yl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ml.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ml.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},xl=(e,t)=>n=>Boolean(Xa(n)&&Ya.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),_l=(e,t,n)=>r=>{if(!Xa(r))return r;const[i,o,s,a]=r.match(Ka);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Sl={...Wa,transform:e=>Math.round((e=>$a(0,255,e))(e))},El={test:xl("rgb","red"),parse:_l("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Sl.transform(e)+", "+Sl.transform(t)+", "+Sl.transform(n)+", "+Qa(za.transform(r))+")"};var Pl={test:xl("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:El.transform},kl={test:xl("hsl","hue"),parse:_l("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+el.transform(Qa(t))+", "+el.transform(Qa(n))+", "+Qa(za.transform(r))+")"},Tl={test:e=>El.test(e)||Pl.test(e)||kl.test(e),parse:e=>El.test(e)?El.parse(e):kl.test(e)?kl.parse(e):Pl.parse(e),transform:e=>Xa(e)?e:e.hasOwnProperty("red")?El.transform(e):kl.transform(e)};var Cl="number",Al="color",Rl="var",Ol="var(",Fl="${}",Ll=/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 Dl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;return{values:n,split:t.replace(Ll,(e=>(Tl.test(e)?(r.color.push(o),i.push(Al),n.push(Tl.parse(e))):e.startsWith(Ol)?(r.var.push(o),i.push(Rl),n.push(e)):(r.number.push(o),i.push(Cl),n.push(parseFloat(e))),++o,Fl))).split(Fl),indexes:r,types:i}}function Ml(e){return Dl(e).values}function Vl(e){const{split:t,types:n}=Dl(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===Cl?Qa(e[o]):t===Al?Tl.transform(e[o]):e[o]}return i}}var Il=e=>"number"==typeof e?0:e;var jl={test:function(e){var t,n;return isNaN(e)&&Xa(e)&&((null===(t=e.match(Ka))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Ga))||void 0===n?void 0:n.length)||0)>0},parse:Ml,createTransformer:Vl,getAnimatableNone:function(e){const t=Ml(e);return Vl(e)(t.map(Il))}},Bl=new Set(["brightness","contrast","saturate","opacity"]);function Nl(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ka)||[];if(!r)return e;const i=n.replace(r,"");let o=Bl.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}var Ul=/\b([a-z-]*)\(.*?\)/gu,Hl={...jl,getAnimatableNone:e=>{const t=e.match(Ul);return t?t.map(Nl).join(" "):e}},$l={...Wa,transform:Math.round},Wl={borderWidth:tl,borderTopWidth:tl,borderRightWidth:tl,borderBottomWidth:tl,borderLeftWidth:tl,borderRadius:tl,radius:tl,borderTopLeftRadius:tl,borderTopRightRadius:tl,borderBottomRightRadius:tl,borderBottomLeftRadius:tl,width:tl,maxWidth:tl,height:tl,maxHeight:tl,size:tl,top:tl,right:tl,bottom:tl,left:tl,padding:tl,paddingTop:tl,paddingRight:tl,paddingBottom:tl,paddingLeft:tl,margin:tl,marginTop:tl,marginRight:tl,marginBottom:tl,marginLeft:tl,rotate:Ja,rotateX:Ja,rotateY:Ja,rotateZ:Ja,scale:qa,scaleX:qa,scaleY:qa,scaleZ:qa,skew:Ja,skewX:Ja,skewY:Ja,distance:tl,translateX:tl,translateY:tl,translateZ:tl,x:tl,y:tl,z:tl,perspective:tl,transformPerspective:tl,opacity:za,originX:il,originY:il,originZ:tl,zIndex:$l,backgroundPositionX:tl,backgroundPositionY:tl,fillOpacity:za,strokeOpacity:za,numOctaves:$l},zl={...Wl,color:Tl,backgroundColor:Tl,outlineColor:Tl,fill:Tl,stroke:Tl,borderColor:Tl,borderTopColor:Tl,borderRightColor:Tl,borderBottomColor:Tl,borderLeftColor:Tl,filter:Hl,WebkitFilter:Hl},ql=e=>zl[e];function Ql(e,t){let n=ql(e);return n!==Hl&&(n=jl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Kl=new Set(["auto","none","0"]);var Gl,Yl=class extends wl{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),Ba(n))){const r=Ha(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!ol.has(n)||2!==e.length)return;const[r,i]=e,o=fl(r),s=fl(i);if(o!==s)if(sl(o)&&sl(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)("number"==typeof(r=e[i])?0===r:null===r||"none"===r||"0"===r||Fa(r))&&n.push(i);var r;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Kl.has(t)&&Dl(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=Ql(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dl[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=dl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}};function Xl(e){let t;return()=>(void 0===t&&(t=e()),t)}function Zl(){Gl=void 0}var Jl={now:()=>(void 0===Gl&&Jl.set(Ra.isProcessing||xa?Ra.timestamp:performance.now()),Gl),set:e=>{Gl=e,queueMicrotask(Zl)}},eu=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!jl.test(e)&&"0"!==e||e.startsWith("url(")));var tu=class{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Jl.now(),this.options={autoplay:e,delay:t,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||(bl(),yl()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Jl.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=eu(i,t),a=eu(o,t);return La(s===a,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,i)){if(_a||!o)return null==a||a(Ea(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}};function nu(e,t){return t?e*(1e3/t):0}var ru=5;function iu(e,t,n){const r=Math.max(t-ru,0);return nu(n-e(r),t-r)}var ou=.001,su=.01,au=.05;function lu({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;La(e<=pa(10),"Spring duration must be 10 seconds or less");let s=1-t;s=$a(au,1,s),e=$a(su,10,fa(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=cu(t,s),l=Math.exp(-i);return ou-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=cu(Math.pow(t,2),s);return(-i(t)+ou>0?-1:1)*((o-a)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<uu;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=pa(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}var uu=12;function cu(e,t){return e*Math.sqrt(1-t*t)}var du=["duration","bounce"],hu=["stiffness","damping","mass"];function pu(e,t){return t.some((t=>void 0!==e[t]))}function fu({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!pu(e,hu)&&pu(e,du)){const n=lu(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-fa(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(a*u)),m=o-i,v=fa(Math.sqrt(a/u)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),t||(t=g?.005:.5),f<1){const e=cu(v,f);y=t=>{const n=Math.exp(-f*v*t);return o-n*((p+f*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)y=e=>o-Math.exp(-v*e)*(m+(p+v*m)*e);else{const e=v*Math.sqrt(f*f-1);y=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return o-n*((p+f*v*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:h&&c||null,next:e=>{const r=y(e);if(h)s.done=e>=c;else{let i=0;f<1&&(i=0===e?pa(p):iu(y,e,r));const a=Math.abs(i)<=n,l=Math.abs(o-r)<=t;s.done=a&&l}return s.value=s.done?o:r,s}}}function mu({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,v=void 0===s?m:s(m);v!==m&&(f=v-d);const g=e=>-f*Math.exp(-e/r),y=e=>v+g(e),b=e=>{const t=g(e),n=y(e);h.done=Math.abs(t)<=u,h.value=h.done?v:n};let w,x;const _=e=>{(e=>void 0!==a&&e<a||void 0!==l&&e>l)(h.value)&&(w=e,x=fu({keyframes:[h.value,p(h.value)],velocity:iu(y,e,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),h)}}}var vu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gu=1e-7,yu=12;function bu(e,t,n,r){if(e===t&&n===r)return Pa;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=vu(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>gu&&++a<yu);return s}(t,0,1,e,n);return e=>0===e||1===e?e:vu(i(e),t,r)}var wu=bu(.42,0,1,1),xu=bu(0,0,.58,1),_u=bu(.42,0,.58,1),Su=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Eu=e=>t=>1-e(1-t),Pu=e=>1-Math.sin(Math.acos(e)),ku=Eu(Pu),Tu=Su(Pu),Cu=bu(.33,1.53,.69,.99),Au=Eu(Cu),Ru={linear:Pa,easeIn:wu,easeInOut:_u,easeOut:xu,circIn:Pu,circInOut:Tu,circOut:ku,backIn:Au,backInOut:Su(Au),backOut:Cu,anticipate:e=>(e*=2)<1?.5*Au(e):.5*(2-Math.pow(2,-10*(e-1)))},Ou=e=>{if(Array.isArray(e)){Da(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return bu(t,n,r,i)}return"string"==typeof e?(Da(void 0!==Ru[e],`Invalid easing type '${e}'`),Ru[e]):e},Fu=(e,t)=>n=>t(e(n)),Lu=(...e)=>e.reduce(Fu),Du=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Mu=(e,t,n)=>e+(t-e)*n;function Vu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Iu(e,t){return n=>n>0?t:e}var ju=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Bu=[Pl,El,kl];function Nu(e){const t=(e=>Bu.find((t=>t.test(e))))(e);if(La(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===kl&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=Vu(a,r,e+1/3),o=Vu(a,r,e),s=Vu(a,r,e-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}}(n)),n}var Uu=(e,t)=>{const n=Nu(e),r=Nu(t);if(!n||!r)return Iu(e,t);const i={...n};return e=>(i.red=ju(n.red,r.red,e),i.green=ju(n.green,r.green,e),i.blue=ju(n.blue,r.blue,e),i.alpha=Mu(n.alpha,r.alpha,e),El.transform(i))},Hu=new Set(["none","hidden"]);function $u(e,t){return n=>Mu(e,t,n)}function Wu(e){return"number"==typeof e?$u:"string"==typeof e?Ba(e)?Iu:Tl.test(e)?Uu:Qu:Array.isArray(e)?zu:"object"==typeof e?Tl.test(e)?Uu:qu:Iu}function zu(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>Wu(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function qu(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=Wu(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}var Qu=(e,t)=>{const n=jl.createTransformer(t),r=Dl(e),i=Dl(t);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?Hu.has(e)&&!i.values.length||Hu.has(t)&&!r.values.length?function(e,t){return Hu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Lu(zu(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]];r[o]=null!==(n=e.values[a])&&void 0!==n?n:0,i[s]++}return r}(r,i),i.values),n):(La(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Iu(e,t))};function Ku(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Mu(e,t,n):Wu(e)(e,t)}function Gu(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Da(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||Ku,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);t&&(n=Lu(Array.isArray(t)?t[s]||Pa:t,n)),r.push(n)}return r}(t,r,i),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Du(e[n],e[n+1],t);return s[n](r)};return n?t=>l($a(e[0],e[o-1],t)):l}function Yu(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Du(0,t,r);e.push(Mu(n,1,i))}}(t,e.length-1),t}function Xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ou):Ou(r),o={done:!1,value:t[0]},s=Gu(function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Yu(t),e),t,{ease:Array.isArray(i)?i:(a=t,l=i,a.map((()=>l||_u)).splice(0,a.length-1))});var a,l;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}var Zu=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Ca.update(t,!0),stop:()=>Aa(t),now:()=>Ra.isProcessing?Ra.timestamp:Jl.now()}},Ju={decay:mu,inertia:mu,tween:Xu,keyframes:Xu,spring:fu},ec=e=>e/100,tc=class extends tu{constructor(e){super(e),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:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||wl;this.resolver=new o(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=this.options,s=Ju[t]||Xu;let a,l;s!==Xu&&"number"!=typeof e[0]&&(a=Lu(ec,Ku(e[0],e[1])),e=[0,100]);const u=s({...this.options,keyframes:e});"mirror"===i&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(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:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.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,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-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,b=i;if(h){const e=Math.min(this.currentTime,u)/c;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(b=o)),y=$a(0,1,n)*c}const w=g?{done:!1,value:a[0]}:b.next(y);s&&(w.value=s(w.value));let{done:x}=w;g||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==r&&(w.value=Ea(a,this.options,r)),m&&m(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?fa(e.calculatedDuration):0}get time(){return fa(this.currentTime)}set time(e){e=pa(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=fa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=Zu,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();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 e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e: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:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}},nc=new Set(["opacity","clipPath","filter","transform"]),rc=e=>Array.isArray(e)&&"number"==typeof e[0];function ic(e){return Boolean(!e||"string"==typeof e&&e in sc||rc(e)||Array.isArray(e)&&e.every(ic))}var oc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,sc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:oc([0,.65,.55,1]),circOut:oc([.55,0,1,.45]),backIn:oc([.31,.01,.66,-.59]),backOut:oc([.33,1.53,.69,.99])};function ac(e){return lc(e)||sc.easeOut}function lc(e){return e?rc(e)?oc(e):Array.isArray(e)?e.map(ac):sc[e]:void 0}var uc=Xl((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));var cc=class extends tu{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new Yl(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){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||!ic(c.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(e,t){const n=new tc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[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"}}(e,u);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,i=c.times,o=c.ease,s="keyframes"}var c;const d=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=lc(a);return Array.isArray(c)&&(u.easing=c),e.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,e,{...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(Ea(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return fa(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return fa(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=pa(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Pa;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Pa}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...u}=this.options,c=new tc({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),d=pa(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;return uc()&&n&&nc.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}};var dc=Xl((()=>void 0!==window.ScrollTimeline)),hc=class{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map((t=>{if(!dc()||!t.attachTimeline)return t.pause(),function(e,t){let n;const r=()=>{const{currentTime:r}=t,i=(null===r?0:r.value)/100;n!==i&&e(i),n=i};return Ca.update(r,!0),()=>Aa(r)}((e=>{t.time=t.duration*e}),e);t.attachTimeline(e)}));return()=>{t.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}},pc=(e,t,n,r={},i,o,s)=>a=>{const l=ba(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c-=pa(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,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,...ya(e,d)}),d.duration&&(d.duration=pa(d.duration)),d.repeatDelay&&(d.repeatDelay=pa(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)),(_a||wa)&&(h=!0,d.duration=0,d.delay=0),h&&!o&&void 0!==t.get()){const e=Ea(d.keyframes,l);if(void 0!==e)return Ca.update((()=>{d.onUpdate(e),d.onComplete()})),new hc([])}return!o&&cc.supports(d)?new cc(d):new tc(d)},fc=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),mc=e=>ra(e)?e[e.length-1]||0:e;function vc(e,t){-1===e.indexOf(t)&&e.push(t)}function gc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}var yc=class{constructor(){this.subscriptions=[]}add(e){return vc(this.subscriptions,e),()=>gc(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},bc={current:void 0},wc=class{constructor(e,t={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Jl.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Jl.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new yc);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ca.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return bc.current&&bc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Jl.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return nu(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 xc(e,t){return new wc(e,t)}function _c(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xc(n))}var Sc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ec="data-"+Sc("framerAppearId");function Pc(e){return e.props[Ec]}function kc(e){return ha.has(e)?"transform":nc.has(e)?Sc(e):void 0}var Tc=class extends wc{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=kc(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(gc(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}},Cc=e=>Boolean(e&&e.getVelocity);function Ac(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new Tc("auto"),e.addValue("willChange",r)),i=r,Boolean(Cc(i)&&i.add)?r.add(t):void 0;var i}function Rc({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Oc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const t=e.getValue(d,null!==(o=e.latestValues[d])&&void 0!==o?o:null),r=l[d];if(void 0===r||c&&Rc(c,d))continue;const i={delay:n,...ba(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const t=Pc(e);if(t){const e=window.MotionHandoffAnimation(t,d,Ca);null!==e&&(i.startTime=e,a=!0)}}t.start(pc(d,t,r,e.shouldReduceMotion&&ha.has(d)?{type:!1}:i,e,a,Ac(e,d)));const h=t.animation;h&&u.push(h)}return a&&Promise.all(u).then((()=>{Ca.update((()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=la(e,t)||{};i={...i,...n};for(const o in i)_c(e,o,mc(i[o]))}(e,a)}))})),u}function Fc(e,t,n={}){var r;const i=la(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Oc(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Lc).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Fc(e,t,{...o,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function Lc(e,t){return e.sortNodePosition(t)}var Dc=[...ua].reverse(),Mc=ua.length;function Vc(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>Fc(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=Fc(e,t,n);else{const i="function"==typeof t?la(e,t,n.custom):t;r=Promise.all(Oc(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Ic(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!ia(t,e)}function jc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bc(){return{animate:jc(!0),whileInView:jc(),whileHover:jc(),whileTap:jc(),whileDrag:jc(),whileFocus:jc(),exit:jc()}}var Nc=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Uc=0,Hc={animation:{Feature:class extends Nc{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=Vc(e),n=Bc(),r=!0;const i=t=>(n,r)=>{var i;const o=la(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function o(o){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<Mc;t++){const h=Dc[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=oa(f),v=h===o?p.isActive:null;!1===v&&(d=t);let g=f===a[h]&&f!==s[h]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===v||!f&&!p.prevProp||na(f)||"boolean"==typeof f)continue;let y=Ic(p.prevProp,f)||h===o&&p.isActive&&!g&&m||t>d&&m,b=!1;const w=Array.isArray(f)?f:[f];let x=w.reduce(i(h),{});!1===v&&(x={});const{prevResolvedValues:_={}}=p,S={..._,...x},E=t=>{y=!0,u.has(t)&&(b=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=x[e],n=_[e];if(c.hasOwnProperty(e))continue;let r=!1;r=ra(t)&&ra(n)?!ia(t,n):t!==n,r?null!=t?E(e):u.add(e):void 0!==t&&u.has(e)?E(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=x,p.isActive&&(c={...c,...x}),r&&e.blockInitialAnimation&&(y=!1),!y||g&&!b||l.push(...w.map((e=>({animation:e,options:{type:h}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Bc(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();na(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Nc{constructor(){super(...arguments),this.id=Uc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},$c=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Wc(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}var zc=e=>t=>$c(t)&&e(t,Wc(t));function qc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Qc(e,t,n,r){return qc(e,t,zc(n),r)}var Kc=(e,t)=>Math.abs(e-t);var Gc=class{constructor(e,t,{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 e=Zc(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Kc(e.x,t.x),r=Kc(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Ra;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Yc(t,this.transformPagePoint),Ca.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Zc("pointercancel"===e.type?this.lastMoveEventInfo:Yc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!$c(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=Yc(Wc(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=Ra;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Zc(o,this.history)),this.removeListeners=Lu(Qc(this.contextWindow,"pointermove",this.handlePointerMove),Qc(this.contextWindow,"pointerup",this.handlePointerUp),Qc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Aa(this.updatePoint)}};function Yc(e,t){return t?{point:t(e.point)}:e}function Xc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zc({point:e},t){return{point:e,delta:Xc(e,ed(t)),offset:Xc(e,Jc(t)),velocity:td(t,.1)}}function Jc(e){return e[0]}function ed(e){return e[e.length-1]}function td(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ed(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>pa(t)));)n--;if(!r)return{x:0,y:0};const o=fa(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 nd(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}var rd=nd("dragHorizontal"),id=nd("dragVertical");function od(e){let t=!1;if("y"===e)t=id();else if("x"===e)t=rd();else{const e=rd(),n=id();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function sd(){const e=od(!0);return!e||(e(),!1)}function ad(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var ld=.9999,ud=1.0001,cd=-.01,dd=.01;function hd(e){return e.max-e.min}function pd(e,t,n,r=.5){e.origin=r,e.originPoint=Mu(t.min,t.max,e.origin),e.scale=hd(n)/hd(t),e.translate=Mu(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ld&&e.scale<=ud||isNaN(e.scale))&&(e.scale=1),(e.translate>=cd&&e.translate<=dd||isNaN(e.translate))&&(e.translate=0)}function fd(e,t,n,r){pd(e.x,t.x,n.x,r?r.originX:void 0),pd(e.y,t.y,n.y,r?r.originY:void 0)}function md(e,t,n){e.min=n.min+t.min,e.max=e.min+hd(t)}function vd(e,t,n){e.min=t.min-n.min,e.max=e.min+hd(t)}function gd(e,t,n){vd(e.x,t.x,n.x),vd(e.y,t.y,n.y)}function yd(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function bd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}var wd=.35;function xd(e,t,n){return{min:_d(e,t),max:_d(e,n)}}function _d(e,t){return"number"==typeof e?e:e[t]||0}var Sd=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Ed=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Pd(e){return[e("x"),e("y")]}function kd({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Td(e){return void 0===e||1===e}function Cd({scale:e,scaleX:t,scaleY:n}){return!Td(e)||!Td(t)||!Td(n)}function Ad(e){return Cd(e)||Rd(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Rd(e){return Od(e.x)||Od(e.y)}function Od(e){return e&&"0%"!==e}function Fd(e,t,n){return n+t*(e-n)}function Ld(e,t,n,r,i){return void 0!==i&&(e=Fd(e,i,r)),Fd(e,n,r)+t}function Dd(e,t=0,n=1,r,i){e.min=Ld(e.min,t,n,r,i),e.max=Ld(e.max,t,n,r,i)}function Md(e,{x:t,y:n}){Dd(e.x,t.translate,t.scale,t.originPoint),Dd(e.y,n.translate,n.scale,n.originPoint)}var Vd=.999999999999,Id=1.0000000000001;function jd(e,t){e.min=e.min+t,e.max=e.max+t}function Bd(e,t,n,r,i=.5){Dd(e,t,n,Mu(e.min,e.max,i),r)}function Nd(e,t){Bd(e.x,t.x,t.scaleX,t.scale,t.originX),Bd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ud(e,t){return kd(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var Hd=({current:e})=>e?e.ownerDocument.defaultView:null,$d=new WeakMap,Wd=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ed(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Gc(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Wc(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();if(r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=od(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),Pd((e=>{let t=this.getAxisMotionValue(e).get()||0;if(el.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=hd(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&Ca.postRender((()=>o(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=Ac(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Pd((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Hd(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Ca.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!zd(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Mu(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Mu(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&ad(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:yd(e.x,n,i),y:yd(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=wd){return!1===e?e=0:!0===e&&(e=wd),{x:xd(e,"left","right"),y:xd(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Pd((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ad(e))return!1;const n=e.current;Da(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Ud(e,n),{scroll:i}=t;return i&&(jd(r.x,i.offset.x),jd(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:bd(e.x,t.x),y:bd(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=kd(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Pd((s=>{if(!zd(s,t,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?e[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(e,t){const n=this.getAxisMotionValue(e);return n.start(pc(e,n,0,t,this.visualElement,!1,Ac(this.visualElement,e)))}stopAnimation(){Pd((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Pd((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Pd((t=>{const{drag:n}=this.getProps();if(!zd(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-Mu(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ad(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Pd((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=hd(e),i=hd(t);return i>r?n=Du(t.min,t.max-r,e.min):r>i&&(n=Du(e.min,e.max-i,t.min)),$a(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Pd((t=>{if(!zd(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(Mu(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;$d.set(this.visualElement,this);const e=Qc(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();ad(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Ca.read(t);const i=qc(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Pd((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=wd,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}};function zd(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var qd=e=>(t,n)=>{e&&Ca.postRender((()=>e(t,n)))},Qd=Z(null);var Kd=Z({}),Gd=Z({}),Yd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Xd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Zd={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!tl.test(e))return e;e=parseFloat(e)}return`${Xd(e,t.target.x)}% ${Xd(e,t.target.y)}%`}},Jd={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=jl.parse(e);if(i.length>5)return r;const o=jl.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=Mu(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}},eh={};var{schedule:th,cancel:nh}=Ta(queueMicrotask,!1),rh=class extends F{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var o;o=oh,Object.assign(eh,o),i&&(t.group&&t.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()})),Yd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Ca.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),th.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function ih(e){const[t,n]=function(){const e=Lt(Qd);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=Vt();Tt((()=>r(i)),[]);const o=Ft((()=>n&&n(i)),[i,n]);return!t&&n?[!1,o]:[!0]}(),r=Lt(Kd);return Fr(rh,{...e,layoutGroup:r,switchLayoutGroup:Lt(Gd),isPresent:t,safeToRemove:n})}var oh={borderRadius:{...Zd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zd,borderTopRightRadius:Zd,borderBottomLeftRadius:Zd,borderBottomRightRadius:Zd,boxShadow:Jd},sh=["TopLeft","TopRight","BottomLeft","BottomRight"],ah=sh.length,lh=e=>"string"==typeof e?parseFloat(e):e,uh=e=>"number"==typeof e||tl.test(e);function ch(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var dh=ph(0,.5,ku),hh=ph(.5,.95,Pa);function ph(e,t,n){return r=>r<e?0:r>t?1:n(Du(e,t,r))}function fh(e,t){e.min=t.min,e.max=t.max}function mh(e,t){fh(e.x,t.x),fh(e.y,t.y)}function vh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function gh(e,t,n,r,i){return e=Fd(e-=t,1/n,r),void 0!==i&&(e=Fd(e,1/i,r)),e}function yh(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(el.test(t)&&(t=parseFloat(t),t=Mu(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=Mu(o.min,o.max,r);e===o&&(a-=t),e.min=gh(e.min,t,n,a,i),e.max=gh(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}var bh=["x","scaleX","originX"],wh=["y","scaleY","originY"];function xh(e,t,n,r){yh(e.x,t,bh,n?n.x:void 0,r?r.x:void 0),yh(e.y,t,wh,n?n.y:void 0,r?r.y:void 0)}function _h(e){return 0===e.translate&&1===e.scale}function Sh(e){return _h(e.x)&&_h(e.y)}function Eh(e,t){return e.min===t.min&&e.max===t.max}function Ph(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kh(e,t){return Ph(e.x,t.x)&&Ph(e.y,t.y)}function Th(e){return hd(e.x)/hd(e.y)}function Ch(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ah=class{constructor(){this.members=[]}add(e){vc(this.members,e),e.scheduleRender()}remove(e){if(gc(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};var Rh=(e,t)=>e.depth-t.depth,Oh=class{constructor(){this.children=[],this.isDirty=!1}add(e){vc(this.children,e),this.isDirty=!0}remove(e){gc(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Rh),this.isDirty=!1,this.children.forEach(e)}};function Fh(e){const t=Cc(e)?e.get():e;return fc(t)?t.toValue():t}var Lh={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Dh="undefined"!=typeof window&&void 0!==window.MotionDebug,Mh=["","X","Y","Z"],Vh={visibility:"hidden"},Ih=0;function jh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Bh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Pc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ca,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Bh(r)}function Nh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Ih++,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,Dh&&(Lh.totalNodes=Lh.resolvedTargetDeltas=Lh.recalculatedProjection=0),this.nodes.forEach($h),this.nodes.forEach(Yh),this.nodes.forEach(Xh),this.nodes.forEach(Wh),Dh&&window.MotionDebug.record(Lh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Oh)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new yc),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Jl.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Aa(r),e(o-t))};return Ca.read(r,!0),()=>Aa(r)}(r,250),Yd.hasAnimatedSinceResize&&(Yd.hasAnimatedSinceResize=!1,this.nodes.forEach(Gh))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||rp,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!kh(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...ba(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Gh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Aa(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(Zh),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(qh);this.isUpdating||this.nodes.forEach(Qh),this.isUpdating=!1,this.nodes.forEach(Kh),this.nodes.forEach(Uh),this.nodes.forEach(Hh),this.clearAllSnapshots();const e=Jl.now();Ra.delta=$a(0,1e3/60,e-Ra.timestamp),Ra.timestamp=e,Ra.isProcessing=!0,Oa.update.process(Ra),Oa.preRender.process(Ra),Oa.render.process(Ra),Ra.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,th.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zh),this.sharedNodes.forEach(Jh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ca.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ca.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 e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ed(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Sh(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||Ad(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),sp((r=n).x),sp(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return Ed();const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(lp)){const{scroll:e}=this.root;e&&(jd(n.x,e.offset.x),jd(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=Ed();if(mh(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&mh(n,e),jd(n.x,i.offset.x),jd(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n=Ed();mh(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Nd(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Ad(e.latestValues)&&Nd(n,e.latestValues)}return Ad(this.latestValues)&&Nd(n,this.latestValues),n}removeTransform(e){const t=Ed();mh(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Ad(e.latestValues))continue;Cd(e.latestValues)&&e.updateSnapshot();const r=Ed();mh(r,e.measurePageBox()),xh(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Ad(this.latestValues)&&xh(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.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!==Ra.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;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(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=Ra.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ed(),this.relativeTargetOrigin=Ed(),gd(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),mh(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Ed(),this.targetWithTransforms=Ed()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,md(s.x,a.x,l.x),md(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):mh(this.target,this.layout.layoutBox),Md(this.target,this.targetDelta)):mh(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ed(),this.relativeTargetOrigin=Ed(),gd(this.relativeTargetOrigin,this.target,e.target),mh(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Dh&&Lh.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Cd(this.parent.latestValues)&&!Rd(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 e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Ra.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;mh(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.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&&Nd(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Md(e,s)),r&&Ad(o.latestValues)&&Nd(e,o.latestValues))}t.x<Id&&t.x>Vd&&(t.x=1),t.y<Id&&t.y>Vd&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=Ed());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(vh(this.prevProjectionDelta.x,this.projectionDelta.x),vh(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),fd(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Ch(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ch(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Dh&&Lh.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sd(),this.projectionDelta=Sd(),this.projectionDeltaWithTransform=Sd()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=Sd();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=Ed(),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(np));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;ep(o.x,e.x,n),ep(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gd(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){tp(e.x,t.x,n.x,r),tp(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return Eh(e.x,t.x)&&Eh(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=Ed()),mh(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=Mu(0,void 0!==n.opacity?n.opacity:1,dh(r)),e.opacityExit=Mu(void 0!==t.opacity?t.opacity:1,0,hh(r))):o&&(e.opacity=Mu(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<ah;s++){const i=`border${sh[s]}Radius`;let o=ch(t,i),a=ch(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||uh(o)===uh(a)?(e[i]=Math.max(Mu(lh(o),lh(a),r),0),(el.test(a)||el.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=Mu(t.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(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Aa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ca.update((()=>{Yd.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Cc(e)?e:xc(e);return r.start(pc("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.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 e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ap(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Ed();const t=hd(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=hd(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mh(t,n),Nd(t,i),fd(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ah),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&jh("z",e,r,this.animationValues);for(let i=0;i<Mh.length;i++)jh(`rotate${Mh[i]}`,e,r,this.animationValues),jh(`skew${Mh[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Vh;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Fh(null==e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Fh(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Ad(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.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!==(t=s.opacity)&&void 0!==t?t: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 eh){if(void 0===s[u])continue;const{correct:e,applyTo:t}=eh[u],n="none"===r.transform?s[u]:e(s[u],o);if(t){const e=t.length;for(let i=0;i<e;i++)r[t[i]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=o===this?Fh(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(qh),this.root.sharedNodes.clear()}}}function Uh(e){e.updateLayout()}function Hh(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?Pd((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=hd(r);r.min=t[e].min,r.max=r.min+i})):ap(i,n.layoutBox,t)&&Pd((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=hd(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=Sd();fd(s,t,n.layoutBox);const a=Sd();o?fd(a,e.applyTransform(r,!0),n.measuredBox):fd(a,t,n.layoutBox);const l=!Sh(s);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=Ed();gd(s,n.layoutBox,i.layoutBox);const a=Ed();gd(a,t,o.layoutBox),kh(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function $h(e){Dh&&Lh.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Wh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zh(e){e.clearSnapshot()}function qh(e){e.clearMeasurements()}function Qh(e){e.isLayoutDirty=!1}function Kh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yh(e){e.resolveTargetDelta()}function Xh(e){e.calcProjection()}function Zh(e){e.resetSkewAndRotation()}function Jh(e){e.removeLeadSnapshot()}function ep(e,t,n){e.translate=Mu(t.translate,0,n),e.scale=Mu(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function tp(e,t,n,r){e.min=Mu(t.min,n.min,r),e.max=Mu(t.max,n.max,r)}function np(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var rp={duration:.45,ease:[.4,0,.1,1]},ip=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),op=ip("applewebkit/")&&!ip("chrome/")?Math.round:Pa;function sp(e){e.min=op(e.min),e.max=op(e.max)}function ap(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Th(t),i=Th(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function lp(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}var up=Nh({attachResizeListener:(e,t)=>qc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cp={current:void 0},dp=Nh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cp.current){const e=new up({});e.mount(window),e.setOptions({layoutScroll:!0}),cp.current=e}return cp.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),hp={pan:{Feature:class extends Nc{constructor(){super(...arguments),this.removePointerDownListener=Pa}onPointerDown(e){this.session=new Gc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hd(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:qd(e),onStart:qd(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ca.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Qc(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Nc{constructor(e){super(e),this.removeGroupControls=Pa,this.removeListeners=Pa,this.controls=new Wd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pa}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:dp,MeasureLayout:ih}};function pp(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Qc(e.current,n,((n,i)=>{if("touch"===n.pointerType||sd())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[r];s&&Ca.postRender((()=>s(n,i)))}),{passive:!e.getProps()[r]})}var fp=(e,t)=>!!t&&(e===t||fp(e,t.parentElement));function mp(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Wc(n))}var vp=new WeakMap,gp=new WeakMap,yp=e=>{const t=vp.get(e.target);t&&t(e)},bp=e=>{e.forEach(yp)};function wp(e,t,n){const r=function({root:e,...t}){const n=e||document;gp.has(n)||gp.set(n,{});const r=gp.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(bp,{root:e,...t})),r[i]}(t);return vp.set(e,n),r.observe(e),()=>{vp.delete(e),r.unobserve(e)}}var xp={some:0,all:1};var _p={inView:{Feature:class extends Nc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:xp[r]};return wp(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Nc{constructor(){super(...arguments),this.removeStartListeners=Pa,this.removeEndListeners=Pa,this.removeAccessibleListeners=Pa,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Qc(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||fp(this.node.current,e.target)?n:r;o&&Ca.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),i=Qc(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Lu(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=qc(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=qc(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&mp("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Ca.postRender((()=>n(e,t)))}))})),mp("down",((e,t)=>{this.startPress(e,t)}))})),t=qc(this.node.current,"blur",(()=>{this.isPressing&&mp("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Lu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ca.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!sd()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ca.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Qc(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=qc(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Lu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Nc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(ex){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Lu(qc(this.node.current,"focus",(()=>this.onFocus())),qc(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Nc{mount(){this.unmount=Lu(pp(this.node,!0),pp(this.node,!1))}unmount(){}}}},Sp={layout:{ProjectionNode:dp,MeasureLayout:ih}},Ep=Z({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Pp=Z({}),kp="undefined"!=typeof window,Tp=kp?Ct:Tt,Cp=Z({strict:!1}),Ap=!1;function Rp(e,t,n,r,i){var o;const{visualElement:s}=Lt(Pp),a=Lt(Cp),l=Lt(Qd),u=Lt(Ep).reducedMotion,c=At();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const d=c.current,h=Lt(Gd);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fp(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&ad(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,h),zn((()=>{d&&d.update(n,l)}));const p=n[Ec],f=At(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return Tp((()=>{d&&(d.updateFeatures(),th.render(d.render),f.current&&d.animationState&&d.animationState.animateChanges())})),Tt((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current=!1,Ap||(Ap=!0,queueMicrotask(Op)))})),d}function Op(){window.MotionHandoffIsComplete=!0}function Fp(e){if(e)return!1!==e.options.allowProjection?e.projection:Fp(e.parent)}function Lp(e,t,n){return Ft((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):ad(n)&&(n.current=r))}),[t])}function Dp(e){return na(e.animate)||ca.some((t=>oa(e[t])))}function Mp(e){return Boolean(Dp(e)||e.variants)}function Vp(e){const{initial:t,animate:n}=function(e,t){if(Dp(e)){const{initial:t,animate:n}=e;return{initial:!1===t||oa(t)?t:void 0,animate:oa(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Lt(Pp));return Ot((()=>({initial:t,animate:n})),[Ip(t),Ip(n)])}function Ip(e){return Array.isArray(e)?e.join(" "):e}var jp={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"]},Bp={};for(const y_ in jp)Bp[y_]={isEnabled:e=>jp[y_].some((t=>!!e[t]))};var Np=Symbol.for("motionComponentSymbol");function Up({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)Bp[t]={...Bp[t],...e[t]}}(e);const o=Xt((function(e,o){let s;const a={...Lt(Ep),...e,layoutId:Hp(e)},{isStatic:l}=a,u=Vp(e),c=r(e,l);if(!l&&kp){Lt(Cp).strict;const e=function(e){const{drag:t,layout:n}=Bp;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);s=e.MeasureLayout,u.visualElement=Rp(i,c,a,t,e.ProjectionNode)}return Fr(Pp.Provider,{value:u,children:[s&&u.visualElement?Fr(s,{visualElement:u.visualElement,...a}):null,n(i,e,Lp(c,u.visualElement,o),c,l,u.visualElement)]})}));return o[Np]=i,o}function Hp({layoutId:e}){const t=Lt(Kd).id;return t&&void 0!==e?t+"-"+e:e}var $p=["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 Wp(e){return"string"==typeof e&&!e.includes("-")&&!!($p.indexOf(e)>-1||/[A-Z]/u.test(e))}function zp(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}var qp=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 Qp(e,t,n,r){zp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(qp.has(i)?i:Sc(i),t.attrs[i])}function Kp(e,{layout:t,layoutId:n}){return ha.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!eh[e]||"opacity"===e)}function Gp(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Cc(i[s])||t.style&&Cc(t.style[s])||Kp(s,e)||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 Yp(e,t,n){const r=Gp(e,t,n);for(const i in e)if(Cc(e[i])||Cc(t[i])){r[-1!==da.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}function Xp(e){const t=At(null);return null===t.current&&(t.current=e()),t.current}var Zp=e=>(t,n)=>{const r=Lt(Pp),i=Lt(Qd),o=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,s,a){const l={latestValues:tf(i,o,s,!a&&e,t),renderState:n()};return r&&(l.mount=e=>r(i,e,l)),l}(e,t,r,i,n);return n?o():Xp(o)};function Jp(e,t){const n=kc(t);n&&vc(e,n)}function ef(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const t=aa(e,r[i]);if(t){const{transitionEnd:e,transition:r,...i}=t;n(i,e)}}}function tf(e,t,n,r,i){var o;const s={},a=[],l=r&&void 0===(null===(o=e.style)||void 0===o?void 0:o.willChange),u=i(e,{});for(const v in u)s[v]=Fh(u[v]);let{initial:c,animate:d}=e;const h=Dp(e),p=Mp(e);t&&p&&!h&&!1!==e.inherit&&(void 0===c&&(c=t.initial),void 0===d&&(d=t.animate));let f=!!n&&!1===n.initial;f=f||!1===c;const m=f?d:c;return m&&"boolean"!=typeof m&&!na(m)&&ef(e,m,((e,t)=>{for(const n in e){let t=e[n];if(Array.isArray(t)){t=t[f?t.length-1:0]}null!==t&&(s[n]=t)}for(const n in t)s[n]=t[n]})),l&&(d&&!1!==c&&!na(d)&&ef(e,d,(e=>{for(const t in e)Jp(a,t)})),a.length&&(s.willChange=a.join(","))),s}var nf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),rf=()=>({...nf(),attrs:{}}),of=(e,t)=>t&&"number"==typeof e?t.transform(e):e,sf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},af=da.length;function lf(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(ha.has(l))s=!0;else if(Ia(l))i[l]=e;else{const t=of(e,Wl[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<af;o++){const s=da[o],a=e[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 e=of(a,Wl[s]);l||(i=!1,r+=`${sf[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function uf(e,t,n){return"string"==typeof e?e:tl.transform(t+n*e)}var cf={offset:"stroke-dashoffset",array:"stroke-dasharray"},df={offset:"strokeDashoffset",array:"strokeDasharray"};function hf(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(lf(e,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${uf(t,e.x,e.width)} ${uf(n,e.y,e.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?cf:df;e[o.offset]=tl.transform(-r);const s=tl.transform(t),a=tl.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}var pf=e=>"string"==typeof e&&"svg"===e.toLowerCase(),ff={useVisualState:Zp({scrapeMotionValuesFromProps:Yp,createRenderState:rf,onMount:(e,t,{renderState:n,latestValues:r})=>{Ca.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(ex){n.dimensions={x:0,y:0,width:0,height:0}}})),Ca.render((()=>{hf(n,r,pf(t.tagName),e.transformTemplate),Qp(t,n)}))}})},mf={useVisualState:Zp({applyWillChange:!0,scrapeMotionValuesFromProps:Gp,createRenderState:nf})};function vf(e,t,n){for(const r in t)Cc(t[r])||Kp(r,n)||(e[r]=t[r])}function gf(e,t){const n={};return vf(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return Ot((()=>{const n=nf();return lf(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function yf(e,t){const n={},r=gf(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var bf=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 wf(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bf.has(e)}var xf,_f,Sf=e=>!wf(e);try{(xf=(no(),_f=to,v.call(_f,"module.exports")?_f["module.exports"]:w(h({},"__esModule",{value:!0}),_f)).default)&&(Sf=e=>e.startsWith("on")?!wf(e):xf(e))}catch(g_){}function Ef(e,t,n,r){const i=Ot((()=>{const n=rf();return hf(n,t,pf(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};vf(t,e.style,e),i.style={...t,...i.style}}return i}function Pf(e=!1){return(t,n,r,{latestValues:i},o)=>{const s=(Wp(t)?Ef:yf)(n,i,o,t),a=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Sf(i)||!0===n&&wf(i)||!t&&!wf(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==O?{...a,...s,ref:r}:{},{children:u}=n;return C(t,{...l,children:Ot((()=>Cc(u)?u.get():u),[u])})}}function kf(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Up({...Wp(n)?ff:mf,preloadedFeatures:e,useRender:Pf(r),createVisualElement:t,Component:n})}}var Tf={current:null},Cf={current:!1};var Af=new WeakMap,Rf=[...pl,Tl,jl],Of=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ff=ca.length,Lf=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,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=wl,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,Ca.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Dp(t),this.isVariantNode=Mp(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in c){const e=c[d];void 0!==a[d]&&Cc(e)&&e.set(a[d],!1)}}mount(e){this.current=e,Af.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Cf.current||function(){if(Cf.current=!0,kp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tf.current=e.matches;e.addListener(t),t()}else Tf.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Tf.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Af.delete(this.current),this.projection&&this.projection.unmount(),Aa(this.notifyUpdate),Aa(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=ha.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Ca.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Bp){const t=Bp[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ed()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Of.length;n++){const t=Of[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Cc(i))e.addValue(r,i);else if(Cc(o))e.addValue(r,xc(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,xc(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<Ff;n++){const e=ca[n],r=this.props[e];(oa(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=xc(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Ma(r)||Fa(r))?r=parseFloat(r):!(e=>Rf.find(hl(e)))(r)&&jl.test(t)&&(r=Ql(e,t)),this.setBaseTarget(e,Cc(r)?r.get():r)),Cc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=aa(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Cc(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new yc),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},Df=class extends Lf{constructor(){super(...arguments),this.KeyframeResolver=Yl}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}};var Mf=class extends Df{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=zp}readValueFromInstance(e,t){if(ha.has(t)){const e=ql(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(Ia(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ud(e,t)}build(e,t,n){lf(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Gp(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Cc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}},Vf=class extends Df{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ed}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ha.has(t)){const e=ql(t);return e&&e.default||0}return t=qp.has(t)?t:Sc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Yp(e,t,n)}build(e,t,n){hf(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Qp(e,t,0,r)}mount(e){this.isSVGTag=pf(e.tagName),super.mount(e)}},If=ta(kf({...Hc,..._p,...hp,...Sp},((e,t)=>Wp(e)?new Vf(t):new Mf(t,{allowProjection:e!==O})))),jf=class extends F{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function Bf({children:e,isPresent:t}){const n=Vt(),r=At(null),i=At({width:0,height:0,top:0,left:0}),{nonce:o}=Lt(Ep);return zn((()=>{const{width:e,height:s,top:a,left:l}=i.current;if(t||!r.current||!e||!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: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),Fr(jf,{isPresent:t,childRef:r,sizeRef:i,children:Vn(e,{ref:r})})}var Nf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Xp(Uf),l=Vt(),u=Ot((()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{a.set(e,!0);for(const t of a.values())if(!t)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),o?[Math.random()]:[n]);return Ot((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),Tt((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=Fr(Bf,{isPresent:n,children:e})),Fr(Qd.Provider,{value:u,children:e})};function Uf(){return new Map}var Hf=e=>e.key||"";function $f(e){const t=[];return Jt.forEach(e,(e=>{Ln(e)&&t.push(e)})),t}var Wf=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Da(!t,"Replace exitBeforeEnter with mode='wait'");const a=Ot((()=>$f(e)),[e]),l=a.map(Hf),u=At(!0),c=At(a),d=Xp((()=>new Map)),[h,p]=Pt(a),[f,m]=Pt(a);Tp((()=>{u.current=!1,c.current=a;for(let e=0;e<f.length;e++){const t=Hf(f[e]);l.includes(t)?d.delete(t):!0!==d.get(t)&&d.set(t,!1)}}),[f,l.length,l.join("-")]);const v=[];if(a!==h){let e=[...a];for(let t=0;t<f.length;t++){const n=f[t],r=Hf(n);l.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===s&&v.length&&(e=v),m($f(e)),void p(a)}const{forceRender:g}=Lt(Kd);return Fr(O,{children:f.map((e=>{const t=Hf(e),h=a===f||l.includes(t);return Fr(Nf,{isPresent:h,initial:!(u.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:h?void 0:()=>{if(!d.has(t))return;d.set(t,!0);let e=!0;d.forEach((t=>{t||(e=!1)})),e&&(null==g||g(),m(c.current),i&&i())},children:e},t)}))})},zf=e=>"checkbox"===e.type,qf=e=>e instanceof Date,Qf=e=>null==e,Kf=e=>"object"==typeof e,Gf=e=>!Qf(e)&&!Array.isArray(e)&&Kf(e)&&!qf(e),Yf=e=>Gf(e)&&e.target?zf(e.target)?e.target.checked:e.target.value:e,Xf=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Zf=e=>{const t=e.constructor&&e.constructor.prototype;return Gf(t)&&t.hasOwnProperty("isPrototypeOf")},Jf="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function em(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(Jf&&(e instanceof Blob||e instanceof FileList)||!n&&!Gf(e))return e;if(t=n?[]:{},n||Zf(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=em(e[n]));else t=e}return t}var tm=e=>Array.isArray(e)?e.filter(Boolean):[],nm=e=>void 0===e,rm=(e,t,n)=>{if(!t||!Gf(e))return n;const r=tm(t.split(/[,[\].]+?/)).reduce(((e,t)=>Qf(e)?e:e[t]),e);return nm(r)||r===e?nm(e[t])?n:e[t]:r},im=e=>"boolean"==typeof e,om=e=>/^\w*$/.test(e),sm=e=>tm(e.replace(/["|']|\]/g,"").split(/\.|\[/)),am=(e,t,n)=>{let r=-1;const i=om(t)?[t]:sm(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=Gf(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t)return;e[t]=o,e=e[t]}return e},lm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},um={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},cm="max",dm="min",hm="maxLength",pm="minLength",fm="pattern",mm="required",vm="validate",gm=Gn.createContext(null),ym=()=>Gn.useContext(gm),bm=e=>{const{children:t,...n}=e;return Gn.createElement(gm.Provider,{value:n},t)},wm=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==um.all&&(t._proxyFormState[i]=!r||um.all),n&&(n[i]=!0),e[i]}});return i},xm=e=>Gf(e)&&!Object.keys(e).length,_m=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return xm(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||um.all)))},Sm=e=>Array.isArray(e)?e:[e],Em=(e,t,n)=>!e||!t||e===t||Sm(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function Pm(e){const t=Gn.useRef(e);t.current=e,Gn.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var km=e=>"string"==typeof e,Tm=(e,t,n,r,i)=>km(e)?(r&&t.watch.add(e),rm(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),rm(n,e)))):(r&&(t.watchAll=!0),n);function Cm(e){const t=ym(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=Xf(i._names.array,n),a=function(e){const t=ym(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},a=Gn.useRef(r);a.current=r,Pm({disabled:o,subject:n._subjects.values,next:e=>{Em(a.current,e.name,s)&&u(em(Tm(a.current,n._names,e.values||n._formValues,!1,i)))}});const[l,u]=Gn.useState(n._getWatch(r,i));return Gn.useEffect((()=>n._removeUnmounted())),l}({control:i,name:n,defaultValue:rm(i._formValues,n,rm(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=ym(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,a]=Gn.useState(n._formState),l=Gn.useRef(!0),u=Gn.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Gn.useRef(i);return c.current=i,Pm({disabled:r,next:e=>l.current&&Em(c.current,e.name,o)&&_m(e,u.current,n._updateFormState)&&a({...n._formState,...e}),subject:n._subjects.state}),Gn.useEffect((()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1})),[n]),wm(s,n,u.current,!1)}({control:i,name:n,exact:!0}),u=Gn.useRef(i.register(n,{...e.rules,value:a,...im(e.disabled)?{disabled:e.disabled}:{}}));return Gn.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=rm(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=em(rm(i._options.defaultValues,n));am(i._defaultValues,n,e),nm(rm(i._formValues,n))&&am(i._formValues,n,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}}),[n,i,s,o]),Gn.useEffect((()=>{rm(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:rm(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:a,...im(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Gn.useCallback((e=>u.current.onChange({target:{value:Yf(e),name:n},type:lm.CHANGE})),[n]),onBlur:Gn.useCallback((()=>u.current.onBlur({target:{value:rm(i._formValues,n),name:n},type:lm.BLUR})),[n,i]),ref:Gn.useCallback((e=>{const t=rm(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!rm(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!rm(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!rm(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!rm(l.validatingFields,n)},error:{enumerable:!0,get:()=>rm(l.errors,n)}})}}var Am=e=>e.render(Cm(e)),Rm=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Om=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},Fm=(e,t,n={})=>n.shouldFocus||nm(n.shouldFocus)?n.focusName||`${e}.${nm(n.focusIndex)?t:n.focusIndex}.`:"",Lm=e=>({isOnSubmit:!e||e===um.onSubmit,isOnBlur:e===um.onBlur,isOnChange:e===um.onChange,isOnAll:e===um.all,isOnTouch:e===um.onTouched}),Dm=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Mm=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=rm(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Mm(o,t))break}else if(Gf(o)&&Mm(o,t))break}}},Vm=(e,t,n)=>{const r=Sm(rm(e,n));return am(r,"root",t[n]),am(e,n,r),e},Im=e=>"file"===e.type,jm=e=>"function"==typeof e,Bm=e=>{if(!Jf)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Nm=e=>km(e),Um=e=>"radio"===e.type,Hm=e=>e instanceof RegExp,$m={value:!1,isValid:!1},Wm={value:!0,isValid:!0},zm=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!nm(e[0].attributes.value)?nm(e[0].value)||""===e[0].value?Wm:{value:e[0].value,isValid:!0}:Wm:$m}return $m},qm={isValid:!1,value:null},Qm=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),qm):qm;function Km(e,t,n="validate"){if(Nm(e)||Array.isArray(e)&&e.every(Nm)||im(e)&&!e)return{type:n,message:Nm(e)?e:"",ref:t}}var Gm=e=>Gf(e)&&!Hm(e)?e:{value:e,message:""},Ym=async(e,t,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}=e._f,y=rm(t,f);if(!v||g)return{};const b=s?s[0]:o,w=e=>{r&&b.reportValidity&&(b.setCustomValidity(im(e)?"":e||""),b.reportValidity())},x={},_=Um(o),S=zf(o),E=_||S,P=(m||Im(o))&&nm(o.value)&&nm(y)||Bm(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,k=Rm.bind(null,f,n,x),T=(e,t,n,r=hm,i=pm)=>{const s=e?t:n;x[f]={type:e?r:i,message:s,ref:o,...k(e?r:i,s)}};if(i?!Array.isArray(y)||!y.length:a&&(!E&&(P||Qf(y))||im(y)&&!y||S&&!zm(s).isValid||_&&!Qm(s).isValid)){const{value:e,message:t}=Nm(a)?{value:!!a,message:a}:Gm(a);if(e&&(x[f]={type:mm,message:t,ref:b,...k(mm,t)},!n))return w(t),x}if(!(P||Qf(c)&&Qf(d))){let e,t;const r=Gm(d),i=Gm(c);if(Qf(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;km(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),km(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);Qf(r.value)||(e=n>r.value),Qf(i.value)||(t=n<i.value)}if((e||t)&&(T(!!e,r.message,i.message,cm,dm),!n))return w(x[f].message),x}if((l||u)&&!P&&(km(y)||i&&Array.isArray(y))){const e=Gm(l),t=Gm(u),r=!Qf(e.value)&&y.length>+e.value,i=!Qf(t.value)&&y.length<+t.value;if((r||i)&&(T(r,e.message,t.message),!n))return w(x[f].message),x}if(h&&!P&&km(y)){const{value:e,message:t}=Gm(h);if(Hm(e)&&!y.match(e)&&(x[f]={type:fm,message:t,ref:o,...k(fm,t)},!n))return w(t),x}if(p)if(jm(p)){const e=Km(await p(y,t),b);if(e&&(x[f]={...e,...k(vm,e.message)},!n))return w(e.message),x}else if(Gf(p)){let e={};for(const r in p){if(!xm(e)&&!n)break;const i=Km(await p[r](y,t),b,r);i&&(e={...i,...k(r,i.message)},w(i.message),n&&(x[f]=e))}if(!xm(e)&&(x[f]={ref:b,...e},!n))return x}return w(!0),x},Xm=(e,t)=>[...e,...Sm(t)],Zm=e=>Array.isArray(e)?e.map((()=>{})):void 0;function Jm(e,t,n){return[...e.slice(0,t),...Sm(n),...e.slice(t)]}var ev=(e,t,n)=>Array.isArray(e)?(nm(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],tv=(e,t)=>[...Sm(t),...Sm(e)];var nv=(e,t)=>nm(t)?[]:function(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return tm(r).length?r:[]}(e,Sm(t).sort(((e,t)=>e-t))),rv=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function iv(e,t){const n=Array.isArray(t)?t:om(t)?[t]:sm(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=nm(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(Gf(r)&&xm(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!nm(e[t]))return!1;return!0}(r))&&iv(e,n.slice(0,-1)),e}var ov=(e,t,n)=>(e[t]=n,e);var sv=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},av=e=>Qf(e)||!Kf(e);function lv(e,t){if(av(e)||av(t))return e===t;if(qf(e)&&qf(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(qf(n)&&qf(e)||Gf(n)&&Gf(e)||Array.isArray(n)&&Array.isArray(e)?!lv(n,e):n!==e)return!1}}return!0}var uv=e=>"select-multiple"===e.type,cv=e=>Um(e)||zf(e),dv=e=>Bm(e)&&e.isConnected,hv=e=>{for(const t in e)if(jm(e[t]))return!0;return!1};function pv(e,t={}){const n=Array.isArray(e);if(Gf(e)||n)for(const r in e)Array.isArray(e[r])||Gf(e[r])&&!hv(e[r])?(t[r]=Array.isArray(e[r])?[]:{},pv(e[r],t[r])):Qf(e[r])||(t[r]=!0);return t}function fv(e,t,n){const r=Array.isArray(e);if(Gf(e)||r)for(const i in e)Array.isArray(e[i])||Gf(e[i])&&!hv(e[i])?nm(t)||av(n[i])?n[i]=Array.isArray(e[i])?pv(e[i],[]):{...pv(e[i])}:fv(e[i],Qf(t)?{}:t[i],n[i]):n[i]=!lv(e[i],t[i]);return n}var mv=(e,t)=>fv(e,t,pv(t)),vv=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>nm(e)?e:t?""===e?NaN:e?+e:e:n&&km(e)?new Date(e):r?r(e):e;function gv(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Im(t)?t.files:Um(t)?Qm(e.refs).value:uv(t)?[...t.selectedOptions].map((({value:e})=>e)):zf(t)?zm(e.refs).value:vv(nm(t.value)?e.ref.value:t.value,e)}var yv=(e,t,n,r)=>{const i={};for(const o of e){const e=rm(t,o);e&&am(i,o,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},bv=e=>nm(e)?e:Hm(e)?e.source:Gf(e)?Hm(e.value)?e.value.source:e.value:e,wv="AsyncFunction",xv=e=>!(e&&e.validate||!(jm(e.validate)&&e.validate.constructor.name===wv||Gf(e.validate)&&Object.values(e.validate).find((e=>e.constructor.name===wv)))),_v=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Sv(e,t,n){const r=rm(e,n);if(r||om(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=rm(t,r),s=rm(e,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 Ev=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),Pv=(e,t)=>!tm(rm(e,t)).length&&iv(e,t),kv={mode:um.onSubmit,reValidateMode:um.onChange,shouldFocusError:!0};function Tv(e={}){let t,n={...kv,...e},r={submitCount:0,isDirty:!1,isLoading:jm(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(Gf(n.defaultValues)||Gf(n.values))&&em(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:em(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:sv(),array:sv(),state:sv()},h=Lm(n.mode),p=Lm(n.reValidateMode),f=n.criteriaMode===um.all,m=async e=>{if(c.isValid||e){const e=n.resolver?xm((await w()).errors):await x(i,!0);e!==r.isValid&&d.state.next({isValid:e})}},v=(e,t)=>{(c.isValidating||c.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?am(r.validatingFields,e,t):iv(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!xm(r.validatingFields)}))},g=(e,t,n,r)=>{const l=rm(i,e);if(l){const i=rm(s,e,nm(n)?rm(o,e):n);nm(i)||r&&r.defaultChecked||t?am(s,e,t?i:gv(l._f)):E(e,i),a.mount&&m()}},y=(e,t,n,s,a)=>{let l=!1,u=!1;const h={name:e},p=!!(rm(i,e)&&rm(i,e)._f&&rm(i,e)._f.disabled);if(!n||s){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=_(),l=u!==h.isDirty);const n=p||lv(rm(o,e),t);u=!(p||!rm(r.dirtyFields,e)),n||p?iv(r.dirtyFields,e):am(r.dirtyFields,e,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!n}if(n){const t=rm(r.touchedFields,e);t||(am(r.touchedFields,e,n),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&t!==n)}return l&&a&&d.state.next(h),l?h:{}},b=(n,i,o,s)=>{const a=rm(r.errors,n),l=c.isValid&&im(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{am(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=setTimeout(h,e)},t(e.delayError)):(clearTimeout(u),t=null,o?am(r.errors,n,o):iv(r.errors,n)),(o?!lv(a,o):a)||!xm(s)||l){const e={...s,...l&&im(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}},w=async e=>{v(e,!0);const t=await n.resolver(s,n.context,yv(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(e),t},x=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...u}=a;if(e){const u=l.array.has(e.name),d=a._f&&xv(a._f);d&&c.validatingFields&&v([o],!0);const h=await Ym(a,s,f,n.shouldUseNativeValidation&&!t,u);if(d&&c.validatingFields&&v([o]),h[e.name]&&(i.valid=!1,t))break;!t&&(rm(h,e.name)?u?Vm(r.errors,h,e.name):am(r.errors,e.name,h[e.name]):iv(r.errors,e.name))}!xm(u)&&await x(u,t,i)}}return i.valid},_=(e,t)=>(e&&t&&am(s,e,t),!lv(R(),o)),S=(e,t,n)=>Tm(e,l,{...a.mount?s:nm(t)?o:km(e)?{[e]:t}:t},n,t),E=(e,t,n={})=>{const r=rm(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&am(s,e,vv(t,n)),o=Bm(n.ref)&&Qf(t)?"":t,uv(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?zf(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):Im(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.values.next({name:e,values:{...s}})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&A(e)},P=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=rm(i,s);!l.array.has(e)&&av(o)&&(!a||a._f)||qf(o)?E(s,o,n):P(s,o,n)}},k=(e,t,n={})=>{const u=rm(i,e),h=l.array.has(e),p=em(t);am(s,e,p),h?(d.array.next({name:e,values:{...s}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:e,dirtyFields:mv(o,s),isDirty:_(e,p)})):!u||u._f||Qf(p)?E(e,p,n):P(e,p,n),Dm(e,l)&&d.state.next({...r}),d.values.next({name:a.mount?e:void 0,values:{...s}})},T=async o=>{a.mount=!0;const u=o.target;let g=u.name,_=!0;const S=rm(i,g),E=e=>{_=Number.isNaN(e)||lv(e,rm(s,g,e))};if(S){let a,P;const k=u.type?gv(S._f):Yf(o),T=o.type===lm.BLUR||o.type===lm.FOCUS_OUT,C=!_v(S._f)&&!n.resolver&&!rm(r.errors,g)&&!S._f.deps||Ev(T,rm(r.touchedFields,g),r.isSubmitted,p,h),R=Dm(g,l,T);am(s,g,k),T?(S._f.onBlur&&S._f.onBlur(o),t&&t(0)):S._f.onChange&&S._f.onChange(o);const O=y(g,k,T,!1),F=!xm(O)||R;if(!T&&d.values.next({name:g,type:o.type,values:{...s}}),C)return c.isValid&&("onBlur"===e.mode?T&&m():m()),F&&d.state.next({name:g,...R?{}:O});if(!T&&R&&d.state.next({...r}),n.resolver){const{errors:e}=await w([g]);if(E(k),_){const t=Sv(r.errors,i,g),n=Sv(e,i,t.name||g);a=n.error,g=n.name,P=xm(e)}}else v([g],!0),a=(await Ym(S,s,f,n.shouldUseNativeValidation))[g],v([g]),E(k),_&&(a?P=!1:c.isValid&&(P=await x(i,!0)));_&&(S._f.deps&&A(S._f.deps),b(g,P,a,O))}},C=(e,t)=>{if(rm(r.errors,t)&&e.focus)return e.focus(),1},A=async(e,t={})=>{let o,s;const a=Sm(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await w(e);if(e)for(const n of e){const e=rm(t,n);e?am(r.errors,n,e):iv(r.errors,n)}else r.errors=t;return t})(nm(e)?e:a);o=xm(t),s=e?!a.some((e=>rm(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=rm(i,e);return await x(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&m()):s=o=await x(i);return d.state.next({...!km(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!s&&Mm(i,C,e?a:l.mount),s},R=e=>{const t={...a.mount?s:o};return nm(e)?t:km(e)?rm(t,e):e.map((e=>rm(t,e)))},O=(e,t)=>({invalid:!!rm((t||r).errors,e),isDirty:!!rm((t||r).dirtyFields,e),error:rm((t||r).errors,e),isValidating:!!rm(r.validatingFields,e),isTouched:!!rm((t||r).touchedFields,e)}),F=(e,t,n)=>{const o=(rm(i,e,{_f:{}})._f||{}).ref,{ref:s,message:a,type:l,...u}=rm(r.errors,e)||{};am(r.errors,e,{...u,...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},L=(e,t={})=>{for(const a of e?Sm(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(iv(i,a),iv(s,a)),!t.keepError&&iv(r.errors,a),!t.keepDirty&&iv(r.dirtyFields,a),!t.keepTouched&&iv(r.touchedFields,a),!t.keepIsValidating&&iv(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&iv(o,a);d.values.next({values:{...s}}),d.state.next({...r,...t.keepDirty?{isDirty:_()}:{}}),!t.keepIsValid&&m()},D=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(im(e)&&a.mount||e){const o=e?void 0:nm(i)?gv(n?n._f:rm(r,t)._f):i;am(s,t,o),y(t,o,!1,!1,!0)}},M=(t,r={})=>{let s=rm(i,t);const u=im(r.disabled)||im(e.disabled);return am(i,t,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:t}},name:t,mount:!0,...r}}),l.mount.add(t),s?D({field:s,disabled:im(r.disabled)?r.disabled:e.disabled,name:t,value:r.value}):g(t,!0,r.value),{...u?{disabled:r.disabled||e.disabled}:{},...n.progressive?{required:!!r.required,min:bv(r.min),max:bv(r.max),minLength:bv(r.minLength),maxLength:bv(r.maxLength),pattern:bv(r.pattern)}:{},name:t,onChange:T,onBlur:T,ref:e=>{if(e){M(t,r),s=rm(i,t);const n=nm(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e,a=cv(n),l=s._f.refs||[];if(a?l.find((e=>e===n)):n===s._f.ref)return;am(i,t,{_f:{...s._f,...a?{refs:[...l.filter(dv),n,...Array.isArray(rm(o,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),g(t,!1,void 0,n)}else s=rm(i,t,{}),s._f&&(s._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!Xf(l.array,t)||!a.action)&&l.unMount.add(t)}}},V=()=>n.shouldFocusError&&Mm(i,C,l.mount),I=(e,t)=>async o=>{let a;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=em(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await w();r.errors=e,l=t}else await x(i);if(iv(r.errors,"root"),xm(r.errors)){d.state.next({errors:{}});try{await e(l,o)}catch(u){a=u}}else t&&await t({...r.errors},o),V(),setTimeout(V);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xm(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(t,n={})=>{const u=t?em(t):o,h=em(u),p=xm(t),f=p?o:h;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)rm(r.dirtyFields,e)?am(f,e,rm(s,e)):k(e,rm(f,e));else{if(Jf&&nm(t))for(const e of l.mount){const t=rm(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Bm(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?em(o):{}:em(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=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||lv(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&s?mv(o,s):r.dirtyFields:n.keepDefaultValues&&t?mv(o,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>j(jm(e)?e(s):e,t);return{control:{register:M,unregister:L,getFieldState:O,handleSubmit:I,setError:F,_executeSchema:w,_getWatch:S,_getDirty:_,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=rm(i,e);t&&(t._f.refs?t._f.refs.every((e=>!dv(e))):!dv(t._f.ref))&&L(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,h=!0)=>{if(l&&n){if(a.action=!0,h&&Array.isArray(rm(i,e))){const t=n(rm(i,e),l.argA,l.argB);u&&am(i,e,t)}if(h&&Array.isArray(rm(r.errors,e))){const t=n(rm(r.errors,e),l.argA,l.argB);u&&am(r.errors,e,t),Pv(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(rm(r.touchedFields,e))){const t=n(rm(r.touchedFields,e),l.argA,l.argB);u&&am(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=mv(o,s)),d.state.next({name:e,isDirty:_(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else am(s,e,t)},_updateDisabledField:D,_getFieldArray:t=>tm(rm(a.mount?s:o,t,e.shouldUnregister?rm(o,t,[]):[])),_reset:j,_resetDefaultValues:()=>jm(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{im(e)&&(d.state.next({disabled:e}),Mm(i,((t,n)=>{const r=rm(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:A,register:M,handleSubmit:I,watch:(e,t)=>jm(e)?d.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:k,getValues:R,reset:B,resetField:(e,t={})=>{rm(i,e)&&(nm(t.defaultValue)?k(e,em(rm(o,e))):(k(e,t.defaultValue),am(o,e,em(t.defaultValue))),t.keepTouched||iv(r.touchedFields,e),t.keepDirty||(iv(r.dirtyFields,e),r.isDirty=t.defaultValue?_(e,em(rm(o,e))):_()),t.keepError||(iv(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e&&Sm(e).forEach((e=>iv(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:L,setError:F,setFocus:(e,t={})=>{const n=rm(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:O}}var Cv="undefined"!=typeof document?Gn.useLayoutEffect:()=>{};var Av=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Rv=e=>e&&"window"in e&&e.window===e?e:Av(e).defaultView||window;function Ov(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Fv(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Lv(e){let t=null;return()=>(null==t&&(t=e()),t)}var Dv=Lv((function(){return Fv(/^Mac/i)})),Mv=Lv((function(){return Fv(/^iPhone/i)})),Vv=Lv((function(){return Fv(/^iPad/i)||Dv()&&navigator.maxTouchPoints>1})),Iv=Lv((function(){return Mv()||Vv()})),jv=(Lv((function(){return Dv()||Iv()})),Lv((function(){return Ov(/AppleWebKit/i)&&!jv()})),Lv((function(){return Ov(/Chrome/i)}))),Bv=Lv((function(){return Ov(/Android/i)}));Lv((function(){return Ov(/Firefox/i)}));var Nv=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}};function Uv(e){let t=At({isFocused:!1,observer:null});Cv((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=At(null);return Cv((()=>{t.current=e}),[e]),Ft(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return Ft((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,i=e=>{t.current.isFocused=!1,r.disabled&&n(new Nv("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.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}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}var Hv=null,$v=new Set,Wv=new Map,zv=!1,qv=!1,Qv={Tab:!0,Escape:!0};function Kv(e,t){for(let n of $v)n(e,t)}function Gv(e){zv=!0,function(e){return!(e.metaKey||!Dv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Hv="keyboard",Kv("keyboard",e))}function Yv(e){Hv="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(zv=!0,Kv("pointer",e))}function Xv(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Bv()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(zv=!0,Hv="virtual")}function Zv(e){e.target!==window&&e.target!==document&&(zv||qv||(Hv="virtual",Kv("virtual",e)),zv=!1,qv=!1)}function Jv(){zv=!1,qv=!0}function eg(e){if("undefined"==typeof window||Wv.get(Rv(e)))return;const t=Rv(e),n=Av(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){zv=!0,r.apply(this,arguments)},n.addEventListener("keydown",Gv,!0),n.addEventListener("keyup",Gv,!0),n.addEventListener("click",Xv,!0),t.addEventListener("focus",Zv,!0),t.addEventListener("blur",Jv,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Yv,!0),n.addEventListener("pointermove",Yv,!0),n.addEventListener("pointerup",Yv,!0)):(n.addEventListener("mousedown",Yv,!0),n.addEventListener("mousemove",Yv,!0),n.addEventListener("mouseup",Yv,!0)),t.addEventListener("beforeunload",(()=>{tg(e)}),{once:!0}),Wv.set(t,{focus:r})}var tg=(e,t)=>{const n=Rv(e),r=Av(e);t&&r.removeEventListener("DOMContentLoaded",t),Wv.has(n)&&(n.HTMLElement.prototype.focus=Wv.get(n).focus,r.removeEventListener("keydown",Gv,!0),r.removeEventListener("keyup",Gv,!0),r.removeEventListener("click",Xv,!0),n.removeEventListener("focus",Zv,!0),n.removeEventListener("blur",Jv,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Yv,!0),r.removeEventListener("pointermove",Yv,!0),r.removeEventListener("pointerup",Yv,!0)):(r.removeEventListener("mousedown",Yv,!0),r.removeEventListener("mousemove",Yv,!0),r.removeEventListener("mouseup",Yv,!0)),Wv.delete(n))};function ng(){return"pointer"!==Hv}"undefined"!=typeof document&&function(e){const t=Av(e);let n;"loading"!==t.readyState?eg(e):(n=()=>{eg(e)},t.addEventListener("DOMContentLoaded",n))}();var rg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ig(e,t,n){eg(),Tt((()=>{let t=(t,r)=>{(function(e,t,n){var r;const i="undefined"!=typeof window?Rv(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Rv(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Rv(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Rv(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof i&&!rg.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"===t&&n instanceof a&&!Qv[n.key])})(!!(null==n?void 0:n.isTextInput),t,r)&&e(ng())};return $v.add(t),()=>{$v.delete(t)}}),t)}var og=!1,sg=0;function ag(){og=!0,setTimeout((()=>{og=!1}),50)}function lg(e){"touch"===e.pointerType&&ag()}function ug(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",lg):document.addEventListener("touchend",ag),sg++,()=>{--sg>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",lg):document.removeEventListener("touchend",ag))}}function cg(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=Pt(!1),a=At({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Tt(ug,[]);let{hoverProps:l,triggerHoverEnd:u}=Ot((()=>{let e=(e,r)=>{if(a.pointerType=r,i||"touch"===r||a.isHovered||!e.currentTarget.contains(e.target))return;a.isHovered=!0;let o=e.currentTarget;a.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),s(!0)},o=(e,t)=>{if(a.pointerType="",a.target=null,"touch"===t||!a.isHovered)return;a.isHovered=!1;let i=e.currentTarget;r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{og&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{a.ignoreEmulatedMouseEvents||og||e(t,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,n,r,i,a]);return Tt((()=>{i&&u({currentTarget:a.target},a.pointerType)}),[i]),{hoverProps:l,isHovered:o}}function dg(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=At({isFocused:!1,isFocusVisible:t||ng()}),[o,s]=Pt(!1),[a,l]=Pt((()=>i.current.isFocused&&i.current.isFocusVisible)),u=Ft((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),c=Ft((e=>{i.current.isFocused=e,s(e),u()}),[u]);ig((e=>{i.current.isFocusVisible=e,u()}),[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=Ft((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),s=Uv(o),a=Ft((e=>{const t=Av(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),s(e))}),[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:t||!r&&!i?void 0:o}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=At({isFocusWithin:!1}),s=Ft((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,o]),a=Uv(s),l=Ft((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),i&&i(!0),o.current.isFocusWithin=!0,a(e))}),[r,i,a]);return t?{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 hg=Object.defineProperty,pg=(e,t,n)=>(((e,t,n)=>{t in e?hg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),fg=new class{constructor(){pg(this,"current",this.detect()),pg(this,"handoffState","pending"),pg(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}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 mg(e){return fg.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function vg(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function gg(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return vg((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=gg();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function yg(){let[e]=Pt(gg);return Tt((()=>()=>e.dispose()),[e]),e}var bg=(e,t)=>{fg.isServer?Tt(e,t):Ct(e,t)};function wg(e){let t=At(e);return bg((()=>{t.current=e}),[e]),t}var xg=function(e){let t=wg(e);return Gn.useCallback(((...e)=>t.current(...e)),[t])};function _g({disabled:e=!1}={}){let t=At(null),[n,r]=Pt(!1),i=yg(),o=xg((()=>{t.current=null,r(!1),i.dispose()})),s=xg((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=mg(e.currentTarget);i.addEventListener(n,"pointerup",o,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);r(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",o,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}var Sg=Z(void 0);function Eg(){return Lt(Sg)}function Pg({value:e,children:t}){return Gn.createElement(Sg.Provider,{value:e},t)}function kg(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Tg(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Tg),r}var Cg=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Cg||{}),Ag=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ag||{});function Rg({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:Fg;let l=Lg(t,e);if(o)return Og(l,n,r,s,a);let u=null!=i?i:0;if(2&u){let{static:e=!1,...t}=l;if(e)return Og(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return Tg(e?0:1,{0:()=>null,1:()=>Og({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Og(l,n,r,s,a)}function Og(e,t={},n,r,i){let{as:o=n,children:s,refName:a="ref",...l}=Ig(e,["unmount","static"]),u=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof s?s(t):s;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(o===O&&(Object.keys(Vg(l)).length>0||Object.keys(Vg(d)).length>0)){if(Ln(c)&&!(Array.isArray(c)&&c.length>1)){let e=c.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>kg(t(...e),l.className):kg(t,l.className),r=n?{className:n}:{},o=Lg(c.props,Vg(Ig(l,["ref"])));for(let i in d)i in o&&delete d[i];return Vn(c,Object.assign({},o,d,u,{ref:i(c.ref,u.ref)},r))}if(Object.keys(Vg(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(Vg(l)).concat(Object.keys(Vg(d))).map((e=>` - ${e}`)).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((e=>` - ${e}`)).join("\n")].join("\n"))}return C(o,Object.assign({},Ig(l,["ref"]),o!==O&&u,o!==O&&d),c)}function Fg(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Lg(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Dg(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let r in n)Object.assign(t,{[r](...e){let t=n[r];for(let n of t)n?.(...e)}});return t}function Mg(e){var t;return Object.assign(Xt(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Vg(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Ig(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function jg(e,t,n){let[r,i]=Pt(n),o=void 0!==e,s=At(o),a=At(!1),l=At(!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?e:r,xg((e=>(o||i(e),null==t?void 0:t(e))))]}function Bg(e){let[t]=Pt(e);return t}function Ng(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))Hg(n,Ug(t,r),i);return n}function Ug(e,t){return e?e+"["+t+"]":t}function Hg(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())Hg(e,Ug(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):Ng(n,t,e)}function $g(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var Wg=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Wg||{});var zg=Mg((function(e,t){var n;let{features:r=1,...i}=e;return Rg({ourProps:{ref:t,"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"})})),qg=Z(null);function Qg(e){let[t,n]=Pt(null);return Gn.createElement(qg.Provider,{value:{target:t}},e.children,Gn.createElement(zg,{features:Wg.Hidden,ref:n}))}function Kg({children:e}){let t=Lt(qg);if(!t)return Gn.createElement(Gn.Fragment,null,e);let{target:n}=t;return n?hn(Gn.createElement(Gn.Fragment,null,e),n):null}function Gg({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,s]=Pt(null),a=yg();return Tt((()=>{if(r&&o)return a.addEventListener(o,"reset",r)}),[o,t,r]),Gn.createElement(Kg,null,Gn.createElement(Yg,{setForm:s,formId:t}),Ng(e).map((([e,r])=>Gn.createElement(zg,{features:Wg.Hidden,...Vg({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})}))))}function Yg({setForm:e,formId:t}){return Tt((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:Gn.createElement(zg,{features:Wg.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}var Xg=Z(void 0);function Zg(){return Lt(Xg)}function Jg({id:e,children:t}){return Gn.createElement(Xg.Provider,{value:e},t)}function ey(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var ty=Symbol();function ny(...e){let t=At(e);Tt((()=>{t.current=e}),[e]);let n=xg((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[ty])))?void 0:n}var ry=Z(null);function iy(){let e=Lt(ry);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,iy),e}return e}function oy(){var e,t;return null!=(t=null==(e=Lt(ry))?void 0:e.value)?t:void 0}function sy(){let[e,t]=Pt([]);return[e.length>0?e.join(" "):void 0,Ot((()=>function(e){let n=xg((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=Ot((()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value})),[n,e.slot,e.name,e.props,e.value]);return Gn.createElement(ry.Provider,{value:r},e.children)}),[t])]}ry.displayName="DescriptionContext";var ay=Mg((function(e,t){let n=Vt(),r=Eg(),{id:i=`headlessui-description-${n}`,...o}=e,s=iy(),a=ny(t);bg((()=>s.register(i)),[i,s.register]);let l=r||!1,u=Ot((()=>({...s.slot,disabled:l})),[s.slot,l]);return Rg({ourProps:{ref:a,...s.props,id:i},theirProps:o,slot:u,defaultTag:"p",name:s.name||"Description"})})),ly=Object.assign(ay,{}),uy=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(uy||{}),cy=Z(null);function dy(){let e=Lt(cy);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,dy),e}return e}function hy(e){var t,n,r;let i=null!=(n=null==(t=Lt(cy))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function py({inherit:e=!1}={}){let t=hy(),[n,r]=Pt([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,Ot((()=>function(e){let t=xg((e=>(r((t=>[...t,e])),()=>r((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=Ot((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Gn.createElement(cy.Provider,{value:n},e.children)}),[r])]}cy.displayName="LabelContext";var fy=Mg((function(e,t){var n;let r=Vt(),i=dy(),o=Zg(),s=Eg(),{id:a=`headlessui-label-${r}`,htmlFor:l=(null!=o?o:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=ny(t);bg((()=>i.register(a)),[a,i.register]);let h=xg((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=s||!1,f=Ot((()=>({...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),Rg({ourProps:m,theirProps:c,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})})),my=Object.assign(fy,{});function vy(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function gy(e,t=!1){let[n,r]=kt((()=>({})),{}),i=Ot((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return bg((()=>{if(!e)return;let t=new ResizeObserver(r);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}var yy=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function by(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}function wy(e){return Qn(e.subscribe,e.getSnapshot,e.getSnapshot)}var xy=new yy((()=>by((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function _y(e,t){let n=xy.get(t),r=Vt(),i=wy(n);if(bg((()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,e]),!e)return!1;let o=i.indexOf(r),s=i.length;return-1===o&&(o=s,s+=1),o===s-1}var Sy=new Map,Ey=new Map;function Py(e){var t;let n=null!=(t=Ey.get(e))?t:0;return Ey.set(e,n+1),0!==n||(Sy.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>ky(e)}function ky(e){var t;let n=null!=(t=Ey.get(e))?t:1;if(1===n?Ey.delete(e):Ey.set(e,n-1),1!==n)return;let r=Sy.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Sy.delete(e))}var Ty=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),Cy=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),Ay=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ay||{}),Ry=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ry||{}),Oy=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Oy||{});function Fy(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Ty)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var Ly=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ly||{});function Dy(e,t=0){var n;return e!==(null==(n=mg(e))?void 0:n.body)&&Tg(t,{0:()=>e.matches(Ty),1(){let t=e;for(;null!==t;){if(t.matches(Ty))return!0;t=t.parentElement}return!1}})}var My=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(My||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));var Vy=["textarea","input"].join(",");function Iy(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),i=t(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 jy(e,t){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?Iy(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Cy)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):Fy(e);i.length>0&&s.length>1&&(s=s.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,s.indexOf(r))-1;if(4&t)return Math.max(0,s.indexOf(r))+1;if(8&t)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let e=u+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}a=s[e],a?.focus(c),d+=l}while(a!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Vy))&&n}(a)&&a.select(),2}(Fy(),t,{relativeTo:e})}function By(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ny(){return By()||/Android/gi.test(window.navigator.userAgent)}function Uy(e,t,n,r){let i=wg(n);Tt((()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}var Hy=30;function $y(e,t,n){let r=_y(e,"outside-click"),i=wg(n),o=Ft((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!Dy(r,Ly.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),s=At(null);Uy(r,"pointerdown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),Uy(r,"mousedown",(e=>{var t,n;s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),Uy(r,"click",(e=>{Ny()||s.current&&(o(e,(()=>s.current)),s.current=null)}),!0);let a=At({x:0,y:0});Uy(r,"touchstart",(e=>{a.current.x=e.touches[0].clientX,a.current.y=e.touches[0].clientY}),!0),Uy(r,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-a.current.x)>=Hy||Math.abs(n-a.current.y)>=Hy))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,r){let i=wg(n);Tt((()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){i.current(e)}}),[e,t,r])}(r,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function Wy(...e){return Ot((()=>mg(...e)),[...e])}function zy(e,t){return Ot((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function qy(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=null!=(n=t.defaultView)?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function Qy(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var Ky,Gy=by((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:gg(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Qy(n)},i=[By()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=gg();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=e.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},qy(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Yy(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=wy(Gy),i=t?r.get(t):void 0,o=!!i&&i.count>0;bg((()=>{if(t&&e)return Gy.dispatch("PUSH",t,n),()=>Gy.dispatch("POP",t,n)}),[e,t])}(_y(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function Xy(e){return[e.screenX,e.screenY]}function Zy(){let e=At([-1,-1]);return{wasMoved(t){let n=Xy(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=Xy(t)}}}Gy.subscribe((()=>{let e=Gy.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Gy.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Gy.dispatch("TEARDOWN",n)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"test"===(null==(Ky=null==process?void 0:{})?void 0:Ky.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 Jy=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Jy||{});function eb(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function tb(e,t,n,r){let[i,o]=Pt(n),{hasFlag:s,addFlag:a,removeFlag:l}=function(e=0){let[t,n]=Pt(e);return{flags:t,setFlag:Ft((e=>n(e)),[t]),addFlag:Ft((e=>n((t=>t|e))),[t]),hasFlag:Ft((e=>(t&e)===e),[t]),removeFlag:Ft((e=>n((t=>t&~e))),[n]),toggleFlag:Ft((e=>n((t=>t^e))),[n])}}(e&&i?3:0),u=At(!1),c=At(!1);return bg((()=>{var i;if(e)return n&&o(!0),t?(null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:i}){let o=gg();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(e,t){var n,r;let i=gg();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),i.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,r))}))})),o.dispose}(t,{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 e;c.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(u.current=!1,l(7),n||o(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&a(3))}),[e,n,t,yg()]),e?[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 nb(){return"undefined"!=typeof window}function rb(e){return sb(e)?(e.nodeName||"").toLowerCase():"#document"}function ib(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ob(e){var t;return null==(t=(sb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function sb(e){return!!nb()&&(e instanceof Node||e instanceof ib(e).Node)}function ab(e){return!!nb()&&(e instanceof Element||e instanceof ib(e).Element)}function lb(e){return!!nb()&&(e instanceof HTMLElement||e instanceof ib(e).HTMLElement)}function ub(e){return!(!nb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ib(e).ShadowRoot)}function cb(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=vb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function db(e){return["table","td","th"].includes(rb(e))}function hb(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(ex){return!1}}))}function pb(e){const t=fb(),n=ab(e)?vb(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function fb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function mb(e){return["html","body","#document"].includes(rb(e))}function vb(e){return ib(e).getComputedStyle(e)}function gb(e){return ab(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yb(e){if("html"===rb(e))return e;const t=e.assignedSlot||e.parentNode||ub(e)&&e.host||ob(e);return ub(t)?t.host:t}function bb(e){const t=yb(e);return mb(t)?e.ownerDocument?e.ownerDocument.body:e.body:lb(t)&&cb(t)?t:bb(t)}function wb(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=bb(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=ib(i);if(o){const e=xb(s);return t.concat(s,s.visualViewport||[],cb(i)?i:[],e&&n?wb(e):[])}return t.concat(i,wb(i,[],n))}function xb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var _b=Math.min,Sb=Math.max,Eb=Math.round,Pb=Math.floor,kb=e=>({x:e,y:e}),Tb={left:"right",right:"left",bottom:"top",top:"bottom"},Cb={start:"end",end:"start"};function Ab(e,t,n){return Sb(e,_b(t,n))}function Rb(e,t){return"function"==typeof e?e(t):e}function Ob(e){return e.split("-")[0]}function Fb(e){return e.split("-")[1]}function Lb(e){return"x"===e?"y":"x"}function Db(e){return"y"===e?"height":"width"}function Mb(e){return["top","bottom"].includes(Ob(e))?"y":"x"}function Vb(e){return Lb(Mb(e))}function Ib(e){return e.replace(/start|end/g,(e=>Cb[e]))}function jb(e){return e.replace(/left|right|bottom|top/g,(e=>Tb[e]))}function Bb(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Nb(e,t,n){let{reference:r,floating:i}=e;const o=Mb(t),s=Vb(t),a=Db(s),l=Ob(t),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(Fb(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function Ub(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Rb(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[h?"floating"===d?"reference":"floating":d],v=Bb(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)),b=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=Bb(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+f.top)/b.y,bottom:(w.bottom-v.bottom+f.bottom)/b.y,left:(v.left-w.left+f.left)/b.x,right:(w.right-v.right+f.right)/b.x}}function Hb(e){const t=vb(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=lb(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Eb(n)!==o||Eb(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function $b(e){return ab(e)?e:e.contextElement}function Wb(e){const t=$b(e);if(!lb(t))return kb(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Hb(t);let s=(o?Eb(n.width):n.width)/r,a=(o?Eb(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}var zb=kb(0);function qb(e){const t=ib(e);return fb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zb}function Qb(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=$b(e);let s=kb(1);t&&(r?ab(r)&&(s=Wb(r)):s=Wb(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ib(e))&&t}(o,n,r)?qb(o):kb(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 e=ib(o),t=r&&ab(r)?ib(r):r;let n=e,i=xb(n);for(;i&&r&&t!==n;){const e=Wb(i),t=i.getBoundingClientRect(),r=vb(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=s,n=ib(i),i=xb(n)}}return Bb({width:c,height:d,x:l,y:u})}function Kb(e,t){const n=gb(e).scrollLeft;return t?t.left+n:Qb(ob(e)).left+n}function Gb(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ib(e),r=ob(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=fb();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=ob(e),n=gb(e),r=e.ownerDocument.body,i=Sb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Sb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Kb(e);const a=-n.scrollTop;return"rtl"===vb(r).direction&&(s+=Sb(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(ob(e));else if(ab(t))r=function(e,t){const n=Qb(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=lb(e)?Wb(e):kb(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=qb(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Bb(r)}function Yb(e,t){const n=yb(e);return!(n===t||!ab(n)||mb(n))&&("fixed"===vb(n).position||Yb(n,t))}function Xb(e,t){const n=t.get(e);if(n)return n;let r=wb(e,[],!1).filter((e=>ab(e)&&"body"!==rb(e))),i=null;const o="fixed"===vb(e).position;let s=o?yb(e):e;for(;ab(s)&&!mb(s);){const t=vb(s),n=pb(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||cb(s)&&!n&&Yb(e,s))?r=r.filter((e=>e!==s)):i=t,s=yb(s)}return t.set(e,r),r}function Zb(e,t,n){const r=lb(t),i=ob(t),o="fixed"===n,s=Qb(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=kb(0);if(r||!r&&!o)if(("body"!==rb(t)||cb(i))&&(a=gb(t)),r){const e=Qb(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Kb(i));let u=0,c=0;if(i&&!r&&!o){const e=i.getBoundingClientRect();c=e.top+a.scrollTop,u=e.left+a.scrollLeft-Kb(i,e)}return{x:s.left+a.scrollLeft-l.x-u,y:s.top+a.scrollTop-l.y-c,width:s.width,height:s.height}}function Jb(e){return"static"===vb(e).position}function ew(e,t){if(!lb(e)||"fixed"===vb(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ob(e)===n&&(n=n.ownerDocument.body),n}function tw(e,t){const n=ib(e);if(hb(e))return n;if(!lb(e)){let t=yb(e);for(;t&&!mb(t);){if(ab(t)&&!Jb(t))return t;t=yb(t)}return n}let r=ew(e,t);for(;r&&db(r)&&Jb(r);)r=ew(r,t);return r&&mb(r)&&Jb(r)&&!pb(r)?n:r||function(e){let t=yb(e);for(;lb(t)&&!mb(t);){if(pb(t))return t;if(hb(t))return null;t=yb(t)}return null}(e)||n}var nw={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=ob(r),a=!!t&&hb(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=kb(1);const c=kb(0),d=lb(r);if((d||!d&&!o)&&(("body"!==rb(r)||cb(s))&&(l=gb(r)),lb(r))){const e=Qb(r);u=Wb(r),c.x=e.x+r.clientLeft,c.y=e.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:ob,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?hb(t)?[]:Xb(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=Gb(t,n,i);return e.top=Sb(r.top,e.top),e.right=_b(r.right,e.right),e.bottom=_b(r.bottom,e.bottom),e.left=Sb(r.left,e.left),e}),Gb(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:tw,getElementRects:async function(e){const t=this.getOffsetParent||tw,n=this.getDimensions,r=await n(e.floating);return{reference:Zb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Hb(e);return{width:t,height:n}},getScale:Wb,isElement:ab,isRTL:function(e){return"rtl"===vb(e).direction}};function rw(e,t,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=$b(e),c=i||o?[...u?wb(u):[],...wb(t)]:[];c.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const i=ob(e);function o(){var e;clearTimeout(n),null==(e=r)||e.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}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-Pb(c)+"px "+-Pb(i.clientWidth-(u+d))+"px "+-Pb(i.clientHeight-(c+h))+"px "+-Pb(u)+"px",threshold:Sb(0,_b(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}f=!1}try{r=new IntersectionObserver(m,{...p,root:i.ownerDocument})}catch(ex){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),u&&!l&&f.observe(u),f.observe(t));let m=l?Qb(e):null;return l&&function t(){const r=Qb(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),d?.(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}var iw=Ub,ow=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Ob(n),a=Fb(n),l="y"===Mb(n),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Rb(t,e);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}}(t,e);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}}}}},sw=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rb(e,t),u={x:n,y:r},c=await Ub(t,l),d=Mb(Ob(i)),h=Lb(d);let p=u[h],f=u[d];if(o){const e="y"===h?"bottom":"right";p=Ab(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";f=Ab(f+c["y"===d?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},aw=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Rb(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Ob(i),y=Mb(a),b=Ob(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(u.floating)),x=h||(b||!m?[jb(a)]:function(e){const t=jb(e);return[Ib(e),t,Ib(t)]}(a)),_="none"!==f;!h&&_&&x.push(...function(e,t,n,r){const i=Fb(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(Ob(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Ib)))),o}(a,m,f,w));const S=[a,...x],E=await Ub(t,v),P=[];let k=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&P.push(E[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Fb(e),i=Vb(e),o=Db(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=jb(s)),[s,jb(s)]}(i,s,w);P.push(E[e[0]],E[e[1]])}if(k=[...k,{placement:i,overflows:P}],!P.every((e=>e<=0))){var T,C;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n=null==(C=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=k.filter((e=>{if(_){const t=Mb(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},lw=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Rb(e,t),c=await Ub(t,u),d=Ob(i),h=Fb(i),p="y"===Mb(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,b=f-c.left-c.right,w=_b(m-c[v],y),x=_b(f-c[g],b),_=!t.middlewareData.shift;let S=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),_&&!h){const e=Sb(c.left,0),t=Sb(c.right,0),n=Sb(c.top,0),r=Sb(c.bottom,0);p?E=f-2*(0!==e||0!==t?e+t:Sb(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Sb(c.top,c.bottom))}await l({...t,availableWidth:E,availableHeight:S});const P=await s.getDimensions(a.floating);return f!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}},uw=(e,t,n)=>{const r=new Map,i={platform:nw,...n},o={...i.platform,_c:r};return(async(e,t,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(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Nb(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:b}=await o({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(u=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:c,y:d}=Nb(u,h,l))),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})},cw="undefined"!=typeof document?Ct:Tt;function dw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!dw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!dw(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hw(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pw(e,t){const n=hw(e);return Math.round(t*n)/n}function fw(e){const t=At(e);return cw((()=>{t.current=e})),t}var mw=(e,t)=>({...ow(e),options:[e,t]}),vw=(e,t)=>({...sw(e),options:[e,t]}),gw=(e,t)=>({...aw(e),options:[e,t]}),yw=(e,t)=>({...lw(e),options:[e,t]}),bw={...Wt},ww=bw.useInsertionEffect||(e=>e());function xw(e){const t=At((()=>{}));return ww((()=>{t.current=e})),Ft((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var _w="undefined"!=typeof document?Ct:Tt,Sw=!1,Ew=0,Pw=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ew++;var kw=bw.useId||function(){const[e,t]=Pt((()=>Sw?Pw():void 0));return _w((()=>{null==e&&t(Pw())}),[]),Tt((()=>{Sw=!0}),[]),e};var Tw=Z(null),Cw=Z(null),Aw=()=>{var e;return(null==(e=Lt(Tw))?void 0:e.id)||null},Rw=()=>Lt(Cw),Ow="data-floating-ui-focusable";function Fw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=kw(),o=At({}),[s]=Pt((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),a=null!=Aw(),[l,u]=Pt(r.reference),c=xw(((e,t,r)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),n?.(e,t,r)})),d=Ot((()=>({setPositionReference:u})),[]),h=Ot((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return Ot((()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:s,floatingId:i,refs:d})),[t,c,h,s,i,d])}function Lw(e){void 0===e&&(e={});const{nodeId:t}=e,n=Fw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=Pt(null),[a,l]=Pt(null),u=(null==i?void 0:i.reference)||o,c=At(null),d=Rw();_w((()=>{u&&(c.current=u)}),[u]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=Pt({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=Pt(r);dw(h,r)||p(r);const[f,m]=Pt(null),[v,g]=Pt(null),y=Ft((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=Ft((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=o||f,x=s||v,_=At(null),S=At(null),E=At(c),P=null!=l,k=fw(l),T=fw(i),C=fw(u),A=Ft((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),uw(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==C.current};R.current&&!dw(E.current,t)&&(E.current=t,Nn((()=>{d(t)})))}))}),[h,t,n,T,C]);cw((()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const R=At(!1);cw((()=>(R.current=!0,()=>{R.current=!1})),[]),cw((()=>{if(w&&(_.current=w),x&&(S.current=x),w&&x){if(k.current)return k.current(w,x,A);A()}}),[w,x,A,k,P]);const O=Ot((()=>({reference:_,floating:S,setReference:y,setFloating:b})),[y,b]),F=Ot((()=>({reference:w,floating:x})),[w,x]),L=Ot((()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=pw(F.floating,c.x),r=pw(F.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...hw(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,F.floating,c.x,c.y]);return Ot((()=>({...c,update:A,refs:O,elements:F,floatingStyles:L})),[c,A,O,F,L])}({...e,elements:{...i,...a&&{reference:a}}}),p=Ft((e=>{const t=ab(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=Ft((e=>{(ab(e)||null===e)&&(c.current=e,s(e)),(ab(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!ab(e))&&h.refs.setReference(e)}),[h.refs]),m=Ot((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:c})),[h.refs,f,p]),v=Ot((()=>({...h.elements,domReference:u})),[h.elements,u]),g=Ot((()=>({...h,...r,refs:m,elements:v,nodeId:t})),[h,m,v,t,r]);return _w((()=>{r.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),Ot((()=>({...h,context:g,refs:m,elements:v})),[h,m,v,g])}var Dw="active",Mw="selected";function Vw(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Dw]:t,[Mw]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Ow]:""},...o,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var s;i&&[Dw,Mw].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}function Iw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var jw=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Rb(e,t),{rects:d,elements:{floating:h}}=t,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 b={...t,...await mw(-p.offsetTop-h.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},w=await iw(Iw(b,f.scrollHeight+m+h.clientTop),c),x=await iw(b,{...c,elementContext:"reference"}),_=Sb(0,w.top),S=b.y+_,E=Eb(Sb(0,f.scrollHeight+(v&&y||g?2*m:0)-_-Sb(0,w.bottom)));if(f.style.maxHeight=E+"px",f.scrollTop=_,i){const e=f.scrollHeight>f.offsetHeight&&f.offsetHeight<p.offsetHeight*a-1||x.top>=-l||x.bottom>=-l;Nn((()=>i(e)))}return r&&(r.current=await iw(Iw({...b,y:S},f.offsetHeight+m+h.clientTop),c)),{y:S}}});function Bw(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=xw(a),u=At(!1),c=At(null),d=At(null);Tt((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const n=e.deltaY,r=o.current.top>=-.5,i=o.current.bottom>=-.5,s=t.scrollHeight-t.clientHeight,a=n<0?-1:1,u=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),Nn((()=>{l((e=>e+Math[u](n,s*a)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{c.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,r.floating,o,s,l]);const h=Ot((()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==s?void 0:s.current)||r.floating;if(o.current&&e&&u.current){if(null!==c.current){const t=e.scrollTop-c.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&Nn((()=>l((e=>e+t))))}requestAnimationFrame((()=>{c.current=e.scrollTop}))}}})),[r.floating,l,o,s]);return Ot((()=>i?{floating:h}:{}),[i,h])}var Nw=Z({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Nw.displayName="FloatingContext";var Uw=Z(null);Uw.displayName="PlacementContext";var Hw=4;function $w({children:e,enabled:t=!0}){let[n,r]=Pt(null),[i,o]=Pt(0),s=At(null),[a,l]=Pt(null);!function(e){bg((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(a);let u=t&&null!==n&&null!==a,{to:c="bottom",gap:d=0,offset:h=0,padding:p=0,inner:f}=function(e,t){var n,r,i;let o=Ww(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=Ww(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=Ww(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(n,a),[m,v="center"]=c.split(" ");bg((()=>{u&&o(0)}),[u]);let{refs:g,floatingStyles:y,context:b}=Lw({open:u,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[mw({mainAxis:"selection"===m?0:d,crossAxis:h}),vw({padding:p}),"selection"!==m&&gw({padding:p}),"selection"===m&&f?jw({...f,padding:p,overflowRef:s,offset:i,minItemsVisible:Hw,referenceOverflowThreshold:p,onFallbackChange(e){var t,n;if(!e)return;let r=b.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(Hw,r.childElementCount),a=0,l=0;for(let o of null!=(n=null==(t=b.elements.floating)?void 0:t.childNodes)?n:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,n=r.scrollTop,u=n+r.clientHeight;if(!(e>=n&&t<=u)){l=Math.max(0,Math.min(t,u)-Math.max(e,n)),a=o.clientHeight;break}s--}s>=1&&o((e=>{let t=a*s-l+i;return e>=t?e:t}))}}):null,yw({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:rw}),[w=m,x=v]=b.placement.split("-");"selection"===m&&(w="selection");let _=Ot((()=>({anchor:[w,x].filter(Boolean).join(" ")})),[w,x]),{getReferenceProps:S,getFloatingProps:E}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),i=Ft((t=>Vw(t,e,"reference")),t),o=Ft((t=>Vw(t,e,"floating")),n),s=Ft((t=>Vw(t,e,"item")),r);return Ot((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s})),[i,o,s])}([Bw(b,{overflowRef:s,onChange:o})]),P=xg((e=>{l(e),g.setFloating(e)}));return C(Uw.Provider,{value:r},C(Nw.Provider,{value:{setFloating:P,setReference:g.setReference,styles:y,getReferenceProps:S,getFloatingProps:E,slot:_}},e))}function Ww(e,t,n=void 0){let r=yg(),i=xg(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=qw(e,t);return[i,n=>{let o=zw(e);{let s=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));r.requestAnimationFrame((function a(){r.nextFrame(a);let l=!1;for(let[e,n]of o.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=qw(e,t);i!==u&&(n(u),i=u)}))}return r.dispose}]}return[n,null]})),o=Ot((()=>i(e,t)[0]),[e,t]),[s=o,a]=Pt();return bg((()=>{let[n,r]=i(e,t);if(a(n),r)return r(a)}),[e,t]),s}function zw(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...zw(r)]:[n]}return[]}function qw(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}var Qw=Z(null);Qw.displayName="OpenClosedContext";var Kw=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Kw||{});function Gw(){return Lt(Qw)}function Yw({value:e,children:t}){return Gn.createElement(Qw.Provider,{value:e},t)}var Xw=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Xw||{});function Zw(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function Jw(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Wt&&(e=>e.useSyncExternalStore)(Wt)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Pt(fg.isHandoffComplete);return t&&!1===fg.isHandoffComplete&&n(!1),Tt((()=>{!0!==t&&n(!0)}),[t]),Tt((()=>fg.handoff()),[]),!e&&t}var ex=Z(!1);function tx(){return Lt(ex)}var nx=O,rx=Mg((function(e,t){let n=e,r=At(null),i=ny(function(e,t=!0){return Object.assign(e,{[ty]:t})}((e=>{r.current=e})),t),o=Wy(r),s=function(e){let t=tx(),n=Lt(ox),r=Wy(e),[i,o]=Pt((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(fg.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 Tt((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),Tt((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}(r),[a]=Pt((()=>{var e;return fg.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Lt(sx),u=Jw();return bg((()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))}),[s,a]),bg((()=>{if(a&&l)return l.register(a)}),[l,a]),function(e){let t=xg(e),n=At(!1);Tt((()=>(n.current=!1,()=>{n.current=!0,vg((()=>{n.current&&t()}))})),[t])}((()=>{var e;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))})),u&&s&&a?hn(Rg({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:nx,name:"Portal"}),a):null}));var ix=O,ox=Z(null);var sx=Z(null),ax=Mg((function(e,t){let n=ny(t),{enabled:r=!0,...i}=e;return r?Gn.createElement(rx,{...i,ref:n}):Rg({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:nx,name:"Portal"})})),lx=Mg((function(e,t){let{target:n,...r}=e,i={ref:ny(t)};return Gn.createElement(ox.Provider,{value:n},Rg({ourProps:i,theirProps:r,defaultTag:ix,name:"Popover.Group"}))})),ux=Object.assign(ax,{Group:lx});function cx(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:vx)!==O||1===Gn.Children.count(e.children)}var dx=Z(null);dx.displayName="TransitionContext";var hx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(hx||{});var px=Z(null);function fx(e){return"children"in e?fx(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function mx(e,t){let n=wg(e),r=At([]),i=function(){let e=At(!1);return bg((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=yg(),s=xg(((e,t=Ag.Hidden)=>{let s=r.current.findIndex((({el:t})=>t===e));-1!==s&&(Tg(t,{[Ag.Unmount](){r.current.splice(s,1)},[Ag.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var e;!fx(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),a=xg((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,Ag.Unmount)})),l=At([]),u=At(Promise.resolve()),c=At({enter:[],leave:[]}),d=xg(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),t?.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),t?.chains.current[n].push([e,new Promise((e=>{Promise.all(c.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?u.current=u.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=xg(((e,t,n)=>{Promise.all(c.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return Ot((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c})),[a,s,r,d,h,c,u])}px.displayName="NestingContext";var vx=O,gx=Cg.RenderStrategy;var yx=Mg((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=At(null),a=ny(...cx(e)?[s,t]:null===t?[]:[t]);Jw();let l=Gw();if(void 0===n&&null!==l&&(n=(l&Kw.Open)===Kw.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=Pt(n?"visible":"hidden"),d=mx((()=>{n||c("hidden")})),[h,p]=Pt(!0),f=At([n]);bg((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=Ot((()=>({show:n,appear:r,initial:h})),[n,r,h]);bg((()=>{n?c("visible"):!fx(d)&&null!==s.current&&c("hidden")}),[n,d]);let v={unmount:i},g=xg((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),y=xg((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return Gn.createElement(px.Provider,{value:d},Gn.createElement(dx.Provider,{value:m},Rg({ourProps:{...v,as:O,children:Gn.createElement(bx,{ref:a,...v,...o,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:O,features:gx,visible:"visible"===u,name:"Transition"})))})),bx=Mg((function(e,t){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}=e,[g,y]=Pt(null),b=At(null),w=cx(e),x=ny(...w?[b,t,y]:null===t?[]:[t]),_=null==(n=v.unmount)||n?Ag.Unmount:Ag.Hidden,{show:S,appear:E,initial:P}=function(){let e=Lt(dx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[k,T]=Pt(S?"visible":"hidden"),C=function(){let e=Lt(px);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:A,unregister:R}=C;bg((()=>A(b)),[A,b]),bg((()=>{if(_===Ag.Hidden&&b.current)return S&&"visible"!==k?void T("visible"):Tg(k,{hidden:()=>R(b),visible:()=>A(b)})}),[k,b,A,R,S,_]);let O=Jw();bg((()=>{if(w&&O&&"visible"===k&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[b,k,O,w]);let F=P&&!E,L=E&&S&&P,D=At(!1),M=mx((()=>{D.current||(T("hidden"),R(b))}),C),V=xg((e=>{D.current=!0;let t=e?"enter":"leave";M.onStart(b,t,(e=>{"enter"===e?o?.():"leave"===e&&a?.()}))})),I=xg((e=>{let t=e?"enter":"leave";D.current=!1,M.onStop(b,t,(e=>{"enter"===e?s?.():"leave"===e&&l?.()})),"leave"===t&&!fx(M)&&(T("hidden"),R(b))}));Tt((()=>{w&&i||(V(S),I(S))}),[S,w,i]);let[,j]=tb(!(!i||!w||!O||F),g,S,{start:V,end:I}),B=Vg({ref:x,className:(null==(r=kg(v.className,L&&u,L&&c,j.enter&&u,j.enter&&j.closed&&c,j.enter&&!j.closed&&d,j.leave&&p,j.leave&&!j.closed&&f,j.leave&&j.closed&&m,!j.transition&&S&&h))?void 0:r.trim())||void 0,...eb(j)}),N=0;return"visible"===k&&(N|=Kw.Open),"hidden"===k&&(N|=Kw.Closed),j.enter&&(N|=Kw.Opening),j.leave&&(N|=Kw.Closing),Gn.createElement(px.Provider,{value:M},Gn.createElement(Yw,{value:N},Rg({ourProps:B,theirProps:v,defaultTag:vx,features:gx,visible:"visible"===k,name:"Transition.Child"})))})),wx=Mg((function(e,t){let n=null!==Lt(dx),r=null!==Gw();return Gn.createElement(Gn.Fragment,null,!n&&r?Gn.createElement(yx,{ref:t,...e}):Gn.createElement(bx,{ref:t,...e}))})),xx=Object.assign(yx,{Child:wx,Root:yx});var _x=Mg((function(e,t){let n=`headlessui-control-${Vt()}`,[r,i]=py(),[o,s]=sy(),a=Eg(),{disabled:l=a||!1,...u}=e,c=Ot((()=>({disabled:l})),[l]);return Gn.createElement(Pg,{value:l},Gn.createElement(i,{value:r},Gn.createElement(s,{value:o},Gn.createElement(Jg,{id:n},Rg({ourProps:{ref:t,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...u,children:Gn.createElement(Qg,null,"function"==typeof u.children?u.children(c):u.children)},slot:c,defaultTag:"div",name:"Field"})))))}));var Sx=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ex(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.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 Sx.test(s)&&(s=s.replace(Sx,"")),s}function Px(e){let t=At(""),n=At("");return xg((()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Ex(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Ex(e).trim()}(r).trim().toLowerCase();return t.current=i,n.current=o,o}))}var kx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(kx||{}),Tx=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Tx||{}),Cx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Cx||{}),Ax=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Ax||{});function Rx(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Iy(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}var Ox={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,o,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===Xw.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Xw.Specific)return{...a,activeOptionIndex:e.options.findIndex((e=>e.id===t.id))};if(t.focus===Xw.Previous){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,s=Zw(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...a,activeOptionIndex:s}}}}else if(t.focus===Xw.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=Zw(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.nextElementSibling)===t.current||null===(null==(s=t.current)?void 0:s.nextElementSibling))return{...a,activeOptionIndex:i}}}}let l=Rx(e),u=Zw(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Rx(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Rx(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Fx=Z(null);function Lx(e){let t=Lt(Fx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Lx),t}return t}Fx.displayName="ListboxActionsContext";var Dx=Z(null);function Mx(e){let t=Lt(Dx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Mx),t}return t}function Vx(e,t){return Tg(t.type,Ox,e,t)}Dx.displayName="ListboxDataContext";var Ix=O;var jx=Z(!1),Bx=Cg.RenderStrategy|Cg.Static;var Nx=O;var Ux=Mg((function(e,t){var n;let r=Eg(),{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}=e;const v=h?"horizontal":"vertical";let g=ny(t),y=Bg(o),[b=(p?[]:void 0),w]=jg(i,l,y),[x,_]=kt(Vx,{dataRef:{current:null},listboxState:f?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:f}),S=At({static:!1,hold:!1}),E=At(new Map),P=function(e=vy){return Ft(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(u),k=Ft((e=>Tg(T.mode,{1:()=>b.some((t=>P(t,e))),0:()=>P(b,e)})),[b]),T=Ot((()=>({...x,value:b,disabled:d,invalid:c,mode:p?1:0,orientation:v,compare:P,isSelected:k,optionsPropsRef:S,listRef:E})),[b,d,c,p,x,E]);bg((()=>{x.dataRef.current=T}),[T]),$y(0===T.listboxState,[T.buttonElement,T.optionsElement],((e,t)=>{var n;_({type:1}),Dy(t,Ly.Loose)||(e.preventDefault(),null==(n=T.buttonElement)||n.focus())}));let C=Ot((()=>({open:0===T.listboxState,disabled:d,invalid:c,value:b})),[T,d,b,c]),A=xg((e=>{let t=T.options.find((t=>t.id===e));t&&V(t.dataRef.current.value)})),R=xg((()=>{if(null!==T.activeOptionIndex){let{dataRef:e,id:t}=T.options[T.activeOptionIndex];V(e.current.value),_({type:2,focus:Xw.Specific,id:t})}})),O=xg((()=>_({type:0}))),F=xg((()=>_({type:1}))),L=yg(),D=xg(((e,t,n)=>{L.dispose(),L.microTask((()=>e===Xw.Specific?_({type:2,focus:Xw.Specific,id:t,trigger:n}):_({type:2,focus:e,trigger:n})))})),M=xg(((e,t)=>(_({type:5,id:e,dataRef:t}),()=>_({type:6,id:e})))),V=xg((e=>Tg(T.mode,{0:()=>null==w?void 0:w(e),1(){let t=T.value.slice(),n=t.findIndex((t=>P(t,e)));return-1===n?t.push(e):t.splice(n,1),null==w?void 0:w(t)}}))),I=xg((e=>_({type:3,value:e}))),j=xg((()=>_({type:4}))),B=xg((e=>{_({type:7,element:e})})),N=xg((e=>{_({type:8,element:e})})),U=Ot((()=>({onChange:V,registerOption:M,goToOption:D,closeListbox:F,openListbox:O,selectActiveOption:R,selectOption:A,search:I,clearSearch:j,setButtonElement:B,setOptionsElement:N})),[]),[H,$]=py({inherit:!0}),W={ref:g},z=Ft((()=>{if(void 0!==y)return null==w?void 0:w(y)}),[w,y]);return Gn.createElement($,{value:H,props:{htmlFor:null==(n=T.buttonElement)?void 0:n.id},slot:{open:0===T.listboxState,disabled:d}},Gn.createElement($w,null,Gn.createElement(Fx.Provider,{value:U},Gn.createElement(Dx.Provider,{value:T},Gn.createElement(Yw,{value:Tg(T.listboxState,{0:Kw.Open,1:Kw.Closed})},null!=a&&null!=b&&Gn.createElement(Gg,{disabled:d,data:{[a]:b},form:s,onReset:z}),Rg({ourProps:W,theirProps:m,slot:C,defaultTag:Ix,name:"Listbox"}))))))})),Hx=Mg((function(e,t){var n;let r=Mx("Listbox.Button"),i=Lx("Listbox.Button"),o=Vt(),s=Zg(),{id:a=s||`headlessui-listbox-button-${o}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...c}=e,d=function(){let e=At([]),t=Ft((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}(),h=ny(t,Lt(Nw).setReference,i.setButtonElement),p=Lt(Nw).getReferenceProps,f=xg((e=>{switch(e.key){case uy.Enter:$g(e.currentTarget);break;case uy.Space:case uy.ArrowDown:e.preventDefault(),Nn((()=>i.openListbox())),r.value||i.goToOption(Xw.First);break;case uy.ArrowUp:e.preventDefault(),Nn((()=>i.openListbox())),r.value||i.goToOption(Xw.Last)}})),m=xg((e=>{if(e.key===uy.Space)e.preventDefault()})),v=xg((e=>{var t;if(ey(e.currentTarget))return e.preventDefault();0===r.listboxState?(Nn((()=>i.closeListbox())),null==(t=r.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),i.openListbox())})),g=xg((e=>e.preventDefault())),y=hy([a]),b=oy(),{isFocusVisible:w,focusProps:x}=dg({autoFocus:u}),{isHovered:_,hoverProps:S}=cg({isDisabled:l}),{pressed:E,pressProps:P}=_g({disabled:l}),k=Ot((()=>({open:0===r.listboxState,active:E||0===r.listboxState,disabled:l,invalid:r.invalid,value:r.value,hover:_,focus:w,autofocus:u})),[r.listboxState,r.value,l,_,w,E,r.invalid,u]);return Rg({mergeRefs:d,ourProps:Dg(p(),{ref:h,id:a,type:zy(e,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":b,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:m,onKeyPress:g,onClick:v},x,S,P),theirProps:c,slot:k,defaultTag:"button",name:"Listbox.Button"})})),$x=my,Wx=Mg((function(e,t){var n,r;let i=Vt(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,d=function(e){return Ot((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(s),[h,p]=Pt(null);d&&(a=!0);let f=Mx("Listbox.Options"),m=Lx("Listbox.Options"),v=Wy(f.optionsElement),g=Gw(),[y,b]=tb(u,h,null!==g?(g&Kw.Open)===Kw.Open:0===f.listboxState);!function(e,t,n){let r=wg((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));Tt((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let i=gg();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>r.current(n)));e.observe(n),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,r,e])}(y,f.buttonElement,m.closeListbox),Yy(!f.__demoMode&&(l&&0===f.listboxState),v),function(e,{allowed:t,disallowed:n}={}){let r=_y(e,"inert-others");bg((()=>{var e,i;if(!r)return;let o=gg();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add(Py(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=mg(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)s.some((t=>e.contains(t)))||o.add(Py(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!f.__demoMode&&(l&&0===f.listboxState),{allowed:Ft((()=>[f.buttonElement,f.optionsElement]),[f.buttonElement,f.optionsElement])});let w=!function(e,t){let n=At({left:0,top:0});if(bg((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(n.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==f.listboxState,f.buttonElement)&&y,x=function(e,t){let[n,r]=Pt(t);return!e&&n!==t&&r(t),e?n:t}(y&&1===f.listboxState,f.value),_=xg((e=>f.compare(x,e))),S=Ot((()=>{var e;if(null==d||null==(e=null==d?void 0:d.to)||!e.includes("selection"))return null;let t=f.options.findIndex((e=>_(e.dataRef.current.value)));return-1===t&&(t=0),t}),[d,f.options]),[E,P]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Lt(Uw),n=Ot((()=>e),[JSON.stringify(e,"undefined"!=typeof HTMLElement?(e,t)=>t instanceof HTMLElement?t.outerHTML:t:void 0)]);bg((()=>{t?.(null!=n?n:null)}),[t,n]);let r=Lt(Nw);return Ot((()=>[r.setFloating,e?r.styles:{}]),[r.setFloating,e,r.styles])}((()=>{if(null==d)return;if(null===S)return{...d,inner:void 0};let e=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:e},index:S}}})()),k=function(){let{getFloatingProps:e,slot:t}=Lt(Nw);return Ft(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),T=ny(t,d?E:null,m.setOptionsElement,p),C=yg();Tt((()=>{var e;let t=f.optionsElement;t&&0===f.listboxState&&t!==(null==(e=mg(t))?void 0:e.activeElement)&&t?.focus({preventScroll:!0})}),[f.listboxState,f.optionsElement]);let A=xg((e=>{var t,n;switch(C.dispose(),e.key){case uy.Space:if(""!==f.searchQuery)return e.preventDefault(),e.stopPropagation(),m.search(e.key);case uy.Enter:if(e.preventDefault(),e.stopPropagation(),null!==f.activeOptionIndex){let{dataRef:e}=f.options[f.activeOptionIndex];m.onChange(e.current.value)}0===f.mode&&(Nn((()=>m.closeListbox())),null==(t=f.buttonElement)||t.focus({preventScroll:!0}));break;case Tg(f.orientation,{vertical:uy.ArrowDown,horizontal:uy.ArrowRight}):return e.preventDefault(),e.stopPropagation(),m.goToOption(Xw.Next);case Tg(f.orientation,{vertical:uy.ArrowUp,horizontal:uy.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),m.goToOption(Xw.Previous);case uy.Home:case uy.PageUp:return e.preventDefault(),e.stopPropagation(),m.goToOption(Xw.First);case uy.End:case uy.PageDown:return e.preventDefault(),e.stopPropagation(),m.goToOption(Xw.Last);case uy.Escape:return e.preventDefault(),e.stopPropagation(),Nn((()=>m.closeListbox())),void(null==(n=f.buttonElement)||n.focus({preventScroll:!0}));case uy.Tab:e.preventDefault(),e.stopPropagation(),Nn((()=>m.closeListbox())),jy(f.buttonElement,e.shiftKey?Ay.Previous:Ay.Next);break;default:1===e.key.length&&(m.search(e.key),C.setTimeout((()=>m.clearSearch()),350))}})),R=null==(n=f.buttonElement)?void 0:n.id,O=Ot((()=>({open:0===f.listboxState})),[f.listboxState]),F=Dg(d?k():{},{id:o,ref:T,"aria-activedescendant":null===f.activeOptionIndex||null==(r=f.options[f.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===f.mode||void 0,"aria-labelledby":R,"aria-orientation":f.orientation,onKeyDown:A,role:"listbox",tabIndex:0===f.listboxState?0:void 0,style:{...c.style,...P,"--button-width":gy(f.buttonElement,!0).width},...eb(b)});return Gn.createElement(ux,{enabled:!!a&&(e.static||y)},Gn.createElement(Dx.Provider,{value:1===f.mode?f:{...f,isSelected:_}},Rg({ourProps:F,theirProps:c,slot:O,defaultTag:"div",features:Bx,visible:w,name:"Listbox.Options"})))})),zx=Mg((function(e,t){let n=Vt(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=e,a=!0===Lt(jx),l=Mx("Listbox.Option"),u=Lx("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===r,d=l.isSelected(o),h=At(null),p=Px(h),f=wg({disabled:i,value:o,domRef:h,get textValue(){return p()}}),m=ny(t,h,(e=>{e?l.listRef.current.set(r,e):l.listRef.current.delete(r)}));bg((()=>{if(!l.__demoMode&&0===l.listboxState&&c&&0!==l.activationTrigger)return gg().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),bg((()=>{if(!a)return u.registerOption(r,f)}),[f,r,a]);let v=xg((e=>{var t;if(i)return e.preventDefault();u.onChange(o),0===l.mode&&(Nn((()=>u.closeListbox())),null==(t=l.buttonElement)||t.focus({preventScroll:!0}))})),g=xg((()=>{if(i)return u.goToOption(Xw.Nothing);u.goToOption(Xw.Specific,r)})),y=Zy(),b=xg((e=>{y.update(e),!i&&(c||u.goToOption(Xw.Specific,r,0))})),w=xg((e=>{y.wasMoved(e)&&(i||c||u.goToOption(Xw.Specific,r,0))})),x=xg((e=>{y.wasMoved(e)&&(i||c&&u.goToOption(Xw.Nothing))})),_=Ot((()=>({active:c,focus:c,selected:d,disabled:i,selectedOption:d&&a})),[c,d,i,a]);return!d&&a?null:Rg({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:b,onMouseEnter:b,onPointerMove:w,onMouseMove:w,onPointerLeave:x,onMouseLeave:x},theirProps:s,slot:_,defaultTag:"div",name:"Listbox.Option"})})),qx=Mg((function(e,t){let{options:n,placeholder:r,...i}=e,o={ref:ny(t)},s=Mx("ListboxSelectedOption"),a=Ot((()=>({})),[]),l=void 0===s.value||null===s.value||1===s.mode&&Array.isArray(s.value)&&0===s.value.length;return Gn.createElement(jx.Provider,{value:!0},Rg({ourProps:o,theirProps:{...i,children:Gn.createElement(Gn.Fragment,null,r&&l?r:n)},slot:a,defaultTag:Nx,name:"ListboxSelectedOption"}))})),Qx=Object.assign(Ux,{Button:Hx,Label:$x,Options:Wx,Option:zx,SelectedOption:qx}),Kx=Z(null);Kx.displayName="GroupContext";var Gx=O;var Yx=Mg((function(e,t){var n;let r=Vt(),i=Zg(),o=Eg(),{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}=e,v=Lt(Kx),[g,y]=Pt(null),b=ny(At(null),t,null===v?null:v.setSwitch,y),w=Bg(u),[x,_]=jg(l,c,null!=w&&w),S=yg(),[E,P]=Pt(!1),k=xg((()=>{P(!0),_?.(!x),S.nextFrame((()=>{P(!1)}))})),T=xg((e=>{if(ey(e.currentTarget))return e.preventDefault();e.preventDefault(),k()})),C=xg((e=>{e.key===uy.Space?(e.preventDefault(),k()):e.key===uy.Enter&&$g(e.currentTarget)})),A=xg((e=>e.preventDefault())),R=hy(),O=oy(),{isFocusVisible:F,focusProps:L}=dg({autoFocus:f}),{isHovered:D,hoverProps:M}=cg({isDisabled:a}),{pressed:V,pressProps:I}=_g({disabled:a}),j=Ot((()=>({checked:x,disabled:a,hover:D,focus:F,active:V,autofocus:f,changing:E})),[x,D,F,V,a,E,f]),B=Dg({id:s,ref:b,role:"switch",type:zy(e,g),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":x,"aria-labelledby":R,"aria-describedby":O,disabled:a||void 0,autoFocus:f,onClick:T,onKeyUp:C,onKeyPress:A},L,M,I),N=Ft((()=>{if(void 0!==w)return null==_?void 0:_(w)}),[_,w]);return Gn.createElement(Gn.Fragment,null,null!=d&&Gn.createElement(Gg,{disabled:a,data:{[d]:h||"on"},overrides:{type:"checkbox",checked:x},form:p,onReset:N}),Rg({ourProps:B,theirProps:m,slot:j,defaultTag:"button",name:"Switch"}))})),Xx=function(e){var t;let[n,r]=Pt(null),[i,o]=py(),[s,a]=sy(),l=Ot((()=>({switch:n,setSwitch:r})),[n,r]),u=e;return Gn.createElement(a,{name:"Switch.Description",value:s},Gn.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=l.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Gn.createElement(Kx.Provider,{value:l},Rg({ourProps:{},theirProps:u,slot:{},defaultTag:Gx,name:"Switch.Group"}))))},Zx=my,Jx=ly,e_=Object.assign(Yx,{Group:Xx,Label:Zx,Description:Jx});function t_(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function n_(e,t,n){var r=[],i=er(e,r,n);return r.length<2?n:i+t(r)}var r_=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(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},i_=function(e){var t=ft(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=vr(n,t.registered,void 0);return nr(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return n_(t.registered,n,r_(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t_(t,vr(n,t.registered))},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=vr(n,t.registered),o="animation-"+i.name;return t_(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:er.bind(null,t.registered),merge:n_.bind(null,t.registered,n)}}({key:"css"}),o_=(i_.flush,i_.hydrate,i_.cx),s_=(i_.merge,i_.getRegisteredStyles,i_.injectGlobal,i_.keyframes,i_.css),a_=(i_.sheet,i_.cache,lo(Hx)`
14
14
  ${{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"}}}
15
15
 
16
16
  ${({hasError:e})=>e?{"--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)"}}}
17
- `),c_=lo(gy)`
17
+ `),l_=lo(my)`
18
18
  ${{display:"block",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
19
- `,d_=(e,t)=>e?t.find((t=>t.key==e))?.displayValue??"Select":"Select",h_=(e,t)=>e&&Array.isArray(e)&&0!==e.length?e.map((e=>t.find((t=>t.key==e))?.displayValue)).join(", "):"Select",p_=Xt((({label:e,items:t,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>Mr("div",{className:r,children:[Dr(Gx,{value:n||(a?[]:""),onChange:e=>{if(a){const n=e,r=e.findIndex((e=>t.find((t=>t.key==e))?.isReset));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:e)}else i(e)},multiple:a,children:({open:r})=>Mr(Lr,{children:[Dr(c_,{children:e}),Mr("div",{css:{position:"relative",marginTop:"0.5rem"},children:[Mr(u_,{as:"button",ref:l,hasError:!!o,children:[Dr("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?h_(n,t):d_(n,t)}),Dr("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:Dr(Mo,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),Dr(Sx,{show:r,leave:a_(l_({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:a_(l_({opacity:"1"})),leaveTo:a_(l_({opacity:"0"})),children:Dr(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:t.map((e=>Mr(Qx,{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:e.key,children:[Dr("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.displayValue}),Dr("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:Dr(Lo,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},e.key)))})})]})]})}),o&&Dr("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&&Dr("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})]}))),f_=e=>Mr("div",{children:[Mr(Ex,{children:[Dr(gy,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:Dr("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.label})}),Dr(n_,{checked:e.value,onChange:e.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:Dr("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))"}}})})]}),e.helperText&&Dr("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:e.helperText})]}),m_=Xt((({},e)=>{const{control:t,formState:{errors:n}}=wm(),{fields:r,append:i,remove:o}=function(e){const t=wm(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o}=e,[s,a]=Gn.useState(n._getFieldArray(r)),l=Gn.useRef(n._getFieldArray(r).map(Lm)),u=Gn.useRef(s),c=Gn.useRef(r),d=Gn.useRef(!1);c.current=r,u.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),Tm({next:({values:e,name:t})=>{if(t===c.current||!t){const t=om(e,c.current);Array.isArray(t)&&(a(t),l.current=t.map(Lm))}},subject:n._subjects.array});const h=Gn.useCallback((e=>{d.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Gn.useEffect((()=>{if(n._state.action=!1,Vm(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Mm(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=om(e.errors,r),i=om(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?um(n._formState.errors,r,t):sv(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=om(n._fields,r);!e||!e._f||Mm(n._options.reValidateMode).isOnSubmit&&Mm(n._options.mode).isOnSubmit||Zm(e,n._formValues,n._options.criteriaMode===dm.all,n._options.shouldUseNativeValidation,!0).then((e=>!Sm(e)&&n._subjects.state.next({errors:jm(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Im(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),d.current=!1}),[s,r,n]),Gn.useEffect((()=>(!om(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)})),[r,n,i,o]),{swap:Gn.useCallback(((e,t)=>{const i=n._getFieldArray(r);ov(i,e,t),ov(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,ov,{argA:e,argB:t},!1)}),[h,r,n]),move:Gn.useCallback(((e,t)=>{const i=n._getFieldArray(r);nv(i,e,t),nv(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,nv,{argA:e,argB:t},!1)}),[h,r,n]),prepend:Gn.useCallback(((e,t)=>{const i=Pm(nm(e)),o=rv(n._getFieldArray(r),i);n._names.focus=Dm(r,0,t),l.current=rv(l.current,i.map(Lm)),h(o),a(o),n._updateFieldArray(r,o,rv,{argA:ev(e)})}),[h,r,n]),append:Gn.useCallback(((e,t)=>{const i=Pm(nm(e)),o=Jm(n._getFieldArray(r),i);n._names.focus=Dm(r,o.length-1,t),l.current=Jm(l.current,i.map(Lm)),h(o),a(o),n._updateFieldArray(r,o,Jm,{argA:ev(e)})}),[h,r,n]),remove:Gn.useCallback((e=>{const t=iv(n._getFieldArray(r),e);l.current=iv(l.current,e),h(t),a(t),n._updateFieldArray(r,t,iv,{argA:e})}),[h,r,n]),insert:Gn.useCallback(((e,t,i)=>{const o=Pm(nm(t)),s=tv(n._getFieldArray(r),e,o);n._names.focus=Dm(r,e,i),l.current=tv(l.current,e,o.map(Lm)),h(s),a(s),n._updateFieldArray(r,s,tv,{argA:e,argB:ev(t)})}),[h,r,n]),update:Gn.useCallback(((e,t)=>{const i=nm(t),o=av(n._getFieldArray(r),e,i);l.current=[...o].map(((t,n)=>t&&n!==e?l.current[n]:Lm())),h(o),a([...o]),n._updateFieldArray(r,o,av,{argA:e,argB:i},!0,!1)}),[h,r,n]),replace:Gn.useCallback((e=>{const t=Pm(nm(e));l.current=t.map(Lm),h([...t]),a([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[h,r,n]),fields:Gn.useMemo((()=>s.map(((e,t)=>({...e,[i]:l.current[t]||Lm()})))),[s,i])}}({control:t,name:"audiences"});return Mr("div",{children:[Dr("label",{htmlFor:"audiences",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:"Audience"}),Dr("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:"This should be the same as the audience key in segment"}),r.map(((i,s)=>Dr("div",{css:{marginBottom:"0.5rem"},children:Dr(Om,{name:`audiences.${s}`,control:t,rules:{pattern:{value:/^[a-z0-9_]+$/,message:"Audience must be lowercase and can only contain letters, numbers and underscores."}},render:({field:t,fieldState:i})=>Dr(To,{id:`audience-${s}`,type:"text",error:n?.audiences?n?.audiences[s]?.message:"",...t,ref:e,disabled:s!==r.length-1||!i.isDirty&&!!t.value,remove:()=>o(s)})})},i.id))),Mr("button",{css:{marginTop:"0.25rem",display:"flex",fontSize:"0.875rem",lineHeight:"1.25rem"},type:"button",onClick:()=>i(""),children:[Dr(Eo,{css:{marginTop:"auto",marginBottom:"auto",height:"1rem"}})," Add Audience"]})]})})),v_=()=>{const e=function(){let{matches:e}=Lt(Cs),t=e[e.length-1];return t?t.params:{}}(),t=Ls(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=$r(),o=ji(),{isPending:s,error:a,data:l}=Zi({queryKey:[Js],queryFn:i}),u=function(e,t){const n=ji(t),[r]=Pt((()=>new Vi(n,e)));Tt((()=>{r.setOptions(e)}),[r,e]);const i=Qn(Ft((e=>r.subscribe(bi.batchCalls(e))),[r]),(()=>r.getCurrentResult())),o=Ft(((e,t)=>{r.mutate(e,t).catch(zi)}),[r]);if(i.error&&Wi(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}({mutationFn:e.promotionId?r(e.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[Js]})}),c=Br(),d=Ot((()=>((e,t)=>t?{id:t.id,category:t.category.title,promotionStatus:"Enabled"===t.status,contentfulUrl:t.contentfulContent?.contentId?`${ta(e)}/entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:t.ignoreAudiencesIfUserNotFound??!1,audiences:t.audiences}:void 0)(c.backend,l?.data.find((t=>t.id===e.promotionId)))),[c.backend,l?.data,e.promotionId]),h=function(e={}){const t=Gn.useRef(),n=Gn.useRef(),[r,i]=Gn.useState({isDirty:!1,isValidating:!1,isLoading:Nm(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Nm(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Av(e),formState:r});const o=t.current.control;return o._options=e,Tm({subject:o._subjects.state,next:e=>{Em(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Gn.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),Gn.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),Gn.useEffect((()=>{e.values&&!cv(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),Gn.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),Gn.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()})),Gn.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=_m(r,o),t.current}({mode:"onBlur",values:{id:e.promotionId||"",category:d?.category||"",isEnabled:d?.promotionStatus||!1,ignoreAudiencesIfUserNotFound:d?.ignoreAudiencesIfUserNotFound||!1,audiences:d?.audiences||[]}}),p=h.control,f=e=>{const t={promotionId:(n=e).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound,audiences:n.audiences};var n;u.mutate(t)};Tt((()=>{u.isSuccess&&t("/")}),[t,u]);const m=e.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return Dr("div",{children:"Loading..."});case"Edit"===m&&!!a:return Mr("div",{children:[Dr("p",{children:a.message}),Dr("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:()=>t("/"),children:"Back"})]});default:return Mr("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:[Dr("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:Dr("button",{onClick:()=>t("/"),children:"<"})}),Dr(xm,{...h,children:Mr("form",{onSubmit:h.handleSubmit(f),children:[Dr("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:Mr("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[Mr("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"]}),Mr("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"]}),Mr("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:[Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Om,{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:e,fieldState:t})=>Dr(To,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:t.error?.message,...e})})}),"Edit"===m&&d&&Mr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[Dr("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?Mr("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:[Dr("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),Dr(co,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]}):Dr("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"})]}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Om,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:e,fieldState:t})=>Dr(p_,{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:t.error?.message,...e})})}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Om,{name:"isEnabled",control:p,render:({field:e})=>Dr(f_,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...e})})}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Om,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:e})=>Dr(f_,{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.",...e})})}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(m_,{})})]})]})}),u.isError&&Dr("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}),Dr("div",{css:{marginTop:"1.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end",columnGap:"1.5rem"},children:u.isPending?Dr("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..."}):Dr("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"})})]})})]})}},g_=e=>Dr(Bf.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===e.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===e.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:Dr("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:Dr("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:e.children})})}),y_=e=>{const t=Os(),[n,r]=Pt("forward");var i;return i={backend:{url:e.backendUrl,accessToken:e.accessToken}},Vr=Z({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Tt((()=>{if("/"===t.pathname)r("forward");else r("backward")}),[t.pathname]),Dr("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:Dr(qf,{initial:!1,children:Mr(qs,{location:t,children:[Dr(Ws,{path:"/",element:Dr(g_,{direction:n,children:Dr(na,{})})}),Dr(Ws,{path:"/promotion",element:Dr(g_,{direction:n,children:Dr(v_,{})})}),Dr(Ws,{path:"/promotion/:promotionId",element:Dr(g_,{direction:n,children:Dr(v_,{})})})]},t.pathname)})})};!function(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ne,i.prototype.attributeChangedCallback=ie,i.prototype.disconnectedCallback=oe,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t=At(null),{EmotionProvider:n}=((e,t)=>{const[n,r]=Pt();return Tt((()=>{if(t&&t.current){const n=t=>{document.getElementsByTagName(e).length>0?t():requestAnimationFrame((()=>n(t)))};n((()=>{r(ft({container:t.current,key:e}))}))}}),[e,t]),{EmotionProvider:({children:e})=>n?Dr(xr,{value:n,children:e}):Dr(Lr,{})}})("promoted-benefits-admin",t);return Mr(Lr,{children:[Dr("head",{ref:t}),Dr(n,{children:Dr(Bi,{client:Zs||(Zs=new Ri({defaultOptions:{queries:{retry:(e,t)=>t instanceof Nr&&![401,403].includes(t.response?.status||0)}}})),children:Mr(Gs,{basename:e.hashRouteBase,children:[Dr(jr,{}),Dr("body",{children:Dr(y_,{...e})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();
19
+ `,u_=(e,t)=>e?t.find((t=>t.key==e))?.displayValue??"Select":"Select",c_=(e,t)=>e&&Array.isArray(e)&&0!==e.length?e.map((e=>t.find((t=>t.key==e))?.displayValue)).join(", "):"Select",d_=Xt((({label:e,items:t,value:n,className:r,onChange:i,error:o,helperText:s,isMultiSelect:a},l)=>Mr("div",{className:r,children:[Dr(Qx,{value:n||(a?[]:""),onChange:e=>{if(a){const n=e,r=e.findIndex((e=>t.find((t=>t.key==e))?.isReset));0===r&&n.length>1?i([...n.slice(1)]):i(r>-1?[n[r]]:e)}else i(e)},multiple:a,children:({open:r})=>Mr(Lr,{children:[Dr(l_,{children:e}),Mr("div",{css:{position:"relative",marginTop:"0.5rem"},children:[Mr(a_,{as:"button",ref:l,hasError:!!o,children:[Dr("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a?c_(n,t):u_(n,t)}),Dr("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:Dr(Mo,{css:{height:"1.25rem",width:"1.25rem"},"aria-hidden":"true"})})]}),Dr(xx,{show:r,leave:o_(s_({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:o_(s_({opacity:"1"})),leaveTo:o_(s_({opacity:"0"})),children:Dr(Wx,{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:t.map((e=>Mr(zx,{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:e.key,children:[Dr("span",{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.displayValue}),Dr("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:Dr(Lo,{css:{height:"1.25rem",width:"1.25rem",fill:"inherit"},"aria-hidden":"true"})})]},e.key)))})})]})]})}),o&&Dr("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&&Dr("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})]}))),h_=e=>Mr("div",{children:[Mr(_x,{children:[Dr(my,{as:"p",css:{fontSize:"0.875rem",lineHeight:"1.25rem"},children:Dr("span",{css:{fontWeight:"700","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.label})}),Dr(e_,{checked:e.value,onChange:e.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:Dr("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))"}}})})]}),e.helperText&&Dr("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:e.helperText})]}),p_=Xt((({},e)=>{const{control:t,formState:{errors:n}}=ym(),{fields:r,append:i,remove:o}=function(e){const t=ym(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o}=e,[s,a]=Gn.useState(n._getFieldArray(r)),l=Gn.useRef(n._getFieldArray(r).map(Om)),u=Gn.useRef(s),c=Gn.useRef(r),d=Gn.useRef(!1);c.current=r,u.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),Pm({next:({values:e,name:t})=>{if(t===c.current||!t){const t=rm(e,c.current);Array.isArray(t)&&(a(t),l.current=t.map(Om))}},subject:n._subjects.array});const h=Gn.useCallback((e=>{d.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Gn.useEffect((()=>{if(n._state.action=!1,Dm(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Lm(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=rm(e.errors,r),i=rm(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?am(n._formState.errors,r,t):iv(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=rm(n._fields,r);!e||!e._f||Lm(n._options.reValidateMode).isOnSubmit&&Lm(n._options.mode).isOnSubmit||Ym(e,n._formValues,n._options.criteriaMode===um.all,n._options.shouldUseNativeValidation,!0).then((e=>!xm(e)&&n._subjects.state.next({errors:Vm(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Mm(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),d.current=!1}),[s,r,n]),Gn.useEffect((()=>(!rm(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)})),[r,n,i,o]),{swap:Gn.useCallback(((e,t)=>{const i=n._getFieldArray(r);rv(i,e,t),rv(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,rv,{argA:e,argB:t},!1)}),[h,r,n]),move:Gn.useCallback(((e,t)=>{const i=n._getFieldArray(r);ev(i,e,t),ev(l.current,e,t),h(i),a(i),n._updateFieldArray(r,i,ev,{argA:e,argB:t},!1)}),[h,r,n]),prepend:Gn.useCallback(((e,t)=>{const i=Sm(em(e)),o=tv(n._getFieldArray(r),i);n._names.focus=Fm(r,0,t),l.current=tv(l.current,i.map(Om)),h(o),a(o),n._updateFieldArray(r,o,tv,{argA:Zm(e)})}),[h,r,n]),append:Gn.useCallback(((e,t)=>{const i=Sm(em(e)),o=Xm(n._getFieldArray(r),i);n._names.focus=Fm(r,o.length-1,t),l.current=Xm(l.current,i.map(Om)),h(o),a(o),n._updateFieldArray(r,o,Xm,{argA:Zm(e)})}),[h,r,n]),remove:Gn.useCallback((e=>{const t=nv(n._getFieldArray(r),e);l.current=nv(l.current,e),h(t),a(t),n._updateFieldArray(r,t,nv,{argA:e})}),[h,r,n]),insert:Gn.useCallback(((e,t,i)=>{const o=Sm(em(t)),s=Jm(n._getFieldArray(r),e,o);n._names.focus=Fm(r,e,i),l.current=Jm(l.current,e,o.map(Om)),h(s),a(s),n._updateFieldArray(r,s,Jm,{argA:e,argB:Zm(t)})}),[h,r,n]),update:Gn.useCallback(((e,t)=>{const i=em(t),o=ov(n._getFieldArray(r),e,i);l.current=[...o].map(((t,n)=>t&&n!==e?l.current[n]:Om())),h(o),a([...o]),n._updateFieldArray(r,o,ov,{argA:e,argB:i},!0,!1)}),[h,r,n]),replace:Gn.useCallback((e=>{const t=Sm(em(e));l.current=t.map(Om),h([...t]),a([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[h,r,n]),fields:Gn.useMemo((()=>s.map(((e,t)=>({...e,[i]:l.current[t]||Om()})))),[s,i])}}({control:t,name:"audiences"});return Mr("div",{children:[Dr("label",{htmlFor:"audiences",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:"Audience"}),Dr("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:"This should be the same as the audience key in segment"}),r.map(((i,s)=>Dr("div",{css:{marginBottom:"0.5rem"},children:Dr(Am,{name:`audiences.${s}`,control:t,rules:{pattern:{value:/^[a-z0-9_]+$/,message:"Audience must be lowercase and can only contain letters, numbers and underscores."}},render:({field:t,fieldState:i})=>Dr(To,{id:`audience-${s}`,type:"text",error:n?.audiences?n?.audiences[s]?.message:"",...t,ref:e,disabled:s!==r.length-1||!i.isDirty&&!!t.value,remove:()=>o(s)})})},i.id))),Mr("button",{css:{marginTop:"0.25rem",display:"flex",fontSize:"0.875rem",lineHeight:"1.25rem"},type:"button",onClick:()=>i(""),children:[Dr(Eo,{css:{marginTop:"auto",marginBottom:"auto",height:"1rem"}})," Add Audience"]})]})})),f_=()=>{const e=function(){let{matches:e}=Lt(ks),t=e[e.length-1];return t?t.params:{}}(),t=Os(),{createPromotion:n,updatePromotion:r,getAllPromotions:i}=$r(),o=ji(),{isPending:s,error:a,data:l}=Zi({queryKey:[Xs],queryFn:i}),u=function(e,t){const n=ji(t),[r]=Pt((()=>new Vi(n,e)));Tt((()=>{r.setOptions(e)}),[r,e]);const i=Qn(Ft((e=>r.subscribe(bi.batchCalls(e))),[r]),(()=>r.getCurrentResult())),o=Ft(((e,t)=>{r.mutate(e,t).catch(zi)}),[r]);if(i.error&&Wi(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}({mutationFn:e.promotionId?r(e.promotionId):n,onSuccess:()=>o.invalidateQueries({queryKey:[Xs]})}),c=Br(),d=Ot((()=>((e,t)=>t?{id:t.id,category:t.category.title,promotionStatus:"Enabled"===t.status,contentfulUrl:t.contentfulContent?.contentId?`${Js(e)}/entries/${t.contentfulContent.contentId}?focusedField=slug`:void 0,ignoreAudiencesIfUserNotFound:t.ignoreAudiencesIfUserNotFound??!1,audiences:t.audiences}:void 0)(c.backend,l?.data.find((t=>t.id===e.promotionId)))),[c.backend,l?.data,e.promotionId]),h=function(e={}){const t=Gn.useRef(),n=Gn.useRef(),[r,i]=Gn.useState({isDirty:!1,isValidating:!1,isLoading:jm(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:jm(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Tv(e),formState:r});const o=t.current.control;return o._options=e,Pm({subject:o._subjects.state,next:e=>{_m(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Gn.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),Gn.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),Gn.useEffect((()=>{e.values&&!lv(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),Gn.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),Gn.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()})),Gn.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=wm(r,o),t.current}({mode:"onBlur",values:{id:e.promotionId||"",category:d?.category||"",isEnabled:d?.promotionStatus||!1,ignoreAudiencesIfUserNotFound:d?.ignoreAudiencesIfUserNotFound||!1,audiences:d?.audiences||[]}}),p=h.control,f=e=>{const t={promotionId:(n=e).id,category:n.category,isEnabled:n.isEnabled,ignoreAudiencesIfUserNotFound:n.ignoreAudiencesIfUserNotFound,audiences:n.audiences};var n;u.mutate(t)};Tt((()=>{u.isSuccess&&t("/")}),[t,u]);const m=e.promotionId?"Edit":"Add";switch(!0){case"Edit"===m&&s:return Dr("div",{children:"Loading..."});case"Edit"===m&&!!a:return Mr("div",{children:[Dr("p",{children:a.message}),Dr("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:()=>t("/"),children:"Back"})]});default:return Mr("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:[Dr("div",{css:{marginTop:"1rem",verticalAlign:"top"},children:Dr("button",{onClick:()=>t("/"),children:"<"})}),Dr(bm,{...h,children:Mr("form",{onSubmit:h.handleSubmit(f),children:[Dr("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:Mr("div",{css:{borderBottomWidth:"1px",borderColor:"rgb(17 24 39 / 0.1)",paddingBottom:"3rem"},children:[Mr("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"]}),Mr("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"]}),Mr("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:[Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Am,{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:e,fieldState:t})=>Dr(To,{label:"Promotion Id",id:"id",type:"text",disabled:"Edit"==m,helperText:"This should be the same as the contentful slug",error:t.error?.message,...e})})}),"Edit"===m&&d&&Mr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:[Dr("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?Mr("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:[Dr("span",{css:{lineHeight:"1.25rem"},children:"Linked"}),Dr(co,{css:{marginTop:"auto",marginBottom:"auto",marginLeft:"0.25rem",height:"0.75rem",width:"0.75rem"}})]}):Dr("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"})]}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Am,{name:"category",control:p,rules:{required:"Please provide a category"},render:({field:e,fieldState:t})=>Dr(d_,{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:t.error?.message,...e})})}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Am,{name:"isEnabled",control:p,render:({field:e})=>Dr(h_,{label:"Enabled",id:"id",helperText:"A promotion will be shown to users if it is 'Enabled' and Contentful content is available.",...e})})}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(Am,{name:"ignoreAudiencesIfUserNotFound",control:p,render:({field:e})=>Dr(h_,{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.",...e})})}),Dr("div",{css:{"@media (min-width: 640px)":{gridColumn:"span 4 / span 4"}},children:Dr(p_,{})})]})]})}),u.isError&&Dr("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}),Dr("div",{css:{marginTop:"1.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end",columnGap:"1.5rem"},children:u.isPending?Dr("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..."}):Dr("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"})})]})})]})}},m_=e=>Dr(If.div,{css:{position:"absolute",bottom:"0px",left:"0px",right:"0px",top:"0px"},initial:{x:"forward"===e.direction?"100%":"-100%"},animate:{x:"0"},exit:{x:"forward"===e.direction?"-100%":"100%"},transition:{duration:.5,type:"spring"},children:Dr("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:Dr("div",{css:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 640px)":{padding:"1.5rem"}},children:e.children})})}),v_=e=>{const t=As(),[n,r]=Pt("forward");var i;return i={backend:{url:e.backendUrl,accessToken:e.accessToken}},Vr=Z({...i,backend:{url:i.backend.url.replace(/\/?$/,""),accessToken:i.backend.accessToken}}),Tt((()=>{if("/"===t.pathname)r("forward");else r("backward")}),[t.pathname]),Dr("div",{class:"mx-auto max-w-7xl sm:px-6 lg:px-8 relative",children:Dr(Wf,{initial:!1,children:Mr(Ws,{location:t,children:[Dr(Hs,{path:"/",element:Dr(m_,{direction:n,children:Dr(ea,{})})}),Dr(Hs,{path:"/promotion",element:Dr(m_,{direction:n,children:Dr(f_,{})})}),Dr(Hs,{path:"/promotion/:promotionId",element:Dr(m_,{direction:n,children:Dr(f_,{})})})]},t.pathname)})})};!function(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ne,i.prototype.attributeChangedCallback=ie,i.prototype.disconnectedCallback=oe,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t=At(null),{EmotionProvider:n}=((e,t)=>{const[n,r]=Pt();return Tt((()=>{if(t&&t.current){const n=t=>{document.getElementsByTagName(e).length>0?t():requestAnimationFrame((()=>n(t)))};n((()=>{r(ft({container:t.current,key:e}))}))}}),[e,t]),{EmotionProvider:({children:e})=>n?Dr(xr,{value:n,children:e}):Dr(Lr,{})}})("promoted-benefits-admin",t);return Mr(Lr,{children:[Dr("head",{ref:t}),Dr(n,{children:Dr(Bi,{client:Ys||(Ys=new Ri({defaultOptions:{queries:{retry:(e,t)=>t instanceof Nr&&![401,403].includes(t.response?.status||0)}}})),children:Mr(Qs,{basename:e.hashRouteBase,children:[Dr(jr,{}),Dr("body",{children:Dr(v_,{...e})})]})})})]})}),"promoted-benefits-admin",["backend-url","access-token"],{shadow:!0})}();