@datacrest/dcuikit 1.0.41 → 1.0.43

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.
@@ -50,7 +50,7 @@ object-assign
50
50
  *
51
51
  * This source code is licensed under the MIT license found in the
52
52
  * LICENSE file in the root directory of this source tree.
53
- */var Sx=(kx||(kx=1,"production"===process.env.NODE_ENV?xx.exports=function(){if(wx)return Ox;wx=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case n:case i:case o:case u:case p:return e;default:switch(e=e&&e.$$typeof){case s:case l:case c:case d:case f:case a:return e;default:return m}}case r:return m}}}return e=Symbol.for("react.module.reference"),Ox.ContextConsumer=l,Ox.ContextProvider=a,Ox.Element=t,Ox.ForwardRef=c,Ox.Fragment=n,Ox.Lazy=d,Ox.Memo=f,Ox.Portal=r,Ox.Profiler=i,Ox.StrictMode=o,Ox.Suspense=u,Ox.SuspenseList=p,Ox.isAsyncMode=function(){return!1},Ox.isConcurrentMode=function(){return!1},Ox.isContextConsumer=function(e){return h(e)===l},Ox.isContextProvider=function(e){return h(e)===a},Ox.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ox.isForwardRef=function(e){return h(e)===c},Ox.isFragment=function(e){return h(e)===n},Ox.isLazy=function(e){return h(e)===d},Ox.isMemo=function(e){return h(e)===f},Ox.isPortal=function(e){return h(e)===r},Ox.isProfiler=function(e){return h(e)===i},Ox.isStrictMode=function(e){return h(e)===o},Ox.isSuspense=function(e){return h(e)===u},Ox.isSuspenseList=function(e){return h(e)===p},Ox.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===p||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Ox.typeOf=h,Ox}():xx.exports=(Ex||(Ex=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var h=e.type;switch(h){case n:case i:case o:case u:case p:return h;default:var y=h&&h.$$typeof;switch(y){case s:case l:case c:case d:case f:case a:return y;default:return m}}case r:return m}}}e=Symbol.for("react.module.reference");var y=l,v=a,g=t,b=c,w=n,x=d,O=f,E=r,k=i,j=o,S=u,P=p,C=!1,T=!1;jx.ContextConsumer=y,jx.ContextProvider=v,jx.Element=g,jx.ForwardRef=b,jx.Fragment=w,jx.Lazy=x,jx.Memo=O,jx.Portal=E,jx.Profiler=k,jx.StrictMode=j,jx.Suspense=S,jx.SuspenseList=P,jx.isAsyncMode=function(e){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},jx.isConcurrentMode=function(e){return T||(T=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},jx.isContextConsumer=function(e){return h(e)===l},jx.isContextProvider=function(e){return h(e)===a},jx.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},jx.isForwardRef=function(e){return h(e)===c},jx.isFragment=function(e){return h(e)===n},jx.isLazy=function(e){return h(e)===d},jx.isMemo=function(e){return h(e)===f},jx.isPortal=function(e){return h(e)===r},jx.isProfiler=function(e){return h(e)===i},jx.isStrictMode=function(e){return h(e)===o},jx.isSuspense=function(e){return h(e)===u},jx.isSuspenseList=function(e){return h(e)===p},jx.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===p||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},jx.typeOf=h}()),jx)),xx.exports);var Px=Symbol.for("react.element"),Cx=Symbol.for("react.transitional.element"),Tx=Symbol.for("react.fragment");function Nx(e){return e&&"object"===ox(e)&&(e.$$typeof===Px||e.$$typeof===Cx)&&e.type===Tx}var Mx=Number(u.split(".")[0]),Ax=function(e,t){"function"==typeof e?e(t):"object"===ox(e)&&e&&"current"in e&&(e.current=t)},zx=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(e){t.forEach(function(t){Ax(t,e)})}},Lx=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o=function(){return zx.apply(void 0,r)},i=r,a=function(e,t){return e.length!==t.length||e.every(function(e,r){return e!==t[r]})},"value"in(l=e.useRef({})).current&&!a(l.current.condition,i)||(l.current.value=o(),l.current.condition=i),l.current.value;var o,i,a,l},Dx=function(e){var t,r;if(!e)return!1;if(_x(e)&&Mx>=19)return!0;var n=Sx.isMemo(e)?e.type.type:e.type;return!!("function"!=typeof n||null!==(t=n.prototype)&&void 0!==t&&t.render||n.$$typeof===Sx.ForwardRef)&&!!("function"!=typeof e||null!==(r=e.prototype)&&void 0!==r&&r.render||e.$$typeof===Sx.ForwardRef)};function _x(e){return p(e)&&!Nx(e)}var Ix=function(e){if(e&&_x(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},Rx=e.createContext(null);function Bx(e){return function(e){if(Array.isArray(e))return ux(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||px(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Wx="test"!==process.env.NODE_ENV&&dx()?e.useLayoutEffect:e.useEffect,Fx=function(t,r){var n=e.useRef(!0);Wx(function(){return t(n.current)},r),Wx(function(){return n.current=!1,function(){n.current=!0}},[])},$x=[];var Vx="data-rc-order",Hx="data-rc-priority",Ux=new Map;function qx(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function Yx(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Xx(e){return Array.from((Ux.get(e)||e).children).filter(function(e){return"STYLE"===e.tagName})}function Gx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!dx())return null;var r=t.csp,n=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(n),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Vx,a),l&&i&&s.setAttribute(Hx,"".concat(i)),null!=r&&r.nonce&&(s.nonce=null==r?void 0:r.nonce),s.innerHTML=e;var c=Yx(t),u=c.firstChild;if(n){if(l){var p=(t.styles||Xx(c)).filter(function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Vx)))return!1;var t=Number(e.getAttribute(Hx)||0);return i>=t});if(p.length)return c.insertBefore(s,p[p.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function Kx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Yx(t);return(t.styles||Xx(r)).find(function(r){return r.getAttribute(qx(t))===e})}function Zx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Kx(e,t);r&&Yx(t).removeChild(r)}function Jx(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Yx(r),o=Xx(n),i=sx(sx({},r),{},{styles:o});!function(e,t){var r=Ux.get(e);if(!r||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}(document,r)){var n=Gx("",t),o=n.parentNode;Ux.set(e,o),e.removeChild(n)}}(n,i);var a=Kx(t,i);if(a){var l,s,c;if(null!==(l=i.csp)&&void 0!==l&&l.nonce&&a.nonce!==(null===(s=i.csp)||void 0===s?void 0:s.nonce))a.nonce=null===(c=i.csp)||void 0===c?void 0:c.nonce;return a.innerHTML!==e&&(a.innerHTML=e),a}var u=Gx(e,i);return u.setAttribute(qx(i),t),u}function Qx(e){return"undefined"!=typeof document&&e&&e instanceof Element?function(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n,o,i=r.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var a=getComputedStyle(e);i.scrollbarColor=a.scrollbarColor,i.scrollbarWidth=a.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),s=parseInt(l.width,10),c=parseInt(l.height,10);try{var u=s?"width: ".concat(l.width,";"):"",p=c?"height: ".concat(l.height,";"):"";Jx("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(p,"\n}"),t)}catch(e){console.error(e),n=s,o=c}}document.body.appendChild(r);var f=e&&n&&!isNaN(n)?n:r.offsetWidth-r.clientWidth,d=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Zx(t),{width:f,height:d}}(e):{width:0,height:0}}var eO="rc-util-locker-".concat(Date.now()),tO=0;function rO(t){var r=!!t,n=fx(e.useState(function(){return tO+=1,"".concat(eO,"_").concat(tO)}),1)[0];Fx(function(){if(r){var e=Qx(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;Jx("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),n)}else Zx(n);return function(){Zx(n)}},[r,n])}var nO=function(e){return!1!==e&&(dx()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},oO=e.forwardRef(function(t,r){var n=t.open,o=t.autoLock,i=t.getContainer,a=t.debug,l=t.autoDestroy,s=void 0===l||l,c=t.children,u=fx(e.useState(n),2),p=u[0],f=u[1],d=p||n;"production"!==process.env.NODE_ENV&&bx(dx()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),e.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=fx(e.useState(function(){return nO(i)}),2),h=m[0],y=m[1];e.useEffect(function(){var e=nO(i);y(null!=e?e:null)});var v=function(t,r){var n=fx(e.useState(function(){if(!dx())return null;var e=document.createElement("div");return"production"!==process.env.NODE_ENV&&r&&e.setAttribute("data-debug",r),e}),1)[0],o=e.useRef(!1),i=e.useContext(Rx),a=fx(e.useState($x),2),l=a[0],s=a[1],c=i||(o.current?void 0:function(e){s(function(t){return[e].concat(Bx(t))})});function u(){n.parentElement||document.body.appendChild(n),o.current=!0}function p(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return Fx(function(){return t?i?i(u):u():p(),p},[t]),Fx(function(){l.length&&(l.forEach(function(e){return e()}),s($x))},[l]),[n,c]}(d&&!h,a),g=fx(v,2),b=g[0],w=g[1],x=null!=h?h:b;rO(o&&n&&dx()&&(x===b||x===document.body));var O=null;c&&Dx(c)&&r&&(O=c.ref);var E=Lx(O,r);if(!d||!dx()||void 0===h)return null;var k=!1===x||!1,j=c;return r&&(j=e.cloneElement(c,{ref:E})),e.createElement(Rx.Provider,{value:w},k?j:T(j,x))});function iO(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return t.Children.forEach(e,function(e){(null!=e||r.keepEmpty)&&(Array.isArray(e)?n=n.concat(iO(e)):Nx(e)&&e.props?n=n.concat(iO(e.props.children,r)):n.push(e))}),n}function aO(e){return e instanceof HTMLElement||e instanceof SVGElement}function lO(e){var r,n=function(e){return e&&"object"===ox(e)&&aO(e.nativeElement)?e.nativeElement:aO(e)?e:null}(e);return n||(e instanceof t.Component?null===(r=C.findDOMNode)||void 0===r?void 0:r.call(C,e):null)}"production"!==process.env.NODE_ENV&&(oO.displayName="Portal");var sO=e.createContext(null);var cO=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some(function(e,n){return e[0]===t&&(r=n,!0)}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];e.call(t,o[1],o[0])}},t}()}(),uO="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,pO="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),fO="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(pO):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var dO=["top","right","bottom","left","width","height","size","weight"],mO="undefined"!=typeof MutationObserver,hO=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,o=0;function i(){r&&(r=!1,e()),n&&l()}function a(){fO(i)}function l(){var e=Date.now();if(r){if(e-o<2)return;n=!0}else r=!0,n=!1,setTimeout(a,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){uO&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mO?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){uO&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;dO.some(function(e){return!!~r.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),yO=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},vO=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||pO},gO=kO(0,0,0,0);function bO(e){return parseFloat(e)||0}function wO(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(t,r){return t+bO(e["border-"+r+"-width"])},0)}function xO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return gO;var n=vO(e).getComputedStyle(e),o=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],i=e["padding-"+o];t[o]=bO(i)}return t}(n),i=o.left+o.right,a=o.top+o.bottom,l=bO(n.width),s=bO(n.height);if("border-box"===n.boxSizing&&(Math.round(l+i)!==t&&(l-=wO(n,"left","right")+i),Math.round(s+a)!==r&&(s-=wO(n,"top","bottom")+a)),!function(e){return e===vO(e).document.documentElement}(e)){var c=Math.round(l+i)-t,u=Math.round(s+a)-r;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return kO(o.left,o.top,l,s)}var OO="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof vO(e).SVGGraphicsElement}:function(e){return e instanceof vO(e).SVGElement&&"function"==typeof e.getBBox};function EO(e){return uO?OO(e)?function(e){var t=e.getBBox();return kO(0,0,t.width,t.height)}(e):xO(e):gO}function kO(e,t,r,n){return{x:e,y:t,width:r,height:n}}var jO=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=kO(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=EO(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),SO=function(e,t){var r=function(e){var t=e.x,r=e.y,n=e.width,o=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return yO(a,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),a}(t);yO(this,{target:e,contentRect:r})},PO=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new cO,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof vO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new jO(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof vO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new SO(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),CO="undefined"!=typeof WeakMap?new WeakMap:new cO,TO=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=hO.getInstance(),n=new PO(t,r,this);CO.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){TO.prototype[e]=function(){var t;return(t=CO.get(this))[e].apply(t,arguments)}});var NO=void 0!==pO.ResizeObserver?pO.ResizeObserver:TO,MO=new Map;function AO(e){e.forEach(function(e){var t,r=e.target;null===(t=MO.get(r))||void 0===t||t.forEach(function(e){return e(r)})})}var zO=new NO(AO);function LO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ix(n.key),n)}}function _O(e,t,r){return t&&DO(e.prototype,t),r&&DO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function IO(e,t){return IO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IO(e,t)}function RO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IO(e,t)}function BO(e){return BO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BO(e)}function WO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(WO=function(){return!!e})()}function FO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $O(e){var t=WO();return function(){var r,n=BO(e);if(t){var o=BO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"==ox(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return FO(e)}(this,r)}}process.env.NODE_ENV,process.env.NODE_ENV;var VO=function(){RO(r,e.Component);var t=$O(r);function r(){return LO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function HO(t,r){var n=t.children,o=t.disabled,i=e.useRef(null),a=e.useRef(null),l=e.useContext(sO),s="function"==typeof n,c=s?n(i):n,u=e.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!s&&e.isValidElement(c)&&Dx(c),f=p?Ix(c):null,d=Lx(f,i),m=function(){var e;return lO(i.current)||(i.current&&"object"===ox(i.current)?lO(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||lO(a.current)};e.useImperativeHandle(r,function(){return m()});var h=e.useRef(t);h.current=t;var y=e.useCallback(function(e){var t=h.current,r=t.onResize,n=t.data,o=e.getBoundingClientRect(),i=o.width,a=o.height,s=e.offsetWidth,c=e.offsetHeight,p=Math.floor(i),f=Math.floor(a);if(u.current.width!==p||u.current.height!==f||u.current.offsetWidth!==s||u.current.offsetHeight!==c){var d={width:p,height:f,offsetWidth:s,offsetHeight:c};u.current=d;var m=s===Math.round(i)?i:s,y=c===Math.round(a)?a:c,v=sx(sx({},d),{},{offsetWidth:m,offsetHeight:y});null==l||l(v,e,n),r&&Promise.resolve().then(function(){r(v,e)})}},[]);return e.useEffect(function(){var e,t,r=m();return r&&!o&&(e=r,t=y,MO.has(e)||(MO.set(e,new Set),zO.observe(e)),MO.get(e).add(t)),function(){return function(e,t){MO.has(e)&&(MO.get(e).delete(t),MO.get(e).size||(zO.unobserve(e),MO.delete(e)))}(r,y)}},[i.current,o]),e.createElement(VO,{ref:a},p?e.cloneElement(c,{ref:d}):c)}var UO=e.forwardRef(HO);"production"!==process.env.NODE_ENV&&(UO.displayName="SingleObserver");function qO(t,r){var n=t.children,o="function"==typeof n?[n]:iO(n);return"production"!==process.env.NODE_ENV&&(o.length>1?yx(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):0===o.length&&yx(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),o.map(function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return e.createElement(UO,nx({},t,{key:i,ref:0===o?r:void 0}),n)})}var YO=e.forwardRef(qO);function XO(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function GO(e){return function(e){return XO(e)instanceof ShadowRoot}(e)?XO(e):null}function KO(t){var r=e.useRef();r.current=t;var n=e.useCallback(function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return null===(e=r.current)||void 0===e?void 0:e.call.apply(e,[r].concat(n))},[]);return n}"production"!==process.env.NODE_ENV&&(YO.displayName="ResizeObserver"),YO.Collection=function(t){var r=t.children,n=t.onBatchResize,o=e.useRef(0),i=e.useRef([]),a=e.useContext(sO),l=e.useCallback(function(e,t,r){o.current+=1;var l=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then(function(){l===o.current&&(null==n||n(i.current),i.current=[])}),null==a||a(e,t,r)},[n,a]);return e.createElement(sO.Provider,{value:l},r)};var ZO=0,JO=sx({},e).useId,QO=JO?function(e){var t=JO();return e||("test"===process.env.NODE_ENV?"test-id":t)}:function(t){var r=fx(e.useState("ssr-id"),2),n=r[0],o=r[1];return e.useEffect(function(){var e=ZO;ZO+=1,o("rc_unique_".concat(e))},[]),t||("test"===process.env.NODE_ENV?"test-id":n)},eE=e.createContext({}),tE=function(){RO(r,e.Component);var t=$O(r);function r(){return LO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function rE(t){var r=e.useRef(!1),n=fx(e.useState(t),2),o=n[0],i=n[1];return e.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]),[o,function(e,t){t&&r.current||i(e)}]}var nE="none",oE="appear",iE="enter",aE="leave",lE="none",sE="prepare",cE="start",uE="active",pE="end",fE="prepared";function dE(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}var mE=function(e,t){var r={animationend:dE("Animation","AnimationEnd"),transitionend:dE("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}(dx(),"undefined"!=typeof window?window:{}),hE={};if(dx()){var yE=document.createElement("div");hE=yE.style}var vE={};function gE(e){if(vE[e])return vE[e];var t=mE[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o+=1){var i=r[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in hE)return vE[e]=t[i],vE[e]}return""}var bE=gE("animationend"),wE=gE("transitionend"),xE=!(!bE||!wE),OE=bE||"animationend",EE=wE||"transitionend";function kE(e,t){if(!e)return null;if("object"===ox(e)){var r=t.replace(/-\w/g,function(e){return e[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}var jE=dx()?f:a,SE=function(e){return+setTimeout(e,16)},PE=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(SE=function(e){return window.requestAnimationFrame(e)},PE=function(e){return window.cancelAnimationFrame(e)});var CE=0,TE=new Map;function NE(e){TE.delete(e)}var ME=function(e){var t=CE+=1;return function r(n){if(0===n)NE(t),e();else{var o=SE(function(){r(n-1)});TE.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};ME.cancel=function(e){var t=TE.get(e);return NE(e),PE(t)},"production"!==process.env.NODE_ENV&&(ME.ids=function(){return TE});var AE=[sE,cE,uE,pE],zE=[sE,fE],LE=!1;function DE(e){return e===uE||e===pE}var _E=function(t,r,n){var o=fx(rE(lE),2),i=o[0],a=o[1],l=function(){var t=e.useRef(null);function r(){ME.cancel(t.current)}return e.useEffect(function(){return function(){r()}},[]),[function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;r();var i=ME(function(){o<=1?n({isCanceled:function(){return i!==t.current}}):e(n,o-1)});t.current=i},r]}(),s=fx(l,2),c=s[0],u=s[1];var p=r?zE:AE;return jE(function(){if(i!==lE&&i!==pE){var e=p.indexOf(i),t=p[e+1],r=n(i);r===LE?a(t,!0):t&&c(function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)})}},[t,i]),e.useEffect(function(){return function(){u()}},[]),[function(){a(sE,!0)},i]};function IE(t,r,n,o){var i,l,s,u,p=o.motionEnter,f=void 0===p||p,d=o.motionAppear,m=void 0===d||d,h=o.motionLeave,y=void 0===h||h,v=o.motionDeadline,g=o.motionLeaveImmediately,b=o.onAppearPrepare,w=o.onEnterPrepare,x=o.onLeavePrepare,O=o.onAppearStart,E=o.onEnterStart,k=o.onLeaveStart,j=o.onAppearActive,S=o.onEnterActive,P=o.onLeaveActive,C=o.onAppearEnd,T=o.onEnterEnd,N=o.onLeaveEnd,M=o.onVisibleChanged,A=fx(rE(),2),z=A[0],L=A[1],D=(i=nE,l=e.useReducer(function(e){return e+1},0),s=fx(l,2)[1],u=e.useRef(i),[KO(function(){return u.current}),KO(function(e){u.current="function"==typeof e?e(u.current):e,s()})]),_=fx(D,2),I=_[0],R=_[1],B=fx(rE(null),2),W=B[0],F=B[1],$=I(),V=c(!1),H=c(null);function U(){return n()}var q=c(!1);function Y(){R(nE),F(null,!0)}var X=KO(function(e){var t=I();if(t!==nE){var r=U();if(!e||e.deadline||e.target===r){var n,o=q.current;t===oE&&o?n=null==C?void 0:C(r,e):t===iE&&o?n=null==T?void 0:T(r,e):t===aE&&o&&(n=null==N?void 0:N(r,e)),o&&!1!==n&&Y()}}}),G=function(t){var r=c();function n(e){e&&(e.removeEventListener(EE,t),e.removeEventListener(OE,t))}return e.useEffect(function(){return function(){n(r.current)}},[]),[function(e){r.current&&r.current!==e&&n(r.current),e&&e!==r.current&&(e.addEventListener(EE,t),e.addEventListener(OE,t),r.current=e)},n]}(X),K=fx(G,1)[0],Z=function(e){switch(e){case oE:return ax(ax(ax({},sE,b),cE,O),uE,j);case iE:return ax(ax(ax({},sE,w),cE,E),uE,S);case aE:return ax(ax(ax({},sE,x),cE,k),uE,P);default:return{}}},J=e.useMemo(function(){return Z($)},[$]),Q=fx(_E($,!t,function(e){if(e===sE){var t=J[sE];return t?t(U()):LE}var r;te in J&&F((null===(r=J[te])||void 0===r?void 0:r.call(J,U(),null))||null);return te===uE&&$!==nE&&(K(U()),v>0&&(clearTimeout(H.current),H.current=setTimeout(function(){X({deadline:!0})},v))),te===fE&&Y(),true}),2),ee=Q[0],te=Q[1],re=DE(te);q.current=re;var ne=c(null);jE(function(){if(!V.current||ne.current!==r){L(r);var e,n=V.current;V.current=!0,!n&&r&&m&&(e=oE),n&&r&&f&&(e=iE),(n&&!r&&y||!n&&g&&!r&&y)&&(e=aE);var o=Z(e);e&&(t||o[sE])?(R(e),ee()):R(nE),ne.current=r}},[r]),a(function(){($===oE&&!m||$===iE&&!f||$===aE&&!y)&&R(nE)},[m,f,y]),a(function(){return function(){V.current=!1,clearTimeout(H.current)}},[]);var oe=e.useRef(!1);a(function(){z&&(oe.current=!0),void 0!==z&&$===nE&&((oe.current||z)&&(null==M||M(z)),oe.current=!0)},[z,$]);var ie=W;return J[sE]&&te===cE&&(ie=sx({transition:"none"},ie)),[$,te,ie,null!=z?z:r]}var RE=function(t){var r=t;"object"===ox(t)&&(r=t.transitionSupport);var n=e.forwardRef(function(t,n){var o=t.visible,i=void 0===o||o,a=t.removeOnLeave,l=void 0===a||a,s=t.forceRender,u=t.children,p=t.motionName,f=t.leavedClassName,d=t.eventProps,m=function(e,t){return!(!e.motionName||!r||!1===t)}(t,e.useContext(eE).motion),h=c(),y=c();var v=fx(IE(m,i,function(){try{return h.current instanceof HTMLElement?h.current:lO(y.current)}catch(e){return null}},t),4),g=v[0],b=v[1],w=v[2],x=v[3],O=e.useRef(x);x&&(O.current=!0);var E,k=e.useCallback(function(e){h.current=e,Ax(n,e)},[n]),j=sx(sx({},d),{},{visible:i});if(u)if(g===nE)E=x?u(sx({},j),k):!l&&O.current&&f?u(sx(sx({},j),{},{className:f}),k):s||!l&&!f?u(sx(sx({},j),{},{style:{display:"none"}}),k):null;else{var S;b===sE?S="prepare":DE(b)?S="active":b===cE&&(S="start");var P=kE(p,"".concat(g,"-").concat(S));E=u(sx(sx({},j),{},{className:mg(kE(p,g),ax(ax({},P,P&&S),p,"string"==typeof p)),style:w}),k)}else E=null;e.isValidElement(E)&&Dx(E)&&(Ix(E)||(E=e.cloneElement(E,{ref:k})));return e.createElement(tE,{ref:y},E)});return n.displayName="CSSMotion",n}(xE),BE="add",WE="keep",FE="remove",$E="removed";function VE(e){var t;return sx(sx({},t=e&&"object"===ox(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function HE(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(VE)}var UE=["component","children","onVisibleChanged","onAllRemoved"],qE=["status"],YE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function XE(t){var r=t.prefixCls,n=t.align,o=t.arrow,i=t.arrowPos,a=o||{},l=a.className,s=a.content,c=i.x,u=void 0===c?0:c,p=i.y,f=void 0===p?0:p,d=e.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var h=n.points[0],y=n.points[1],v=h[0],g=h[1],b=y[0],w=y[1];v!==b&&["t","b"].includes(v)?"t"===v?m.top=0:m.bottom=0:m.top=f,g!==w&&["l","r"].includes(g)?"l"===g?m.left=0:m.right=0:m.left=u}return e.createElement("div",{ref:d,className:mg("".concat(r,"-arrow"),l),style:m},s)}function GE(t){var r=t.prefixCls,n=t.open,o=t.zIndex,i=t.mask,a=t.motion;return i?e.createElement(RE,nx({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(t){var n=t.className;return e.createElement("div",{style:{zIndex:o},className:mg("".concat(r,"-mask"),n)})}):null}!function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:RE,n=function(){RO(n,e.Component);var t=$O(n);function n(){var e;LO(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return ax(FO(e=t.call.apply(t,[this].concat(o))),"state",{keyEntities:[]}),ax(FO(e),"removeKey",function(t){e.setState(function(e){return{keyEntities:e.keyEntities.map(function(e){return e.key!==t?e:sx(sx({},e),{},{status:$E})})}},function(){0===e.state.keyEntities.filter(function(e){return e.status!==$E}).length&&e.props.onAllRemoved&&e.props.onAllRemoved()})}),e}return _O(n,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,l=o.onVisibleChanged;o.onAllRemoved;var s=cx(o,UE),c=i||e.Fragment,u={};return YE.forEach(function(e){u[e]=s[e],delete s[e]}),delete s.keys,e.createElement(c,s,n.map(function(n,o){var i=n.status,s=cx(n,qE),c=i===BE||i===WE;return e.createElement(r,nx({},u,{key:s.key,visible:c,eventProps:s,onVisibleChanged:function(e){null==l||l(e,{key:s.key}),e||t.removeKey(s.key)}}),function(e,t){return a(sx(sx({},e),{},{index:o}),t)})}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.keys,n=t.keyEntities,o=HE(r),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,o=t.length,i=HE(e),a=HE(t);i.forEach(function(e){for(var t=!1,i=n;i<o;i+=1){var l=a[i];if(l.key===e.key){n<i&&(r=r.concat(a.slice(n,i).map(function(e){return sx(sx({},e),{},{status:BE})})),n=i),r.push(sx(sx({},l),{},{status:WE})),n+=1,t=!0;break}}t||r.push(sx(sx({},e),{},{status:FE}))}),n<o&&(r=r.concat(a.slice(n).map(function(e){return sx(sx({},e),{},{status:BE})})));var l={};return r.forEach(function(e){var t=e.key;l[t]=(l[t]||0)+1}),Object.keys(l).filter(function(e){return l[e]>1}).forEach(function(e){(r=r.filter(function(t){var r=t.key,n=t.status;return r!==e||n!==FE})).forEach(function(t){t.key===e&&(t.status=WE)})}),r}(n,o);return{keyEntities:i.filter(function(e){var t=n.find(function(t){var r=t.key;return e.key===r});return!t||t.status!==$E||e.status!==FE})}}}]),n}();ax(n,"defaultProps",{component:"div"})}(xE);var KE=e.memo(function(e){return e.children},function(e,t){return t.cache});"production"!==process.env.NODE_ENV&&(KE.displayName="PopupContent");var ZE=e.forwardRef(function(t,r){var n=t.popup,o=t.className,i=t.prefixCls,a=t.style,l=t.target,s=t.onVisibleChanged,c=t.open,u=t.keepDom,p=t.fresh,f=t.onClick,d=t.mask,m=t.arrow,h=t.arrowPos,y=t.align,v=t.motion,g=t.maskMotion,b=t.forceRender,w=t.getPopupContainer,x=t.autoDestroy,O=t.portal,E=t.zIndex,k=t.onMouseEnter,j=t.onMouseLeave,S=t.onPointerEnter,P=t.onPointerDownCapture,C=t.ready,T=t.offsetX,N=t.offsetY,M=t.offsetR,A=t.offsetB,z=t.onAlign,L=t.onPrepare,D=t.stretch,_=t.targetWidth,I=t.targetHeight,R="function"==typeof n?n():n,B=c||u,W=(null==w?void 0:w.length)>0,F=fx(e.useState(!w||!W),2),$=F[0],V=F[1];if(Fx(function(){!$&&W&&l&&V(!0)},[$,W,l]),!$)return null;var H="auto",U={left:"-1000vw",top:"-1000vh",right:H,bottom:H};if(C||!c){var q,Y=y.points,X=y.dynamicInset||(null===(q=y._experimental)||void 0===q?void 0:q.dynamicInset),G=X&&"r"===Y[0][1],K=X&&"b"===Y[0][0];G?(U.right=M,U.left=H):(U.left=T,U.right=H),K?(U.bottom=A,U.top=H):(U.top=N,U.bottom=H)}var Z={};return D&&(D.includes("height")&&I?Z.height=I:D.includes("minHeight")&&I&&(Z.minHeight=I),D.includes("width")&&_?Z.width=_:D.includes("minWidth")&&_&&(Z.minWidth=_)),c||(Z.pointerEvents="none"),e.createElement(O,{open:b||B,getContainer:w&&function(){return w(l)},autoDestroy:x},e.createElement(GE,{prefixCls:i,open:c,zIndex:E,mask:d,motion:g}),e.createElement(YO,{onResize:z,disabled:!c},function(t){return e.createElement(RE,nx({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(i,"-hidden")},v,{onAppearPrepare:L,onEnterPrepare:L,visible:c,onVisibleChanged:function(e){var t;null==v||null===(t=v.onVisibleChanged)||void 0===t||t.call(v,e),s(e)}}),function(n,l){var s=n.className,u=n.style,d=mg(i,s,o);return e.createElement("div",{ref:zx(t,r,l),className:d,style:sx(sx(sx(sx({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},U),Z),u),{},{boxSizing:"border-box",zIndex:E},a),onMouseEnter:k,onMouseLeave:j,onPointerEnter:S,onClick:f,onPointerDownCapture:P},m&&e.createElement(XE,{prefixCls:i,arrow:m,arrowPos:h,align:y}),e.createElement(KE,{cache:!c&&!p},R))})}))});"production"!==process.env.NODE_ENV&&(ZE.displayName="Popup");var JE=e.forwardRef(function(t,r){var n=t.children,o=t.getTriggerDOMNode,i=Dx(n),a=e.useCallback(function(e){Ax(r,o?o(e):e)},[o]),l=Lx(a,Ix(n));return i?e.cloneElement(n,{ref:l}):n});"production"!==process.env.NODE_ENV&&(JE.displayName="TriggerWrapper");var QE=e.createContext(null);function ek(e){return e?Array.isArray(e)?e:[e]:[]}function tk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function rk(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function nk(e){return e.ownerDocument.defaultView}function ok(e){for(var t=[],r=null==e?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=nk(r).getComputedStyle(r);[o.overflowX,o.overflowY,o.overflow].some(function(e){return n.includes(e)})&&t.push(r),r=r.parentElement}return t}function ik(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ak(e){return ik(parseFloat(e),0)}function lk(e,t){var r=sx({},e);return(t||[]).forEach(function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=nk(e).getComputedStyle(e),n=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,l=t.borderLeftWidth,s=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,p=e.clientHeight,f=e.offsetWidth,d=e.clientWidth,m=ak(i),h=ak(a),y=ak(l),v=ak(s),g=ik(Math.round(c.width/f*1e3)/1e3),b=ik(Math.round(c.height/u*1e3)/1e3),w=(f-d-y-v)*g,x=(u-p-m-h)*b,O=m*b,E=h*b,k=y*g,j=v*g,S=0,P=0;if("clip"===n){var C=ak(o);S=C*g,P=C*b}var T=c.x+k-S,N=c.y+O-P,M=T+c.width+2*S-k-j-w,A=N+c.height+2*P-O-E-x;r.left=Math.max(r.left,T),r.top=Math.max(r.top,N),r.right=Math.min(r.right,M),r.bottom=Math.min(r.bottom,A)}}),r}function sk(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),r=t.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(t)}function ck(e,t){var r=fx(t||[],2),n=r[0],o=r[1];return[sk(e.width,n),sk(e.height,o)]}function uk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function pk(e,t){var r,n=t[0],o=t[1];return r="t"===n?e.y:"b"===n?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:r}}function fk(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(e,n){return n===t?r[e]||"c":e}).join("")}function dk(t,r,n,o,i,a,l){var s=fx(e.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),2),c=s[0],u=s[1],p=e.useRef(0),f=e.useMemo(function(){return r?ok(r):[]},[r]),d=e.useRef({});t||(d.current={});var m=KO(function(){if(r&&n&&t){var e,s,c,p,m,h=r,y=h.ownerDocument,v=nk(h),g=v.getComputedStyle(h).position,b=h.style.left,w=h.style.top,x=h.style.right,O=h.style.bottom,E=h.style.overflow,k=sx(sx({},i[o]),a),j=y.createElement("div");if(null===(e=h.parentElement)||void 0===e||e.appendChild(j),j.style.left="".concat(h.offsetLeft,"px"),j.style.top="".concat(h.offsetTop,"px"),j.style.position=g,j.style.height="".concat(h.offsetHeight,"px"),j.style.width="".concat(h.offsetWidth,"px"),h.style.left="0",h.style.top="0",h.style.right="auto",h.style.bottom="auto",h.style.overflow="hidden",Array.isArray(n))m={x:n[0],y:n[1],width:0,height:0};else{var S,P,C=n.getBoundingClientRect();C.x=null!==(S=C.x)&&void 0!==S?S:C.left,C.y=null!==(P=C.y)&&void 0!==P?P:C.top,m={x:C.x,y:C.y,width:C.width,height:C.height}}var T=h.getBoundingClientRect(),N=v.getComputedStyle(h),M=N.height,A=N.width;T.x=null!==(s=T.x)&&void 0!==s?s:T.left,T.y=null!==(c=T.y)&&void 0!==c?c:T.top;var z=y.documentElement,L=z.clientWidth,D=z.clientHeight,_=z.scrollWidth,I=z.scrollHeight,R=z.scrollTop,B=z.scrollLeft,W=T.height,F=T.width,$=m.height,V=m.width,H={left:0,top:0,right:L,bottom:D},U={left:-B,top:-R,right:_-B,bottom:I-R},q=k.htmlRegion,Y="visible",X="visibleFirst";"scroll"!==q&&q!==X&&(q=Y);var G=q===X,K=lk(U,f),Z=lk(H,f),J=q===Y?Z:K,Q=G?Z:J;h.style.left="auto",h.style.top="auto",h.style.right="0",h.style.bottom="0";var ee=h.getBoundingClientRect();h.style.left=b,h.style.top=w,h.style.right=x,h.style.bottom=O,h.style.overflow=E,null===(p=h.parentElement)||void 0===p||p.removeChild(j);var te=ik(Math.round(F/parseFloat(A)*1e3)/1e3),re=ik(Math.round(W/parseFloat(M)*1e3)/1e3);if(0===te||0===re||aO(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}(n))return;var ne=k.offset,oe=k.targetOffset,ie=fx(ck(T,ne),2),ae=ie[0],le=ie[1],se=fx(ck(m,oe),2),ce=se[0],ue=se[1];m.x-=ce,m.y-=ue;var pe=fx(k.points||[],2),fe=pe[0],de=uk(pe[1]),me=uk(fe),he=pk(m,de),ye=pk(T,me),ve=sx({},k),ge=he.x-ye.x+ae,be=he.y-ye.y+le;function ft(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J,n=T.x+e,o=T.y+t,i=n+F,a=o+W,l=Math.max(n,r.left),s=Math.max(o,r.top),c=Math.min(i,r.right),u=Math.min(a,r.bottom);return Math.max(0,(c-l)*(u-s))}var we,xe,Oe,Ee,ke=ft(ge,be),je=ft(ge,be,Z),Se=pk(m,["t","l"]),Pe=pk(T,["t","l"]),Ce=pk(m,["b","r"]),Te=pk(T,["b","r"]),Ne=k.overflow||{},Me=Ne.adjustX,Ae=Ne.adjustY,ze=Ne.shiftX,Le=Ne.shiftY,De=function(e){return"boolean"==typeof e?e:e>=0};function dt(){we=T.y+be,xe=we+W,Oe=T.x+ge,Ee=Oe+F}dt();var _e=De(Ae),Ie=me[0]===de[0];if(_e&&"t"===me[0]&&(xe>Q.bottom||d.current.bt)){var Re=be;Ie?Re-=W-$:Re=Se.y-Te.y-le;var Be=ft(ge,Re),We=ft(ge,Re,Z);Be>ke||Be===ke&&(!G||We>=je)?(d.current.bt=!0,be=Re,le=-le,ve.points=[fk(me,0),fk(de,0)]):d.current.bt=!1}if(_e&&"b"===me[0]&&(we<Q.top||d.current.tb)){var Fe=be;Ie?Fe+=W-$:Fe=Ce.y-Pe.y-le;var $e=ft(ge,Fe),Ve=ft(ge,Fe,Z);$e>ke||$e===ke&&(!G||Ve>=je)?(d.current.tb=!0,be=Fe,le=-le,ve.points=[fk(me,0),fk(de,0)]):d.current.tb=!1}var He=De(Me),Ue=me[1]===de[1];if(He&&"l"===me[1]&&(Ee>Q.right||d.current.rl)){var qe=ge;Ue?qe-=F-V:qe=Se.x-Te.x-ae;var Ye=ft(qe,be),Xe=ft(qe,be,Z);Ye>ke||Ye===ke&&(!G||Xe>=je)?(d.current.rl=!0,ge=qe,ae=-ae,ve.points=[fk(me,1),fk(de,1)]):d.current.rl=!1}if(He&&"r"===me[1]&&(Oe<Q.left||d.current.lr)){var Ge=ge;Ue?Ge+=F-V:Ge=Ce.x-Pe.x-ae;var Ke=ft(Ge,be),Ze=ft(Ge,be,Z);Ke>ke||Ke===ke&&(!G||Ze>=je)?(d.current.lr=!0,ge=Ge,ae=-ae,ve.points=[fk(me,1),fk(de,1)]):d.current.lr=!1}dt();var Je=!0===ze?0:ze;"number"==typeof Je&&(Oe<Z.left&&(ge-=Oe-Z.left-ae,m.x+V<Z.left+Je&&(ge+=m.x-Z.left+V-Je)),Ee>Z.right&&(ge-=Ee-Z.right-ae,m.x>Z.right-Je&&(ge+=m.x-Z.right+Je)));var Qe=!0===Le?0:Le;"number"==typeof Qe&&(we<Z.top&&(be-=we-Z.top-le,m.y+$<Z.top+Qe&&(be+=m.y-Z.top+$-Qe)),xe>Z.bottom&&(be-=xe-Z.bottom-le,m.y>Z.bottom-Qe&&(be+=m.y-Z.bottom+Qe)));var et=T.x+ge,tt=et+F,rt=T.y+be,nt=rt+W,ot=m.x,it=ot+V,at=m.y,lt=at+$,st=(Math.max(et,ot)+Math.min(tt,it))/2-et,ct=(Math.max(rt,at)+Math.min(nt,lt))/2-rt;null==l||l(r,ve);var ut=ee.right-T.x-(ge+T.width),pt=ee.bottom-T.y-(be+T.height);1===te&&(ge=Math.round(ge),ut=Math.round(ut)),1===re&&(be=Math.round(be),pt=Math.round(pt)),u({ready:!0,offsetX:ge/te,offsetY:be/re,offsetR:ut/te,offsetB:pt/re,arrowX:st/te,arrowY:ct/re,scaleX:te,scaleY:re,align:ve})}}),h=function(){u(function(e){return sx(sx({},e),{},{ready:!1})})};return Fx(h,[o]),Fx(function(){t||h()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,function(){p.current+=1;var e=p.current;Promise.resolve().then(function(){p.current===e&&m()})}]}var mk=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];var hk=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oO,r=e.forwardRef(function(r,n){var o=r.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=r.children,l=r.action,s=void 0===l?"hover":l,c=r.showAction,u=r.hideAction,p=r.popupVisible,f=r.defaultPopupVisible,d=r.onPopupVisibleChange,m=r.afterPopupVisibleChange,h=r.mouseEnterDelay,y=r.mouseLeaveDelay,v=void 0===y?.1:y,g=r.focusDelay,b=r.blurDelay,w=r.mask,x=r.maskClosable,O=void 0===x||x,E=r.getPopupContainer,k=r.forceRender,j=r.autoDestroy,S=r.destroyPopupOnHide,P=r.popup,C=r.popupClassName,T=r.popupStyle,N=r.popupPlacement,M=r.builtinPlacements,A=void 0===M?{}:M,z=r.popupAlign,L=r.zIndex,D=r.stretch,_=r.getPopupClassNameFromAlign,I=r.fresh,R=r.alignPoint,B=r.onPopupClick,W=r.onPopupAlign,F=r.arrow,$=r.popupMotion,V=r.maskMotion,H=r.popupTransitionName,U=r.popupAnimation,q=r.maskTransitionName,Y=r.maskAnimation,X=r.className,G=r.getTriggerDOMNode,K=cx(r,mk),Z=j||S||!1,J=fx(e.useState(!1),2),Q=J[0],ee=J[1];Fx(function(){ee(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())},[]);var te=e.useRef({}),re=e.useContext(QE),ne=e.useMemo(function(){return{registerSubPopup:function(e,t){te.current[e]=t,null==re||re.registerSubPopup(e,t)}}},[re]),oe=QO(),ie=fx(e.useState(null),2),ae=ie[0],le=ie[1],se=e.useRef(null),ce=KO(function(e){se.current=e,aO(e)&&ae!==e&&le(e),null==re||re.registerSubPopup(oe,e)}),ue=fx(e.useState(null),2),pe=ue[0],fe=ue[1],de=e.useRef(null),me=KO(function(e){aO(e)&&pe!==e&&(fe(e),de.current=e)}),he=e.Children.only(a),ye=(null==he?void 0:he.props)||{},ve={},ge=KO(function(e){var t,r,n=pe;return(null==n?void 0:n.contains(e))||(null===(t=GO(n))||void 0===t?void 0:t.host)===e||e===n||(null==ae?void 0:ae.contains(e))||(null===(r=GO(ae))||void 0===r?void 0:r.host)===e||e===ae||Object.values(te.current).some(function(t){return(null==t?void 0:t.contains(e))||e===t})}),be=rk(i,$,U,H),we=rk(i,V,Y,q),xe=fx(e.useState(f||!1),2),Oe=xe[0],Ee=xe[1],ke=null!=p?p:Oe,je=KO(function(e){void 0===p&&Ee(e)});Fx(function(){Ee(p||!1)},[p]);var Se=e.useRef(ke);Se.current=ke;var Pe=e.useRef([]);Pe.current=[];var Ce=KO(function(e){var t;je(e),(null!==(t=Pe.current[Pe.current.length-1])&&void 0!==t?t:ke)!==e&&(Pe.current.push(e),null==d||d(e))}),Te=e.useRef(),Ne=function(){clearTimeout(Te.current)},Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Ne(),0===t?Ce(e):Te.current=setTimeout(function(){Ce(e)},1e3*t)};e.useEffect(function(){return Ne},[]);var Ae=fx(e.useState(!1),2),ze=Ae[0],Le=Ae[1];Fx(function(e){e&&!ke||Le(!0)},[ke]);var De=fx(e.useState(null),2),_e=De[0],Ie=De[1],Re=fx(e.useState(null),2),Be=Re[0],We=Re[1],Fe=function(e){We([e.clientX,e.clientY])},$e=fx(dk(ke,ae,R&&null!==Be?Be:pe,N,A,z,W),11),Ve=$e[0],He=$e[1],Ue=$e[2],qe=$e[3],Ye=$e[4],Xe=$e[5],Ge=$e[6],Ke=$e[7],Ze=$e[8],Je=$e[9],Qe=$e[10],et=function(t,r,n,o){return e.useMemo(function(){var e=ek(null!=n?n:r),i=ek(null!=o?o:r),a=new Set(e),l=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[a,l]},[t,r,n,o])}(Q,s,c,u),tt=fx(et,2),rt=tt[0],nt=tt[1],ot=rt.has("click"),it=nt.has("click")||nt.has("contextMenu"),at=KO(function(){ze||Qe()});!function(e,t,r,n,o){Fx(function(){if(e&&t&&r){var i=r,a=ok(t),l=ok(i),s=nk(i),c=new Set([s].concat(Bx(a),Bx(l)));function u(){n(),o()}return c.forEach(function(e){e.addEventListener("scroll",u,{passive:!0})}),s.addEventListener("resize",u,{passive:!0}),n(),function(){c.forEach(function(e){e.removeEventListener("scroll",u),s.removeEventListener("resize",u)})}}},[e,t,r])}(ke,pe,ae,at,function(){Se.current&&R&&it&&Me(!1)}),Fx(function(){at()},[Be,N]),Fx(function(){!ke||null!=A&&A[N]||at()},[JSON.stringify(z)]);var lt=e.useMemo(function(){var e=function(e,t,r,n){for(var o=r.points,i=Object.keys(e),a=0;a<i.length;a+=1){var l,s=i[a];if(tk(null===(l=e[s])||void 0===l?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(s)}return""}(A,i,Je,R);return mg(e,null==_?void 0:_(Je))},[Je,_,A,i,R]);e.useImperativeHandle(n,function(){return{nativeElement:de.current,popupElement:se.current,forceAlign:at}});var st=fx(e.useState(0),2),ct=st[0],ut=st[1],pt=fx(e.useState(0),2),ft=pt[0],dt=pt[1],mt=function(){if(D&&pe){var e=pe.getBoundingClientRect();ut(e.width),dt(e.height)}};function ht(e,t,r,n){ve[e]=function(o){var i;null==n||n(o),Me(t,r);for(var a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];null===(i=ye[e])||void 0===i||i.call.apply(i,[ye,o].concat(l))}}Fx(function(){_e&&(Qe(),_e(),Ie(null))},[_e]),(ot||it)&&(ve.onClick=function(e){var t;Se.current&&it?Me(!1):!Se.current&&ot&&(Fe(e),Me(!0));for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=ye.onClick)||void 0===t||t.call.apply(t,[ye,e].concat(n))});var yt,vt,gt=function(t,r,n,o,i,a,l,s){var c=e.useRef(t);c.current=t;var u=e.useRef(!1);return e.useEffect(function(){if(r&&o&&(!i||a)){var e=function(){u.current=!1},t=function(e){var t;!c.current||l((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||u.current||s(!1)},p=nk(o);p.addEventListener("pointerdown",e,!0),p.addEventListener("mousedown",t,!0),p.addEventListener("contextmenu",t,!0);var f,d,m=GO(n);return m&&(m.addEventListener("mousedown",t,!0),m.addEventListener("contextmenu",t,!0)),"production"!==process.env.NODE_ENV&&yx((null==n||null===(f=n.getRootNode)||void 0===f?void 0:f.call(n))===(null===(d=o.getRootNode)||void 0===d?void 0:d.call(o)),"trigger element and popup element should in same shadow root."),function(){p.removeEventListener("pointerdown",e,!0),p.removeEventListener("mousedown",t,!0),p.removeEventListener("contextmenu",t,!0),m&&(m.removeEventListener("mousedown",t,!0),m.removeEventListener("contextmenu",t,!0))}}},[r,n,o,i,a]),function(){u.current=!0}}(ke,it,pe,ae,w,O,ge,Me),bt=rt.has("hover"),wt=nt.has("hover");bt&&(ht("onMouseEnter",!0,h,function(e){Fe(e)}),ht("onPointerEnter",!0,h,function(e){Fe(e)}),yt=function(e){(ke||ze)&&null!=ae&&ae.contains(e.target)&&Me(!0,h)},R&&(ve.onMouseMove=function(e){var t;null===(t=ye.onMouseMove)||void 0===t||t.call(ye,e)})),wt&&(ht("onMouseLeave",!1,v),ht("onPointerLeave",!1,v),vt=function(){Me(!1,v)}),rt.has("focus")&&ht("onFocus",!0,g),nt.has("focus")&&ht("onBlur",!1,b),rt.has("contextMenu")&&(ve.onContextMenu=function(e){var t;Se.current&&nt.has("contextMenu")?Me(!1):(Fe(e),Me(!0)),e.preventDefault();for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=ye.onContextMenu)||void 0===t||t.call.apply(t,[ye,e].concat(n))}),X&&(ve.className=mg(ye.className,X));var xt=e.useRef(!1);xt.current||(xt.current=k||ke||ze);var Ot=sx(sx({},ye),ve),Et={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(function(e){K[e]&&(Et[e]=function(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null===(t=Ot[e])||void 0===t||t.call.apply(t,[Ot].concat(n)),K[e].apply(K,n)})});var kt=e.cloneElement(he,sx(sx({},Ot),Et)),jt={x:Xe,y:Ge},St=F?sx({},!0!==F?F:{}):null;return e.createElement(e.Fragment,null,e.createElement(YO,{disabled:!ke,ref:me,onResize:function(){mt(),at()}},e.createElement(JE,{getTriggerDOMNode:G},kt)),xt.current&&e.createElement(QE.Provider,{value:ne},e.createElement(ZE,{portal:t,ref:ce,prefixCls:i,popup:P,className:mg(C,lt),style:T,target:pe,onMouseEnter:yt,onMouseLeave:vt,onPointerEnter:yt,zIndex:L,open:ke,keepDom:ze,fresh:I,onClick:B,onPointerDownCapture:gt,mask:w,motion:be,maskMotion:we,onVisibleChanged:function(e){Le(!1),Qe(),null==m||m(e)},onPrepare:function(){return new Promise(function(e){mt(),Ie(function(){return e})})},forceRender:k,autoDestroy:Z,getPopupContainer:E,align:Je,arrow:St,arrowPos:jt,ready:Ve,offsetX:He,offsetY:Ue,offsetR:qe,offsetB:Ye,onAlign:at,stretch:D,targetWidth:ct/Ke,targetHeight:ft/Ze})))});return"production"!==process.env.NODE_ENV&&(r.displayName="Trigger"),r}(oO),yk={shiftX:64,adjustY:1},vk={adjustX:1,shiftY:!0},gk=[0,0],bk={left:{points:["cr","cl"],overflow:vk,offset:[-4,0],targetOffset:gk},right:{points:["cl","cr"],overflow:vk,offset:[4,0],targetOffset:gk},top:{points:["bc","tc"],overflow:yk,offset:[0,-4],targetOffset:gk},bottom:{points:["tc","bc"],overflow:yk,offset:[0,4],targetOffset:gk},topLeft:{points:["bl","tl"],overflow:yk,offset:[0,-4],targetOffset:gk},leftTop:{points:["tr","tl"],overflow:vk,offset:[-4,0],targetOffset:gk},topRight:{points:["br","tr"],overflow:yk,offset:[0,-4],targetOffset:gk},rightTop:{points:["tl","tr"],overflow:vk,offset:[4,0],targetOffset:gk},bottomRight:{points:["tr","br"],overflow:yk,offset:[0,4],targetOffset:gk},rightBottom:{points:["bl","br"],overflow:vk,offset:[4,0],targetOffset:gk},bottomLeft:{points:["tl","bl"],overflow:yk,offset:[0,4],targetOffset:gk},leftBottom:{points:["br","bl"],overflow:vk,offset:[-4,0],targetOffset:gk}},wk=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],xk=function(t,r){var n=t.overlayClassName,o=t.trigger,i=void 0===o?["hover"]:o,a=t.mouseEnterDelay,l=void 0===a?0:a,s=t.mouseLeaveDelay,u=void 0===s?.1:s,p=t.overlayStyle,f=t.prefixCls,m=void 0===f?"rc-tooltip":f,h=t.children,y=t.onVisibleChange,v=t.afterVisibleChange,g=t.transitionName,b=t.animation,w=t.motion,x=t.placement,O=void 0===x?"right":x,E=t.align,k=void 0===E?{}:E,j=t.destroyTooltipOnHide,S=void 0!==j&&j,P=t.defaultVisible,C=t.getTooltipContainer,T=t.overlayInnerStyle;t.arrowContent;var N=t.overlay,M=t.id,A=t.showArrow,z=void 0===A||A,L=t.classNames,D=t.styles,_=cx(t,wk),I=QO(M),R=c(null);d(r,function(){return R.current});var B=sx({},_);"visible"in t&&(B.popupVisible=t.visible);var W,F;return e.createElement(hk,nx({popupClassName:mg(n,null==L?void 0:L.root),prefixCls:m,popup:function(){return e.createElement(rx,{key:"content",prefixCls:m,id:I,bodyClassName:null==L?void 0:L.body,overlayInnerStyle:sx(sx({},T),null==D?void 0:D.body)},N)},action:i,builtinPlacements:bk,popupPlacement:O,ref:R,popupAlign:k,getPopupContainer:C,onPopupVisibleChange:y,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:b,popupMotion:w,defaultPopupVisible:P,autoDestroy:S,mouseLeaveDelay:u,popupStyle:sx(sx({},p),null==D?void 0:D.root),mouseEnterDelay:l,arrow:z},B),(W=e.Children.only(h),F=sx(sx({},(null==W?void 0:W.props)||{}),{},{"aria-describedby":N?I:null}),e.cloneElement(h,F)))},Ok=r(xk);const Ek=({title:e,description:r,footer:n,dataTestId:o,variant:i="default"})=>{const a=Boolean(r||n);return t.createElement("div",{"data-test-id":o,className:Ye("overflow-hidden break-words rounded-lg","border shadow-md backdrop-blur-xs","transition-all duration-150 animate-in fade-in zoom-in-95",a?"py-3 px-4":"py-2 px-3",{"bg-popover border-border":"default"===i,"bg-destructive border-destructive/20 text-destructive-foreground":"destructive"===i,"bg-muted border-muted/20":"muted"===i})},t.createElement("div",{className:Ye("flex items-center",!a&&"justify-center")},t.createElement(Eg,{fontWeight:"bold",variant:a?"regular":"small",className:Ye({"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},e)),r&&t.createElement("div",{className:"mt-1.5"},t.createElement(Eg,{variant:"small",className:Ye("opacity-90",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},r)),n&&t.createElement("div",{className:Ye("mt-3",a&&"pt-2",{"border-t border-border/40":"default"===i,"border-t border-destructive/20":"destructive"===i,"border-t border-muted-foreground/20":"muted"===i})},"string"==typeof n?t.createElement(Eg,{variant:"small",className:Ye("opacity-75",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},n):n))},kk=({overlay:e,title:r,description:n,footer:o,children:i,trigger:a="hover",mouseEnterDelay:s=.1,mouseLeaveDelay:c=.1,placement:u="top",variant:p="default",className:f,...d})=>{const m=l(()=>"function"==typeof e?e():e?t.createElement(t.Fragment,null,e):t.createElement(Ek,{title:r,description:n,footer:o,variant:p,dataTestId:d.dataTestId}),[n,o,e,r,p,d.dataTestId]);return r||n||e?t.createElement(Ok,{overlay:m,trigger:a,mouseEnterDelay:s,mouseLeaveDelay:c,placement:u,destroyTooltipOnHide:!0,overlayClassName:Ye("max-w-xs z-50",f),...d},t.createElement("span",{className:"inline-flex"},i)):i||null};function jk(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var Sk=["color"],Pk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Sk);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Ck=["color"],Tk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Ck);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Nk=["color"],Mk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Nk);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Ak=["color"],zk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Ak);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});const Lk=6048e5,Dk=Symbol.for("constructDateFrom");function _k(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Dk in e?e[Dk](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ik(e,t){return _k(t||e,e)}function Rk(e,t,r){const n=Ik(e,r?.in);return isNaN(t)?_k(r?.in||e,NaN):t?(n.setDate(n.getDate()+t),n):n}function Bk(e,t,r){const n=Ik(e,r?.in);if(isNaN(t))return _k(r?.in||e,NaN);if(!t)return n;const o=n.getDate(),i=_k(r?.in||e,n.getTime());i.setMonth(n.getMonth()+t+1,0);return o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}let Wk={};function Fk(){return Wk}function $k(e,t){const r=Fk(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ik(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Vk(e,t){return $k(e,{...t,weekStartsOn:1})}function Hk(e,t){const r=Ik(e,t?.in),n=r.getFullYear(),o=_k(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const i=Vk(o),a=_k(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=Vk(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function Uk(e){const t=Ik(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function qk(e,...t){const r=_k.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}function Yk(e,t){const r=Ik(e,t?.in);return r.setHours(0,0,0,0),r}function Xk(e,t,r){const[n,o]=qk(r?.in,e,t),i=Yk(n),a=Yk(o),l=+i-Uk(i),s=+a-Uk(a);return Math.round((l-s)/864e5)}function Gk(e,t,r){return Rk(e,7*t,r)}function Kk(e,t,r){return Bk(e,12*t,r)}function Zk(e,t){let r,n=t?.in;return e.forEach(e=>{n||"object"!=typeof e||(n=_k.bind(null,e));const t=Ik(e,n);(!r||r<t||isNaN(+t))&&(r=t)}),_k(n,r||NaN)}function Jk(e,t){let r,n=t?.in;return e.forEach(e=>{n||"object"!=typeof e||(n=_k.bind(null,e));const t=Ik(e,n);(!r||r>t||isNaN(+t))&&(r=t)}),_k(n,r||NaN)}function Qk(e,t,r){const[n,o]=qk(r?.in,e,t);return+Yk(n)===+Yk(o)}function ej(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function tj(e,t,r){const[n,o]=qk(r?.in,e,t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}function rj(e,t){const r=Ik(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function nj(e,t){const r=Ik(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function oj(e,t){const r=Ik(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function ij(e,t){const r=Fk(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ik(e,t?.in),i=o.getDay(),a=6+(i<n?-7:0)-(i-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function aj(e,t){return ij(e,{...t,weekStartsOn:1})}const lj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function sj(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const cj={date:sj({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sj({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sj({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},uj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pj(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=r?.width?String(r.width):t;n=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=r?.width?String(r.width):e.defaultWidth;n=e.values[o]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const fj={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:pj({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pj({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:pj({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:pj({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:pj({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function dj(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(l,e=>e.test(a)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(l,e=>e.test(a));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}const mj={ordinalNumber:(hj={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(hj.matchPattern);if(!r)return null;const n=r[0],o=e.match(hj.parsePattern);if(!o)return null;let i=hj.valueCallback?hj.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(n.length)}}),era:dj({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:dj({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:dj({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:dj({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:dj({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var hj;const yj={code:"en-US",formatDistance:(e,t,r)=>{let n;const o=lj[e];return n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:cj,formatRelative:(e,t,r,n)=>uj[e],localize:fj,match:mj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vj(e,t){const r=Ik(e,t?.in),n=+Vk(r)-+function(e,t){const r=Hk(e,t),n=_k(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Vk(n)}(r);return Math.round(n/Lk)+1}function gj(e,t){const r=Ik(e,t?.in),n=r.getFullYear(),o=Fk(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=_k(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const l=$k(a,t),s=_k(t?.in||e,0);s.setFullYear(n,0,i),s.setHours(0,0,0,0);const c=$k(s,t);return+r>=+l?n+1:+r>=+c?n:n-1}function bj(e,t){const r=Ik(e,t?.in),n=+$k(r,t)-+function(e,t){const r=Fk(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=gj(e,t),i=_k(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),$k(i,t)}(r,t);return Math.round(n/Lk)+1}function wj(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const xj={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return wj("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):wj(r+1,2)},d:(e,t)=>wj(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>wj(e.getHours()%12||12,t.length),H:(e,t)=>wj(e.getHours(),t.length),m:(e,t)=>wj(e.getMinutes(),t.length),s:(e,t)=>wj(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return wj(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Oj="midnight",Ej="noon",kj="morning",jj="afternoon",Sj="evening",Pj="night",Cj={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return xj.y(e,t)},Y:function(e,t,r,n){const o=gj(e,n),i=o>0?o:1-o;if("YY"===t){return wj(i%100,2)}return"Yo"===t?r.ordinalNumber(i,{unit:"year"}):wj(i,t.length)},R:function(e,t){return wj(Hk(e),t.length)},u:function(e,t){return wj(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return wj(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return wj(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return xj.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return wj(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=bj(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):wj(o,t.length)},I:function(e,t,r){const n=vj(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):wj(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):xj.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=Ik(e,t?.in);return Xk(r,oj(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):wj(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return wj(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return wj(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return wj(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(o=12===n?Ej:0===n?Oj:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(o=n>=17?Sj:n>=12?jj:n>=4?kj:Pj,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return xj.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):xj.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):wj(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):wj(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):xj.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):xj.s(e,t)},S:function(e,t){return xj.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Nj(n);case"XXXX":case"XX":return Mj(n);default:return Mj(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Nj(n);case"xxxx":case"xx":return Mj(n);default:return Mj(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tj(n,":");default:return"GMT"+Mj(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tj(n,":");default:return"GMT"+Mj(n,":")}},t:function(e,t,r){return wj(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return wj(+e,t.length)}};function Tj(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return 0===i?r+String(o):r+String(o)+t+wj(i,2)}function Nj(e,t){if(e%60==0){return(e>0?"-":"+")+wj(Math.abs(e)/60,2)}return Mj(e,t)}function Mj(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+wj(Math.trunc(n/60),2)+t+wj(n%60,2)}const Aj=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},zj=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Lj={p:zj,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Aj(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Aj(n,t)).replace("{{time}}",zj(o,t))}},Dj=/^D+$/,_j=/^Y+$/,Ij=["D","DD","YY","YYYY"];const Rj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wj=/^'([^]*?)'?$/,Fj=/''/g,$j=/[a-zA-Z]/;function Vj(e,t,r){const n=Fk(),o=r?.locale??n.locale??yj,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=Ik(e,r?.in);if(!function(e){return!(!ej(e)&&"number"!=typeof e||isNaN(+Ik(e)))}(l))throw new RangeError("Invalid time value");let s=t.match(Bj).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lj[t])(e,o.formatLong)}return e}).join("").match(Rj).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Hj(e)};if(Cj[t])return{isToken:!0,value:e};if(t.match($j))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return s.map(n=>{if(!n.isToken)return n.value;const i=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return _j.test(e)}(i)||!r?.useAdditionalDayOfYearTokens&&function(e){return Dj.test(e)}(i))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Ij.includes(e))throw new RangeError(n)}(i,t,String(e));return(0,Cj[i[0]])(l,i,o.localize,c)}).join("")}function Hj(e){const t=e.match(Wj);return t?t[1].replace(Fj,"'"):e}function Uj(e,t){return Ik(e,t?.in).getMonth()}function qj(e,t){const r=Ik(e,t?.in);return function(e,t,r){const[n,o]=qk(r?.in,e,t),i=$k(n,r),a=$k(o,r),l=+i-Uk(i),s=+a-Uk(a);return Math.round((l-s)/Lk)}(function(e,t){const r=Ik(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),Ik(r,t?.in)}(r,t),nj(r,t),t)+1}function Yj(e,t){return Ik(e,t?.in).getFullYear()}function Xj(e,t){return+Ik(e)>+Ik(t)}function Gj(e,t){return+Ik(e)<+Ik(t)}function Kj(e,t,r){const[n,o]=qk(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function Zj(e,t,r){return Rk(e,-t,r)}function Jj(e,t,r){const n=Ik(e,r?.in),o=n.getFullYear(),i=n.getDate(),a=_k(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=function(e,t){const r=Ik(e,t?.in),n=r.getFullYear(),o=r.getMonth(),i=_k(r,0);return i.setFullYear(n,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return n.setMonth(t,Math.min(i,l)),n}function Qj(e,t,r){const n=Ik(e,r?.in);return isNaN(+n)?_k(e,NaN):(n.setFullYear(t),n)}var eS=function(){return eS=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eS.apply(this,arguments)};function tS(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function rS(e){return"multiple"===e.mode}function nS(e){return"range"===e.mode}function oS(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var iS={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var aS=Object.freeze({__proto__:null,formatCaption:function(e,t){return Vj(e,"LLLL y",t)},formatDay:function(e,t){return Vj(e,"d",t)},formatMonthCaption:function(e,t){return Vj(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Vj(e,"cccccc",t)},formatYearCaption:function(e,t){return Vj(e,"yyyy",t)}}),lS=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Vj(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Vj(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var sS=m(void 0);function cS(e){var t,r,n=e.initialProps,o=function(){var e=iS,t=yj,r=new Date;return{captionLayout:"buttons",classNames:e,formatters:aS,labels:lS,locale:t,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:r,mode:"default"}}(),i=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=nj(n):t&&(i=new Date(t,0,1)),o?a=rj(o):r&&(a=new Date(r,11,31)),{fromDate:i?Yk(i):void 0,toDate:a?Yk(a):void 0}}(n),a=i.fromDate,l=i.toDate,s=null!==(t=n.captionLayout)&&void 0!==t?t:o.captionLayout;"buttons"===s||a&&l||(s="buttons"),(oS(n)||rS(n)||nS(n))&&(r=n.onSelect);var c=eS(eS(eS({},o),n),{captionLayout:s,classNames:eS(eS({},o.classNames),n.classNames),components:eS({},n.components),formatters:eS(eS({},o.formatters),n.formatters),fromDate:a,labels:eS(eS({},o.labels),n.labels),mode:n.mode||o.mode,modifiers:eS(eS({},o.modifiers),n.modifiers),modifiersClassNames:eS(eS({},o.modifiersClassNames),n.modifiersClassNames),onSelect:r,styles:eS(eS({},o.styles),n.styles),toDate:l});return k(sS.Provider,{value:c,children:e.children})}function uS(){var e=h(sS);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function pS(e){var t=uS(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return k("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function fS(e){return k("svg",eS({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:k("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function dS(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=uS(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:fS;return j("div",{className:l,style:s,children:[k("span",{className:c.classNames.vhidden,children:e["aria-label"]}),k("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),j("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,k(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function mS(e){var t,r=uS(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return k(S,{});if(!o)return k(S,{});var p=[];if(function(e,t,r){const[n,o]=qk(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var f=nj(n),d=n.getMonth();d<=o.getMonth();d++)p.push(Jj(f,d));else for(f=nj(new Date),d=0;d<=11;d++)p.push(Jj(f,d));var m=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:dS;return k(m,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=Jj(nj(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:p.map(function(e){return k("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())})})}function hS(e){var t,r=e.displayMonth,n=uS(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,p=n.labels.labelYearDropdown,f=[];if(!o)return k(S,{});if(!i)return k(S,{});for(var d=o.getFullYear(),m=i.getFullYear(),h=d;h<=m;h++)f.push(Qj(oj(new Date),h));var y=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:dS;return k(y,{name:"years","aria-label":p(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Qj(nj(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:f.map(function(e){return k("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())})})}function yS(){var e=uS(),t=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&tj(i,o)<0&&(o=Bk(i,-1*(s-1))),a&&tj(o,a)<0&&(o=a),nj(o)}(e),r=function(e,t){var r=i(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=nj(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var vS=m(void 0);function gS(e){var t=uS(),r=yS(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=nj(e),i=tj(nj(Bk(o,n)),o),a=[],l=0;l<i;l++){var s=Bk(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=nj(e);if(!r)return Bk(l,a);if(!(tj(r,e)<i))return Bk(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=nj(e);if(!r)return Bk(a,-i);if(!(tj(a,r)<=0))return Bk(a,-i)}}(n,t),s=function(e){return i.some(function(t){return Kj(e,t)})},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&Gj(e,r)?o(Bk(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return k(vS.Provider,{value:c,children:e.children})}function bS(){var e=h(vS);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function wS(e){var t,r=uS(),n=r.classNames,o=r.styles,i=r.components,a=bS().goToMonth,l=function(t){a(Bk(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:pS,c=k(s,{id:e.id,displayMonth:e.displayMonth});return j("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[k("div",{className:n.vhidden,children:c}),k(mS,{onChange:l,displayMonth:e.displayMonth}),k(hS,{onChange:l,displayMonth:e.displayMonth})]})}function xS(e){return k("svg",eS({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:k("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function OS(e){return k("svg",eS({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:k("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var ES=r(function(e,t){var r=uS(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=eS(eS({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),k("button",eS({},e,{ref:t,type:"button",className:a,style:l}))});function kS(e){var t,r,n=uS(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,p=n.components;if(!e.nextMonth&&!e.previousMonth)return k(S,{});var f=c(e.previousMonth,{locale:i}),d=[a.nav_button,a.nav_button_previous].join(" "),m=u(e.nextMonth,{locale:i}),h=[a.nav_button,a.nav_button_next].join(" "),y=null!==(t=null==p?void 0:p.IconRight)&&void 0!==t?t:OS,v=null!==(r=null==p?void 0:p.IconLeft)&&void 0!==r?r:xS;return j("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&k(ES,{name:"previous-month","aria-label":f,className:d,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:k("rtl"===o?y:v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&k(ES,{name:"next-month","aria-label":m,className:h,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:k("rtl"===o?v:y,{className:a.nav_icon,style:l.nav_icon})})]})}function jS(e){var t=uS().numberOfMonths,r=bS(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex(function(t){return Kj(e.displayMonth,t)}),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),p=t>1&&(c||!s);return k(kS,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:p,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function SS(e){var t,r,n=uS(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:pS;return r=i?k(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?k(wS,{displayMonth:e.displayMonth,id:e.id}):j(S,"dropdown-buttons"===l?{children:[k(wS,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),k(jS,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[k(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),k(jS,{displayMonth:e.displayMonth,id:e.id})]}),k("div",{className:o.caption,style:a.caption,children:r})}function PS(e){var t=uS(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?k("tfoot",{className:o,style:n.tfoot,children:k("tr",{children:k("td",{colSpan:8,children:r})})}):k(S,{})}function CS(){var e=uS(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?Vk(new Date):$k(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Rk(n,i);o.push(a)}return o}(o,i,a);return j("tr",{style:r.head_row,className:t.head_row,children:[n&&k("td",{style:r.head_cell,className:t.head_cell}),c.map(function(e,n){return k("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)})]})}function TS(){var e,t=uS(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:CS;return k("thead",{style:n.head,className:r.head,children:k(i,{})})}function NS(e){var t=uS(),r=t.locale,n=t.formatters.formatDay;return k(S,{children:n(e.date,{locale:r})})}var MS=m(void 0);function AS(e){if(!rS(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return k(MS.Provider,{value:t,children:e.children})}return k(zS,{initialProps:e.initialProps,children:e.children})}function zS(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push(function(e){var t=i&&n.length>i-1,r=n.some(function(t){return Qk(t,e)});return Boolean(t&&!r)});var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?tS([],n):[];if(r.selected){var u=c.findIndex(function(t){return Qk(e,t)});c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return k(MS.Provider,{value:l,children:r})}function LS(){var e=h(MS);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var DS,_S=m(void 0);function IS(e){if(!nS(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return k(_S.Provider,{value:t,children:e.children})}return k(RS,{initialProps:e.initialProps,children:e.children})}function RS(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],Qk(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:Zj(i,l-1),before:Rk(i,l-1)}),i&&a&&c.disabled.push({after:i,before:Rk(i,l-1)}),!i&&a&&c.disabled.push({after:Zj(a,l-1),before:Rk(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:Rk(i,1-s)}),c.disabled.push({after:Rk(i,s-1)})),i&&a){var u=s-(Xk(a,i)+1);c.disabled.push({before:Zj(i,u)}),c.disabled.push({after:Rk(a,u)})}!i&&a&&(c.disabled.push({before:Rk(a,1-s)}),c.disabled.push({after:Rk(a,s-1)}))}return k(_S.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(Qk(o,e)&&Qk(n,e))return;if(Qk(o,e))return{from:o,to:void 0};if(Qk(n,e))return;return Xj(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Xj(e,o)?{from:o,to:e}:{from:e,to:o}:n?Gj(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function BS(){var e=h(_S);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function WS(e){return Array.isArray(e)?tS([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(DS||(DS={}));var FS=DS.Selected,$S=DS.Disabled,VS=DS.Hidden,HS=DS.Today,US=DS.RangeEnd,qS=DS.RangeMiddle,YS=DS.RangeStart,XS=DS.Outside;var GS=m(void 0);function KS(e){var t=uS(),r=function(e,t,r){var n,o=((n={})[FS]=WS(e.selected),n[$S]=WS(e.disabled),n[VS]=WS(e.hidden),n[HS]=[e.today],n[US]=[],n[qS]=[],n[YS]=[],n[XS]=[],n);return e.fromDate&&o[$S].push({before:e.fromDate}),e.toDate&&o[$S].push({after:e.toDate}),rS(e)?o[$S]=o[$S].concat(t.modifiers[$S]):nS(e)&&(o[$S]=o[$S].concat(r.modifiers[$S]),o[YS]=r.modifiers[YS],o[qS]=r.modifiers[qS],o[US]=r.modifiers[US]),o}(t,LS(),BS()),n=function(e){var t={};return Object.entries(e).forEach(function(e){var r=e[0],n=e[1];t[r]=WS(n)}),t}(t.modifiers),o=eS(eS({},r),n);return k(GS.Provider,{value:o,children:e.children})}function ZS(){var e=h(GS);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function JS(e,t){return t.some(function(t){if("boolean"==typeof t)return t;if(ej(t))return Qk(e,t);if(function(e){return Array.isArray(e)&&e.every(ej)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(Xk(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),Xk(e,n)>=0&&Xk(o,e)>=0):o?Qk(o,e):!!n&&Qk(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=Xk(t.before,e)>0,n=Xk(t.after,e)<0;return Xj(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Xk(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Xk(t.before,e)>0:"function"==typeof t&&t(e)})}function QS(e,t,r){var n=Object.keys(t).reduce(function(r,n){var o=t[n];return JS(e,o)&&r.push(n),r},[]),o={};return n.forEach(function(e){return o[e]=!0}),r&&!Kj(e,r)&&(o.outside=!0),o}function eP(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,p=o.locale,f={day:Rk,week:Gk,month:Bk,year:Kk,startOfWeek:function(e){return o.ISOWeek?Vk(e):$k(e,{locale:p,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?aj(e):ij(e,{locale:p,weekStartsOn:s})}},d=f[r](e,"after"===n?1:-1);"before"===n&&c?d=Zk([c,d]):"after"===n&&u&&(d=Jk([u,d]));var m=!0;if(i){var h=QS(d,i);m=!h.disabled&&!h.hidden}return m?d:l.count>365?l.lastFocused:eP(d,{moveBy:r,direction:n,context:o,modifiers:i,retry:eS(eS({},l),{count:l.count+1})})}var tP=m(void 0);function rP(e){var t=bS(),r=ZS(),n=i(),o=n[0],a=n[1],l=i(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=nj(e[0]),i=rj(e[e.length-1]),a=o;a<=i;){var l=QS(a,t);if(l.disabled||l.hidden)a=Rk(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=Rk(a,1)}}return n||r}(t.displayMonths,r),p=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,f=function(e){a(e)},d=uS(),m=function(e,n){if(o){var i=eP(o,{moveBy:e,direction:n,context:d,modifiers:r});Qk(o,i)||(t.goToDate(i,o),f(i))}},h={focusedDay:o,focusTarget:p,blur:function(){c(o),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return k(tP.Provider,{value:h,children:e.children})}function nP(){var e=h(tP);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var oP=m(void 0);function iP(e){if(!oS(e.initialProps)){var t={selected:void 0};return k(oP.Provider,{value:t,children:e.children})}return k(aP,{initialProps:e.initialProps,children:e.children})}function aP(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return k(oP.Provider,{value:n,children:r})}function lP(){var e=h(oP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function sP(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(DS).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}}),r}function cP(e,t,r){var n,o,i,l=uS(),s=nP(),c=function(e,t){return QS(e,ZS(),t)}(e,t),u=function(e,t){var r=uS(),n=lP(),o=LS(),i=BS(),a=nP(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,p=a.blur,f=a.focus,d=a.focusMonthBefore,m=a.focusMonthAfter,h=a.focusYearBefore,y=a.focusYearAfter,v=a.focusStartOfWeek,g=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;oS(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):rS(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):nS(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;f(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;p(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():d();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():m();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),g()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(e,c),p=function(){var e=uS(),t=lP(),r=LS(),n=BS();return oS(e)?t.selected:rS(e)?r.selected:nS(e)?n.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);a(function(){var t;c.outside||s.focusedDay&&f&&Qk(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())},[s.focusedDay,e,r,f,c.outside]);var d=sP(l,c).join(" "),m=function(e,t){var r=eS({},e.styles.day);return Object.keys(t).forEach(function(t){var n;r=eS(eS({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])}),r}(l,c),h=Boolean(c.outside&&!l.showOutsideDays||c.hidden),y=null!==(i=null===(o=l.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:NS,v={style:m,className:d,children:k(y,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},g=s.focusTarget&&Qk(s.focusTarget,e)&&!c.outside,b=s.focusedDay&&Qk(s.focusedDay,e),w=eS(eS(eS({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=b||g?0:-1,n)),u);return{isButton:f,isHidden:h,activeModifiers:c,selectedDays:p,buttonProps:w,divProps:v}}function uP(e){var t=c(null),r=cP(e.date,e.displayMonth,t);return r.isHidden?k("div",{role:"gridcell"}):r.isButton?k(ES,eS({name:"day",ref:t},r.buttonProps)):k("div",eS({},r.divProps))}function pP(e){var t=e.number,r=e.dates,n=uS(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return k("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return k(ES,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function fP(e){var t,r,n,o=uS(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:uP,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:pP;return l&&(n=k("td",{className:a.cell,style:i.cell,children:k(u,{number:e.weekNumber,dates:e.dates})})),j("tr",{className:a.row,style:i.row,children:[n,e.dates.map(function(t){return k("td",{className:a.cell,style:i.cell,role:"presentation",children:k(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+Ik(e)/1e3)}(t))})]})}function dP(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?aj(t):ij(t,r),o=(null==r?void 0:r.ISOWeek)?Vk(e):$k(e,r),i=Xk(n,o),a=[],l=0;l<=i;l++)a.push(Rk(o,l));var s=a.reduce(function(e,t){var n=(null==r?void 0:r.ISOWeek)?vj(t):bj(t,r),o=e.find(function(e){return e.weekNumber===n});return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)},[]);return s}function mP(e){var t,r,n,o=uS(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,p=o.weekStartsOn,f=o.firstWeekContainsDate,d=o.ISOWeek,m=function(e,t){var r=dP(nj(e),rj(e),t);if(null==t?void 0:t.useFixedWeeks){var n=qj(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=Gk(i,6-n),l=dP(Gk(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:d,locale:i,weekStartsOn:p,firstWeekContainsDate:f}),h=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:TS,y=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:fP,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:PS;return j("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&k(h,{}),k("tbody",{className:a.tbody,style:l.tbody,children:m.map(function(t){return k(y,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),k(v,{displayMonth:e.displayMonth})]})}var hP="undefined"!=typeof window&&window.document&&window.document.createElement?f:a,yP=!1,vP=0;function gP(){return"react-day-picker-".concat(++vP)}function bP(e){var t,r,n=uS(),o=n.dir,l=n.classNames,s=n.styles,c=n.components,u=bS().displayMonths,p=function(e){var t,r=null!=e?e:yP?gP():null,n=i(r),o=n[0],l=n[1];return hP(function(){null===o&&l(gP())},[]),a(function(){!1===yP&&(yP=!0)},[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,d=[l.month],m=s.month,h=0===e.displayIndex,y=e.displayIndex===u.length-1,v=!h&&!y;"rtl"===o&&(y=(t=[h,y])[0],h=t[1]),h&&(d.push(l.caption_start),m=eS(eS({},m),s.caption_start)),y&&(d.push(l.caption_end),m=eS(eS({},m),s.caption_end)),v&&(d.push(l.caption_between),m=eS(eS({},m),s.caption_between));var g=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:SS;return j("div",{className:d.join(" "),style:m,children:[k(g,{id:p,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),k(mP,{id:f,"aria-labelledby":p,displayMonth:e.displayMonth})]},e.displayIndex)}function wP(e){var t=uS(),r=t.classNames,n=t.styles;return k("div",{className:r.months,style:n.months,children:e.children})}function xP(e){var t,r,n=e.initialProps,o=uS(),l=nP(),s=bS(),c=i(!1),u=c[0],p=c[1];a(function(){o.initialFocus&&l.focusTarget&&(u||(l.focus(l.focusTarget),p(!0)))},[o.initialFocus,u,l.focus,l.focusTarget,l]);var f=[o.classNames.root,o.className];o.numberOfMonths>1&&f.push(o.classNames.multiple_months),o.showWeekNumber&&f.push(o.classNames.with_weeknumber);var d=eS(eS({},o.styles.root),o.style),m=Object.keys(n).filter(function(e){return e.startsWith("data-")}).reduce(function(e,t){var r;return eS(eS({},e),((r={})[t]=n[t],r))},{}),h=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:wP;return k("div",eS({className:f.join(" "),style:d,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},m,{children:k(h,{children:s.displayMonths.map(function(e,t){return k(bP,{displayIndex:t,displayMonth:e},t)})})}))}function OP(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return k(cS,{initialProps:r,children:k(gS,{children:k(iP,{initialProps:r,children:k(AS,{initialProps:r,children:k(IS,{initialProps:r,children:k(KS,{children:k(rP,{children:t})})})})})})})}function EP(e){return k(OP,eS({},e,{children:k(xP,{initialProps:e})}))}var kP=Symbol.for("react.lazy"),jP=e[" use ".trim().toString()];function SP(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===kP&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function PP(t){const r=TP(t),n=e.forwardRef((t,n)=>{let{children:o,...i}=t;SP(o)&&"function"==typeof jP&&(o=jP(o._payload));const a=e.Children.toArray(o),l=a.find(MP);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}var CP=PP("Slot");function TP(t){const r=e.forwardRef((t,r)=>{let{children:n,...o}=t;if(SP(n)&&"function"==typeof jP&&(n=jP(n._payload)),e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Ag(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var NP=Symbol("radix.slottable");function MP(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===NP}const AP=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,zP=A,LP=((e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return zP(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;const a=AP(t)||AP(n);return o[e][a]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),s=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...l}[t]):{...i,...l}[t]===r})?[...e,r,n]:e},[]);return zP(e,a,s,null==r?void 0:r.class,null==r?void 0:r.className)})("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),DP=e.forwardRef(({className:t,variant:r,size:n,asChild:o=!1,...i},a)=>{const l=o?CP:"button";return e.createElement(l,{className:Ye(LP({variant:r,size:n,className:t})),ref:a,...i})});DP.displayName="Button";const _P=({className:e,classNames:r,showOutsideDays:n=!0,...o})=>t.createElement(EP,{showOutsideDays:n,className:Ye("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ye(LP({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Ye("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Ye(LP({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...r},components:{IconLeft:()=>t.createElement(Pk,{className:"h-4 w-4"}),IconRight:()=>t.createElement(Tk,{className:"h-4 w-4"})},...o});_P.displayName="Calendar";const IP={arrow:"arrow",slash:"slash",icon:"icon"},RP={small:{text:"text-xs",icon:"h-3 w-3",spacing:"py-0.5 px-1.5"},medium:{text:"text-sm",icon:"h-4 w-4",spacing:"py-1 px-2"},large:{text:"text-base",icon:"h-5 w-5",spacing:"py-1.5 px-2.5"}},BP=e.forwardRef(({variant:t,size:r,className:n,...o},i)=>{const a={slash:e.createElement("span",{className:"mx-2 text-muted-foreground/50 select-none"},"/"),arrow:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(at,{className:Ye(RP[r].icon,"text-muted-foreground/50")})),icon:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(at,{className:Ye(RP[r].icon,"text-muted-foreground/50")}))};return e.createElement("span",{ref:i,className:Ye("flex items-center",n),...o},a[t])});BP.displayName="BreadCrumbSeparator";const WP=e.forwardRef(({items:t,variant:r="slash",size:n="medium",maxItems:o=4,className:a,...s},c)=>{const[u,p]=i(!1),[f,d]=i(null),m=l(()=>{if(u||t.length<=o)return t;return[...t.slice(0,1),{label:"...",href:"#"},...t.slice(-2)]},[t,o,u]);return e.createElement("nav",{ref:c,"aria-label":"BreadCrumb",className:Ye("w-full p-3 select-none",a),...s},e.createElement("ol",{className:"flex items-center flex-wrap gap-y-2"},"icon"===r&&e.createElement("li",{className:"flex items-center"},e.createElement("a",{href:"/",className:Ye("text-muted-foreground/80 transition-colors duration-150","hover:text-primary focus-visible:text-primary","outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm")},e.createElement(pt,{className:RP[n].icon}),e.createElement("span",{className:"sr-only"},"Home"))),m.map((t,o)=>{const i=o===m.length-1,a="..."===t.label,l=f===o;return e.createElement("li",{key:t.href,className:"flex items-center group",onMouseEnter:()=>d(o),onMouseLeave:()=>d(null)},o>0&&e.createElement(BP,{variant:r,size:n}),"icon"===r&&!a&&e.createElement("span",{className:"mr-1"},t.icon||e.createElement(ut,{className:Ye(RP[n].icon,"text-muted-foreground/80")})),e.createElement("a",{href:a?void 0:t.href,className:Ye("font-medium relative inline-flex items-center","transition-all duration-150","outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm",RP[n].text,RP[n].spacing,i?"text-primary cursor-default font-semibold":"text-muted-foreground/80 hover:text-muted-foreground",!i&&["after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0","after:bg-primary/50 after:transition-all after:duration-150",l&&"after:w-full"],a&&"cursor-pointer hover:text-primary"),onClick:e=>{a&&(e.preventDefault(),p(!0))},...!i&&{role:"link","aria-current":void 0},...i&&{"aria-current":"page"}},e.createElement("span",{className:"relative"},t.label)))})))});WP.displayName="BreadCrumb";const FP={small:{trigger:"px-3 py-2 text-sm",icon:"h-4 w-4",optionIcon:"h-4 w-4",option:"px-2.5 py-2",optionText:"text-sm",description:"text-xs"},medium:{trigger:"px-4 py-3 text-base",icon:"h-5 w-5",optionIcon:"h-5 w-5",option:"px-3 py-2.5",optionText:"text-sm",description:"text-xs"},large:{trigger:"px-5 py-4 text-lg",icon:"h-6 w-6",optionIcon:"h-6 w-6",option:"px-4 py-3",optionText:"text-base",description:"text-sm"}},$P={basic:{trigger:"border border-border hover:border-primary/20",content:"border border-border"},"shadow-sm":{trigger:"shadow-lg hover:shadow-xl",content:"shadow-xl"}},VP=({text:e,className:r=""})=>{const{textRef:n,isTruncated:o}=(()=>{const e=c(null),[t,r]=i(!1),n=s(()=>{if(e.current){const t=e.current;r(t.scrollWidth>t.clientWidth)}},[]);return a(()=>{n();const t=e.current,r=new ResizeObserver(()=>{n()});return t&&r.observe(t),window.addEventListener("resize",n),()=>{t&&r.unobserve(t),r.disconnect(),window.removeEventListener("resize",n)}},[n]),{textRef:e,isTruncated:t}})();return o?t.createElement(kk,{title:e,trigger:"hover"},t.createElement("span",{ref:n,className:Ye("truncate block w-full max-w-full",r)},e)):t.createElement("span",{ref:n,className:Ye("truncate block w-full max-w-full",r)},e)},HP=r(({options:e,value:r,onValueChange:n,placeholder:o="",disabled:u=!1,showIcons:p=!0,size:f="medium",variant:d="basic",className:m,classNames:h,searchable:g=!1,onSearch:b,multiple:w=!1},x)=>{const[O,E]=i(!1),[k,j]=i(-1),[S,P]=i(""),[C,T]=i(null),[N,M]=i(""),[A,z]=i(0),[L,D]=i(!1),_=c(null),I=c(null),R=c(null),B=c([]),W=l(()=>w?Array.isArray(r)?r:[]:r&&"string"==typeof r?[r]:[],[r,w]),F=l(()=>e.filter(e=>W.includes(e.id)),[e,W]),$=l(()=>FP[f],[f]),V=l(()=>g&&N?e.filter(e=>e.label.toLowerCase().includes(N.toLowerCase())):e,[e,g,N]);a(()=>{if(O&&I.current){const e=I.current.getBoundingClientRect(),t=300,r=window.innerHeight-e.bottom,n=e.top;D(r<t&&n>t)}},[O]),a(()=>()=>{C&&clearTimeout(C)},[C]),a(()=>{const e=()=>{I.current&&z(I.current.offsetWidth)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),a(()=>{O?g&&R.current&&R.current.focus():(j(-1),M(""))},[O,g]),a(()=>{O&&k>=0&&B.current[k]&&B.current[k]?.scrollIntoView({block:"nearest"})},[O,k]),a(()=>{const e=e=>{_.current&&!_.current.contains(e.target)&&E(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),a(()=>{g&&b&&b(N)},[N,b,g]);const H=s(e=>{if(w){const t=W.includes(e)?W.filter(t=>t!==e):[...W,e];n?.(t)}else n?.(e),E(!1)},[w,W,n]),U=s((e,t)=>{if(t.stopPropagation(),w){const t=W.filter(t=>t!==e);n?.(t)}},[w,W,n]),q=l(()=>{if(!d)return{trigger:"",content:""};const e=$P[d]||{trigger:"",content:""};return{trigger:e.trigger||"",content:e.content||""}},[d]),Y=s(e=>{if(!u)switch(e.key){case"ArrowDown":e.preventDefault(),O?j(e=>Math.min(e+1,V.length-1)):(E(!0),j(0));break;case"ArrowUp":e.preventDefault(),O?j(e=>Math.max(e-1,0)):(E(!0),j(V.length-1));break;case"Home":e.preventDefault(),O&&j(0);break;case"End":e.preventDefault(),O&&j(V.length-1);break;case"Enter":case" ":if(e.preventDefault(),O&&k>=0){const e=V[k];e.disabled||H(e.id)}else E(!O);break;case"Escape":e.preventDefault(),E(!1);break;default:if(!g&&1===e.key.length){const t=e.key.toLowerCase();C&&clearTimeout(C);const r=S+t;P(r);const n=V.findIndex(e=>e.label.toLowerCase().startsWith(r));n>=0&&(j(n),O||E(!0));const o=setTimeout(()=>{P("")},1e3);T(o)}}},[u,O,V,S,C,H,k,g]),X=s((e,t,r)=>{r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),H(t))},[H]),G=s(e=>{M(e.target.value),j(0)},[]);return t.createElement("div",{ref:_,className:"relative max-w-full"},t.createElement("button",{type:"button",ref:e=>{"function"==typeof x?x(e):x&&(x.current=e),I.current=e},onClick:()=>!u&&E(!O),onKeyDown:Y,className:Ye("group flex w-full items-center justify-between rounded-xl",F.length>0?"bg-background/100":"bg-background","transition-all duration-200 ease-out","hover:shadow-md","focus:outline-hidden focus:ring-2 focus:ring-primary/20 focus:ring-offset-2",u&&"cursor-not-allowed opacity-50",O&&"border-primary/30 bg-primary/5 shadow-lg","max-w-full text-ellipsis whitespace-nowrap",$.trigger,q.trigger,m,h?.trigger),disabled:u,"aria-expanded":O,"aria-haspopup":"listbox","aria-controls":"dropdown-options","aria-label":o},t.createElement("div",{className:"flex items-center gap-3 min-w-0 w-full overflow-hidden"},(()=>{if(0===F.length)return t.createElement(VP,{text:o,className:Ye("font-medium",$.optionText)});if(w&&F.length>0)return t.createElement("div",{className:"flex flex-wrap gap-1.5 min-w-0 flex-1"},F.map(e=>t.createElement("div",{key:e.id,className:"flex items-center gap-1 rounded-md bg-primary/10 px-2 py-0.5 text-sm",onClick:e=>e.stopPropagation()},p&&e.icon&&t.createElement("span",{className:"text-primary/70 flex-shrink-0"},v(e.icon,{})),t.createElement("span",{className:"truncate max-w-[120px]"},e.label),t.createElement("button",{type:"button",onClick:t=>U(e.id,t),className:"text-primary/70 hover:text-primary flex-shrink-0"},t.createElement(ht,{className:"w-3 h-3"})))));const e=F[0];return t.createElement(t.Fragment,null,p&&e?.icon&&t.createElement("span",{className:"text-primary/70 transition-colors duration-200 group-hover:text-primary flex-shrink-0"},v(e.icon,{})),t.createElement(VP,{text:e.label,className:Ye("font-medium",$.optionText)}))})()),t.createElement(ot,{className:Ye("text-primary/70 transition-all duration-300","group-hover:text-primary",O&&"rotate-180",$.icon,"flex-shrink-0 ml-2")})),t.createElement("div",{id:"dropdown-options",role:"listbox","aria-label":o,"aria-multiselectable":w,className:Ye("z-50 origin-top-right","rounded-xl border border-border/50 bg-background p-1.5","shadow-lg backdrop-blur-xs","transition-all duration-200 ease-out",O?"visible scale-100 opacity-100":"invisible scale-95 opacity-0","absolute left-0","max-w-full overflow-hidden",L?"bottom-full mb-2":"top-full mt-2",q.content,h?.content),style:{width:A>0?`${A}px`:"auto",maxWidth:"100%"}},g&&t.createElement("div",{className:"sticky top-0 z-10 mb-1.5 bg-background/100 px-2 py-1.5 max-w-full"},t.createElement("div",{className:"relative max-w-full"},t.createElement(mt,{className:Ye("absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",$.icon)}),t.createElement("input",{ref:R,type:"text",value:N,onChange:G,onClick:e=>e.stopPropagation(),placeholder:"Search...",className:Ye("w-full rounded-lg border border-border bg-background py-2","pl-9 pr-2 text-sm placeholder:text-muted-foreground","focus:border-primary/30 focus:outline-hidden focus:ring-1 focus:ring-primary/20","max-w-full text-ellipsis",$.optionText)}))),t.createElement("div",{className:"max-h-72 overflow-auto max-w-full"},0===V.length?t.createElement("div",{className:"px-3 py-2 text-sm text-muted-foreground truncate max-w-full"},"No options found"):V.map((e,r)=>{const n=W.includes(e.id);return t.createElement(y,{key:e.id},t.createElement("div",{ref:e=>{B.current[r]=e},role:"option",tabIndex:O&&!e.disabled?0:-1,"aria-selected":n,onClick:()=>!e.disabled&&H(e.id),onKeyDown:t=>X(t,e.id,!!e.disabled),className:Ye("group relative flex select-none items-center gap-3 rounded-lg","cursor-pointer transition-all duration-200","hover:bg-primary/10","focus:outline-hidden focus:ring-2 focus:ring-primary/20",e.disabled&&"pointer-events-none opacity-50",(n||r===k)&&"bg-primary/5 border border-primary/20","max-w-full",$.option,h?.item)},p&&e.icon&&t.createElement("span",{className:Ye("text-primary/70 transition-colors duration-200","group-hover:text-primary","flex-shrink-0",h?.itemIcon)},v(e.icon)),t.createElement("div",{className:"flex flex-col gap-0.5 min-w-0 flex-grow overflow-hidden max-w-full"},t.createElement(VP,{text:e.label,className:Ye("font-medium leading-none","transition-colors duration-200","group-hover:text-primary",$.optionText,h?.itemText)}),e.description&&t.createElement(VP,{text:e.description,className:Ye("text-muted-foreground","transition-colors duration-200","group-hover:text-primary/70",$.description,h?.description)})),n&&t.createElement(nt,{className:Ye("ml-auto text-primary flex-shrink-0",$.icon)})),r<V.length-1&&t.createElement("div",{className:Ye("my-1.5 h-px bg-border/50",h?.separator)}))}))))});HP.displayName="Dropdown";const UP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("rounded-xl border bg-card text-card-foreground shadow-sm",t),...r}));UP.displayName="Card";const qP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("flex flex-col space-y-1.5 p-6",t),...r}));qP.displayName="CardHeader";const YP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("font-semibold leading-none tracking-tight",t),...r}));YP.displayName="CardTitle";const XP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));XP.displayName="CardDescription";const GP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("p-6 pt-0",t),...r}));GP.displayName="CardContent";function KP({className:e,...r}){return t.createElement("div",{className:Ye("animate-pulse rounded-md bg-primary/10",e),...r})}e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("flex items-center p-6 pt-0",t),...r})).displayName="CardFooter";const ZP=({headerRows:e=2,contentRows:r=3,headerRowHeight:n="h-6",contentRowHeight:o="h-5",gridCols:i=2,gridHeight:a="h-64",className:l})=>t.createElement(UP,{className:Ye("overflow-hidden",l)},t.createElement(qP,{className:"border-b"},t.createElement("div",{className:"space-y-8"},Array.from({length:e}).map((e,r)=>t.createElement(KP,{key:r,className:Ye(n,0===r?"w-1/3":"w-2/3")})),i>0&&t.createElement("div",{className:Ye("grid gap-8",{"grid-cols-1":1===i,"grid-cols-1 md:grid-cols-2":2===i,"grid-cols-1 md:grid-cols-3":3===i,"grid-cols-1 md:grid-cols-4":4===i})},Array.from({length:i}).map((e,r)=>t.createElement(KP,{key:r,className:a}))))),t.createElement(GP,{className:"mt-6 space-y-6"},Array.from({length:r}).map((e,r)=>t.createElement("div",{key:r,className:"flex gap-4"},t.createElement(KP,{className:Ye("w-5",o)}),t.createElement("div",{className:"space-y-2 flex-1"},t.createElement(KP,{className:Ye("w-3/4",o)}),t.createElement(KP,{className:Ye("w-1/2",o)})))))),JP=({rows:e=5,className:r})=>t.createElement(UP,{className:Ye("shadow-lg border-border",r)},t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-48"})),t.createElement(GP,null,t.createElement("div",{className:"space-y-4"},Array.from({length:e}).map((e,r)=>t.createElement(KP,{key:r,className:"h-16 w-full"}))))),QP=({className:e,rows:r=3,rowHeight:n="h-4",mainHeight:o="h-24",firstRowWidth:i="w-3/5",secondRowWidth:a="w-4/5"})=>t.createElement(UP,{className:e},t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-48"})),t.createElement(GP,{className:"space-y-4"},t.createElement(KP,{className:o}),Array.from({length:r}).map((e,r)=>t.createElement(KP,{key:r,className:Ye(n,0===r?i:a)})))),eC=()=>t.createElement("div",{className:"space-y-6"},t.createElement("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Array.from({length:4}).map((e,r)=>t.createElement(UP,{key:r},t.createElement(qP,{className:"flex flex-row items-center justify-between pb-2"},t.createElement(KP,{className:"h-5 w-1/2"}),t.createElement(KP,{className:"h-4 w-4"})),t.createElement(GP,null,t.createElement(KP,{className:"h-8 w-full"}),t.createElement(KP,{className:"mt-4 h-4 w-3/4"}))))),t.createElement("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2"},t.createElement(UP,null,t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-40"})),t.createElement(GP,null,t.createElement(KP,{className:"h-[200px]"}))),t.createElement(UP,null,t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-40"})),t.createElement(GP,null,t.createElement("div",{className:"space-y-2"},Array.from({length:5}).map((e,r)=>t.createElement("div",{key:r,className:"flex justify-between"},t.createElement(KP,{className:"h-4 w-[100px]"}),t.createElement(KP,{className:"h-4 w-[60px]"})))))))),tC=t.forwardRef(({variant:e="card",rows:r=5,className:n,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l,headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:p,gridCols:f,gridHeight:d,...m},h)=>{const y={card:t.createElement(ZP,{headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:p,gridCols:f,gridHeight:d,className:n}),table:t.createElement(JP,{rows:r,className:n}),simple:t.createElement(QP,{className:n,rows:r,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l}),dashboard:t.createElement(eC,null)};return t.createElement("div",{ref:h,...m},y[e])});tC.displayName="CustomSkeleton";const rC={small:{padding:"p-3 sm:p-4",titleSize:"text-base sm:text-lg",descSize:"text-sm sm:text-base",imageHeight:"h-24 sm:h-32 md:h-36",spacing:"space-y-2"},medium:{padding:"p-4 sm:p-5 md:p-6",titleSize:"text-lg sm:text-xl md:text-2xl",descSize:"text-sm sm:text-base md:text-lg",imageHeight:"h-32 sm:h-40 md:h-48 lg:h-56",spacing:"space-y-3"},large:{padding:"p-5 sm:p-6 md:p-7 lg:p-8",titleSize:"text-xl sm:text-2xl md:text-3xl",descSize:"text-base sm:text-lg md:text-xl",imageHeight:"h-40 sm:h-48 md:h-56 lg:h-64",spacing:"space-y-4"},custom:{padding:"",titleSize:"text-lg",descSize:"text-base",imageHeight:"",spacing:"space-y-3"}},nC={none:"",sm:"space-y-2",md:"space-y-3",lg:"space-y-4"},oC={none:"",sm:"shadow-sm",md:"shadow",lg:"shadow-md",xl:"shadow-lg"},iC={none:"",lift:"transition-transform duration-300 hover:-translate-y-1",glow:"transition-shadow duration-300 hover:shadow-glow",scale:"transition-transform duration-300 hover:scale-[1.02]",border:"transition-colors duration-300 hover:border-primary"},aC={none:"rounded-none",sm:"rounded",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},lC={"top-right":"absolute right-4 top-4 z-10","top-left":"absolute left-4 top-4 z-10","bottom-right":"absolute right-4 bottom-4 z-10","bottom-left":"absolute left-4 bottom-4 z-10"},sC={default:{kind:"default",wrapper:"bg-card border border-border",gradients:[]},gradiant:{kind:"gradiant",wrapper:"relative overflow-hidden bg-card border border-border shadow-xs",gradients:["absolute inset-0 bg-primary/20","absolute inset-0 bg-linear-to-tr from-primary/10 via-transparent to-transparent"]},outline:{kind:"outline",wrapper:"bg-transparent border-2 border-border",gradients:[]},solid:{kind:"solid",wrapper:"bg-primary/10 border border-primary/20",gradients:[]},glass:{kind:"glass",wrapper:"bg-card/80 backdrop-blur-md border border-white/20",gradients:["absolute inset-0 bg-gradient-to-tr from-white/5 to-white/10"]}},cC=({title:e,description:r,children:n,variant:o="gradiant",size:a="medium",shadow:l="none",hoverEffect:c="none",borderRadius:u="lg",image:p,imagePosition:f="top",imageHeight:d,badge:m,badgePosition:h="top-right",footer:y,header:v,padding:g,spacing:b="md",width:w,height:x,maxWidth:O,className:E,contentClassName:k,titleClassName:j,descriptionClassName:S,imageClassName:P,onClick:C,href:T,interactive:N=!1,disabled:M=!1})=>{const[A,z]=i(!p),L=s(()=>{z(!0)},[]),D=sC[o],_=rC[a],I=oC[l],R=iC[c],B=aC[u],W="none"===b?"":nC[b]||_.spacing,F=lC[h],$=g||_.padding,V=d||_.imageHeight,H=N?"cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary dark:focus:ring-primary focus:ring-offset-2 dark:focus:ring-offset-background-dark":"",U=M?"opacity-60 pointer-events-none":"",q=s(e=>{!M&&C&&C()},[M,C]),Y=t.createElement(t.Fragment,null,v&&t.createElement("div",{"data-testid":"header",className:"mb-4"},v),m&&t.createElement("div",{"data-testid":"badge-wrapper",className:F},"string"==typeof m?t.createElement("span",{className:"inline-flex items-center rounded-full bg-primary px-3 py-1 text-xs font-medium text-primary-foreground dark:text-primary-foreground-dark ring-1 ring-inset ring-primary/10 dark:ring-primary/20"},m):m),t.createElement("div",{className:Ye(W,D.content&&"default"!==o&&"p-6",k)},p&&"top"===f&&t.createElement("div",{"data-testid":"image-wrapper",className:Ye("relative w-full overflow-hidden",B,V,"mb-6",P)},t.createElement("div",{"data-testid":"image-container",className:Ye(A?"opacity-100":"opacity-0","transition-opacity duration-300")},t.createElement("img",{src:p,alt:e||"Card image",className:"h-full w-full object-cover",onLoad:L}))),e&&t.createElement("h3",{"data-testid":"title",className:Ye("font-semibold tracking-tight text-foreground dark:text-foreground-dark",_.titleSize,j)},e),r&&t.createElement("p",{"data-testid":"description",className:Ye("text-muted-foreground dark:text-muted-foreground-dark leading-relaxed",_.descSize,S)},r),n&&t.createElement("div",{className:Ye("mt-4")},n),y&&t.createElement("div",{"data-testid":"footer",className:"mt-6 pt-4 border-t border-border dark:border-border-dark"},y))),X=D.content?t.createElement("div",{className:D.content},Y):Y,G={width:w||"auto",height:x||"auto",maxWidth:O||"none",...p&&"background"===f?{backgroundImage:`url(${p})`,backgroundSize:"cover",backgroundPosition:"center"}:{}},K=T?"a":"div",Z=T?{href:T,...N?{tabIndex:0}:{}}:{},J=C?{onClick:q,role:"button",tabIndex:N&&!M?0:void 0}:{};return t.createElement(K,{...Z,...J,className:Ye(D.wrapper,B,I,R,H,U,E),style:G},t.createElement("div",{"data-testid":"gradient-wrapper"},D.gradients&&D.gradients.map((e,r)=>t.createElement("div",{key:r,className:e}))),D.inner?t.createElement("div",{className:Ye(D.inner,$)},t.createElement("div",{className:"relative"},X)):t.createElement("div",{className:Ye("relative",$)},X))};cC.displayName="Card";const uC={small:"h-10 w-10",medium:"h-14 w-14 md:h-20 md:w-20",large:"h-28 w-28"},pC=({variant:e="spinner",size:r="medium",className:n,ariaLabel:o="Loading",colorScheme:i})=>{const a=uC[r];return t.createElement("div",{role:"status","aria-label":o,className:Ye("flex items-center justify-center",n)},(()=>{switch(e){case"dots":return t.createElement("div",{className:"flex space-x-2"},[0,1,2].map(e=>t.createElement("div",{key:e,className:Ye("w-3 h-3 rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bounce",1===e&&"animate-bounce-delay-1",2===e&&"animate-bounce-delay-2"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}})));case"bars":return t.createElement("div",{className:"flex space-x-1 h-10 items-center"},[0,1,2,3].map(e=>t.createElement("div",{key:e,className:Ye("w-2 h-full rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bar-scale",1===e&&"animate-bar-scale-delay-1",2===e&&"animate-bar-scale-delay-2",3===e&&"animate-bar-scale-delay-3"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}})));case"orbit":return t.createElement("div",{className:Ye("relative aspect-square flex items-center justify-center",{"w-20 h-20":"small"===r,"w-32 h-32":"medium"===r,"w-40 h-40":"large"===r},n)},t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:3rem]"},t.createElement("div",{className:Ye("absolute w-4 h-4 rounded-full animate-orbit-medium","harford"!==i&&"bg-primary/70 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.7)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:Ye("absolute inset-0 rounded-full blur-xs","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:Ye("absolute w-2 h-2 rounded-full animate-orbit-reverse-medium","harford"!==i&&"bg-primary/60 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 4px 6px -1px rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:4rem]"},t.createElement("div",{className:Ye("absolute w-5 h-5 rounded-full animate-orbit-slow","harford"!==i&&"bg-primary/60 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 20px 25px -5px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:Ye("absolute inset-0 rounded-full blur-xs","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:Ye("absolute w-3 h-3 rounded-full animate-orbit-reverse-slow","harford"!==i&&"bg-primary/50 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.5)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.3)"}:{}})));default:return t.createElement("div",{className:"relative"},t.createElement("div",{className:Ye("relative",a)},t.createElement("div",{className:Ye("absolute inset-0 rounded-full border-4","harford"!==i&&"border-primary/30","animate-ping-slow"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.3)"}:{}}),t.createElement("div",{className:Ye("absolute inset-0 rounded-full border-4 border-transparent","harford"!==i&&"border-t-primary border-l-primary","animate-spin-slow"),style:"harford"===i?{borderTopColor:"#043d5a",borderLeftColor:"#043d5a"}:{}}),t.createElement("div",{className:Ye("absolute inset-0 rounded-full","border-[3px] border-dashed","harford"!==i&&"border-primary/50","animate-spin-slower"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.5)"}:{}}),t.createElement("div",{className:Ye("absolute inset-2 rounded-full border-4 border-transparent","harford"!==i&&"border-r-primary/70 border-b-primary/70","animate-spin-reverse"),style:"harford"===i?{borderRightColor:"rgba(4, 61, 90, 0.7)",borderBottomColor:"rgba(4, 61, 90, 0.7)"}:{}})))}})(),t.createElement("span",{className:"sr-only"},o))};pC.displayName="Loader";var fC,dC="dismissableLayer.update",mC="dismissableLayer.pointerDownOutside",hC="dismissableLayer.focusOutside",yC=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vC=e.forwardRef((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(yC),[p,f]=e.useState(null),d=p?.ownerDocument??globalThis?.document,[,m]=e.useState({}),h=zg(r,e=>f(e)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(v),b=p?y.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=g,O=function(t,r=globalThis?.document){const n=Xg(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){bC(mC,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout(()=>{r.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}},[r,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));x&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())},d),E=function(t,r=globalThis?.document){const n=Xg(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){bC(hC,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(a?.(e),l?.(e),e.defaultPrevented||s?.())},d);return function(t,r=globalThis?.document){const n=Xg(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})},[n,r])}(e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},d),e.useEffect(()=>{if(p)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(fC=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),gC(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=fC)}},[p,d,n,u]),e.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),gC())},[p,u]),e.useEffect(()=>{const e=()=>m({});return document.addEventListener(dC,e),()=>document.removeEventListener(dC,e)},[]),k(Bg.div,{...c,ref:h,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Ng(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Ng(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ng(t.onPointerDownCapture,O.onPointerDownCapture)})});vC.displayName="DismissableLayer";function gC(){const e=new CustomEvent(dC);document.dispatchEvent(e)}function bC(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&P.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e.forwardRef((t,r)=>{const n=e.useContext(yC),o=e.useRef(null),i=zg(r,o);return e.useEffect(()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),k(Bg.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var wC="focusScope.autoFocusOnMount",xC="focusScope.autoFocusOnUnmount",OC={bubbles:!1,cancelable:!0},EC=e.forwardRef((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=Xg(i),p=Xg(a),f=e.useRef(null),d=zg(r,e=>c(e)),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(m.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:PC(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||PC(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&PC(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[o,s,m.paused]),e.useEffect(()=>{if(s){CC.add(m);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(wC,OC);s.addEventListener(wC,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(PC(n,{select:t}),document.activeElement!==r)return}((e=kC(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&PC(s))}return()=>{s.removeEventListener(wC,u),setTimeout(()=>{const e=new CustomEvent(xC,OC);s.addEventListener(xC,p),s.dispatchEvent(e),e.defaultPrevented||PC(t??document.body,{select:!0}),s.removeEventListener(xC,p),CC.remove(m)},0)}}var e},[s,u,p,m]);const h=e.useCallback(e=>{if(!n&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=kC(e),r=jC(t,e),n=jC(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&PC(i,{select:!0})):(e.preventDefault(),n&&PC(o,{select:!0})):r===t&&e.preventDefault()}},[n,o,m.paused]);return k(Bg.div,{tabIndex:-1,...l,ref:d,onKeyDown:h})});function kC(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jC(e,t){for(const r of e)if(!SC(r,{upTo:t}))return r}function SC(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function PC(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}EC.displayName="FocusScope";var CC=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=TC(e,t),e.unshift(t)},remove(t){e=TC(e,t),e[0]?.resume()}}}();function TC(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var NC=e.forwardRef((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);Hg(()=>a(!0),[]);const l=n||i&&globalThis?.document?.body;return l?C.createPortal(k(Bg.div,{...o,ref:r}),l):null});NC.displayName="Portal";var MC=0;function AC(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zC()),document.body.insertAdjacentElement("beforeend",e[1]??zC()),MC++,()=>{1===MC&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),MC--}},[])}function zC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var LC=function(){return LC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LC.apply(this,arguments)};function DC(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function _C(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var IC="right-scroll-bar-position",RC="width-before-scroll-bar";function BC(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var WC="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,FC=new WeakMap;function $C(e,t){var r,n,o,a=(r=null,n=function(t){return e.forEach(function(e){return BC(e,t)})},o=i(function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0],o.callback=n,o.facade);return WC(function(){var t=FC.get(a);if(t){var r=new Set(t),n=new Set(e),o=a.current;r.forEach(function(e){n.has(e)||BC(e,null)}),n.forEach(function(e){r.has(e)||BC(e,o)})}FC.set(a,e)},[e]),a}function VC(e){return e}var HC=function(t){var r=t.sideCar,n=DC(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,LC({},n))};HC.isSideCarExport=!0;var UC=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=VC);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}};return o}(null);return t.options=LC({async:!0,ssr:!1},e),t}(),qC=function(){},YC=e.forwardRef(function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:qC,onWheelCapture:qC,onTouchMoveCapture:qC}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,p=t.enabled,f=t.shards,d=t.sideCar,m=t.noRelative,h=t.noIsolation,y=t.inert,v=t.allowPinchZoom,g=t.as,b=void 0===g?"div":g,w=t.gapMode,x=DC(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=d,E=$C([n,r]),k=LC(LC({},x),i);return e.createElement(e.Fragment,null,p&&e.createElement(O,{sideCar:UC,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:w}),l?e.cloneElement(e.Children.only(s),LC(LC({},k),{ref:E})):e.createElement(b,LC({},k,{className:c,ref:E}),s))});YC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},YC.classNames={fullWidth:RC,zeroRight:IC};function XC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var GC=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=XC())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},KC=function(){var t,r=(t=GC(),function(r,n){e.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},ZC={left:0,top:0,right:0,gap:0},JC=function(e){return parseInt(e||"",10)||0},QC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ZC;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[JC(r),JC(n),JC(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},eT=KC(),tT="data-scroll-locked",rT=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(tT,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(IC," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(RC," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(IC," .").concat(IC," {\n right: 0 ").concat(n,";\n }\n \n .").concat(RC," .").concat(RC," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(tT,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},nT=function(){var e=parseInt(document.body.getAttribute(tT)||"0",10);return isFinite(e)?e:0},oT=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(tT,(nT()+1).toString()),function(){var e=nT()-1;e<=0?document.body.removeAttribute(tT):document.body.setAttribute(tT,e.toString())}},[]);var a=e.useMemo(function(){return QC(i)},[i]);return e.createElement(eT,{styles:rT(a,!r,i,n?"":"!important")})},iT=!1;if("undefined"!=typeof window)try{var aT=Object.defineProperty({},"passive",{get:function(){return iT=!0,!0}});window.addEventListener("test",aT,aT),window.removeEventListener("test",aT,aT)}catch(e){iT=!1}var lT=!!iT&&{passive:!1},sT=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},cT=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),uT(e,n)){var o=pT(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},uT=function(e,t){return"v"===e?function(e){return sT(e,"overflowY")}(t):function(e){return sT(e,"overflowX")}(t)},pT=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},fT=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dT=function(e){return[e.deltaX,e.deltaY]},mT=function(e){return e&&"current"in e?e.current:e},hT=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},yT=0,vT=[];function gT(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bT,wT=(bT=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(yT++)[0],a=e.useState(KC)[0],l=e.useRef(t);e.useEffect(function(){l.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(mT),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=fT(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,p=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===p&&"range"===u.type)return!1;var f=window.getSelection(),d=f&&f.anchorNode;if(d&&(d===u||d.contains(u)))return!1;var m=cT(p,u);if(!m)return!0;if(m?r=p:(r="v"===p?"h":"v",m=cT(p,u)),!m)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var h=o.current||r;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),s=!1,c=i>0,u=0,p=0;do{if(!a)break;var f=pT(e,a),d=f[0],m=f[1]-f[2]-o*d;(d||m)&&uT(e,a)&&(u+=m,p+=d);var h=a.parentNode;a=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(p)<1)&&(s=!0),s}(h,t,e,"h"===h?s:c)},[]),c=e.useCallback(function(e){var t=e;if(vT.length&&vT[vT.length-1]===a){var n="deltaY"in t?dT(t):fT(t),o=r.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(mT).filter(Boolean).filter(function(e){return e.contains(t.target)});(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=e.useCallback(function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:gT(n)};r.current.push(i),setTimeout(function(){r.current=r.current.filter(function(e){return e!==i})},1)},[]),p=e.useCallback(function(e){n.current=fT(e),o.current=void 0},[]),f=e.useCallback(function(e){u(e.type,dT(e),e.target,s(e,t.lockRef.current))},[]),d=e.useCallback(function(e){u(e.type,fT(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return vT.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,lT),document.addEventListener("touchmove",c,lT),document.addEventListener("touchstart",p,lT),function(){vT=vT.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,lT),document.removeEventListener("touchmove",c,lT),document.removeEventListener("touchstart",p,lT)}},[]);var m=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:hT(i)}):null,m?e.createElement(oT,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},UC.useMedium(bT),HC),xT=e.forwardRef(function(t,r){return e.createElement(YC,LC({},t,{ref:r,sideCar:wT}))});xT.classNames=YC.classNames;var OT=new WeakMap,ET=new WeakMap,kT={},jT=0,ST=function(e){return e&&(e.host||ST(e.parentNode))},PT=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=ST(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);kT[r]||(kT[r]=new WeakMap);var i=kT[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(OT.get(e)||0)+1,c=(i.get(e)||0)+1;OT.set(e,s),i.set(e,c),a.push(e),1===s&&o&&ET.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),l.clear(),jT++,function(){a.forEach(function(e){var t=OT.get(e)-1,o=i.get(e)-1;OT.set(e,t),i.set(e,o),t||(ET.has(e)||e.removeAttribute(n),ET.delete(e)),o||e.removeAttribute(r)}),--jT||(OT=new WeakMap,OT=new WeakMap,ET=new WeakMap,kT={})}},CT=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),PT(n,o,r,"aria-hidden")):function(){return null}};function TT(t){const r=e.forwardRef((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Ag(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var NT=Symbol("radix.slottable");function MT(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===NT}var AT="Dialog",[zT,LT]=Lg(AT),[DT,_T]=zT(AT),IT=t=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=t,s=e.useRef(null),c=e.useRef(null),[u,p]=Kg({prop:o,defaultProp:i??!1,onChange:a,caller:AT});return k(DT,{scope:r,triggerRef:s,contentRef:c,contentId:Yg(),titleId:Yg(),descriptionId:Yg(),open:u,onOpenChange:p,onOpenToggle:e.useCallback(()=>p(e=>!e),[p]),modal:l,children:n})};IT.displayName=AT;var RT="DialogTrigger",BT=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(RT,r),i=zg(t,o.triggerRef);return k(Bg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":iN(o.open),...n,ref:i,onClick:Ng(e.onClick,o.onOpenToggle)})});BT.displayName=RT;var WT="DialogPortal",[FT,$T]=zT(WT,{forceMount:void 0}),VT=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=_T(WT,r);return k(FT,{scope:r,forceMount:n,children:e.Children.map(o,e=>k(bb,{present:n||a.open,children:k(NC,{asChild:!0,container:i,children:e})}))})};VT.displayName=WT;var HT="DialogOverlay",UT=e.forwardRef((e,t)=>{const r=$T(HT,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=_T(HT,e.__scopeDialog);return i.modal?k(bb,{present:n||i.open,children:k(YT,{...o,ref:t})}):null});UT.displayName=HT;var qT=function(t){const r=TT(t),n=e.forwardRef((t,n)=>{const{children:o,...i}=t,a=e.Children.toArray(o),l=a.find(MT);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}("DialogOverlay.RemoveScroll"),YT=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(HT,r);return k(xT,{as:qT,allowPinchZoom:!0,shards:[o.contentRef],children:k(Bg.div,{"data-state":iN(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),XT="DialogContent",GT=e.forwardRef((e,t)=>{const r=$T(XT,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=_T(XT,e.__scopeDialog);return k(bb,{present:n||i.open,children:i.modal?k(KT,{...o,ref:t}):k(ZT,{...o,ref:t})})});GT.displayName=XT;var KT=e.forwardRef((t,r)=>{const n=_T(XT,t.__scopeDialog),o=e.useRef(null),i=zg(r,n.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return CT(e)},[]),k(JT,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ng(t.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ng(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:Ng(t.onFocusOutside,e=>e.preventDefault())})}),ZT=e.forwardRef((t,r)=>{const n=_T(XT,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return k(JT,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),JT=e.forwardRef((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=_T(XT,n),c=e.useRef(null),u=zg(r,c);return AC(),j(S,{children:[k(EC,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:k(vC,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":iN(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),j(S,{children:[k(cN,{titleId:s.titleId}),k(uN,{contentRef:c,descriptionId:s.descriptionId})]})]})}),QT="DialogTitle",eN=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(QT,r);return k(Bg.h2,{id:o.titleId,...n,ref:t})});eN.displayName=QT;var tN="DialogDescription",rN=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(tN,r);return k(Bg.p,{id:o.descriptionId,...n,ref:t})});rN.displayName=tN;var nN="DialogClose",oN=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(nN,r);return k(Bg.button,{type:"button",...n,ref:t,onClick:Ng(e.onClick,()=>o.onOpenChange(!1))})});function iN(e){return e?"open":"closed"}oN.displayName=nN;var aN="DialogTitleWarning",[lN,sN]=function(t,r){const n=e.createContext(r),o=t=>{const{children:r,...o}=t,i=e.useMemo(()=>o,Object.values(o));return k(n.Provider,{value:i,children:r})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(n);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(aN,{contentName:XT,titleName:QT,docsSlug:"dialog"}),cN=({titleId:t})=>{const r=sN(aN),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(n)}},[n,t]),null},uN=({contentRef:t,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sN("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(r&&e){document.getElementById(r)||console.warn(n)}},[n,t,r]),null},pN=IT,fN=BT,dN=VT,mN=UT,hN=GT,yN=eN,vN=rN,gN=oN;const bN=pN,wN=fN,xN=dN,ON=e.forwardRef(({className:t,...r},n)=>e.createElement(mN,{ref:n,className:Ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));ON.displayName=mN.displayName;const EN=e.forwardRef(({className:t,children:r,...n},o)=>e.createElement(xN,null,e.createElement(ON,null),e.createElement(hN,{ref:o,className:Ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n},r,e.createElement(gN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},e.createElement(Mk,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close")))));EN.displayName=hN.displayName;const kN=({className:t,...r})=>e.createElement("div",{className:Ye("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});kN.displayName="DialogHeader";const jN=({className:t,...r})=>e.createElement("div",{className:Ye("flex justify-end space-x-2",t),...r});jN.displayName="DialogFooter";const SN=e.forwardRef(({className:t,...r},n)=>e.createElement(yN,{ref:n,className:Ye("text-lg font-semibold leading-none tracking-tight",t),...r}));SN.displayName=yN.displayName;const PN=e.forwardRef(({className:t,...r},n)=>e.createElement(vN,{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));PN.displayName=vN.displayName;const CN={CANCEL_TEXT:"Cancel",CONFIRM_TEXT:"Confirm",VARIANT:"default",SIZE:"medium",POSITION:"center",CLOSE_ON_OUTSIDE_CLICK:!0,SHOW_CLOSE_BUTTON:!1},TN={default:{button:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"}},NN=e=>{switch(e){case"small":return"sm:max-w-[425px]";case"large":return"sm:max-w-[725px]";case"extraLarge":return"sm:max-w-[925px]";case"full":return"sm:max-w-[90vw]";default:return"sm:max-w-[525px]"}},MN=({title:e,description:r,cancelText:n=CN.CANCEL_TEXT,confirmText:o=CN.CONFIRM_TEXT,onConfirm:a,onCancel:l,variant:u=CN.VARIANT,showCloseButton:p=CN.SHOW_CLOSE_BUTTON,size:f=CN.SIZE,className:d,onClose:m,fields:h=[],onOpenChange:y})=>{const[v,g]=i({}),b=c(null),w=s(e=>{e.preventDefault(),b.current?.checkValidity()&&(a?.(v),y(!1))},[v,a,y]),x=s(()=>{l?.(),y(!1)},[l,y]),O=s(()=>{m?.(),y(!1)},[m,y]),E=s(e=>{const{name:t,value:r}=e.target;g(e=>({...e,[t]:r}))},[]);return t.createElement(EN,{className:Ye(NN(f),d)},t.createElement("form",{ref:b,onSubmit:w},t.createElement(kN,null,t.createElement("div",{className:"flex items-center justify-between"},t.createElement(SN,null,e),p&&t.createElement(vt,{variant:"tertiary",className:"h-6 w-6",onClick:O,type:"button"},t.createElement(ht,{className:"h-4 w-4"}))),t.createElement(PN,null,r)),h.length>0&&t.createElement("div",{className:"grid gap-4 py-4"},h.map(e=>t.createElement("div",{className:"grid gap-2",key:e.name},t.createElement(Tg,{id:e.name,name:e.name,type:e.type,placeholder:e.placeholder,required:e.required,defaultValue:e.defaultValue,onChange:E,label:e.label})))),t.createElement(jN,{className:"gap-2 sm:gap-0"},t.createElement(vt,{type:"button",variant:"primary",onClick:x},n),t.createElement(vt,{type:"submit",className:"destructive"===u?TN.default.destructive:TN.default.button},o))))},AN=({trigger:e,isOpen:r,closeOnOutsideClick:n=CN.CLOSE_ON_OUTSIDE_CLICK,children:o,...l})=>{const[s,c]=i(r);a(()=>{void 0!==r&&c(r)},[r]);return t.createElement(bN,{open:s,onOpenChange:e=>{(e||n)&&c(e)}},t.createElement(wN,{asChild:!0},"string"==typeof e?t.createElement(vt,{variant:"primary"},e):e),t.createElement(MN,{...l,onOpenChange:c},o))};AN.displayName="Dialog";const zN=["top","right","bottom","left"],LN=Math.min,DN=Math.max,_N=Math.round,IN=Math.floor,RN=e=>({x:e,y:e}),BN={left:"right",right:"left",bottom:"top",top:"bottom"},WN={start:"end",end:"start"};function FN(e,t,r){return DN(e,LN(t,r))}function $N(e,t){return"function"==typeof e?e(t):e}function VN(e){return e.split("-")[0]}function HN(e){return e.split("-")[1]}function UN(e){return"x"===e?"y":"x"}function qN(e){return"y"===e?"height":"width"}const YN=new Set(["top","bottom"]);function XN(e){return YN.has(VN(e))?"y":"x"}function GN(e){return UN(XN(e))}function KN(e){return e.replace(/start|end/g,e=>WN[e])}const ZN=["left","right"],JN=["right","left"],QN=["top","bottom"],eM=["bottom","top"];function tM(e,t,r,n){const o=HN(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?JN:ZN:t?ZN:JN;case"left":case"right":return t?QN:eM;default:return[]}}(VN(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(KN)))),i}function rM(e){return e.replace(/left|right|bottom|top/g,e=>BN[e])}function nM(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}}function oM(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function iM(e,t,r){let{reference:n,floating:o}=e;const i=XN(t),a=GN(t),l=qN(a),s=VN(t),c="y"===i,u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let d;switch(s){case"top":d={x:u,y:n.y-o.height};break;case"bottom":d={x:u,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:p};break;case"left":d={x:n.x-o.width,y:p};break;default:d={x:n.x,y:n.y}}switch(HN(t)){case"start":d[a]-=f*(r&&c?-1:1);break;case"end":d[a]+=f*(r&&c?-1:1)}return d}async function aM(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:d=0}=$N(t,e),m=nM(d),h=l[f?"floating"===p?"reference":"floating":p],y=oM(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(h)))||r?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===p?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=oM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:g,strategy:s}):v);return{top:(y.top-w.top+m.top)/b.y,bottom:(w.bottom-y.bottom+m.bottom)/b.y,left:(y.left-w.left+m.left)/b.x,right:(w.right-y.right+m.right)/b.x}}function lM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sM(e){return zN.some(t=>e[t]>=0)}const cM=new Set(["left","top"]);function uM(){return"undefined"!=typeof window}function pM(e){return mM(e)?(e.nodeName||"").toLowerCase():"#document"}function fM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dM(e){var t;return null==(t=(mM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function mM(e){return!!uM()&&(e instanceof Node||e instanceof fM(e).Node)}function hM(e){return!!uM()&&(e instanceof Element||e instanceof fM(e).Element)}function yM(e){return!!uM()&&(e instanceof HTMLElement||e instanceof fM(e).HTMLElement)}function vM(e){return!(!uM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof fM(e).ShadowRoot)}const gM=new Set(["inline","contents"]);function bM(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=MM(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!gM.has(o)}const wM=new Set(["table","td","th"]);function xM(e){return wM.has(pM(e))}const OM=[":popover-open",":modal"];function EM(e){return OM.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const kM=["transform","translate","scale","rotate","perspective"],jM=["transform","translate","scale","rotate","perspective","filter"],SM=["paint","layout","strict","content"];function PM(e){const t=CM(),r=hM(e)?MM(e):e;return kM.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||jM.some(e=>(r.willChange||"").includes(e))||SM.some(e=>(r.contain||"").includes(e))}function CM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const TM=new Set(["html","body","#document"]);function NM(e){return TM.has(pM(e))}function MM(e){return fM(e).getComputedStyle(e)}function AM(e){return hM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zM(e){if("html"===pM(e))return e;const t=e.assignedSlot||e.parentNode||vM(e)&&e.host||dM(e);return vM(t)?t.host:t}function LM(e){const t=zM(e);return NM(t)?e.ownerDocument?e.ownerDocument.body:e.body:yM(t)&&bM(t)?t:LM(t)}function DM(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=LM(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=fM(o);if(i){const e=_M(a);return t.concat(a,a.visualViewport||[],bM(o)?o:[],e&&r?DM(e):[])}return t.concat(o,DM(o,[],r))}function _M(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IM(e){const t=MM(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=yM(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=_N(r)!==i||_N(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function RM(e){return hM(e)?e:e.contextElement}function BM(e){const t=RM(e);if(!yM(t))return RN(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=IM(t);let a=(i?_N(r.width):r.width)/n,l=(i?_N(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const WM=RN(0);function FM(e){const t=fM(e);return CM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:WM}function $M(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=RM(e);let a=RN(1);t&&(n?hM(n)&&(a=BM(n)):a=BM(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==fM(e))&&t}(i,r,n)?FM(i):RN(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(i){const e=fM(i),t=n&&hM(n)?fM(n):n;let r=e,o=_M(r);for(;o&&n&&t!==r;){const e=BM(o),t=o.getBoundingClientRect(),n=MM(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,p*=e.y,s+=i,c+=a,r=fM(o),o=_M(r)}}return oM({width:u,height:p,x:s,y:c})}function VM(e,t){const r=AM(e).scrollLeft;return t?t.left+r:$M(dM(e)).left+r}function HM(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-VM(e,r),y:r.top+t.scrollTop}}const UM=new Set(["absolute","fixed"]);function qM(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=fM(e),n=dM(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=CM();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=VM(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=dM(e),r=AM(e),n=e.ownerDocument.body,o=DN(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=DN(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+VM(e);const l=-r.scrollTop;return"rtl"===MM(n).direction&&(a+=DN(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(dM(e));else if(hM(t))n=function(e,t){const r=$M(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=yM(e)?BM(e):RN(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=FM(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return oM(n)}function YM(e,t){const r=zM(e);return!(r===t||!hM(r)||NM(r))&&("fixed"===MM(r).position||YM(r,t))}function XM(e,t,r){const n=yM(t),o=dM(t),i="fixed"===r,a=$M(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=RN(0);function c(){s.x=VM(o)}if(n||!n&&!i)if(("body"!==pM(t)||bM(o))&&(l=AM(t)),n){const e=$M(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=!o||n||i?RN(0):HM(o,l);return{x:a.left+l.scrollLeft-s.x-u.x,y:a.top+l.scrollTop-s.y-u.y,width:a.width,height:a.height}}function GM(e){return"static"===MM(e).position}function KM(e,t){if(!yM(e)||"fixed"===MM(e).position)return null;if(t)return t(e);let r=e.offsetParent;return dM(e)===r&&(r=r.ownerDocument.body),r}function ZM(e,t){const r=fM(e);if(EM(e))return r;if(!yM(e)){let t=zM(e);for(;t&&!NM(t);){if(hM(t)&&!GM(t))return t;t=zM(t)}return r}let n=KM(e,t);for(;n&&xM(n)&&GM(n);)n=KM(n,t);return n&&NM(n)&&GM(n)&&!PM(n)?r:n||function(e){let t=zM(e);for(;yM(t)&&!NM(t);){if(PM(t))return t;if(EM(t))return null;t=zM(t)}return null}(e)||r}const JM={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=dM(n),l=!!t&&EM(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=RN(1);const u=RN(0),p=yM(n);if((p||!p&&!i)&&(("body"!==pM(n)||bM(a))&&(s=AM(n)),yM(n))){const e=$M(n);c=BM(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||p||i?RN(0):HM(a,s);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:dM,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?EM(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=DM(e,[],!1).filter(e=>hM(e)&&"body"!==pM(e)),o=null;const i="fixed"===MM(e).position;let a=i?zM(e):e;for(;hM(a)&&!NM(a);){const t=MM(a),r=PM(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&UM.has(o.position)||bM(a)&&!r&&YM(e,a))?n=n.filter(e=>e!==a):o=t,a=zM(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce((e,r)=>{const n=qM(t,r,o);return e.top=DN(n.top,e.top),e.right=LN(n.right,e.right),e.bottom=LN(n.bottom,e.bottom),e.left=DN(n.left,e.left),e},qM(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ZM,getElementRects:async function(e){const t=this.getOffsetParent||ZM,r=this.getDimensions,n=await r(e.floating);return{reference:XM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=IM(e);return{width:t,height:r}},getScale:BM,isElement:hM,isRTL:function(e){return"rtl"===MM(e).direction}};function QM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eA(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=RM(e),u=o||i?[...c?DM(c):[],...DM(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const p=c&&l?function(e,t){let r,n=null;const o=dM(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:p,width:f,height:d}=c;if(l||t(),!f||!d)return;const m={rootMargin:-IN(p)+"px "+-IN(o.clientWidth-(u+f))+"px "+-IN(o.clientHeight-(p+d))+"px "+-IN(u)+"px",threshold:DN(0,LN(1,s))||1};let h=!0;function y(t){const n=t[0].intersectionRatio;if(n!==s){if(!h)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||QM(c,e.getBoundingClientRect())||a(),h=!1}try{n=new IntersectionObserver(y,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(y,m)}n.observe(e)}(!0),i}(c,r):null;let f,d=-1,m=null;a&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),c&&!s&&m.observe(c),m.observe(t));let h=s?$M(e):null;return s&&function t(){const n=$M(e);h&&!QM(h,n)&&r();h=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==p||p(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const tA=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=VN(r),l=HN(r),s="y"===XN(r),c=cM.has(a)?-1:1,u=i&&s?-1:1,p=$N(t,e);let{mainAxis:f,crossAxis:d,alignmentAxis:m}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof m&&(d="end"===l?-1*m:m),s?{x:d*u,y:f*c}:{x:f*c,y:d*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},rA=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=$N(e,t),c={x:r,y:n},u=await aM(t,s),p=XN(VN(o)),f=UN(p);let d=c[f],m=c[p];if(i){const e="y"===f?"bottom":"right";d=FN(d+u["y"===f?"top":"left"],d,d-u[e])}if(a){const e="y"===p?"bottom":"right";m=FN(m+u["y"===p?"top":"left"],m,m-u[e])}const h=l.fn({...t,[f]:d,[p]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:i,[p]:a}}}}}},nA=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=$N(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=VN(o),g=XN(l),b=VN(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(b||!h?[rM(l)]:function(e){const t=rM(e);return[KN(e),t,KN(t)]}(l)),O="none"!==m;!f&&O&&x.push(...tM(l,h,m,w));const E=[l,...x],k=await aM(t,y),j=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&j.push(k[v]),p){const e=function(e,t,r){void 0===r&&(r=!1);const n=HN(e),o=GN(e),i=qN(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=rM(a)),[a,rM(a)]}(o,a,w);j.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:j}],!j.every(e=>e<=0)){var P,C;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=E[e];if(t){if(!("alignment"===p&&g!==XN(t))||S.every(e=>XN(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let r=null==(C=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!r)switch(d){case"bestFit":{var T;const e=null==(T=S.filter(e=>{if(O){const t=XN(e.placement);return t===g||"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:T[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},oA=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=$N(e,t),u=await aM(t,c),p=VN(o),f=HN(o),d="y"===XN(o),{width:m,height:h}=i.floating;let y,v;"top"===p||"bottom"===p?(y=p,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=p,y="end"===f?"top":"bottom");const g=h-u.top-u.bottom,b=m-u.left-u.right,w=LN(h-u[y],g),x=LN(m-u[v],b),O=!t.middlewareData.shift;let E=w,k=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=g),O&&!f){const e=DN(u.left,0),t=DN(u.right,0),r=DN(u.top,0),n=DN(u.bottom,0);d?k=m-2*(0!==e||0!==t?e+t:DN(u.left,u.right)):E=h-2*(0!==r||0!==n?r+n:DN(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:E});const j=await a.getDimensions(l.floating);return m!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}},iA=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=$N(e,t);switch(n){case"referenceHidden":{const e=lM(await aM(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:sM(e)}}}case"escaped":{const e=lM(await aM(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:sM(e)}}}default:return{}}}}},aA=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=$N(e,t)||{};if(null==c)return{};const p=nM(u),f={x:r,y:n},d=GN(o),m=qN(d),h=await a.getDimensions(c),y="y"===d,v=y?"top":"left",g=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[d]-f[d]-i.floating[m],x=f[d]-i.reference[d],O=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=O?O[b]:0;E&&await(null==a.isElement?void 0:a.isElement(O))||(E=l.floating[b]||i.floating[m]);const k=w/2-x/2,j=E/2-h[m]/2-1,S=LN(p[v],j),P=LN(p[g],j),C=S,T=E-h[m]-P,N=E/2-h[m]/2+k,M=FN(C,N,T),A=!s.arrow&&null!=HN(o)&&N!==M&&i.reference[m]/2-(N<C?S:P)-h[m]/2<0,z=A?N<C?N-C:N-T:0;return{[d]:f[d]+z,data:{[d]:M,centerOffset:N-M-z,...A&&{alignmentOffset:z}},reset:A}}}),lA=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=$N(e,t),u={x:r,y:n},p=XN(o),f=UN(p);let d=u[f],m=u[p];const h=$N(l,t),y="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+y.mainAxis,r=i.reference[f]+i.reference[e]-y.mainAxis;d<t?d=t:d>r&&(d=r)}if(c){var v,g;const e="y"===f?"width":"height",t=cM.has(VN(o)),r=i.reference[p]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[p])||0)+(t?0:y.crossAxis),n=i.reference[p]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[p])||0)-(t?y.crossAxis:0);m<r?m=r:m>n&&(m=n)}return{[f]:d,[p]:m}}}},sA=(e,t,r)=>{const n=new Map,o={platform:JM,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=iM(c,n,s),f=n,d={},m=0;for(let r=0;r<l.length;r++){const{name:i,fn:h}=l[r],{x:y,y:v,data:g,reset:b}=await h({x:u,y:p,initialPlacement:n,placement:f,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,p=null!=v?v:p,d={...d,[i]:{...d[i],...g}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:p}=iM(c,f,s))),r=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})};var cA="undefined"!=typeof document?f:function(){};function uA(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!uA(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!uA(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function pA(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fA(e,t){const r=pA(e);return Math.round(t*r)/r}function dA(t){const r=e.useRef(t);return cA(()=>{r.current=t}),r}const mA=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?aA({element:r.current,padding:n}).fn(t):{}:r?aA({element:r,padding:n}).fn(t):{};var o}}),hA=(e,t)=>({...tA(e),options:[e,t]}),yA=(e,t)=>({...rA(e),options:[e,t]}),vA=(e,t)=>({...lA(e),options:[e,t]}),gA=(e,t)=>({...nA(e),options:[e,t]}),bA=(e,t)=>({...oA(e),options:[e,t]}),wA=(e,t)=>({...iA(e),options:[e,t]}),xA=(e,t)=>({...mA(e),options:[e,t]});var OA=e.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return k(Bg.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:k("polygon",{points:"0,0 30,0 15,10"})})});OA.displayName="Arrow";var EA=OA,kA="Popper",[jA,SA]=Lg(kA),[PA,CA]=jA(kA),TA=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return k(PA,{scope:r,anchor:o,onAnchorChange:i,children:n})};TA.displayName=kA;var NA="PopperAnchor",MA=e.forwardRef((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=CA(NA,n),l=e.useRef(null),s=zg(r,l),c=e.useRef(null);return e.useEffect(()=>{const e=c.current;c.current=o?.current||l.current,e!==c.current&&a.onAnchorChange(c.current)}),o?null:k(Bg.div,{...i,ref:s})});MA.displayName=NA;var AA="PopperContent",[zA,LA]=jA(AA),DA=e.forwardRef((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:m="optimized",onPlaced:h,...y}=t,v=CA(AA,n),[g,b]=e.useState(null),w=zg(r,e=>b(e)),[x,O]=e.useState(null),E=vb(x),j=E?.width??0,S=E?.height??0,C=o+("center"!==a?"-"+a:""),T="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(u)?u:[u],M=N.length>0,A={padding:T,boundary:N.filter(BA),altBoundary:M},{refs:z,floatingStyles:L,placement:D,isPositioned:_,middlewareData:I}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[p,f]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[d,m]=e.useState(o);uA(d,o)||m(o);const[h,y]=e.useState(null),[v,g]=e.useState(null),b=e.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),w=e.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),x=a||h,O=l||v,E=e.useRef(null),k=e.useRef(null),j=e.useRef(p),S=null!=c,C=dA(c),T=dA(i),N=dA(u),M=e.useCallback(()=>{if(!E.current||!k.current)return;const e={placement:r,strategy:n,middleware:d};T.current&&(e.platform=T.current),sA(E.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==N.current};A.current&&!uA(j.current,t)&&(j.current=t,P.flushSync(()=>{f(t)}))})},[d,r,n,T,N]);cA(()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const A=e.useRef(!1);cA(()=>(A.current=!0,()=>{A.current=!1}),[]),cA(()=>{if(x&&(E.current=x),O&&(k.current=O),x&&O){if(C.current)return C.current(x,O,M);M()}},[x,O,M,C,S]);const z=e.useMemo(()=>({reference:E,floating:k,setReference:b,setFloating:w}),[b,w]),L=e.useMemo(()=>({reference:x,floating:O}),[x,O]),D=e.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=fA(L.floating,p.x),r=fA(L.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...pA(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,L.floating,p.x,p.y]);return e.useMemo(()=>({...p,update:M,refs:z,elements:L,floatingStyles:D}),[p,M,z,L,D])}({strategy:"fixed",placement:C,whileElementsMounted:(...e)=>eA(...e,{animationFrame:"always"===m}),elements:{reference:v.anchor},middleware:[hA({mainAxis:i+S,alignmentAxis:l}),c&&yA({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?vA():void 0,...A}),c&&gA({...A}),bA({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&xA({element:x,padding:s}),WA({arrowWidth:j,arrowHeight:S}),d&&wA({strategy:"referenceHidden",...A})]}),[R,B]=FA(D),W=Xg(h);Hg(()=>{_&&W?.()},[_,W]);const F=I.arrow?.x,$=I.arrow?.y,V=0!==I.arrow?.centerOffset,[H,U]=e.useState();return Hg(()=>{g&&U(window.getComputedStyle(g).zIndex)},[g]),k("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:_?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:k(zA,{scope:n,placedSide:R,onArrowChange:O,arrowX:F,arrowY:$,shouldHideArrow:V,children:k(Bg.div,{"data-side":R,"data-align":B,...y,ref:w,style:{...y.style,animation:_?void 0:"none"}})})})});DA.displayName=AA;var _A="PopperArrow",IA={top:"bottom",right:"left",bottom:"top",left:"right"},RA=e.forwardRef(function(e,t){const{__scopePopper:r,...n}=e,o=LA(_A,r),i=IA[o.placedSide];return k("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:k(EA,{...n,ref:t,style:{...n.style,display:"block"}})})});function BA(e){return null!==e}RA.displayName=_A;var WA=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=FA(r),u={start:"0%",center:"50%",end:"100%"}[c],p=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let d="",m="";return"bottom"===s?(d=i?u:`${p}px`,m=-l+"px"):"top"===s?(d=i?u:`${p}px`,m=`${n.floating.height+l}px`):"right"===s?(d=-l+"px",m=i?u:`${f}px`):"left"===s&&(d=`${n.floating.width+l}px`,m=i?u:`${f}px`),{data:{x:d,y:m}}}});function FA(e){const[t,r="center"]=e.split("-");return[t,r]}var $A=TA,VA=MA,HA=DA,UA=RA;function qA(t){const r=e.forwardRef((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Ag(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var YA=Symbol("radix.slottable");function XA(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===YA}var GA="Popover",[KA]=Lg(GA,[SA]),ZA=SA(),[JA,QA]=KA(GA),ez=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=ZA(r),c=e.useRef(null),[u,p]=e.useState(!1),[f,d]=Kg({prop:o,defaultProp:i??!1,onChange:a,caller:GA});return k($A,{...s,children:k(JA,{scope:r,contentId:Yg(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback(()=>p(!0),[]),onCustomAnchorRemove:e.useCallback(()=>p(!1),[]),modal:l,children:n})})};ez.displayName=GA;var tz="PopoverAnchor";e.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=QA(tz,n),a=ZA(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect(()=>(l(),()=>s()),[l,s]),k(VA,{...a,...o,ref:r})}).displayName=tz;var rz="PopoverTrigger",nz=e.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=QA(rz,r),i=ZA(r),a=zg(t,o.triggerRef),l=k(Bg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hz(o.open),...n,ref:a,onClick:Ng(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:k(VA,{asChild:!0,...i,children:l})});nz.displayName=rz;var oz="PopoverPortal",[iz,az]=KA(oz,{forceMount:void 0}),lz=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=QA(oz,t);return k(iz,{scope:t,forceMount:r,children:k(bb,{present:r||i.open,children:k(NC,{asChild:!0,container:o,children:n})})})};lz.displayName=oz;var sz="PopoverContent",cz=e.forwardRef((e,t)=>{const r=az(sz,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=QA(sz,e.__scopePopover);return k(bb,{present:n||i.open,children:i.modal?k(pz,{...o,ref:t}):k(fz,{...o,ref:t})})});cz.displayName=sz;var uz=function(t){const r=qA(t),n=e.forwardRef((t,n)=>{const{children:o,...i}=t,a=e.Children.toArray(o),l=a.find(XA);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}("PopoverContent.RemoveScroll"),pz=e.forwardRef((t,r)=>{const n=QA(sz,t.__scopePopover),o=e.useRef(null),i=zg(r,o),a=e.useRef(!1);return e.useEffect(()=>{const e=o.current;if(e)return CT(e)},[]),k(xT,{as:uz,allowPinchZoom:!0,children:k(dz,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ng(t.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ng(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:Ng(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),fz=e.forwardRef((t,r)=>{const n=QA(sz,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return k(dz,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),dz=e.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...p}=e,f=QA(sz,r),d=ZA(r);return AC(),k(EC,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:k(vC,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:k(HA,{"data-state":hz(f.open),role:"dialog",id:f.contentId,...d,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),mz="PopoverClose";e.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=QA(mz,r);return k(Bg.button,{type:"button",...n,ref:t,onClick:Ng(e.onClick,()=>o.onOpenChange(!1))})}).displayName=mz;function hz(e){return e?"open":"closed"}e.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ZA(r);return k(UA,{...o,...n,ref:t})}).displayName="PopoverArrow";var yz=ez,vz=nz,gz=lz,bz=cz;const wz="MM/dd/yyyy",xz={US:"MM/dd/yyyy",EU:"dd/MM/yyyy",ISO:"yyyy-MM-dd",LONG:"MMMM d, yyyy",SHORT:"MMM d, yyyy",FULL:"EEEE, MMMM d, yyyy",COMPACT:"MM/dd/yy",WITH_TIME:"MM/dd/yyyy HH:mm",PPP:"PPP"},Oz=(e,t)=>{try{return Vj(e,t)}catch{return Vj(e,wz)}},Ez=["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"].map((e,t)=>({id:t.toString(),label:e})),kz=(e,t)=>{const r=(new Date).getFullYear(),n=e?Yj(e):1900,o=[];for(let e=t?Yj(t):r+10;e>=n;e--)o.push({id:e.toString(),label:e.toString()});return o},jz=e=>{if(e)return Yk(e)},Sz=r(({type:e="single",value:r,onChange:n,placeholder:o="Select date",disabled:c=!1,minDate:u,maxDate:p,className:f,label:d,error:m,required:h=!1,clearable:y=!0,variant:v="tertiary",dataTestId:g,enableYearMonthDropdowns:b=!1,format:w="MM/dd/yyyy"},x)=>{const[O,E]=i(!1),[k,j]=i("range"!==e||!r||r instanceof Date?void 0:r),[S,P]=i(()=>{if("single"===e&&r instanceof Date)return r;if("range"===e&&r&&!(r instanceof Date)){return r.from||new Date}return new Date});a(()=>{if("range"!==e||!r||r instanceof Date)"range"!==e||r||j(void 0);else{const e=r;j({from:jz(e.from),to:jz(e.to)})}},[r,e]),a(()=>{if("single"===e&&r instanceof Date)P(r);else if("range"===e&&r&&!(r instanceof Date)){const e=r;e.from&&P(e.from)}},[r,e]);const C=l(()=>kz(u,p),[u,p]),T=Ez,N=s(t=>{if(t.preventDefault(),t.stopPropagation(),"single"===e)n?.(void 0);else{const e={from:void 0,to:void 0};n?.(e),j(e)}E(!1)},[n,e]),M=s(e=>{const t=parseInt(e,10),r=Qj(S,t);P(r)},[S]),A=s(e=>{const t=parseInt(e,10),r=Jj(S,t);P(r)},[S]),z=s(()=>{if(!r)return"";if("single"===e&&r instanceof Date)return Oz(r,w);if("range"===e&&!(r instanceof Date)){const e=r;if(e.from)return e.to?`${Oz(e.from,w)} - ${Oz(e.to,w)}`:Oz(e.from,w)}return""},[r,e,w]),L=s(e=>{if(!e)return j(void 0),void n?.(void 0);if(e instanceof Date){const t=jz(e);return n?.(t),void E(!1)}const t={from:jz(e.from),to:jz(e.to)};j(t),e.from&&e.to?(n?.(t),E(!1)):e.from||n?.(t)},[n]),D=s(e=>{const t=jz(e);n?.(t),t&&E(!1)},[n]),_=s(()=>{const n={initialFocus:!0,month:S,onMonthChange:P,disabled:e=>{if(c)return!0;const t=Yk(e);return!!(u&&t<Yk(u))||!!(p&&t>Yk(p))},classNames:{months:Ye("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0","sm:divide-x sm:divide-border"),month:Ye("space-y-4","first:pr-2 last:pl-2"),caption:"flex justify-center pt-1 relative items-center h-10",caption_label:b?"sr-only":"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ye("h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","border border-border rounded-md hover:bg-accent","flex items-center justify-center transition-colors"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:Ye("text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]","flex items-center justify-center"),row:"flex w-full mt-2",cell:Ye("relative p-0 text-center text-sm focus-within:relative focus-within:z-20","h-9 w-9 p-0","group","[&:has([aria-selected].day-range-start)]:rounded-l-md [&:has([aria-selected].day-range-start)]:bg-primary","[&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-range-end)]:bg-primary","[&:has([aria-selected])]:bg-primary/30","[&:has([aria-selected].day-range-middle)]:bg-primary/10"),day:Ye("h-9 w-9 p-0 font-normal","aria-selected:opacity-100","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:rounded-md","data-today:bg-accent/30 data-today:text-accent-foreground","rounded-md transition-colors","flex items-center justify-center","day-range-middle:bg-primary/10","day-range-start:bg-primary day-range-start:text-primary-foreground","day-range-end:bg-primary day-range-end:text-primary-foreground"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_range_middle:"day-range-middle",day_selected:Ye("bg-primary text-primary-foreground","hover:bg-primary/90","focus:bg-primary focus:text-primary-foreground"),day_today:"bg-accent/30 text-accent-foreground",day_outside:"text-muted-foreground opacity-50",day_disabled:"text-muted-foreground opacity-50",day_hidden:"invisible"}},o=e=>t.createElement("div",{className:"relative"},b&&t.createElement("div",{className:"flex items-center justify-center gap-2 mb-4 px-2"},t.createElement("div",{className:"flex items-center gap-2"},t.createElement(HP,{options:T,value:Uj(S).toString(),onValueChange:A,placeholder:"Month",size:"small",variant:"basic",className:"w-25"}),t.createElement(HP,{options:C,value:Yj(S).toString(),onValueChange:M,placeholder:"Year",size:"small",variant:"basic",className:"w-25"}))),e);return o("single"===e?t.createElement(_P,{mode:"single",selected:r instanceof Date?r:void 0,onSelect:D,...n}):t.createElement(_P,{mode:"range",selected:k,onSelect:L,numberOfMonths:2,...n}))},[e,r,D,k,L,c,u,p,S,b,T,C,A,M]),I="single"===e?r instanceof Date:r&&!(r instanceof Date)&&(r.from||r.to);return t.createElement("div",{ref:x,className:"relative w-full","data-testid":g},d&&t.createElement("div",{className:Ye("mb-2 text-sm font-medium",m&&"text-destructive")},d,h&&t.createElement("span",{className:"text-destructive ml-1"},"*")),t.createElement(yz,{open:O,onOpenChange:E},t.createElement("div",{className:"relative"},t.createElement(vz,{asChild:!0},t.createElement(vt,{variant:v,className:Ye("w-full","inline-flex items-center","py-2 px-3","border border-input","hover:bg-accent/50","focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-primary",!r&&"text-muted-foreground",m&&"border-destructive focus:ring-destructive","transition-all duration-200","sm:text-sm md:text-base",y&&I&&"pr-10",f),disabled:c},t.createElement("div",{className:"inline-flex items-center gap-2 w-full pr-8"},t.createElement(rt,{className:"h-4 w-4 shrink-0"}),t.createElement("span",{className:"truncate flex-1 text-left","data-testid":"date-display"},z()||o)))),y&&I&&!c&&t.createElement("button",{type:"button",onClick:N,className:Ye("absolute right-2 top-1/2 -translate-y-1/2","p-1.5 rounded-md","hover:bg-accent/80","focus:outline-hidden focus:ring-2 focus:ring-primary","transition-all duration-200","z-10"),"aria-label":"Clear date","data-testid":"clear-button"},t.createElement(ht,{className:"h-4 w-4 text-muted-foreground hover:text-destructive transition-colors"}))),t.createElement(gz,null,t.createElement(bz,{className:Ye("z-50 rounded-lg border bg-popover p-3","shadow-lg ring-1 ring-black ring-opacity-5","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","w-auto min-w-[280px]","range"===e?"sm:min-w-[600px]":"sm:min-w-[320px]","max-w-[95vw]"),align:"start",sideOffset:4},t.createElement("div",{className:"w-full overflow-hidden"},t.createElement("div",{className:Ye("w-full","range"===e&&"overflow-x-auto")},_()))))),m&&t.createElement("p",{className:"mt-2 text-sm text-destructive"},m))});Sz.displayName="DatePicker";const Pz=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Cz=()=>{const e=t.useContext(Pz);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function Tz(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Nz(){return Az(/^iPad/)||Az(/^Mac/)&&navigator.maxTouchPoints>1}function Mz(){return Az(/^iPhone/)||Nz()}function Az(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const zz="undefined"!=typeof window?f:a;function Lz(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}const Dz="undefined"!=typeof document&&window.visualViewport;function _z(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Iz(e){for(_z(e)&&(e=e.parentElement);e&&!_z(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Rz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Bz,Wz=0;function Fz(e={}){let{isDisabled:t}=e;zz(()=>{if(!t)return Wz++,1===Wz&&Mz()&&(Bz=function(){let e,t=0,r=r=>{e=Iz(r.target),e===document.documentElement&&e===document.body||(t=r.changedTouches[0].pageY)},n=r=>{if(!e||e===document.documentElement||e===document.body)return void r.preventDefault();let n=r.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&n>t||o>=i&&n<t)&&r.preventDefault(),t=n)},o=e=>{let t=e.target;Hz(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},i=e=>{let t=e.target;Hz(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",Dz&&(Dz.height<window.innerHeight?requestAnimationFrame(()=>{Vz(t)}):Dz.addEventListener("resize",()=>Vz(t),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},l=window.pageXOffset,s=window.pageYOffset,c=Lz(function(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=Lz($z(document,"touchstart",r,{passive:!1,capture:!0}),$z(document,"touchmove",n,{passive:!1,capture:!0}),$z(document,"touchend",o,{passive:!1,capture:!0}),$z(document,"focus",i,!0),$z(window,"scroll",a));return()=>{c(),u(),window.scrollTo(l,s)}}()),()=>{Wz--,0===Wz&&(null==Bz||Bz())}},[t])}function $z(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function Vz(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=Iz(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=n-r)}e=t.parentElement}}function Hz(e){return e instanceof HTMLInputElement&&!Rz.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Uz(...t){return e.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...t),t)}const qz=new WeakMap;function Yz(e,t,r=!1){if(!(e&&e instanceof HTMLElement))return;let n={};Object.entries(t).forEach(([t,r])=>{t.startsWith("--")?e.style.setProperty(t,r):(n[t]=e.style[t],e.style[t]=r)}),r||qz.set(e,n)}const Xz=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Gz(e,t){if(!e)return null;const r=window.getComputedStyle(e),n=r.transform||r.webkitTransform||r.mozTransform;let o=n.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Xz(t)?13:12]):(o=n.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Xz(t)?5:4]):null)}function Kz(e,t){if(!e)return()=>{};const r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}const Zz={DURATION:.5,EASE:[.32,.72,0,1]},Jz=16,Qz="vaul-dragging";function eL(e){const r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>null==r.current?void 0:r.current.call(r,...e),[])}function tL({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:e,onChange:r}){const n=t.useState(e),[o]=n,i=t.useRef(o),a=eL(r);return t.useEffect(()=>{i.current!==o&&(a(o),i.current=o)},[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==e,l=a?e:o,s=eL(n),c=t.useCallback(t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)},[a,e,i,s]);return[l,c]}let rL=null;const nL=t.forwardRef(function({...e},r){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:a,isOpen:l,modal:s,shouldAnimate:c}=Cz(),u=Uz(r,n),p=o&&o.length>0;if(!s)return null;const f=t.useCallback(e=>i(e),[i]);return t.createElement(mN,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":l&&p?"true":"false","data-vaul-snap-points-overlay":l&&a?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});nL.displayName="Drawer.Overlay";const oL=t.forwardRef(function({onPointerDownOutside:e,style:r,onOpenAutoFocus:n,...o},i){const{drawerRef:a,onPress:s,onRelease:c,onDrag:u,keyboardIsOpen:p,snapPointsOffset:f,activeSnapPointIndex:d,modal:m,isOpen:h,direction:y,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:x}=Cz(),[O,E]=t.useState(!1),k=Uz(i,a),j=t.useRef(null),S=t.useRef(null),P=t.useRef(!1),C=v&&v.length>0;!function(){const{direction:e,isOpen:r,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=Cz(),a=t.useRef(null),s=l(()=>document.body.style.backgroundColor,[]);function c(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(r&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!i&&Kz(document.body,{background:"black"}),Kz(t,{transformOrigin:Xz(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Zz.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Zz.EASE.join(",")})`});const r=Kz(t,{borderRadius:"8px",overflow:"hidden",...Xz(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{r(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},1e3*Zz.DURATION)}}},[r,n,s])}();function T(e){j.current=null,P.current=!1,c(e)}return t.useEffect(()=>{C&&window.requestAnimationFrame(()=>{E(!0)})},[]),t.createElement(hN,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":h&&C?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...o,ref:k,style:f&&f.length>0?{"--snap-point-height":`${f[null!=d?d:0]}px`,...r}:r,onPointerDown:e=>{b||(null==o.onPointerDown||o.onPointerDown.call(o,e),j.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==n||n(e),x||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?p.current&&(p.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(S.current=e,b)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!j.current)return;const t=e.pageY-j.current.y,r=e.pageX-j.current.x,n="touch"===e.pointerType?10:2,i=((e,t,r=0)=>{if(P.current)return!0;const n=Math.abs(e.y),o=Math.abs(e.x),i=o>n,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=r)return i}else if(!(e.y*a<0)&&n>=0&&n<=r)return!i;return P.current=!0,!0})({x:r,y:t},y,n);i?u(e):(Math.abs(r)>n||Math.abs(t)>n)&&(j.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),j.current=null,P.current=!1,c(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),T(S.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),S.current&&T(S.current)}})});oL.displayName="Drawer.Content";const iL=t.forwardRef(function({preventCycle:e=!1,children:r,...n},o){const{closeDrawer:i,isDragging:a,snapPoints:l,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:p,isOpen:f,onPress:d,onDrag:m}=Cz(),h=t.useRef(null),y=t.useRef(!1);function v(){h.current&&window.clearTimeout(h.current),y.current=!1}return t.createElement("div",{onClick:function(){y.current?v():window.setTimeout(()=>{!function(){if(a||e||y.current)return void v();if(v(),!l||0===l.length)return void(u||i());if(s===l[l.length-1]&&u)return void i();const t=l.findIndex(e=>e===s);if(-1===t)return;const r=l[t+1];c(r)}()},120)},onPointerCancel:v,onPointerDown:e=>{p&&d(e),h.current=window.setTimeout(()=>{y.current=!0},250)},onPointerMove:e=>{p&&m(e)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},r))});iL.displayName="Drawer.Handle";const aL={Root:function({open:e,onOpenChange:r,children:n,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:l=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:p=!0,handleOnly:f=!1,fadeFromIndex:d=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:h,fixed:y,modal:v=!0,onClose:g,nested:b,noBodyStyles:w=!1,direction:x="bottom",defaultOpen:O=!1,disablePreventScroll:E=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:j=!1,repositionInputs:S=!0,onAnimationEnd:P,container:C,autoFocus:T=!1}){var N,M;const[A=!1,z]=tL({defaultProp:O,prop:e,onChange:e=>{null==r||r(e),e||b||ue(),setTimeout(()=>{null==P||P(e)},1e3*Zz.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[L,D]=t.useState(!1),[_,I]=t.useState(!1),[R,B]=t.useState(!1),W=t.useRef(null),F=t.useRef(null),$=t.useRef(null),V=t.useRef(null),H=t.useRef(null),U=t.useRef(!1),q=t.useRef(null),Y=t.useRef(0),X=t.useRef(!1),G=t.useRef(!O),K=t.useRef(0),Z=t.useRef(null),J=t.useRef((null==(N=Z.current)?void 0:N.getBoundingClientRect().height)||0),Q=t.useRef((null==(M=Z.current)?void 0:M.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback(e=>{a&&e===ae.length-1&&(F.current=new Date)},[]),{activeSnapPoint:re,activeSnapPointIndex:ne,setActiveSnapPoint:oe,onRelease:ie,snapPointsOffset:ae,onDrag:le,shouldFade:se,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:r,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:l,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[p,f]=tL({prop:e,defaultProp:null==n?void 0:n[0],onChange:r}),[d,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=t.useMemo(()=>p===(null==n?void 0:n[n.length-1])||null,[n,p]),y=t.useMemo(()=>{var e;return null!=(e=null==n?void 0:n.findIndex(e=>e===p))?e:null},[n,p]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===p||!n,g=t.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map(t=>{const r="string"==typeof t;let n=0;if(r&&(n=parseInt(t,10)),Xz(s)){const o=r?n:d?t*e.height:0;return d?"bottom"===s?e.height-o:-e.height+o:o}const o=r?n:d?t*e.width:0;return d?"right"===s?e.width-o:-e.width+o:o}))?t:[]},[n,d,c]),b=t.useMemo(()=>null!==y?null==g?void 0:g[y]:null,[g,y]),w=t.useCallback(e=>{var t;const r=null!=(t=null==g?void 0:g.findIndex(t=>t===e))?t:null;l(r),Yz(o.current,{transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,transform:Xz(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&r!==g.length-1&&void 0!==a&&r!==a&&r<a?Yz(i.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,opacity:"0"}):Yz(i.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(r,0)])},[o.current,n,g,a,i,f]);return t.useEffect(()=>{if(p||e){var t;const r=null!=(t=null==n?void 0:n.findIndex(t=>t===e||t===p))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&w(g[r])}},[p,e,n,g,w]),{isLastSnapPoint:h,activeSnapPoint:p,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof y||!g||void 0===a)return null;const r=y===a-1;if(y>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?y+1:y-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:f,activeSnapPointIndex:y,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===a)return;const l="bottom"===s||"right"===s?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===y,p=e>0;if(y===a-1&&Yz(i.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`}),!u&&r>2&&!p)return void(o?t():w(g[0]));if(!u&&r>2&&p&&g&&n)return void w(g[n.length-1]);const f=null==g?void 0:g.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-l)<Math.abs(e-l)?t:e),d=Xz(s)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*d){const e=p?1:-1;if(e>0&&h&&n)return void w(g[n.length-1]);if(c&&e<0&&o&&t(),null===y)return;return void w(g[y+e])}w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===s||"right"===s?b-e:b+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||Yz(o.current,{transform:Xz(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:Z,fadeFromIndex:d,overlayRef:W,onSnapPointChange:te,direction:x,container:C,snapToSequentialPoint:k});Fz({isDisabled:!A||_||!v||R||!L||!S||!E});const{restorePositionSetting:ue}=function({isOpen:e,modal:r,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:a}){const[l,s]=t.useState(()=>"undefined"!=typeof window?window.location.href:""),c=t.useRef(0),u=t.useCallback(()=>{if(Tz()&&null===rL&&e&&!a){rL={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}),300)}},[e]),p=t.useCallback(()=>{if(Tz()&&null!==rL&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,rL),window.requestAnimationFrame(()=>{i&&l!==window.location.href?s(window.location.href):window.scrollTo(t,e)}),rL=null}},[l]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(r)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||p())}},[r,p]),t.useEffect(()=>{!n&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),r||window.setTimeout(()=>{p()},500)):p())},[e,o,l,r,n,u,p]),{restorePositionSetting:p}}({isOpen:A,modal:v,nested:null!=b&&b,hasBeenOpened:L,preventScrollRestoration:j,noBodyStyles:w});function pe(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var r;let n=e;const o=null==(r=window.getSelection())?void 0:r.toString(),i=Z.current?Gz(Z.current,x):null,a=new Date;if("SELECT"===n.tagName)return!1;if(n.hasAttribute("data-vaul-no-drag")||n.closest("[data-vaul-no-drag]"))return!1;if("right"===x||"left"===x)return!0;if(F.current&&a.getTime()-F.current.getTime()<500)return!1;if(null!==i&&("bottom"===x?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(H.current&&a.getTime()-H.current.getTime()<u&&0===i)return H.current=a,!1;if(t)return H.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(0!==n.scrollTop)return H.current=new Date,!1;if("dialog"===n.getAttribute("role"))return!0}n=n.parentNode}return!0}function de(e){!function(){if(!_||!Z.current)return;Z.current.classList.remove(Qz),U.current=!1,I(!1),V.current=new Date}(),null==g||g(),e||z(!1),setTimeout(()=>{a&&oe(a[0])},1e3*Zz.DURATION)}function me(){if(!Z.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Gz(Z.current,x);Yz(Z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`}),Yz(W.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,opacity:"1"}),l&&t&&t>0&&A&&Yz(e,{borderRadius:"8px",overflow:"hidden",...Xz(x)?{transform:`scale(${pe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${pe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Zz.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Zz.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{G.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!Z.current||!S)return;if(Hz(document.activeElement)||X.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,r=window.innerHeight;let n=r-t;const o=Z.current.getBoundingClientRect().height||0,i=o>.8*r;ee.current||(ee.current=o);const l=Z.current.getBoundingClientRect().top;if(Math.abs(K.current-n)>60&&(X.current=!X.current),a&&a.length>0&&ae&&ne){n+=ae[ne]||0}if(K.current=n,o>t||X.current){const e=Z.current.getBoundingClientRect().height;let r=e;e>t&&(r=t-(i?l:26)),Z.current.style.height=y?e-Math.max(n,0)+"px":`${Math.max(r,t-l)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(Z.current.style.height=`${ee.current}px`);a&&a.length>0&&!X.current?Z.current.style.bottom="0px":Z.current.style.bottom=`${Math.max(n,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[ne,a,ae]),t.useEffect(()=>(A&&(Yz(document.documentElement,{scrollBehavior:"auto"}),F.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let r=qz.get(e);r&&(e.style[t]=r[t])}(document.documentElement,"scrollBehavior")}),[A]),t.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),t.createElement(pN,{defaultOpen:O,onOpenChange:e=>{(p||e)&&(e?D(!0):de(!0),z(e))},open:A},t.createElement(Pz.Provider,{value:{activeSnapPoint:re,snapPoints:a,setActiveSnapPoint:oe,drawerRef:Z,overlayRef:W,onOpenChange:r,onPress:function(e){var t,r;(p||a)&&(Z.current&&!Z.current.contains(e.target)||(J.current=(null==(t=Z.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(r=Z.current)?void 0:r.getBoundingClientRect().width)||0,I(!0),$.current=new Date,Mz()&&window.addEventListener("touchend",()=>U.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),Y.current=Xz(x)?e.pageY:e.pageX))},onRelease:function(e){if(!_||!Z.current)return;Z.current.classList.remove(Qz),U.current=!1,I(!1),V.current=new Date;const t=Gz(Z.current,x);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===$.current)return;const r=V.current.getTime()-$.current.getTime(),n=Y.current-(Xz(x)?e.pageY:e.pageX),o=Math.abs(n)/r;if(o>.05&&(B(!0),setTimeout(()=>{B(!1)},200)),a){return ie({draggedDistance:n*("bottom"===x||"right"===x?1:-1),closeDrawer:de,velocity:o,dismissible:p}),void(null==i||i(e,!0))}if("bottom"===x||"right"===x?n>0:n<0)return me(),void(null==i||i(e,!0));if(o>.4)return de(),void(null==i||i(e,!1));var l;const s=Math.min(null!=(l=Z.current.getBoundingClientRect().height)?l:0,window.innerHeight);var u;const f=Math.min(null!=(u=Z.current.getBoundingClientRect().width)?u:0,window.innerWidth),d="left"===x||"right"===x;if(Math.abs(t)>=(d?f:s)*c)return de(),void(null==i||i(e,!1));null==i||i(e,!0),me()},onDrag:function(e){var t;if(Z.current&&_){const r="bottom"===x||"right"===x?1:-1,n=(Y.current-(Xz(x)?e.pageY:e.pageX))*r,i=n>0,s=a&&!p&&!i;if(s&&0===ne)return;const c=Math.abs(n),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===x||"top"===x?J.current:Q.current);const m=ce(c,i);if(null!==m&&(f=m),s&&f>=1)return;if(!U.current&&!fe(e.target,i))return;if(Z.current.classList.add(Qz),U.current=!0,Yz(Z.current,{transition:"none"}),Yz(W.current,{transition:"none"}),a&&le({draggedDistance:n}),i&&!a){const e=(t=n,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*r;return void Yz(Z.current,{transform:Xz(x)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const h=1-f;if((se||d&&ne===d-1)&&(null==o||o(e,f),Yz(W.current,{opacity:`${h}`,transition:"none"},!0)),u&&W.current&&l){const e=Math.min(pe()+f*(1-pe()),1),t=8-8*f,r=Math.max(0,14-14*f);Yz(u,{borderRadius:`${t}px`,transform:Xz(x)?`scale(${e}) translate3d(0, ${r}px, 0)`:`scale(${e}) translate3d(${r}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=c*r;Yz(Z.current,{transform:Xz(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:p,shouldAnimate:G,handleOnly:f,isOpen:A,isDragging:_,shouldFade:se,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const r=(window.innerWidth-Jz)/window.innerWidth,n=r+t*(1-r),o=t*Jz-16;Yz(Z.current,{transform:Xz(x)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-Jz)/window.innerWidth:1,r=e?-16:0;q.current&&window.clearTimeout(q.current),Yz(Z.current,{transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,transform:Xz(x)?`scale(${t}) translate3d(0, ${r}px, 0)`:`scale(${t}) translate3d(${r}px, 0, 0)`}),!e&&Z.current&&(q.current=setTimeout(()=>{const e=Gz(Z.current,x);Yz(Z.current,{transition:"none",transform:Xz(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const r=Xz(x)?window.innerHeight:window.innerWidth,n=t?(r-Jz)/r:1,o=t?-16:0;t&&Yz(Z.current,{transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,transform:Xz(x)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:X,modal:v,snapPointsOffset:ae,activeSnapPointIndex:ne,direction:x,shouldScaleBackground:l,setBackgroundColorOnScale:s,noBodyStyles:w,container:C,autoFocus:T}},n))},Content:oL,Overlay:nL,Portal:function(e){const r=Cz(),{container:n=r.container,...o}=e;return t.createElement(dN,{container:n,...o})},Title:yN,Description:vN},lL=({shouldScaleBackground:t=!0,...r})=>e.createElement(aL.Root,{shouldScaleBackground:t,...r});lL.displayName="Drawer";const sL=aL.Portal,cL=e.forwardRef(({className:t,...r},n)=>e.createElement(aL.Overlay,{ref:n,className:Ye("fixed inset-0 z-50 bg-black/80",t),...r}));cL.displayName=aL.Overlay.displayName;const uL=e.forwardRef(({className:t,children:r,...n},o)=>e.createElement(sL,null,e.createElement(cL,null),e.createElement(aL.Content,{ref:o,className:Ye("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n},e.createElement("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),r)));uL.displayName="DrawerContent";const pL=({className:t,...r})=>e.createElement("div",{className:Ye("grid gap-1.5 p-4 text-center sm:text-left",t),...r});pL.displayName="DrawerHeader";const fL=e.forwardRef(({className:t,...r},n)=>e.createElement(aL.Title,{ref:n,className:Ye("text-lg font-semibold leading-none tracking-tight",t),...r}));fL.displayName=aL.Title.displayName;const dL=e.forwardRef(({className:t,...r},n)=>e.createElement(aL.Description,{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));dL.displayName=aL.Description.displayName;const mL={small:"h-64",medium:"h-80",large:"h-96",extraLarge:"h-[448px]",full:"h-screen"},hL=({children:e,isOpen:r,onClose:n,size:o="medium",title:i,description:a,showCloseButton:l=!0})=>{const s=mL[o];return t.createElement(lL,{open:r,onOpenChange:n},t.createElement(uL,{className:`fixed inset-x-0 bottom-0 ${s} bg-background`},t.createElement(pL,{className:"relative"},i?t.createElement(fL,null,i):t.createElement(fL,{className:"sr-only"},"Drawer Content"),a?t.createElement(dL,null,a):t.createElement(dL,{className:"sr-only"},i||"Drawer Content"," panel"),l&&t.createElement("button",{onClick:n,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100","aria-label":"Close drawer"},t.createElement(ht,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close"))),t.createElement("div",{className:"mt-6 px-4"},e)))},yL=m({});function vL(e){const t=c(null);return null===t.current&&(t.current=e()),t.current}const gL="undefined"!=typeof window,bL=gL?f:a,wL=m(null);function xL(e,t){-1===e.indexOf(t)&&e.push(t)}function OL(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const EL=(e,t,r)=>r>t?t:r<e?e:r;function kL(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let jL=()=>{},SL=()=>{};"production"!==process.env.NODE_ENV&&(jL=(e,t,r)=>{e||"undefined"==typeof console||console.warn(kL(t,r))},SL=(e,t,r)=>{if(!e)throw new Error(kL(t,r))});const PL={},CL=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function TL(e){return"object"==typeof e&&null!==e}const NL=e=>/^0[^.\s]+$/u.test(e);function ML(e){let t;return()=>(void 0===t&&(t=e()),t)}const AL=e=>e,zL=(e,t)=>r=>t(e(r)),LL=(...e)=>e.reduce(zL),DL=(e,t,r)=>{const n=t-e;return 0===n?1:(r-e)/n};class _L{constructor(){this.subscriptions=[]}add(e){return xL(this.subscriptions,e),()=>OL(this.subscriptions,e)}notify(e,t,r){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let o=0;o<n;o++){const n=this.subscriptions[o];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const IL=e=>1e3*e,RL=e=>e/1e3;function BL(e,t){return t?e*(1e3/t):0}const WL=new Set;function FL(e,t,r){e||WL.has(t)||(console.warn(kL(t,r)),WL.add(t))}const $L=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function VL(e,t,r,n){if(e===t&&r===n)return AL;const o=t=>function(e,t,r,n,o){let i,a,l=0;do{a=t+(r-t)/2,i=$L(a,n,o)-e,i>0?r=a:t=a}while(Math.abs(i)>1e-7&&++l<12);return a}(t,0,1,e,r);return e=>0===e||1===e?e:$L(o(e),t,n)}const HL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,UL=e=>t=>1-e(1-t),qL=VL(.33,1.53,.69,.99),YL=UL(qL),XL=HL(YL),GL=e=>(e*=2)<1?.5*YL(e):.5*(2-Math.pow(2,-10*(e-1))),KL=e=>1-Math.sin(Math.acos(e)),ZL=UL(KL),JL=HL(KL),QL=VL(.42,0,1,1),eD=VL(0,0,.58,1),tD=VL(.42,0,.58,1),rD=e=>Array.isArray(e)&&"number"==typeof e[0],nD={linear:AL,easeIn:QL,easeInOut:tD,easeOut:eD,circIn:KL,circInOut:JL,circOut:ZL,backIn:YL,backInOut:XL,backOut:qL,anticipate:GL},oD=e=>{if(rD(e)){SL(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,o]=e;return VL(t,r,n,o)}return"string"==typeof e?(SL(void 0!==nD[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nD[e]):e},iD=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function aD(e,t){let r=!1,n=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=iD.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,n=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(t){i.has(t)&&(s.schedule(t),e()),t(a)}const s={schedule:(e,o=!1,a=!1)=>{const l=a&&n?t:r;return o&&i.add(e),l.has(e)||l.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{a=e,n?o=!0:(n=!0,[t,r]=[r,t],t.forEach(l),t.clear(),n=!1,o&&(o=!1,s.process(e)))}};return s}(i),e),{}),{setup:l,read:s,resolveKeyframes:c,preUpdate:u,update:p,preRender:f,render:d,postRender:m}=a,h=()=>{const i=PL.useManualTiming?o.timestamp:performance.now();r=!1,PL.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,l.process(o),s.process(o),c.process(o),u.process(o),p.process(o),f.process(o),d.process(o),m.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(h))};return{schedule:iD.reduce((t,i)=>{const l=a[i];return t[i]=(t,i=!1,a=!1)=>(r||(r=!0,n=!0,o.isProcessing||e(h)),l.schedule(t,i,a)),t},{}),cancel:e=>{for(let t=0;t<iD.length;t++)a[iD[t]].cancel(e)},state:o,steps:a}}const{schedule:lD,cancel:sD,state:cD,steps:uD}=aD("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:AL,!0);let pD;function fD(){pD=void 0}const dD={now:()=>(void 0===pD&&dD.set(cD.isProcessing||PL.useManualTiming?cD.timestamp:performance.now()),pD),set:e=>{pD=e,queueMicrotask(fD)}},mD=e=>t=>"string"==typeof t&&t.startsWith(e),hD=mD("--"),yD=mD("var(--"),vD=e=>!!yD(e)&&gD.test(e.split("/*")[0].trim()),gD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bD={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},wD={...bD,transform:e=>EL(0,1,e)},xD={...bD,default:1},OD=e=>Math.round(1e5*e)/1e5,ED=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const kD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jD=(e,t)=>r=>Boolean("string"==typeof r&&kD.test(r)&&r.startsWith(e)||t&&!function(e){return null==e}(r)&&Object.prototype.hasOwnProperty.call(r,t)),SD=(e,t,r)=>n=>{if("string"!=typeof n)return n;const[o,i,a,l]=n.match(ED);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}},PD={...bD,transform:e=>Math.round((e=>EL(0,255,e))(e))},CD={test:jD("rgb","red"),parse:SD("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+PD.transform(e)+", "+PD.transform(t)+", "+PD.transform(r)+", "+OD(wD.transform(n))+")"};const TD={test:jD("#"),parse:function(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:CD.transform},ND=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),MD=ND("deg"),AD=ND("%"),zD=ND("px"),LD=ND("vh"),DD=ND("vw"),_D=(()=>({...AD,parse:e=>AD.parse(e)/100,transform:e=>AD.transform(100*e)}))(),ID={test:jD("hsl","hue"),parse:SD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+AD.transform(OD(t))+", "+AD.transform(OD(r))+", "+OD(wD.transform(n))+")"},RD={test:e=>CD.test(e)||TD.test(e)||ID.test(e),parse:e=>CD.test(e)?CD.parse(e):ID.test(e)?ID.parse(e):TD.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?CD.transform(e):ID.transform(e),getAnimatableNone:e=>{const t=RD.parse(e);return t.alpha=0,RD.transform(t)}},BD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const WD="number",FD="color",$D=/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 VD(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace($D,e=>(RD.test(e)?(n.color.push(i),o.push(FD),r.push(RD.parse(e))):e.startsWith("var(")?(n.var.push(i),o.push("var"),r.push(e)):(n.number.push(i),o.push(WD),r.push(parseFloat(e))),++i,"${}")).split("${}");return{values:r,split:a,indexes:n,types:o}}function HD(e){return VD(e).values}function UD(e){const{split:t,types:r}=VD(e),n=t.length;return e=>{let o="";for(let i=0;i<n;i++)if(o+=t[i],void 0!==e[i]){const t=r[i];o+=t===WD?OD(e[i]):t===FD?RD.transform(e[i]):e[i]}return o}}const qD=e=>"number"==typeof e?0:RD.test(e)?RD.getAnimatableNone(e):e;const YD={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ED)?.length||0)+(e.match(BD)?.length||0)>0},parse:HD,createTransformer:UD,getAnimatableNone:function(e){const t=HD(e);return UD(e)(t.map(qD))}};function XD(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function GD(e,t){return r=>r>0?t:e}const KD=(e,t,r)=>e+(t-e)*r,ZD=(e,t,r)=>{const n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},JD=[TD,CD,ID];function QD(e){const t=(r=e,JD.find(e=>e.test(r)));var r;if(jL(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let n=t.parse(e);return t===ID&&(n=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let o=0,i=0,a=0;if(t/=100){const n=r<.5?r*(1+t):r+t-r*t,l=2*r-n;o=XD(l,n,e+1/3),i=XD(l,n,e),a=XD(l,n,e-1/3)}else o=i=a=r;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:n}}(n)),n}const e_=(e,t)=>{const r=QD(e),n=QD(t);if(!r||!n)return GD(e,t);const o={...r};return e=>(o.red=ZD(r.red,n.red,e),o.green=ZD(r.green,n.green,e),o.blue=ZD(r.blue,n.blue,e),o.alpha=KD(r.alpha,n.alpha,e),CD.transform(o))},t_=new Set(["none","hidden"]);function r_(e,t){return r=>KD(e,t,r)}function n_(e){return"number"==typeof e?r_:"string"==typeof e?vD(e)?GD:RD.test(e)?e_:a_:Array.isArray(e)?o_:"object"==typeof e?RD.test(e)?e_:i_:GD}function o_(e,t){const r=[...e],n=r.length,o=e.map((e,r)=>n_(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=o[t](e);return r}}function i_(e,t){const r={...e,...t},n={};for(const o in r)void 0!==e[o]&&void 0!==t[o]&&(n[o]=n_(e[o])(e[o],t[o]));return e=>{for(const t in n)r[t]=n[t](e);return r}}const a_=(e,t)=>{const r=YD.createTransformer(t),n=VD(e),o=VD(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?t_.has(e)&&!o.values.length||t_.has(t)&&!n.values.length?function(e,t){return t_.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}(e,t):LL(o_(function(e,t){const r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][n[i]],l=e.values[a]??0;r[o]=l,n[i]++}return r}(n,o),o.values),r):(jL(!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.`,"complex-values-different"),GD(e,t))};function l_(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return KD(e,t,r);return n_(e)(e,t)}const s_=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>lD.update(t,e),stop:()=>sD(t),now:()=>cD.isProcessing?cD.timestamp:dD.now()}},c_=(e,t,r=10)=>{let n="";const o=Math.max(Math.round(t/r),2);for(let t=0;t<o;t++)n+=Math.round(1e4*e(t/(o-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},u_=2e4;function p_(e){let t=0;let r=e.next(t);for(;!r.done&&t<u_;)t+=50,r=e.next(t);return t>=u_?1/0:t}function f_(e,t,r){const n=Math.max(t-5,0);return BL(r-e(n),t-n)}const d_=100,m_=10,h_=1,y_=0,v_=800,g_=.3,b_=.3,w_={granular:.01,default:2},x_={granular:.005,default:.5},O_=.01,E_=10,k_=.05,j_=1,S_=.001;function P_({duration:e=v_,bounce:t=g_,velocity:r=y_,mass:n=h_}){let o,i;jL(e<=IL(E_),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=EL(k_,j_,a),e=EL(O_,E_,RL(e)),a<1?(o=t=>{const n=t*a,o=n*e,i=n-r,l=T_(t,a),s=Math.exp(-o);return S_-i/l*s},i=t=>{const n=t*a*e,i=n*r+r,l=Math.pow(a,2)*Math.pow(t,2)*e,s=Math.exp(-n),c=T_(Math.pow(t,2),a);return(-o(t)+S_>0?-1:1)*((i-l)*s)/c}):(o=t=>Math.exp(-t*e)*((t-r)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(r-t)));const l=function(e,t,r){let n=r;for(let r=1;r<C_;r++)n-=e(n)/t(n);return n}(o,i,5/e);if(e=IL(e),isNaN(l))return{stiffness:d_,damping:m_,duration:e};{const t=Math.pow(l,2)*n;return{stiffness:t,damping:2*a*Math.sqrt(n*t),duration:e}}}const C_=12;function T_(e,t){return e*Math.sqrt(1-t*t)}const N_=["duration","bounce"],M_=["stiffness","damping","mass"];function A_(e,t){return t.some(t=>void 0!==e[t])}function z_(e=b_,t=g_){const r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:o}=r;const i=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],l={done:!1,value:i},{stiffness:s,damping:c,mass:u,duration:p,velocity:f,isResolvedFromDuration:d}=function(e){let t={velocity:y_,stiffness:d_,damping:m_,mass:h_,isResolvedFromDuration:!1,...e};if(!A_(e,M_)&&A_(e,N_))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(1.2*r),o=n*n,i=2*EL(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:h_,stiffness:o,damping:i}}else{const r=P_(e);t={...t,...r,mass:h_},t.isResolvedFromDuration=!0}return t}({...r,velocity:-RL(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(s*u)),y=a-i,v=RL(Math.sqrt(s/u)),g=Math.abs(y)<5;let b;if(n||(n=g?w_.granular:w_.default),o||(o=g?x_.granular:x_.default),h<1){const e=T_(v,h);b=t=>{const r=Math.exp(-h*v*t);return a-r*((m+h*v*y)/e*Math.sin(e*t)+y*Math.cos(e*t))}}else if(1===h)b=e=>a-Math.exp(-v*e)*(y+(m+v*y)*e);else{const e=v*Math.sqrt(h*h-1);b=t=>{const r=Math.exp(-h*v*t),n=Math.min(e*t,300);return a-r*((m+h*v*y)*Math.sinh(n)+e*y*Math.cosh(n))/e}}const w={calculatedDuration:d&&p||null,next:e=>{const t=b(e);if(d)l.done=e>=p;else{let r=0===e?m:0;h<1&&(r=0===e?IL(m):f_(b,e,t));const i=Math.abs(r)<=n,s=Math.abs(a-t)<=o;l.done=i&&s}return l.value=l.done?a:t,l},toString:()=>{const e=Math.min(p_(w),u_),t=c_(t=>w.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return w}function L_({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:s,restDelta:c=.5,restSpeed:u}){const p=e[0],f={done:!1,value:p},d=e=>void 0===l?s:void 0===s||Math.abs(l-e)<Math.abs(s-e)?l:s;let m=r*t;const h=p+m,y=void 0===a?h:a(h);y!==h&&(m=y-p);const v=e=>-m*Math.exp(-e/n),g=e=>y+v(e),b=e=>{const t=v(e),r=g(e);f.done=Math.abs(t)<=c,f.value=f.done?y:r};let w,x;const O=e=>{var t;(t=f.value,void 0!==l&&t<l||void 0!==s&&t>s)&&(w=e,x=z_({keyframes:[f.value,d(f.value)],velocity:f_(g,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return O(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),O(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),f)}}}function D_(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;if(SL(i===t.length,"Both input and output ranges must be the same length","range-length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=function(e,t,r){const n=[],o=r||PL.mix||l_,i=e.length-1;for(let r=0;r<i;r++){let i=o(e[r],e[r+1]);if(t){const e=Array.isArray(t)?t[r]||AL:t;i=LL(e,i)}n.push(i)}return n}(t,n,o),s=l.length,c=r=>{if(a&&r<e[0])return t[0];let n=0;if(s>1)for(;n<e.length-2&&!(r<e[n+1]);n++);const o=DL(e[n],e[n+1],r);return l[n](o)};return r?t=>c(EL(e[0],e[i-1],t)):c}function __(e){const t=[0];return function(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=DL(0,t,n);e.push(KD(r,1,o))}}(t,e.length-1),t}function I_({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(n)?n.map(oD):oD(n),i={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(r&&r.length===t.length?r:__(t),e),l=D_(a,t,{ease:Array.isArray(o)?o:(s=t,c=o,s.map(()=>c||tD).splice(0,s.length-1))});var s,c;return{calculatedDuration:e,next:t=>(i.value=l(t),i.done=t>=e,i)}}z_.applyToOptions=e=>{const t=function(e,t=100,r){const n=r({...e,keyframes:[0,t]}),o=Math.min(p_(n),u_);return{type:"keyframes",ease:e=>n.next(o*e).value/t,duration:RL(o)}}(e,100,z_);return e.ease=t.ease,e.duration=IL(t.duration),e.type="keyframes",e};const R_=e=>null!==e;function B_(e,{repeat:t,repeatType:r="loop"},n,o=1){const i=e.filter(R_),a=o<0||t&&"loop"!==r&&t%2==1?0:i.length-1;return a&&void 0!==n?n:i[a]}const W_={decay:L_,inertia:L_,tween:I_,keyframes:I_,spring:z_};function F_(e){"string"==typeof e.type&&(e.type=W_[e.type])}class $_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const V_=e=>e/100;class H_ extends $_{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==dD.now()&&this.tick(dD.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;F_(e);const{type:t=I_,repeat:r=0,repeatDelay:n=0,repeatType:o,velocity:i=0}=e;let{keyframes:a}=e;const l=t||I_;"production"!==process.env.NODE_ENV&&l!==I_&&SL(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==I_&&"number"!=typeof a[0]&&(this.mixKeyframes=LL(V_,l_(a[0],a[1])),a=[0,100]);const s=l({...e,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-i})),null===s.calculatedDuration&&(s.calculatedDuration=p_(s));const{calculatedDuration:c}=s;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=s}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:n,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return r.next(0);const{delay:s=0,keyframes:c,repeat:u,repeatType:p,repeatDelay:f,type:d,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const y=this.currentTime-s*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let g=this.currentTime,b=r;if(u){const e=Math.min(this.currentTime,n)/a;let t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===p?(r=1-r,f&&(r-=f/a)):"mirror"===p&&(b=i)),g=EL(0,1,r)*a}const w=v?{done:!1,value:c[0]}:b.next(g);o&&(w.value=o(w.value));let{done:x}=w;v||null===l||(x=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const O=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return O&&d!==L_&&(w.value=B_(c,this.options,h,this.speed)),m&&m(w.value),O&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return RL(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+RL(e)}get time(){return RL(this.currentTime)}set time(e){e=IL(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(dD.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=RL(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=s_,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dD.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const U_=e=>180*e/Math.PI,q_=e=>{const t=U_(Math.atan2(e[1],e[0]));return X_(t)},Y_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:q_,rotateZ:q_,skewX:e=>U_(Math.atan(e[1])),skewY:e=>U_(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},X_=e=>((e%=360)<0&&(e+=360),e),G_=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),K_=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:G_,scaleY:K_,scale:e=>(G_(e)+K_(e))/2,rotateX:e=>X_(U_(Math.atan2(e[6],e[5]))),rotateY:e=>X_(U_(Math.atan2(-e[2],e[0]))),rotateZ:q_,rotate:q_,skewX:e=>U_(Math.atan(e[4])),skewY:e=>U_(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function J_(e){return e.includes("scale")?1:0}function Q_(e,t){if(!e||"none"===e)return J_(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,o;if(r)n=Z_,o=r;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Y_,o=t}if(!o)return J_(t);const i=n[t],a=o[1].split(",").map(eI);return"function"==typeof i?i(a):a[i]}function eI(e){return parseFloat(e.trim())}const tI=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rI=(()=>new Set(tI))(),nI=e=>e===bD||e===zD,oI=new Set(["x","y","z"]),iI=tI.filter(e=>!oI.has(e));const aI={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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:(e,{transform:t})=>Q_(t,"x"),y:(e,{transform:t})=>Q_(t,"y")};aI.translateX=aI.x,aI.translateY=aI.y;const lI=new Set;let sI=!1,cI=!1,uI=!1;function pI(){if(cI){const e=Array.from(lI).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{const t=function(e){const t=[];return iI.forEach(r=>{const n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=r.get(e);t&&t.forEach(([t,r])=>{e.getValue(t)?.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}cI=!1,sI=!1,lI.forEach(e=>e.complete(uI)),lI.clear()}function fI(){lI.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cI=!0)})}class dI{constructor(e,t,r,n,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(lI.add(this),sI||(sI=!0,lD.read(fI),lD.resolveKeyframes(pI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(null===e[0]){const o=n?.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(r&&t){const n=r.readValue(t,i);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=i),n&&void 0===o&&n.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),lI.delete(this)}cancel(){"scheduled"===this.state&&(lI.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const mI=ML(()=>void 0!==window.ScrollTimeline),hI={};function yI(e,t){const r=ML(e);return()=>hI[t]??r()}const vI=yI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),gI=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,bI={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gI([0,.65,.55,1]),circOut:gI([.55,0,1,.45]),backIn:gI([.31,.01,.66,-.59]),backOut:gI([.33,1.53,.69,.99])};function wI(e,t){return e?"function"==typeof e?vI()?c_(e,t):"ease-out":rD(e)?gI(e):Array.isArray(e)?e.map(e=>wI(e,t)||bI.easeOut):bI[e]:void 0}function xI(e,t,r,{delay:n=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeOut",times:s}={},c=void 0){const u={[t]:r};s&&(u.offset=s);const p=wI(l,o);Array.isArray(p)&&(u.easing=p);const f={delay:n,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function OI(e){return"function"==typeof e&&"applyToOptions"in e}class EI extends $_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=i,this.options=e,SL("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const s=function({type:e,...t}){return OI(e)&&vI()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=xI(t,r,n,s,o),!1===s.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=B_(n,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,r){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,r):e.style[t]=r}(t,r,e),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return RL(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+RL(e)}get time(){return RL(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=IL(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&mI()?(this.animation.timeline=e,AL):t(this)}}const kI={anticipate:GL,backInOut:XL,circInOut:JL};function jI(e){"string"==typeof e.ease&&e.ease in kI&&(e.ease=kI[e.ease])}class SI extends EI{constructor(e){jI(e),F_(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:n,element:o,...i}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const a=new H_({...i,autoplay:!1}),l=IL(this.finishedTime??this.time);t.setWithVelocity(a.sample(l-10).value,a.sample(l).value,10),a.stop()}}const PI=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!YD.test(e)&&"0"!==e||e.startsWith("url(")));function CI(e){e.duration=0,e.type="keyframes"}const TI=new Set(["opacity","clipPath","filter","transform"]),NI=ML(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class MI extends $_{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,motionValue:s,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dD.now();const p={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:o,repeatType:i,name:l,motionValue:s,element:c,...u},f=c?.KeyframeResolver||dI;this.keyframeResolver=new f(a,(e,t,r)=>this.onKeyframesResolved(e,t,p,!r),l,s,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:s,onUpdate:c}=r;this.resolvedAt=dD.now(),function(e,t,r,n){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=PI(o,t),l=PI(i,t);return jL(a===l,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||OI(r))&&n)}(e,o,i,a)||(!PL.instantAnimations&&l||c?.(B_(e,r,t)),e[0]=e[e.length-1],CI(r),r.repeat=0);const u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},p=!s&&function(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:i,type:a}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:c}=t.owner.getProps();return NI()&&r&&TI.has(r)&&("transform"!==r||!c)&&!s&&!n&&"mirror"!==o&&0!==i&&"inertia"!==a}(u)?new SI({...u,element:u.motionValue.owner.current}):new H_(u);p.finished.then(()=>this.notifyFinished()).catch(AL),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),uI=!0,fI(),pI(),uI=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const AI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zI(e,t,r=1){SL(r<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,o]=function(e){const t=AI.exec(e);if(!t)return[,];const[,r,n,o]=t;return[`--${r??n}`,o]}(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const e=i.trim();return CL(e)?parseFloat(e):e}return vD(o)?zI(o,t,r+1):o}function LI(e,t){return e?.[t]??e?.default??e}const DI=new Set(["width","height","top","left","right","bottom",...tI]),_I=e=>t=>t.test(e),II=[bD,zD,AD,MD,DD,LD,{test:e=>"auto"===e,parse:e=>e}],RI=e=>II.find(_I(e));function BI(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||NL(e))}const WI=new Set(["brightness","contrast","saturate","opacity"]);function FI(e){const[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[n]=r.match(ED)||[];if(!n)return e;const o=r.replace(n,"");let i=WI.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const $I=/\b([a-z-]*)\(.*?\)/gu,VI={...YD,getAnimatableNone:e=>{const t=e.match($I);return t?t.map(FI).join(" "):e}},HI={...bD,transform:Math.round},UI={borderWidth:zD,borderTopWidth:zD,borderRightWidth:zD,borderBottomWidth:zD,borderLeftWidth:zD,borderRadius:zD,radius:zD,borderTopLeftRadius:zD,borderTopRightRadius:zD,borderBottomRightRadius:zD,borderBottomLeftRadius:zD,width:zD,maxWidth:zD,height:zD,maxHeight:zD,top:zD,right:zD,bottom:zD,left:zD,padding:zD,paddingTop:zD,paddingRight:zD,paddingBottom:zD,paddingLeft:zD,margin:zD,marginTop:zD,marginRight:zD,marginBottom:zD,marginLeft:zD,backgroundPositionX:zD,backgroundPositionY:zD,...{rotate:MD,rotateX:MD,rotateY:MD,rotateZ:MD,scale:xD,scaleX:xD,scaleY:xD,scaleZ:xD,skew:MD,skewX:MD,skewY:MD,distance:zD,translateX:zD,translateY:zD,translateZ:zD,x:zD,y:zD,z:zD,perspective:zD,transformPerspective:zD,opacity:wD,originX:_D,originY:_D,originZ:zD},zIndex:HI,fillOpacity:wD,strokeOpacity:wD,numOctaves:HI},qI={...UI,color:RD,backgroundColor:RD,outlineColor:RD,fill:RD,stroke:RD,borderColor:RD,borderTopColor:RD,borderRightColor:RD,borderBottomColor:RD,borderLeftColor:RD,filter:VI,WebkitFilter:VI},YI=e=>qI[e];function XI(e,t){let r=YI(e);return r!==VI&&(r=YD),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const GI=new Set(["auto","none","0"]);class KI extends dI{constructor(e,t,r,n,o){super(e,t,r,n,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&(n=n.trim(),vD(n))){const o=zI(n,t.current);void 0!==o&&(e[r]=o),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!DI.has(r)||2!==e.length)return;const[n,o]=e,i=RI(n),a=RI(o);if(i!==a)if(nI(i)&&nI(a))for(let t=0;t<e.length;t++){const r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else aI[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(null===e[t]||BI(e[t]))&&r.push(t);r.length&&function(e,t,r){let n,o=0;for(;o<e.length&&!n;){const t=e[o];"string"==typeof t&&!GI.has(t)&&VD(t).values.length&&(n=e[o]),o++}if(n&&r)for(const o of t)e[o]=XI(r,n)}(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=aI[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=aI[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,r])=>{e.getValue(t).set(r)}),this.resolveNoneKeyframes()}}const ZI=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function JI(e){return TL(e)&&"offsetHeight"in e}class QI{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=dD.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=dD.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"production"!==process.env.NODE_ENV&&FL(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new _L);const r=this.events[e].add(t);return"change"===e?()=>{r(),lD.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=dD.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return BL(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function eR(e,t){return new QI(e,t)}const{schedule:tR}=aD(queueMicrotask,!1),rR={x:!1,y:!1};function nR(){return rR.x||rR.y}function oR(e,t){const r=function(e,t,r){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=r?.[e]??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function iR(e){return!("touch"===e.pointerType||nR())}const aR=(e,t)=>!!t&&(e===t||aR(e,t.parentElement)),lR=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,sR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const cR=new WeakSet;function uR(e){return t=>{"Enter"===t.key&&e(t)}}function pR(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function fR(e){return lR(e)&&!nR()}function dR(e,t,r={}){const[n,o,i]=oR(e,r),a=e=>{const n=e.currentTarget;if(!fR(e))return;cR.add(n);const i=t(n,e),a=(e,t)=>{window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",s),cR.has(n)&&cR.delete(n),fR(e)&&"function"==typeof i&&i(e,{success:t})},l=e=>{a(e,n===window||n===document||r.useGlobalTarget||aR(n,e.target))},s=e=>{a(e,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",s,o)};return n.forEach(e=>{var t;(r.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),JI(e)&&(e.addEventListener("focus",e=>((e,t)=>{const r=e.currentTarget;if(!r)return;const n=uR(()=>{if(cR.has(r))return;pR(r,"down");const e=uR(()=>{pR(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>pR(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,o)),t=e,sR.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),i}function mR(e){return TL(e)&&"ownerSVGElement"in e}const hR=e=>Boolean(e&&e.getVelocity),yR=[...II,RD,YD],vR=m({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function gR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function bR(...t){return e.useCallback(function(...e){return t=>{let r=!1;const n=e.map(e=>{const n=gR(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():gR(e[t],null)}}}}(...t),t)}class wR extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,r=JI(e)&&e.offsetWidth||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=r-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function xR({children:t,isPresent:r,anchorX:n,root:o}){const i=g(),a=c(null),l=c({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=h(vR),u=bR(a,t?.ref);return b(()=>{const{width:e,height:t,top:c,left:u,right:p}=l.current;if(r||!a.current||!e||!t)return;const f="left"===n?`left: ${u}`:`right: ${p}`;a.current.dataset.motionPopId=i;const d=document.createElement("style");s&&(d.nonce=s);const m=o??document.head;return m.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${f}px !important;\n top: ${c}px !important;\n }\n `),()=>{m.contains(d)&&m.removeChild(d)}},[r]),k(wR,{isPresent:r,childRef:a,sizeRef:l,children:e.cloneElement(t,{ref:u})})}const OR=({children:t,initial:r,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s,anchorX:c,root:u})=>{const p=vL(ER),f=g();let d=!0,m=l(()=>(d=!1,{id:f,initial:r,isPresent:n,custom:i,onExitComplete:e=>{p.set(e,!0);for(const e of p.values())if(!e)return;o&&o()},register:e=>(p.set(e,!1),()=>p.delete(e))}),[n,p,o]);return a&&d&&(m={...m}),l(()=>{p.forEach((e,t)=>p.set(t,!1))},[n]),e.useEffect(()=>{!n&&!p.size&&o&&o()},[n]),"popLayout"===s&&(t=k(xR,{isPresent:n,anchorX:c,root:u,children:t})),k(wL.Provider,{value:m,children:t})};function ER(){return new Map}function kR(e=!0){const t=h(wL);if(null===t)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,i=g();a(()=>{if(e)return o(i)},[e]);const l=s(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,l]:[!0]}const jR=e=>e.key||"";function SR(e){const t=[];return w.forEach(e,e=>{p(e)&&t.push(e)}),t}const PR=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:s=!1,anchorX:u="left",root:p})=>{const[f,d]=kR(s),m=l(()=>SR(e),[e]),y=s&&!f?[]:m.map(jR),v=c(!0),g=c(m),b=vL(()=>new Map),[w,x]=i(m),[O,E]=i(m);bL(()=>{v.current=!1,g.current=m;for(let e=0;e<O.length;e++){const t=jR(O[e]);y.includes(t)?b.delete(t):!0!==b.get(t)&&b.set(t,!1)}},[O,y.length,y.join("-")]);const j=[];if(m!==w){let e=[...m];for(let t=0;t<O.length;t++){const r=O[t],n=jR(r);y.includes(n)||(e.splice(t,0,r),j.push(r))}return"wait"===a&&j.length&&(e=j),E(SR(e)),x(m),null}"production"!==process.env.NODE_ENV&&"wait"===a&&O.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:P}=h(yL);return k(S,{children:O.map(e=>{const i=jR(e),l=!(s&&!f)&&(m===O||y.includes(i));return k(OR,{isPresent:l,initial:!(v.current&&!r)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:p,onExitComplete:l?void 0:()=>{if(!b.has(i))return;b.set(i,!0);let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(P?.(),E(g.current),s&&d?.(),n&&n())},anchorX:u,children:e},i)})})},CR=m({strict:!1}),TR={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"]},NR={};for(const e in TR)NR[e]={isEnabled:t=>TR[e].some(e=>!!t[e])};const MR=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 AR(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||MR.has(e)}let zR=e=>!AR(e);try{"function"==typeof(LR=require("@emotion/is-prop-valid").default)&&(zR=e=>e.startsWith("on")?!AR(e):LR(e))}catch{}var LR;const DR=m({});function _R(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function IR(e){return"string"==typeof e||Array.isArray(e)}const RR=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],BR=["initial",...RR];function WR(e){return _R(e.animate)||BR.some(t=>IR(e[t]))}function FR(e){return Boolean(WR(e)||e.variants)}function $R(e){const{initial:t,animate:r}=function(e,t){if(WR(e)){const{initial:t,animate:r}=e;return{initial:!1===t||IR(t)?t:void 0,animate:IR(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,h(DR));return l(()=>({initial:t,animate:r}),[VR(t),VR(r)])}function VR(e){return Array.isArray(e)?e.join(" "):e}function HR(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const UR={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!zD.test(e))return e;e=parseFloat(e)}return`${HR(e,t.target.x)}% ${HR(e,t.target.y)}%`}},qR={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=YD.parse(e);if(o.length>5)return n;const i=YD.createTransformer(e),a="number"!=typeof o[0]?1:0,l=r.x.scale*t.x,s=r.y.scale*t.y;o[0+a]/=l,o[1+a]/=s;const c=KD(l,s,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},YR={borderRadius:{...UR,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:UR,borderTopRightRadius:UR,borderBottomLeftRadius:UR,borderBottomRightRadius:UR,boxShadow:qR};function XR(e,{layout:t,layoutId:r}){return rI.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!YR[e]||"opacity"===e)}const GR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},KR=tI.length;function ZR(e,t,r){const{style:n,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const e in t){const r=t[e];if(rI.has(e))a=!0;else if(hD(e))o[e]=r;else{const t=ZI(r,UI[e]);e.startsWith("origin")?(l=!0,i[e]=t):n[e]=t}}if(t.transform||(a||r?n.transform=function(e,t,r){let n="",o=!0;for(let i=0;i<KR;i++){const a=tI[i],l=e[a];if(void 0===l)continue;let s=!0;if(s="number"==typeof l?l===(a.startsWith("scale")?1:0):0===parseFloat(l),!s||r){const e=ZI(l,UI[a]);s||(o=!1,n+=`${GR[a]||a}(${e}) `),r&&(t[a]=e)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:e="50%",originY:t="50%",originZ:r=0}=i;n.transformOrigin=`${e} ${t} ${r}`}}const JR=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function QR(e,t,r){for(const n in t)hR(t[n])||XR(n,r)||(e[n]=t[n])}function eB(e,t){const r={};return QR(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return l(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return ZR(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),r}function tB(e,t){const r={},n=eB(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const rB={offset:"stroke-dashoffset",array:"stroke-dasharray"},nB={offset:"strokeDashoffset",array:"strokeDasharray"};function oB(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...l},s,c,u){if(ZR(e,l,c),s)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:f}=e;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete p.transformBox),void 0!==t&&(p.x=t),void 0!==r&&(p.y=r),void 0!==n&&(p.scale=n),void 0!==o&&function(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?rB:nB;e[i.offset]=zD.transform(-n);const a=zD.transform(t),l=zD.transform(r);e[i.array]=`${a} ${l}`}(p,o,i,a,!1)}const iB=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),aB=e=>"string"==typeof e&&"svg"===e.toLowerCase();function lB(e,t,r,n){const o=l(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return oB(r,t,aB(n),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const t={};QR(t,e.style,e),o.style={...t,...o.style}}return o}const sB=["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 cB(e){return"string"==typeof e&&!e.includes("-")&&!!(sB.indexOf(e)>-1||/[A-Z]/u.test(e))}function uB(e,t,r,{latestValues:o},i,a=!1){const s=(cB(e)?lB:tB)(t,o,i,e),c=function(e,t,r){const n={};for(const o in e)"values"===o&&"object"==typeof e.values||(zR(o)||!0===r&&AR(o)||!t&&!AR(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}(t,"string"==typeof e,a),u=e!==y?{...c,...s,ref:r}:{},{children:p}=t,f=l(()=>hR(p)?p.get():p,[p]);return n(e,{...u,children:f})}function pB(e){const t=[{},{}];return e?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function fB(e,t,r,n){if("function"==typeof t){const[o,i]=pB(n);t=t(void 0!==r?r:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=pB(n);t=t(void 0!==r?r:e.custom,o,i)}return t}function dB(e){return hR(e)?e.get():e}function mB(e,t,r,n){const o={},i=n(e,{});for(const e in i)o[e]=dB(i[e]);let{initial:a,animate:l}=e;const s=WR(e),c=FR(e);t&&c&&!s&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===l&&(l=t.animate));let u=!!r&&!1===r.initial;u=u||!1===a;const p=u?l:a;if(p&&"boolean"!=typeof p&&!_R(p)){const t=Array.isArray(p)?p:[p];for(let r=0;r<t.length;r++){const n=fB(e,t[r]);if(n){const{transitionEnd:e,transition:t,...r}=n;for(const e in r){let t=r[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const hB=e=>(t,r)=>{const n=h(DR),o=h(wL),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:mB(r,n,o,e),renderState:t()}}(e,t,n,o);return r?i():vL(i)};function yB(e,t,r){const{style:n}=e,o={};for(const i in n)(hR(n[i])||t.style&&hR(t.style[i])||XR(i,e)||void 0!==r?.getValue(i)?.liveStyle)&&(o[i]=n[i]);return o}const vB=hB({scrapeMotionValuesFromProps:yB,createRenderState:JR});function gB(e,t,r){const n=yB(e,t,r);for(const r in e)if(hR(e[r])||hR(t[r])){n[-1!==tI.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}const bB=hB({scrapeMotionValuesFromProps:gB,createRenderState:iB}),wB=Symbol.for("motionComponentSymbol");function xB(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function OB(e,t,r){return s(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):xB(r)&&(r.current=n))},[t])}const EB=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kB="data-"+EB("framerAppearId"),jB=m({});function SB(e,t,r,n,o){const{visualElement:i}=h(DR),l=h(CR),s=h(wL),u=h(vR).reducedMotion,p=c(null);n=n||l.renderer,!p.current&&n&&(p.current=n(e,{visualState:t,parent:i,props:r,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:u}));const f=p.current,d=h(jB);!f||f.projection||!o||"html"!==f.type&&"svg"!==f.type||function(e,t,r,n){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:s,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:PB(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||l&&xB(l),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c})}(p.current,r,o,d);const m=c(!1);b(()=>{f&&m.current&&f.update(r,s)});const y=r[kB],v=c(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return bL(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),a(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),f.enteringChildren=void 0)}),f}function PB(e){if(e)return!1!==e.options.allowProjection?e.projection:PB(e.parent)}function CB(e,{forwardMotionProps:t=!1}={},n,o){n&&function(e){for(const t in e)NR[t]={...NR[t],...e[t]}}(n);const i=cB(e)?bB:vB;function a(r,a){let l;const s={...h(vR),...r,layoutId:TB(r)},{isStatic:c}=s,u=$R(r),p=i(r,c);if(!c&&gL){!function(e,t){const r=h(CR).strict;if("production"!==process.env.NODE_ENV&&t&&r){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?jL(!1,t,"lazy-strict-mode"):SL(!1,t,"lazy-strict-mode")}}(s,n);const t=function(e){const{drag:t,layout:r}=NR;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(s);l=t.MeasureLayout,u.visualElement=SB(e,p,s,o,t.ProjectionNode)}return j(DR.Provider,{value:u,children:[l&&u.visualElement?k(l,{visualElement:u.visualElement,...s}):null,uB(e,r,OB(p,u.visualElement,a),p,c,t)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=r(a);return l[wB]=e,l}function TB({layoutId:e}){const t=h(yL).id;return t&&void 0!==e?t+"-"+e:e}function NB(e,t){if("undefined"==typeof Proxy)return CB;const r=new Map,n=(r,n)=>CB(r,n,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&FL(!1,"motion() is deprecated. Use motion.create() instead."),n(e,t)),{get:(o,i)=>"create"===i?n:(r.has(i)||r.set(i,CB(i,void 0,e,t)),r.get(i))})}function MB({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function AB(e){return void 0===e||1===e}function zB({scale:e,scaleX:t,scaleY:r}){return!AB(e)||!AB(t)||!AB(r)}function LB(e){return zB(e)||DB(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function DB(e){return _B(e.x)||_B(e.y)}function _B(e){return e&&"0%"!==e}function IB(e,t,r){return r+t*(e-r)}function RB(e,t,r,n,o){return void 0!==o&&(e=IB(e,o,n)),IB(e,r,n)+t}function BB(e,t=0,r=1,n,o){e.min=RB(e.min,t,r,n,o),e.max=RB(e.max,t,r,n,o)}function WB(e,{x:t,y:r}){BB(e.x,t.translate,t.scale,t.originPoint),BB(e.y,r.translate,r.scale,r.originPoint)}const FB=.999999999999,$B=1.0000000000001;function VB(e,t){e.min=e.min+t,e.max=e.max+t}function HB(e,t,r,n,o=.5){BB(e,t,r,KD(e.min,e.max,o),n)}function UB(e,t){HB(e.x,t.x,t.scaleX,t.scale,t.originX),HB(e.y,t.y,t.scaleY,t.scale,t.originY)}function qB(e,t){return MB(function(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}const YB=()=>({x:{min:0,max:0},y:{min:0,max:0}}),XB={current:null},GB={current:!1};const KB=new WeakMap;const ZB=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class JB{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dI,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=dD.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,lD.render(this.render,!1,!0))};const{latestValues:l,renderState:s}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=WR(t),this.isVariantNode=FR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==l[e]&&hR(t)&&t.set(l[e])}}mount(e){this.current=e,KB.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)),GB.current||function(){if(GB.current=!0,gL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>XB.current=e.matches;e.addEventListener("change",t),t()}else XB.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||XB.current),"production"!==process.env.NODE_ENV&&FL(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),sD(this.notifyUpdate),sD(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=rI.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&lD.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),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 NR){const t=NR[e];if(!t)continue;const{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(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):{x:{min:0,max:0},y:{min:0,max:0}}}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 t=0;t<ZB.length;t++){const r=ZB[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(const n in t){const o=t[n],i=r[n];if(hR(o))e.addValue(n,o);else if(hR(i))e.addValue(n,eR(o,{owner:e}));else if(i!==o)if(e.hasValue(n)){const t=e.getValue(n);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(n);e.addValue(n,eR(void 0!==t?t:o,{owner:e}))}}for(const n in r)void 0===t[n]&&e.removeValue(n);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}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&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 r=this.values.get(e);return void 0===r&&void 0!==t&&(r=eR(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var n;return null!=r&&("string"==typeof r&&(CL(r)||NL(r))?r=parseFloat(r):(n=r,!yR.find(_I(n))&&YD.test(t)&&(r=XI(e,t))),this.setBaseTarget(e,hR(r)?r.get():r)),hR(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let r;if("string"==typeof t||"object"==typeof t){const n=fB(this.props,t,this.presenceContext?.custom);n&&(r=n[e])}if(t&&void 0!==r)return r;const n=this.getBaseTargetFromProps(this.props,e);return void 0===n||hR(n)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new _L),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){tR.render(this.render)}}class QB extends JB{constructor(){super(...arguments),this.KeyframeResolver=KI}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:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;hR(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function eW(e,{style:t,vars:r},n,o){const i=e.style;let a;for(a in t)i[a]=t[a];for(a in o?.applyProjectionStyles(i,n),r)i.setProperty(a,r[a])}class tW extends QB{constructor(){super(...arguments),this.type="html",this.renderInstance=eW}readValueFromInstance(e,t){if(rI.has(t))return this.projection?.isProjecting?J_(t):((e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Q_(r,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),o=(hD(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof o?o.trim():o}var r}measureInstanceViewportBox(e,{transformPagePoint:t}){return qB(e,t)}build(e,t,r){ZR(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return yB(e,t,r)}}const rW=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"]);class nW extends QB{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=YB}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(rI.has(t)){const e=YI(t);return e&&e.default||0}return t=rW.has(t)?t:EB(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return gB(e,t,r)}build(e,t,r){oB(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){!function(e,t,r,n){eW(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(rW.has(r)?r:EB(r),t.attrs[r])}(e,t,0,n)}mount(e){this.isSVGTag=aB(e.tagName),super.mount(e)}}const oW=(e,t)=>cB(e)?new nW(t):new tW(t,{allowProjection:e!==y});function iW(e,t,r){const n=e.getProps();return fB(n,t,void 0!==r?r:n.custom,e)}const aW=e=>Array.isArray(e);function lW(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,eR(r))}function sW(e){return aW(e)?e[e.length-1]||0:e}function cW(e,t){const r=e.getValue("willChange");if(n=r,Boolean(hR(n)&&n.add))return r.add(t);if(!r&&PL.WillChange){const r=new PL.WillChange("auto");e.addValue("willChange",r),r.add(t)}var n}function uW(e){return e.props[kB]}const pW=e=>null!==e;const fW={type:"spring",stiffness:500,damping:25,restSpeed:10},dW={type:"keyframes",duration:.8},mW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hW=(e,{keyframes:t})=>t.length>2?dW:rI.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:fW:mW;const yW=(e,t,r,n={},o,i)=>a=>{const l=LI(n,e)||{},s=l.delay||n.delay||0;let{elapsed:c=0}=n;c-=IL(s);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:s,elapsed:c,...u}){return!!Object.keys(u).length})(l)||Object.assign(u,hW(e,u)),u.duration&&(u.duration=IL(u.duration)),u.repeatDelay&&(u.repeatDelay=IL(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let p=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(CI(u),0===u.delay&&(p=!0)),(PL.instantAnimations||PL.skipAnimations)&&(p=!0,CI(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,p&&!i&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:r="loop"}){const n=e.filter(pW);return n[t&&"loop"!==r&&t%2==1?0:n.length-1]}(u.keyframes,l);if(void 0!==e)return void lD.update(()=>{u.onUpdate(e),u.onComplete()})}return l.isSync?new H_(u):new MI(u)};function vW({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}function gW(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(i=n);const s=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const n=e.getValue(t,e.latestValues[t]??null),o=l[t];if(void 0===o||c&&vW(c,t))continue;const a={delay:r,...LI(i||{},t)},u=n.get();if(void 0!==u&&!n.isAnimating&&!Array.isArray(o)&&o===u&&!a.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const r=uW(e);if(r){const e=window.MotionHandoffAnimation(r,t,lD);null!==e&&(a.startTime=e,p=!0)}}cW(e,t),n.start(yW(t,n,o,e.shouldReduceMotion&&DI.has(t)?{type:!1}:a,e,p));const f=n.animation;f&&s.push(f)}return a&&Promise.all(s).then(()=>{lD.update(()=>{a&&function(e,t){const r=iW(e,t);let{transitionEnd:n={},transition:o={},...i}=r||{};i={...i,...n};for(const t in i)lW(e,t,sW(i[t]))}(e,a)})}),s}function bW(e,t,r,n=0,o=1){const i=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,l=(a-1)*n;return"function"==typeof r?r(i,a):1===o?i*n:l-i*n}function wW(e,t,r={}){const n=iW(e,t,"exit"===r.type?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);const i=n?()=>Promise.all(gW(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(n=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:l}=o;return function(e,t,r=0,n=0,o=0,i=1,a){const l=[];for(const s of e.variantChildren)s.notify("AnimationStart",t),l.push(wW(s,t,{...a,delay:r+("function"==typeof n?0:n)+bW(e.variantChildren,s,n,o,i)}).then(()=>s.notify("AnimationComplete",t)));return Promise.all(l)}(e,t,n,i,a,l,r)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[i,a]:[a,i];return e().then(()=>t())}return Promise.all([i(),a(r.delay)])}function xW(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const OW=BR.length;function EW(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&EW(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let r=0;r<OW;r++){const n=BR[r],o=e.props[n];(IR(o)||!1===o)&&(t[n]=o)}return t}const kW=[...RR].reverse(),jW=RR.length;function SW(e){return t=>Promise.all(t.map(({animation:t,options:r})=>function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>wW(e,t,r));n=Promise.all(o)}else if("string"==typeof t)n=wW(e,t,r);else{const o="function"==typeof t?iW(e,t,r.custom):t;n=Promise.all(gW(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}(e,t,r)))}function PW(e){let t=SW(e),r=NW(),n=!0;const o=t=>(r,n)=>{const o=iW(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(o){const{transition:e,transitionEnd:t,...n}=o;r={...r,...n,...t}}return r};function i(i){const{props:a}=e,l=EW(e.parent)||{},s=[],c=new Set;let u={},p=1/0;for(let t=0;t<jW;t++){const f=kW[t],d=r[f],m=void 0!==a[f]?a[f]:l[f],h=IR(m),y=f===i?d.isActive:null;!1===y&&(p=t);let v=m===l[f]&&m!==a[f]&&h;if(v&&n&&e.manuallyAnimateOnMount&&(v=!1),d.protectedKeys={...u},!d.isActive&&null===y||!m&&!d.prevProp||_R(m)||"boolean"==typeof m)continue;const g=CW(d.prevProp,m);let b=g||f===i&&d.isActive&&!v&&h||t>p&&h,w=!1;const x=Array.isArray(m)?m:[m];let O=x.reduce(o(f),{});!1===y&&(O={});const{prevResolvedValues:E={}}=d,k={...E,...O},j=t=>{b=!0,c.has(t)&&(w=!0,c.delete(t)),d.needsAnimating[t]=!0;const r=e.getValue(t);r&&(r.liveStyle=!1)};for(const e in k){const t=O[e],r=E[e];if(u.hasOwnProperty(e))continue;let n=!1;n=aW(t)&&aW(r)?!xW(t,r):t!==r,n?null!=t?j(e):c.add(e):void 0!==t&&c.has(e)?j(e):d.protectedKeys[e]=!0}d.prevProp=m,d.prevResolvedValues=O,d.isActive&&(u={...u,...O}),n&&e.blockInitialAnimation&&(b=!1);const S=v&&g;b&&(!S||w)&&s.push(...x.map(t=>{const r={type:f};if("string"==typeof t&&n&&!S&&e.manuallyAnimateOnMount&&e.parent){const{parent:n}=e,o=iW(n,t);if(n.enteringChildren&&o){const{delayChildren:t}=o.transition||{};r.delay=bW(n.enteringChildren,e,t)}}return{animation:t,options:r}}))}if(c.size){const t={};if("boolean"!=typeof a.initial){const r=iW(e,Array.isArray(a.initial)?a.initial[0]:a.initial);r&&r.transition&&(t.transition=r.transition)}c.forEach(r=>{const n=e.getBaseTarget(r),o=e.getValue(r);o&&(o.liveStyle=!0),t[r]=n??null}),s.push({animation:t})}let f=Boolean(s.length);return!n||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(f=!1),n=!1,f?t(s):Promise.resolve()}return{animateChanges:i,setActive:function(t,n){if(r[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),r[t].isActive=n;const o=i(t);for(const e in r)r[e].protectedKeys={};return o},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=NW()}}}function CW(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!xW(t,e)}function TW(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NW(){return{animate:TW(!0),whileInView:TW(),whileHover:TW(),whileTap:TW(),whileDrag:TW(),whileFocus:TW(),exit:TW()}}class MW{constructor(e){this.isMounted=!1,this.node=e}update(){}}let AW=0;const zW={animation:{Feature:class extends MW{constructor(e){super(e),e.animationState||(e.animationState=PW(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();_R(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(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends MW{constructor(){super(...arguments),this.id=AW++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function LW(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function DW(e){return{point:{x:e.pageX,y:e.pageY}}}function _W(e,t,r,n){return LW(e,t,(e=>t=>lR(t)&&e(t,DW(t)))(r),n)}function IW(e){return e.max-e.min}function RW(e,t,r,n=.5){e.origin=n,e.originPoint=KD(t.min,t.max,e.origin),e.scale=IW(r)/IW(t),e.translate=KD(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function BW(e,t,r,n){RW(e.x,t.x,r.x,n?n.originX:void 0),RW(e.y,t.y,r.y,n?n.originY:void 0)}function WW(e,t,r){e.min=r.min+t.min,e.max=e.min+IW(t)}function FW(e,t,r){e.min=t.min-r.min,e.max=e.min+IW(t)}function $W(e,t,r){FW(e.x,t.x,r.x),FW(e.y,t.y,r.y)}function VW(e){return[e("x"),e("y")]}const HW=({current:e})=>e?e.ownerDocument.defaultView:null,UW=(e,t)=>Math.abs(e-t);class qW{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=GW(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,r=function(e,t){const r=UW(e.x,t.x),n=UW(e.y,t.y);return Math.sqrt(r**2+n**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!r)return;const{point:n}=e,{timestamp:o}=cD;this.history.push({...n,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=YW(t,this.transformPagePoint),lD.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:r,onSessionEnd:n,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=GW("pointercancel"===e.type?this.lastMoveEventInfo:YW(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,i),n&&n(e,i)},!lR(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=n||window;const a=YW(DW(e),this.transformPagePoint),{point:l}=a,{timestamp:s}=cD;this.history=[{...l,timestamp:s}];const{onSessionStart:c}=t;c&&c(e,GW(a,this.history)),this.removeListeners=LL(_W(this.contextWindow,"pointermove",this.handlePointerMove),_W(this.contextWindow,"pointerup",this.handlePointerUp),_W(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),sD(this.updatePoint)}}function YW(e,t){return t?{point:t(e.point)}:e}function XW(e,t){return{x:e.x-t.x,y:e.y-t.y}}function GW({point:e},t){return{point:e,delta:XW(e,ZW(t)),offset:XW(e,KW(t)),velocity:JW(t,.1)}}function KW(e){return e[0]}function ZW(e){return e[e.length-1]}function JW(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ZW(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>IL(t)));)r--;if(!n)return{x:0,y:0};const i=RL(o.timestamp-n.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function QW(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function eF(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}const tF=.35;function rF(e,t,r){return{min:nF(e,t),max:nF(e,r)}}function nF(e,t){return"number"==typeof e?e:e[t]||0}const oF=new WeakMap;class iF{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new qW(e,{onSessionStart:e=>{const{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(DW(e).point)},onStart:(e,t)=>{const{drag:r,dragPropagation:n,onDragStart:o}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=r)||"y"===i?rR[i]?null:(rR[i]=!0,()=>{rR[i]=!1}):rR.x||rR.y?null:(rR.x=rR.y=!0,()=>{rR.x=rR.y=!1}),!this.openDragLock))return;var i;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),VW(e=>{let t=this.getAxisMotionValue(e).get()||0;if(AD.test(t)){const{projection:r}=this.visualElement;if(r&&r.layout){const n=r.layout.layoutBox[e];if(n){t=IW(n)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&lD.postRender(()=>o(e,t)),cW(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:r,dragDirectionLock:n,onDirectionLock:o,onDrag:i}=this.getProps();if(!r&&!this.openDragLock)return;const{offset:a}=t;if(n&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let r=null;Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x");return r}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>VW(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:r,contextWindow:HW(this.visualElement)})}stop(e,t){const r=e||this.latestPointerEvent,n=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!n||!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&lD.postRender(()=>a(r,n))}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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){const{drag:n}=this.getProps();if(!r||!aF(e,n,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?KD(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?KD(r,e,n.max):Math.min(e,r)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&xB(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!r)&&function(e,{top:t,left:r,bottom:n,right:o}){return{x:QW(e.x,r,o),y:QW(e.y,t,n)}}(r.layoutBox,e),this.elastic=function(e=tF){return!1===e?e=0:!0===e&&(e=tF),{x:rF(e,"left","right"),y:rF(e,"top","bottom")}}(t),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&VW(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xB(e))return!1;const r=e.current;SL(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const o=function(e,t,r){const n=qB(e,r),{scroll:o}=t;return o&&(VB(n.x,o.offset.x),VB(n.y,o.offset.y)),n}(r,n.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:eF(e.x,t.x),y:eF(e.y,t.y)}}(n.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=MB(e))}return i}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},s=VW(a=>{if(!aF(a,t,this.currentDirection))return;let s=l&&l[a]||{};i&&(s={min:0,max:0});const c=n?200:1e6,u=n?40:1e7,p={type:"inertia",velocity:r?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...s};return this.startAxisValueAnimation(a,p)});return Promise.all(s).then(a)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return cW(this.visualElement,e),r.start(yW(e,r,0,t,this.visualElement,!1))}stopAnimation(){VW(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){VW(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),n=r[t];return n||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){VW(t=>{const{drag:r}=this.getProps();if(!aF(t,r,this.currentDirection))return;const{projection:n}=this.visualElement,o=this.getAxisMotionValue(t);if(n&&n.layout){const{min:r,max:i}=n.layout.layoutBox[t];o.set(e[t]-KD(r,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!xB(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};VW(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const r=t.get();n[e]=function(e,t){let r=.5;const n=IW(e),o=IW(t);return o>n?r=DL(t.min,t.max-n,e.min):n>o&&(r=DL(e.min,e.max-o,t.min)),EL(0,1,r)}({min:r,max:r},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),VW(t=>{if(!aF(t,e,null))return;const r=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];r.set(KD(o,i,n[t]))})}addListeners(){if(!this.visualElement.current)return;oF.set(this.visualElement,this);const e=_W(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();xB(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),lD.read(t);const o=LW(window,"resize",()=>this.scalePositionWithinConstraints()),i=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(VW(t=>{const r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),n(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:o=!1,dragElastic:i=tF,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function aF(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}const lF=e=>(t,r)=>{e&&lD.postRender(()=>e(t,r))};const sF={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let cF=!1;class uF extends x{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),r&&r.register&&n&&r.register(o),cF&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),sF.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:n,isPresent:o}=this.props,{projection:i}=r;return i?(i.isPresent=o,cF=!0,n||e.layoutDependency!==t||void 0===t||e.isPresent!==o?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||lD.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),tR.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;cF=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pF(e){const[t,r]=kR(),n=h(yL);return k(uF,{...e,layoutGroup:n,switchLayoutGroup:h(jB),isPresent:t,safeToRemove:r})}const fF=(e,t)=>e.depth-t.depth;class dF{constructor(){this.children=[],this.isDirty=!1}add(e){xL(this.children,e),this.isDirty=!0}remove(e){OL(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fF),this.isDirty=!1,this.children.forEach(e)}}const mF=["TopLeft","TopRight","BottomLeft","BottomRight"],hF=mF.length,yF=e=>"string"==typeof e?parseFloat(e):e,vF=e=>"number"==typeof e||zD.test(e);function gF(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const bF=xF(0,.5,ZL),wF=xF(.5,.95,AL);function xF(e,t,r){return n=>n<e?0:n>t?1:r(DL(e,t,n))}function OF(e,t){e.min=t.min,e.max=t.max}function EF(e,t){OF(e.x,t.x),OF(e.y,t.y)}function kF(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function jF(e,t,r,n,o){return e=IB(e-=t,1/r,n),void 0!==o&&(e=IB(e,1/o,n)),e}function SF(e,t,[r,n,o],i,a){!function(e,t=0,r=1,n=.5,o,i=e,a=e){AD.test(t)&&(t=parseFloat(t),t=KD(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let l=KD(i.min,i.max,n);e===i&&(l-=t),e.min=jF(e.min,t,r,l,o),e.max=jF(e.max,t,r,l,o)}(e,t[r],t[n],t[o],t.scale,i,a)}const PF=["x","scaleX","originX"],CF=["y","scaleY","originY"];function TF(e,t,r,n){SF(e.x,t,PF,r?r.x:void 0,n?n.x:void 0),SF(e.y,t,CF,r?r.y:void 0,n?n.y:void 0)}function NF(e){return 0===e.translate&&1===e.scale}function MF(e){return NF(e.x)&&NF(e.y)}function AF(e,t){return e.min===t.min&&e.max===t.max}function zF(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function LF(e,t){return zF(e.x,t.x)&&zF(e.y,t.y)}function DF(e){return IW(e.x)/IW(e.y)}function _F(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class IF{constructor(){this.members=[]}add(e){xL(this.members,e),e.scheduleRender()}remove(e){if(OL(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 r;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){r=t;break}}return!!r&&(this.promote(r),!0)}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;!1===n&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const RF=["","X","Y","Z"];let BF=0;function WF(e,t,r,n){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function FF(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=uW(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",lD,!(t||n))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&FF(n)}function $F({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(e={},r=t?.()){this.id=BF++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(UF),this.nodes.forEach(JF),this.nodes.forEach(QF),this.nodes.forEach(qF)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new dF)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new _L),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var r;this.isSVG=mR(t)&&!(mR(r=t)&&"svg"===r.tagName),this.instance=t;const{layoutId:n,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||n)&&(this.isLayoutDirty=!0),e){let r,n=0;const o=()=>this.root.updateBlockedByResize=!1;lD.read(()=>{n=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==n&&(n=e,this.root.updateBlockedByResize=!0,r&&r(),r=function(e,t){const r=dD.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(sD(n),e(i-t))};return lD.setup(n,!0),()=>sD(n)}(o,250),sF.hasAnimatedSinceResize&&(sF.hasAnimatedSinceResize=!1,this.nodes.forEach(ZF)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||i$,{onLayoutAnimationStart:a,onLayoutAnimationComplete:l}=i.getProps(),s=!this.targetLayout||!LF(this.targetLayout,n),c=!t&&r;if(this.options.layoutRoot||this.resumeFrom||c||t&&(s||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...LI(o,"layout"),onPlay:a,onComplete:l};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||ZF(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}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,this.eventHandlers.clear(),sD(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(e$),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&&FF(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(XF);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(GF);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(KF),this.nodes.forEach(VF),this.nodes.forEach(HF)):this.nodes.forEach(GF),this.clearAllSnapshots();const e=dD.now();cD.delta=EL(0,1e3/60,e-cD.timestamp),cD.timestamp=e,cD.isProcessing=!0,uD.update.process(cD),uD.preRender.process(cD),uD.render.process(cD),cD.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tR.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YF),this.sharedNodes.forEach(t$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lD.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lD.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||IW(this.snapshot.measuredBox.x)||IW(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},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&&this.instance){const t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!MF(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,i=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||LB(this.latestValues)||i)&&(o(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let r=this.removeElementScroll(t);var n;return e&&(r=this.removeTransform(r)),s$((n=r).x),s$(n.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u$))){const{scroll:e}=this.root;e&&(VB(t.x,e.offset.x),VB(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(EF(t,e),this.scroll?.wasRoot)return t;for(let r=0;r<this.path.length;r++){const n=this.path[r],{scroll:o,options:i}=n;n!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&EF(t,e),VB(t.x,o.offset.x),VB(t.y,o.offset.y))}return t}applyTransform(e,t=!1){const r={x:{min:0,max:0},y:{min:0,max:0}};EF(r,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&UB(r,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),LB(n.latestValues)&&UB(r,n.latestValues)}return LB(this.latestValues)&&UB(r,this.latestValues),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};EF(t,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];if(!r.instance)continue;if(!LB(r.latestValues))continue;zB(r.latestValues)&&r.updateSnapshot();const n=YB();EF(n,r.measurePageBox()),TF(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,n)}return LB(this.latestValues)&&TF(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!==cD.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==t;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:n,layoutId:o}=this.options;if(!this.layout||!n&&!o)return;this.resolvedRelativeTargetAt=cD.timestamp;const i=this.getClosestProjectingParent();var a,l,s;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,l=this.relativeTarget,s=this.relativeParent.target,WW(a.x,l.x,s.x),WW(a.y,l.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):EF(this.target,this.layout.layoutBox),WB(this.target,this.targetDelta)):EF(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!zB(this.parent.latestValues)&&!DB(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,r){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$W(this.relativeTargetOrigin,t,r),EF(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let r=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(r=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===cD.timestamp&&(r=!1),r)return;const{layout:n,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||!n&&!o)return;EF(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,a=this.treeScale.y;!function(e,t,r,n=!1){const o=r.length;if(!o)return;let i,a;t.x=t.y=1;for(let l=0;l<o;l++){i=r[l],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&UB(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,WB(e,a)),n&&LB(i.latestValues)&&UB(e,i.latestValues))}t.x<$B&&t.x>FB&&(t.x=1),t.y<$B&&t.y>FB&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(kF(this.prevProjectionDelta.x,this.projectionDelta.x),kF(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),BW(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===i&&this.treeScale.y===a&&_F(this.projectionDelta.x,this.prevProjectionDelta.x)&&_F(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const r=this.snapshot,n=r?r.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),s=this.getStack(),c=!s||s.members.length<=1,u=Boolean(l&&!c&&!0===this.options.crossfade&&!this.path.some(o$));let p;this.animationProgress=0,this.mixTargetDelta=t=>{const r=t/1e3;var s,f,d,m;r$(i.x,e.x,r),r$(i.y,e.y,r),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($W(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),s=this.relativeTarget,f=this.relativeTargetOrigin,d=a,m=r,n$(s.x,f.x,d.x,m),n$(s.y,f.y,d.y,m),p&&function(e,t){return AF(e.x,t.x)&&AF(e.y,t.y)}(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p={x:{min:0,max:0},y:{min:0,max:0}}),EF(p,this.relativeTarget)),l&&(this.animationValues=o,function(e,t,r,n,o,i){o?(e.opacity=KD(0,r.opacity??1,bF(n)),e.opacityExit=KD(t.opacity??1,0,wF(n))):i&&(e.opacity=KD(t.opacity??1,r.opacity??1,n));for(let o=0;o<hF;o++){const i=`border${mF[o]}Radius`;let a=gF(t,i),l=gF(r,i);void 0===a&&void 0===l||(a||(a=0),l||(l=0),0===a||0===l||vF(a)===vF(l)?(e[i]=Math.max(KD(yF(a),yF(l),n),0),(AD.test(l)||AD.test(a))&&(e[i]+="%")):e[i]=l)}(t.rotate||r.rotate)&&(e.rotate=KD(t.rotate||0,r.rotate||0,n))}(o,n,this.latestValues,r,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(sD(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lD.update(()=>{sF.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=eR(0)),this.currentAnimation=function(e,t,r){const n=hR(e)?e:eR(e);return n.start(yW("",n,t,r)),n.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},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:r,layout:n,latestValues:o}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&c$(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=IW(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;const n=IW(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}EF(t,r),UB(t,o),BW(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new IF);this.sharedNodes.get(e).add(t);const r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){const n=this.getStack();n&&n.promote(this,r),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:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;const n={};r.z&&WF("z",e,n,this.animationValues);for(let t=0;t<RF.length;t++)WF(`rotate${RF[t]}`,e,n,this.animationValues),WF(`skew${RF[t]}`,e,n,this.animationValues);e.render();for(const t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=dB(t?.pointerEvents)||"",void(e.transform=r?r(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=dB(t?.pointerEvents)||""),void(this.hasProjected&&!LB(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1));e.visibility="";const o=n.animationValues||n.latestValues;this.applyTransformsToTarget();let i=function(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=r?.z||0;if((o||i||a)&&(n=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:l}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),o&&(n+=`rotateX(${o}deg) `),i&&(n+=`rotateY(${i}deg) `),a&&(n+=`skewX(${a}deg) `),l&&(n+=`skewY(${l}deg) `)}const l=e.x.scale*t.x,s=e.y.scale*t.y;return 1===l&&1===s||(n+=`scale(${l}, ${s})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);r&&(i=r(o,i)),e.transform=i;const{x:a,y:l}=this.projectionDelta;e.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,n.animationValues?e.opacity=n===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=n===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const t in YR){if(void 0===o[t])continue;const{correct:r,applyTo:a,isCSSVariable:l}=YR[t],s="none"===i?o[t]:r(o[t],n);if(a){const t=a.length;for(let r=0;r<t;r++)e[a[r]]=s}else l?this.options.visualElement.renderState.vars[t]=s:e[t]=s}this.options.layoutId&&(e.pointerEvents=n===this?dB(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(XF),this.root.sharedNodes.clear()}}}function VF(e){e.updateLayout()}function HF(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;"size"===o?VW(e=>{const n=i?t.measuredBox[e]:t.layoutBox[e],o=IW(n);n.min=r[e].min,n.max=n.min+o}):c$(o,t.layoutBox,r)&&VW(n=>{const o=i?t.measuredBox[n]:t.layoutBox[n],a=IW(r[n]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};BW(a,r,t.layoutBox);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?BW(l,e.applyTransform(n,!0),t.measuredBox):BW(l,r,t.layoutBox);const s=!MF(a);let c=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:o,layout:i}=n;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};$W(a,t.layoutBox,o.layoutBox);const l={x:{min:0,max:0},y:{min:0,max:0}};$W(l,r,i.layoutBox),LF(a,l)||(c=!0),n.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=a,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:s,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function UF(e){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 qF(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YF(e){e.clearSnapshot()}function XF(e){e.clearMeasurements()}function GF(e){e.isLayoutDirty=!1}function KF(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ZF(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function JF(e){e.resolveTargetDelta()}function QF(e){e.calcProjection()}function e$(e){e.resetSkewAndRotation()}function t$(e){e.removeLeadSnapshot()}function r$(e,t,r){e.translate=KD(t.translate,0,r),e.scale=KD(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function n$(e,t,r,n){e.min=KD(t.min,r.min,n),e.max=KD(t.max,r.max,n)}function o$(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const i$={duration:.45,ease:[.4,0,.1,1]},a$=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),l$=a$("applewebkit/")&&!a$("chrome/")?Math.round:AL;function s$(e){e.min=l$(e.min),e.max=l$(e.max)}function c$(e,t,r){return"position"===e||"preserve-aspect"===e&&(n=DF(t),o=DF(r),i=.2,!(Math.abs(n-o)<=i));var n,o,i}function u$(e){return e!==e.root&&e.scroll?.wasRoot}const p$=$F({attachResizeListener:(e,t)=>LW(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),f$={current:void 0},d$=$F({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!f$.current){const e=new p$({});e.mount(window),e.setOptions({layoutScroll:!0}),f$.current=e}return f$.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),m$={pan:{Feature:class extends MW{constructor(){super(...arguments),this.removePointerDownListener=AL}onPointerDown(e){this.session=new qW(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HW(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:lF(e),onStart:lF(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&lD.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=_W(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 MW{constructor(e){super(e),this.removeGroupControls=AL,this.removeListeners=AL,this.controls=new iF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||AL}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:d$,MeasureLayout:pF}};function h$(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);const o=n["onHover"+r];o&&lD.postRender(()=>o(t,DW(t)))}function y$(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);const o=n["onTap"+("End"===r?"":r)];o&&lD.postRender(()=>o(t,DW(t)))}const v$=new WeakMap,g$=new WeakMap,b$=e=>{const t=v$.get(e.target);t&&t(e)},w$=e=>{e.forEach(b$)};function x$(e,t,r){const n=function({root:e,...t}){const r=e||document;g$.has(r)||g$.set(r,{});const n=g$.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(w$,{root:e,...t})),n[o]}(t);return v$.set(e,r),n.observe(e),()=>{v$.delete(e),n.unobserve(e)}}const O$={some:0,all:1};const E$={inView:{Feature:class extends MW{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:O$[n]};return x$(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),i=t?r:n;i&&i(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 r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends MW{mount(){const{current:e}=this.node;e&&(this.unmount=dR(e,(e,t)=>(y$(this.node,t,"Start"),(e,{success:t})=>y$(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends MW{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=LL(LW(this.node.current,"focus",()=>this.onFocus()),LW(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends MW{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){const[n,o,i]=oR(e,r),a=e=>{if(!iR(e))return;const{target:r}=e,n=t(r,e);if("function"!=typeof n||!r)return;const i=e=>{iR(e)&&(n(e),r.removeEventListener("pointerleave",i))};r.addEventListener("pointerleave",i,o)};return n.forEach(e=>{e.addEventListener("pointerenter",a,o)}),i}(e,(e,t)=>(h$(this.node,t,"Start"),e=>h$(this.node,e,"End"))))}unmount(){}}}},k$=NB({...zW,...E$,...m$,...{layout:{ProjectionNode:d$,MeasureLayout:pF}}},oW),j$="right",S$={top:{in:"slide-in-from-top",out:"slide-out-to-top"},right:{in:"slide-in-from-right",out:"slide-out-to-right"},bottom:{in:"slide-in-from-bottom",out:"slide-out-to-bottom"},left:{in:"slide-in-from-left",out:"slide-out-to-left"}},P$=({children:e,side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:s,className:u,fullWidth:p,fullHeight:f,open:d,...m})=>{const h=c({side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:s,className:u,fullWidth:p,fullHeight:f});return a(()=>{h.current={side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:s,className:u,fullWidth:p,fullHeight:f}},[r,n,o,i,l,s,u,p,f]),t.createElement(pN,{open:d,...m},e)};P$.displayName="Sheet";const C$=t.forwardRef(({children:e,...r},n)=>t.createElement(fN,{...r,ref:n},e));C$.displayName="SheetTrigger";const T$=gN;T$.displayName="SheetClose";const N$=({children:e,...r})=>t.createElement(dN,{...r},t.createElement(PR,{mode:"wait"},e));N$.displayName="SheetPortal";const M$=t.forwardRef(({className:e,...r},n)=>t.createElement(mN,{asChild:!0,...r,ref:n},t.createElement(k$.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeInOut"},className:Ye("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",e)})));M$.displayName=mN.displayName;const A$=t.forwardRef(({side:e=j$,className:r,children:n,overlay:o=!0,fullWidth:i=!1,fullHeight:a=!0,...l},s)=>{const c=S$[e]?e:j$,u=(e=>{const t={left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}},top:{initial:{y:"-100%"},animate:{y:0},exit:{y:"-100%"}},bottom:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}}};return t[e]||t.right})(c);return t.createElement(N$,null,o&&t.createElement(M$,null),t.createElement(hN,{asChild:!0,ref:s,...l},t.createElement(k$.div,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{type:"spring",damping:30,stiffness:300,mass:.8},className:Ye("fixed z-50 bg-background shadow-lg",a?"h-full":"h-auto",i?"w-full":"w-3/4 max-w-md","left"===c&&"inset-y-0 left-0 border-r","right"===c&&"inset-y-0 right-0 border-l","top"===c&&"inset-x-0 top-0 border-b","bottom"===c&&"inset-x-0 bottom-0 border-t",r)},t.createElement("div",{className:"relative h-full p-6 flex flex-col gap-4"},t.createElement(gN,{className:"absolute right-2 top-2 rounded-sm opacity-70 ring-offset-background transition-all duration-200 hover:opacity-100 hover:scale-110 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},t.createElement(ht,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close")),n))))});A$.displayName=hN.displayName;const z$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:Ye("flex flex-col space-y-2 text-center sm:text-left pr-8",e),...n},r));z$.displayName="SheetHeader";const L$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:Ye("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto",e),...n},r));L$.displayName="SheetFooter";const D$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement(yN,{ref:o,className:Ye("text-lg font-semibold text-foreground",e),...n},r));D$.displayName=yN.displayName;const _$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement(vN,{ref:o,className:Ye("text-sm text-muted-foreground",e),...n},r));_$.displayName=vN.displayName;t.forwardRef(({side:e=j$,overlay:r=!0,showFooter:n=!1,title:o,description:i,buttonText:a="Close",children:l,className:s,contentProps:c,fullWidth:u,fullHeight:p,...f},d)=>{const m=S$[e]?e:j$;return t.createElement(P$,{...f},t.createElement(A$,{side:m,overlay:r,className:s,fullWidth:u,fullHeight:p,...c},t.createElement("div",{ref:d,className:"flex flex-col h-full"},(o||i)&&t.createElement(z$,null,o&&t.createElement(D$,null,o),i&&t.createElement(_$,null,i)),t.createElement("div",{className:"flex-1 py-4"},l),n&&t.createElement(L$,null,t.createElement(T$,{className:"px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors duration-200"},a)))))}).displayName="SheetDrawer";const I$=yz,R$=vz,B$=e.forwardRef(({className:t,align:r="center",sideOffset:n=4,side:o="bottom",...i},a)=>e.createElement(gz,null,e.createElement(bz,{ref:a,align:r,sideOffset:n,side:o,className:Ye("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i})));B$.displayName=bz.displayName;const W$=["top","right","bottom","left"],F$=["start","center","end"],$$="bottom",V$="center",H$=4,U$=150,q$={DEFAULT:"default",FORM:"form"};function Y$(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function X$(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:Y$(n)&&Y$(o)?X$(n,o):n===o})}function G$(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function K$(e){return"number"==typeof e}function Z$(e){return"string"==typeof e}function J$(e){return"boolean"==typeof e}function Q$(e){return"[object Object]"===Object.prototype.toString.call(e)}function eV(e){return Math.abs(e)}function tV(e){return Math.sign(e)}function rV(e,t){return eV(e-t)}function nV(e){return sV(e).map(Number)}function oV(e){return e[iV(e)]}function iV(e){return Math.max(0,e.length-1)}function aV(e,t){return t===iV(e)}function lV(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function sV(e){return Object.keys(e)}function cV(e,t){return[e,t].reduce((e,t)=>(sV(t).forEach(r=>{const n=e[r],o=t[r],i=Q$(n)&&Q$(o);e[r]=i?cV(n,o):o}),e),{})}function uV(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function pV(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function fV(e,t,r,n){const o=pV(),i=1e3/60;let a=null,l=0,s=0;function c(e){if(!s)return;a||(a=e,r(),r());const o=e-a;for(a=e,l+=o;l>=i;)r(),l-=i;n(l/i),s&&(s=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(s),a=null,l=0,s=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(a=null,l=0)})},destroy:function(){u(),o.clear()},start:function(){s||(s=t.requestAnimationFrame(c))},stop:u,update:r,render:n}}function dV(e=0,t=0){const r=eV(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function mV(e,t,r){const{constrain:n}=dV(0,e),o=e+1;let i=a(t);function a(e){return r?eV((o+e)%o):n(e)}function l(){return i}function s(){return mV(e,l(),r)}const c={get:l,set:function(e){return i=a(e),c},add:function(e){return s().set(l()+e)},clone:s};return c}function hV(e,t,r,n,o,i,a,l,s,c,u,p,f,d,m,h,y,v,g){const{cross:b,direction:w}=e,x=["INPUT","SELECT","TEXTAREA"],O={passive:!1},E=pV(),k=pV(),j=dV(50,225).constrain(d.measure(20)),S={mouse:300,touch:400},P={mouse:500,touch:600},C=m?43:25;let T=!1,N=0,M=0,A=!1,z=!1,L=!1,D=!1;function _(e){if(!uV(e,n)&&e.touches.length>=2)return I(e);const t=i.readPoint(e),r=i.readPoint(e,b),a=rV(t,N),s=rV(r,M);if(!z&&!D){if(!e.cancelable)return I(e);if(z=a>s,!z)return I(e)}const u=i.pointerMove(e);a>h&&(L=!0),c.useFriction(.3).useDuration(.75),l.start(),o.add(w(u)),e.preventDefault()}function I(e){const t=u.byDistance(0,!1).index!==p.get(),r=i.pointerUp(e)*(m?P:S)[D?"mouse":"touch"],n=function(e,t){const r=p.add(-1*tV(e)),n=u.byDistance(e,!m).distance;return m||eV(e)<j?n:y&&t?.5*n:u.byIndex(r.get(),0).distance}(w(r),t),o=function(e,t){if(0===e||0===t)return 0;if(eV(e)<=eV(t))return 0;const r=rV(eV(e),eV(t));return eV(r/e)}(r,n),a=C-10*o,l=v+o/50;z=!1,A=!1,k.clear(),c.useDuration(a).useFriction(l),s.distance(n,!m),D=!1,f.emit("pointerUp")}function R(e){L&&(e.stopPropagation(),e.preventDefault(),L=!1)}return{init:function(e){if(!g)return;function l(l){(J$(g)||g(e,l))&&function(e){const l=uV(e,n);if(D=l,L=m&&l&&!e.buttons&&T,T=rV(o.get(),a.get())>=2,l&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;A=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=D?r:t;k.add(e,"touchmove",_,O).add(e,"touchend",I).add(e,"mousemove",_,O).add(e,"mouseup",I)}(),N=i.readPoint(e),M=i.readPoint(e,b),f.emit("pointerDown")}(l)}const s=t;E.add(s,"dragstart",e=>e.preventDefault(),O).add(s,"touchmove",()=>{},O).add(s,"touchend",()=>{}).add(s,"touchstart",l).add(s,"mousedown",l).add(s,"touchcancel",I).add(s,"contextmenu",I).add(s,"click",R,!0)},destroy:function(){E.clear(),k.clear()},pointerDown:function(){return A}}}function yV(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(uV(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),l=o(e)-o(n)>170,s=t/a;return a&&!l&&eV(s)>.1?s:0},readPoint:i}}function vV(e,t,r,n,o,i,a){const l=[e].concat(n);let s,c,u=[],p=!1;function f(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=f(e),u=n.map(f),s=new ResizeObserver(r=>{(J$(i)||i(o,r))&&function(r){for(const i of r){if(p)return;const r=i.target===e,a=n.indexOf(i.target),l=r?c:u[a];if(eV(f(r?e:n[a])-l)>=.5){o.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>{l.forEach(e=>s.observe(e))}))},destroy:function(){p=!0,s&&s.disconnect()}}}function gV(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),l=dV(.1,.99);let s=!1;function c(){return!s&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const s=e.reachedMin(t.get())?"min":"max",u=eV(e[s]-t.get()),p=r.get()-t.get(),f=l.constrain(u/a);r.subtract(p*f),!o&&eV(p)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){s=!e}}}function bV(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=dV(o,i);return{loop:function(t){if(!function(e){return 1===e?l(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach(e=>e.add(o))}}}function wV(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:l}=n;function s(e){return e.concat().sort((e,t)=>eV(e)-eV(t))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return s(o);const i=o.filter(e=>tV(e)===n);return i.length?s(i):oV(o)-r}const u={byDistance:function(r,n){const s=o.get()+r,{index:u,distance:p}=function(r){const n=e?a(r):l(r),o=t.map((e,t)=>({diff:c(e-n,0),index:t})).sort((e,t)=>eV(e.diff)-eV(t.diff)),{index:i}=o[0];return{index:i,distance:n}}(s),f=!e&&i(s);return!n||f?{index:u,distance:r}:{index:u,distance:r+c(t[u]-p,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return u}function xV(e,t,r,n,o,i,a,l){const s={passive:!0,capture:!0};let c=0;function u(e){"Tab"===e.code&&(c=(new Date).getTime())}const p={init:function(p){l&&(i.add(document,"keydown",u,!1),t.forEach((t,u)=>{i.add(t,"focus",t=>{(J$(l)||l(p,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex(e=>e.includes(t));K$(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(u)},s)}))}};return p}function OV(e){let t=e;function r(e){return K$(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function EV(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(l=e.direction(t),Math.round(100*l)/100);var l;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function kV(e,t,r,n,o,i,a,l,s){const c=nV(o),u=nV(o).reverse(),p=function(){const e=a[0];return m(d(u,e),r,!1)}().concat(function(){const e=t-a[0]-1;return m(d(c,e),-r,!0)}());function f(e,t){return e.reduce((e,t)=>e-o[t],t)}function d(e,t){return e.reduce((e,r)=>f(e,t)>0?e.concat([r]):e,[])}function m(o,a,c){const u=function(e){return i.map((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e}))}(a);return o.map(t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=u[t][i];return{index:t,loopPoint:a,slideLocation:OV(-1),translate:EV(e,s[t]),target:()=>l.get()>a?n:o}})}const h={canLoop:function(){return p.every(({index:e})=>f(c.filter(t=>t!==e),t)<=.1)},clear:function(){p.forEach(e=>e.translate.clear())},loop:function(){p.forEach(e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))})},loopPoints:p};return h}function jV(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver(e=>{o||(J$(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)}),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function SV(e,t,r,n){const o={};let i,a=null,l=null,s=!1;const c={init:function(){i=new IntersectionObserver(e=>{s||(e.forEach(e=>{const r=t.indexOf(e.target);o[r]=e}),a=null,l=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),s=!0},get:function(e=!0){if(e&&a)return a;if(!e&&l)return l;const t=function(e){return sV(o).reduce((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t},[])}(e);return e&&(a=t),e||(l=t),t}};return c}function PV(e,t,r,n,o,i,a,l,s){const{startEdge:c,endEdge:u,direction:p}=e,f=K$(r);const d={groupSlides:function(e){return f?function(e,t){return nV(e).filter(e=>e%t===0).map(r=>e.slice(r,r+t))}(e,r):function(e){return e.length?nV(e).reduce((r,f,d)=>{const m=oV(r)||0,h=0===m,y=f===iV(e),v=o[c]-i[m][c],g=o[c]-i[f][u],b=!n&&h?p(a):0,w=eV(g-(!n&&y?p(l):0)-(v+b));return d&&w>t+s&&r.push(f),y&&r.push(e.length),r},[]).map((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)}):[]}(e)}};return d}function CV(e,t,r,n,o,i,a){const{align:l,axis:s,direction:c,startIndex:u,loop:p,duration:f,dragFree:d,dragThreshold:m,inViewThreshold:h,slidesToScroll:y,skipSnaps:v,containScroll:g,watchResize:b,watchSlides:w,watchDrag:x,watchFocus:O}=i,E={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},k=E.measure(t),j=r.map(E.measure),S=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(s,c),P=S.measureSize(k),C=function(e){return{measure:function(t){return e*(t/100)}}}(P),T=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return Z$(e)?r[e](n):e(t,n,o)}};return o}(l,P),N=!p&&!!g,M=p||!!g,{slideSizes:A,slideSizesWithGaps:z,startGap:L,endGap:D}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:l,endEdge:s}=e,c=r[0]&&o,u=function(){if(!c)return 0;const e=r[0];return eV(t[l]-e[l])}(),p=function(){if(!c)return 0;const e=i.getComputedStyle(oV(n));return parseFloat(e.getPropertyValue(`margin-${s}`))}(),f=r.map(a),d=r.map((e,t,r)=>{const n=!t,o=aV(r,t);return n?f[t]+u:o?f[t]+p:r[t+1][l]-e[l]}).map(eV);return{slideSizes:f,slideSizesWithGaps:d,startGap:u,endGap:p}}(S,k,j,r,M,o),_=PV(S,P,y,p,k,j,L,D,2),{snaps:I,snapsAligned:R}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:l}=o,s=l(n).map(e=>oV(e)[a]-e[0][i]).map(eV).map(t.measure),c=n.map(e=>r[i]-e[i]).map(e=>-eV(e)),u=l(c).map(e=>e[0]).map((e,t)=>e+s[t]);return{snaps:c,snapsAligned:u}}(S,T,k,j,_),B=-oV(I)+oV(z),{snapsContained:W,scrollContainLimit:F}=function(e,t,r,n,o){const i=dV(-t+e,0),a=r.map((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),l=!t,s=aV(r,t);return l?o:s||c(n,a)?n:c(o,a)?o:a}).map(e=>parseFloat(e.toFixed(3))),l=function(){const e=a[0],t=oV(a);return dV(a.lastIndexOf(e),a.indexOf(t)+1)}(),s=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:s}=l;return a.slice(r,s)}();function c(e,t){return rV(e,t)<=1}return{snapsContained:s,scrollContainLimit:l}}(P,B,R,g,2),$=N?W:R,{limit:V}=function(e,t,r){const n=t[0];return{limit:dV(r?n-e:oV(t),n)}}(B,$,p),H=mV(iV($),u,p),U=H.clone(),q=nV(r),Y=fV(n,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(le),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:l,animation:s,eventHandler:c,scrollBounds:u,options:{loop:p}},f)=>{const d=e.settled(),m=!u.shouldConstrain(),h=p?d:d&&m,y=h&&!l.pointerDown();y&&s.stop();const v=r.get()*f+o.get()*(1-f);n.set(v),p&&(i.loop(e.direction()),a.loop()),t.to(n.get()),y&&c.emit("settle"),h||c.emit("scroll")})(le,e)),X=$[H.get()],G=OV(X),K=OV(X),Z=OV(X),J=OV(X),Q=function(e,t,r,n,o,i){let a=0,l=0,s=o,c=i,u=e.get(),p=0;function f(e){return s=e,m}function d(e){return c=e,m}const m={direction:function(){return l},duration:function(){return s},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return s?(r.set(e),a+=t/s,a*=c,u+=a,e.add(a),o=u-p):(a=0,r.set(n),e.set(n),o=t),l=tV(o),p=u,m},settled:function(){return eV(n.get()-t.get())<.001},useBaseFriction:function(){return d(i)},useBaseDuration:function(){return f(o)},useFriction:d,useDuration:f};return m}(G,Z,K,J,f,.68),ee=wV(p,$,B,V,J),te=function(e,t,r,n,o,i,a){function l(o){const l=o.distance,s=o.index!==t.get();i.add(l),l&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),s&&(r.set(t.get()),t.set(o.index),a.emit("select"))}return{distance:function(e,t){l(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);l(o.byIndex(n.get(),r))}}}(Y,H,U,Q,ee,J,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}(V),ne=pV(),oe=SV(t,r,a,h),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:l,max:s}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(l,s).map((e,t,r)=>{const n=!t,o=aV(r,t);return n?lV(oV(r[0])+1):o?lV(iV(i)-oV(r)[0]+1,oV(r)[0]):e})}();return{slideRegistry:c}}(N,g,$,F,_,q),ae=xV(e,r,ie,te,Q,ne,a,O),le={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:j,animation:Y,axis:S,dragHandler:hV(S,e,n,o,J,yV(S,o),G,Y,te,Q,ee,H,a,C,d,m,v,.68,x),eventStore:ne,percentOfView:C,index:H,indexPrevious:U,limit:V,location:G,offsetLocation:Z,previousLocation:K,options:i,resizeHandler:vV(t,a,o,r,S,b,E),scrollBody:Q,scrollBounds:gV(V,Z,J,Q,C),scrollLooper:bV(B,V,Z,[G,Z,K,J]),scrollProgress:re,scrollSnapList:$.map(re.get),scrollSnaps:$,scrollTarget:ee,scrollTo:te,slideLooper:kV(S,P,B,A,z,I,$,Z,r),slideFocus:ae,slidesHandler:jV(t,a,w),slidesInView:oe,slideIndexes:q,slideRegistry:ie,slidesToScroll:_,target:J,translate:EV(S,t)};return le}const TV={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function NV(e){function t(e,t){return cV(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=sV(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,o)},optionsMediaQueries:function(t){return t.map(e=>sV(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return r}function MV(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=NV(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(r,e)),n.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return r}(i),l=pV(),s=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach(r=>r(e,t)),n},off:function(e,o){return t[e]=r(e).filter(e=>e!==o),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:p}=i,{on:f,off:d,emit:m}=s,h=S;let y,v,g,b,w=!1,x=c(TV,MV.globalOptions),O=c(x),E=[];function k(t){const r=CV(e,g,b,n,o,t,s);if(t.loop&&!r.slideLooper.canLoop()){return k(Object.assign({},t,{loop:!1}))}return r}function j(t,r){w||(x=c(x,t),O=u(x),E=r||E,function(){const{container:t,slides:r}=O,n=Z$(t)?e.querySelector(t):t;g=n||e.children[0];const o=Z$(r)?g.querySelectorAll(r):r;b=[].slice.call(o||g.children)}(),y=k(O),p([x,...E.map(({options:e})=>e)]).forEach(e=>l.add(e,"change",S)),O.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(N),y.eventHandler.init(N),y.resizeHandler.init(N),y.slidesHandler.init(N),y.options.loop&&y.slideLooper.loop(),g.offsetParent&&b.length&&y.dragHandler.init(N),v=a.init(N,E)))}function S(e,t){const r=T();P(),j(c({startIndex:r},e),t),s.emit("reInit")}function P(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),a.destroy(),l.clear()}function C(e,t,r){O.active&&!w&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:O.duration),y.scrollTo.index(e,r||0))}function T(){return y.index.get()}const N={canScrollNext:function(){return y.index.add(1).get()!==T()},canScrollPrev:function(){return y.index.add(-1).get()!==T()},containerNode:function(){return g},internalEngine:function(){return y},destroy:function(){w||(w=!0,l.clear(),P(),s.emit("destroy"),s.clear())},off:d,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:h,rootNode:function(){return e},scrollNext:function(e){C(y.index.add(1).get(),e,-1)},scrollPrev:function(e){C(y.index.add(-1).get(),e,1)},scrollProgress:function(){return y.scrollProgress.get(y.offsetLocation.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:C,selectedScrollSnap:T,slideNodes:function(){return b},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return j(t,r),setTimeout(()=>s.emit("init"),0),N}function AV(e={},t=[]){const r=c(e),n=c(t),[o,l]=i(),[u,p]=i(),f=s(()=>{o&&o.reInit(r.current,n.current)},[o]);return a(()=>{X$(r.current,e)||(r.current=e,f())},[e,f]),a(()=>{(function(e,t){if(e.length!==t.length)return!1;const r=G$(e),n=G$(t);return r.every((e,t)=>X$(e,n[t]))})(n.current,t)||(n.current=t,f())},[t,f]),a(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&u){MV.globalOptions=AV.globalOptions;const e=MV(u,r.current,n.current);return l(e),()=>e.destroy()}l(void 0)},[u,l]),[p,o]}MV.globalOptions=void 0,AV.globalOptions=void 0;const zV=5e3,LV=m(null),DV=r(({children:e,orientation:r="x",showArrows:n=!0,showDots:o=!0,autoPlay:c=!1,interval:u=zV,disabled:p=!1,onSlideChange:f,className:d,...m},h)=>{const y="y"===r,[v,g]=AV({loop:!0,align:"start",axis:y?"y":"x",dragFree:!1,slidesToScroll:1,containScroll:"keepSnaps"}),[b,x]=i(!0),[O,E]=i(!0),[k,j]=i(0),S=w.count(e),P=l(()=>({selectedIndex:k,scrollNext:()=>g?.scrollNext(),scrollPrev:()=>g?.scrollPrev(),canScrollNext:!O,canScrollPrev:!b,setSelectedIndex:e=>{g?.scrollTo(e)}}),[g,O,b,k]),C=s(e=>{j(e.selectedScrollSnap()),x(!e.canScrollPrev()),E(!e.canScrollNext()),f?.(e.selectedScrollSnap())},[f]);return a(()=>{g&&(C(g),g.on("select",()=>C(g)),g.on("reInit",()=>C(g)))},[g,C]),a(()=>{if(!g||!c)return;const e=setInterval(()=>{O?g.scrollTo(0):g.scrollNext()},u);return()=>clearInterval(e)},[g,c,u,O]),t.createElement(LV.Provider,{value:P},t.createElement("div",{ref:h,className:Ye("relative group",y?"h-96":"w-full",d),role:"region","aria-roledescription":"carousel",style:{perspective:"1000px",perspectiveOrigin:"center center",overflow:"hidden"},...m},t.createElement("div",{ref:v,className:Ye("overflow-hidden h-full","rounded-2xl"),style:{WebkitMaskImage:"-webkit-radial-gradient(white, black)",willChange:"transform",transformStyle:"preserve-3d"}},t.createElement("div",{className:Ye("flex will-change-transform h-full",y?"flex-col":"flex-row")},w.map(e,(e,r)=>t.createElement("div",{className:Ye("transform transition-all duration-700 ease-out",y?"min-h-0 h-full w-full flex-[0_0_100%]":"min-w-0 w-full flex-[0_0_100%]",r===k?"scale-100 rotate-0 translate-z-0 opacity-100":"scale-95 opacity-0 -translate-z-8"),key:r},e)))),t.createElement("div",{className:Ye("absolute z-20 bg-background/30 backdrop-blur-xl px-4 py-2 rounded-full text-sm font-medium text-foreground shadow-xl border border-primary/20 transition-all duration-500 hover:bg-background/50 overflow-hidden group-hover:scale-105",y?"top-4 right-1/2 translate-x-1/2":"bottom-6 right-6")},t.createElement("div",{className:"absolute inset-0 bg-linear-to-r from-primary/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),t.createElement("span",{className:"text-primary font-bold"},k+1),t.createElement("span",{className:"mx-1 opacity-50"},"/"),t.createElement("span",null,S)),n&&t.createElement(t.Fragment,null,t.createElement("div",{className:Ye("absolute z-10 transition-opacity duration-300",y?"right-4 top-4":"top-1/2 -translate-y-1/2 left-4 opacity-0 group-hover:opacity-100")},t.createElement(vt,{variant:"secondary",size:"small",className:Ye("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:p||b,onClick:()=>P.scrollPrev()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),y?t.createElement(lt,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(it,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Previous slide"))),t.createElement("div",{className:Ye("absolute z-10 transition-opacity duration-300",y?"right-4 bottom-4":"top-1/2 -translate-y-1/2 right-4 opacity-0 group-hover:opacity-100")},t.createElement(vt,{variant:"secondary",size:"small",className:Ye("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:p||O,onClick:()=>P.scrollNext()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),y?t.createElement(ot,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(at,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Next slide")))),o&&t.createElement("div",{className:Ye("absolute z-10",y?"right-4 top-1/2 -translate-y-1/2 flex flex-col gap-3 px-2 py-4 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20":"bottom-6 left-1/2 -translate-x-1/2 flex gap-3 px-4 py-2 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20")},w.map(e,(e,r)=>t.createElement("button",{key:r,type:"button",className:Ye("h-8 w-8 flex items-center justify-center transition-all duration-500 ease-out hover:scale-125",r===k?"scale-110":"opacity-60 hover:opacity-90"),disabled:p,onClick:()=>P.setSelectedIndex(r)},r===k?t.createElement("div",{className:"w-2 h-2 rounded-full bg-primary shadow-md shadow-primary/30 ring-4 ring-primary/20 transition-all duration-500"}):t.createElement("div",{className:"w-2 h-2 rounded-full bg-muted transition-all duration-500 hover:bg-primary/50"}),t.createElement("span",{className:"sr-only"},"Jump to slide ",r+1))))))});DV.displayName="Carousel";r(({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,role:"group","aria-roledescription":"slide",className:Ye("min-w-0 shrink-0 grow-0 basis-full h-full relative overflow-hidden rounded-xl backdrop-blur-lg transition-all duration-700 ease-out will-change-transform shadow-2xl",e),...n},t.createElement("div",{className:"absolute inset-0 bg-linear-to-br from-background/5 via-primary/5 to-background/5 opacity-80 mix-blend-overlay pointer-events-none"}),t.createElement("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 bg-linear-to-t from-primary/10 to-transparent transition-opacity duration-700 ease-out pointer-events-none"}),t.createElement("div",{className:"absolute top-0 right-0 w-24 h-24 -translate-y-8 translate-x-8 bg-primary/20 rounded-full blur-3xl pointer-events-none"}),t.createElement("div",{className:"absolute bottom-0 left-0 w-32 h-32 translate-y-16 -translate-x-16 bg-secondary/10 rounded-full blur-3xl pointer-events-none"}),r)).displayName="CarouselItem";var _V=Object.defineProperty,IV=Object.defineProperties,RV=Object.getOwnPropertyDescriptors,BV=Object.getOwnPropertySymbols,WV=Object.prototype.hasOwnProperty,FV=Object.prototype.propertyIsEnumerable,$V=(e,t,r)=>t in e?_V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var VV=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");var HV=e.createContext({}),UV=e.forwardRef((t,r)=>{var n,o,i,a,l,s=t,{value:c,onChange:u,maxLength:p,textAlign:f="left",pattern:d,placeholder:m,inputMode:h="numeric",onComplete:y,pushPasswordManagerStrategy:v="increase-width",pasteTransformer:g,containerClassName:b,noScriptCSSFallback:w=YV,render:x,children:O}=s,E=((e,t)=>{var r={};for(var n in e)WV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&BV)for(var n of BV(e))t.indexOf(n)<0&&FV.call(e,n)&&(r[n]=e[n]);return r})(s,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[k,j]=e.useState("string"==typeof E.defaultValue?E.defaultValue:""),S=null!=c?c:k,P=function(t){let r=e.useRef();return e.useEffect(()=>{r.current=t}),r.current}(S),C=e.useCallback(e=>{null==u||u(e),j(e)},[u]),T=e.useMemo(()=>d?"string"==typeof d?new RegExp(d):d:null,[d]),N=e.useRef(null),M=e.useRef(null),A=e.useRef({value:S,onChange:C,isIOS:"undefined"!=typeof window&&(null==(o=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:o.call(n,"-webkit-touch-callout","none"))}),z=e.useRef({prev:[null==(i=N.current)?void 0:i.selectionStart,null==(a=N.current)?void 0:a.selectionEnd,null==(l=N.current)?void 0:l.selectionDirection]});e.useImperativeHandle(r,()=>N.current,[]),e.useEffect(()=>{let e=N.current,t=M.current;if(!e||!t)return;function r(){if(document.activeElement!==e)return B(null),void F(null);let t,r=e.selectionStart,n=e.selectionEnd,o=e.selectionDirection,i=e.maxLength,a=e.value,l=z.current.prev,s=-1,c=-1;if(0!==a.length&&null!==r&&null!==n){let e=r===n,o=r===a.length&&a.length<i;if(e&&!o){let e=r;if(0===e)s=0,c=1,t="forward";else if(e===i)s=e-1,c=e,t="backward";else if(i>1&&a.length>1){let r=0;if(null!==l[0]&&null!==l[1]){t=e<l[1]?"backward":"forward";let n=l[0]===l[1]&&l[0]<i;"backward"===t&&!n&&(r=-1)}s=r+e,c=r+e+1}}-1!==s&&-1!==c&&s!==c&&N.current.setSelectionRange(s,c,t)}let u=-1!==s?s:r,p=-1!==c?c:n,f=null!=t?t:o;B(u),F(p),z.current.prev=[u,p,f]}if(A.current.value!==e.value&&A.current.onChange(e.value),z.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",r,{capture:!0}),r(),document.activeElement===e&&I(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";qV(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),qV(e.sheet,`[data-input-otp]:autofill { ${t} }`),qV(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),qV(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),qV(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let n=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};n();let o=new ResizeObserver(n);return o.observe(e),()=>{document.removeEventListener("selectionchange",r,{capture:!0}),o.disconnect()}},[]);let[L,D]=e.useState(!1),[_,I]=e.useState(!1),[R,B]=e.useState(null),[W,F]=e.useState(null);e.useEffect(()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}(()=>{var e,t,r,n;null==(e=N.current)||e.dispatchEvent(new Event("input"));let o=null==(t=N.current)?void 0:t.selectionStart,i=null==(r=N.current)?void 0:r.selectionEnd,a=null==(n=N.current)?void 0:n.selectionDirection;null!==o&&null!==i&&(B(o),F(i),z.current.prev=[o,i,a])})},[S,_]),e.useEffect(()=>{void 0!==P&&S!==P&&P.length<p&&S.length===p&&(null==y||y(S))},[p,y,P,S]);let $=function({containerRef:t,inputRef:r,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=e.useState(!1),[l,s]=e.useState(!1),[c,u]=e.useState(!1),p=e.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&i&&l,[i,l,n]),f=e.useCallback(()=>{let e=t.current,o=r.current;if(!e||!o||c||"none"===n)return;let i=e,l=i.getBoundingClientRect().left+i.offsetWidth-18,s=i.getBoundingClientRect().top+i.offsetHeight/2;0===document.querySelectorAll(VV).length&&document.elementFromPoint(l,s)===e||(a(!0),u(!0))},[t,r,c,n]);return e.useEffect(()=>{let e=t.current;if(!e||"none"===n)return;function r(){let t=window.innerWidth-e.getBoundingClientRect().right;s(t>=40)}r();let o=setInterval(r,1e3);return()=>{clearInterval(o)}},[t,n]),e.useEffect(()=>{let e=o||document.activeElement===r.current;if("none"===n||!e)return;let t=setTimeout(f,0),i=setTimeout(f,2e3),a=setTimeout(f,5e3),l=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(i),clearTimeout(a),clearTimeout(l)}},[r,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:p,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:M,inputRef:N,pushPasswordManagerStrategy:v,isFocused:_}),V=e.useCallback(e=>{let t=e.currentTarget.value.slice(0,p);t.length>0&&T&&!T.test(t)?e.preventDefault():("string"==typeof P&&t.length<P.length&&document.dispatchEvent(new Event("selectionchange")),C(t))},[p,C,P,T]),H=e.useCallback(()=>{var e;if(N.current){let t=Math.min(N.current.value.length,p-1),r=N.current.value.length;null==(e=N.current)||e.setSelectionRange(t,r),B(t),F(r)}I(!0)},[p]),U=e.useCallback(e=>{var t,r;let n=N.current;if(!(g||A.current.isIOS&&e.clipboardData&&n))return;let o=e.clipboardData.getData("text/plain"),i=g?g(o):o;e.preventDefault();let a=null==(t=N.current)?void 0:t.selectionStart,l=null==(r=N.current)?void 0:r.selectionEnd,s=(a!==l?S.slice(0,a)+i+S.slice(l):S.slice(0,a)+i+S.slice(a)).slice(0,p);if(s.length>0&&T&&!T.test(s))return;n.value=s,C(s);let c=Math.min(s.length,p-1),u=s.length;n.setSelectionRange(c,u),B(c),F(u)},[p,C,T,S]),q=e.useMemo(()=>({position:"relative",cursor:E.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[E.disabled]),Y=e.useMemo(()=>({position:"absolute",inset:0,width:$.willPushPWMBadge?`calc(100% + ${$.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:$.willPushPWMBadge?`inset(0 ${$.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:f,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[$.PWM_BADGE_SPACE_WIDTH,$.willPushPWMBadge,f]),X=e.useMemo(()=>e.createElement("input",((e,t)=>IV(e,RV(t)))(((e,t)=>{for(var r in t||(t={}))WV.call(t,r)&&$V(e,r,t[r]);if(BV)for(var r of BV(t))FV.call(t,r)&&$V(e,r,t[r]);return e})({autoComplete:E.autoComplete||"one-time-code"},E),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===S.length||void 0,"data-input-otp-mss":R,"data-input-otp-mse":W,inputMode:h,pattern:null==T?void 0:T.source,"aria-placeholder":m,style:Y,maxLength:p,value:S,ref:N,onPaste:e=>{var t;U(e),null==(t=E.onPaste)||t.call(E,e)},onChange:V,onMouseOver:e=>{var t;D(!0),null==(t=E.onMouseOver)||t.call(E,e)},onMouseLeave:e=>{var t;D(!1),null==(t=E.onMouseLeave)||t.call(E,e)},onFocus:e=>{var t;H(),null==(t=E.onFocus)||t.call(E,e)},onBlur:e=>{var t;I(!1),null==(t=E.onBlur)||t.call(E,e)}})),[V,H,U,h,Y,p,W,R,E,null==T?void 0:T.source,S]),G=e.useMemo(()=>({slots:Array.from({length:p}).map((e,t)=>{var r;let n=_&&null!==R&&null!==W&&(R===W&&t===R||t>=R&&t<W),o=void 0!==S[t]?S[t]:null;return{char:o,placeholderChar:void 0!==S[0]?null:null!=(r=null==m?void 0:m[t])?r:null,isActive:n,hasFakeCaret:n&&null===o}}),isFocused:_,isHovering:!E.disabled&&L}),[_,L,p,W,R,E.disabled,S]),K=e.useMemo(()=>x?x(G):e.createElement(HV.Provider,{value:G},O),[O,G,x]);return e.createElement(e.Fragment,null,null!==w&&e.createElement("noscript",null,e.createElement("style",null,w)),e.createElement("div",{ref:M,"data-input-otp-container":!0,style:q,className:b},K,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},X)))});function qV(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}UV.displayName="Input";var YV="\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}";const XV=e.forwardRef(({className:t,containerClassName:r,...n},o)=>e.createElement(UV,{ref:o,containerClassName:Ye("flex items-center gap-2 has-disabled:opacity-50",r),className:Ye("disabled:cursor-not-allowed",t),...n}));XV.displayName="InputOTP";const GV=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("flex items-center",t),...r}));GV.displayName="InputOTPGroup";const KV=e.forwardRef(({index:t,className:r,...n},o)=>{const i=e.useContext(HV),{char:a,hasFakeCaret:l,isActive:s}=i.slots[t];return e.createElement("div",{ref:o,className:Ye("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all first:rounded-l-md first:border-l last:rounded-r-md",s&&"z-10 ring-1 ring-ring",r),...n},a,l&&e.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center"},e.createElement("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})))});KV.displayName="InputOTPSlot";e.forwardRef(({...t},r)=>e.createElement("div",{ref:r,role:"separator",...t},e.createElement(zk,null))).displayName="InputOTPSeparator";const ZV=({value:e,maxLength:r=6,onChange:n,disabled:o=!1,isError:i=!1,placeholder:a="○",className:l})=>t.createElement(XV,{value:e,maxLength:r,onChange:n,disabled:o,className:l},t.createElement("div",{"aria-disabled":o},t.createElement(GV,{role:"group",className:Ye("gap-2",i&&"input-error")},Array.from({length:r}).map((r,n)=>t.createElement("div",{key:n,role:"textbox","data-value":e?.[n]||""},t.createElement(KV,{index:n,className:Ye("rounded-md border",i&&"border-destructive focus:ring-destructive")},e?.[n]||a))))));ZV.displayName="OTPInput";var JV=Symbol("radix.slottable");var QV="AlertDialog",[eH]=Lg(QV,[LT]),tH=LT(),rH=e=>{const{__scopeAlertDialog:t,...r}=e,n=tH(t);return k(pN,{...n,...r,modal:!0})};rH.displayName=QV;var nH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(fN,{...o,...n,ref:t})});nH.displayName="AlertDialogTrigger";var oH=e=>{const{__scopeAlertDialog:t,...r}=e,n=tH(t);return k(dN,{...n,...r})};oH.displayName="AlertDialogPortal";var iH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(mN,{...o,...n,ref:t})});iH.displayName="AlertDialogOverlay";var aH="AlertDialogContent",[lH,sH]=eH(aH),cH=function(e){const t=({children:e})=>k(S,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=JV,t}("AlertDialogContent"),uH=e.forwardRef((t,r)=>{const{__scopeAlertDialog:n,children:o,...i}=t,a=tH(n),l=e.useRef(null),s=zg(r,l),c=e.useRef(null);return k(lN,{contentName:aH,titleName:pH,docsSlug:"alert-dialog",children:k(lH,{scope:n,cancelRef:c,children:j(hN,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:Ng(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[k(cH,{children:o}),k(gH,{contentRef:l})]})})})});uH.displayName=aH;var pH="AlertDialogTitle",fH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(yN,{...o,...n,ref:t})});fH.displayName=pH;var dH="AlertDialogDescription",mH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(vN,{...o,...n,ref:t})});mH.displayName=dH;var hH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(gN,{...o,...n,ref:t})});hH.displayName="AlertDialogAction";var yH="AlertDialogCancel",vH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=sH(yH,r),i=tH(r),a=zg(t,o);return k(gN,{...i,...n,ref:a})});vH.displayName=yH;var gH=({contentRef:t})=>{const r=`\`${aH}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${aH}\` by passing a \`${dH}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${aH}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return e.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(r)},[r,t]),null},bH=iH,wH=uH,xH=hH,OH=vH,EH=fH,kH=mH;const jH=rH,SH=nH,PH=oH,CH=e.forwardRef(({className:t,...r},n)=>e.createElement(bH,{className:Ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r,ref:n}));CH.displayName=bH.displayName;const TH=e.forwardRef(({className:t,...r},n)=>e.createElement(PH,null,e.createElement(CH,null),e.createElement(wH,{ref:n,className:Ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...r})));TH.displayName=wH.displayName;const NH=({className:t,...r})=>e.createElement("div",{className:Ye("flex flex-col space-y-2 text-center sm:text-left",t),...r});NH.displayName="AlertDialogHeader";const MH=({className:t,...r})=>e.createElement("div",{className:Ye("space-x-3 text-right",t),...r});MH.displayName="AlertDialogFooter";const AH=e.forwardRef(({className:t,...r},n)=>e.createElement(EH,{ref:n,className:Ye("text-lg font-semibold",t),...r}));AH.displayName=EH.displayName;const zH=e.forwardRef(({className:t,...r},n)=>e.createElement(kH,{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));zH.displayName=kH.displayName;const LH=e.forwardRef(({className:t,...r},n)=>e.createElement(xH,{ref:n,className:Ye(LP(),t),...r}));LH.displayName=xH.displayName;const DH=e.forwardRef(({className:t,...r},n)=>e.createElement(OH,{ref:n,className:Ye(LP({variant:"outline"}),"mt-2 sm:mt-0",t),...r}));DH.displayName=OH.displayName;const _H={CANCEL_TEXT:"Cancel",VARIANT:"default",DISABLED:!1},IH=({title:e,description:r,trigger:n,action:o,cancel:i=_H.CANCEL_TEXT,onAction:a,onCancel:l,variant:s=_H.VARIANT,disabled:c=_H.DISABLED,open:u,onOpenChange:p})=>t.createElement(jH,{open:u,onOpenChange:p},!u&&t.createElement(SH,{asChild:!0},"string"==typeof n?t.createElement(vt,{variant:"secondary",disabled:c},n):n),t.createElement(TH,null,t.createElement(NH,null,t.createElement(AH,null,e),t.createElement(zH,null,r)),t.createElement(MH,null,t.createElement(DH,{onClick:l,className:Ye("destructive"===s&&"border-destructive/50")},i),t.createElement(LH,{onClick:a,className:Ye("destructive"===s&&"bg-destructive hover:bg-destructive/90")},o)))),RH=!1,BH="chevron",WH="right",FH="",$H="",VH="",HH=300,UH=({title:e,children:r,defaultOpen:n=RH,icon:o=BH,iconPosition:a=WH,className:l=FH,headerClassName:c=$H,contentClassName:u=VH,animationDuration:p=HH,onToggle:f})=>{const[d,m]=i(n),h=s(()=>{const e=!d;m(e),f&&f(e)},[d,f]),y=s(()=>"chevron"===o?d?t.createElement(lt,{size:20}):t.createElement(ot,{size:20}):null,[o,d]);return t.createElement("div",{className:`collapsible-container border rounded-md overflow-hidden bg-card ${l}`,"data-state":d?"open":"closed"},t.createElement("button",{type:"button",onClick:h,className:`flex items-center justify-between w-full p-4 text-left font-medium transition-all bg-card hover:bg-accent hover:text-accent-foreground ${c}`,"aria-expanded":d},"left"===a&&y(),t.createElement("span",{className:"flex-1"},e),"right"===a&&y()),t.createElement("div",{className:`overflow-hidden transition-all ${u}`,style:{maxHeight:d?"1000px":"0px",opacity:d?1:0,transitionDuration:`${p}ms`}},t.createElement("div",{className:"p-4 border-t bg-card"},r)))},qH={simple:{title:"Click to expand",content:t.createElement(()=>t.createElement("div",null,"This is a simple collapsible content area."),null)},complex:{title:"Product Information",content:t.createElement(()=>t.createElement("div",null,t.createElement("h3",{className:"text-lg font-semibold mb-2"},"Product Features"),t.createElement("ul",{className:"list-disc pl-5 mb-4"},t.createElement("li",null,"Feature one with detailed description"),t.createElement("li",null,"Feature two with even more details about functionality"),t.createElement("li",null,"Feature three with technical specifications")),t.createElement("p",{className:"text-sm text-muted-foreground"},"Additional information about the product can be found in the documentation.")),null)},faq:[{title:"How do I reset my password?",content:t.createElement(()=>t.createElement("div",null,'You can reset your password by clicking on the "Forgot Password" link on the login page and following the instructions sent to your email.'),null)},{title:"What payment methods do you accept?",content:t.createElement(()=>t.createElement("div",null,"We accept all major credit cards, PayPal, and bank transfers. For enterprise customers, we also offer invoicing options."),null)},{title:"Can I cancel my subscription?",content:t.createElement(()=>t.createElement("div",null,"Yes, you can cancel your subscription at any time from your account settings. Your access will continue until the end of your billing period."),null)}]},YH=e=>t.createElement("div",{className:"w-full max-w-3xl mx-auto p-6 rounded-lg border bg-card text-card-foreground shadow-sm"},t.createElement("h2",{className:"text-xl font-bold mb-4"},"Frequently Asked Questions"),qH.faq.map((r,n)=>t.createElement("div",{key:n,className:n>0?"mt-2":""},t.createElement(UH,{...e,title:r.title},r.content)))),XH="xsmall",GH="small",KH="medium",ZH="large",JH={xsmall:"max-w-xs",small:"max-w-sm",medium:"max-w-2xl",large:"max-w-4xl"},QH={[XH]:{containerPadding:"p-1.5",avatarSize:"w-8 h-8",nameTextSize:"text-sm",metaTextSize:"text-xs",chevronSize:"w-3 h-3"},[GH]:{containerPadding:"p-2",avatarSize:"w-10 h-10",nameTextSize:"text-base",metaTextSize:"text-sm",chevronSize:"w-4 h-4"},[KH]:{containerPadding:"p-3",avatarSize:"w-12 h-12",nameTextSize:"text-lg",metaTextSize:"text-sm",chevronSize:"w-4 h-4"},[ZH]:{containerPadding:"p-4",avatarSize:"w-14 h-14",nameTextSize:"text-xl",metaTextSize:"text-sm",chevronSize:"w-4 h-4"}},eU=({avatarUrl:e,name:r,email:n,position:o,dropdownItems:i=[],size:l=KH,className:u,isDropdownOpen:p=!1,onToggleDropdown:f})=>{const d=c(null),m=i.length,h=QH[l],{containerPadding:y,avatarSize:v,nameTextSize:g,metaTextSize:b,chevronSize:w}=h,x=s(e=>{"Enter"!==e.key&&" "!==e.key||!f||(e.preventDefault(),f())},[f]),O=s((e,t)=>{e.stopPropagation(),t.isDisabled?e.preventDefault():t.onClick&&(e.preventDefault(),t.onClick(),f&&f())},[f]);return a(()=>{const e=e=>{d.current&&!d.current.contains(e.target)&&p&&f&&f()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[p,f]),t.createElement("div",{ref:d,role:m>0?"button":void 0,tabIndex:m>0?0:void 0,onClick:m>0&&f?f:void 0,onKeyDown:m>0?x:void 0,"aria-expanded":m>0?p:void 0,"aria-haspopup":m>0?"menu":void 0,className:Ye("inline-block bg-card/95 text-card-foreground rounded-xl overflow-visible backdrop-blur-xs transition-all duration-300",m>0&&f&&"cursor-pointer",JH[l],u)},t.createElement("div",{className:Ye("flex items-center gap-3",y)},t.createElement("img",{src:e,alt:`${r} profile`,className:Ye("rounded-full border-2 border-background transition-transform duration-300","ring-1 ring-primary/10",v)}),t.createElement("div",null,t.createElement("h2",{className:Ye("font-semibold text-foreground",g)},r),o&&t.createElement("p",{className:Ye("text-muted-foreground",b)},o),n&&t.createElement("p",{className:Ye("text-muted-foreground mt-0.5",b)},n)),m>0&&f&&t.createElement("div",{className:"ml-auto"},t.createElement("div",{className:"p-1"},p?t.createElement(lt,{className:Ye("text-muted-foreground",w)}):t.createElement(ot,{className:Ye("text-muted-foreground",w)})))),p&&m>0&&t.createElement("div",{role:"menu",className:"absolute mt-1 w-full bg-card rounded-md border border-border/30 z-20 py-1 left-0"},i.map((e,r)=>t.createElement("a",{key:r,href:e.link,className:Ye("block",{"pointer-events-none":e.isDisabled}),onClick:t=>O(t,e)},t.createElement("div",{role:"menuitem",className:Ye("flex items-center px-4 py-2 text-sm",{"opacity-50":e.isDisabled,"cursor-pointer hover:bg-accent/50":!e.isDisabled})},e.icon&&t.createElement("span",{className:"mr-2"},e.icon),e.name)))))},tU="horizontal",rU="tab1",nU=!1,oU="100%";var iU;!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(iU||(iU={}));const aU=({items:e,defaultValue:r=rU,orientation:n=tU,disabled:o=nU,onValueChange:l,className:c,width:u=oU})=>{const[p,f]=i(r);a(()=>{if("undefined"!=typeof window){const t=new URLSearchParams(window.location.search).get("tab");t&&e.some(e=>e.value===t)&&(f(t),l?.(t))}},[e,l]);const d=s((e,t)=>{if("undefined"==typeof window)return"";const r=new URLSearchParams(window.location.search);return r.set(e,t),r.toString()},[]),m=s(e=>{if(f(e),"undefined"!=typeof window){const t=d("tab",e),r=`${window.location.pathname}?${t}`;window.history&&window.history.pushState&&window.history.pushState({path:r},"",r)}l&&l(e)},[l,d]),h="vertical"===n,y=e=>Ye("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200",h?"px-4 py-3 w-full justify-start text-left rounded-l-md":"px-5 py-2.5 relative",p===e.value?h?"bg-background/80 text-primary font-semibold shadow-xs backdrop-blur-xs":"text-primary font-semibold":h?"text-muted-foreground hover:text-foreground hover:bg-muted/30":"text-muted-foreground hover:text-foreground",(o||e.disabled)&&"opacity-40 pointer-events-none"),v=s(e=>{o||e.disabled||m(e.value)},[o,m]);return t.createElement("div",{className:Ye(h?"flex space-x-6":"space-y-4 flex flex-col items-center",c),style:{width:u}},t.createElement("div",{role:"tablist","aria-orientation":n,className:Ye("flex relative",h?"flex-col h-full space-y-1 min-w-[200px] border-r border-border/40 pr-2":"w-full justify-center pb-px")},t.createElement("div",{className:Ye("flex relative",h?"flex-col w-full":"border-b border-border/30")},e.map(e=>t.createElement("div",{key:e.value,className:Ye("relative",h?"":"border-b-2 border-transparent",p===e.value&&!h&&"border-b-2 border-primary z-10")},t.createElement("button",{role:"tab",type:"button","aria-selected":p===e.value,"aria-controls":`tabpanel-${e.value}`,tabIndex:p===e.value?0:-1,className:y(e),onClick:()=>v(e),disabled:o||e.disabled},e.label,p===e.value&&!h&&t.createElement("div",{className:"absolute bottom-0 left-0 h-0.5 w-full bg-primary rounded-full"})),p===e.value&&h&&t.createElement("div",{className:"absolute top-0 left-0 h-full w-0.5 bg-primary rounded-full"}))))),e.map(e=>t.createElement("div",{key:e.value,role:"tabpanel",id:`tabpanel-${e.value}`,"aria-labelledby":`tab-${e.value}`,hidden:p!==e.value,className:Ye("focus-visible:outline-hidden rounded-md",h?"flex-1":"w-full",p===e.value?"animate-in fade-in-0 duration-300":"hidden"),style:h?void 0:{width:u}},e.content)))},lU={small:{node:"w-4 h-4",innerDot:{active:"w-2 h-2",completed:"w-1.5 h-1.5",default:"w-1 h-1"},text:"text-sm",description:"text-xs",connectorTop:"top-2",connectorHeight:"h-10",spacing:"mb-6",marginRight:"mr-4",verticalConnector:{left:"left-[7px]",top:"top-[16px]",height:"h-[calc(100%-16px)]"}},medium:{node:"w-6 h-6",innerDot:{active:"w-3 h-3",completed:"w-2.5 h-2.5",default:"w-2 h-2"},text:"text-base",description:"text-sm",connectorTop:"top-3",connectorHeight:"h-14",spacing:"mb-8",marginRight:"mr-6",verticalConnector:{left:"left-[11px]",top:"top-[24px]",height:"h-[calc(100%-24px)]"}},large:{node:"w-8 h-8",innerDot:{active:"w-4 h-4",completed:"w-3.5 h-3.5",default:"w-3 h-3"},text:"text-lg",description:"text-base",connectorTop:"top-4",connectorHeight:"h-16",spacing:"mb-10",marginRight:"mr-8",verticalConnector:{left:"left-[15px]",top:"top-[32px]",height:"h-[calc(100%-32px)]"}}},sU=({steps:e,activeStep:r=0,orientation:n="horizontal",size:o="medium",className:i,onStepClick:a})=>{const l="horizontal"===n,s=lU[o];return t.createElement("div",{className:Ye("max-w-full mx-auto mb-4 px-8",i)},t.createElement("div",{className:Ye("flex relative p-0",l?"flex-row justify-between":"flex-col")},e.map((n,o)=>{const i=o===r,c=o<r,u=a?t.createElement("button",{type:"button",className:Ye("relative text-left w-full bg-transparent border-0 p-0 m-0",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),onClick:()=>a(o),"aria-current":i?"step":void 0},t.createElement("div",{className:Ye("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:Ye("rounded-full transition-all duration-300 ease-in-out",i?Ye(s.innerDot.active,"bg-primary"):c?Ye(s.innerDot.completed,"bg-primary-foreground"):Ye(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:Ye("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:`w-0.5 ${s.verticalConnector.left} ${s.verticalConnector.top} ${s.verticalConnector.height}`,c?"bg-primary":"bg-border")}),t.createElement("div",{className:Ye(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:Ye("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:Ye("text-muted-foreground mt-1",s.description)},n.description))):t.createElement("div",{className:Ye("relative",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),"aria-current":i?"step":void 0},t.createElement("div",{className:Ye("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:Ye("rounded-full transition-all duration-300 ease-in-out",i?Ye(s.innerDot.active,"bg-primary"):c?Ye(s.innerDot.completed,"bg-primary-foreground"):Ye(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:Ye("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:"w-0.5 left-[12px] top-[24px] h-[calc(100%-24px)]",c?"bg-primary":"bg-border")}),t.createElement("div",{className:Ye(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:Ye("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:Ye("text-muted-foreground mt-1",s.description)},n.description)));return t.createElement(t.Fragment,{key:n.id},u)})))},cU=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function uU(e,t,r){const n=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const r=t.split(".").pop().toLowerCase(),n=cU.get(r);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof n.path&&pU(n,"path",i),pU(n,"relativePath",i),n}function pU(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const fU=[".DS_Store","Thumbs.db"];function dU(e){return"object"==typeof e&&null!==e}function mU(e){return e.filter(e=>-1===fU.indexOf(e.name))}function hU(e){if(null===e)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function yU(e){if("function"!=typeof e.webkitGetAsEntry)return gU(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?wU(t):gU(e,t)}function vU(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?vU(t):[t]],[])}function gU(e,t){return _C(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,uU(e)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return uU(n,null!==(r=null==t?void 0:t.fullPath)&&void 0!==r?r:void 0)})}function bU(e){return _C(this,void 0,void 0,function*(){return e.isDirectory?wU(e):function(e){return _C(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(r=>{const n=uU(r,e.fullPath);t(n)},e=>{r(e)})})})}(e)})}function wU(e){const t=e.createReader();return new Promise((e,r)=>{const n=[];!function o(){t.readEntries(t=>_C(this,void 0,void 0,function*(){if(t.length){const e=Promise.all(t.map(bU));n.push(e),o()}else try{const t=yield Promise.all(n);e(t)}catch(e){r(e)}}),e=>{r(e)})}()})}var xU,OU={};var EU=bt((xU||(xU=1,OU.__esModule=!0,OU.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(0===r.length)return!0;var n=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return r.some(function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t})}return!0}),OU));function kU(e){return function(e){if(Array.isArray(e))return NU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||TU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function SU(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jU(Object(r),!0).forEach(function(t){PU(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function PU(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(e,t)||TU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TU(e,t){if(e){if("string"==typeof e)return NU(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?NU(e,t):void 0}}function NU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var MU="function"==typeof EU?EU:EU.default,AU=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},zU=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},LU=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},DU={code:"too-many-files",message:"Too many files"};function _U(e,t){var r="application/x-moz-file"===e.type||MU(e,t);return[r,r?null:AU(t)]}function IU(e,t,r){if(RU(e.size))if(RU(t)&&RU(r)){if(e.size>r)return[!1,zU(r)];if(e.size<t)return[!1,LU(t)]}else{if(RU(t)&&e.size<t)return[!1,LU(t)];if(RU(r)&&e.size>r)return[!1,zU(r)]}return[!0,null]}function RU(e){return null!=e}function BU(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function WU(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function FU(e){e.preventDefault()}function $U(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return t.some(function(t){return!BU(e)&&t&&t.apply(void 0,[e].concat(n)),BU(e)})}}function VU(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function HU(e){return/^.*\.[\w]+$/.test(e)}var UU=["children"],qU=["open"],YU=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],XU=["refKey","onChange","onClick"];function GU(e){return function(e){if(Array.isArray(e))return JU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ZU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(e,t)||ZU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZU(e,t){if(e){if("string"==typeof e)return JU(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?JU(e,t):void 0}}function JU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?QU(Object(r),!0).forEach(function(t){tq(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tq(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rq(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var nq=r(function(e,r){var n=e.children,o=aq(rq(e,UU)),i=o.open,a=rq(o,qU);return d(r,function(){return{open:i}},[i]),t.createElement(y,null,n(eq(eq({},a),{},{open:i})))});nq.displayName="Dropzone";var oq={disabled:!1,getFilesFromEvent:function(e){return _C(this,void 0,void 0,function*(){return dU(e)&&dU(e.dataTransfer)?function(e,t){return _C(this,void 0,void 0,function*(){if(e.items){const r=hU(e.items).filter(e=>"file"===e.kind);if("drop"!==t)return r;return mU(vU(yield Promise.all(r.map(yU))))}return mU(hU(e.files).map(e=>uU(e)))})}(e.dataTransfer,e.type):function(e){return dU(e)&&dU(e.target)}(e)?function(e){return hU(e.target.files).map(e=>uU(e))}(e):Array.isArray(e)&&e.every(e=>"getFile"in e&&"function"==typeof e.getFile)?function(e){return _C(this,void 0,void 0,function*(){return(yield Promise.all(e.map(e=>e.getFile()))).map(e=>uU(e))})}(e):[]})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};nq.defaultProps=oq,nq.propTypes={children:Xt.func,accept:Xt.objectOf(Xt.arrayOf(Xt.string)),multiple:Xt.bool,preventDropOnDocument:Xt.bool,noClick:Xt.bool,noKeyboard:Xt.bool,noDrag:Xt.bool,noDragEventsBubbling:Xt.bool,minSize:Xt.number,maxSize:Xt.number,maxFiles:Xt.number,disabled:Xt.bool,getFilesFromEvent:Xt.func,onFileDialogCancel:Xt.func,onFileDialogOpen:Xt.func,useFsAccessApi:Xt.bool,autoFocus:Xt.bool,onDragEnter:Xt.func,onDragLeave:Xt.func,onDragOver:Xt.func,onDrop:Xt.func,onDropAccepted:Xt.func,onDropRejected:Xt.func,onError:Xt.func,validator:Xt.func};var iq={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function aq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=eq(eq({},oq),e),r=t.accept,n=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,u=t.minSize,p=t.multiple,f=t.maxFiles,d=t.onDragEnter,m=t.onDragLeave,h=t.onDragOver,y=t.onDrop,v=t.onDropAccepted,g=t.onDropRejected,b=t.onFileDialogCancel,w=t.onFileDialogOpen,x=t.useFsAccessApi,E=t.autoFocus,k=t.preventDropOnDocument,j=t.noClick,S=t.noKeyboard,P=t.noDrag,C=t.noDragEventsBubbling,T=t.onError,N=t.validator,M=l(function(){return function(e){if(RU(e))return Object.entries(e).reduce(function(e,t){var r=CU(t,2),n=r[0],o=r[1];return[].concat(kU(e),[n],kU(o))},[]).filter(function(e){return VU(e)||HU(e)}).join(",")}(r)},[r]),A=l(function(){return function(e){return RU(e)?[{description:"Files",accept:Object.entries(e).filter(function(e){var t=CU(e,2),r=t[0],n=t[1],o=!0;return VU(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(n)&&n.every(HU)||(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(e,t){var r=CU(t,2),n=r[0],o=r[1];return SU(SU({},e),{},PU({},n,o))},{})}]:e}(r)},[r]),z=l(function(){return"function"==typeof w?w:sq},[w]),L=l(function(){return"function"==typeof b?b:sq},[b]),D=c(null),_=c(null),I=KU(O(lq,iq),2),R=I[0],B=I[1],W=R.isFocused,F=R.isFileDialogActive,$=c("undefined"!=typeof window&&window.isSecureContext&&x&&"showOpenFilePicker"in window),V=function(){!$.current&&F&&setTimeout(function(){_.current&&(_.current.files.length||(B({type:"closeDialog"}),L()))},300)};a(function(){return window.addEventListener("focus",V,!1),function(){window.removeEventListener("focus",V,!1)}},[_,F,L,$]);var H=c([]),U=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),H.current=[])};a(function(){return k&&(document.addEventListener("dragover",FU,!1),document.addEventListener("drop",U,!1)),function(){k&&(document.removeEventListener("dragover",FU),document.removeEventListener("drop",U))}},[D,k]),a(function(){return!n&&E&&D.current&&D.current.focus(),function(){}},[D,E,n]);var q=s(function(e){T?T(e):console.error(e)},[T]),Y=s(function(e){e.preventDefault(),e.persist(),ae(e),H.current=[].concat(GU(H.current),[e.target]),WU(e)&&Promise.resolve(o(e)).then(function(t){if(!BU(e)||C){var r=t.length,n=r>0&&function(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,l=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every(function(e){var t=CU(_U(e,r),1)[0],i=CU(IU(e,n,o),1)[0],a=l?l(e):null;return t&&i&&!a})}({files:t,accept:M,minSize:u,maxSize:i,multiple:p,maxFiles:f,validator:N});B({isDragAccept:n,isDragReject:r>0&&!n,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e)}}).catch(function(e){return q(e)})},[o,d,q,C,M,u,i,p,f,N]),X=s(function(e){e.preventDefault(),e.persist(),ae(e);var t=WU(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&h&&h(e),!1},[h,C]),G=s(function(e){e.preventDefault(),e.persist(),ae(e);var t=H.current.filter(function(e){return D.current&&D.current.contains(e)}),r=t.indexOf(e.target);-1!==r&&t.splice(r,1),H.current=t,t.length>0||(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),WU(e)&&m&&m(e))},[D,m,C]),K=s(function(e,t){var r=[],n=[];e.forEach(function(e){var t=KU(_U(e,M),2),o=t[0],a=t[1],l=KU(IU(e,u,i),2),s=l[0],c=l[1],p=N?N(e):null;if(o&&s&&!p)r.push(e);else{var f=[a,c];p&&(f=f.concat(p)),n.push({file:e,errors:f.filter(function(e){return e})})}}),(!p&&r.length>1||p&&f>=1&&r.length>f)&&(r.forEach(function(e){n.push({file:e,errors:[DU]})}),r.splice(0)),B({acceptedFiles:r,fileRejections:n,isDragReject:n.length>0,type:"setFiles"}),y&&y(r,n,t),n.length>0&&g&&g(n,t),r.length>0&&v&&v(r,t)},[B,p,M,u,i,f,y,v,g,N]),Z=s(function(e){e.preventDefault(),e.persist(),ae(e),H.current=[],WU(e)&&Promise.resolve(o(e)).then(function(t){BU(e)&&!C||K(t,e)}).catch(function(e){return q(e)}),B({type:"reset"})},[o,K,q,C]),J=s(function(){if($.current){B({type:"openDialog"}),z();var e={multiple:p,types:A};window.showOpenFilePicker(e).then(function(e){return o(e)}).then(function(e){K(e,null),B({type:"closeDialog"})}).catch(function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(L(e),B({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?q(e):($.current=!1,_.current?(_.current.value=null,_.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))})}else _.current&&(B({type:"openDialog"}),z(),_.current.value=null,_.current.click())},[B,z,L,x,K,q,A,p]),Q=s(function(e){D.current&&D.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),J()))},[D,J]),ee=s(function(){B({type:"focus"})},[]),te=s(function(){B({type:"blur"})},[]),re=s(function(){j||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?J():setTimeout(J,0))},[j,J]),ne=function(e){return n?null:e},oe=function(e){return S?null:ne(e)},ie=function(e){return P?null:ne(e)},ae=function(e){C&&e.stopPropagation()},le=l(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,l=e.onBlur,s=e.onClick,c=e.onDragEnter,u=e.onDragOver,p=e.onDragLeave,f=e.onDrop,d=rq(e,YU);return eq(eq(tq({onKeyDown:oe($U(i,Q)),onFocus:oe($U(a,ee)),onBlur:oe($U(l,te)),onClick:ne($U(s,re)),onDragEnter:ie($U(c,Y)),onDragOver:ie($U(u,X)),onDragLeave:ie($U(p,G)),onDrop:ie($U(f,Z)),role:"string"==typeof o&&""!==o?o:"presentation"},r,D),n||S?{}:{tabIndex:0}),d)}},[D,Q,ee,te,re,Y,X,G,Z,S,P,n]),se=s(function(e){e.stopPropagation()},[]),ce=l(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,n=e.onChange,o=e.onClick,i=rq(e,XU);return eq(eq({},tq({accept:M,multiple:p,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ne($U(n,Z)),onClick:ne($U(o,se)),tabIndex:-1},r,_)),i)}},[_,r,p,Z,n]);return eq(eq({},R),{},{isFocused:W&&!n,getRootProps:le,getInputProps:ce,rootRef:D,inputRef:_,open:ne(J)})}function lq(e,t){switch(t.type){case"focus":return eq(eq({},e),{},{isFocused:!0});case"blur":return eq(eq({},e),{},{isFocused:!1});case"openDialog":return eq(eq({},iq),{},{isFileDialogActive:!0});case"closeDialog":return eq(eq({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return eq(eq({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return eq(eq({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return eq({},iq);default:return e}}function sq(){}const cq=10485760,uq=5,pq=1/0,fq={IMAGE:"image/*",PDF:"application/pdf",DOCUMENT:".doc,.docx,.pdf,.txt",ALL:"*"},dq={FILE_TOO_LARGE:"File size exceeds maximum allowed size",TOO_MANY_FILES:"Maximum number of files exceeded",INVALID_FILE_TYPE:"File type not supported",UPLOAD_FAILED:"Upload failed"},mq={UPLOADING:"uploading",SUCCESS:"success",ERROR:"error"},hq=e=>{if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]},yq=e=>{if("*"===e||!e||""===e.trim())return;return/^[a-zA-Z0-9][a-zA-Z0-9-]*\/[a-zA-Z0-9][a-zA-Z0-9\-*]*$/.test(e.trim())?{[e.trim()]:[]}:void 0},vq=({onFilesChange:e,accept:r="*",multiple:n=!1,maxSize:o=10485760,maxFiles:a=(n?pq:1),disabled:l=!1,className:c="",width:u="w-full",children:p,fileActions:f=[],showRemoveButton:d=!0,isLoading:m=!1})=>{const[h,y]=i([]),[v,g]=i([]),b=s(()=>{g([])},[]),w=s(t=>{const r=h.filter(e=>(e.id===t&&e.preview&&URL.revokeObjectURL(e.preview),e.id!==t));y(r),e(r.map(e=>e.file))},[h,e]),x=s(e=>()=>{w(e)},[w]),O=s(e=>h.some(t=>t.name===e.name&&t.size===e.size&&t.type===e.type),[h]),E=s((t,r)=>{g([]);const n=[];r.length>0&&r.forEach(e=>{e.errors&&e.errors.forEach(e=>{"file-too-large"===e.code?n.push(dq.FILE_TOO_LARGE):"file-invalid-type"===e.code&&n.push(dq.INVALID_FILE_TYPE)})});const o=[],i=t.filter(e=>{const t=O(e);return t&&o.push(e.name),!t});if(o.length>0){const e=1===o.length?`The following file is already uploaded:\n• ${o[0]}`:`The following files are already uploaded:\n${o.map(e=>`• ${e}`).join("\n")}`;n.push(e)}if(a!==1/0&&h.length+i.length>a&&n.push(dq.TOO_MANY_FILES),i.length>0&&(a===1/0||h.length+i.length<=a)){const t=i.map((e,t)=>({id:`${Date.now()}-${t}`,file:e,name:e.name,size:e.size,type:e.type,status:"success",preview:e.type.startsWith("image/")?URL.createObjectURL(e):void 0})),r=[...h,...t];y(r),e(r.map(e=>e.file))}n.length>0&&g(n)},[h,a,e,O]),{getRootProps:k,getInputProps:j,isDragActive:S}=aq({onDrop:E,accept:yq(r),multiple:n,maxSize:o,disabled:l||m});return t.createElement("div",{className:`${u} ${c}`},t.createElement("div",{...k(),className:`\n relative overflow-hidden\n border-2 border-dashed rounded-lg transition-all duration-200\n ${S?"border-primary bg-primary/5 shadow-md scale-[0.99]":"border-border/40 bg-muted/20 hover:border-primary/40 hover:bg-muted/30"}\n ${l||m?"opacity-50 cursor-not-allowed":"cursor-pointer"}\n `},t.createElement("input",{...j()}),p?t.createElement("div",{className:"p-6"},p):t.createElement("div",{className:"p-6 flex items-center justify-center gap-3"},t.createElement("div",{className:`\n p-2.5 rounded-full transition-all duration-200\n ${S?"bg-primary/10 scale-110":"bg-muted/60"}\n `},t.createElement(cg,{name:"UploadCloud",size:24})),t.createElement("div",{className:"text-left"},t.createElement(Eg,{variant:"caption",color:"quinary"},S?"Drop files here":"Drop files or click to browse"),t.createElement(Eg,{variant:"captionSm",color:"quinary"},"*"!==r&&`${r.toUpperCase()} • `,a!==1/0&&`${a} max • `,hq(o)))),m&&t.createElement("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-sm flex items-center justify-center z-10"},t.createElement(cg,{name:"Loader",size:20,className:"animate-spin"}))),v.length>0&&t.createElement("div",{className:"mt-2 p-2.5 bg-destructive/5 border border-destructive/20 rounded-lg"},t.createElement("div",{className:"flex items-start gap-2"},t.createElement(cg,{name:"AlertCircle",size:14,color:"red"}),t.createElement("div",{className:"flex-1 min-w-0"},v.map((e,r)=>t.createElement(Eg,{key:r,variant:"captionSm",color:"tertiary"},e))),t.createElement("button",{onClick:b,className:"text-destructive/60 hover:text-destructive p-0.5 flex-shrink-0",type:"button"},t.createElement(cg,{name:"X",size:14})))),h.length>0&&t.createElement("div",{className:"mt-3 space-y-1.5"},h.map(e=>t.createElement("div",{key:e.id,className:"group relative rounded-lg border border-border/40 bg-muted/30 hover:bg-muted/50 hover:border-border/60 transition-all duration-200"},t.createElement("div",{className:"flex items-center gap-3 p-2.5"},t.createElement("div",{className:"flex-shrink-0"},e.preview?t.createElement("div",{className:"w-10 h-10 rounded-md overflow-hidden ring-1 ring-border/50"},t.createElement("img",{src:e.preview,alt:e.name,className:"w-full h-full object-cover"})):t.createElement("div",{className:"w-10 h-10 rounded-md bg-primary/5 flex items-center justify-center ring-1 ring-primary/10"},t.createElement(cg,{name:"FileText",size:16}))),t.createElement("div",{className:"flex-1 min-w-0"},t.createElement(Eg,{variant:"captionSm",color:"quinary"},e.name),t.createElement("div",{className:"flex items-center gap-1.5"},t.createElement(Eg,{variant:"captionSm",color:"quinary"},hq(e.size)),"success"===e.status&&t.createElement(t.Fragment,null,t.createElement("span",{className:"text-muted-foreground/30"},"•"),t.createElement("div",{className:"w-1 h-1 rounded-full bg-green-500"})))),t.createElement("div",{className:"flex items-center gap-1.5 flex-shrink-0"},f.map((r,n)=>t.createElement(t.Fragment,{key:n},"function"==typeof r?r(e,m):r)),d&&t.createElement("button",{onClick:x(e.id),type:"button",disabled:m,className:"p-1.5 text-destructive/60 hover:text-destructive hover:bg-destructive/5 rounded-md transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed"},t.createElement(cg,{name:"Trash2",size:14,color:"red"}))))))))};function gq(e,t){return Array(t+1).join(e)}function bq(e){return e.replace(/^\n*/,"")}function wq(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}function xq(e){return wq(bq(e))}var Oq=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Eq(e){return Pq(e,Oq)}var kq=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function jq(e){return Pq(e,kq)}var Sq=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Pq(e,t){return t.indexOf(e.nodeName)>=0}function Cq(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var Tq={};function Nq(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function Mq(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function Aq(e,t,r){for(var n=0;n<e.length;n++){var o=e[n];if(zq(o,t,r))return o}}function zq(e,t,r){var n=e.filter;if("string"==typeof n){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof n)throw new TypeError("`filter` needs to be a string, array, or function");if(n.call(e,t,r))return!0}}function Lq(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function Dq(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}Tq.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},Tq.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+"\n"}},Tq.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var n=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&n<3?"\n\n"+e+"\n"+gq(1===n?"=":"-",e.length)+"\n\n":"\n\n"+gq("#",n)+" "+e+"\n\n"}},Tq.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=xq(e).replace(/^/gm,"> "))+"\n\n"}},Tq.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return"LI"===r.nodeName&&r.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},Tq.listItem={filter:"li",replacement:function(e,t,r){var n=r.bulletListMarker+" ",o=t.parentNode;if("OL"===o.nodeName){var i=o.getAttribute("start"),a=Array.prototype.indexOf.call(o.children,t);n=(i?Number(i)+a:a+1)+". "}var l=/\n$/.test(e);return n+(e=(e=xq(e)+(l?"\n":"")).replace(/\n/gm,"\n"+" ".repeat(n.length)))+(t.nextSibling?"\n":"")}},Tq.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},Tq.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){for(var n,o=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,a=r.fence.charAt(0),l=3,s=new RegExp("^"+a+"{3,}","gm");n=s.exec(i);)n[0].length>=l&&(l=n[0].length+1);var c=gq(a,l);return"\n\n"+c+o+"\n"+i.replace(/\n$/,"")+"\n"+c+"\n\n"}},Tq.horizontalRule={filter:"hr",replacement:function(e,t,r){return"\n\n"+r.hr+"\n\n"}},Tq.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href");r&&(r=r.replace(/([()])/g,"\\$1"));var n=Nq(t.getAttribute("title"));return n&&(n=' "'+n.replace(/"/g,'\\"')+'"'),"["+e+"]("+r+n+")"}},Tq.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,r){var n,o,i=t.getAttribute("href"),a=Nq(t.getAttribute("title"));switch(a&&(a=' "'+a+'"'),r.linkReferenceStyle){case"collapsed":n="["+e+"][]",o="["+e+"]: "+i+a;break;case"shortcut":n="["+e+"]",o="["+e+"]: "+i+a;break;default:var l=this.references.length+1;n="["+e+"]["+l+"]",o="["+l+"]: "+i+a}return this.references.push(o),n},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},Tq.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}},Tq.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}},Tq.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];-1!==n.indexOf(r);)r+="`";return r+t+e+t+r}},Tq.image={filter:"img",replacement:function(e,t){var r=Nq(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=Nq(t.getAttribute("title"));return n?"!["+r+"]("+n+(o?' "'+o+'"':"")+")":""}},Mq.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=Aq(this.array,e,this.options))||(t=Aq(this._keep,e,this.options))||(t=Aq(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var _q="undefined"!=typeof window?window:{};var Iq,Rq,Bq,Wq=function(){var e=_q.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?_q.DOMParser:(Iq=function(){},Rq=require("@mixmark-io/domino"),Iq.prototype.parseFromString=function(e){return Rq.createDocument(e)},Iq);function Fq(e,t){var r;"string"==typeof e?r=(Bq=Bq||new Wq).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):r=e.cloneNode(!0);return function(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!o(t)){for(var i=null,a=!1,l=null,s=Dq(l,t,o);s!==t;){if(3===s.nodeType||4===s.nodeType){var c=s.data.replace(/[ \r\n\t]+/g," ");if(i&&!/ $/.test(i.data)||a||" "!==c[0]||(c=c.substr(1)),!c){s=Lq(s);continue}s.data=c,i=s}else{if(1!==s.nodeType){s=Lq(s);continue}r(s)||"BR"===s.nodeName?(i&&(i.data=i.data.replace(/ $/,"")),i=null,a=!1):n(s)||o(s)?(i=null,a=!0):i&&(a=!1)}var u=Dq(l,s,o);l=s,s=u}i&&(i.data=i.data.replace(/ $/,""),i.data||Lq(i))}}({element:r,isBlock:Eq,isVoid:jq,isPre:t.preformattedCode?$q:null}),r}function $q(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function Vq(e,t){return e.isBlock=Eq(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!jq(e)&&!function(e){return Pq(e,Sq)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return Cq(e,kq)}(e)&&!function(e){return Cq(e,Sq)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=function(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}(e.textContent);r.leadingAscii&&Hq("left",e,t)&&(r.leading=r.leadingNonAscii);r.trailingAscii&&Hq("right",e,t)&&(r.trailing=r.trailingNonAscii);return{leading:r.leading,trailing:r.trailing}}(e,t),e}function Hq(e,t,r){var n,o,i;return"left"===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?i=o.test(n.nodeValue):r.preformattedCode&&"CODE"===n.nodeName?i=!1:1!==n.nodeType||Eq(n)||(i=o.test(n.textContent))),i}var Uq=Array.prototype.reduce,qq=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Yq(e){if(!(this instanceof Yq))return new Yq(e);var t={rules:Tq,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}({},t,e),this.rules=new Mq(this.options)}function Xq(e){var t=this;return Uq.call(e.childNodes,function(e,r){var n="";return 3===(r=new Vq(r,t.options)).nodeType?n=r.isCode?r.nodeValue:t.escape(r.nodeValue):1===r.nodeType&&(n=Kq.call(t,r)),Zq(e,n)},"")}function Gq(e){var t=this;return this.rules.forEach(function(r){"function"==typeof r.append&&(e=Zq(e,r.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Kq(e){var t=this.rules.forNode(e),r=Xq.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+t.replacement(r,e,this.options)+n.trailing}function Zq(e,t){var r=wq(e),n=bq(t),o=Math.max(e.length-r.length,t.length-n.length);return r+"\n\n".substring(0,o)+n}Yq.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=Xq.call(this,new Fq(e,this.options));return Gq.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return qq.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};const Jq=({value:e="",onChange:r,placeholder:n="Start writing...",className:o,disabled:u=!1,showToolbar:p=!0,minHeight:f=200})=>{const[d,m]=i(e),[h,y]=i(!1),[v,g]=i(""),[b,w]=i(new Set),[x,O]=i("left"),[E,k]=i("p"),[j,S]=i({ul:!1,ol:!1}),P=c(null),C=c(null),T=c(0),N=c(!1),M=c(new Yq({headingStyle:"atx",codeBlockStyle:"fenced",bulletListMarker:"*",emDelimiter:"*",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full"})),A=l(()=>[{pattern:/^### (.+)$/,tag:"h3"},{pattern:/^## (.+)$/,tag:"h2"},{pattern:/^# (.+)$/,tag:"h1"},{pattern:/^> (.+)$/,tag:"blockquote"},{pattern:/^```(.*)$/,tag:"pre"},{pattern:/^\* (.+)$/,tag:"ul"},{pattern:/^- (.+)$/,tag:"ul"},{pattern:/^1\. (.+)$/,tag:"ol"}],[]);a(()=>{const e=M.current;e.addRule("paragraph",{filter:["p","div"],replacement:function(e){return e?"\n\n"+e+"\n\n":""}}),e.addRule("blockquote",{filter:"blockquote",replacement:function(e){return"\n\n> "+e.trim().replace(/\n/g,"\n> ")+"\n\n"}}),e.addRule("codeBlock",{filter:"pre",replacement:function(e){return"\n\n```\n"+e.trim()+"\n```\n\n"}}),e.addRule("inlineCode",{filter:"code",replacement:function(e){return"`"+e+"`"}})},[]);const z=[{id:"p",label:"Paragraph",icon:t.createElement(cg,{name:"Type",size:16})},{id:"h1",label:"Heading 1",icon:t.createElement(cg,{name:"Type",size:20})},{id:"h2",label:"Heading 2",icon:t.createElement(cg,{name:"Type",size:16})},{id:"h3",label:"Heading 3",icon:t.createElement(cg,{name:"Type",size:12})}],L=[{id:"left",label:"Left",icon:t.createElement(cg,{name:"AlignLeft",size:16})},{id:"center",label:"Center",icon:t.createElement(cg,{name:"AlignCenter",size:16})},{id:"right",label:"Right",icon:t.createElement(cg,{name:"AlignRight",size:16})}],D=s(()=>{const e=window.getSelection();if(!e||0===e.rangeCount)return null;let t=e.anchorNode;return t?(t.nodeType===Node.TEXT_NODE&&(t=t.parentElement),t):null},[]),_=s(()=>{const e=D();if(!e)return{ul:!1,ol:!1};return{ul:!!e.closest("ul"),ol:!!e.closest("ol")}},[D]),I=s(()=>{if(!P.current)return;const e=window.getSelection();if(!e||0===e.rangeCount)return;const t=new Set;document.queryCommandState("bold")&&t.add("bold"),document.queryCommandState("italic")&&t.add("italic"),document.queryCommandState("underline")&&t.add("underline"),document.queryCommandState("justifyLeft")?O("left"):document.queryCommandState("justifyCenter")?O("center"):document.queryCommandState("justifyRight")?O("right"):O("left");const r=document.queryCommandValue("formatBlock").toLowerCase();r.includes("h1")?k("h1"):r.includes("h2")?k("h2"):r.includes("h3")?k("h3"):r.includes("pre")?(t.add("code"),k("p")):r.includes("blockquote")?(t.add("quote"),k("p")):k("p");const n=_();S(n),w(t)},[_]),R=s(()=>{if(P.current){const e=P.current.innerHTML;let t="";try{t=M.current.turndown(e),t=t.replace(/\n{3,}/g,"\n\n").replace(/^\n+/,"").replace(/\n+$/,"").trim()}catch{t=e}N.current=!0,m(t),r?.(t),setTimeout(I,10)}},[r,I]),B=s(()=>{const e=window.getSelection();if(!e||0===e.rangeCount)return null;const t=e.getRangeAt(0),r=t.startContainer;return r.nodeType===Node.TEXT_NODE&&r.parentElement?{element:r.parentElement,text:r.textContent||"",offset:t.startOffset}:r.nodeType===Node.ELEMENT_NODE?{element:r,text:r.textContent||"",offset:t.startOffset}:null},[]),W=s(()=>{const e=B();if(!e||!e.element||!P.current?.contains(e.element))return;const t=e.text.trim();for(const{pattern:r,tag:n}of A){const o=t.match(r);if(o){const t=o[1]||o[0],r=window.getSelection();if(!r)return;if("ul"===n||"ol"===n){e.element.textContent=t;const o="ul"===n?"insertUnorderedList":"insertOrderedList",i=document.createRange();i.selectNodeContents(e.element),r.removeAllRanges(),r.addRange(i),document.execCommand(o,!1)}else{e.element.textContent=t;const o=document.createRange();o.selectNodeContents(e.element),r.removeAllRanges(),r.addRange(o);const i={h1:"<h1>",h2:"<h2>",h3:"<h3>",blockquote:"<blockquote>",pre:"<pre>"};document.execCommand("formatBlock",!1,i[n])}setTimeout(()=>{const t=document.createRange(),n=e.element.firstChild;n&&(t.setStart(n,n.textContent?.length||0),t.collapse(!0),r.removeAllRanges(),r.addRange(t)),R()},10);break}}},[B,A,R]),F=s(()=>{const e=Date.now();T.current=e,R(),setTimeout(()=>{T.current===e&&W()},500)},[R,W]),$=s(()=>{const e=window.getSelection();e&&P.current&&P.current.contains(e.anchorNode)&&setTimeout(I,10)},[I]),V=s((e,t)=>{u||(document.execCommand(e,!1,t),R(),P.current?.focus())},[u,R]),H=s(e=>{if(u)return;const t={bold:"bold",italic:"italic",underline:"underline",code:"formatBlock"};"code"===e?b.has("code")?V("formatBlock","<div>"):V("formatBlock","<pre>"):V(t[e])},[V,b,u]),U=s(e=>{if(u)return;const t=e?"insertOrderedList":"insertUnorderedList",r=_();e&&r.ol?V("insertOrderedList"):!e&&r.ul?V("insertUnorderedList"):V(t)},[V,_,u]),q=s(()=>{u||(b.has("quote")?V("formatBlock","<div>"):V("formatBlock","<blockquote>"))},[V,b,u]),Y=s(e=>{if(u)return;V("formatBlock",{p:"<div>",h1:"<h1>",h2:"<h2>",h3:"<h3>"}[e])},[V,u]),X=s(e=>{u||V("justify"+e.charAt(0).toUpperCase()+e.slice(1))},[V,u]),G=s(()=>{v.trim()&&(V("createLink",v),g(""),y(!1))},[V,v]),K=s(e=>{if("Enter"===e.key&&h&&(e.preventDefault(),G()),"Escape"===e.key&&h&&(y(!1),g(""))," "===e.key&&setTimeout(()=>{W()},10),e.ctrlKey||e.metaKey)switch(e.key){case"b":e.preventDefault(),H("bold");break;case"i":e.preventDefault(),H("italic");break;case"u":e.preventDefault(),H("underline")}},[h,G,H,W]),Z=s(e=>{let t=e;t=t.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__(.*?)__/g,"<strong>$1</strong>"),t=t.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g,"<em>$1</em>"),t=t.replace(/(?<!_)_([^_]+)_(?!_)/g,"<em>$1</em>"),t=t.replace(/`([^`]+)`/g,"<code>$1</code>");const r=t.split("\n"),n=[];let o=!1,i="";for(let e=0;e<r.length;e++){const t=r[e].trim();if(t)if(t.startsWith("### "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<h3>${t.substring(4)}</h3>`);else if(t.startsWith("## "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<h2>${t.substring(3)}</h2>`);else if(t.startsWith("# "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<h1>${t.substring(2)}</h1>`);else if(t.startsWith("> "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<blockquote>${t.substring(2)}</blockquote>`);else if(/^\d+\.\s/.test(t)){const e=t.replace(/^\d+\.\s/,"");o&&"ol"===i||(o&&"ul"===i&&n.push("</ul>"),n.push("<ol>"),o=!0,i="ol"),n.push(`<li>${e}</li>`)}else if(t.startsWith("- ")||t.startsWith("* ")){const e=t.substring(2);o&&"ul"===i||(o&&"ol"===i&&n.push("</ol>"),n.push("<ul>"),o=!0,i="ul"),n.push(`<li>${e}</li>`)}else if(t.startsWith("```")){o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1);let t="";for(e++;e<r.length&&!r[e].trim().startsWith("```");)t+=r[e]+"\n",e++;n.push(`<pre>${t.trim()}</pre>`)}else o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<p>${t}</p>`);else o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push("<br>")}return o&&n.push("ol"===i?"</ol>":"</ul>"),n.join("")},[]),J=s(e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");if(/(\*\*.*?\*\*|__.*?__|^\s*[-*]\s|^\s*\d+\.\s|^#+\s)/m.test(t)&&t.includes("\n")){const e=Z(t);document.execCommand("insertHTML",!1,e)}else document.execCommand("insertText",!1,t)},[Z]),Q=s(()=>{setTimeout(I,10)},[I]),ee=s(()=>{y(!1),g("")},[]),te=s(()=>{y(!0)},[]),re=s((e,t)=>{e.preventDefault(),e.stopPropagation(),t()},[]);return a(()=>{N.current||e===d||(m(e),P.current&&(P.current.innerHTML=e)),N.current=!1},[d,e]),a(()=>{h&&C.current&&C.current.focus()},[h]),a(()=>(document.addEventListener("selectionchange",$),()=>{document.removeEventListener("selectionchange",$)}),[$]),t.createElement("div",{className:Ye("border border-border rounded-lg bg-background overflow-hidden","focus-within:border-primary/30 focus-within:ring-1 focus-within:ring-primary/20","transition-all duration-200",u&&"opacity-50 cursor-not-allowed",o)},p&&t.createElement("div",{className:"flex items-center gap-1 p-2 border-b border-border bg-muted/30 flex-wrap"},t.createElement(HP,{options:z,value:E,onValueChange:Y,placeholder:"Format",size:"small",className:"min-w-[120px]"}),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("bold")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("bold")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Bold",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("italic")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("italic")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Italic",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("underline")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("underline")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Underline",size:16})),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>U(!1)),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",j.ul&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"List",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>U(!0)),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",j.ol&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Hash",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,q),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("quote")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"MessageSquare",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("code")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("code")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Code",size:16})),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),t.createElement(HP,{options:L,value:x,onValueChange:X,placeholder:"Align",size:"small",className:"min-w-[100px]"}),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),h?t.createElement("div",{className:"flex items-center gap-2"},t.createElement("input",{ref:C,type:"text",value:v,onChange:e=>g(e.target.value),onKeyDown:K,placeholder:"Enter URL",className:"px-2 py-1 text-sm border border-border rounded bg-background focus:outline-none focus:border-primary/30 focus:ring-1 focus:ring-primary/20 transition-all duration-150"}),t.createElement(vt,{type:"button",variant:"primary",size:"small",onClick:e=>re(e,G),className:"h-8 transition-all duration-150"},"Add"),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,ee),className:"h-8 transition-all duration-150"},"Cancel")):t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,te),disabled:u,className:"h-8 w-8 p-0 transition-all duration-150 ease-in-out hover:bg-primary/10 hover:scale-105"},t.createElement(cg,{name:"Link2",size:16}))),t.createElement("div",{ref:P,contentEditable:!u,role:"textbox",onInput:F,onKeyDown:K,onPaste:J,onFocus:Q,suppressContentEditableWarning:!0,className:Ye("p-4 focus:outline-none min-h-0","prose prose-sm max-w-none","text-foreground","[&_h1]:text-2xl [&_h1]:font-bold [&_h1]:text-foreground [&_h1]:mt-6 [&_h1]:mb-4","[&_h2]:text-xl [&_h2]:font-semibold [&_h2]:text-foreground [&_h2]:mt-5 [&_h2]:mb-3","[&_h3]:text-lg [&_h3]:font-medium [&_h3]:text-foreground [&_h3]:mt-4 [&_h3]:mb-2","[&_p]:text-foreground [&_p]:leading-relaxed [&_p]:mb-3","[&_div]:text-foreground [&_div]:leading-relaxed [&_div]:mb-3","[&_ul]:text-foreground [&_ul]:ml-6 [&_ul]:mb-3 [&_ul]:list-disc [&_ul]:pl-4","[&_ol]:text-foreground [&_ol]:ml-6 [&_ol]:mb-3 [&_ol]:list-decimal [&_ol]:pl-4","[&_li]:text-foreground [&_li]:mb-1 [&_li]:leading-relaxed","[&_blockquote]:border-l-4 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:text-muted-foreground [&_blockquote]:mb-4","[&_pre]:bg-muted [&_pre]:text-foreground [&_pre]:p-3 [&_pre]:rounded [&_pre]:mb-4 [&_pre]:font-mono [&_pre]:text-sm [&_pre]:overflow-x-auto [&_pre]:whitespace-pre-wrap","[&_code]:bg-muted [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:font-mono [&_code]:text-sm","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 [&_a]:decoration-primary/50 [&_a:hover]:decoration-primary","[&_strong]:font-semibold [&_strong]:text-foreground","[&_em]:italic [&_em]:text-foreground","[&_u]:underline [&_u]:text-foreground","empty:before:content-[attr(data-placeholder)] empty:before:text-muted-foreground empty:before:pointer-events-none empty:before:absolute"),style:{minHeight:f},"data-placeholder":n}))};var Qq,eY,tY,rY,nY,oY,iY,aY,lY,sY,cY,uY,pY,fY,dY,mY,hY,yY,vY,gY,bY,wY,xY,OY,EY,kY,jY,SY,PY,CY,TY,NY,MY,AY,zY,LY,DY,_Y,IY,RY,BY,WY,FY,$Y,VY,HY,UY,qY,YY,XY,GY,KY,ZY,JY,QY,eX,tX,rX,nX,oX,iX,aX,lX,sX,cX,uX,pX,fX,dX,mX,hX,yX,vX,gX,bX,wX,xX,OX,EX,kX,jX,SX,PX,CX,TX,NX,MX,AX,zX,LX,DX,_X,IX,RX,BX,WX,FX,$X,VX,HX,UX,qX,YX,XX;function GX(){if(eY)return Qq;eY=1;var e=Array.isArray;return Qq=e}function KX(){if(rY)return tY;rY=1;var e="object"==typeof gt&&gt&&gt.Object===Object&&gt;return tY=e}function ZX(){if(oY)return nY;oY=1;var e=KX(),t="object"==typeof self&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return nY=r}function JX(){if(aY)return iY;aY=1;var e=ZX().Symbol;return iY=e}function QX(){if(fY)return pY;fY=1;var e=JX(),t=function(){if(sY)return lY;sY=1;var e=JX(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;return lY=function(e){var t=r.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(e){}var l=n.call(e);return a&&(t?e[o]=i:delete e[o]),l}}(),r=function(){if(uY)return cY;uY=1;var e=Object.prototype.toString;return cY=function(t){return e.call(t)}}(),n=e?e.toStringTag:void 0;return pY=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?t(e):r(e)}}function eG(){if(mY)return dY;return mY=1,dY=function(e){return null!=e&&"object"==typeof e}}function tG(){if(yY)return hY;yY=1;var e=QX(),t=eG();return hY=function(r){return"symbol"==typeof r||t(r)&&"[object Symbol]"==e(r)}}function rG(){if(gY)return vY;gY=1;var e=GX(),t=tG(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return vY=function(o,i){if(e(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!t(o))||(n.test(o)||!r.test(o)||null!=i&&o in Object(i))},vY}function nG(){if(wY)return bY;return wY=1,bY=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function oG(){if(OY)return xY;OY=1;var e=QX(),t=nG();return xY=function(r){if(!t(r))return!1;var n=e(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function iG(){if(SY)return jY;SY=1;var e,t=function(){if(kY)return EY;kY=1;var e=ZX()["__core-js_shared__"];return EY=e}(),r=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return jY=function(e){return!!r&&r in e}}function aG(){if(CY)return PY;CY=1;var e=Function.prototype.toString;return PY=function(t){if(null!=t){try{return e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}}function lG(){if(LY)return zY;LY=1;var e=function(){if(NY)return TY;NY=1;var e=oG(),t=iG(),r=nG(),n=aG(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,l=i.toString,s=a.hasOwnProperty,c=RegExp("^"+l.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return TY=function(i){return!(!r(i)||t(i))&&(e(i)?c:o).test(n(i))}}(),t=(AY||(AY=1,MY=function(e,t){return null==e?void 0:e[t]}),MY);return zY=function(r,n){var o=t(r,n);return e(o)?o:void 0},zY}function sG(){if(_Y)return DY;_Y=1;var e=lG()(Object,"create");return DY=e}function cG(){if(XY)return YY;XY=1;var e=function(){if(RY)return IY;RY=1;var e=sG();return IY=function(){this.__data__=e?e(null):{},this.size=0}}(),t=WY?BY:(WY=1,BY=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),r=function(){if($Y)return FY;$Y=1;var e=sG(),t=Object.prototype.hasOwnProperty;return FY=function(r){var n=this.__data__;if(e){var o=n[r];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(n,r)?n[r]:void 0}}(),n=function(){if(HY)return VY;HY=1;var e=sG(),t=Object.prototype.hasOwnProperty;return VY=function(r){var n=this.__data__;return e?void 0!==n[r]:t.call(n,r)}}(),o=function(){if(qY)return UY;qY=1;var e=sG();return UY=function(t,r){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=e&&void 0===r?"__lodash_hash_undefined__":r,this}}();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,YY=i}function uG(){if(JY)return ZY;return JY=1,ZY=function(e,t){return e===t||e!=e&&t!=t}}function pG(){if(eX)return QY;eX=1;var e=uG();return QY=function(t,r){for(var n=t.length;n--;)if(e(t[n][0],r))return n;return-1},QY}function fG(){if(uX)return cX;uX=1;var e=KY?GY:(KY=1,GY=function(){this.__data__=[],this.size=0}),t=function(){if(rX)return tX;rX=1;var e=pG(),t=Array.prototype.splice;return tX=function(r){var n=this.__data__,o=e(n,r);return!(o<0||(o==n.length-1?n.pop():t.call(n,o,1),--this.size,0))},tX}(),r=function(){if(oX)return nX;oX=1;var e=pG();return nX=function(t){var r=this.__data__,n=e(r,t);return n<0?void 0:r[n][1]},nX}(),n=function(){if(aX)return iX;aX=1;var e=pG();return iX=function(t){return e(this.__data__,t)>-1}}(),o=function(){if(sX)return lX;sX=1;var e=pG();return lX=function(t,r){var n=this.__data__,o=e(n,t);return o<0?(++this.size,n.push([t,r])):n[o][1]=r,this},lX}();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,cX=i}function dG(){if(fX)return pX;fX=1;var e=lG()(ZX(),"Map");return pX=e}function mG(){if(gX)return vX;gX=1;var e=yX?hX:(yX=1,hX=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return vX=function(t,r){var n=t.__data__;return e(r)?n["string"==typeof r?"string":"hash"]:n.map},vX}function hG(){if(CX)return PX;CX=1;var e=function(){if(mX)return dX;mX=1;var e=cG(),t=fG(),r=dG();return dX=function(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}(),t=function(){if(wX)return bX;wX=1;var e=mG();return bX=function(t){var r=e(this,t).delete(t);return this.size-=r?1:0,r}}(),r=function(){if(OX)return xX;OX=1;var e=mG();return xX=function(t){return e(this,t).get(t)}}(),n=function(){if(kX)return EX;kX=1;var e=mG();return EX=function(t){return e(this,t).has(t)}}(),o=function(){if(SX)return jX;SX=1;var e=mG();return jX=function(t,r){var n=e(this,t),o=n.size;return n.set(t,r),this.size+=n.size==o?0:1,this},jX}();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,PX=i}function yG(){if(NX)return TX;NX=1;var e=hG();function t(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var e=arguments,t=n?n.apply(this,e):e[0],i=o.cache;if(i.has(t))return i.get(t);var a=r.apply(this,e);return o.cache=i.set(t,a)||i,a};return o.cache=new(t.Cache||e),o}return t.Cache=e,TX=t}function vG(){if(LX)return zX;LX=1;var e=function(){if(AX)return MX;AX=1;var e=yG();return MX=function(t){var r=e(t,function(e){return 500===n.size&&n.clear(),e}),n=r.cache;return r},MX}(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(t,function(e,t,o,i){n.push(o?i.replace(r,"$1"):t||e)}),n});return zX=n}function gG(){if(_X)return DX;return _X=1,DX=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},DX}function bG(){if(WX)return BX;WX=1;var e=function(){if(RX)return IX;RX=1;var e=JX(),t=gG(),r=GX(),n=tG(),o=e?e.prototype:void 0,i=o?o.toString:void 0;return IX=function e(o){if("string"==typeof o)return o;if(r(o))return t(o,e)+"";if(n(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},IX}();return BX=function(t){return null==t?"":e(t)}}function wG(){if($X)return FX;$X=1;var e=GX(),t=rG(),r=vG(),n=bG();return FX=function(o,i){return e(o)?o:t(o,i)?[o]:r(n(o))},FX}function xG(){if(HX)return VX;HX=1;var e=tG();return VX=function(t){if("string"==typeof t||e(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}}function OG(){if(qX)return UX;qX=1;var e=wG(),t=xG();return UX=function(r,n){for(var o=0,i=(n=e(n,r)).length;null!=r&&o<i;)r=r[t(n[o++])];return o&&o==i?r:void 0},UX}function EG(){if(XX)return YX;XX=1;var e=OG();return YX=function(t,r,n){var o=null==t?void 0:e(t,r);return void 0===o?n:o},YX}var kG,jG,SG=bt(EG());var PG,CG,TG=bt(jG?kG:(jG=1,kG=function(e){return null==e}));var NG,MG=bt(function(){if(CG)return PG;CG=1;var e=QX(),t=GX(),r=eG();return PG=function(n){return"string"==typeof n||!t(n)&&r(n)&&"[object String]"==e(n)}}()),AG=bt(oG()),zG=bt(nG()),LG={exports:{}},DG={};var _G,IG,RG={};
53
+ */var Sx=(kx||(kx=1,"production"===process.env.NODE_ENV?xx.exports=function(){if(wx)return Ox;wx=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case n:case i:case o:case u:case p:return e;default:switch(e=e&&e.$$typeof){case s:case l:case c:case d:case f:case a:return e;default:return m}}case r:return m}}}return e=Symbol.for("react.module.reference"),Ox.ContextConsumer=l,Ox.ContextProvider=a,Ox.Element=t,Ox.ForwardRef=c,Ox.Fragment=n,Ox.Lazy=d,Ox.Memo=f,Ox.Portal=r,Ox.Profiler=i,Ox.StrictMode=o,Ox.Suspense=u,Ox.SuspenseList=p,Ox.isAsyncMode=function(){return!1},Ox.isConcurrentMode=function(){return!1},Ox.isContextConsumer=function(e){return h(e)===l},Ox.isContextProvider=function(e){return h(e)===a},Ox.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ox.isForwardRef=function(e){return h(e)===c},Ox.isFragment=function(e){return h(e)===n},Ox.isLazy=function(e){return h(e)===d},Ox.isMemo=function(e){return h(e)===f},Ox.isPortal=function(e){return h(e)===r},Ox.isProfiler=function(e){return h(e)===i},Ox.isStrictMode=function(e){return h(e)===o},Ox.isSuspense=function(e){return h(e)===u},Ox.isSuspenseList=function(e){return h(e)===p},Ox.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===p||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Ox.typeOf=h,Ox}():xx.exports=(Ex||(Ex=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var h=e.type;switch(h){case n:case i:case o:case u:case p:return h;default:var y=h&&h.$$typeof;switch(y){case s:case l:case c:case d:case f:case a:return y;default:return m}}case r:return m}}}e=Symbol.for("react.module.reference");var y=l,v=a,g=t,b=c,w=n,x=d,O=f,E=r,k=i,j=o,S=u,P=p,C=!1,T=!1;jx.ContextConsumer=y,jx.ContextProvider=v,jx.Element=g,jx.ForwardRef=b,jx.Fragment=w,jx.Lazy=x,jx.Memo=O,jx.Portal=E,jx.Profiler=k,jx.StrictMode=j,jx.Suspense=S,jx.SuspenseList=P,jx.isAsyncMode=function(e){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},jx.isConcurrentMode=function(e){return T||(T=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},jx.isContextConsumer=function(e){return h(e)===l},jx.isContextProvider=function(e){return h(e)===a},jx.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},jx.isForwardRef=function(e){return h(e)===c},jx.isFragment=function(e){return h(e)===n},jx.isLazy=function(e){return h(e)===d},jx.isMemo=function(e){return h(e)===f},jx.isPortal=function(e){return h(e)===r},jx.isProfiler=function(e){return h(e)===i},jx.isStrictMode=function(e){return h(e)===o},jx.isSuspense=function(e){return h(e)===u},jx.isSuspenseList=function(e){return h(e)===p},jx.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===p||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},jx.typeOf=h}()),jx)),xx.exports);var Px=Symbol.for("react.element"),Cx=Symbol.for("react.transitional.element"),Tx=Symbol.for("react.fragment");function Nx(e){return e&&"object"===ox(e)&&(e.$$typeof===Px||e.$$typeof===Cx)&&e.type===Tx}var Mx=Number(u.split(".")[0]),Ax=function(e,t){"function"==typeof e?e(t):"object"===ox(e)&&e&&"current"in e&&(e.current=t)},zx=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(e){t.forEach(function(t){Ax(t,e)})}},Lx=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o=function(){return zx.apply(void 0,r)},i=r,a=function(e,t){return e.length!==t.length||e.every(function(e,r){return e!==t[r]})},"value"in(l=e.useRef({})).current&&!a(l.current.condition,i)||(l.current.value=o(),l.current.condition=i),l.current.value;var o,i,a,l},Dx=function(e){var t,r;if(!e)return!1;if(_x(e)&&Mx>=19)return!0;var n=Sx.isMemo(e)?e.type.type:e.type;return!!("function"!=typeof n||null!==(t=n.prototype)&&void 0!==t&&t.render||n.$$typeof===Sx.ForwardRef)&&!!("function"!=typeof e||null!==(r=e.prototype)&&void 0!==r&&r.render||e.$$typeof===Sx.ForwardRef)};function _x(e){return p(e)&&!Nx(e)}var Ix=function(e){if(e&&_x(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},Rx=e.createContext(null);function Bx(e){return function(e){if(Array.isArray(e))return ux(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||px(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Wx="test"!==process.env.NODE_ENV&&dx()?e.useLayoutEffect:e.useEffect,Fx=function(t,r){var n=e.useRef(!0);Wx(function(){return t(n.current)},r),Wx(function(){return n.current=!1,function(){n.current=!0}},[])},$x=[];var Vx="data-rc-order",Hx="data-rc-priority",Ux=new Map;function qx(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function Yx(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Xx(e){return Array.from((Ux.get(e)||e).children).filter(function(e){return"STYLE"===e.tagName})}function Gx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!dx())return null;var r=t.csp,n=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(n),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Vx,a),l&&i&&s.setAttribute(Hx,"".concat(i)),null!=r&&r.nonce&&(s.nonce=null==r?void 0:r.nonce),s.innerHTML=e;var c=Yx(t),u=c.firstChild;if(n){if(l){var p=(t.styles||Xx(c)).filter(function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Vx)))return!1;var t=Number(e.getAttribute(Hx)||0);return i>=t});if(p.length)return c.insertBefore(s,p[p.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function Kx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Yx(t);return(t.styles||Xx(r)).find(function(r){return r.getAttribute(qx(t))===e})}function Zx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Kx(e,t);r&&Yx(t).removeChild(r)}function Jx(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Yx(r),o=Xx(n),i=sx(sx({},r),{},{styles:o});!function(e,t){var r=Ux.get(e);if(!r||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}(document,r)){var n=Gx("",t),o=n.parentNode;Ux.set(e,o),e.removeChild(n)}}(n,i);var a=Kx(t,i);if(a){var l,s,c;if(null!==(l=i.csp)&&void 0!==l&&l.nonce&&a.nonce!==(null===(s=i.csp)||void 0===s?void 0:s.nonce))a.nonce=null===(c=i.csp)||void 0===c?void 0:c.nonce;return a.innerHTML!==e&&(a.innerHTML=e),a}var u=Gx(e,i);return u.setAttribute(qx(i),t),u}function Qx(e){return"undefined"!=typeof document&&e&&e instanceof Element?function(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n,o,i=r.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var a=getComputedStyle(e);i.scrollbarColor=a.scrollbarColor,i.scrollbarWidth=a.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),s=parseInt(l.width,10),c=parseInt(l.height,10);try{var u=s?"width: ".concat(l.width,";"):"",p=c?"height: ".concat(l.height,";"):"";Jx("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(p,"\n}"),t)}catch(e){console.error(e),n=s,o=c}}document.body.appendChild(r);var f=e&&n&&!isNaN(n)?n:r.offsetWidth-r.clientWidth,d=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Zx(t),{width:f,height:d}}(e):{width:0,height:0}}var eO="rc-util-locker-".concat(Date.now()),tO=0;function rO(t){var r=!!t,n=fx(e.useState(function(){return tO+=1,"".concat(eO,"_").concat(tO)}),1)[0];Fx(function(){if(r){var e=Qx(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;Jx("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),n)}else Zx(n);return function(){Zx(n)}},[r,n])}var nO=function(e){return!1!==e&&(dx()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},oO=e.forwardRef(function(t,r){var n=t.open,o=t.autoLock,i=t.getContainer,a=t.debug,l=t.autoDestroy,s=void 0===l||l,c=t.children,u=fx(e.useState(n),2),p=u[0],f=u[1],d=p||n;"production"!==process.env.NODE_ENV&&bx(dx()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),e.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=fx(e.useState(function(){return nO(i)}),2),h=m[0],y=m[1];e.useEffect(function(){var e=nO(i);y(null!=e?e:null)});var v=function(t,r){var n=fx(e.useState(function(){if(!dx())return null;var e=document.createElement("div");return"production"!==process.env.NODE_ENV&&r&&e.setAttribute("data-debug",r),e}),1)[0],o=e.useRef(!1),i=e.useContext(Rx),a=fx(e.useState($x),2),l=a[0],s=a[1],c=i||(o.current?void 0:function(e){s(function(t){return[e].concat(Bx(t))})});function u(){n.parentElement||document.body.appendChild(n),o.current=!0}function p(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return Fx(function(){return t?i?i(u):u():p(),p},[t]),Fx(function(){l.length&&(l.forEach(function(e){return e()}),s($x))},[l]),[n,c]}(d&&!h,a),g=fx(v,2),b=g[0],w=g[1],x=null!=h?h:b;rO(o&&n&&dx()&&(x===b||x===document.body));var O=null;c&&Dx(c)&&r&&(O=c.ref);var E=Lx(O,r);if(!d||!dx()||void 0===h)return null;var k=!1===x||!1,j=c;return r&&(j=e.cloneElement(c,{ref:E})),e.createElement(Rx.Provider,{value:w},k?j:T(j,x))});function iO(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return t.Children.forEach(e,function(e){(null!=e||r.keepEmpty)&&(Array.isArray(e)?n=n.concat(iO(e)):Nx(e)&&e.props?n=n.concat(iO(e.props.children,r)):n.push(e))}),n}function aO(e){return e instanceof HTMLElement||e instanceof SVGElement}function lO(e){var r,n=function(e){return e&&"object"===ox(e)&&aO(e.nativeElement)?e.nativeElement:aO(e)?e:null}(e);return n||(e instanceof t.Component?null===(r=C.findDOMNode)||void 0===r?void 0:r.call(C,e):null)}"production"!==process.env.NODE_ENV&&(oO.displayName="Portal");var sO=e.createContext(null);var cO=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some(function(e,n){return e[0]===t&&(r=n,!0)}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];e.call(t,o[1],o[0])}},t}()}(),uO="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,pO="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),fO="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(pO):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var dO=["top","right","bottom","left","width","height","size","weight"],mO="undefined"!=typeof MutationObserver,hO=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,o=0;function i(){r&&(r=!1,e()),n&&l()}function a(){fO(i)}function l(){var e=Date.now();if(r){if(e-o<2)return;n=!0}else r=!0,n=!1,setTimeout(a,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){uO&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mO?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){uO&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;dO.some(function(e){return!!~r.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),yO=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},vO=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||pO},gO=kO(0,0,0,0);function bO(e){return parseFloat(e)||0}function wO(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(t,r){return t+bO(e["border-"+r+"-width"])},0)}function xO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return gO;var n=vO(e).getComputedStyle(e),o=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],i=e["padding-"+o];t[o]=bO(i)}return t}(n),i=o.left+o.right,a=o.top+o.bottom,l=bO(n.width),s=bO(n.height);if("border-box"===n.boxSizing&&(Math.round(l+i)!==t&&(l-=wO(n,"left","right")+i),Math.round(s+a)!==r&&(s-=wO(n,"top","bottom")+a)),!function(e){return e===vO(e).document.documentElement}(e)){var c=Math.round(l+i)-t,u=Math.round(s+a)-r;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return kO(o.left,o.top,l,s)}var OO="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof vO(e).SVGGraphicsElement}:function(e){return e instanceof vO(e).SVGElement&&"function"==typeof e.getBBox};function EO(e){return uO?OO(e)?function(e){var t=e.getBBox();return kO(0,0,t.width,t.height)}(e):xO(e):gO}function kO(e,t,r,n){return{x:e,y:t,width:r,height:n}}var jO=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=kO(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=EO(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),SO=function(e,t){var r=function(e){var t=e.x,r=e.y,n=e.width,o=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return yO(a,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),a}(t);yO(this,{target:e,contentRect:r})},PO=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new cO,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof vO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new jO(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof vO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new SO(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),CO="undefined"!=typeof WeakMap?new WeakMap:new cO,TO=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=hO.getInstance(),n=new PO(t,r,this);CO.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){TO.prototype[e]=function(){var t;return(t=CO.get(this))[e].apply(t,arguments)}});var NO=void 0!==pO.ResizeObserver?pO.ResizeObserver:TO,MO=new Map;function AO(e){e.forEach(function(e){var t,r=e.target;null===(t=MO.get(r))||void 0===t||t.forEach(function(e){return e(r)})})}var zO=new NO(AO);function LO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ix(n.key),n)}}function _O(e,t,r){return t&&DO(e.prototype,t),r&&DO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function IO(e,t){return IO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IO(e,t)}function RO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IO(e,t)}function BO(e){return BO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BO(e)}function WO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(WO=function(){return!!e})()}function FO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $O(e){var t=WO();return function(){var r,n=BO(e);if(t){var o=BO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"==ox(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return FO(e)}(this,r)}}process.env.NODE_ENV,process.env.NODE_ENV;var VO=function(){RO(r,e.Component);var t=$O(r);function r(){return LO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function HO(t,r){var n=t.children,o=t.disabled,i=e.useRef(null),a=e.useRef(null),l=e.useContext(sO),s="function"==typeof n,c=s?n(i):n,u=e.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!s&&e.isValidElement(c)&&Dx(c),f=p?Ix(c):null,d=Lx(f,i),m=function(){var e;return lO(i.current)||(i.current&&"object"===ox(i.current)?lO(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||lO(a.current)};e.useImperativeHandle(r,function(){return m()});var h=e.useRef(t);h.current=t;var y=e.useCallback(function(e){var t=h.current,r=t.onResize,n=t.data,o=e.getBoundingClientRect(),i=o.width,a=o.height,s=e.offsetWidth,c=e.offsetHeight,p=Math.floor(i),f=Math.floor(a);if(u.current.width!==p||u.current.height!==f||u.current.offsetWidth!==s||u.current.offsetHeight!==c){var d={width:p,height:f,offsetWidth:s,offsetHeight:c};u.current=d;var m=s===Math.round(i)?i:s,y=c===Math.round(a)?a:c,v=sx(sx({},d),{},{offsetWidth:m,offsetHeight:y});null==l||l(v,e,n),r&&Promise.resolve().then(function(){r(v,e)})}},[]);return e.useEffect(function(){var e,t,r=m();return r&&!o&&(e=r,t=y,MO.has(e)||(MO.set(e,new Set),zO.observe(e)),MO.get(e).add(t)),function(){return function(e,t){MO.has(e)&&(MO.get(e).delete(t),MO.get(e).size||(zO.unobserve(e),MO.delete(e)))}(r,y)}},[i.current,o]),e.createElement(VO,{ref:a},p?e.cloneElement(c,{ref:d}):c)}var UO=e.forwardRef(HO);"production"!==process.env.NODE_ENV&&(UO.displayName="SingleObserver");function qO(t,r){var n=t.children,o="function"==typeof n?[n]:iO(n);return"production"!==process.env.NODE_ENV&&(o.length>1?yx(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):0===o.length&&yx(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),o.map(function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return e.createElement(UO,nx({},t,{key:i,ref:0===o?r:void 0}),n)})}var YO=e.forwardRef(qO);function XO(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function GO(e){return function(e){return XO(e)instanceof ShadowRoot}(e)?XO(e):null}function KO(t){var r=e.useRef();r.current=t;var n=e.useCallback(function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return null===(e=r.current)||void 0===e?void 0:e.call.apply(e,[r].concat(n))},[]);return n}"production"!==process.env.NODE_ENV&&(YO.displayName="ResizeObserver"),YO.Collection=function(t){var r=t.children,n=t.onBatchResize,o=e.useRef(0),i=e.useRef([]),a=e.useContext(sO),l=e.useCallback(function(e,t,r){o.current+=1;var l=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then(function(){l===o.current&&(null==n||n(i.current),i.current=[])}),null==a||a(e,t,r)},[n,a]);return e.createElement(sO.Provider,{value:l},r)};var ZO=0,JO=sx({},e).useId,QO=JO?function(e){var t=JO();return e||("test"===process.env.NODE_ENV?"test-id":t)}:function(t){var r=fx(e.useState("ssr-id"),2),n=r[0],o=r[1];return e.useEffect(function(){var e=ZO;ZO+=1,o("rc_unique_".concat(e))},[]),t||("test"===process.env.NODE_ENV?"test-id":n)},eE=e.createContext({}),tE=function(){RO(r,e.Component);var t=$O(r);function r(){return LO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function rE(t){var r=e.useRef(!1),n=fx(e.useState(t),2),o=n[0],i=n[1];return e.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]),[o,function(e,t){t&&r.current||i(e)}]}var nE="none",oE="appear",iE="enter",aE="leave",lE="none",sE="prepare",cE="start",uE="active",pE="end",fE="prepared";function dE(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}var mE=function(e,t){var r={animationend:dE("Animation","AnimationEnd"),transitionend:dE("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}(dx(),"undefined"!=typeof window?window:{}),hE={};if(dx()){var yE=document.createElement("div");hE=yE.style}var vE={};function gE(e){if(vE[e])return vE[e];var t=mE[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o+=1){var i=r[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in hE)return vE[e]=t[i],vE[e]}return""}var bE=gE("animationend"),wE=gE("transitionend"),xE=!(!bE||!wE),OE=bE||"animationend",EE=wE||"transitionend";function kE(e,t){if(!e)return null;if("object"===ox(e)){var r=t.replace(/-\w/g,function(e){return e[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}var jE=dx()?f:a,SE=function(e){return+setTimeout(e,16)},PE=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(SE=function(e){return window.requestAnimationFrame(e)},PE=function(e){return window.cancelAnimationFrame(e)});var CE=0,TE=new Map;function NE(e){TE.delete(e)}var ME=function(e){var t=CE+=1;return function r(n){if(0===n)NE(t),e();else{var o=SE(function(){r(n-1)});TE.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};ME.cancel=function(e){var t=TE.get(e);return NE(e),PE(t)},"production"!==process.env.NODE_ENV&&(ME.ids=function(){return TE});var AE=[sE,cE,uE,pE],zE=[sE,fE],LE=!1;function DE(e){return e===uE||e===pE}var _E=function(t,r,n){var o=fx(rE(lE),2),i=o[0],a=o[1],l=function(){var t=e.useRef(null);function r(){ME.cancel(t.current)}return e.useEffect(function(){return function(){r()}},[]),[function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;r();var i=ME(function(){o<=1?n({isCanceled:function(){return i!==t.current}}):e(n,o-1)});t.current=i},r]}(),s=fx(l,2),c=s[0],u=s[1];var p=r?zE:AE;return jE(function(){if(i!==lE&&i!==pE){var e=p.indexOf(i),t=p[e+1],r=n(i);r===LE?a(t,!0):t&&c(function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)})}},[t,i]),e.useEffect(function(){return function(){u()}},[]),[function(){a(sE,!0)},i]};function IE(t,r,n,o){var i,l,s,u,p=o.motionEnter,f=void 0===p||p,d=o.motionAppear,m=void 0===d||d,h=o.motionLeave,y=void 0===h||h,v=o.motionDeadline,g=o.motionLeaveImmediately,b=o.onAppearPrepare,w=o.onEnterPrepare,x=o.onLeavePrepare,O=o.onAppearStart,E=o.onEnterStart,k=o.onLeaveStart,j=o.onAppearActive,S=o.onEnterActive,P=o.onLeaveActive,C=o.onAppearEnd,T=o.onEnterEnd,N=o.onLeaveEnd,M=o.onVisibleChanged,A=fx(rE(),2),z=A[0],L=A[1],D=(i=nE,l=e.useReducer(function(e){return e+1},0),s=fx(l,2)[1],u=e.useRef(i),[KO(function(){return u.current}),KO(function(e){u.current="function"==typeof e?e(u.current):e,s()})]),_=fx(D,2),I=_[0],R=_[1],B=fx(rE(null),2),W=B[0],F=B[1],$=I(),V=c(!1),H=c(null);function U(){return n()}var q=c(!1);function Y(){R(nE),F(null,!0)}var X=KO(function(e){var t=I();if(t!==nE){var r=U();if(!e||e.deadline||e.target===r){var n,o=q.current;t===oE&&o?n=null==C?void 0:C(r,e):t===iE&&o?n=null==T?void 0:T(r,e):t===aE&&o&&(n=null==N?void 0:N(r,e)),o&&!1!==n&&Y()}}}),G=function(t){var r=c();function n(e){e&&(e.removeEventListener(EE,t),e.removeEventListener(OE,t))}return e.useEffect(function(){return function(){n(r.current)}},[]),[function(e){r.current&&r.current!==e&&n(r.current),e&&e!==r.current&&(e.addEventListener(EE,t),e.addEventListener(OE,t),r.current=e)},n]}(X),K=fx(G,1)[0],Z=function(e){switch(e){case oE:return ax(ax(ax({},sE,b),cE,O),uE,j);case iE:return ax(ax(ax({},sE,w),cE,E),uE,S);case aE:return ax(ax(ax({},sE,x),cE,k),uE,P);default:return{}}},J=e.useMemo(function(){return Z($)},[$]),Q=fx(_E($,!t,function(e){if(e===sE){var t=J[sE];return t?t(U()):LE}var r;te in J&&F((null===(r=J[te])||void 0===r?void 0:r.call(J,U(),null))||null);return te===uE&&$!==nE&&(K(U()),v>0&&(clearTimeout(H.current),H.current=setTimeout(function(){X({deadline:!0})},v))),te===fE&&Y(),true}),2),ee=Q[0],te=Q[1],re=DE(te);q.current=re;var ne=c(null);jE(function(){if(!V.current||ne.current!==r){L(r);var e,n=V.current;V.current=!0,!n&&r&&m&&(e=oE),n&&r&&f&&(e=iE),(n&&!r&&y||!n&&g&&!r&&y)&&(e=aE);var o=Z(e);e&&(t||o[sE])?(R(e),ee()):R(nE),ne.current=r}},[r]),a(function(){($===oE&&!m||$===iE&&!f||$===aE&&!y)&&R(nE)},[m,f,y]),a(function(){return function(){V.current=!1,clearTimeout(H.current)}},[]);var oe=e.useRef(!1);a(function(){z&&(oe.current=!0),void 0!==z&&$===nE&&((oe.current||z)&&(null==M||M(z)),oe.current=!0)},[z,$]);var ie=W;return J[sE]&&te===cE&&(ie=sx({transition:"none"},ie)),[$,te,ie,null!=z?z:r]}var RE=function(t){var r=t;"object"===ox(t)&&(r=t.transitionSupport);var n=e.forwardRef(function(t,n){var o=t.visible,i=void 0===o||o,a=t.removeOnLeave,l=void 0===a||a,s=t.forceRender,u=t.children,p=t.motionName,f=t.leavedClassName,d=t.eventProps,m=function(e,t){return!(!e.motionName||!r||!1===t)}(t,e.useContext(eE).motion),h=c(),y=c();var v=fx(IE(m,i,function(){try{return h.current instanceof HTMLElement?h.current:lO(y.current)}catch(e){return null}},t),4),g=v[0],b=v[1],w=v[2],x=v[3],O=e.useRef(x);x&&(O.current=!0);var E,k=e.useCallback(function(e){h.current=e,Ax(n,e)},[n]),j=sx(sx({},d),{},{visible:i});if(u)if(g===nE)E=x?u(sx({},j),k):!l&&O.current&&f?u(sx(sx({},j),{},{className:f}),k):s||!l&&!f?u(sx(sx({},j),{},{style:{display:"none"}}),k):null;else{var S;b===sE?S="prepare":DE(b)?S="active":b===cE&&(S="start");var P=kE(p,"".concat(g,"-").concat(S));E=u(sx(sx({},j),{},{className:mg(kE(p,g),ax(ax({},P,P&&S),p,"string"==typeof p)),style:w}),k)}else E=null;e.isValidElement(E)&&Dx(E)&&(Ix(E)||(E=e.cloneElement(E,{ref:k})));return e.createElement(tE,{ref:y},E)});return n.displayName="CSSMotion",n}(xE),BE="add",WE="keep",FE="remove",$E="removed";function VE(e){var t;return sx(sx({},t=e&&"object"===ox(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function HE(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(VE)}var UE=["component","children","onVisibleChanged","onAllRemoved"],qE=["status"],YE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function XE(t){var r=t.prefixCls,n=t.align,o=t.arrow,i=t.arrowPos,a=o||{},l=a.className,s=a.content,c=i.x,u=void 0===c?0:c,p=i.y,f=void 0===p?0:p,d=e.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var h=n.points[0],y=n.points[1],v=h[0],g=h[1],b=y[0],w=y[1];v!==b&&["t","b"].includes(v)?"t"===v?m.top=0:m.bottom=0:m.top=f,g!==w&&["l","r"].includes(g)?"l"===g?m.left=0:m.right=0:m.left=u}return e.createElement("div",{ref:d,className:mg("".concat(r,"-arrow"),l),style:m},s)}function GE(t){var r=t.prefixCls,n=t.open,o=t.zIndex,i=t.mask,a=t.motion;return i?e.createElement(RE,nx({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(t){var n=t.className;return e.createElement("div",{style:{zIndex:o},className:mg("".concat(r,"-mask"),n)})}):null}!function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:RE,n=function(){RO(n,e.Component);var t=$O(n);function n(){var e;LO(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return ax(FO(e=t.call.apply(t,[this].concat(o))),"state",{keyEntities:[]}),ax(FO(e),"removeKey",function(t){e.setState(function(e){return{keyEntities:e.keyEntities.map(function(e){return e.key!==t?e:sx(sx({},e),{},{status:$E})})}},function(){0===e.state.keyEntities.filter(function(e){return e.status!==$E}).length&&e.props.onAllRemoved&&e.props.onAllRemoved()})}),e}return _O(n,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,l=o.onVisibleChanged;o.onAllRemoved;var s=cx(o,UE),c=i||e.Fragment,u={};return YE.forEach(function(e){u[e]=s[e],delete s[e]}),delete s.keys,e.createElement(c,s,n.map(function(n,o){var i=n.status,s=cx(n,qE),c=i===BE||i===WE;return e.createElement(r,nx({},u,{key:s.key,visible:c,eventProps:s,onVisibleChanged:function(e){null==l||l(e,{key:s.key}),e||t.removeKey(s.key)}}),function(e,t){return a(sx(sx({},e),{},{index:o}),t)})}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.keys,n=t.keyEntities,o=HE(r),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,o=t.length,i=HE(e),a=HE(t);i.forEach(function(e){for(var t=!1,i=n;i<o;i+=1){var l=a[i];if(l.key===e.key){n<i&&(r=r.concat(a.slice(n,i).map(function(e){return sx(sx({},e),{},{status:BE})})),n=i),r.push(sx(sx({},l),{},{status:WE})),n+=1,t=!0;break}}t||r.push(sx(sx({},e),{},{status:FE}))}),n<o&&(r=r.concat(a.slice(n).map(function(e){return sx(sx({},e),{},{status:BE})})));var l={};return r.forEach(function(e){var t=e.key;l[t]=(l[t]||0)+1}),Object.keys(l).filter(function(e){return l[e]>1}).forEach(function(e){(r=r.filter(function(t){var r=t.key,n=t.status;return r!==e||n!==FE})).forEach(function(t){t.key===e&&(t.status=WE)})}),r}(n,o);return{keyEntities:i.filter(function(e){var t=n.find(function(t){var r=t.key;return e.key===r});return!t||t.status!==$E||e.status!==FE})}}}]),n}();ax(n,"defaultProps",{component:"div"})}(xE);var KE=e.memo(function(e){return e.children},function(e,t){return t.cache});"production"!==process.env.NODE_ENV&&(KE.displayName="PopupContent");var ZE=e.forwardRef(function(t,r){var n=t.popup,o=t.className,i=t.prefixCls,a=t.style,l=t.target,s=t.onVisibleChanged,c=t.open,u=t.keepDom,p=t.fresh,f=t.onClick,d=t.mask,m=t.arrow,h=t.arrowPos,y=t.align,v=t.motion,g=t.maskMotion,b=t.forceRender,w=t.getPopupContainer,x=t.autoDestroy,O=t.portal,E=t.zIndex,k=t.onMouseEnter,j=t.onMouseLeave,S=t.onPointerEnter,P=t.onPointerDownCapture,C=t.ready,T=t.offsetX,N=t.offsetY,M=t.offsetR,A=t.offsetB,z=t.onAlign,L=t.onPrepare,D=t.stretch,_=t.targetWidth,I=t.targetHeight,R="function"==typeof n?n():n,B=c||u,W=(null==w?void 0:w.length)>0,F=fx(e.useState(!w||!W),2),$=F[0],V=F[1];if(Fx(function(){!$&&W&&l&&V(!0)},[$,W,l]),!$)return null;var H="auto",U={left:"-1000vw",top:"-1000vh",right:H,bottom:H};if(C||!c){var q,Y=y.points,X=y.dynamicInset||(null===(q=y._experimental)||void 0===q?void 0:q.dynamicInset),G=X&&"r"===Y[0][1],K=X&&"b"===Y[0][0];G?(U.right=M,U.left=H):(U.left=T,U.right=H),K?(U.bottom=A,U.top=H):(U.top=N,U.bottom=H)}var Z={};return D&&(D.includes("height")&&I?Z.height=I:D.includes("minHeight")&&I&&(Z.minHeight=I),D.includes("width")&&_?Z.width=_:D.includes("minWidth")&&_&&(Z.minWidth=_)),c||(Z.pointerEvents="none"),e.createElement(O,{open:b||B,getContainer:w&&function(){return w(l)},autoDestroy:x},e.createElement(GE,{prefixCls:i,open:c,zIndex:E,mask:d,motion:g}),e.createElement(YO,{onResize:z,disabled:!c},function(t){return e.createElement(RE,nx({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(i,"-hidden")},v,{onAppearPrepare:L,onEnterPrepare:L,visible:c,onVisibleChanged:function(e){var t;null==v||null===(t=v.onVisibleChanged)||void 0===t||t.call(v,e),s(e)}}),function(n,l){var s=n.className,u=n.style,d=mg(i,s,o);return e.createElement("div",{ref:zx(t,r,l),className:d,style:sx(sx(sx(sx({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},U),Z),u),{},{boxSizing:"border-box",zIndex:E},a),onMouseEnter:k,onMouseLeave:j,onPointerEnter:S,onClick:f,onPointerDownCapture:P},m&&e.createElement(XE,{prefixCls:i,arrow:m,arrowPos:h,align:y}),e.createElement(KE,{cache:!c&&!p},R))})}))});"production"!==process.env.NODE_ENV&&(ZE.displayName="Popup");var JE=e.forwardRef(function(t,r){var n=t.children,o=t.getTriggerDOMNode,i=Dx(n),a=e.useCallback(function(e){Ax(r,o?o(e):e)},[o]),l=Lx(a,Ix(n));return i?e.cloneElement(n,{ref:l}):n});"production"!==process.env.NODE_ENV&&(JE.displayName="TriggerWrapper");var QE=e.createContext(null);function ek(e){return e?Array.isArray(e)?e:[e]:[]}function tk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function rk(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function nk(e){return e.ownerDocument.defaultView}function ok(e){for(var t=[],r=null==e?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=nk(r).getComputedStyle(r);[o.overflowX,o.overflowY,o.overflow].some(function(e){return n.includes(e)})&&t.push(r),r=r.parentElement}return t}function ik(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ak(e){return ik(parseFloat(e),0)}function lk(e,t){var r=sx({},e);return(t||[]).forEach(function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=nk(e).getComputedStyle(e),n=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,l=t.borderLeftWidth,s=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,p=e.clientHeight,f=e.offsetWidth,d=e.clientWidth,m=ak(i),h=ak(a),y=ak(l),v=ak(s),g=ik(Math.round(c.width/f*1e3)/1e3),b=ik(Math.round(c.height/u*1e3)/1e3),w=(f-d-y-v)*g,x=(u-p-m-h)*b,O=m*b,E=h*b,k=y*g,j=v*g,S=0,P=0;if("clip"===n){var C=ak(o);S=C*g,P=C*b}var T=c.x+k-S,N=c.y+O-P,M=T+c.width+2*S-k-j-w,A=N+c.height+2*P-O-E-x;r.left=Math.max(r.left,T),r.top=Math.max(r.top,N),r.right=Math.min(r.right,M),r.bottom=Math.min(r.bottom,A)}}),r}function sk(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),r=t.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(t)}function ck(e,t){var r=fx(t||[],2),n=r[0],o=r[1];return[sk(e.width,n),sk(e.height,o)]}function uk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function pk(e,t){var r,n=t[0],o=t[1];return r="t"===n?e.y:"b"===n?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:r}}function fk(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(e,n){return n===t?r[e]||"c":e}).join("")}function dk(t,r,n,o,i,a,l){var s=fx(e.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),2),c=s[0],u=s[1],p=e.useRef(0),f=e.useMemo(function(){return r?ok(r):[]},[r]),d=e.useRef({});t||(d.current={});var m=KO(function(){if(r&&n&&t){var e,s,c,p,m,h=r,y=h.ownerDocument,v=nk(h),g=v.getComputedStyle(h).position,b=h.style.left,w=h.style.top,x=h.style.right,O=h.style.bottom,E=h.style.overflow,k=sx(sx({},i[o]),a),j=y.createElement("div");if(null===(e=h.parentElement)||void 0===e||e.appendChild(j),j.style.left="".concat(h.offsetLeft,"px"),j.style.top="".concat(h.offsetTop,"px"),j.style.position=g,j.style.height="".concat(h.offsetHeight,"px"),j.style.width="".concat(h.offsetWidth,"px"),h.style.left="0",h.style.top="0",h.style.right="auto",h.style.bottom="auto",h.style.overflow="hidden",Array.isArray(n))m={x:n[0],y:n[1],width:0,height:0};else{var S,P,C=n.getBoundingClientRect();C.x=null!==(S=C.x)&&void 0!==S?S:C.left,C.y=null!==(P=C.y)&&void 0!==P?P:C.top,m={x:C.x,y:C.y,width:C.width,height:C.height}}var T=h.getBoundingClientRect(),N=v.getComputedStyle(h),M=N.height,A=N.width;T.x=null!==(s=T.x)&&void 0!==s?s:T.left,T.y=null!==(c=T.y)&&void 0!==c?c:T.top;var z=y.documentElement,L=z.clientWidth,D=z.clientHeight,_=z.scrollWidth,I=z.scrollHeight,R=z.scrollTop,B=z.scrollLeft,W=T.height,F=T.width,$=m.height,V=m.width,H={left:0,top:0,right:L,bottom:D},U={left:-B,top:-R,right:_-B,bottom:I-R},q=k.htmlRegion,Y="visible",X="visibleFirst";"scroll"!==q&&q!==X&&(q=Y);var G=q===X,K=lk(U,f),Z=lk(H,f),J=q===Y?Z:K,Q=G?Z:J;h.style.left="auto",h.style.top="auto",h.style.right="0",h.style.bottom="0";var ee=h.getBoundingClientRect();h.style.left=b,h.style.top=w,h.style.right=x,h.style.bottom=O,h.style.overflow=E,null===(p=h.parentElement)||void 0===p||p.removeChild(j);var te=ik(Math.round(F/parseFloat(A)*1e3)/1e3),re=ik(Math.round(W/parseFloat(M)*1e3)/1e3);if(0===te||0===re||aO(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}(n))return;var ne=k.offset,oe=k.targetOffset,ie=fx(ck(T,ne),2),ae=ie[0],le=ie[1],se=fx(ck(m,oe),2),ce=se[0],ue=se[1];m.x-=ce,m.y-=ue;var pe=fx(k.points||[],2),fe=pe[0],de=uk(pe[1]),me=uk(fe),he=pk(m,de),ye=pk(T,me),ve=sx({},k),ge=he.x-ye.x+ae,be=he.y-ye.y+le;function ft(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J,n=T.x+e,o=T.y+t,i=n+F,a=o+W,l=Math.max(n,r.left),s=Math.max(o,r.top),c=Math.min(i,r.right),u=Math.min(a,r.bottom);return Math.max(0,(c-l)*(u-s))}var we,xe,Oe,Ee,ke=ft(ge,be),je=ft(ge,be,Z),Se=pk(m,["t","l"]),Pe=pk(T,["t","l"]),Ce=pk(m,["b","r"]),Te=pk(T,["b","r"]),Ne=k.overflow||{},Me=Ne.adjustX,Ae=Ne.adjustY,ze=Ne.shiftX,Le=Ne.shiftY,De=function(e){return"boolean"==typeof e?e:e>=0};function dt(){we=T.y+be,xe=we+W,Oe=T.x+ge,Ee=Oe+F}dt();var _e=De(Ae),Ie=me[0]===de[0];if(_e&&"t"===me[0]&&(xe>Q.bottom||d.current.bt)){var Re=be;Ie?Re-=W-$:Re=Se.y-Te.y-le;var Be=ft(ge,Re),We=ft(ge,Re,Z);Be>ke||Be===ke&&(!G||We>=je)?(d.current.bt=!0,be=Re,le=-le,ve.points=[fk(me,0),fk(de,0)]):d.current.bt=!1}if(_e&&"b"===me[0]&&(we<Q.top||d.current.tb)){var Fe=be;Ie?Fe+=W-$:Fe=Ce.y-Pe.y-le;var $e=ft(ge,Fe),Ve=ft(ge,Fe,Z);$e>ke||$e===ke&&(!G||Ve>=je)?(d.current.tb=!0,be=Fe,le=-le,ve.points=[fk(me,0),fk(de,0)]):d.current.tb=!1}var He=De(Me),Ue=me[1]===de[1];if(He&&"l"===me[1]&&(Ee>Q.right||d.current.rl)){var qe=ge;Ue?qe-=F-V:qe=Se.x-Te.x-ae;var Ye=ft(qe,be),Xe=ft(qe,be,Z);Ye>ke||Ye===ke&&(!G||Xe>=je)?(d.current.rl=!0,ge=qe,ae=-ae,ve.points=[fk(me,1),fk(de,1)]):d.current.rl=!1}if(He&&"r"===me[1]&&(Oe<Q.left||d.current.lr)){var Ge=ge;Ue?Ge+=F-V:Ge=Ce.x-Pe.x-ae;var Ke=ft(Ge,be),Ze=ft(Ge,be,Z);Ke>ke||Ke===ke&&(!G||Ze>=je)?(d.current.lr=!0,ge=Ge,ae=-ae,ve.points=[fk(me,1),fk(de,1)]):d.current.lr=!1}dt();var Je=!0===ze?0:ze;"number"==typeof Je&&(Oe<Z.left&&(ge-=Oe-Z.left-ae,m.x+V<Z.left+Je&&(ge+=m.x-Z.left+V-Je)),Ee>Z.right&&(ge-=Ee-Z.right-ae,m.x>Z.right-Je&&(ge+=m.x-Z.right+Je)));var Qe=!0===Le?0:Le;"number"==typeof Qe&&(we<Z.top&&(be-=we-Z.top-le,m.y+$<Z.top+Qe&&(be+=m.y-Z.top+$-Qe)),xe>Z.bottom&&(be-=xe-Z.bottom-le,m.y>Z.bottom-Qe&&(be+=m.y-Z.bottom+Qe)));var et=T.x+ge,tt=et+F,rt=T.y+be,nt=rt+W,ot=m.x,it=ot+V,at=m.y,lt=at+$,st=(Math.max(et,ot)+Math.min(tt,it))/2-et,ct=(Math.max(rt,at)+Math.min(nt,lt))/2-rt;null==l||l(r,ve);var ut=ee.right-T.x-(ge+T.width),pt=ee.bottom-T.y-(be+T.height);1===te&&(ge=Math.round(ge),ut=Math.round(ut)),1===re&&(be=Math.round(be),pt=Math.round(pt)),u({ready:!0,offsetX:ge/te,offsetY:be/re,offsetR:ut/te,offsetB:pt/re,arrowX:st/te,arrowY:ct/re,scaleX:te,scaleY:re,align:ve})}}),h=function(){u(function(e){return sx(sx({},e),{},{ready:!1})})};return Fx(h,[o]),Fx(function(){t||h()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,function(){p.current+=1;var e=p.current;Promise.resolve().then(function(){p.current===e&&m()})}]}var mk=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];var hk=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oO,r=e.forwardRef(function(r,n){var o=r.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=r.children,l=r.action,s=void 0===l?"hover":l,c=r.showAction,u=r.hideAction,p=r.popupVisible,f=r.defaultPopupVisible,d=r.onPopupVisibleChange,m=r.afterPopupVisibleChange,h=r.mouseEnterDelay,y=r.mouseLeaveDelay,v=void 0===y?.1:y,g=r.focusDelay,b=r.blurDelay,w=r.mask,x=r.maskClosable,O=void 0===x||x,E=r.getPopupContainer,k=r.forceRender,j=r.autoDestroy,S=r.destroyPopupOnHide,P=r.popup,C=r.popupClassName,T=r.popupStyle,N=r.popupPlacement,M=r.builtinPlacements,A=void 0===M?{}:M,z=r.popupAlign,L=r.zIndex,D=r.stretch,_=r.getPopupClassNameFromAlign,I=r.fresh,R=r.alignPoint,B=r.onPopupClick,W=r.onPopupAlign,F=r.arrow,$=r.popupMotion,V=r.maskMotion,H=r.popupTransitionName,U=r.popupAnimation,q=r.maskTransitionName,Y=r.maskAnimation,X=r.className,G=r.getTriggerDOMNode,K=cx(r,mk),Z=j||S||!1,J=fx(e.useState(!1),2),Q=J[0],ee=J[1];Fx(function(){ee(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())},[]);var te=e.useRef({}),re=e.useContext(QE),ne=e.useMemo(function(){return{registerSubPopup:function(e,t){te.current[e]=t,null==re||re.registerSubPopup(e,t)}}},[re]),oe=QO(),ie=fx(e.useState(null),2),ae=ie[0],le=ie[1],se=e.useRef(null),ce=KO(function(e){se.current=e,aO(e)&&ae!==e&&le(e),null==re||re.registerSubPopup(oe,e)}),ue=fx(e.useState(null),2),pe=ue[0],fe=ue[1],de=e.useRef(null),me=KO(function(e){aO(e)&&pe!==e&&(fe(e),de.current=e)}),he=e.Children.only(a),ye=(null==he?void 0:he.props)||{},ve={},ge=KO(function(e){var t,r,n=pe;return(null==n?void 0:n.contains(e))||(null===(t=GO(n))||void 0===t?void 0:t.host)===e||e===n||(null==ae?void 0:ae.contains(e))||(null===(r=GO(ae))||void 0===r?void 0:r.host)===e||e===ae||Object.values(te.current).some(function(t){return(null==t?void 0:t.contains(e))||e===t})}),be=rk(i,$,U,H),we=rk(i,V,Y,q),xe=fx(e.useState(f||!1),2),Oe=xe[0],Ee=xe[1],ke=null!=p?p:Oe,je=KO(function(e){void 0===p&&Ee(e)});Fx(function(){Ee(p||!1)},[p]);var Se=e.useRef(ke);Se.current=ke;var Pe=e.useRef([]);Pe.current=[];var Ce=KO(function(e){var t;je(e),(null!==(t=Pe.current[Pe.current.length-1])&&void 0!==t?t:ke)!==e&&(Pe.current.push(e),null==d||d(e))}),Te=e.useRef(),Ne=function(){clearTimeout(Te.current)},Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Ne(),0===t?Ce(e):Te.current=setTimeout(function(){Ce(e)},1e3*t)};e.useEffect(function(){return Ne},[]);var Ae=fx(e.useState(!1),2),ze=Ae[0],Le=Ae[1];Fx(function(e){e&&!ke||Le(!0)},[ke]);var De=fx(e.useState(null),2),_e=De[0],Ie=De[1],Re=fx(e.useState(null),2),Be=Re[0],We=Re[1],Fe=function(e){We([e.clientX,e.clientY])},$e=fx(dk(ke,ae,R&&null!==Be?Be:pe,N,A,z,W),11),Ve=$e[0],He=$e[1],Ue=$e[2],qe=$e[3],Ye=$e[4],Xe=$e[5],Ge=$e[6],Ke=$e[7],Ze=$e[8],Je=$e[9],Qe=$e[10],et=function(t,r,n,o){return e.useMemo(function(){var e=ek(null!=n?n:r),i=ek(null!=o?o:r),a=new Set(e),l=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[a,l]},[t,r,n,o])}(Q,s,c,u),tt=fx(et,2),rt=tt[0],nt=tt[1],ot=rt.has("click"),it=nt.has("click")||nt.has("contextMenu"),at=KO(function(){ze||Qe()});!function(e,t,r,n,o){Fx(function(){if(e&&t&&r){var i=r,a=ok(t),l=ok(i),s=nk(i),c=new Set([s].concat(Bx(a),Bx(l)));function u(){n(),o()}return c.forEach(function(e){e.addEventListener("scroll",u,{passive:!0})}),s.addEventListener("resize",u,{passive:!0}),n(),function(){c.forEach(function(e){e.removeEventListener("scroll",u),s.removeEventListener("resize",u)})}}},[e,t,r])}(ke,pe,ae,at,function(){Se.current&&R&&it&&Me(!1)}),Fx(function(){at()},[Be,N]),Fx(function(){!ke||null!=A&&A[N]||at()},[JSON.stringify(z)]);var lt=e.useMemo(function(){var e=function(e,t,r,n){for(var o=r.points,i=Object.keys(e),a=0;a<i.length;a+=1){var l,s=i[a];if(tk(null===(l=e[s])||void 0===l?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(s)}return""}(A,i,Je,R);return mg(e,null==_?void 0:_(Je))},[Je,_,A,i,R]);e.useImperativeHandle(n,function(){return{nativeElement:de.current,popupElement:se.current,forceAlign:at}});var st=fx(e.useState(0),2),ct=st[0],ut=st[1],pt=fx(e.useState(0),2),ft=pt[0],dt=pt[1],mt=function(){if(D&&pe){var e=pe.getBoundingClientRect();ut(e.width),dt(e.height)}};function ht(e,t,r,n){ve[e]=function(o){var i;null==n||n(o),Me(t,r);for(var a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];null===(i=ye[e])||void 0===i||i.call.apply(i,[ye,o].concat(l))}}Fx(function(){_e&&(Qe(),_e(),Ie(null))},[_e]),(ot||it)&&(ve.onClick=function(e){var t;Se.current&&it?Me(!1):!Se.current&&ot&&(Fe(e),Me(!0));for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=ye.onClick)||void 0===t||t.call.apply(t,[ye,e].concat(n))});var yt,vt,gt=function(t,r,n,o,i,a,l,s){var c=e.useRef(t);c.current=t;var u=e.useRef(!1);return e.useEffect(function(){if(r&&o&&(!i||a)){var e=function(){u.current=!1},t=function(e){var t;!c.current||l((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||u.current||s(!1)},p=nk(o);p.addEventListener("pointerdown",e,!0),p.addEventListener("mousedown",t,!0),p.addEventListener("contextmenu",t,!0);var f,d,m=GO(n);return m&&(m.addEventListener("mousedown",t,!0),m.addEventListener("contextmenu",t,!0)),"production"!==process.env.NODE_ENV&&yx((null==n||null===(f=n.getRootNode)||void 0===f?void 0:f.call(n))===(null===(d=o.getRootNode)||void 0===d?void 0:d.call(o)),"trigger element and popup element should in same shadow root."),function(){p.removeEventListener("pointerdown",e,!0),p.removeEventListener("mousedown",t,!0),p.removeEventListener("contextmenu",t,!0),m&&(m.removeEventListener("mousedown",t,!0),m.removeEventListener("contextmenu",t,!0))}}},[r,n,o,i,a]),function(){u.current=!0}}(ke,it,pe,ae,w,O,ge,Me),bt=rt.has("hover"),wt=nt.has("hover");bt&&(ht("onMouseEnter",!0,h,function(e){Fe(e)}),ht("onPointerEnter",!0,h,function(e){Fe(e)}),yt=function(e){(ke||ze)&&null!=ae&&ae.contains(e.target)&&Me(!0,h)},R&&(ve.onMouseMove=function(e){var t;null===(t=ye.onMouseMove)||void 0===t||t.call(ye,e)})),wt&&(ht("onMouseLeave",!1,v),ht("onPointerLeave",!1,v),vt=function(){Me(!1,v)}),rt.has("focus")&&ht("onFocus",!0,g),nt.has("focus")&&ht("onBlur",!1,b),rt.has("contextMenu")&&(ve.onContextMenu=function(e){var t;Se.current&&nt.has("contextMenu")?Me(!1):(Fe(e),Me(!0)),e.preventDefault();for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=ye.onContextMenu)||void 0===t||t.call.apply(t,[ye,e].concat(n))}),X&&(ve.className=mg(ye.className,X));var xt=e.useRef(!1);xt.current||(xt.current=k||ke||ze);var Ot=sx(sx({},ye),ve),Et={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(function(e){K[e]&&(Et[e]=function(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null===(t=Ot[e])||void 0===t||t.call.apply(t,[Ot].concat(n)),K[e].apply(K,n)})});var kt=e.cloneElement(he,sx(sx({},Ot),Et)),jt={x:Xe,y:Ge},St=F?sx({},!0!==F?F:{}):null;return e.createElement(e.Fragment,null,e.createElement(YO,{disabled:!ke,ref:me,onResize:function(){mt(),at()}},e.createElement(JE,{getTriggerDOMNode:G},kt)),xt.current&&e.createElement(QE.Provider,{value:ne},e.createElement(ZE,{portal:t,ref:ce,prefixCls:i,popup:P,className:mg(C,lt),style:T,target:pe,onMouseEnter:yt,onMouseLeave:vt,onPointerEnter:yt,zIndex:L,open:ke,keepDom:ze,fresh:I,onClick:B,onPointerDownCapture:gt,mask:w,motion:be,maskMotion:we,onVisibleChanged:function(e){Le(!1),Qe(),null==m||m(e)},onPrepare:function(){return new Promise(function(e){mt(),Ie(function(){return e})})},forceRender:k,autoDestroy:Z,getPopupContainer:E,align:Je,arrow:St,arrowPos:jt,ready:Ve,offsetX:He,offsetY:Ue,offsetR:qe,offsetB:Ye,onAlign:at,stretch:D,targetWidth:ct/Ke,targetHeight:ft/Ze})))});return"production"!==process.env.NODE_ENV&&(r.displayName="Trigger"),r}(oO),yk={shiftX:64,adjustY:1},vk={adjustX:1,shiftY:!0},gk=[0,0],bk={left:{points:["cr","cl"],overflow:vk,offset:[-4,0],targetOffset:gk},right:{points:["cl","cr"],overflow:vk,offset:[4,0],targetOffset:gk},top:{points:["bc","tc"],overflow:yk,offset:[0,-4],targetOffset:gk},bottom:{points:["tc","bc"],overflow:yk,offset:[0,4],targetOffset:gk},topLeft:{points:["bl","tl"],overflow:yk,offset:[0,-4],targetOffset:gk},leftTop:{points:["tr","tl"],overflow:vk,offset:[-4,0],targetOffset:gk},topRight:{points:["br","tr"],overflow:yk,offset:[0,-4],targetOffset:gk},rightTop:{points:["tl","tr"],overflow:vk,offset:[4,0],targetOffset:gk},bottomRight:{points:["tr","br"],overflow:yk,offset:[0,4],targetOffset:gk},rightBottom:{points:["bl","br"],overflow:vk,offset:[4,0],targetOffset:gk},bottomLeft:{points:["tl","bl"],overflow:yk,offset:[0,4],targetOffset:gk},leftBottom:{points:["br","bl"],overflow:vk,offset:[-4,0],targetOffset:gk}},wk=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],xk=function(t,r){var n=t.overlayClassName,o=t.trigger,i=void 0===o?["hover"]:o,a=t.mouseEnterDelay,l=void 0===a?0:a,s=t.mouseLeaveDelay,u=void 0===s?.1:s,p=t.overlayStyle,f=t.prefixCls,m=void 0===f?"rc-tooltip":f,h=t.children,y=t.onVisibleChange,v=t.afterVisibleChange,g=t.transitionName,b=t.animation,w=t.motion,x=t.placement,O=void 0===x?"right":x,E=t.align,k=void 0===E?{}:E,j=t.destroyTooltipOnHide,S=void 0!==j&&j,P=t.defaultVisible,C=t.getTooltipContainer,T=t.overlayInnerStyle;t.arrowContent;var N=t.overlay,M=t.id,A=t.showArrow,z=void 0===A||A,L=t.classNames,D=t.styles,_=cx(t,wk),I=QO(M),R=c(null);d(r,function(){return R.current});var B=sx({},_);"visible"in t&&(B.popupVisible=t.visible);var W,F;return e.createElement(hk,nx({popupClassName:mg(n,null==L?void 0:L.root),prefixCls:m,popup:function(){return e.createElement(rx,{key:"content",prefixCls:m,id:I,bodyClassName:null==L?void 0:L.body,overlayInnerStyle:sx(sx({},T),null==D?void 0:D.body)},N)},action:i,builtinPlacements:bk,popupPlacement:O,ref:R,popupAlign:k,getPopupContainer:C,onPopupVisibleChange:y,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:b,popupMotion:w,defaultPopupVisible:P,autoDestroy:S,mouseLeaveDelay:u,popupStyle:sx(sx({},p),null==D?void 0:D.root),mouseEnterDelay:l,arrow:z},B),(W=e.Children.only(h),F=sx(sx({},(null==W?void 0:W.props)||{}),{},{"aria-describedby":N?I:null}),e.cloneElement(h,F)))},Ok=r(xk);const Ek=({title:e,description:r,footer:n,dataTestId:o,variant:i="default"})=>{const a=Boolean(r||n);return t.createElement("div",{"data-test-id":o,className:Ye("overflow-hidden break-words rounded-lg","border shadow-md","transition-all duration-150 animate-in fade-in zoom-in-95",a?"py-3 px-4":"py-2 px-3",{"bg-popover border-border":"default"===i,"bg-destructive border-destructive/20 text-destructive-foreground":"destructive"===i,"bg-muted border-muted/20":"muted"===i})},t.createElement("div",{className:Ye("flex items-center",!a&&"justify-center")},t.createElement(Eg,{fontWeight:"bold",variant:a?"regular":"small",className:Ye({"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},e)),r&&t.createElement("div",{className:"mt-1.5"},t.createElement(Eg,{variant:"small",className:Ye("opacity-90",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},r)),n&&t.createElement("div",{className:Ye("mt-3",a&&"pt-2",{"border-t border-border/40":"default"===i,"border-t border-destructive/20":"destructive"===i,"border-t border-muted-foreground/20":"muted"===i})},"string"==typeof n?t.createElement(Eg,{variant:"small",className:Ye("opacity-75",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},n):n))},kk=({overlay:e,title:r,description:n,footer:o,children:i,trigger:a="hover",mouseEnterDelay:s=.1,mouseLeaveDelay:c=.1,placement:u="top",variant:p="default",className:f,...d})=>{const m=l(()=>"function"==typeof e?e():e?t.createElement(t.Fragment,null,e):t.createElement(Ek,{title:r,description:n,footer:o,variant:p,dataTestId:d.dataTestId}),[n,o,e,r,p,d.dataTestId]);return r||n||e?t.createElement(Ok,{overlay:m,trigger:a,mouseEnterDelay:s,mouseLeaveDelay:c,placement:u,destroyTooltipOnHide:!0,overlayClassName:Ye("max-w-xs z-50",f),...d},t.createElement("span",{className:"inline-flex"},i)):i||null};function jk(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var Sk=["color"],Pk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Sk);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Ck=["color"],Tk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Ck);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Nk=["color"],Mk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Nk);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Ak=["color"],zk=r(function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=jk(e,Ak);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});const Lk=6048e5,Dk=Symbol.for("constructDateFrom");function _k(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Dk in e?e[Dk](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ik(e,t){return _k(t||e,e)}function Rk(e,t,r){const n=Ik(e,r?.in);return isNaN(t)?_k(r?.in||e,NaN):t?(n.setDate(n.getDate()+t),n):n}function Bk(e,t,r){const n=Ik(e,r?.in);if(isNaN(t))return _k(r?.in||e,NaN);if(!t)return n;const o=n.getDate(),i=_k(r?.in||e,n.getTime());i.setMonth(n.getMonth()+t+1,0);return o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}let Wk={};function Fk(){return Wk}function $k(e,t){const r=Fk(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ik(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Vk(e,t){return $k(e,{...t,weekStartsOn:1})}function Hk(e,t){const r=Ik(e,t?.in),n=r.getFullYear(),o=_k(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const i=Vk(o),a=_k(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=Vk(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function Uk(e){const t=Ik(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function qk(e,...t){const r=_k.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}function Yk(e,t){const r=Ik(e,t?.in);return r.setHours(0,0,0,0),r}function Xk(e,t,r){const[n,o]=qk(r?.in,e,t),i=Yk(n),a=Yk(o),l=+i-Uk(i),s=+a-Uk(a);return Math.round((l-s)/864e5)}function Gk(e,t,r){return Rk(e,7*t,r)}function Kk(e,t,r){return Bk(e,12*t,r)}function Zk(e,t){let r,n=t?.in;return e.forEach(e=>{n||"object"!=typeof e||(n=_k.bind(null,e));const t=Ik(e,n);(!r||r<t||isNaN(+t))&&(r=t)}),_k(n,r||NaN)}function Jk(e,t){let r,n=t?.in;return e.forEach(e=>{n||"object"!=typeof e||(n=_k.bind(null,e));const t=Ik(e,n);(!r||r>t||isNaN(+t))&&(r=t)}),_k(n,r||NaN)}function Qk(e,t,r){const[n,o]=qk(r?.in,e,t);return+Yk(n)===+Yk(o)}function ej(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function tj(e,t,r){const[n,o]=qk(r?.in,e,t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}function rj(e,t){const r=Ik(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function nj(e,t){const r=Ik(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function oj(e,t){const r=Ik(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function ij(e,t){const r=Fk(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ik(e,t?.in),i=o.getDay(),a=6+(i<n?-7:0)-(i-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function aj(e,t){return ij(e,{...t,weekStartsOn:1})}const lj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function sj(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const cj={date:sj({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sj({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sj({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},uj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pj(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=r?.width?String(r.width):t;n=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=r?.width?String(r.width):e.defaultWidth;n=e.values[o]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const fj={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:pj({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pj({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:pj({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:pj({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:pj({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function dj(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(l,e=>e.test(a)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(l,e=>e.test(a));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}const mj={ordinalNumber:(hj={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(hj.matchPattern);if(!r)return null;const n=r[0],o=e.match(hj.parsePattern);if(!o)return null;let i=hj.valueCallback?hj.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(n.length)}}),era:dj({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:dj({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:dj({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:dj({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:dj({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var hj;const yj={code:"en-US",formatDistance:(e,t,r)=>{let n;const o=lj[e];return n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:cj,formatRelative:(e,t,r,n)=>uj[e],localize:fj,match:mj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vj(e,t){const r=Ik(e,t?.in),n=+Vk(r)-+function(e,t){const r=Hk(e,t),n=_k(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Vk(n)}(r);return Math.round(n/Lk)+1}function gj(e,t){const r=Ik(e,t?.in),n=r.getFullYear(),o=Fk(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=_k(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const l=$k(a,t),s=_k(t?.in||e,0);s.setFullYear(n,0,i),s.setHours(0,0,0,0);const c=$k(s,t);return+r>=+l?n+1:+r>=+c?n:n-1}function bj(e,t){const r=Ik(e,t?.in),n=+$k(r,t)-+function(e,t){const r=Fk(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=gj(e,t),i=_k(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),$k(i,t)}(r,t);return Math.round(n/Lk)+1}function wj(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const xj={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return wj("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):wj(r+1,2)},d:(e,t)=>wj(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>wj(e.getHours()%12||12,t.length),H:(e,t)=>wj(e.getHours(),t.length),m:(e,t)=>wj(e.getMinutes(),t.length),s:(e,t)=>wj(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return wj(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Oj="midnight",Ej="noon",kj="morning",jj="afternoon",Sj="evening",Pj="night",Cj={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return xj.y(e,t)},Y:function(e,t,r,n){const o=gj(e,n),i=o>0?o:1-o;if("YY"===t){return wj(i%100,2)}return"Yo"===t?r.ordinalNumber(i,{unit:"year"}):wj(i,t.length)},R:function(e,t){return wj(Hk(e),t.length)},u:function(e,t){return wj(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return wj(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return wj(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return xj.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return wj(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=bj(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):wj(o,t.length)},I:function(e,t,r){const n=vj(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):wj(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):xj.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=Ik(e,t?.in);return Xk(r,oj(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):wj(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return wj(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return wj(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return wj(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(o=12===n?Ej:0===n?Oj:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(o=n>=17?Sj:n>=12?jj:n>=4?kj:Pj,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return xj.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):xj.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):wj(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):wj(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):xj.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):xj.s(e,t)},S:function(e,t){return xj.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Nj(n);case"XXXX":case"XX":return Mj(n);default:return Mj(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Nj(n);case"xxxx":case"xx":return Mj(n);default:return Mj(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tj(n,":");default:return"GMT"+Mj(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tj(n,":");default:return"GMT"+Mj(n,":")}},t:function(e,t,r){return wj(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return wj(+e,t.length)}};function Tj(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return 0===i?r+String(o):r+String(o)+t+wj(i,2)}function Nj(e,t){if(e%60==0){return(e>0?"-":"+")+wj(Math.abs(e)/60,2)}return Mj(e,t)}function Mj(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+wj(Math.trunc(n/60),2)+t+wj(n%60,2)}const Aj=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},zj=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Lj={p:zj,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Aj(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Aj(n,t)).replace("{{time}}",zj(o,t))}},Dj=/^D+$/,_j=/^Y+$/,Ij=["D","DD","YY","YYYY"];const Rj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wj=/^'([^]*?)'?$/,Fj=/''/g,$j=/[a-zA-Z]/;function Vj(e,t,r){const n=Fk(),o=r?.locale??n.locale??yj,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=Ik(e,r?.in);if(!function(e){return!(!ej(e)&&"number"!=typeof e||isNaN(+Ik(e)))}(l))throw new RangeError("Invalid time value");let s=t.match(Bj).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lj[t])(e,o.formatLong)}return e}).join("").match(Rj).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Hj(e)};if(Cj[t])return{isToken:!0,value:e};if(t.match($j))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return s.map(n=>{if(!n.isToken)return n.value;const i=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return _j.test(e)}(i)||!r?.useAdditionalDayOfYearTokens&&function(e){return Dj.test(e)}(i))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Ij.includes(e))throw new RangeError(n)}(i,t,String(e));return(0,Cj[i[0]])(l,i,o.localize,c)}).join("")}function Hj(e){const t=e.match(Wj);return t?t[1].replace(Fj,"'"):e}function Uj(e,t){return Ik(e,t?.in).getMonth()}function qj(e,t){const r=Ik(e,t?.in);return function(e,t,r){const[n,o]=qk(r?.in,e,t),i=$k(n,r),a=$k(o,r),l=+i-Uk(i),s=+a-Uk(a);return Math.round((l-s)/Lk)}(function(e,t){const r=Ik(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),Ik(r,t?.in)}(r,t),nj(r,t),t)+1}function Yj(e,t){return Ik(e,t?.in).getFullYear()}function Xj(e,t){return+Ik(e)>+Ik(t)}function Gj(e,t){return+Ik(e)<+Ik(t)}function Kj(e,t,r){const[n,o]=qk(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function Zj(e,t,r){return Rk(e,-t,r)}function Jj(e,t,r){const n=Ik(e,r?.in),o=n.getFullYear(),i=n.getDate(),a=_k(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=function(e,t){const r=Ik(e,t?.in),n=r.getFullYear(),o=r.getMonth(),i=_k(r,0);return i.setFullYear(n,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return n.setMonth(t,Math.min(i,l)),n}function Qj(e,t,r){const n=Ik(e,r?.in);return isNaN(+n)?_k(e,NaN):(n.setFullYear(t),n)}var eS=function(){return eS=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eS.apply(this,arguments)};function tS(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function rS(e){return"multiple"===e.mode}function nS(e){return"range"===e.mode}function oS(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var iS={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var aS=Object.freeze({__proto__:null,formatCaption:function(e,t){return Vj(e,"LLLL y",t)},formatDay:function(e,t){return Vj(e,"d",t)},formatMonthCaption:function(e,t){return Vj(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Vj(e,"cccccc",t)},formatYearCaption:function(e,t){return Vj(e,"yyyy",t)}}),lS=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Vj(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Vj(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var sS=m(void 0);function cS(e){var t,r,n=e.initialProps,o=function(){var e=iS,t=yj,r=new Date;return{captionLayout:"buttons",classNames:e,formatters:aS,labels:lS,locale:t,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:r,mode:"default"}}(),i=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=nj(n):t&&(i=new Date(t,0,1)),o?a=rj(o):r&&(a=new Date(r,11,31)),{fromDate:i?Yk(i):void 0,toDate:a?Yk(a):void 0}}(n),a=i.fromDate,l=i.toDate,s=null!==(t=n.captionLayout)&&void 0!==t?t:o.captionLayout;"buttons"===s||a&&l||(s="buttons"),(oS(n)||rS(n)||nS(n))&&(r=n.onSelect);var c=eS(eS(eS({},o),n),{captionLayout:s,classNames:eS(eS({},o.classNames),n.classNames),components:eS({},n.components),formatters:eS(eS({},o.formatters),n.formatters),fromDate:a,labels:eS(eS({},o.labels),n.labels),mode:n.mode||o.mode,modifiers:eS(eS({},o.modifiers),n.modifiers),modifiersClassNames:eS(eS({},o.modifiersClassNames),n.modifiersClassNames),onSelect:r,styles:eS(eS({},o.styles),n.styles),toDate:l});return k(sS.Provider,{value:c,children:e.children})}function uS(){var e=h(sS);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function pS(e){var t=uS(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return k("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function fS(e){return k("svg",eS({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:k("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function dS(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=uS(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:fS;return j("div",{className:l,style:s,children:[k("span",{className:c.classNames.vhidden,children:e["aria-label"]}),k("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),j("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,k(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function mS(e){var t,r=uS(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return k(S,{});if(!o)return k(S,{});var p=[];if(function(e,t,r){const[n,o]=qk(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var f=nj(n),d=n.getMonth();d<=o.getMonth();d++)p.push(Jj(f,d));else for(f=nj(new Date),d=0;d<=11;d++)p.push(Jj(f,d));var m=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:dS;return k(m,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=Jj(nj(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:p.map(function(e){return k("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())})})}function hS(e){var t,r=e.displayMonth,n=uS(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,p=n.labels.labelYearDropdown,f=[];if(!o)return k(S,{});if(!i)return k(S,{});for(var d=o.getFullYear(),m=i.getFullYear(),h=d;h<=m;h++)f.push(Qj(oj(new Date),h));var y=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:dS;return k(y,{name:"years","aria-label":p(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Qj(nj(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:f.map(function(e){return k("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())})})}function yS(){var e=uS(),t=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&tj(i,o)<0&&(o=Bk(i,-1*(s-1))),a&&tj(o,a)<0&&(o=a),nj(o)}(e),r=function(e,t){var r=i(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=nj(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var vS=m(void 0);function gS(e){var t=uS(),r=yS(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=nj(e),i=tj(nj(Bk(o,n)),o),a=[],l=0;l<i;l++){var s=Bk(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=nj(e);if(!r)return Bk(l,a);if(!(tj(r,e)<i))return Bk(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=nj(e);if(!r)return Bk(a,-i);if(!(tj(a,r)<=0))return Bk(a,-i)}}(n,t),s=function(e){return i.some(function(t){return Kj(e,t)})},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&Gj(e,r)?o(Bk(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return k(vS.Provider,{value:c,children:e.children})}function bS(){var e=h(vS);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function wS(e){var t,r=uS(),n=r.classNames,o=r.styles,i=r.components,a=bS().goToMonth,l=function(t){a(Bk(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:pS,c=k(s,{id:e.id,displayMonth:e.displayMonth});return j("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[k("div",{className:n.vhidden,children:c}),k(mS,{onChange:l,displayMonth:e.displayMonth}),k(hS,{onChange:l,displayMonth:e.displayMonth})]})}function xS(e){return k("svg",eS({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:k("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function OS(e){return k("svg",eS({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:k("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var ES=r(function(e,t){var r=uS(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=eS(eS({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),k("button",eS({},e,{ref:t,type:"button",className:a,style:l}))});function kS(e){var t,r,n=uS(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,p=n.components;if(!e.nextMonth&&!e.previousMonth)return k(S,{});var f=c(e.previousMonth,{locale:i}),d=[a.nav_button,a.nav_button_previous].join(" "),m=u(e.nextMonth,{locale:i}),h=[a.nav_button,a.nav_button_next].join(" "),y=null!==(t=null==p?void 0:p.IconRight)&&void 0!==t?t:OS,v=null!==(r=null==p?void 0:p.IconLeft)&&void 0!==r?r:xS;return j("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&k(ES,{name:"previous-month","aria-label":f,className:d,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:k("rtl"===o?y:v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&k(ES,{name:"next-month","aria-label":m,className:h,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:k("rtl"===o?v:y,{className:a.nav_icon,style:l.nav_icon})})]})}function jS(e){var t=uS().numberOfMonths,r=bS(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex(function(t){return Kj(e.displayMonth,t)}),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),p=t>1&&(c||!s);return k(kS,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:p,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function SS(e){var t,r,n=uS(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:pS;return r=i?k(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?k(wS,{displayMonth:e.displayMonth,id:e.id}):j(S,"dropdown-buttons"===l?{children:[k(wS,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),k(jS,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[k(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),k(jS,{displayMonth:e.displayMonth,id:e.id})]}),k("div",{className:o.caption,style:a.caption,children:r})}function PS(e){var t=uS(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?k("tfoot",{className:o,style:n.tfoot,children:k("tr",{children:k("td",{colSpan:8,children:r})})}):k(S,{})}function CS(){var e=uS(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?Vk(new Date):$k(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Rk(n,i);o.push(a)}return o}(o,i,a);return j("tr",{style:r.head_row,className:t.head_row,children:[n&&k("td",{style:r.head_cell,className:t.head_cell}),c.map(function(e,n){return k("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)})]})}function TS(){var e,t=uS(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:CS;return k("thead",{style:n.head,className:r.head,children:k(i,{})})}function NS(e){var t=uS(),r=t.locale,n=t.formatters.formatDay;return k(S,{children:n(e.date,{locale:r})})}var MS=m(void 0);function AS(e){if(!rS(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return k(MS.Provider,{value:t,children:e.children})}return k(zS,{initialProps:e.initialProps,children:e.children})}function zS(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push(function(e){var t=i&&n.length>i-1,r=n.some(function(t){return Qk(t,e)});return Boolean(t&&!r)});var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?tS([],n):[];if(r.selected){var u=c.findIndex(function(t){return Qk(e,t)});c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return k(MS.Provider,{value:l,children:r})}function LS(){var e=h(MS);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var DS,_S=m(void 0);function IS(e){if(!nS(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return k(_S.Provider,{value:t,children:e.children})}return k(RS,{initialProps:e.initialProps,children:e.children})}function RS(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],Qk(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:Zj(i,l-1),before:Rk(i,l-1)}),i&&a&&c.disabled.push({after:i,before:Rk(i,l-1)}),!i&&a&&c.disabled.push({after:Zj(a,l-1),before:Rk(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:Rk(i,1-s)}),c.disabled.push({after:Rk(i,s-1)})),i&&a){var u=s-(Xk(a,i)+1);c.disabled.push({before:Zj(i,u)}),c.disabled.push({after:Rk(a,u)})}!i&&a&&(c.disabled.push({before:Rk(a,1-s)}),c.disabled.push({after:Rk(a,s-1)}))}return k(_S.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(Qk(o,e)&&Qk(n,e))return;if(Qk(o,e))return{from:o,to:void 0};if(Qk(n,e))return;return Xj(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Xj(e,o)?{from:o,to:e}:{from:e,to:o}:n?Gj(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function BS(){var e=h(_S);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function WS(e){return Array.isArray(e)?tS([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(DS||(DS={}));var FS=DS.Selected,$S=DS.Disabled,VS=DS.Hidden,HS=DS.Today,US=DS.RangeEnd,qS=DS.RangeMiddle,YS=DS.RangeStart,XS=DS.Outside;var GS=m(void 0);function KS(e){var t=uS(),r=function(e,t,r){var n,o=((n={})[FS]=WS(e.selected),n[$S]=WS(e.disabled),n[VS]=WS(e.hidden),n[HS]=[e.today],n[US]=[],n[qS]=[],n[YS]=[],n[XS]=[],n);return e.fromDate&&o[$S].push({before:e.fromDate}),e.toDate&&o[$S].push({after:e.toDate}),rS(e)?o[$S]=o[$S].concat(t.modifiers[$S]):nS(e)&&(o[$S]=o[$S].concat(r.modifiers[$S]),o[YS]=r.modifiers[YS],o[qS]=r.modifiers[qS],o[US]=r.modifiers[US]),o}(t,LS(),BS()),n=function(e){var t={};return Object.entries(e).forEach(function(e){var r=e[0],n=e[1];t[r]=WS(n)}),t}(t.modifiers),o=eS(eS({},r),n);return k(GS.Provider,{value:o,children:e.children})}function ZS(){var e=h(GS);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function JS(e,t){return t.some(function(t){if("boolean"==typeof t)return t;if(ej(t))return Qk(e,t);if(function(e){return Array.isArray(e)&&e.every(ej)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(Xk(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),Xk(e,n)>=0&&Xk(o,e)>=0):o?Qk(o,e):!!n&&Qk(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=Xk(t.before,e)>0,n=Xk(t.after,e)<0;return Xj(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Xk(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Xk(t.before,e)>0:"function"==typeof t&&t(e)})}function QS(e,t,r){var n=Object.keys(t).reduce(function(r,n){var o=t[n];return JS(e,o)&&r.push(n),r},[]),o={};return n.forEach(function(e){return o[e]=!0}),r&&!Kj(e,r)&&(o.outside=!0),o}function eP(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,p=o.locale,f={day:Rk,week:Gk,month:Bk,year:Kk,startOfWeek:function(e){return o.ISOWeek?Vk(e):$k(e,{locale:p,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?aj(e):ij(e,{locale:p,weekStartsOn:s})}},d=f[r](e,"after"===n?1:-1);"before"===n&&c?d=Zk([c,d]):"after"===n&&u&&(d=Jk([u,d]));var m=!0;if(i){var h=QS(d,i);m=!h.disabled&&!h.hidden}return m?d:l.count>365?l.lastFocused:eP(d,{moveBy:r,direction:n,context:o,modifiers:i,retry:eS(eS({},l),{count:l.count+1})})}var tP=m(void 0);function rP(e){var t=bS(),r=ZS(),n=i(),o=n[0],a=n[1],l=i(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=nj(e[0]),i=rj(e[e.length-1]),a=o;a<=i;){var l=QS(a,t);if(l.disabled||l.hidden)a=Rk(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=Rk(a,1)}}return n||r}(t.displayMonths,r),p=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,f=function(e){a(e)},d=uS(),m=function(e,n){if(o){var i=eP(o,{moveBy:e,direction:n,context:d,modifiers:r});Qk(o,i)||(t.goToDate(i,o),f(i))}},h={focusedDay:o,focusTarget:p,blur:function(){c(o),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return k(tP.Provider,{value:h,children:e.children})}function nP(){var e=h(tP);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var oP=m(void 0);function iP(e){if(!oS(e.initialProps)){var t={selected:void 0};return k(oP.Provider,{value:t,children:e.children})}return k(aP,{initialProps:e.initialProps,children:e.children})}function aP(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return k(oP.Provider,{value:n,children:r})}function lP(){var e=h(oP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function sP(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(DS).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}}),r}function cP(e,t,r){var n,o,i,l=uS(),s=nP(),c=function(e,t){return QS(e,ZS(),t)}(e,t),u=function(e,t){var r=uS(),n=lP(),o=LS(),i=BS(),a=nP(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,p=a.blur,f=a.focus,d=a.focusMonthBefore,m=a.focusMonthAfter,h=a.focusYearBefore,y=a.focusYearAfter,v=a.focusStartOfWeek,g=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;oS(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):rS(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):nS(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;f(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;p(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():d();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():m();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),g()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(e,c),p=function(){var e=uS(),t=lP(),r=LS(),n=BS();return oS(e)?t.selected:rS(e)?r.selected:nS(e)?n.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);a(function(){var t;c.outside||s.focusedDay&&f&&Qk(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())},[s.focusedDay,e,r,f,c.outside]);var d=sP(l,c).join(" "),m=function(e,t){var r=eS({},e.styles.day);return Object.keys(t).forEach(function(t){var n;r=eS(eS({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])}),r}(l,c),h=Boolean(c.outside&&!l.showOutsideDays||c.hidden),y=null!==(i=null===(o=l.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:NS,v={style:m,className:d,children:k(y,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},g=s.focusTarget&&Qk(s.focusTarget,e)&&!c.outside,b=s.focusedDay&&Qk(s.focusedDay,e),w=eS(eS(eS({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=b||g?0:-1,n)),u);return{isButton:f,isHidden:h,activeModifiers:c,selectedDays:p,buttonProps:w,divProps:v}}function uP(e){var t=c(null),r=cP(e.date,e.displayMonth,t);return r.isHidden?k("div",{role:"gridcell"}):r.isButton?k(ES,eS({name:"day",ref:t},r.buttonProps)):k("div",eS({},r.divProps))}function pP(e){var t=e.number,r=e.dates,n=uS(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return k("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return k(ES,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function fP(e){var t,r,n,o=uS(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:uP,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:pP;return l&&(n=k("td",{className:a.cell,style:i.cell,children:k(u,{number:e.weekNumber,dates:e.dates})})),j("tr",{className:a.row,style:i.row,children:[n,e.dates.map(function(t){return k("td",{className:a.cell,style:i.cell,role:"presentation",children:k(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+Ik(e)/1e3)}(t))})]})}function dP(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?aj(t):ij(t,r),o=(null==r?void 0:r.ISOWeek)?Vk(e):$k(e,r),i=Xk(n,o),a=[],l=0;l<=i;l++)a.push(Rk(o,l));var s=a.reduce(function(e,t){var n=(null==r?void 0:r.ISOWeek)?vj(t):bj(t,r),o=e.find(function(e){return e.weekNumber===n});return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)},[]);return s}function mP(e){var t,r,n,o=uS(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,p=o.weekStartsOn,f=o.firstWeekContainsDate,d=o.ISOWeek,m=function(e,t){var r=dP(nj(e),rj(e),t);if(null==t?void 0:t.useFixedWeeks){var n=qj(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=Gk(i,6-n),l=dP(Gk(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:d,locale:i,weekStartsOn:p,firstWeekContainsDate:f}),h=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:TS,y=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:fP,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:PS;return j("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&k(h,{}),k("tbody",{className:a.tbody,style:l.tbody,children:m.map(function(t){return k(y,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),k(v,{displayMonth:e.displayMonth})]})}var hP="undefined"!=typeof window&&window.document&&window.document.createElement?f:a,yP=!1,vP=0;function gP(){return"react-day-picker-".concat(++vP)}function bP(e){var t,r,n=uS(),o=n.dir,l=n.classNames,s=n.styles,c=n.components,u=bS().displayMonths,p=function(e){var t,r=null!=e?e:yP?gP():null,n=i(r),o=n[0],l=n[1];return hP(function(){null===o&&l(gP())},[]),a(function(){!1===yP&&(yP=!0)},[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,d=[l.month],m=s.month,h=0===e.displayIndex,y=e.displayIndex===u.length-1,v=!h&&!y;"rtl"===o&&(y=(t=[h,y])[0],h=t[1]),h&&(d.push(l.caption_start),m=eS(eS({},m),s.caption_start)),y&&(d.push(l.caption_end),m=eS(eS({},m),s.caption_end)),v&&(d.push(l.caption_between),m=eS(eS({},m),s.caption_between));var g=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:SS;return j("div",{className:d.join(" "),style:m,children:[k(g,{id:p,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),k(mP,{id:f,"aria-labelledby":p,displayMonth:e.displayMonth})]},e.displayIndex)}function wP(e){var t=uS(),r=t.classNames,n=t.styles;return k("div",{className:r.months,style:n.months,children:e.children})}function xP(e){var t,r,n=e.initialProps,o=uS(),l=nP(),s=bS(),c=i(!1),u=c[0],p=c[1];a(function(){o.initialFocus&&l.focusTarget&&(u||(l.focus(l.focusTarget),p(!0)))},[o.initialFocus,u,l.focus,l.focusTarget,l]);var f=[o.classNames.root,o.className];o.numberOfMonths>1&&f.push(o.classNames.multiple_months),o.showWeekNumber&&f.push(o.classNames.with_weeknumber);var d=eS(eS({},o.styles.root),o.style),m=Object.keys(n).filter(function(e){return e.startsWith("data-")}).reduce(function(e,t){var r;return eS(eS({},e),((r={})[t]=n[t],r))},{}),h=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:wP;return k("div",eS({className:f.join(" "),style:d,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},m,{children:k(h,{children:s.displayMonths.map(function(e,t){return k(bP,{displayIndex:t,displayMonth:e},t)})})}))}function OP(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return k(cS,{initialProps:r,children:k(gS,{children:k(iP,{initialProps:r,children:k(AS,{initialProps:r,children:k(IS,{initialProps:r,children:k(KS,{children:k(rP,{children:t})})})})})})})}function EP(e){return k(OP,eS({},e,{children:k(xP,{initialProps:e})}))}var kP=Symbol.for("react.lazy"),jP=e[" use ".trim().toString()];function SP(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===kP&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function PP(t){const r=TP(t),n=e.forwardRef((t,n)=>{let{children:o,...i}=t;SP(o)&&"function"==typeof jP&&(o=jP(o._payload));const a=e.Children.toArray(o),l=a.find(MP);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}var CP=PP("Slot");function TP(t){const r=e.forwardRef((t,r)=>{let{children:n,...o}=t;if(SP(n)&&"function"==typeof jP&&(n=jP(n._payload)),e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Ag(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var NP=Symbol("radix.slottable");function MP(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===NP}const AP=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,zP=A,LP=((e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return zP(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;const a=AP(t)||AP(n);return o[e][a]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),s=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...l}[t]):{...i,...l}[t]===r})?[...e,r,n]:e},[]);return zP(e,a,s,null==r?void 0:r.class,null==r?void 0:r.className)})("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),DP=e.forwardRef(({className:t,variant:r,size:n,asChild:o=!1,...i},a)=>{const l=o?CP:"button";return e.createElement(l,{className:Ye(LP({variant:r,size:n,className:t})),ref:a,...i})});DP.displayName="Button";const _P=({className:e,classNames:r,showOutsideDays:n=!0,...o})=>t.createElement(EP,{showOutsideDays:n,className:Ye("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ye(LP({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Ye("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Ye(LP({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...r},components:{IconLeft:()=>t.createElement(Pk,{className:"h-4 w-4"}),IconRight:()=>t.createElement(Tk,{className:"h-4 w-4"})},...o});_P.displayName="Calendar";const IP={arrow:"arrow",slash:"slash",icon:"icon"},RP={small:{text:"text-xs",icon:"h-3 w-3",spacing:"py-0.5 px-1.5"},medium:{text:"text-sm",icon:"h-4 w-4",spacing:"py-1 px-2"},large:{text:"text-base",icon:"h-5 w-5",spacing:"py-1.5 px-2.5"}},BP=e.forwardRef(({variant:t,size:r,className:n,...o},i)=>{const a={slash:e.createElement("span",{className:"mx-2 text-muted-foreground/50 select-none"},"/"),arrow:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(at,{className:Ye(RP[r].icon,"text-muted-foreground/50")})),icon:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(at,{className:Ye(RP[r].icon,"text-muted-foreground/50")}))};return e.createElement("span",{ref:i,className:Ye("flex items-center",n),...o},a[t])});BP.displayName="BreadCrumbSeparator";const WP=e.forwardRef(({items:t,variant:r="slash",size:n="medium",maxItems:o=4,className:a,...s},c)=>{const[u,p]=i(!1),[f,d]=i(null),m=l(()=>{if(u||t.length<=o)return t;return[...t.slice(0,1),{label:"...",href:"#"},...t.slice(-2)]},[t,o,u]);return e.createElement("nav",{ref:c,"aria-label":"BreadCrumb",className:Ye("w-full p-3 select-none",a),...s},e.createElement("ol",{className:"flex items-center flex-wrap gap-y-2"},"icon"===r&&e.createElement("li",{className:"flex items-center"},e.createElement("a",{href:"/",className:Ye("text-muted-foreground/80 transition-colors duration-150","hover:text-primary focus-visible:text-primary","outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm")},e.createElement(pt,{className:RP[n].icon}),e.createElement("span",{className:"sr-only"},"Home"))),m.map((t,o)=>{const i=o===m.length-1,a="..."===t.label,l=f===o;return e.createElement("li",{key:t.href,className:"flex items-center group",onMouseEnter:()=>d(o),onMouseLeave:()=>d(null)},o>0&&e.createElement(BP,{variant:r,size:n}),"icon"===r&&!a&&e.createElement("span",{className:"mr-1"},t.icon||e.createElement(ut,{className:Ye(RP[n].icon,"text-muted-foreground/80")})),e.createElement("a",{href:a?void 0:t.href,className:Ye("font-medium relative inline-flex items-center","transition-all duration-150","outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm",RP[n].text,RP[n].spacing,i?"text-primary cursor-default font-semibold":"text-muted-foreground/80 hover:text-muted-foreground",!i&&["after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0","after:bg-primary/50 after:transition-all after:duration-150",l&&"after:w-full"],a&&"cursor-pointer hover:text-primary"),onClick:e=>{a&&(e.preventDefault(),p(!0))},...!i&&{role:"link","aria-current":void 0},...i&&{"aria-current":"page"}},e.createElement("span",{className:"relative"},t.label)))})))});WP.displayName="BreadCrumb";const FP={small:{trigger:"px-3 py-2 text-sm",icon:"h-4 w-4",optionIcon:"h-4 w-4",option:"px-2.5 py-2",optionText:"text-sm",description:"text-xs"},medium:{trigger:"px-4 py-3 text-base",icon:"h-5 w-5",optionIcon:"h-5 w-5",option:"px-3 py-2.5",optionText:"text-sm",description:"text-xs"},large:{trigger:"px-5 py-4 text-lg",icon:"h-6 w-6",optionIcon:"h-6 w-6",option:"px-4 py-3",optionText:"text-base",description:"text-sm"}},$P={basic:{trigger:"border border-border hover:border-primary/20",content:"border border-border"},"shadow-sm":{trigger:"shadow-lg hover:shadow-xl",content:"shadow-xl"}},VP=({text:e,className:r=""})=>{const{textRef:n,isTruncated:o}=(()=>{const e=c(null),[t,r]=i(!1),n=s(()=>{if(e.current){const t=e.current;r(t.scrollWidth>t.clientWidth)}},[]);return a(()=>{n();const t=e.current,r=new ResizeObserver(()=>{n()});return t&&r.observe(t),window.addEventListener("resize",n),()=>{t&&r.unobserve(t),r.disconnect(),window.removeEventListener("resize",n)}},[n]),{textRef:e,isTruncated:t}})();return o?t.createElement(kk,{title:e,trigger:"hover"},t.createElement("span",{ref:n,className:Ye("truncate block w-full max-w-full",r)},e)):t.createElement("span",{ref:n,className:Ye("truncate block w-full max-w-full",r)},e)},HP=r(({options:e,value:r,onValueChange:n,placeholder:o="",disabled:u=!1,showIcons:p=!0,size:f="medium",variant:d="basic",className:m,classNames:h,searchable:g=!1,onSearch:b,multiple:w=!1},x)=>{const[O,E]=i(!1),[k,j]=i(-1),[S,P]=i(""),[C,T]=i(null),[N,M]=i(""),[A,z]=i(0),[L,D]=i(!1),_=c(null),I=c(null),R=c(null),B=c([]),W=l(()=>w?Array.isArray(r)?r:[]:r&&"string"==typeof r?[r]:[],[r,w]),F=l(()=>e.filter(e=>W.includes(e.id)),[e,W]),$=l(()=>FP[f],[f]),V=l(()=>g&&N?e.filter(e=>e.label.toLowerCase().includes(N.toLowerCase())):e,[e,g,N]);a(()=>{if(O&&I.current){const e=I.current.getBoundingClientRect(),t=300,r=window.innerHeight-e.bottom,n=e.top;D(r<t&&n>t)}},[O]),a(()=>()=>{C&&clearTimeout(C)},[C]),a(()=>{const e=()=>{I.current&&z(I.current.offsetWidth)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),a(()=>{O?g&&R.current&&R.current.focus():(j(-1),M(""))},[O,g]),a(()=>{O&&k>=0&&B.current[k]&&B.current[k]?.scrollIntoView({block:"nearest"})},[O,k]),a(()=>{const e=e=>{_.current&&!_.current.contains(e.target)&&E(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),a(()=>{g&&b&&b(N)},[N,b,g]);const H=s(e=>{if(w){const t=W.includes(e)?W.filter(t=>t!==e):[...W,e];n?.(t)}else n?.(e),E(!1)},[w,W,n]),U=s((e,t)=>{if(t.stopPropagation(),w){const t=W.filter(t=>t!==e);n?.(t)}},[w,W,n]),q=l(()=>{if(!d)return{trigger:"",content:""};const e=$P[d]||{trigger:"",content:""};return{trigger:e.trigger||"",content:e.content||""}},[d]),Y=s(e=>{if(!u)switch(e.key){case"ArrowDown":e.preventDefault(),O?j(e=>Math.min(e+1,V.length-1)):(E(!0),j(0));break;case"ArrowUp":e.preventDefault(),O?j(e=>Math.max(e-1,0)):(E(!0),j(V.length-1));break;case"Home":e.preventDefault(),O&&j(0);break;case"End":e.preventDefault(),O&&j(V.length-1);break;case"Enter":case" ":if(e.preventDefault(),O&&k>=0){const e=V[k];e.disabled||H(e.id)}else E(!O);break;case"Escape":e.preventDefault(),E(!1);break;default:if(!g&&1===e.key.length){const t=e.key.toLowerCase();C&&clearTimeout(C);const r=S+t;P(r);const n=V.findIndex(e=>e.label.toLowerCase().startsWith(r));n>=0&&(j(n),O||E(!0));const o=setTimeout(()=>{P("")},1e3);T(o)}}},[u,O,V,S,C,H,k,g]),X=s((e,t,r)=>{r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),H(t))},[H]),G=s(e=>{M(e.target.value),j(0)},[]);return t.createElement("div",{ref:_,className:"relative max-w-full"},t.createElement("button",{type:"button",ref:e=>{"function"==typeof x?x(e):x&&(x.current=e),I.current=e},onClick:()=>!u&&E(!O),onKeyDown:Y,className:Ye("group flex w-full items-center justify-between rounded-xl",F.length>0?"bg-background/100":"bg-background","transition-all duration-200 ease-out","hover:shadow-md","focus:outline-hidden focus:ring-2 focus:ring-primary/20 focus:ring-offset-2",u&&"cursor-not-allowed opacity-50",O&&"border-primary/30 bg-primary/5 shadow-lg","max-w-full text-ellipsis whitespace-nowrap",$.trigger,q.trigger,m,h?.trigger),disabled:u,"aria-expanded":O,"aria-haspopup":"listbox","aria-controls":"dropdown-options","aria-label":o},t.createElement("div",{className:"flex items-center gap-3 min-w-0 w-full overflow-hidden"},(()=>{if(0===F.length)return t.createElement(VP,{text:o,className:Ye("font-medium",$.optionText)});if(w&&F.length>0)return t.createElement("div",{className:"flex flex-wrap gap-1.5 min-w-0 flex-1"},F.map(e=>t.createElement("div",{key:e.id,className:"flex items-center gap-1 rounded-md bg-primary/10 px-2 py-0.5 text-sm",onClick:e=>e.stopPropagation()},p&&e.icon&&t.createElement("span",{className:"text-primary/70 flex-shrink-0"},v(e.icon,{})),t.createElement("span",{className:"truncate max-w-[120px]"},e.label),t.createElement("button",{type:"button",onClick:t=>U(e.id,t),className:"text-primary/70 hover:text-primary flex-shrink-0"},t.createElement(ht,{className:"w-3 h-3"})))));const e=F[0];return t.createElement(t.Fragment,null,p&&e?.icon&&t.createElement("span",{className:"text-primary/70 transition-colors duration-200 group-hover:text-primary flex-shrink-0"},v(e.icon,{})),t.createElement(VP,{text:e.label,className:Ye("font-medium",$.optionText)}))})()),t.createElement(ot,{className:Ye("text-primary/70 transition-all duration-300","group-hover:text-primary",O&&"rotate-180",$.icon,"flex-shrink-0 ml-2")})),t.createElement("div",{id:"dropdown-options",role:"listbox","aria-label":o,"aria-multiselectable":w,className:Ye("z-50 origin-top-right","rounded-xl border border-border/50 bg-background p-1.5","shadow-lg backdrop-blur-xs","transition-all duration-200 ease-out",O?"visible scale-100 opacity-100":"invisible scale-95 opacity-0","absolute left-0","max-w-full overflow-hidden",L?"bottom-full mb-2":"top-full mt-2",q.content,h?.content),style:{width:A>0?`${A}px`:"auto",maxWidth:"100%"}},g&&t.createElement("div",{className:"sticky top-0 z-10 mb-1.5 bg-background/100 px-2 py-1.5 max-w-full"},t.createElement("div",{className:"relative max-w-full"},t.createElement(mt,{className:Ye("absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",$.icon)}),t.createElement("input",{ref:R,type:"text",value:N,onChange:G,onClick:e=>e.stopPropagation(),placeholder:"Search...",className:Ye("w-full rounded-lg border border-border bg-background py-2","pl-9 pr-2 text-sm placeholder:text-muted-foreground","focus:border-primary/30 focus:outline-hidden focus:ring-1 focus:ring-primary/20","max-w-full text-ellipsis",$.optionText)}))),t.createElement("div",{className:"max-h-72 overflow-auto max-w-full"},0===V.length?t.createElement("div",{className:"px-3 py-2 text-sm text-muted-foreground truncate max-w-full"},"No options found"):V.map((e,r)=>{const n=W.includes(e.id);return t.createElement(y,{key:e.id},t.createElement("div",{ref:e=>{B.current[r]=e},role:"option",tabIndex:O&&!e.disabled?0:-1,"aria-selected":n,onClick:()=>!e.disabled&&H(e.id),onKeyDown:t=>X(t,e.id,!!e.disabled),className:Ye("group relative flex select-none items-center gap-3 rounded-lg","cursor-pointer transition-all duration-200","hover:bg-primary/10","focus:outline-hidden focus:ring-2 focus:ring-primary/20",e.disabled&&"pointer-events-none opacity-50",(n||r===k)&&"bg-primary/5 border border-primary/20","max-w-full",$.option,h?.item)},p&&e.icon&&t.createElement("span",{className:Ye("text-primary/70 transition-colors duration-200","group-hover:text-primary","flex-shrink-0",h?.itemIcon)},v(e.icon)),t.createElement("div",{className:"flex flex-col gap-0.5 min-w-0 flex-grow overflow-hidden max-w-full"},t.createElement(VP,{text:e.label,className:Ye("font-medium leading-none","transition-colors duration-200","group-hover:text-primary",$.optionText,h?.itemText)}),e.description&&t.createElement(VP,{text:e.description,className:Ye("text-muted-foreground","transition-colors duration-200","group-hover:text-primary/70",$.description,h?.description)})),n&&t.createElement(nt,{className:Ye("ml-auto text-primary flex-shrink-0",$.icon)})),r<V.length-1&&t.createElement("div",{className:Ye("my-1.5 h-px bg-border/50",h?.separator)}))}))))});HP.displayName="Dropdown";const UP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("rounded-xl border bg-card text-card-foreground shadow-sm",t),...r}));UP.displayName="Card";const qP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("flex flex-col space-y-1.5 p-6",t),...r}));qP.displayName="CardHeader";const YP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("font-semibold leading-none tracking-tight",t),...r}));YP.displayName="CardTitle";const XP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));XP.displayName="CardDescription";const GP=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("p-6 pt-0",t),...r}));GP.displayName="CardContent";function KP({className:e,...r}){return t.createElement("div",{className:Ye("animate-pulse rounded-md bg-primary/10",e),...r})}e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("flex items-center p-6 pt-0",t),...r})).displayName="CardFooter";const ZP=({headerRows:e=2,contentRows:r=3,headerRowHeight:n="h-6",contentRowHeight:o="h-5",gridCols:i=2,gridHeight:a="h-64",className:l})=>t.createElement(UP,{className:Ye("overflow-hidden",l)},t.createElement(qP,{className:"border-b"},t.createElement("div",{className:"space-y-8"},Array.from({length:e}).map((e,r)=>t.createElement(KP,{key:r,className:Ye(n,0===r?"w-1/3":"w-2/3")})),i>0&&t.createElement("div",{className:Ye("grid gap-8",{"grid-cols-1":1===i,"grid-cols-1 md:grid-cols-2":2===i,"grid-cols-1 md:grid-cols-3":3===i,"grid-cols-1 md:grid-cols-4":4===i})},Array.from({length:i}).map((e,r)=>t.createElement(KP,{key:r,className:a}))))),t.createElement(GP,{className:"mt-6 space-y-6"},Array.from({length:r}).map((e,r)=>t.createElement("div",{key:r,className:"flex gap-4"},t.createElement(KP,{className:Ye("w-5",o)}),t.createElement("div",{className:"space-y-2 flex-1"},t.createElement(KP,{className:Ye("w-3/4",o)}),t.createElement(KP,{className:Ye("w-1/2",o)})))))),JP=({rows:e=5,className:r})=>t.createElement(UP,{className:Ye("shadow-lg border-border",r)},t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-48"})),t.createElement(GP,null,t.createElement("div",{className:"space-y-4"},Array.from({length:e}).map((e,r)=>t.createElement(KP,{key:r,className:"h-16 w-full"}))))),QP=({className:e,rows:r=3,rowHeight:n="h-4",mainHeight:o="h-24",firstRowWidth:i="w-3/5",secondRowWidth:a="w-4/5"})=>t.createElement(UP,{className:e},t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-48"})),t.createElement(GP,{className:"space-y-4"},t.createElement(KP,{className:o}),Array.from({length:r}).map((e,r)=>t.createElement(KP,{key:r,className:Ye(n,0===r?i:a)})))),eC=()=>t.createElement("div",{className:"space-y-6"},t.createElement("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Array.from({length:4}).map((e,r)=>t.createElement(UP,{key:r},t.createElement(qP,{className:"flex flex-row items-center justify-between pb-2"},t.createElement(KP,{className:"h-5 w-1/2"}),t.createElement(KP,{className:"h-4 w-4"})),t.createElement(GP,null,t.createElement(KP,{className:"h-8 w-full"}),t.createElement(KP,{className:"mt-4 h-4 w-3/4"}))))),t.createElement("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2"},t.createElement(UP,null,t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-40"})),t.createElement(GP,null,t.createElement(KP,{className:"h-[200px]"}))),t.createElement(UP,null,t.createElement(qP,null,t.createElement(KP,{className:"h-8 w-40"})),t.createElement(GP,null,t.createElement("div",{className:"space-y-2"},Array.from({length:5}).map((e,r)=>t.createElement("div",{key:r,className:"flex justify-between"},t.createElement(KP,{className:"h-4 w-[100px]"}),t.createElement(KP,{className:"h-4 w-[60px]"})))))))),tC=t.forwardRef(({variant:e="card",rows:r=5,className:n,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l,headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:p,gridCols:f,gridHeight:d,...m},h)=>{const y={card:t.createElement(ZP,{headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:p,gridCols:f,gridHeight:d,className:n}),table:t.createElement(JP,{rows:r,className:n}),simple:t.createElement(QP,{className:n,rows:r,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l}),dashboard:t.createElement(eC,null)};return t.createElement("div",{ref:h,...m},y[e])});tC.displayName="CustomSkeleton";const rC={small:{padding:"p-3 sm:p-4",titleSize:"text-base sm:text-lg",descSize:"text-sm sm:text-base",imageHeight:"h-24 sm:h-32 md:h-36",spacing:"space-y-2"},medium:{padding:"p-4 sm:p-5 md:p-6",titleSize:"text-lg sm:text-xl md:text-2xl",descSize:"text-sm sm:text-base md:text-lg",imageHeight:"h-32 sm:h-40 md:h-48 lg:h-56",spacing:"space-y-3"},large:{padding:"p-5 sm:p-6 md:p-7 lg:p-8",titleSize:"text-xl sm:text-2xl md:text-3xl",descSize:"text-base sm:text-lg md:text-xl",imageHeight:"h-40 sm:h-48 md:h-56 lg:h-64",spacing:"space-y-4"},custom:{padding:"",titleSize:"text-lg",descSize:"text-base",imageHeight:"",spacing:"space-y-3"}},nC={none:"",sm:"space-y-2",md:"space-y-3",lg:"space-y-4"},oC={none:"",sm:"shadow-sm",md:"shadow",lg:"shadow-md",xl:"shadow-lg"},iC={none:"",lift:"transition-transform duration-300 hover:-translate-y-1",glow:"transition-shadow duration-300 hover:shadow-glow",scale:"transition-transform duration-300 hover:scale-[1.02]",border:"transition-colors duration-300 hover:border-primary"},aC={none:"rounded-none",sm:"rounded",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},lC={"top-right":"absolute right-4 top-4 z-10","top-left":"absolute left-4 top-4 z-10","bottom-right":"absolute right-4 bottom-4 z-10","bottom-left":"absolute left-4 bottom-4 z-10"},sC={default:{kind:"default",wrapper:"bg-card border border-border",gradients:[]},gradiant:{kind:"gradiant",wrapper:"relative overflow-hidden bg-card border border-border shadow-xs",gradients:["absolute inset-0 bg-primary/20","absolute inset-0 bg-linear-to-tr from-primary/10 via-transparent to-transparent"]},outline:{kind:"outline",wrapper:"bg-transparent border-2 border-border",gradients:[]},solid:{kind:"solid",wrapper:"bg-primary/10 border border-primary/20",gradients:[]},glass:{kind:"glass",wrapper:"bg-card/80 backdrop-blur-md border border-white/20",gradients:["absolute inset-0 bg-gradient-to-tr from-white/5 to-white/10"]}},cC=({title:e,description:r,children:n,variant:o="gradiant",size:a="medium",shadow:l="none",hoverEffect:c="none",borderRadius:u="lg",image:p,imagePosition:f="top",imageHeight:d,badge:m,badgePosition:h="top-right",footer:y,header:v,padding:g,spacing:b="md",width:w,height:x,maxWidth:O,className:E,contentClassName:k,titleClassName:j,descriptionClassName:S,imageClassName:P,onClick:C,href:T,interactive:N=!1,disabled:M=!1})=>{const[A,z]=i(!p),L=s(()=>{z(!0)},[]),D=sC[o],_=rC[a],I=oC[l],R=iC[c],B=aC[u],W="none"===b?"":nC[b]||_.spacing,F=lC[h],$=g||_.padding,V=d||_.imageHeight,H=N?"cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary dark:focus:ring-primary focus:ring-offset-2 dark:focus:ring-offset-background-dark":"",U=M?"opacity-60 pointer-events-none":"",q=s(e=>{!M&&C&&C()},[M,C]),Y=t.createElement(t.Fragment,null,v&&t.createElement("div",{"data-testid":"header",className:"mb-4"},v),m&&t.createElement("div",{"data-testid":"badge-wrapper",className:F},"string"==typeof m?t.createElement("span",{className:"inline-flex items-center rounded-full bg-primary px-3 py-1 text-xs font-medium text-primary-foreground dark:text-primary-foreground-dark ring-1 ring-inset ring-primary/10 dark:ring-primary/20"},m):m),t.createElement("div",{className:Ye(W,D.content&&"default"!==o&&"p-6",k)},p&&"top"===f&&t.createElement("div",{"data-testid":"image-wrapper",className:Ye("relative w-full overflow-hidden",B,V,"mb-6",P)},t.createElement("div",{"data-testid":"image-container",className:Ye(A?"opacity-100":"opacity-0","transition-opacity duration-300")},t.createElement("img",{src:p,alt:e||"Card image",className:"h-full w-full object-cover",onLoad:L}))),e&&t.createElement("h3",{"data-testid":"title",className:Ye("font-semibold tracking-tight text-foreground dark:text-foreground-dark",_.titleSize,j)},e),r&&t.createElement("p",{"data-testid":"description",className:Ye("text-muted-foreground dark:text-muted-foreground-dark leading-relaxed",_.descSize,S)},r),n&&t.createElement("div",{className:Ye("mt-4")},n),y&&t.createElement("div",{"data-testid":"footer",className:"mt-6 pt-4 border-t border-border dark:border-border-dark"},y))),X=D.content?t.createElement("div",{className:D.content},Y):Y,G={width:w||"auto",height:x||"auto",maxWidth:O||"none",...p&&"background"===f?{backgroundImage:`url(${p})`,backgroundSize:"cover",backgroundPosition:"center"}:{}},K=T?"a":"div",Z=T?{href:T,...N?{tabIndex:0}:{}}:{},J=C?{onClick:q,role:"button",tabIndex:N&&!M?0:void 0}:{};return t.createElement(K,{...Z,...J,className:Ye(D.wrapper,B,I,R,H,U,E),style:G},t.createElement("div",{"data-testid":"gradient-wrapper"},D.gradients&&D.gradients.map((e,r)=>t.createElement("div",{key:r,className:e}))),D.inner?t.createElement("div",{className:Ye(D.inner,$)},t.createElement("div",{className:"relative"},X)):t.createElement("div",{className:Ye("relative",$)},X))};cC.displayName="Card";const uC={small:"h-10 w-10",medium:"h-14 w-14 md:h-20 md:w-20",large:"h-28 w-28"},pC=({variant:e="spinner",size:r="medium",className:n,ariaLabel:o="Loading",colorScheme:i})=>{const a=uC[r];return t.createElement("div",{role:"status","aria-label":o,className:Ye("flex items-center justify-center",n)},(()=>{switch(e){case"dots":return t.createElement("div",{className:"flex space-x-2"},[0,1,2].map(e=>t.createElement("div",{key:e,className:Ye("w-3 h-3 rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bounce",1===e&&"animate-bounce-delay-1",2===e&&"animate-bounce-delay-2"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}})));case"bars":return t.createElement("div",{className:"flex space-x-1 h-10 items-center"},[0,1,2,3].map(e=>t.createElement("div",{key:e,className:Ye("w-2 h-full rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bar-scale",1===e&&"animate-bar-scale-delay-1",2===e&&"animate-bar-scale-delay-2",3===e&&"animate-bar-scale-delay-3"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}})));case"orbit":return t.createElement("div",{className:Ye("relative aspect-square flex items-center justify-center",{"w-20 h-20":"small"===r,"w-32 h-32":"medium"===r,"w-40 h-40":"large"===r},n)},t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:3rem]"},t.createElement("div",{className:Ye("absolute w-4 h-4 rounded-full animate-orbit-medium","harford"!==i&&"bg-primary/70 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.7)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:Ye("absolute inset-0 rounded-full blur-xs","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:Ye("absolute w-2 h-2 rounded-full animate-orbit-reverse-medium","harford"!==i&&"bg-primary/60 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 4px 6px -1px rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:4rem]"},t.createElement("div",{className:Ye("absolute w-5 h-5 rounded-full animate-orbit-slow","harford"!==i&&"bg-primary/60 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 20px 25px -5px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:Ye("absolute inset-0 rounded-full blur-xs","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:Ye("absolute w-3 h-3 rounded-full animate-orbit-reverse-slow","harford"!==i&&"bg-primary/50 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.5)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.3)"}:{}})));default:return t.createElement("div",{className:"relative"},t.createElement("div",{className:Ye("relative",a)},t.createElement("div",{className:Ye("absolute inset-0 rounded-full border-4","harford"!==i&&"border-primary/30","animate-ping-slow"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.3)"}:{}}),t.createElement("div",{className:Ye("absolute inset-0 rounded-full border-4 border-transparent","harford"!==i&&"border-t-primary border-l-primary","animate-spin-slow"),style:"harford"===i?{borderTopColor:"#043d5a",borderLeftColor:"#043d5a"}:{}}),t.createElement("div",{className:Ye("absolute inset-0 rounded-full","border-[3px] border-dashed","harford"!==i&&"border-primary/50","animate-spin-slower"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.5)"}:{}}),t.createElement("div",{className:Ye("absolute inset-2 rounded-full border-4 border-transparent","harford"!==i&&"border-r-primary/70 border-b-primary/70","animate-spin-reverse"),style:"harford"===i?{borderRightColor:"rgba(4, 61, 90, 0.7)",borderBottomColor:"rgba(4, 61, 90, 0.7)"}:{}})))}})(),t.createElement("span",{className:"sr-only"},o))};pC.displayName="Loader";var fC,dC="dismissableLayer.update",mC="dismissableLayer.pointerDownOutside",hC="dismissableLayer.focusOutside",yC=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vC=e.forwardRef((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(yC),[p,f]=e.useState(null),d=p?.ownerDocument??globalThis?.document,[,m]=e.useState({}),h=zg(r,e=>f(e)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(v),b=p?y.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=g,O=function(t,r=globalThis?.document){const n=Xg(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){bC(mC,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout(()=>{r.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}},[r,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));x&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())},d),E=function(t,r=globalThis?.document){const n=Xg(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){bC(hC,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(a?.(e),l?.(e),e.defaultPrevented||s?.())},d);return function(t,r=globalThis?.document){const n=Xg(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})},[n,r])}(e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},d),e.useEffect(()=>{if(p)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(fC=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),gC(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=fC)}},[p,d,n,u]),e.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),gC())},[p,u]),e.useEffect(()=>{const e=()=>m({});return document.addEventListener(dC,e),()=>document.removeEventListener(dC,e)},[]),k(Bg.div,{...c,ref:h,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Ng(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Ng(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ng(t.onPointerDownCapture,O.onPointerDownCapture)})});vC.displayName="DismissableLayer";function gC(){const e=new CustomEvent(dC);document.dispatchEvent(e)}function bC(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&P.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e.forwardRef((t,r)=>{const n=e.useContext(yC),o=e.useRef(null),i=zg(r,o);return e.useEffect(()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),k(Bg.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var wC="focusScope.autoFocusOnMount",xC="focusScope.autoFocusOnUnmount",OC={bubbles:!1,cancelable:!0},EC=e.forwardRef((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=Xg(i),p=Xg(a),f=e.useRef(null),d=zg(r,e=>c(e)),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(m.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:PC(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||PC(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&PC(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[o,s,m.paused]),e.useEffect(()=>{if(s){CC.add(m);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(wC,OC);s.addEventListener(wC,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(PC(n,{select:t}),document.activeElement!==r)return}((e=kC(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&PC(s))}return()=>{s.removeEventListener(wC,u),setTimeout(()=>{const e=new CustomEvent(xC,OC);s.addEventListener(xC,p),s.dispatchEvent(e),e.defaultPrevented||PC(t??document.body,{select:!0}),s.removeEventListener(xC,p),CC.remove(m)},0)}}var e},[s,u,p,m]);const h=e.useCallback(e=>{if(!n&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=kC(e),r=jC(t,e),n=jC(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&PC(i,{select:!0})):(e.preventDefault(),n&&PC(o,{select:!0})):r===t&&e.preventDefault()}},[n,o,m.paused]);return k(Bg.div,{tabIndex:-1,...l,ref:d,onKeyDown:h})});function kC(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jC(e,t){for(const r of e)if(!SC(r,{upTo:t}))return r}function SC(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function PC(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}EC.displayName="FocusScope";var CC=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=TC(e,t),e.unshift(t)},remove(t){e=TC(e,t),e[0]?.resume()}}}();function TC(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var NC=e.forwardRef((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);Hg(()=>a(!0),[]);const l=n||i&&globalThis?.document?.body;return l?C.createPortal(k(Bg.div,{...o,ref:r}),l):null});NC.displayName="Portal";var MC=0;function AC(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zC()),document.body.insertAdjacentElement("beforeend",e[1]??zC()),MC++,()=>{1===MC&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),MC--}},[])}function zC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var LC=function(){return LC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LC.apply(this,arguments)};function DC(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function _C(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var IC="right-scroll-bar-position",RC="width-before-scroll-bar";function BC(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var WC="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,FC=new WeakMap;function $C(e,t){var r,n,o,a=(r=null,n=function(t){return e.forEach(function(e){return BC(e,t)})},o=i(function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0],o.callback=n,o.facade);return WC(function(){var t=FC.get(a);if(t){var r=new Set(t),n=new Set(e),o=a.current;r.forEach(function(e){n.has(e)||BC(e,null)}),n.forEach(function(e){r.has(e)||BC(e,o)})}FC.set(a,e)},[e]),a}function VC(e){return e}var HC=function(t){var r=t.sideCar,n=DC(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,LC({},n))};HC.isSideCarExport=!0;var UC=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=VC);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}};return o}(null);return t.options=LC({async:!0,ssr:!1},e),t}(),qC=function(){},YC=e.forwardRef(function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:qC,onWheelCapture:qC,onTouchMoveCapture:qC}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,p=t.enabled,f=t.shards,d=t.sideCar,m=t.noRelative,h=t.noIsolation,y=t.inert,v=t.allowPinchZoom,g=t.as,b=void 0===g?"div":g,w=t.gapMode,x=DC(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=d,E=$C([n,r]),k=LC(LC({},x),i);return e.createElement(e.Fragment,null,p&&e.createElement(O,{sideCar:UC,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:w}),l?e.cloneElement(e.Children.only(s),LC(LC({},k),{ref:E})):e.createElement(b,LC({},k,{className:c,ref:E}),s))});YC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},YC.classNames={fullWidth:RC,zeroRight:IC};function XC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var GC=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=XC())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},KC=function(){var t,r=(t=GC(),function(r,n){e.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},ZC={left:0,top:0,right:0,gap:0},JC=function(e){return parseInt(e||"",10)||0},QC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ZC;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[JC(r),JC(n),JC(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},eT=KC(),tT="data-scroll-locked",rT=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(tT,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(IC," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(RC," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(IC," .").concat(IC," {\n right: 0 ").concat(n,";\n }\n \n .").concat(RC," .").concat(RC," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(tT,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},nT=function(){var e=parseInt(document.body.getAttribute(tT)||"0",10);return isFinite(e)?e:0},oT=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(tT,(nT()+1).toString()),function(){var e=nT()-1;e<=0?document.body.removeAttribute(tT):document.body.setAttribute(tT,e.toString())}},[]);var a=e.useMemo(function(){return QC(i)},[i]);return e.createElement(eT,{styles:rT(a,!r,i,n?"":"!important")})},iT=!1;if("undefined"!=typeof window)try{var aT=Object.defineProperty({},"passive",{get:function(){return iT=!0,!0}});window.addEventListener("test",aT,aT),window.removeEventListener("test",aT,aT)}catch(e){iT=!1}var lT=!!iT&&{passive:!1},sT=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},cT=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),uT(e,n)){var o=pT(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},uT=function(e,t){return"v"===e?function(e){return sT(e,"overflowY")}(t):function(e){return sT(e,"overflowX")}(t)},pT=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},fT=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dT=function(e){return[e.deltaX,e.deltaY]},mT=function(e){return e&&"current"in e?e.current:e},hT=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},yT=0,vT=[];function gT(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bT,wT=(bT=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(yT++)[0],a=e.useState(KC)[0],l=e.useRef(t);e.useEffect(function(){l.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(mT),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=fT(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,p=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===p&&"range"===u.type)return!1;var f=window.getSelection(),d=f&&f.anchorNode;if(d&&(d===u||d.contains(u)))return!1;var m=cT(p,u);if(!m)return!0;if(m?r=p:(r="v"===p?"h":"v",m=cT(p,u)),!m)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var h=o.current||r;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),s=!1,c=i>0,u=0,p=0;do{if(!a)break;var f=pT(e,a),d=f[0],m=f[1]-f[2]-o*d;(d||m)&&uT(e,a)&&(u+=m,p+=d);var h=a.parentNode;a=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(p)<1)&&(s=!0),s}(h,t,e,"h"===h?s:c)},[]),c=e.useCallback(function(e){var t=e;if(vT.length&&vT[vT.length-1]===a){var n="deltaY"in t?dT(t):fT(t),o=r.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(mT).filter(Boolean).filter(function(e){return e.contains(t.target)});(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=e.useCallback(function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:gT(n)};r.current.push(i),setTimeout(function(){r.current=r.current.filter(function(e){return e!==i})},1)},[]),p=e.useCallback(function(e){n.current=fT(e),o.current=void 0},[]),f=e.useCallback(function(e){u(e.type,dT(e),e.target,s(e,t.lockRef.current))},[]),d=e.useCallback(function(e){u(e.type,fT(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return vT.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,lT),document.addEventListener("touchmove",c,lT),document.addEventListener("touchstart",p,lT),function(){vT=vT.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,lT),document.removeEventListener("touchmove",c,lT),document.removeEventListener("touchstart",p,lT)}},[]);var m=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:hT(i)}):null,m?e.createElement(oT,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},UC.useMedium(bT),HC),xT=e.forwardRef(function(t,r){return e.createElement(YC,LC({},t,{ref:r,sideCar:wT}))});xT.classNames=YC.classNames;var OT=new WeakMap,ET=new WeakMap,kT={},jT=0,ST=function(e){return e&&(e.host||ST(e.parentNode))},PT=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=ST(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);kT[r]||(kT[r]=new WeakMap);var i=kT[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(OT.get(e)||0)+1,c=(i.get(e)||0)+1;OT.set(e,s),i.set(e,c),a.push(e),1===s&&o&&ET.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),l.clear(),jT++,function(){a.forEach(function(e){var t=OT.get(e)-1,o=i.get(e)-1;OT.set(e,t),i.set(e,o),t||(ET.has(e)||e.removeAttribute(n),ET.delete(e)),o||e.removeAttribute(r)}),--jT||(OT=new WeakMap,OT=new WeakMap,ET=new WeakMap,kT={})}},CT=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),PT(n,o,r,"aria-hidden")):function(){return null}};function TT(t){const r=e.forwardRef((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Ag(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var NT=Symbol("radix.slottable");function MT(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===NT}var AT="Dialog",[zT,LT]=Lg(AT),[DT,_T]=zT(AT),IT=t=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=t,s=e.useRef(null),c=e.useRef(null),[u,p]=Kg({prop:o,defaultProp:i??!1,onChange:a,caller:AT});return k(DT,{scope:r,triggerRef:s,contentRef:c,contentId:Yg(),titleId:Yg(),descriptionId:Yg(),open:u,onOpenChange:p,onOpenToggle:e.useCallback(()=>p(e=>!e),[p]),modal:l,children:n})};IT.displayName=AT;var RT="DialogTrigger",BT=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(RT,r),i=zg(t,o.triggerRef);return k(Bg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":iN(o.open),...n,ref:i,onClick:Ng(e.onClick,o.onOpenToggle)})});BT.displayName=RT;var WT="DialogPortal",[FT,$T]=zT(WT,{forceMount:void 0}),VT=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=_T(WT,r);return k(FT,{scope:r,forceMount:n,children:e.Children.map(o,e=>k(bb,{present:n||a.open,children:k(NC,{asChild:!0,container:i,children:e})}))})};VT.displayName=WT;var HT="DialogOverlay",UT=e.forwardRef((e,t)=>{const r=$T(HT,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=_T(HT,e.__scopeDialog);return i.modal?k(bb,{present:n||i.open,children:k(YT,{...o,ref:t})}):null});UT.displayName=HT;var qT=function(t){const r=TT(t),n=e.forwardRef((t,n)=>{const{children:o,...i}=t,a=e.Children.toArray(o),l=a.find(MT);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}("DialogOverlay.RemoveScroll"),YT=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(HT,r);return k(xT,{as:qT,allowPinchZoom:!0,shards:[o.contentRef],children:k(Bg.div,{"data-state":iN(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),XT="DialogContent",GT=e.forwardRef((e,t)=>{const r=$T(XT,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=_T(XT,e.__scopeDialog);return k(bb,{present:n||i.open,children:i.modal?k(KT,{...o,ref:t}):k(ZT,{...o,ref:t})})});GT.displayName=XT;var KT=e.forwardRef((t,r)=>{const n=_T(XT,t.__scopeDialog),o=e.useRef(null),i=zg(r,n.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return CT(e)},[]),k(JT,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ng(t.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ng(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:Ng(t.onFocusOutside,e=>e.preventDefault())})}),ZT=e.forwardRef((t,r)=>{const n=_T(XT,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return k(JT,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),JT=e.forwardRef((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=_T(XT,n),c=e.useRef(null),u=zg(r,c);return AC(),j(S,{children:[k(EC,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:k(vC,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":iN(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),j(S,{children:[k(cN,{titleId:s.titleId}),k(uN,{contentRef:c,descriptionId:s.descriptionId})]})]})}),QT="DialogTitle",eN=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(QT,r);return k(Bg.h2,{id:o.titleId,...n,ref:t})});eN.displayName=QT;var tN="DialogDescription",rN=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(tN,r);return k(Bg.p,{id:o.descriptionId,...n,ref:t})});rN.displayName=tN;var nN="DialogClose",oN=e.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=_T(nN,r);return k(Bg.button,{type:"button",...n,ref:t,onClick:Ng(e.onClick,()=>o.onOpenChange(!1))})});function iN(e){return e?"open":"closed"}oN.displayName=nN;var aN="DialogTitleWarning",[lN,sN]=function(t,r){const n=e.createContext(r),o=t=>{const{children:r,...o}=t,i=e.useMemo(()=>o,Object.values(o));return k(n.Provider,{value:i,children:r})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(n);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(aN,{contentName:XT,titleName:QT,docsSlug:"dialog"}),cN=({titleId:t})=>{const r=sN(aN),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(n)}},[n,t]),null},uN=({contentRef:t,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sN("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(r&&e){document.getElementById(r)||console.warn(n)}},[n,t,r]),null},pN=IT,fN=BT,dN=VT,mN=UT,hN=GT,yN=eN,vN=rN,gN=oN;const bN=pN,wN=fN,xN=dN,ON=e.forwardRef(({className:t,...r},n)=>e.createElement(mN,{ref:n,className:Ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));ON.displayName=mN.displayName;const EN=e.forwardRef(({className:t,children:r,...n},o)=>e.createElement(xN,null,e.createElement(ON,null),e.createElement(hN,{ref:o,className:Ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n},r,e.createElement(gN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},e.createElement(Mk,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close")))));EN.displayName=hN.displayName;const kN=({className:t,...r})=>e.createElement("div",{className:Ye("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});kN.displayName="DialogHeader";const jN=({className:t,...r})=>e.createElement("div",{className:Ye("flex justify-end space-x-2",t),...r});jN.displayName="DialogFooter";const SN=e.forwardRef(({className:t,...r},n)=>e.createElement(yN,{ref:n,className:Ye("text-lg font-semibold leading-none tracking-tight",t),...r}));SN.displayName=yN.displayName;const PN=e.forwardRef(({className:t,...r},n)=>e.createElement(vN,{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));PN.displayName=vN.displayName;const CN={CANCEL_TEXT:"Cancel",CONFIRM_TEXT:"Confirm",VARIANT:"default",SIZE:"medium",POSITION:"center",CLOSE_ON_OUTSIDE_CLICK:!0,SHOW_CLOSE_BUTTON:!1},TN={default:{button:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"}},NN=e=>{switch(e){case"small":return"sm:max-w-[425px]";case"large":return"sm:max-w-[725px]";case"extraLarge":return"sm:max-w-[925px]";case"full":return"sm:max-w-[90vw]";default:return"sm:max-w-[525px]"}},MN=({title:e,description:r,cancelText:n=CN.CANCEL_TEXT,confirmText:o=CN.CONFIRM_TEXT,onConfirm:a,onCancel:l,variant:u=CN.VARIANT,showCloseButton:p=CN.SHOW_CLOSE_BUTTON,size:f=CN.SIZE,className:d,onClose:m,fields:h=[],onOpenChange:y})=>{const[v,g]=i({}),b=c(null),w=s(e=>{e.preventDefault(),b.current?.checkValidity()&&(a?.(v),y(!1))},[v,a,y]),x=s(()=>{l?.(),y(!1)},[l,y]),O=s(()=>{m?.(),y(!1)},[m,y]),E=s(e=>{const{name:t,value:r}=e.target;g(e=>({...e,[t]:r}))},[]);return t.createElement(EN,{className:Ye(NN(f),d)},t.createElement("form",{ref:b,onSubmit:w},t.createElement(kN,null,t.createElement("div",{className:"flex items-center justify-between"},t.createElement(SN,null,e),p&&t.createElement(vt,{variant:"tertiary",className:"h-6 w-6",onClick:O,type:"button"},t.createElement(ht,{className:"h-4 w-4"}))),t.createElement(PN,null,r)),h.length>0&&t.createElement("div",{className:"grid gap-4 py-4"},h.map(e=>t.createElement("div",{className:"grid gap-2",key:e.name},t.createElement(Tg,{id:e.name,name:e.name,type:e.type,placeholder:e.placeholder,required:e.required,defaultValue:e.defaultValue,onChange:E,label:e.label})))),t.createElement(jN,{className:"gap-2 sm:gap-0"},t.createElement(vt,{type:"button",variant:"primary",onClick:x},n),t.createElement(vt,{type:"submit",className:"destructive"===u?TN.default.destructive:TN.default.button},o))))},AN=({trigger:e,isOpen:r,closeOnOutsideClick:n=CN.CLOSE_ON_OUTSIDE_CLICK,children:o,...l})=>{const[s,c]=i(r);a(()=>{void 0!==r&&c(r)},[r]);return t.createElement(bN,{open:s,onOpenChange:e=>{(e||n)&&c(e)}},t.createElement(wN,{asChild:!0},"string"==typeof e?t.createElement(vt,{variant:"primary"},e):e),t.createElement(MN,{...l,onOpenChange:c},o))};AN.displayName="Dialog";const zN=["top","right","bottom","left"],LN=Math.min,DN=Math.max,_N=Math.round,IN=Math.floor,RN=e=>({x:e,y:e}),BN={left:"right",right:"left",bottom:"top",top:"bottom"},WN={start:"end",end:"start"};function FN(e,t,r){return DN(e,LN(t,r))}function $N(e,t){return"function"==typeof e?e(t):e}function VN(e){return e.split("-")[0]}function HN(e){return e.split("-")[1]}function UN(e){return"x"===e?"y":"x"}function qN(e){return"y"===e?"height":"width"}const YN=new Set(["top","bottom"]);function XN(e){return YN.has(VN(e))?"y":"x"}function GN(e){return UN(XN(e))}function KN(e){return e.replace(/start|end/g,e=>WN[e])}const ZN=["left","right"],JN=["right","left"],QN=["top","bottom"],eM=["bottom","top"];function tM(e,t,r,n){const o=HN(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?JN:ZN:t?ZN:JN;case"left":case"right":return t?QN:eM;default:return[]}}(VN(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(KN)))),i}function rM(e){return e.replace(/left|right|bottom|top/g,e=>BN[e])}function nM(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}}function oM(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function iM(e,t,r){let{reference:n,floating:o}=e;const i=XN(t),a=GN(t),l=qN(a),s=VN(t),c="y"===i,u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let d;switch(s){case"top":d={x:u,y:n.y-o.height};break;case"bottom":d={x:u,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:p};break;case"left":d={x:n.x-o.width,y:p};break;default:d={x:n.x,y:n.y}}switch(HN(t)){case"start":d[a]-=f*(r&&c?-1:1);break;case"end":d[a]+=f*(r&&c?-1:1)}return d}async function aM(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:d=0}=$N(t,e),m=nM(d),h=l[f?"floating"===p?"reference":"floating":p],y=oM(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(h)))||r?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===p?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=oM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:g,strategy:s}):v);return{top:(y.top-w.top+m.top)/b.y,bottom:(w.bottom-y.bottom+m.bottom)/b.y,left:(y.left-w.left+m.left)/b.x,right:(w.right-y.right+m.right)/b.x}}function lM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sM(e){return zN.some(t=>e[t]>=0)}const cM=new Set(["left","top"]);function uM(){return"undefined"!=typeof window}function pM(e){return mM(e)?(e.nodeName||"").toLowerCase():"#document"}function fM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dM(e){var t;return null==(t=(mM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function mM(e){return!!uM()&&(e instanceof Node||e instanceof fM(e).Node)}function hM(e){return!!uM()&&(e instanceof Element||e instanceof fM(e).Element)}function yM(e){return!!uM()&&(e instanceof HTMLElement||e instanceof fM(e).HTMLElement)}function vM(e){return!(!uM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof fM(e).ShadowRoot)}const gM=new Set(["inline","contents"]);function bM(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=MM(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!gM.has(o)}const wM=new Set(["table","td","th"]);function xM(e){return wM.has(pM(e))}const OM=[":popover-open",":modal"];function EM(e){return OM.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const kM=["transform","translate","scale","rotate","perspective"],jM=["transform","translate","scale","rotate","perspective","filter"],SM=["paint","layout","strict","content"];function PM(e){const t=CM(),r=hM(e)?MM(e):e;return kM.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||jM.some(e=>(r.willChange||"").includes(e))||SM.some(e=>(r.contain||"").includes(e))}function CM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const TM=new Set(["html","body","#document"]);function NM(e){return TM.has(pM(e))}function MM(e){return fM(e).getComputedStyle(e)}function AM(e){return hM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zM(e){if("html"===pM(e))return e;const t=e.assignedSlot||e.parentNode||vM(e)&&e.host||dM(e);return vM(t)?t.host:t}function LM(e){const t=zM(e);return NM(t)?e.ownerDocument?e.ownerDocument.body:e.body:yM(t)&&bM(t)?t:LM(t)}function DM(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=LM(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=fM(o);if(i){const e=_M(a);return t.concat(a,a.visualViewport||[],bM(o)?o:[],e&&r?DM(e):[])}return t.concat(o,DM(o,[],r))}function _M(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IM(e){const t=MM(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=yM(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=_N(r)!==i||_N(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function RM(e){return hM(e)?e:e.contextElement}function BM(e){const t=RM(e);if(!yM(t))return RN(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=IM(t);let a=(i?_N(r.width):r.width)/n,l=(i?_N(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const WM=RN(0);function FM(e){const t=fM(e);return CM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:WM}function $M(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=RM(e);let a=RN(1);t&&(n?hM(n)&&(a=BM(n)):a=BM(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==fM(e))&&t}(i,r,n)?FM(i):RN(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(i){const e=fM(i),t=n&&hM(n)?fM(n):n;let r=e,o=_M(r);for(;o&&n&&t!==r;){const e=BM(o),t=o.getBoundingClientRect(),n=MM(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,p*=e.y,s+=i,c+=a,r=fM(o),o=_M(r)}}return oM({width:u,height:p,x:s,y:c})}function VM(e,t){const r=AM(e).scrollLeft;return t?t.left+r:$M(dM(e)).left+r}function HM(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-VM(e,r),y:r.top+t.scrollTop}}const UM=new Set(["absolute","fixed"]);function qM(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=fM(e),n=dM(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=CM();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=VM(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=dM(e),r=AM(e),n=e.ownerDocument.body,o=DN(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=DN(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+VM(e);const l=-r.scrollTop;return"rtl"===MM(n).direction&&(a+=DN(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(dM(e));else if(hM(t))n=function(e,t){const r=$M(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=yM(e)?BM(e):RN(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=FM(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return oM(n)}function YM(e,t){const r=zM(e);return!(r===t||!hM(r)||NM(r))&&("fixed"===MM(r).position||YM(r,t))}function XM(e,t,r){const n=yM(t),o=dM(t),i="fixed"===r,a=$M(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=RN(0);function c(){s.x=VM(o)}if(n||!n&&!i)if(("body"!==pM(t)||bM(o))&&(l=AM(t)),n){const e=$M(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=!o||n||i?RN(0):HM(o,l);return{x:a.left+l.scrollLeft-s.x-u.x,y:a.top+l.scrollTop-s.y-u.y,width:a.width,height:a.height}}function GM(e){return"static"===MM(e).position}function KM(e,t){if(!yM(e)||"fixed"===MM(e).position)return null;if(t)return t(e);let r=e.offsetParent;return dM(e)===r&&(r=r.ownerDocument.body),r}function ZM(e,t){const r=fM(e);if(EM(e))return r;if(!yM(e)){let t=zM(e);for(;t&&!NM(t);){if(hM(t)&&!GM(t))return t;t=zM(t)}return r}let n=KM(e,t);for(;n&&xM(n)&&GM(n);)n=KM(n,t);return n&&NM(n)&&GM(n)&&!PM(n)?r:n||function(e){let t=zM(e);for(;yM(t)&&!NM(t);){if(PM(t))return t;if(EM(t))return null;t=zM(t)}return null}(e)||r}const JM={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=dM(n),l=!!t&&EM(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=RN(1);const u=RN(0),p=yM(n);if((p||!p&&!i)&&(("body"!==pM(n)||bM(a))&&(s=AM(n)),yM(n))){const e=$M(n);c=BM(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||p||i?RN(0):HM(a,s);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:dM,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?EM(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=DM(e,[],!1).filter(e=>hM(e)&&"body"!==pM(e)),o=null;const i="fixed"===MM(e).position;let a=i?zM(e):e;for(;hM(a)&&!NM(a);){const t=MM(a),r=PM(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&UM.has(o.position)||bM(a)&&!r&&YM(e,a))?n=n.filter(e=>e!==a):o=t,a=zM(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce((e,r)=>{const n=qM(t,r,o);return e.top=DN(n.top,e.top),e.right=LN(n.right,e.right),e.bottom=LN(n.bottom,e.bottom),e.left=DN(n.left,e.left),e},qM(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ZM,getElementRects:async function(e){const t=this.getOffsetParent||ZM,r=this.getDimensions,n=await r(e.floating);return{reference:XM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=IM(e);return{width:t,height:r}},getScale:BM,isElement:hM,isRTL:function(e){return"rtl"===MM(e).direction}};function QM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eA(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=RM(e),u=o||i?[...c?DM(c):[],...DM(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const p=c&&l?function(e,t){let r,n=null;const o=dM(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:p,width:f,height:d}=c;if(l||t(),!f||!d)return;const m={rootMargin:-IN(p)+"px "+-IN(o.clientWidth-(u+f))+"px "+-IN(o.clientHeight-(p+d))+"px "+-IN(u)+"px",threshold:DN(0,LN(1,s))||1};let h=!0;function y(t){const n=t[0].intersectionRatio;if(n!==s){if(!h)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||QM(c,e.getBoundingClientRect())||a(),h=!1}try{n=new IntersectionObserver(y,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(y,m)}n.observe(e)}(!0),i}(c,r):null;let f,d=-1,m=null;a&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),c&&!s&&m.observe(c),m.observe(t));let h=s?$M(e):null;return s&&function t(){const n=$M(e);h&&!QM(h,n)&&r();h=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==p||p(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const tA=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=VN(r),l=HN(r),s="y"===XN(r),c=cM.has(a)?-1:1,u=i&&s?-1:1,p=$N(t,e);let{mainAxis:f,crossAxis:d,alignmentAxis:m}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof m&&(d="end"===l?-1*m:m),s?{x:d*u,y:f*c}:{x:f*c,y:d*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},rA=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=$N(e,t),c={x:r,y:n},u=await aM(t,s),p=XN(VN(o)),f=UN(p);let d=c[f],m=c[p];if(i){const e="y"===f?"bottom":"right";d=FN(d+u["y"===f?"top":"left"],d,d-u[e])}if(a){const e="y"===p?"bottom":"right";m=FN(m+u["y"===p?"top":"left"],m,m-u[e])}const h=l.fn({...t,[f]:d,[p]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:i,[p]:a}}}}}},nA=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=$N(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=VN(o),g=XN(l),b=VN(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(b||!h?[rM(l)]:function(e){const t=rM(e);return[KN(e),t,KN(t)]}(l)),O="none"!==m;!f&&O&&x.push(...tM(l,h,m,w));const E=[l,...x],k=await aM(t,y),j=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&j.push(k[v]),p){const e=function(e,t,r){void 0===r&&(r=!1);const n=HN(e),o=GN(e),i=qN(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=rM(a)),[a,rM(a)]}(o,a,w);j.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:j}],!j.every(e=>e<=0)){var P,C;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=E[e];if(t){if(!("alignment"===p&&g!==XN(t))||S.every(e=>XN(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let r=null==(C=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!r)switch(d){case"bestFit":{var T;const e=null==(T=S.filter(e=>{if(O){const t=XN(e.placement);return t===g||"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:T[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},oA=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=$N(e,t),u=await aM(t,c),p=VN(o),f=HN(o),d="y"===XN(o),{width:m,height:h}=i.floating;let y,v;"top"===p||"bottom"===p?(y=p,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=p,y="end"===f?"top":"bottom");const g=h-u.top-u.bottom,b=m-u.left-u.right,w=LN(h-u[y],g),x=LN(m-u[v],b),O=!t.middlewareData.shift;let E=w,k=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=g),O&&!f){const e=DN(u.left,0),t=DN(u.right,0),r=DN(u.top,0),n=DN(u.bottom,0);d?k=m-2*(0!==e||0!==t?e+t:DN(u.left,u.right)):E=h-2*(0!==r||0!==n?r+n:DN(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:E});const j=await a.getDimensions(l.floating);return m!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}},iA=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=$N(e,t);switch(n){case"referenceHidden":{const e=lM(await aM(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:sM(e)}}}case"escaped":{const e=lM(await aM(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:sM(e)}}}default:return{}}}}},aA=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=$N(e,t)||{};if(null==c)return{};const p=nM(u),f={x:r,y:n},d=GN(o),m=qN(d),h=await a.getDimensions(c),y="y"===d,v=y?"top":"left",g=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[d]-f[d]-i.floating[m],x=f[d]-i.reference[d],O=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=O?O[b]:0;E&&await(null==a.isElement?void 0:a.isElement(O))||(E=l.floating[b]||i.floating[m]);const k=w/2-x/2,j=E/2-h[m]/2-1,S=LN(p[v],j),P=LN(p[g],j),C=S,T=E-h[m]-P,N=E/2-h[m]/2+k,M=FN(C,N,T),A=!s.arrow&&null!=HN(o)&&N!==M&&i.reference[m]/2-(N<C?S:P)-h[m]/2<0,z=A?N<C?N-C:N-T:0;return{[d]:f[d]+z,data:{[d]:M,centerOffset:N-M-z,...A&&{alignmentOffset:z}},reset:A}}}),lA=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=$N(e,t),u={x:r,y:n},p=XN(o),f=UN(p);let d=u[f],m=u[p];const h=$N(l,t),y="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+y.mainAxis,r=i.reference[f]+i.reference[e]-y.mainAxis;d<t?d=t:d>r&&(d=r)}if(c){var v,g;const e="y"===f?"width":"height",t=cM.has(VN(o)),r=i.reference[p]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[p])||0)+(t?0:y.crossAxis),n=i.reference[p]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[p])||0)-(t?y.crossAxis:0);m<r?m=r:m>n&&(m=n)}return{[f]:d,[p]:m}}}},sA=(e,t,r)=>{const n=new Map,o={platform:JM,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=iM(c,n,s),f=n,d={},m=0;for(let r=0;r<l.length;r++){const{name:i,fn:h}=l[r],{x:y,y:v,data:g,reset:b}=await h({x:u,y:p,initialPlacement:n,placement:f,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,p=null!=v?v:p,d={...d,[i]:{...d[i],...g}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:p}=iM(c,f,s))),r=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})};var cA="undefined"!=typeof document?f:function(){};function uA(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!uA(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!uA(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function pA(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fA(e,t){const r=pA(e);return Math.round(t*r)/r}function dA(t){const r=e.useRef(t);return cA(()=>{r.current=t}),r}const mA=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?aA({element:r.current,padding:n}).fn(t):{}:r?aA({element:r,padding:n}).fn(t):{};var o}}),hA=(e,t)=>({...tA(e),options:[e,t]}),yA=(e,t)=>({...rA(e),options:[e,t]}),vA=(e,t)=>({...lA(e),options:[e,t]}),gA=(e,t)=>({...nA(e),options:[e,t]}),bA=(e,t)=>({...oA(e),options:[e,t]}),wA=(e,t)=>({...iA(e),options:[e,t]}),xA=(e,t)=>({...mA(e),options:[e,t]});var OA=e.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return k(Bg.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:k("polygon",{points:"0,0 30,0 15,10"})})});OA.displayName="Arrow";var EA=OA,kA="Popper",[jA,SA]=Lg(kA),[PA,CA]=jA(kA),TA=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return k(PA,{scope:r,anchor:o,onAnchorChange:i,children:n})};TA.displayName=kA;var NA="PopperAnchor",MA=e.forwardRef((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=CA(NA,n),l=e.useRef(null),s=zg(r,l),c=e.useRef(null);return e.useEffect(()=>{const e=c.current;c.current=o?.current||l.current,e!==c.current&&a.onAnchorChange(c.current)}),o?null:k(Bg.div,{...i,ref:s})});MA.displayName=NA;var AA="PopperContent",[zA,LA]=jA(AA),DA=e.forwardRef((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:m="optimized",onPlaced:h,...y}=t,v=CA(AA,n),[g,b]=e.useState(null),w=zg(r,e=>b(e)),[x,O]=e.useState(null),E=vb(x),j=E?.width??0,S=E?.height??0,C=o+("center"!==a?"-"+a:""),T="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(u)?u:[u],M=N.length>0,A={padding:T,boundary:N.filter(BA),altBoundary:M},{refs:z,floatingStyles:L,placement:D,isPositioned:_,middlewareData:I}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[p,f]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[d,m]=e.useState(o);uA(d,o)||m(o);const[h,y]=e.useState(null),[v,g]=e.useState(null),b=e.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),w=e.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),x=a||h,O=l||v,E=e.useRef(null),k=e.useRef(null),j=e.useRef(p),S=null!=c,C=dA(c),T=dA(i),N=dA(u),M=e.useCallback(()=>{if(!E.current||!k.current)return;const e={placement:r,strategy:n,middleware:d};T.current&&(e.platform=T.current),sA(E.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==N.current};A.current&&!uA(j.current,t)&&(j.current=t,P.flushSync(()=>{f(t)}))})},[d,r,n,T,N]);cA(()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const A=e.useRef(!1);cA(()=>(A.current=!0,()=>{A.current=!1}),[]),cA(()=>{if(x&&(E.current=x),O&&(k.current=O),x&&O){if(C.current)return C.current(x,O,M);M()}},[x,O,M,C,S]);const z=e.useMemo(()=>({reference:E,floating:k,setReference:b,setFloating:w}),[b,w]),L=e.useMemo(()=>({reference:x,floating:O}),[x,O]),D=e.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=fA(L.floating,p.x),r=fA(L.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...pA(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,L.floating,p.x,p.y]);return e.useMemo(()=>({...p,update:M,refs:z,elements:L,floatingStyles:D}),[p,M,z,L,D])}({strategy:"fixed",placement:C,whileElementsMounted:(...e)=>eA(...e,{animationFrame:"always"===m}),elements:{reference:v.anchor},middleware:[hA({mainAxis:i+S,alignmentAxis:l}),c&&yA({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?vA():void 0,...A}),c&&gA({...A}),bA({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&xA({element:x,padding:s}),WA({arrowWidth:j,arrowHeight:S}),d&&wA({strategy:"referenceHidden",...A})]}),[R,B]=FA(D),W=Xg(h);Hg(()=>{_&&W?.()},[_,W]);const F=I.arrow?.x,$=I.arrow?.y,V=0!==I.arrow?.centerOffset,[H,U]=e.useState();return Hg(()=>{g&&U(window.getComputedStyle(g).zIndex)},[g]),k("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:_?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:k(zA,{scope:n,placedSide:R,onArrowChange:O,arrowX:F,arrowY:$,shouldHideArrow:V,children:k(Bg.div,{"data-side":R,"data-align":B,...y,ref:w,style:{...y.style,animation:_?void 0:"none"}})})})});DA.displayName=AA;var _A="PopperArrow",IA={top:"bottom",right:"left",bottom:"top",left:"right"},RA=e.forwardRef(function(e,t){const{__scopePopper:r,...n}=e,o=LA(_A,r),i=IA[o.placedSide];return k("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:k(EA,{...n,ref:t,style:{...n.style,display:"block"}})})});function BA(e){return null!==e}RA.displayName=_A;var WA=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=FA(r),u={start:"0%",center:"50%",end:"100%"}[c],p=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let d="",m="";return"bottom"===s?(d=i?u:`${p}px`,m=-l+"px"):"top"===s?(d=i?u:`${p}px`,m=`${n.floating.height+l}px`):"right"===s?(d=-l+"px",m=i?u:`${f}px`):"left"===s&&(d=`${n.floating.width+l}px`,m=i?u:`${f}px`),{data:{x:d,y:m}}}});function FA(e){const[t,r="center"]=e.split("-");return[t,r]}var $A=TA,VA=MA,HA=DA,UA=RA;function qA(t){const r=e.forwardRef((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Ag(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var YA=Symbol("radix.slottable");function XA(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===YA}var GA="Popover",[KA]=Lg(GA,[SA]),ZA=SA(),[JA,QA]=KA(GA),ez=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=ZA(r),c=e.useRef(null),[u,p]=e.useState(!1),[f,d]=Kg({prop:o,defaultProp:i??!1,onChange:a,caller:GA});return k($A,{...s,children:k(JA,{scope:r,contentId:Yg(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback(()=>p(!0),[]),onCustomAnchorRemove:e.useCallback(()=>p(!1),[]),modal:l,children:n})})};ez.displayName=GA;var tz="PopoverAnchor";e.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=QA(tz,n),a=ZA(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect(()=>(l(),()=>s()),[l,s]),k(VA,{...a,...o,ref:r})}).displayName=tz;var rz="PopoverTrigger",nz=e.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=QA(rz,r),i=ZA(r),a=zg(t,o.triggerRef),l=k(Bg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hz(o.open),...n,ref:a,onClick:Ng(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:k(VA,{asChild:!0,...i,children:l})});nz.displayName=rz;var oz="PopoverPortal",[iz,az]=KA(oz,{forceMount:void 0}),lz=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=QA(oz,t);return k(iz,{scope:t,forceMount:r,children:k(bb,{present:r||i.open,children:k(NC,{asChild:!0,container:o,children:n})})})};lz.displayName=oz;var sz="PopoverContent",cz=e.forwardRef((e,t)=>{const r=az(sz,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=QA(sz,e.__scopePopover);return k(bb,{present:n||i.open,children:i.modal?k(pz,{...o,ref:t}):k(fz,{...o,ref:t})})});cz.displayName=sz;var uz=function(t){const r=qA(t),n=e.forwardRef((t,n)=>{const{children:o,...i}=t,a=e.Children.toArray(o),l=a.find(XA);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}("PopoverContent.RemoveScroll"),pz=e.forwardRef((t,r)=>{const n=QA(sz,t.__scopePopover),o=e.useRef(null),i=zg(r,o),a=e.useRef(!1);return e.useEffect(()=>{const e=o.current;if(e)return CT(e)},[]),k(xT,{as:uz,allowPinchZoom:!0,children:k(dz,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ng(t.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ng(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:Ng(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),fz=e.forwardRef((t,r)=>{const n=QA(sz,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return k(dz,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),dz=e.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...p}=e,f=QA(sz,r),d=ZA(r);return AC(),k(EC,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:k(vC,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:k(HA,{"data-state":hz(f.open),role:"dialog",id:f.contentId,...d,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),mz="PopoverClose";e.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=QA(mz,r);return k(Bg.button,{type:"button",...n,ref:t,onClick:Ng(e.onClick,()=>o.onOpenChange(!1))})}).displayName=mz;function hz(e){return e?"open":"closed"}e.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ZA(r);return k(UA,{...o,...n,ref:t})}).displayName="PopoverArrow";var yz=ez,vz=nz,gz=lz,bz=cz;const wz="MM/dd/yyyy",xz={US:"MM/dd/yyyy",EU:"dd/MM/yyyy",ISO:"yyyy-MM-dd",LONG:"MMMM d, yyyy",SHORT:"MMM d, yyyy",FULL:"EEEE, MMMM d, yyyy",COMPACT:"MM/dd/yy",WITH_TIME:"MM/dd/yyyy HH:mm",PPP:"PPP"},Oz=(e,t)=>{try{return Vj(e,t)}catch{return Vj(e,wz)}},Ez=["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"].map((e,t)=>({id:t.toString(),label:e})),kz=(e,t)=>{const r=(new Date).getFullYear(),n=e?Yj(e):1900,o=[];for(let e=t?Yj(t):r+10;e>=n;e--)o.push({id:e.toString(),label:e.toString()});return o},jz=e=>{if(e)return Yk(e)},Sz=r(({type:e="single",value:r,onChange:n,placeholder:o="Select date",disabled:c=!1,minDate:u,maxDate:p,className:f,label:d,error:m,required:h=!1,clearable:y=!0,variant:v="tertiary",dataTestId:g,enableYearMonthDropdowns:b=!1,format:w="MM/dd/yyyy"},x)=>{const[O,E]=i(!1),[k,j]=i("range"!==e||!r||r instanceof Date?void 0:r),[S,P]=i(()=>{if("single"===e&&r instanceof Date)return r;if("range"===e&&r&&!(r instanceof Date)){return r.from||new Date}return new Date});a(()=>{if("range"!==e||!r||r instanceof Date)"range"!==e||r||j(void 0);else{const e=r;j({from:jz(e.from),to:jz(e.to)})}},[r,e]),a(()=>{if("single"===e&&r instanceof Date)P(r);else if("range"===e&&r&&!(r instanceof Date)){const e=r;e.from&&P(e.from)}},[r,e]);const C=l(()=>kz(u,p),[u,p]),T=Ez,N=s(t=>{if(t.preventDefault(),t.stopPropagation(),"single"===e)n?.(void 0);else{const e={from:void 0,to:void 0};n?.(e),j(e)}E(!1)},[n,e]),M=s(e=>{const t=parseInt(e,10),r=Qj(S,t);P(r)},[S]),A=s(e=>{const t=parseInt(e,10),r=Jj(S,t);P(r)},[S]),z=s(()=>{if(!r)return"";if("single"===e&&r instanceof Date)return Oz(r,w);if("range"===e&&!(r instanceof Date)){const e=r;if(e.from)return e.to?`${Oz(e.from,w)} - ${Oz(e.to,w)}`:Oz(e.from,w)}return""},[r,e,w]),L=s(e=>{if(!e)return j(void 0),void n?.(void 0);if(e instanceof Date){const t=jz(e);return n?.(t),void E(!1)}const t={from:jz(e.from),to:jz(e.to)};j(t),e.from&&e.to?(n?.(t),E(!1)):e.from||n?.(t)},[n]),D=s(e=>{const t=jz(e);n?.(t),t&&E(!1)},[n]),_=s(()=>{const n={initialFocus:!0,month:S,onMonthChange:P,disabled:e=>{if(c)return!0;const t=Yk(e);return!!(u&&t<Yk(u))||!!(p&&t>Yk(p))},classNames:{months:Ye("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0","sm:divide-x sm:divide-border"),month:Ye("space-y-4","first:pr-2 last:pl-2"),caption:"flex justify-center pt-1 relative items-center h-10",caption_label:b?"sr-only":"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ye("h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","border border-border rounded-md hover:bg-accent","flex items-center justify-center transition-colors"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:Ye("text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]","flex items-center justify-center"),row:"flex w-full mt-2",cell:Ye("relative p-0 text-center text-sm focus-within:relative focus-within:z-20","h-9 w-9 p-0","group","[&:has([aria-selected].day-range-start)]:rounded-l-md [&:has([aria-selected].day-range-start)]:bg-primary","[&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-range-end)]:bg-primary","[&:has([aria-selected])]:bg-primary/30","[&:has([aria-selected].day-range-middle)]:bg-primary/10"),day:Ye("h-9 w-9 p-0 font-normal","aria-selected:opacity-100","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:rounded-md","data-today:bg-accent/30 data-today:text-accent-foreground","rounded-md transition-colors","flex items-center justify-center","day-range-middle:bg-primary/10","day-range-start:bg-primary day-range-start:text-primary-foreground","day-range-end:bg-primary day-range-end:text-primary-foreground"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_range_middle:"day-range-middle",day_selected:Ye("bg-primary text-primary-foreground","hover:bg-primary/90","focus:bg-primary focus:text-primary-foreground"),day_today:"bg-accent/30 text-accent-foreground",day_outside:"text-muted-foreground opacity-50",day_disabled:"text-muted-foreground opacity-50",day_hidden:"invisible"}},o=e=>t.createElement("div",{className:"relative"},b&&t.createElement("div",{className:"flex items-center justify-center gap-2 mb-4 px-2"},t.createElement("div",{className:"flex items-center gap-2"},t.createElement(HP,{options:T,value:Uj(S).toString(),onValueChange:A,placeholder:"Month",size:"small",variant:"basic",className:"w-25"}),t.createElement(HP,{options:C,value:Yj(S).toString(),onValueChange:M,placeholder:"Year",size:"small",variant:"basic",className:"w-25"}))),e);return o("single"===e?t.createElement(_P,{mode:"single",selected:r instanceof Date?r:void 0,onSelect:D,...n}):t.createElement(_P,{mode:"range",selected:k,onSelect:L,numberOfMonths:2,...n}))},[e,r,D,k,L,c,u,p,S,b,T,C,A,M]),I="single"===e?r instanceof Date:r&&!(r instanceof Date)&&(r.from||r.to);return t.createElement("div",{ref:x,className:"relative w-full","data-testid":g},d&&t.createElement("div",{className:Ye("mb-2 text-sm font-medium",m&&"text-destructive")},d,h&&t.createElement("span",{className:"text-destructive ml-1"},"*")),t.createElement(yz,{open:O,onOpenChange:E},t.createElement("div",{className:"relative"},t.createElement(vz,{asChild:!0},t.createElement(vt,{variant:v,className:Ye("w-full","inline-flex items-center","py-2 px-3","border border-input","hover:bg-accent/50","focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-primary",!r&&"text-muted-foreground",m&&"border-destructive focus:ring-destructive","transition-all duration-200","sm:text-sm md:text-base",y&&I&&"pr-10",f),disabled:c},t.createElement("div",{className:"inline-flex items-center gap-2 w-full pr-8"},t.createElement(rt,{className:"h-4 w-4 shrink-0"}),t.createElement("span",{className:"truncate flex-1 text-left","data-testid":"date-display"},z()||o)))),y&&I&&!c&&t.createElement("button",{type:"button",onClick:N,className:Ye("absolute right-2 top-1/2 -translate-y-1/2","p-1.5 rounded-md","hover:bg-accent/80","focus:outline-hidden focus:ring-2 focus:ring-primary","transition-all duration-200","z-10"),"aria-label":"Clear date","data-testid":"clear-button"},t.createElement(ht,{className:"h-4 w-4 text-muted-foreground hover:text-destructive transition-colors"}))),t.createElement(gz,null,t.createElement(bz,{className:Ye("z-50 rounded-lg border bg-popover p-3","shadow-lg ring-1 ring-black ring-opacity-5","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","w-auto min-w-[280px]","range"===e?"sm:min-w-[600px]":"sm:min-w-[320px]","max-w-[95vw]"),align:"start",sideOffset:4},t.createElement("div",{className:"w-full overflow-hidden"},t.createElement("div",{className:Ye("w-full","range"===e&&"overflow-x-auto")},_()))))),m&&t.createElement("p",{className:"mt-2 text-sm text-destructive"},m))});Sz.displayName="DatePicker";const Pz=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Cz=()=>{const e=t.useContext(Pz);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function Tz(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Nz(){return Az(/^iPad/)||Az(/^Mac/)&&navigator.maxTouchPoints>1}function Mz(){return Az(/^iPhone/)||Nz()}function Az(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const zz="undefined"!=typeof window?f:a;function Lz(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}const Dz="undefined"!=typeof document&&window.visualViewport;function _z(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Iz(e){for(_z(e)&&(e=e.parentElement);e&&!_z(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Rz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Bz,Wz=0;function Fz(e={}){let{isDisabled:t}=e;zz(()=>{if(!t)return Wz++,1===Wz&&Mz()&&(Bz=function(){let e,t=0,r=r=>{e=Iz(r.target),e===document.documentElement&&e===document.body||(t=r.changedTouches[0].pageY)},n=r=>{if(!e||e===document.documentElement||e===document.body)return void r.preventDefault();let n=r.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&n>t||o>=i&&n<t)&&r.preventDefault(),t=n)},o=e=>{let t=e.target;Hz(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},i=e=>{let t=e.target;Hz(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",Dz&&(Dz.height<window.innerHeight?requestAnimationFrame(()=>{Vz(t)}):Dz.addEventListener("resize",()=>Vz(t),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},l=window.pageXOffset,s=window.pageYOffset,c=Lz(function(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=Lz($z(document,"touchstart",r,{passive:!1,capture:!0}),$z(document,"touchmove",n,{passive:!1,capture:!0}),$z(document,"touchend",o,{passive:!1,capture:!0}),$z(document,"focus",i,!0),$z(window,"scroll",a));return()=>{c(),u(),window.scrollTo(l,s)}}()),()=>{Wz--,0===Wz&&(null==Bz||Bz())}},[t])}function $z(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function Vz(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=Iz(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=n-r)}e=t.parentElement}}function Hz(e){return e instanceof HTMLInputElement&&!Rz.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Uz(...t){return e.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...t),t)}const qz=new WeakMap;function Yz(e,t,r=!1){if(!(e&&e instanceof HTMLElement))return;let n={};Object.entries(t).forEach(([t,r])=>{t.startsWith("--")?e.style.setProperty(t,r):(n[t]=e.style[t],e.style[t]=r)}),r||qz.set(e,n)}const Xz=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Gz(e,t){if(!e)return null;const r=window.getComputedStyle(e),n=r.transform||r.webkitTransform||r.mozTransform;let o=n.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Xz(t)?13:12]):(o=n.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Xz(t)?5:4]):null)}function Kz(e,t){if(!e)return()=>{};const r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}const Zz={DURATION:.5,EASE:[.32,.72,0,1]},Jz=16,Qz="vaul-dragging";function eL(e){const r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>null==r.current?void 0:r.current.call(r,...e),[])}function tL({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:e,onChange:r}){const n=t.useState(e),[o]=n,i=t.useRef(o),a=eL(r);return t.useEffect(()=>{i.current!==o&&(a(o),i.current=o)},[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==e,l=a?e:o,s=eL(n),c=t.useCallback(t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)},[a,e,i,s]);return[l,c]}let rL=null;const nL=t.forwardRef(function({...e},r){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:a,isOpen:l,modal:s,shouldAnimate:c}=Cz(),u=Uz(r,n),p=o&&o.length>0;if(!s)return null;const f=t.useCallback(e=>i(e),[i]);return t.createElement(mN,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":l&&p?"true":"false","data-vaul-snap-points-overlay":l&&a?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});nL.displayName="Drawer.Overlay";const oL=t.forwardRef(function({onPointerDownOutside:e,style:r,onOpenAutoFocus:n,...o},i){const{drawerRef:a,onPress:s,onRelease:c,onDrag:u,keyboardIsOpen:p,snapPointsOffset:f,activeSnapPointIndex:d,modal:m,isOpen:h,direction:y,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:x}=Cz(),[O,E]=t.useState(!1),k=Uz(i,a),j=t.useRef(null),S=t.useRef(null),P=t.useRef(!1),C=v&&v.length>0;!function(){const{direction:e,isOpen:r,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=Cz(),a=t.useRef(null),s=l(()=>document.body.style.backgroundColor,[]);function c(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(r&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!i&&Kz(document.body,{background:"black"}),Kz(t,{transformOrigin:Xz(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Zz.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Zz.EASE.join(",")})`});const r=Kz(t,{borderRadius:"8px",overflow:"hidden",...Xz(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{r(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},1e3*Zz.DURATION)}}},[r,n,s])}();function T(e){j.current=null,P.current=!1,c(e)}return t.useEffect(()=>{C&&window.requestAnimationFrame(()=>{E(!0)})},[]),t.createElement(hN,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":h&&C?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...o,ref:k,style:f&&f.length>0?{"--snap-point-height":`${f[null!=d?d:0]}px`,...r}:r,onPointerDown:e=>{b||(null==o.onPointerDown||o.onPointerDown.call(o,e),j.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==n||n(e),x||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?p.current&&(p.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(S.current=e,b)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!j.current)return;const t=e.pageY-j.current.y,r=e.pageX-j.current.x,n="touch"===e.pointerType?10:2,i=((e,t,r=0)=>{if(P.current)return!0;const n=Math.abs(e.y),o=Math.abs(e.x),i=o>n,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=r)return i}else if(!(e.y*a<0)&&n>=0&&n<=r)return!i;return P.current=!0,!0})({x:r,y:t},y,n);i?u(e):(Math.abs(r)>n||Math.abs(t)>n)&&(j.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),j.current=null,P.current=!1,c(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),T(S.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),S.current&&T(S.current)}})});oL.displayName="Drawer.Content";const iL=t.forwardRef(function({preventCycle:e=!1,children:r,...n},o){const{closeDrawer:i,isDragging:a,snapPoints:l,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:p,isOpen:f,onPress:d,onDrag:m}=Cz(),h=t.useRef(null),y=t.useRef(!1);function v(){h.current&&window.clearTimeout(h.current),y.current=!1}return t.createElement("div",{onClick:function(){y.current?v():window.setTimeout(()=>{!function(){if(a||e||y.current)return void v();if(v(),!l||0===l.length)return void(u||i());if(s===l[l.length-1]&&u)return void i();const t=l.findIndex(e=>e===s);if(-1===t)return;const r=l[t+1];c(r)}()},120)},onPointerCancel:v,onPointerDown:e=>{p&&d(e),h.current=window.setTimeout(()=>{y.current=!0},250)},onPointerMove:e=>{p&&m(e)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},r))});iL.displayName="Drawer.Handle";const aL={Root:function({open:e,onOpenChange:r,children:n,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:l=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:p=!0,handleOnly:f=!1,fadeFromIndex:d=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:h,fixed:y,modal:v=!0,onClose:g,nested:b,noBodyStyles:w=!1,direction:x="bottom",defaultOpen:O=!1,disablePreventScroll:E=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:j=!1,repositionInputs:S=!0,onAnimationEnd:P,container:C,autoFocus:T=!1}){var N,M;const[A=!1,z]=tL({defaultProp:O,prop:e,onChange:e=>{null==r||r(e),e||b||ue(),setTimeout(()=>{null==P||P(e)},1e3*Zz.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[L,D]=t.useState(!1),[_,I]=t.useState(!1),[R,B]=t.useState(!1),W=t.useRef(null),F=t.useRef(null),$=t.useRef(null),V=t.useRef(null),H=t.useRef(null),U=t.useRef(!1),q=t.useRef(null),Y=t.useRef(0),X=t.useRef(!1),G=t.useRef(!O),K=t.useRef(0),Z=t.useRef(null),J=t.useRef((null==(N=Z.current)?void 0:N.getBoundingClientRect().height)||0),Q=t.useRef((null==(M=Z.current)?void 0:M.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback(e=>{a&&e===ae.length-1&&(F.current=new Date)},[]),{activeSnapPoint:re,activeSnapPointIndex:ne,setActiveSnapPoint:oe,onRelease:ie,snapPointsOffset:ae,onDrag:le,shouldFade:se,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:r,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:l,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[p,f]=tL({prop:e,defaultProp:null==n?void 0:n[0],onChange:r}),[d,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=t.useMemo(()=>p===(null==n?void 0:n[n.length-1])||null,[n,p]),y=t.useMemo(()=>{var e;return null!=(e=null==n?void 0:n.findIndex(e=>e===p))?e:null},[n,p]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===p||!n,g=t.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map(t=>{const r="string"==typeof t;let n=0;if(r&&(n=parseInt(t,10)),Xz(s)){const o=r?n:d?t*e.height:0;return d?"bottom"===s?e.height-o:-e.height+o:o}const o=r?n:d?t*e.width:0;return d?"right"===s?e.width-o:-e.width+o:o}))?t:[]},[n,d,c]),b=t.useMemo(()=>null!==y?null==g?void 0:g[y]:null,[g,y]),w=t.useCallback(e=>{var t;const r=null!=(t=null==g?void 0:g.findIndex(t=>t===e))?t:null;l(r),Yz(o.current,{transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,transform:Xz(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&r!==g.length-1&&void 0!==a&&r!==a&&r<a?Yz(i.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,opacity:"0"}):Yz(i.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(r,0)])},[o.current,n,g,a,i,f]);return t.useEffect(()=>{if(p||e){var t;const r=null!=(t=null==n?void 0:n.findIndex(t=>t===e||t===p))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&w(g[r])}},[p,e,n,g,w]),{isLastSnapPoint:h,activeSnapPoint:p,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof y||!g||void 0===a)return null;const r=y===a-1;if(y>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?y+1:y-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:f,activeSnapPointIndex:y,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===a)return;const l="bottom"===s||"right"===s?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===y,p=e>0;if(y===a-1&&Yz(i.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`}),!u&&r>2&&!p)return void(o?t():w(g[0]));if(!u&&r>2&&p&&g&&n)return void w(g[n.length-1]);const f=null==g?void 0:g.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-l)<Math.abs(e-l)?t:e),d=Xz(s)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*d){const e=p?1:-1;if(e>0&&h&&n)return void w(g[n.length-1]);if(c&&e<0&&o&&t(),null===y)return;return void w(g[y+e])}w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===s||"right"===s?b-e:b+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||Yz(o.current,{transform:Xz(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:Z,fadeFromIndex:d,overlayRef:W,onSnapPointChange:te,direction:x,container:C,snapToSequentialPoint:k});Fz({isDisabled:!A||_||!v||R||!L||!S||!E});const{restorePositionSetting:ue}=function({isOpen:e,modal:r,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:a}){const[l,s]=t.useState(()=>"undefined"!=typeof window?window.location.href:""),c=t.useRef(0),u=t.useCallback(()=>{if(Tz()&&null===rL&&e&&!a){rL={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}),300)}},[e]),p=t.useCallback(()=>{if(Tz()&&null!==rL&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,rL),window.requestAnimationFrame(()=>{i&&l!==window.location.href?s(window.location.href):window.scrollTo(t,e)}),rL=null}},[l]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(r)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||p())}},[r,p]),t.useEffect(()=>{!n&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),r||window.setTimeout(()=>{p()},500)):p())},[e,o,l,r,n,u,p]),{restorePositionSetting:p}}({isOpen:A,modal:v,nested:null!=b&&b,hasBeenOpened:L,preventScrollRestoration:j,noBodyStyles:w});function pe(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var r;let n=e;const o=null==(r=window.getSelection())?void 0:r.toString(),i=Z.current?Gz(Z.current,x):null,a=new Date;if("SELECT"===n.tagName)return!1;if(n.hasAttribute("data-vaul-no-drag")||n.closest("[data-vaul-no-drag]"))return!1;if("right"===x||"left"===x)return!0;if(F.current&&a.getTime()-F.current.getTime()<500)return!1;if(null!==i&&("bottom"===x?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(H.current&&a.getTime()-H.current.getTime()<u&&0===i)return H.current=a,!1;if(t)return H.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(0!==n.scrollTop)return H.current=new Date,!1;if("dialog"===n.getAttribute("role"))return!0}n=n.parentNode}return!0}function de(e){!function(){if(!_||!Z.current)return;Z.current.classList.remove(Qz),U.current=!1,I(!1),V.current=new Date}(),null==g||g(),e||z(!1),setTimeout(()=>{a&&oe(a[0])},1e3*Zz.DURATION)}function me(){if(!Z.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Gz(Z.current,x);Yz(Z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`}),Yz(W.current,{transition:`opacity ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,opacity:"1"}),l&&t&&t>0&&A&&Yz(e,{borderRadius:"8px",overflow:"hidden",...Xz(x)?{transform:`scale(${pe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${pe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Zz.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Zz.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{G.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!Z.current||!S)return;if(Hz(document.activeElement)||X.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,r=window.innerHeight;let n=r-t;const o=Z.current.getBoundingClientRect().height||0,i=o>.8*r;ee.current||(ee.current=o);const l=Z.current.getBoundingClientRect().top;if(Math.abs(K.current-n)>60&&(X.current=!X.current),a&&a.length>0&&ae&&ne){n+=ae[ne]||0}if(K.current=n,o>t||X.current){const e=Z.current.getBoundingClientRect().height;let r=e;e>t&&(r=t-(i?l:26)),Z.current.style.height=y?e-Math.max(n,0)+"px":`${Math.max(r,t-l)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(Z.current.style.height=`${ee.current}px`);a&&a.length>0&&!X.current?Z.current.style.bottom="0px":Z.current.style.bottom=`${Math.max(n,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[ne,a,ae]),t.useEffect(()=>(A&&(Yz(document.documentElement,{scrollBehavior:"auto"}),F.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let r=qz.get(e);r&&(e.style[t]=r[t])}(document.documentElement,"scrollBehavior")}),[A]),t.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),t.createElement(pN,{defaultOpen:O,onOpenChange:e=>{(p||e)&&(e?D(!0):de(!0),z(e))},open:A},t.createElement(Pz.Provider,{value:{activeSnapPoint:re,snapPoints:a,setActiveSnapPoint:oe,drawerRef:Z,overlayRef:W,onOpenChange:r,onPress:function(e){var t,r;(p||a)&&(Z.current&&!Z.current.contains(e.target)||(J.current=(null==(t=Z.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(r=Z.current)?void 0:r.getBoundingClientRect().width)||0,I(!0),$.current=new Date,Mz()&&window.addEventListener("touchend",()=>U.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),Y.current=Xz(x)?e.pageY:e.pageX))},onRelease:function(e){if(!_||!Z.current)return;Z.current.classList.remove(Qz),U.current=!1,I(!1),V.current=new Date;const t=Gz(Z.current,x);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===$.current)return;const r=V.current.getTime()-$.current.getTime(),n=Y.current-(Xz(x)?e.pageY:e.pageX),o=Math.abs(n)/r;if(o>.05&&(B(!0),setTimeout(()=>{B(!1)},200)),a){return ie({draggedDistance:n*("bottom"===x||"right"===x?1:-1),closeDrawer:de,velocity:o,dismissible:p}),void(null==i||i(e,!0))}if("bottom"===x||"right"===x?n>0:n<0)return me(),void(null==i||i(e,!0));if(o>.4)return de(),void(null==i||i(e,!1));var l;const s=Math.min(null!=(l=Z.current.getBoundingClientRect().height)?l:0,window.innerHeight);var u;const f=Math.min(null!=(u=Z.current.getBoundingClientRect().width)?u:0,window.innerWidth),d="left"===x||"right"===x;if(Math.abs(t)>=(d?f:s)*c)return de(),void(null==i||i(e,!1));null==i||i(e,!0),me()},onDrag:function(e){var t;if(Z.current&&_){const r="bottom"===x||"right"===x?1:-1,n=(Y.current-(Xz(x)?e.pageY:e.pageX))*r,i=n>0,s=a&&!p&&!i;if(s&&0===ne)return;const c=Math.abs(n),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===x||"top"===x?J.current:Q.current);const m=ce(c,i);if(null!==m&&(f=m),s&&f>=1)return;if(!U.current&&!fe(e.target,i))return;if(Z.current.classList.add(Qz),U.current=!0,Yz(Z.current,{transition:"none"}),Yz(W.current,{transition:"none"}),a&&le({draggedDistance:n}),i&&!a){const e=(t=n,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*r;return void Yz(Z.current,{transform:Xz(x)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const h=1-f;if((se||d&&ne===d-1)&&(null==o||o(e,f),Yz(W.current,{opacity:`${h}`,transition:"none"},!0)),u&&W.current&&l){const e=Math.min(pe()+f*(1-pe()),1),t=8-8*f,r=Math.max(0,14-14*f);Yz(u,{borderRadius:`${t}px`,transform:Xz(x)?`scale(${e}) translate3d(0, ${r}px, 0)`:`scale(${e}) translate3d(${r}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=c*r;Yz(Z.current,{transform:Xz(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:p,shouldAnimate:G,handleOnly:f,isOpen:A,isDragging:_,shouldFade:se,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const r=(window.innerWidth-Jz)/window.innerWidth,n=r+t*(1-r),o=t*Jz-16;Yz(Z.current,{transform:Xz(x)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-Jz)/window.innerWidth:1,r=e?-16:0;q.current&&window.clearTimeout(q.current),Yz(Z.current,{transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,transform:Xz(x)?`scale(${t}) translate3d(0, ${r}px, 0)`:`scale(${t}) translate3d(${r}px, 0, 0)`}),!e&&Z.current&&(q.current=setTimeout(()=>{const e=Gz(Z.current,x);Yz(Z.current,{transition:"none",transform:Xz(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const r=Xz(x)?window.innerHeight:window.innerWidth,n=t?(r-Jz)/r:1,o=t?-16:0;t&&Yz(Z.current,{transition:`transform ${Zz.DURATION}s cubic-bezier(${Zz.EASE.join(",")})`,transform:Xz(x)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:X,modal:v,snapPointsOffset:ae,activeSnapPointIndex:ne,direction:x,shouldScaleBackground:l,setBackgroundColorOnScale:s,noBodyStyles:w,container:C,autoFocus:T}},n))},Content:oL,Overlay:nL,Portal:function(e){const r=Cz(),{container:n=r.container,...o}=e;return t.createElement(dN,{container:n,...o})},Title:yN,Description:vN},lL=({shouldScaleBackground:t=!0,...r})=>e.createElement(aL.Root,{shouldScaleBackground:t,...r});lL.displayName="Drawer";const sL=aL.Portal,cL=e.forwardRef(({className:t,...r},n)=>e.createElement(aL.Overlay,{ref:n,className:Ye("fixed inset-0 z-50 bg-black/80",t),...r}));cL.displayName=aL.Overlay.displayName;const uL=e.forwardRef(({className:t,children:r,...n},o)=>e.createElement(sL,null,e.createElement(cL,null),e.createElement(aL.Content,{ref:o,className:Ye("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n},e.createElement("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),r)));uL.displayName="DrawerContent";const pL=({className:t,...r})=>e.createElement("div",{className:Ye("grid gap-1.5 p-4 text-center sm:text-left",t),...r});pL.displayName="DrawerHeader";const fL=e.forwardRef(({className:t,...r},n)=>e.createElement(aL.Title,{ref:n,className:Ye("text-lg font-semibold leading-none tracking-tight",t),...r}));fL.displayName=aL.Title.displayName;const dL=e.forwardRef(({className:t,...r},n)=>e.createElement(aL.Description,{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));dL.displayName=aL.Description.displayName;const mL={small:"h-64",medium:"h-80",large:"h-96",extraLarge:"h-[448px]",full:"h-screen"},hL=({children:e,isOpen:r,onClose:n,size:o="medium",title:i,description:a,showCloseButton:l=!0})=>{const s=mL[o];return t.createElement(lL,{open:r,onOpenChange:n},t.createElement(uL,{className:`fixed inset-x-0 bottom-0 ${s} bg-background`},t.createElement(pL,{className:"relative"},i?t.createElement(fL,null,i):t.createElement(fL,{className:"sr-only"},"Drawer Content"),a?t.createElement(dL,null,a):t.createElement(dL,{className:"sr-only"},i||"Drawer Content"," panel"),l&&t.createElement("button",{onClick:n,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100","aria-label":"Close drawer"},t.createElement(ht,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close"))),t.createElement("div",{className:"mt-6 px-4"},e)))},yL=m({});function vL(e){const t=c(null);return null===t.current&&(t.current=e()),t.current}const gL="undefined"!=typeof window,bL=gL?f:a,wL=m(null);function xL(e,t){-1===e.indexOf(t)&&e.push(t)}function OL(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const EL=(e,t,r)=>r>t?t:r<e?e:r;function kL(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let jL=()=>{},SL=()=>{};"production"!==process.env.NODE_ENV&&(jL=(e,t,r)=>{e||"undefined"==typeof console||console.warn(kL(t,r))},SL=(e,t,r)=>{if(!e)throw new Error(kL(t,r))});const PL={},CL=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function TL(e){return"object"==typeof e&&null!==e}const NL=e=>/^0[^.\s]+$/u.test(e);function ML(e){let t;return()=>(void 0===t&&(t=e()),t)}const AL=e=>e,zL=(e,t)=>r=>t(e(r)),LL=(...e)=>e.reduce(zL),DL=(e,t,r)=>{const n=t-e;return 0===n?1:(r-e)/n};class _L{constructor(){this.subscriptions=[]}add(e){return xL(this.subscriptions,e),()=>OL(this.subscriptions,e)}notify(e,t,r){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let o=0;o<n;o++){const n=this.subscriptions[o];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const IL=e=>1e3*e,RL=e=>e/1e3;function BL(e,t){return t?e*(1e3/t):0}const WL=new Set;function FL(e,t,r){e||WL.has(t)||(console.warn(kL(t,r)),WL.add(t))}const $L=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function VL(e,t,r,n){if(e===t&&r===n)return AL;const o=t=>function(e,t,r,n,o){let i,a,l=0;do{a=t+(r-t)/2,i=$L(a,n,o)-e,i>0?r=a:t=a}while(Math.abs(i)>1e-7&&++l<12);return a}(t,0,1,e,r);return e=>0===e||1===e?e:$L(o(e),t,n)}const HL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,UL=e=>t=>1-e(1-t),qL=VL(.33,1.53,.69,.99),YL=UL(qL),XL=HL(YL),GL=e=>(e*=2)<1?.5*YL(e):.5*(2-Math.pow(2,-10*(e-1))),KL=e=>1-Math.sin(Math.acos(e)),ZL=UL(KL),JL=HL(KL),QL=VL(.42,0,1,1),eD=VL(0,0,.58,1),tD=VL(.42,0,.58,1),rD=e=>Array.isArray(e)&&"number"==typeof e[0],nD={linear:AL,easeIn:QL,easeInOut:tD,easeOut:eD,circIn:KL,circInOut:JL,circOut:ZL,backIn:YL,backInOut:XL,backOut:qL,anticipate:GL},oD=e=>{if(rD(e)){SL(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,o]=e;return VL(t,r,n,o)}return"string"==typeof e?(SL(void 0!==nD[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nD[e]):e},iD=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function aD(e,t){let r=!1,n=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=iD.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,n=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(t){i.has(t)&&(s.schedule(t),e()),t(a)}const s={schedule:(e,o=!1,a=!1)=>{const l=a&&n?t:r;return o&&i.add(e),l.has(e)||l.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{a=e,n?o=!0:(n=!0,[t,r]=[r,t],t.forEach(l),t.clear(),n=!1,o&&(o=!1,s.process(e)))}};return s}(i),e),{}),{setup:l,read:s,resolveKeyframes:c,preUpdate:u,update:p,preRender:f,render:d,postRender:m}=a,h=()=>{const i=PL.useManualTiming?o.timestamp:performance.now();r=!1,PL.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,l.process(o),s.process(o),c.process(o),u.process(o),p.process(o),f.process(o),d.process(o),m.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(h))};return{schedule:iD.reduce((t,i)=>{const l=a[i];return t[i]=(t,i=!1,a=!1)=>(r||(r=!0,n=!0,o.isProcessing||e(h)),l.schedule(t,i,a)),t},{}),cancel:e=>{for(let t=0;t<iD.length;t++)a[iD[t]].cancel(e)},state:o,steps:a}}const{schedule:lD,cancel:sD,state:cD,steps:uD}=aD("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:AL,!0);let pD;function fD(){pD=void 0}const dD={now:()=>(void 0===pD&&dD.set(cD.isProcessing||PL.useManualTiming?cD.timestamp:performance.now()),pD),set:e=>{pD=e,queueMicrotask(fD)}},mD=e=>t=>"string"==typeof t&&t.startsWith(e),hD=mD("--"),yD=mD("var(--"),vD=e=>!!yD(e)&&gD.test(e.split("/*")[0].trim()),gD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bD={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},wD={...bD,transform:e=>EL(0,1,e)},xD={...bD,default:1},OD=e=>Math.round(1e5*e)/1e5,ED=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const kD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jD=(e,t)=>r=>Boolean("string"==typeof r&&kD.test(r)&&r.startsWith(e)||t&&!function(e){return null==e}(r)&&Object.prototype.hasOwnProperty.call(r,t)),SD=(e,t,r)=>n=>{if("string"!=typeof n)return n;const[o,i,a,l]=n.match(ED);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}},PD={...bD,transform:e=>Math.round((e=>EL(0,255,e))(e))},CD={test:jD("rgb","red"),parse:SD("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+PD.transform(e)+", "+PD.transform(t)+", "+PD.transform(r)+", "+OD(wD.transform(n))+")"};const TD={test:jD("#"),parse:function(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:CD.transform},ND=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),MD=ND("deg"),AD=ND("%"),zD=ND("px"),LD=ND("vh"),DD=ND("vw"),_D=(()=>({...AD,parse:e=>AD.parse(e)/100,transform:e=>AD.transform(100*e)}))(),ID={test:jD("hsl","hue"),parse:SD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+AD.transform(OD(t))+", "+AD.transform(OD(r))+", "+OD(wD.transform(n))+")"},RD={test:e=>CD.test(e)||TD.test(e)||ID.test(e),parse:e=>CD.test(e)?CD.parse(e):ID.test(e)?ID.parse(e):TD.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?CD.transform(e):ID.transform(e),getAnimatableNone:e=>{const t=RD.parse(e);return t.alpha=0,RD.transform(t)}},BD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const WD="number",FD="color",$D=/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 VD(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace($D,e=>(RD.test(e)?(n.color.push(i),o.push(FD),r.push(RD.parse(e))):e.startsWith("var(")?(n.var.push(i),o.push("var"),r.push(e)):(n.number.push(i),o.push(WD),r.push(parseFloat(e))),++i,"${}")).split("${}");return{values:r,split:a,indexes:n,types:o}}function HD(e){return VD(e).values}function UD(e){const{split:t,types:r}=VD(e),n=t.length;return e=>{let o="";for(let i=0;i<n;i++)if(o+=t[i],void 0!==e[i]){const t=r[i];o+=t===WD?OD(e[i]):t===FD?RD.transform(e[i]):e[i]}return o}}const qD=e=>"number"==typeof e?0:RD.test(e)?RD.getAnimatableNone(e):e;const YD={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ED)?.length||0)+(e.match(BD)?.length||0)>0},parse:HD,createTransformer:UD,getAnimatableNone:function(e){const t=HD(e);return UD(e)(t.map(qD))}};function XD(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function GD(e,t){return r=>r>0?t:e}const KD=(e,t,r)=>e+(t-e)*r,ZD=(e,t,r)=>{const n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},JD=[TD,CD,ID];function QD(e){const t=(r=e,JD.find(e=>e.test(r)));var r;if(jL(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let n=t.parse(e);return t===ID&&(n=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let o=0,i=0,a=0;if(t/=100){const n=r<.5?r*(1+t):r+t-r*t,l=2*r-n;o=XD(l,n,e+1/3),i=XD(l,n,e),a=XD(l,n,e-1/3)}else o=i=a=r;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:n}}(n)),n}const e_=(e,t)=>{const r=QD(e),n=QD(t);if(!r||!n)return GD(e,t);const o={...r};return e=>(o.red=ZD(r.red,n.red,e),o.green=ZD(r.green,n.green,e),o.blue=ZD(r.blue,n.blue,e),o.alpha=KD(r.alpha,n.alpha,e),CD.transform(o))},t_=new Set(["none","hidden"]);function r_(e,t){return r=>KD(e,t,r)}function n_(e){return"number"==typeof e?r_:"string"==typeof e?vD(e)?GD:RD.test(e)?e_:a_:Array.isArray(e)?o_:"object"==typeof e?RD.test(e)?e_:i_:GD}function o_(e,t){const r=[...e],n=r.length,o=e.map((e,r)=>n_(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=o[t](e);return r}}function i_(e,t){const r={...e,...t},n={};for(const o in r)void 0!==e[o]&&void 0!==t[o]&&(n[o]=n_(e[o])(e[o],t[o]));return e=>{for(const t in n)r[t]=n[t](e);return r}}const a_=(e,t)=>{const r=YD.createTransformer(t),n=VD(e),o=VD(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?t_.has(e)&&!o.values.length||t_.has(t)&&!n.values.length?function(e,t){return t_.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}(e,t):LL(o_(function(e,t){const r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][n[i]],l=e.values[a]??0;r[o]=l,n[i]++}return r}(n,o),o.values),r):(jL(!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.`,"complex-values-different"),GD(e,t))};function l_(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return KD(e,t,r);return n_(e)(e,t)}const s_=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>lD.update(t,e),stop:()=>sD(t),now:()=>cD.isProcessing?cD.timestamp:dD.now()}},c_=(e,t,r=10)=>{let n="";const o=Math.max(Math.round(t/r),2);for(let t=0;t<o;t++)n+=Math.round(1e4*e(t/(o-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},u_=2e4;function p_(e){let t=0;let r=e.next(t);for(;!r.done&&t<u_;)t+=50,r=e.next(t);return t>=u_?1/0:t}function f_(e,t,r){const n=Math.max(t-5,0);return BL(r-e(n),t-n)}const d_=100,m_=10,h_=1,y_=0,v_=800,g_=.3,b_=.3,w_={granular:.01,default:2},x_={granular:.005,default:.5},O_=.01,E_=10,k_=.05,j_=1,S_=.001;function P_({duration:e=v_,bounce:t=g_,velocity:r=y_,mass:n=h_}){let o,i;jL(e<=IL(E_),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=EL(k_,j_,a),e=EL(O_,E_,RL(e)),a<1?(o=t=>{const n=t*a,o=n*e,i=n-r,l=T_(t,a),s=Math.exp(-o);return S_-i/l*s},i=t=>{const n=t*a*e,i=n*r+r,l=Math.pow(a,2)*Math.pow(t,2)*e,s=Math.exp(-n),c=T_(Math.pow(t,2),a);return(-o(t)+S_>0?-1:1)*((i-l)*s)/c}):(o=t=>Math.exp(-t*e)*((t-r)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(r-t)));const l=function(e,t,r){let n=r;for(let r=1;r<C_;r++)n-=e(n)/t(n);return n}(o,i,5/e);if(e=IL(e),isNaN(l))return{stiffness:d_,damping:m_,duration:e};{const t=Math.pow(l,2)*n;return{stiffness:t,damping:2*a*Math.sqrt(n*t),duration:e}}}const C_=12;function T_(e,t){return e*Math.sqrt(1-t*t)}const N_=["duration","bounce"],M_=["stiffness","damping","mass"];function A_(e,t){return t.some(t=>void 0!==e[t])}function z_(e=b_,t=g_){const r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:o}=r;const i=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],l={done:!1,value:i},{stiffness:s,damping:c,mass:u,duration:p,velocity:f,isResolvedFromDuration:d}=function(e){let t={velocity:y_,stiffness:d_,damping:m_,mass:h_,isResolvedFromDuration:!1,...e};if(!A_(e,M_)&&A_(e,N_))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(1.2*r),o=n*n,i=2*EL(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:h_,stiffness:o,damping:i}}else{const r=P_(e);t={...t,...r,mass:h_},t.isResolvedFromDuration=!0}return t}({...r,velocity:-RL(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(s*u)),y=a-i,v=RL(Math.sqrt(s/u)),g=Math.abs(y)<5;let b;if(n||(n=g?w_.granular:w_.default),o||(o=g?x_.granular:x_.default),h<1){const e=T_(v,h);b=t=>{const r=Math.exp(-h*v*t);return a-r*((m+h*v*y)/e*Math.sin(e*t)+y*Math.cos(e*t))}}else if(1===h)b=e=>a-Math.exp(-v*e)*(y+(m+v*y)*e);else{const e=v*Math.sqrt(h*h-1);b=t=>{const r=Math.exp(-h*v*t),n=Math.min(e*t,300);return a-r*((m+h*v*y)*Math.sinh(n)+e*y*Math.cosh(n))/e}}const w={calculatedDuration:d&&p||null,next:e=>{const t=b(e);if(d)l.done=e>=p;else{let r=0===e?m:0;h<1&&(r=0===e?IL(m):f_(b,e,t));const i=Math.abs(r)<=n,s=Math.abs(a-t)<=o;l.done=i&&s}return l.value=l.done?a:t,l},toString:()=>{const e=Math.min(p_(w),u_),t=c_(t=>w.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return w}function L_({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:s,restDelta:c=.5,restSpeed:u}){const p=e[0],f={done:!1,value:p},d=e=>void 0===l?s:void 0===s||Math.abs(l-e)<Math.abs(s-e)?l:s;let m=r*t;const h=p+m,y=void 0===a?h:a(h);y!==h&&(m=y-p);const v=e=>-m*Math.exp(-e/n),g=e=>y+v(e),b=e=>{const t=v(e),r=g(e);f.done=Math.abs(t)<=c,f.value=f.done?y:r};let w,x;const O=e=>{var t;(t=f.value,void 0!==l&&t<l||void 0!==s&&t>s)&&(w=e,x=z_({keyframes:[f.value,d(f.value)],velocity:f_(g,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return O(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),O(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),f)}}}function D_(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;if(SL(i===t.length,"Both input and output ranges must be the same length","range-length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=function(e,t,r){const n=[],o=r||PL.mix||l_,i=e.length-1;for(let r=0;r<i;r++){let i=o(e[r],e[r+1]);if(t){const e=Array.isArray(t)?t[r]||AL:t;i=LL(e,i)}n.push(i)}return n}(t,n,o),s=l.length,c=r=>{if(a&&r<e[0])return t[0];let n=0;if(s>1)for(;n<e.length-2&&!(r<e[n+1]);n++);const o=DL(e[n],e[n+1],r);return l[n](o)};return r?t=>c(EL(e[0],e[i-1],t)):c}function __(e){const t=[0];return function(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=DL(0,t,n);e.push(KD(r,1,o))}}(t,e.length-1),t}function I_({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(n)?n.map(oD):oD(n),i={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(r&&r.length===t.length?r:__(t),e),l=D_(a,t,{ease:Array.isArray(o)?o:(s=t,c=o,s.map(()=>c||tD).splice(0,s.length-1))});var s,c;return{calculatedDuration:e,next:t=>(i.value=l(t),i.done=t>=e,i)}}z_.applyToOptions=e=>{const t=function(e,t=100,r){const n=r({...e,keyframes:[0,t]}),o=Math.min(p_(n),u_);return{type:"keyframes",ease:e=>n.next(o*e).value/t,duration:RL(o)}}(e,100,z_);return e.ease=t.ease,e.duration=IL(t.duration),e.type="keyframes",e};const R_=e=>null!==e;function B_(e,{repeat:t,repeatType:r="loop"},n,o=1){const i=e.filter(R_),a=o<0||t&&"loop"!==r&&t%2==1?0:i.length-1;return a&&void 0!==n?n:i[a]}const W_={decay:L_,inertia:L_,tween:I_,keyframes:I_,spring:z_};function F_(e){"string"==typeof e.type&&(e.type=W_[e.type])}class $_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const V_=e=>e/100;class H_ extends $_{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==dD.now()&&this.tick(dD.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;F_(e);const{type:t=I_,repeat:r=0,repeatDelay:n=0,repeatType:o,velocity:i=0}=e;let{keyframes:a}=e;const l=t||I_;"production"!==process.env.NODE_ENV&&l!==I_&&SL(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==I_&&"number"!=typeof a[0]&&(this.mixKeyframes=LL(V_,l_(a[0],a[1])),a=[0,100]);const s=l({...e,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-i})),null===s.calculatedDuration&&(s.calculatedDuration=p_(s));const{calculatedDuration:c}=s;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=s}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:n,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return r.next(0);const{delay:s=0,keyframes:c,repeat:u,repeatType:p,repeatDelay:f,type:d,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const y=this.currentTime-s*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let g=this.currentTime,b=r;if(u){const e=Math.min(this.currentTime,n)/a;let t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===p?(r=1-r,f&&(r-=f/a)):"mirror"===p&&(b=i)),g=EL(0,1,r)*a}const w=v?{done:!1,value:c[0]}:b.next(g);o&&(w.value=o(w.value));let{done:x}=w;v||null===l||(x=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const O=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return O&&d!==L_&&(w.value=B_(c,this.options,h,this.speed)),m&&m(w.value),O&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return RL(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+RL(e)}get time(){return RL(this.currentTime)}set time(e){e=IL(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(dD.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=RL(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=s_,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dD.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const U_=e=>180*e/Math.PI,q_=e=>{const t=U_(Math.atan2(e[1],e[0]));return X_(t)},Y_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:q_,rotateZ:q_,skewX:e=>U_(Math.atan(e[1])),skewY:e=>U_(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},X_=e=>((e%=360)<0&&(e+=360),e),G_=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),K_=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:G_,scaleY:K_,scale:e=>(G_(e)+K_(e))/2,rotateX:e=>X_(U_(Math.atan2(e[6],e[5]))),rotateY:e=>X_(U_(Math.atan2(-e[2],e[0]))),rotateZ:q_,rotate:q_,skewX:e=>U_(Math.atan(e[4])),skewY:e=>U_(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function J_(e){return e.includes("scale")?1:0}function Q_(e,t){if(!e||"none"===e)return J_(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,o;if(r)n=Z_,o=r;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Y_,o=t}if(!o)return J_(t);const i=n[t],a=o[1].split(",").map(eI);return"function"==typeof i?i(a):a[i]}function eI(e){return parseFloat(e.trim())}const tI=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rI=(()=>new Set(tI))(),nI=e=>e===bD||e===zD,oI=new Set(["x","y","z"]),iI=tI.filter(e=>!oI.has(e));const aI={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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:(e,{transform:t})=>Q_(t,"x"),y:(e,{transform:t})=>Q_(t,"y")};aI.translateX=aI.x,aI.translateY=aI.y;const lI=new Set;let sI=!1,cI=!1,uI=!1;function pI(){if(cI){const e=Array.from(lI).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{const t=function(e){const t=[];return iI.forEach(r=>{const n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=r.get(e);t&&t.forEach(([t,r])=>{e.getValue(t)?.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}cI=!1,sI=!1,lI.forEach(e=>e.complete(uI)),lI.clear()}function fI(){lI.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cI=!0)})}class dI{constructor(e,t,r,n,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(lI.add(this),sI||(sI=!0,lD.read(fI),lD.resolveKeyframes(pI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(null===e[0]){const o=n?.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(r&&t){const n=r.readValue(t,i);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=i),n&&void 0===o&&n.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),lI.delete(this)}cancel(){"scheduled"===this.state&&(lI.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const mI=ML(()=>void 0!==window.ScrollTimeline),hI={};function yI(e,t){const r=ML(e);return()=>hI[t]??r()}const vI=yI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),gI=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,bI={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gI([0,.65,.55,1]),circOut:gI([.55,0,1,.45]),backIn:gI([.31,.01,.66,-.59]),backOut:gI([.33,1.53,.69,.99])};function wI(e,t){return e?"function"==typeof e?vI()?c_(e,t):"ease-out":rD(e)?gI(e):Array.isArray(e)?e.map(e=>wI(e,t)||bI.easeOut):bI[e]:void 0}function xI(e,t,r,{delay:n=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeOut",times:s}={},c=void 0){const u={[t]:r};s&&(u.offset=s);const p=wI(l,o);Array.isArray(p)&&(u.easing=p);const f={delay:n,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function OI(e){return"function"==typeof e&&"applyToOptions"in e}class EI extends $_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=i,this.options=e,SL("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const s=function({type:e,...t}){return OI(e)&&vI()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=xI(t,r,n,s,o),!1===s.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=B_(n,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,r){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,r):e.style[t]=r}(t,r,e),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return RL(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+RL(e)}get time(){return RL(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=IL(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&mI()?(this.animation.timeline=e,AL):t(this)}}const kI={anticipate:GL,backInOut:XL,circInOut:JL};function jI(e){"string"==typeof e.ease&&e.ease in kI&&(e.ease=kI[e.ease])}class SI extends EI{constructor(e){jI(e),F_(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:n,element:o,...i}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const a=new H_({...i,autoplay:!1}),l=IL(this.finishedTime??this.time);t.setWithVelocity(a.sample(l-10).value,a.sample(l).value,10),a.stop()}}const PI=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!YD.test(e)&&"0"!==e||e.startsWith("url(")));function CI(e){e.duration=0,e.type="keyframes"}const TI=new Set(["opacity","clipPath","filter","transform"]),NI=ML(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class MI extends $_{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,motionValue:s,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dD.now();const p={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:o,repeatType:i,name:l,motionValue:s,element:c,...u},f=c?.KeyframeResolver||dI;this.keyframeResolver=new f(a,(e,t,r)=>this.onKeyframesResolved(e,t,p,!r),l,s,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:s,onUpdate:c}=r;this.resolvedAt=dD.now(),function(e,t,r,n){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=PI(o,t),l=PI(i,t);return jL(a===l,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||OI(r))&&n)}(e,o,i,a)||(!PL.instantAnimations&&l||c?.(B_(e,r,t)),e[0]=e[e.length-1],CI(r),r.repeat=0);const u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},p=!s&&function(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:i,type:a}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:c}=t.owner.getProps();return NI()&&r&&TI.has(r)&&("transform"!==r||!c)&&!s&&!n&&"mirror"!==o&&0!==i&&"inertia"!==a}(u)?new SI({...u,element:u.motionValue.owner.current}):new H_(u);p.finished.then(()=>this.notifyFinished()).catch(AL),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),uI=!0,fI(),pI(),uI=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const AI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zI(e,t,r=1){SL(r<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,o]=function(e){const t=AI.exec(e);if(!t)return[,];const[,r,n,o]=t;return[`--${r??n}`,o]}(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const e=i.trim();return CL(e)?parseFloat(e):e}return vD(o)?zI(o,t,r+1):o}function LI(e,t){return e?.[t]??e?.default??e}const DI=new Set(["width","height","top","left","right","bottom",...tI]),_I=e=>t=>t.test(e),II=[bD,zD,AD,MD,DD,LD,{test:e=>"auto"===e,parse:e=>e}],RI=e=>II.find(_I(e));function BI(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||NL(e))}const WI=new Set(["brightness","contrast","saturate","opacity"]);function FI(e){const[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[n]=r.match(ED)||[];if(!n)return e;const o=r.replace(n,"");let i=WI.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const $I=/\b([a-z-]*)\(.*?\)/gu,VI={...YD,getAnimatableNone:e=>{const t=e.match($I);return t?t.map(FI).join(" "):e}},HI={...bD,transform:Math.round},UI={borderWidth:zD,borderTopWidth:zD,borderRightWidth:zD,borderBottomWidth:zD,borderLeftWidth:zD,borderRadius:zD,radius:zD,borderTopLeftRadius:zD,borderTopRightRadius:zD,borderBottomRightRadius:zD,borderBottomLeftRadius:zD,width:zD,maxWidth:zD,height:zD,maxHeight:zD,top:zD,right:zD,bottom:zD,left:zD,padding:zD,paddingTop:zD,paddingRight:zD,paddingBottom:zD,paddingLeft:zD,margin:zD,marginTop:zD,marginRight:zD,marginBottom:zD,marginLeft:zD,backgroundPositionX:zD,backgroundPositionY:zD,...{rotate:MD,rotateX:MD,rotateY:MD,rotateZ:MD,scale:xD,scaleX:xD,scaleY:xD,scaleZ:xD,skew:MD,skewX:MD,skewY:MD,distance:zD,translateX:zD,translateY:zD,translateZ:zD,x:zD,y:zD,z:zD,perspective:zD,transformPerspective:zD,opacity:wD,originX:_D,originY:_D,originZ:zD},zIndex:HI,fillOpacity:wD,strokeOpacity:wD,numOctaves:HI},qI={...UI,color:RD,backgroundColor:RD,outlineColor:RD,fill:RD,stroke:RD,borderColor:RD,borderTopColor:RD,borderRightColor:RD,borderBottomColor:RD,borderLeftColor:RD,filter:VI,WebkitFilter:VI},YI=e=>qI[e];function XI(e,t){let r=YI(e);return r!==VI&&(r=YD),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const GI=new Set(["auto","none","0"]);class KI extends dI{constructor(e,t,r,n,o){super(e,t,r,n,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&(n=n.trim(),vD(n))){const o=zI(n,t.current);void 0!==o&&(e[r]=o),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!DI.has(r)||2!==e.length)return;const[n,o]=e,i=RI(n),a=RI(o);if(i!==a)if(nI(i)&&nI(a))for(let t=0;t<e.length;t++){const r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else aI[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(null===e[t]||BI(e[t]))&&r.push(t);r.length&&function(e,t,r){let n,o=0;for(;o<e.length&&!n;){const t=e[o];"string"==typeof t&&!GI.has(t)&&VD(t).values.length&&(n=e[o]),o++}if(n&&r)for(const o of t)e[o]=XI(r,n)}(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=aI[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=aI[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,r])=>{e.getValue(t).set(r)}),this.resolveNoneKeyframes()}}const ZI=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function JI(e){return TL(e)&&"offsetHeight"in e}class QI{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=dD.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=dD.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"production"!==process.env.NODE_ENV&&FL(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new _L);const r=this.events[e].add(t);return"change"===e?()=>{r(),lD.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=dD.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return BL(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function eR(e,t){return new QI(e,t)}const{schedule:tR}=aD(queueMicrotask,!1),rR={x:!1,y:!1};function nR(){return rR.x||rR.y}function oR(e,t){const r=function(e,t,r){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=r?.[e]??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function iR(e){return!("touch"===e.pointerType||nR())}const aR=(e,t)=>!!t&&(e===t||aR(e,t.parentElement)),lR=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,sR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const cR=new WeakSet;function uR(e){return t=>{"Enter"===t.key&&e(t)}}function pR(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function fR(e){return lR(e)&&!nR()}function dR(e,t,r={}){const[n,o,i]=oR(e,r),a=e=>{const n=e.currentTarget;if(!fR(e))return;cR.add(n);const i=t(n,e),a=(e,t)=>{window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",s),cR.has(n)&&cR.delete(n),fR(e)&&"function"==typeof i&&i(e,{success:t})},l=e=>{a(e,n===window||n===document||r.useGlobalTarget||aR(n,e.target))},s=e=>{a(e,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",s,o)};return n.forEach(e=>{var t;(r.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),JI(e)&&(e.addEventListener("focus",e=>((e,t)=>{const r=e.currentTarget;if(!r)return;const n=uR(()=>{if(cR.has(r))return;pR(r,"down");const e=uR(()=>{pR(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>pR(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,o)),t=e,sR.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),i}function mR(e){return TL(e)&&"ownerSVGElement"in e}const hR=e=>Boolean(e&&e.getVelocity),yR=[...II,RD,YD],vR=m({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function gR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function bR(...t){return e.useCallback(function(...e){return t=>{let r=!1;const n=e.map(e=>{const n=gR(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():gR(e[t],null)}}}}(...t),t)}class wR extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,r=JI(e)&&e.offsetWidth||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=r-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function xR({children:t,isPresent:r,anchorX:n,root:o}){const i=g(),a=c(null),l=c({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=h(vR),u=bR(a,t?.ref);return b(()=>{const{width:e,height:t,top:c,left:u,right:p}=l.current;if(r||!a.current||!e||!t)return;const f="left"===n?`left: ${u}`:`right: ${p}`;a.current.dataset.motionPopId=i;const d=document.createElement("style");s&&(d.nonce=s);const m=o??document.head;return m.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${f}px !important;\n top: ${c}px !important;\n }\n `),()=>{m.contains(d)&&m.removeChild(d)}},[r]),k(wR,{isPresent:r,childRef:a,sizeRef:l,children:e.cloneElement(t,{ref:u})})}const OR=({children:t,initial:r,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s,anchorX:c,root:u})=>{const p=vL(ER),f=g();let d=!0,m=l(()=>(d=!1,{id:f,initial:r,isPresent:n,custom:i,onExitComplete:e=>{p.set(e,!0);for(const e of p.values())if(!e)return;o&&o()},register:e=>(p.set(e,!1),()=>p.delete(e))}),[n,p,o]);return a&&d&&(m={...m}),l(()=>{p.forEach((e,t)=>p.set(t,!1))},[n]),e.useEffect(()=>{!n&&!p.size&&o&&o()},[n]),"popLayout"===s&&(t=k(xR,{isPresent:n,anchorX:c,root:u,children:t})),k(wL.Provider,{value:m,children:t})};function ER(){return new Map}function kR(e=!0){const t=h(wL);if(null===t)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,i=g();a(()=>{if(e)return o(i)},[e]);const l=s(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,l]:[!0]}const jR=e=>e.key||"";function SR(e){const t=[];return w.forEach(e,e=>{p(e)&&t.push(e)}),t}const PR=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:s=!1,anchorX:u="left",root:p})=>{const[f,d]=kR(s),m=l(()=>SR(e),[e]),y=s&&!f?[]:m.map(jR),v=c(!0),g=c(m),b=vL(()=>new Map),[w,x]=i(m),[O,E]=i(m);bL(()=>{v.current=!1,g.current=m;for(let e=0;e<O.length;e++){const t=jR(O[e]);y.includes(t)?b.delete(t):!0!==b.get(t)&&b.set(t,!1)}},[O,y.length,y.join("-")]);const j=[];if(m!==w){let e=[...m];for(let t=0;t<O.length;t++){const r=O[t],n=jR(r);y.includes(n)||(e.splice(t,0,r),j.push(r))}return"wait"===a&&j.length&&(e=j),E(SR(e)),x(m),null}"production"!==process.env.NODE_ENV&&"wait"===a&&O.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:P}=h(yL);return k(S,{children:O.map(e=>{const i=jR(e),l=!(s&&!f)&&(m===O||y.includes(i));return k(OR,{isPresent:l,initial:!(v.current&&!r)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:p,onExitComplete:l?void 0:()=>{if(!b.has(i))return;b.set(i,!0);let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(P?.(),E(g.current),s&&d?.(),n&&n())},anchorX:u,children:e},i)})})},CR=m({strict:!1}),TR={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"]},NR={};for(const e in TR)NR[e]={isEnabled:t=>TR[e].some(e=>!!t[e])};const MR=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 AR(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||MR.has(e)}let zR=e=>!AR(e);try{"function"==typeof(LR=require("@emotion/is-prop-valid").default)&&(zR=e=>e.startsWith("on")?!AR(e):LR(e))}catch{}var LR;const DR=m({});function _R(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function IR(e){return"string"==typeof e||Array.isArray(e)}const RR=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],BR=["initial",...RR];function WR(e){return _R(e.animate)||BR.some(t=>IR(e[t]))}function FR(e){return Boolean(WR(e)||e.variants)}function $R(e){const{initial:t,animate:r}=function(e,t){if(WR(e)){const{initial:t,animate:r}=e;return{initial:!1===t||IR(t)?t:void 0,animate:IR(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,h(DR));return l(()=>({initial:t,animate:r}),[VR(t),VR(r)])}function VR(e){return Array.isArray(e)?e.join(" "):e}function HR(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const UR={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!zD.test(e))return e;e=parseFloat(e)}return`${HR(e,t.target.x)}% ${HR(e,t.target.y)}%`}},qR={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=YD.parse(e);if(o.length>5)return n;const i=YD.createTransformer(e),a="number"!=typeof o[0]?1:0,l=r.x.scale*t.x,s=r.y.scale*t.y;o[0+a]/=l,o[1+a]/=s;const c=KD(l,s,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},YR={borderRadius:{...UR,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:UR,borderTopRightRadius:UR,borderBottomLeftRadius:UR,borderBottomRightRadius:UR,boxShadow:qR};function XR(e,{layout:t,layoutId:r}){return rI.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!YR[e]||"opacity"===e)}const GR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},KR=tI.length;function ZR(e,t,r){const{style:n,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const e in t){const r=t[e];if(rI.has(e))a=!0;else if(hD(e))o[e]=r;else{const t=ZI(r,UI[e]);e.startsWith("origin")?(l=!0,i[e]=t):n[e]=t}}if(t.transform||(a||r?n.transform=function(e,t,r){let n="",o=!0;for(let i=0;i<KR;i++){const a=tI[i],l=e[a];if(void 0===l)continue;let s=!0;if(s="number"==typeof l?l===(a.startsWith("scale")?1:0):0===parseFloat(l),!s||r){const e=ZI(l,UI[a]);s||(o=!1,n+=`${GR[a]||a}(${e}) `),r&&(t[a]=e)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:e="50%",originY:t="50%",originZ:r=0}=i;n.transformOrigin=`${e} ${t} ${r}`}}const JR=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function QR(e,t,r){for(const n in t)hR(t[n])||XR(n,r)||(e[n]=t[n])}function eB(e,t){const r={};return QR(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return l(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return ZR(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),r}function tB(e,t){const r={},n=eB(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const rB={offset:"stroke-dashoffset",array:"stroke-dasharray"},nB={offset:"strokeDashoffset",array:"strokeDasharray"};function oB(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...l},s,c,u){if(ZR(e,l,c),s)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:f}=e;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete p.transformBox),void 0!==t&&(p.x=t),void 0!==r&&(p.y=r),void 0!==n&&(p.scale=n),void 0!==o&&function(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?rB:nB;e[i.offset]=zD.transform(-n);const a=zD.transform(t),l=zD.transform(r);e[i.array]=`${a} ${l}`}(p,o,i,a,!1)}const iB=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),aB=e=>"string"==typeof e&&"svg"===e.toLowerCase();function lB(e,t,r,n){const o=l(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return oB(r,t,aB(n),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const t={};QR(t,e.style,e),o.style={...t,...o.style}}return o}const sB=["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 cB(e){return"string"==typeof e&&!e.includes("-")&&!!(sB.indexOf(e)>-1||/[A-Z]/u.test(e))}function uB(e,t,r,{latestValues:o},i,a=!1){const s=(cB(e)?lB:tB)(t,o,i,e),c=function(e,t,r){const n={};for(const o in e)"values"===o&&"object"==typeof e.values||(zR(o)||!0===r&&AR(o)||!t&&!AR(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}(t,"string"==typeof e,a),u=e!==y?{...c,...s,ref:r}:{},{children:p}=t,f=l(()=>hR(p)?p.get():p,[p]);return n(e,{...u,children:f})}function pB(e){const t=[{},{}];return e?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function fB(e,t,r,n){if("function"==typeof t){const[o,i]=pB(n);t=t(void 0!==r?r:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=pB(n);t=t(void 0!==r?r:e.custom,o,i)}return t}function dB(e){return hR(e)?e.get():e}function mB(e,t,r,n){const o={},i=n(e,{});for(const e in i)o[e]=dB(i[e]);let{initial:a,animate:l}=e;const s=WR(e),c=FR(e);t&&c&&!s&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===l&&(l=t.animate));let u=!!r&&!1===r.initial;u=u||!1===a;const p=u?l:a;if(p&&"boolean"!=typeof p&&!_R(p)){const t=Array.isArray(p)?p:[p];for(let r=0;r<t.length;r++){const n=fB(e,t[r]);if(n){const{transitionEnd:e,transition:t,...r}=n;for(const e in r){let t=r[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const hB=e=>(t,r)=>{const n=h(DR),o=h(wL),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:mB(r,n,o,e),renderState:t()}}(e,t,n,o);return r?i():vL(i)};function yB(e,t,r){const{style:n}=e,o={};for(const i in n)(hR(n[i])||t.style&&hR(t.style[i])||XR(i,e)||void 0!==r?.getValue(i)?.liveStyle)&&(o[i]=n[i]);return o}const vB=hB({scrapeMotionValuesFromProps:yB,createRenderState:JR});function gB(e,t,r){const n=yB(e,t,r);for(const r in e)if(hR(e[r])||hR(t[r])){n[-1!==tI.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}const bB=hB({scrapeMotionValuesFromProps:gB,createRenderState:iB}),wB=Symbol.for("motionComponentSymbol");function xB(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function OB(e,t,r){return s(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):xB(r)&&(r.current=n))},[t])}const EB=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kB="data-"+EB("framerAppearId"),jB=m({});function SB(e,t,r,n,o){const{visualElement:i}=h(DR),l=h(CR),s=h(wL),u=h(vR).reducedMotion,p=c(null);n=n||l.renderer,!p.current&&n&&(p.current=n(e,{visualState:t,parent:i,props:r,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:u}));const f=p.current,d=h(jB);!f||f.projection||!o||"html"!==f.type&&"svg"!==f.type||function(e,t,r,n){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:s,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:PB(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||l&&xB(l),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c})}(p.current,r,o,d);const m=c(!1);b(()=>{f&&m.current&&f.update(r,s)});const y=r[kB],v=c(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return bL(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),a(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),f.enteringChildren=void 0)}),f}function PB(e){if(e)return!1!==e.options.allowProjection?e.projection:PB(e.parent)}function CB(e,{forwardMotionProps:t=!1}={},n,o){n&&function(e){for(const t in e)NR[t]={...NR[t],...e[t]}}(n);const i=cB(e)?bB:vB;function a(r,a){let l;const s={...h(vR),...r,layoutId:TB(r)},{isStatic:c}=s,u=$R(r),p=i(r,c);if(!c&&gL){!function(e,t){const r=h(CR).strict;if("production"!==process.env.NODE_ENV&&t&&r){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?jL(!1,t,"lazy-strict-mode"):SL(!1,t,"lazy-strict-mode")}}(s,n);const t=function(e){const{drag:t,layout:r}=NR;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(s);l=t.MeasureLayout,u.visualElement=SB(e,p,s,o,t.ProjectionNode)}return j(DR.Provider,{value:u,children:[l&&u.visualElement?k(l,{visualElement:u.visualElement,...s}):null,uB(e,r,OB(p,u.visualElement,a),p,c,t)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=r(a);return l[wB]=e,l}function TB({layoutId:e}){const t=h(yL).id;return t&&void 0!==e?t+"-"+e:e}function NB(e,t){if("undefined"==typeof Proxy)return CB;const r=new Map,n=(r,n)=>CB(r,n,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&FL(!1,"motion() is deprecated. Use motion.create() instead."),n(e,t)),{get:(o,i)=>"create"===i?n:(r.has(i)||r.set(i,CB(i,void 0,e,t)),r.get(i))})}function MB({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function AB(e){return void 0===e||1===e}function zB({scale:e,scaleX:t,scaleY:r}){return!AB(e)||!AB(t)||!AB(r)}function LB(e){return zB(e)||DB(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function DB(e){return _B(e.x)||_B(e.y)}function _B(e){return e&&"0%"!==e}function IB(e,t,r){return r+t*(e-r)}function RB(e,t,r,n,o){return void 0!==o&&(e=IB(e,o,n)),IB(e,r,n)+t}function BB(e,t=0,r=1,n,o){e.min=RB(e.min,t,r,n,o),e.max=RB(e.max,t,r,n,o)}function WB(e,{x:t,y:r}){BB(e.x,t.translate,t.scale,t.originPoint),BB(e.y,r.translate,r.scale,r.originPoint)}const FB=.999999999999,$B=1.0000000000001;function VB(e,t){e.min=e.min+t,e.max=e.max+t}function HB(e,t,r,n,o=.5){BB(e,t,r,KD(e.min,e.max,o),n)}function UB(e,t){HB(e.x,t.x,t.scaleX,t.scale,t.originX),HB(e.y,t.y,t.scaleY,t.scale,t.originY)}function qB(e,t){return MB(function(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}const YB=()=>({x:{min:0,max:0},y:{min:0,max:0}}),XB={current:null},GB={current:!1};const KB=new WeakMap;const ZB=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class JB{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dI,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=dD.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,lD.render(this.render,!1,!0))};const{latestValues:l,renderState:s}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=WR(t),this.isVariantNode=FR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==l[e]&&hR(t)&&t.set(l[e])}}mount(e){this.current=e,KB.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)),GB.current||function(){if(GB.current=!0,gL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>XB.current=e.matches;e.addEventListener("change",t),t()}else XB.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||XB.current),"production"!==process.env.NODE_ENV&&FL(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),sD(this.notifyUpdate),sD(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=rI.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&lD.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),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 NR){const t=NR[e];if(!t)continue;const{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(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):{x:{min:0,max:0},y:{min:0,max:0}}}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 t=0;t<ZB.length;t++){const r=ZB[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(const n in t){const o=t[n],i=r[n];if(hR(o))e.addValue(n,o);else if(hR(i))e.addValue(n,eR(o,{owner:e}));else if(i!==o)if(e.hasValue(n)){const t=e.getValue(n);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(n);e.addValue(n,eR(void 0!==t?t:o,{owner:e}))}}for(const n in r)void 0===t[n]&&e.removeValue(n);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}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&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 r=this.values.get(e);return void 0===r&&void 0!==t&&(r=eR(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var n;return null!=r&&("string"==typeof r&&(CL(r)||NL(r))?r=parseFloat(r):(n=r,!yR.find(_I(n))&&YD.test(t)&&(r=XI(e,t))),this.setBaseTarget(e,hR(r)?r.get():r)),hR(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let r;if("string"==typeof t||"object"==typeof t){const n=fB(this.props,t,this.presenceContext?.custom);n&&(r=n[e])}if(t&&void 0!==r)return r;const n=this.getBaseTargetFromProps(this.props,e);return void 0===n||hR(n)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new _L),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){tR.render(this.render)}}class QB extends JB{constructor(){super(...arguments),this.KeyframeResolver=KI}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:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;hR(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function eW(e,{style:t,vars:r},n,o){const i=e.style;let a;for(a in t)i[a]=t[a];for(a in o?.applyProjectionStyles(i,n),r)i.setProperty(a,r[a])}class tW extends QB{constructor(){super(...arguments),this.type="html",this.renderInstance=eW}readValueFromInstance(e,t){if(rI.has(t))return this.projection?.isProjecting?J_(t):((e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Q_(r,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),o=(hD(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof o?o.trim():o}var r}measureInstanceViewportBox(e,{transformPagePoint:t}){return qB(e,t)}build(e,t,r){ZR(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return yB(e,t,r)}}const rW=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"]);class nW extends QB{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=YB}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(rI.has(t)){const e=YI(t);return e&&e.default||0}return t=rW.has(t)?t:EB(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return gB(e,t,r)}build(e,t,r){oB(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){!function(e,t,r,n){eW(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(rW.has(r)?r:EB(r),t.attrs[r])}(e,t,0,n)}mount(e){this.isSVGTag=aB(e.tagName),super.mount(e)}}const oW=(e,t)=>cB(e)?new nW(t):new tW(t,{allowProjection:e!==y});function iW(e,t,r){const n=e.getProps();return fB(n,t,void 0!==r?r:n.custom,e)}const aW=e=>Array.isArray(e);function lW(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,eR(r))}function sW(e){return aW(e)?e[e.length-1]||0:e}function cW(e,t){const r=e.getValue("willChange");if(n=r,Boolean(hR(n)&&n.add))return r.add(t);if(!r&&PL.WillChange){const r=new PL.WillChange("auto");e.addValue("willChange",r),r.add(t)}var n}function uW(e){return e.props[kB]}const pW=e=>null!==e;const fW={type:"spring",stiffness:500,damping:25,restSpeed:10},dW={type:"keyframes",duration:.8},mW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hW=(e,{keyframes:t})=>t.length>2?dW:rI.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:fW:mW;const yW=(e,t,r,n={},o,i)=>a=>{const l=LI(n,e)||{},s=l.delay||n.delay||0;let{elapsed:c=0}=n;c-=IL(s);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:s,elapsed:c,...u}){return!!Object.keys(u).length})(l)||Object.assign(u,hW(e,u)),u.duration&&(u.duration=IL(u.duration)),u.repeatDelay&&(u.repeatDelay=IL(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let p=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(CI(u),0===u.delay&&(p=!0)),(PL.instantAnimations||PL.skipAnimations)&&(p=!0,CI(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,p&&!i&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:r="loop"}){const n=e.filter(pW);return n[t&&"loop"!==r&&t%2==1?0:n.length-1]}(u.keyframes,l);if(void 0!==e)return void lD.update(()=>{u.onUpdate(e),u.onComplete()})}return l.isSync?new H_(u):new MI(u)};function vW({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}function gW(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(i=n);const s=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const n=e.getValue(t,e.latestValues[t]??null),o=l[t];if(void 0===o||c&&vW(c,t))continue;const a={delay:r,...LI(i||{},t)},u=n.get();if(void 0!==u&&!n.isAnimating&&!Array.isArray(o)&&o===u&&!a.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const r=uW(e);if(r){const e=window.MotionHandoffAnimation(r,t,lD);null!==e&&(a.startTime=e,p=!0)}}cW(e,t),n.start(yW(t,n,o,e.shouldReduceMotion&&DI.has(t)?{type:!1}:a,e,p));const f=n.animation;f&&s.push(f)}return a&&Promise.all(s).then(()=>{lD.update(()=>{a&&function(e,t){const r=iW(e,t);let{transitionEnd:n={},transition:o={},...i}=r||{};i={...i,...n};for(const t in i)lW(e,t,sW(i[t]))}(e,a)})}),s}function bW(e,t,r,n=0,o=1){const i=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,l=(a-1)*n;return"function"==typeof r?r(i,a):1===o?i*n:l-i*n}function wW(e,t,r={}){const n=iW(e,t,"exit"===r.type?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);const i=n?()=>Promise.all(gW(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(n=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:l}=o;return function(e,t,r=0,n=0,o=0,i=1,a){const l=[];for(const s of e.variantChildren)s.notify("AnimationStart",t),l.push(wW(s,t,{...a,delay:r+("function"==typeof n?0:n)+bW(e.variantChildren,s,n,o,i)}).then(()=>s.notify("AnimationComplete",t)));return Promise.all(l)}(e,t,n,i,a,l,r)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[i,a]:[a,i];return e().then(()=>t())}return Promise.all([i(),a(r.delay)])}function xW(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const OW=BR.length;function EW(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&EW(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let r=0;r<OW;r++){const n=BR[r],o=e.props[n];(IR(o)||!1===o)&&(t[n]=o)}return t}const kW=[...RR].reverse(),jW=RR.length;function SW(e){return t=>Promise.all(t.map(({animation:t,options:r})=>function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>wW(e,t,r));n=Promise.all(o)}else if("string"==typeof t)n=wW(e,t,r);else{const o="function"==typeof t?iW(e,t,r.custom):t;n=Promise.all(gW(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}(e,t,r)))}function PW(e){let t=SW(e),r=NW(),n=!0;const o=t=>(r,n)=>{const o=iW(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(o){const{transition:e,transitionEnd:t,...n}=o;r={...r,...n,...t}}return r};function i(i){const{props:a}=e,l=EW(e.parent)||{},s=[],c=new Set;let u={},p=1/0;for(let t=0;t<jW;t++){const f=kW[t],d=r[f],m=void 0!==a[f]?a[f]:l[f],h=IR(m),y=f===i?d.isActive:null;!1===y&&(p=t);let v=m===l[f]&&m!==a[f]&&h;if(v&&n&&e.manuallyAnimateOnMount&&(v=!1),d.protectedKeys={...u},!d.isActive&&null===y||!m&&!d.prevProp||_R(m)||"boolean"==typeof m)continue;const g=CW(d.prevProp,m);let b=g||f===i&&d.isActive&&!v&&h||t>p&&h,w=!1;const x=Array.isArray(m)?m:[m];let O=x.reduce(o(f),{});!1===y&&(O={});const{prevResolvedValues:E={}}=d,k={...E,...O},j=t=>{b=!0,c.has(t)&&(w=!0,c.delete(t)),d.needsAnimating[t]=!0;const r=e.getValue(t);r&&(r.liveStyle=!1)};for(const e in k){const t=O[e],r=E[e];if(u.hasOwnProperty(e))continue;let n=!1;n=aW(t)&&aW(r)?!xW(t,r):t!==r,n?null!=t?j(e):c.add(e):void 0!==t&&c.has(e)?j(e):d.protectedKeys[e]=!0}d.prevProp=m,d.prevResolvedValues=O,d.isActive&&(u={...u,...O}),n&&e.blockInitialAnimation&&(b=!1);const S=v&&g;b&&(!S||w)&&s.push(...x.map(t=>{const r={type:f};if("string"==typeof t&&n&&!S&&e.manuallyAnimateOnMount&&e.parent){const{parent:n}=e,o=iW(n,t);if(n.enteringChildren&&o){const{delayChildren:t}=o.transition||{};r.delay=bW(n.enteringChildren,e,t)}}return{animation:t,options:r}}))}if(c.size){const t={};if("boolean"!=typeof a.initial){const r=iW(e,Array.isArray(a.initial)?a.initial[0]:a.initial);r&&r.transition&&(t.transition=r.transition)}c.forEach(r=>{const n=e.getBaseTarget(r),o=e.getValue(r);o&&(o.liveStyle=!0),t[r]=n??null}),s.push({animation:t})}let f=Boolean(s.length);return!n||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(f=!1),n=!1,f?t(s):Promise.resolve()}return{animateChanges:i,setActive:function(t,n){if(r[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),r[t].isActive=n;const o=i(t);for(const e in r)r[e].protectedKeys={};return o},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=NW()}}}function CW(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!xW(t,e)}function TW(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NW(){return{animate:TW(!0),whileInView:TW(),whileHover:TW(),whileTap:TW(),whileDrag:TW(),whileFocus:TW(),exit:TW()}}class MW{constructor(e){this.isMounted=!1,this.node=e}update(){}}let AW=0;const zW={animation:{Feature:class extends MW{constructor(e){super(e),e.animationState||(e.animationState=PW(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();_R(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(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends MW{constructor(){super(...arguments),this.id=AW++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function LW(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function DW(e){return{point:{x:e.pageX,y:e.pageY}}}function _W(e,t,r,n){return LW(e,t,(e=>t=>lR(t)&&e(t,DW(t)))(r),n)}function IW(e){return e.max-e.min}function RW(e,t,r,n=.5){e.origin=n,e.originPoint=KD(t.min,t.max,e.origin),e.scale=IW(r)/IW(t),e.translate=KD(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function BW(e,t,r,n){RW(e.x,t.x,r.x,n?n.originX:void 0),RW(e.y,t.y,r.y,n?n.originY:void 0)}function WW(e,t,r){e.min=r.min+t.min,e.max=e.min+IW(t)}function FW(e,t,r){e.min=t.min-r.min,e.max=e.min+IW(t)}function $W(e,t,r){FW(e.x,t.x,r.x),FW(e.y,t.y,r.y)}function VW(e){return[e("x"),e("y")]}const HW=({current:e})=>e?e.ownerDocument.defaultView:null,UW=(e,t)=>Math.abs(e-t);class qW{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=GW(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,r=function(e,t){const r=UW(e.x,t.x),n=UW(e.y,t.y);return Math.sqrt(r**2+n**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!r)return;const{point:n}=e,{timestamp:o}=cD;this.history.push({...n,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=YW(t,this.transformPagePoint),lD.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:r,onSessionEnd:n,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=GW("pointercancel"===e.type?this.lastMoveEventInfo:YW(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,i),n&&n(e,i)},!lR(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=n||window;const a=YW(DW(e),this.transformPagePoint),{point:l}=a,{timestamp:s}=cD;this.history=[{...l,timestamp:s}];const{onSessionStart:c}=t;c&&c(e,GW(a,this.history)),this.removeListeners=LL(_W(this.contextWindow,"pointermove",this.handlePointerMove),_W(this.contextWindow,"pointerup",this.handlePointerUp),_W(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),sD(this.updatePoint)}}function YW(e,t){return t?{point:t(e.point)}:e}function XW(e,t){return{x:e.x-t.x,y:e.y-t.y}}function GW({point:e},t){return{point:e,delta:XW(e,ZW(t)),offset:XW(e,KW(t)),velocity:JW(t,.1)}}function KW(e){return e[0]}function ZW(e){return e[e.length-1]}function JW(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ZW(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>IL(t)));)r--;if(!n)return{x:0,y:0};const i=RL(o.timestamp-n.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function QW(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function eF(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}const tF=.35;function rF(e,t,r){return{min:nF(e,t),max:nF(e,r)}}function nF(e,t){return"number"==typeof e?e:e[t]||0}const oF=new WeakMap;class iF{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new qW(e,{onSessionStart:e=>{const{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(DW(e).point)},onStart:(e,t)=>{const{drag:r,dragPropagation:n,onDragStart:o}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=r)||"y"===i?rR[i]?null:(rR[i]=!0,()=>{rR[i]=!1}):rR.x||rR.y?null:(rR.x=rR.y=!0,()=>{rR.x=rR.y=!1}),!this.openDragLock))return;var i;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),VW(e=>{let t=this.getAxisMotionValue(e).get()||0;if(AD.test(t)){const{projection:r}=this.visualElement;if(r&&r.layout){const n=r.layout.layoutBox[e];if(n){t=IW(n)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&lD.postRender(()=>o(e,t)),cW(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:r,dragDirectionLock:n,onDirectionLock:o,onDrag:i}=this.getProps();if(!r&&!this.openDragLock)return;const{offset:a}=t;if(n&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let r=null;Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x");return r}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>VW(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:r,contextWindow:HW(this.visualElement)})}stop(e,t){const r=e||this.latestPointerEvent,n=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!n||!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&lD.postRender(()=>a(r,n))}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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){const{drag:n}=this.getProps();if(!r||!aF(e,n,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?KD(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?KD(r,e,n.max):Math.min(e,r)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&xB(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!r)&&function(e,{top:t,left:r,bottom:n,right:o}){return{x:QW(e.x,r,o),y:QW(e.y,t,n)}}(r.layoutBox,e),this.elastic=function(e=tF){return!1===e?e=0:!0===e&&(e=tF),{x:rF(e,"left","right"),y:rF(e,"top","bottom")}}(t),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&VW(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xB(e))return!1;const r=e.current;SL(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const o=function(e,t,r){const n=qB(e,r),{scroll:o}=t;return o&&(VB(n.x,o.offset.x),VB(n.y,o.offset.y)),n}(r,n.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:eF(e.x,t.x),y:eF(e.y,t.y)}}(n.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=MB(e))}return i}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},s=VW(a=>{if(!aF(a,t,this.currentDirection))return;let s=l&&l[a]||{};i&&(s={min:0,max:0});const c=n?200:1e6,u=n?40:1e7,p={type:"inertia",velocity:r?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...s};return this.startAxisValueAnimation(a,p)});return Promise.all(s).then(a)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return cW(this.visualElement,e),r.start(yW(e,r,0,t,this.visualElement,!1))}stopAnimation(){VW(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){VW(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),n=r[t];return n||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){VW(t=>{const{drag:r}=this.getProps();if(!aF(t,r,this.currentDirection))return;const{projection:n}=this.visualElement,o=this.getAxisMotionValue(t);if(n&&n.layout){const{min:r,max:i}=n.layout.layoutBox[t];o.set(e[t]-KD(r,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!xB(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};VW(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const r=t.get();n[e]=function(e,t){let r=.5;const n=IW(e),o=IW(t);return o>n?r=DL(t.min,t.max-n,e.min):n>o&&(r=DL(e.min,e.max-o,t.min)),EL(0,1,r)}({min:r,max:r},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),VW(t=>{if(!aF(t,e,null))return;const r=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];r.set(KD(o,i,n[t]))})}addListeners(){if(!this.visualElement.current)return;oF.set(this.visualElement,this);const e=_W(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();xB(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),lD.read(t);const o=LW(window,"resize",()=>this.scalePositionWithinConstraints()),i=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(VW(t=>{const r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),n(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:o=!1,dragElastic:i=tF,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function aF(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}const lF=e=>(t,r)=>{e&&lD.postRender(()=>e(t,r))};const sF={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let cF=!1;class uF extends x{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),r&&r.register&&n&&r.register(o),cF&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),sF.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:n,isPresent:o}=this.props,{projection:i}=r;return i?(i.isPresent=o,cF=!0,n||e.layoutDependency!==t||void 0===t||e.isPresent!==o?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||lD.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),tR.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;cF=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pF(e){const[t,r]=kR(),n=h(yL);return k(uF,{...e,layoutGroup:n,switchLayoutGroup:h(jB),isPresent:t,safeToRemove:r})}const fF=(e,t)=>e.depth-t.depth;class dF{constructor(){this.children=[],this.isDirty=!1}add(e){xL(this.children,e),this.isDirty=!0}remove(e){OL(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fF),this.isDirty=!1,this.children.forEach(e)}}const mF=["TopLeft","TopRight","BottomLeft","BottomRight"],hF=mF.length,yF=e=>"string"==typeof e?parseFloat(e):e,vF=e=>"number"==typeof e||zD.test(e);function gF(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const bF=xF(0,.5,ZL),wF=xF(.5,.95,AL);function xF(e,t,r){return n=>n<e?0:n>t?1:r(DL(e,t,n))}function OF(e,t){e.min=t.min,e.max=t.max}function EF(e,t){OF(e.x,t.x),OF(e.y,t.y)}function kF(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function jF(e,t,r,n,o){return e=IB(e-=t,1/r,n),void 0!==o&&(e=IB(e,1/o,n)),e}function SF(e,t,[r,n,o],i,a){!function(e,t=0,r=1,n=.5,o,i=e,a=e){AD.test(t)&&(t=parseFloat(t),t=KD(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let l=KD(i.min,i.max,n);e===i&&(l-=t),e.min=jF(e.min,t,r,l,o),e.max=jF(e.max,t,r,l,o)}(e,t[r],t[n],t[o],t.scale,i,a)}const PF=["x","scaleX","originX"],CF=["y","scaleY","originY"];function TF(e,t,r,n){SF(e.x,t,PF,r?r.x:void 0,n?n.x:void 0),SF(e.y,t,CF,r?r.y:void 0,n?n.y:void 0)}function NF(e){return 0===e.translate&&1===e.scale}function MF(e){return NF(e.x)&&NF(e.y)}function AF(e,t){return e.min===t.min&&e.max===t.max}function zF(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function LF(e,t){return zF(e.x,t.x)&&zF(e.y,t.y)}function DF(e){return IW(e.x)/IW(e.y)}function _F(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class IF{constructor(){this.members=[]}add(e){xL(this.members,e),e.scheduleRender()}remove(e){if(OL(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 r;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){r=t;break}}return!!r&&(this.promote(r),!0)}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;!1===n&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const RF=["","X","Y","Z"];let BF=0;function WF(e,t,r,n){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function FF(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=uW(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",lD,!(t||n))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&FF(n)}function $F({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(e={},r=t?.()){this.id=BF++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(UF),this.nodes.forEach(JF),this.nodes.forEach(QF),this.nodes.forEach(qF)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new dF)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new _L),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var r;this.isSVG=mR(t)&&!(mR(r=t)&&"svg"===r.tagName),this.instance=t;const{layoutId:n,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||n)&&(this.isLayoutDirty=!0),e){let r,n=0;const o=()=>this.root.updateBlockedByResize=!1;lD.read(()=>{n=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==n&&(n=e,this.root.updateBlockedByResize=!0,r&&r(),r=function(e,t){const r=dD.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(sD(n),e(i-t))};return lD.setup(n,!0),()=>sD(n)}(o,250),sF.hasAnimatedSinceResize&&(sF.hasAnimatedSinceResize=!1,this.nodes.forEach(ZF)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||i$,{onLayoutAnimationStart:a,onLayoutAnimationComplete:l}=i.getProps(),s=!this.targetLayout||!LF(this.targetLayout,n),c=!t&&r;if(this.options.layoutRoot||this.resumeFrom||c||t&&(s||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...LI(o,"layout"),onPlay:a,onComplete:l};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||ZF(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}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,this.eventHandlers.clear(),sD(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(e$),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&&FF(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(XF);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(GF);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(KF),this.nodes.forEach(VF),this.nodes.forEach(HF)):this.nodes.forEach(GF),this.clearAllSnapshots();const e=dD.now();cD.delta=EL(0,1e3/60,e-cD.timestamp),cD.timestamp=e,cD.isProcessing=!0,uD.update.process(cD),uD.preRender.process(cD),uD.render.process(cD),cD.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tR.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YF),this.sharedNodes.forEach(t$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lD.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lD.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||IW(this.snapshot.measuredBox.x)||IW(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},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&&this.instance){const t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!MF(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,i=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||LB(this.latestValues)||i)&&(o(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let r=this.removeElementScroll(t);var n;return e&&(r=this.removeTransform(r)),s$((n=r).x),s$(n.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u$))){const{scroll:e}=this.root;e&&(VB(t.x,e.offset.x),VB(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(EF(t,e),this.scroll?.wasRoot)return t;for(let r=0;r<this.path.length;r++){const n=this.path[r],{scroll:o,options:i}=n;n!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&EF(t,e),VB(t.x,o.offset.x),VB(t.y,o.offset.y))}return t}applyTransform(e,t=!1){const r={x:{min:0,max:0},y:{min:0,max:0}};EF(r,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&UB(r,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),LB(n.latestValues)&&UB(r,n.latestValues)}return LB(this.latestValues)&&UB(r,this.latestValues),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};EF(t,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];if(!r.instance)continue;if(!LB(r.latestValues))continue;zB(r.latestValues)&&r.updateSnapshot();const n=YB();EF(n,r.measurePageBox()),TF(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,n)}return LB(this.latestValues)&&TF(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!==cD.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==t;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:n,layoutId:o}=this.options;if(!this.layout||!n&&!o)return;this.resolvedRelativeTargetAt=cD.timestamp;const i=this.getClosestProjectingParent();var a,l,s;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,l=this.relativeTarget,s=this.relativeParent.target,WW(a.x,l.x,s.x),WW(a.y,l.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):EF(this.target,this.layout.layoutBox),WB(this.target,this.targetDelta)):EF(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!zB(this.parent.latestValues)&&!DB(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,r){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$W(this.relativeTargetOrigin,t,r),EF(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let r=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(r=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===cD.timestamp&&(r=!1),r)return;const{layout:n,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||!n&&!o)return;EF(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,a=this.treeScale.y;!function(e,t,r,n=!1){const o=r.length;if(!o)return;let i,a;t.x=t.y=1;for(let l=0;l<o;l++){i=r[l],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&UB(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,WB(e,a)),n&&LB(i.latestValues)&&UB(e,i.latestValues))}t.x<$B&&t.x>FB&&(t.x=1),t.y<$B&&t.y>FB&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(kF(this.prevProjectionDelta.x,this.projectionDelta.x),kF(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),BW(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===i&&this.treeScale.y===a&&_F(this.projectionDelta.x,this.prevProjectionDelta.x)&&_F(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const r=this.snapshot,n=r?r.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),s=this.getStack(),c=!s||s.members.length<=1,u=Boolean(l&&!c&&!0===this.options.crossfade&&!this.path.some(o$));let p;this.animationProgress=0,this.mixTargetDelta=t=>{const r=t/1e3;var s,f,d,m;r$(i.x,e.x,r),r$(i.y,e.y,r),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($W(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),s=this.relativeTarget,f=this.relativeTargetOrigin,d=a,m=r,n$(s.x,f.x,d.x,m),n$(s.y,f.y,d.y,m),p&&function(e,t){return AF(e.x,t.x)&&AF(e.y,t.y)}(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p={x:{min:0,max:0},y:{min:0,max:0}}),EF(p,this.relativeTarget)),l&&(this.animationValues=o,function(e,t,r,n,o,i){o?(e.opacity=KD(0,r.opacity??1,bF(n)),e.opacityExit=KD(t.opacity??1,0,wF(n))):i&&(e.opacity=KD(t.opacity??1,r.opacity??1,n));for(let o=0;o<hF;o++){const i=`border${mF[o]}Radius`;let a=gF(t,i),l=gF(r,i);void 0===a&&void 0===l||(a||(a=0),l||(l=0),0===a||0===l||vF(a)===vF(l)?(e[i]=Math.max(KD(yF(a),yF(l),n),0),(AD.test(l)||AD.test(a))&&(e[i]+="%")):e[i]=l)}(t.rotate||r.rotate)&&(e.rotate=KD(t.rotate||0,r.rotate||0,n))}(o,n,this.latestValues,r,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(sD(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lD.update(()=>{sF.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=eR(0)),this.currentAnimation=function(e,t,r){const n=hR(e)?e:eR(e);return n.start(yW("",n,t,r)),n.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},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:r,layout:n,latestValues:o}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&c$(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=IW(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;const n=IW(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}EF(t,r),UB(t,o),BW(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new IF);this.sharedNodes.get(e).add(t);const r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){const n=this.getStack();n&&n.promote(this,r),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:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;const n={};r.z&&WF("z",e,n,this.animationValues);for(let t=0;t<RF.length;t++)WF(`rotate${RF[t]}`,e,n,this.animationValues),WF(`skew${RF[t]}`,e,n,this.animationValues);e.render();for(const t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=dB(t?.pointerEvents)||"",void(e.transform=r?r(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=dB(t?.pointerEvents)||""),void(this.hasProjected&&!LB(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1));e.visibility="";const o=n.animationValues||n.latestValues;this.applyTransformsToTarget();let i=function(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=r?.z||0;if((o||i||a)&&(n=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:l}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),o&&(n+=`rotateX(${o}deg) `),i&&(n+=`rotateY(${i}deg) `),a&&(n+=`skewX(${a}deg) `),l&&(n+=`skewY(${l}deg) `)}const l=e.x.scale*t.x,s=e.y.scale*t.y;return 1===l&&1===s||(n+=`scale(${l}, ${s})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);r&&(i=r(o,i)),e.transform=i;const{x:a,y:l}=this.projectionDelta;e.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,n.animationValues?e.opacity=n===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=n===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const t in YR){if(void 0===o[t])continue;const{correct:r,applyTo:a,isCSSVariable:l}=YR[t],s="none"===i?o[t]:r(o[t],n);if(a){const t=a.length;for(let r=0;r<t;r++)e[a[r]]=s}else l?this.options.visualElement.renderState.vars[t]=s:e[t]=s}this.options.layoutId&&(e.pointerEvents=n===this?dB(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(XF),this.root.sharedNodes.clear()}}}function VF(e){e.updateLayout()}function HF(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;"size"===o?VW(e=>{const n=i?t.measuredBox[e]:t.layoutBox[e],o=IW(n);n.min=r[e].min,n.max=n.min+o}):c$(o,t.layoutBox,r)&&VW(n=>{const o=i?t.measuredBox[n]:t.layoutBox[n],a=IW(r[n]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};BW(a,r,t.layoutBox);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?BW(l,e.applyTransform(n,!0),t.measuredBox):BW(l,r,t.layoutBox);const s=!MF(a);let c=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:o,layout:i}=n;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};$W(a,t.layoutBox,o.layoutBox);const l={x:{min:0,max:0},y:{min:0,max:0}};$W(l,r,i.layoutBox),LF(a,l)||(c=!0),n.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=a,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:s,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function UF(e){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 qF(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YF(e){e.clearSnapshot()}function XF(e){e.clearMeasurements()}function GF(e){e.isLayoutDirty=!1}function KF(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ZF(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function JF(e){e.resolveTargetDelta()}function QF(e){e.calcProjection()}function e$(e){e.resetSkewAndRotation()}function t$(e){e.removeLeadSnapshot()}function r$(e,t,r){e.translate=KD(t.translate,0,r),e.scale=KD(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function n$(e,t,r,n){e.min=KD(t.min,r.min,n),e.max=KD(t.max,r.max,n)}function o$(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const i$={duration:.45,ease:[.4,0,.1,1]},a$=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),l$=a$("applewebkit/")&&!a$("chrome/")?Math.round:AL;function s$(e){e.min=l$(e.min),e.max=l$(e.max)}function c$(e,t,r){return"position"===e||"preserve-aspect"===e&&(n=DF(t),o=DF(r),i=.2,!(Math.abs(n-o)<=i));var n,o,i}function u$(e){return e!==e.root&&e.scroll?.wasRoot}const p$=$F({attachResizeListener:(e,t)=>LW(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),f$={current:void 0},d$=$F({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!f$.current){const e=new p$({});e.mount(window),e.setOptions({layoutScroll:!0}),f$.current=e}return f$.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),m$={pan:{Feature:class extends MW{constructor(){super(...arguments),this.removePointerDownListener=AL}onPointerDown(e){this.session=new qW(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HW(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:lF(e),onStart:lF(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&lD.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=_W(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 MW{constructor(e){super(e),this.removeGroupControls=AL,this.removeListeners=AL,this.controls=new iF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||AL}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:d$,MeasureLayout:pF}};function h$(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);const o=n["onHover"+r];o&&lD.postRender(()=>o(t,DW(t)))}function y$(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);const o=n["onTap"+("End"===r?"":r)];o&&lD.postRender(()=>o(t,DW(t)))}const v$=new WeakMap,g$=new WeakMap,b$=e=>{const t=v$.get(e.target);t&&t(e)},w$=e=>{e.forEach(b$)};function x$(e,t,r){const n=function({root:e,...t}){const r=e||document;g$.has(r)||g$.set(r,{});const n=g$.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(w$,{root:e,...t})),n[o]}(t);return v$.set(e,r),n.observe(e),()=>{v$.delete(e),n.unobserve(e)}}const O$={some:0,all:1};const E$={inView:{Feature:class extends MW{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:O$[n]};return x$(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),i=t?r:n;i&&i(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 r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends MW{mount(){const{current:e}=this.node;e&&(this.unmount=dR(e,(e,t)=>(y$(this.node,t,"Start"),(e,{success:t})=>y$(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends MW{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=LL(LW(this.node.current,"focus",()=>this.onFocus()),LW(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends MW{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){const[n,o,i]=oR(e,r),a=e=>{if(!iR(e))return;const{target:r}=e,n=t(r,e);if("function"!=typeof n||!r)return;const i=e=>{iR(e)&&(n(e),r.removeEventListener("pointerleave",i))};r.addEventListener("pointerleave",i,o)};return n.forEach(e=>{e.addEventListener("pointerenter",a,o)}),i}(e,(e,t)=>(h$(this.node,t,"Start"),e=>h$(this.node,e,"End"))))}unmount(){}}}},k$=NB({...zW,...E$,...m$,...{layout:{ProjectionNode:d$,MeasureLayout:pF}}},oW),j$="right",S$={top:{in:"slide-in-from-top",out:"slide-out-to-top"},right:{in:"slide-in-from-right",out:"slide-out-to-right"},bottom:{in:"slide-in-from-bottom",out:"slide-out-to-bottom"},left:{in:"slide-in-from-left",out:"slide-out-to-left"}},P$=({children:e,side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:s,className:u,fullWidth:p,fullHeight:f,open:d,...m})=>{const h=c({side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:s,className:u,fullWidth:p,fullHeight:f});return a(()=>{h.current={side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:s,className:u,fullWidth:p,fullHeight:f}},[r,n,o,i,l,s,u,p,f]),t.createElement(pN,{open:d,...m},e)};P$.displayName="Sheet";const C$=t.forwardRef(({children:e,...r},n)=>t.createElement(fN,{...r,ref:n},e));C$.displayName="SheetTrigger";const T$=gN;T$.displayName="SheetClose";const N$=({children:e,...r})=>t.createElement(dN,{...r},t.createElement(PR,{mode:"wait"},e));N$.displayName="SheetPortal";const M$=t.forwardRef(({className:e,...r},n)=>t.createElement(mN,{asChild:!0,...r,ref:n},t.createElement(k$.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeInOut"},className:Ye("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",e)})));M$.displayName=mN.displayName;const A$=t.forwardRef(({side:e=j$,className:r,children:n,overlay:o=!0,fullWidth:i=!1,fullHeight:a=!0,...l},s)=>{const c=S$[e]?e:j$,u=(e=>{const t={left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}},top:{initial:{y:"-100%"},animate:{y:0},exit:{y:"-100%"}},bottom:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}}};return t[e]||t.right})(c);return t.createElement(N$,null,o&&t.createElement(M$,null),t.createElement(hN,{asChild:!0,ref:s,...l},t.createElement(k$.div,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{type:"spring",damping:30,stiffness:300,mass:.8},className:Ye("fixed z-50 bg-background shadow-lg",a?"h-full":"h-auto",i?"w-full":"w-3/4 max-w-md","left"===c&&"inset-y-0 left-0 border-r","right"===c&&"inset-y-0 right-0 border-l","top"===c&&"inset-x-0 top-0 border-b","bottom"===c&&"inset-x-0 bottom-0 border-t",r)},t.createElement("div",{className:"relative h-full p-6 flex flex-col gap-4"},t.createElement(gN,{className:"absolute right-2 top-2 rounded-sm opacity-70 ring-offset-background transition-all duration-200 hover:opacity-100 hover:scale-110 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},t.createElement(ht,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close")),n))))});A$.displayName=hN.displayName;const z$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:Ye("flex flex-col space-y-2 text-center sm:text-left pr-8",e),...n},r));z$.displayName="SheetHeader";const L$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:Ye("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto",e),...n},r));L$.displayName="SheetFooter";const D$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement(yN,{ref:o,className:Ye("text-lg font-semibold text-foreground",e),...n},r));D$.displayName=yN.displayName;const _$=t.forwardRef(({className:e,children:r,...n},o)=>t.createElement(vN,{ref:o,className:Ye("text-sm text-muted-foreground",e),...n},r));_$.displayName=vN.displayName;t.forwardRef(({side:e=j$,overlay:r=!0,showFooter:n=!1,title:o,description:i,buttonText:a="Close",children:l,className:s,contentProps:c,fullWidth:u,fullHeight:p,...f},d)=>{const m=S$[e]?e:j$;return t.createElement(P$,{...f},t.createElement(A$,{side:m,overlay:r,className:s,fullWidth:u,fullHeight:p,...c},t.createElement("div",{ref:d,className:"flex flex-col h-full"},(o||i)&&t.createElement(z$,null,o&&t.createElement(D$,null,o),i&&t.createElement(_$,null,i)),t.createElement("div",{className:"flex-1 py-4"},l),n&&t.createElement(L$,null,t.createElement(T$,{className:"px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors duration-200"},a)))))}).displayName="SheetDrawer";const I$=yz,R$=vz,B$=e.forwardRef(({className:t,align:r="center",sideOffset:n=4,side:o="bottom",...i},a)=>e.createElement(gz,null,e.createElement(bz,{ref:a,align:r,sideOffset:n,side:o,className:Ye("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i})));B$.displayName=bz.displayName;const W$=["top","right","bottom","left"],F$=["start","center","end"],$$="bottom",V$="center",H$=4,U$=150,q$={DEFAULT:"default",FORM:"form"};function Y$(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function X$(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:Y$(n)&&Y$(o)?X$(n,o):n===o})}function G$(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function K$(e){return"number"==typeof e}function Z$(e){return"string"==typeof e}function J$(e){return"boolean"==typeof e}function Q$(e){return"[object Object]"===Object.prototype.toString.call(e)}function eV(e){return Math.abs(e)}function tV(e){return Math.sign(e)}function rV(e,t){return eV(e-t)}function nV(e){return sV(e).map(Number)}function oV(e){return e[iV(e)]}function iV(e){return Math.max(0,e.length-1)}function aV(e,t){return t===iV(e)}function lV(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function sV(e){return Object.keys(e)}function cV(e,t){return[e,t].reduce((e,t)=>(sV(t).forEach(r=>{const n=e[r],o=t[r],i=Q$(n)&&Q$(o);e[r]=i?cV(n,o):o}),e),{})}function uV(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function pV(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function fV(e,t,r,n){const o=pV(),i=1e3/60;let a=null,l=0,s=0;function c(e){if(!s)return;a||(a=e,r(),r());const o=e-a;for(a=e,l+=o;l>=i;)r(),l-=i;n(l/i),s&&(s=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(s),a=null,l=0,s=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(a=null,l=0)})},destroy:function(){u(),o.clear()},start:function(){s||(s=t.requestAnimationFrame(c))},stop:u,update:r,render:n}}function dV(e=0,t=0){const r=eV(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function mV(e,t,r){const{constrain:n}=dV(0,e),o=e+1;let i=a(t);function a(e){return r?eV((o+e)%o):n(e)}function l(){return i}function s(){return mV(e,l(),r)}const c={get:l,set:function(e){return i=a(e),c},add:function(e){return s().set(l()+e)},clone:s};return c}function hV(e,t,r,n,o,i,a,l,s,c,u,p,f,d,m,h,y,v,g){const{cross:b,direction:w}=e,x=["INPUT","SELECT","TEXTAREA"],O={passive:!1},E=pV(),k=pV(),j=dV(50,225).constrain(d.measure(20)),S={mouse:300,touch:400},P={mouse:500,touch:600},C=m?43:25;let T=!1,N=0,M=0,A=!1,z=!1,L=!1,D=!1;function _(e){if(!uV(e,n)&&e.touches.length>=2)return I(e);const t=i.readPoint(e),r=i.readPoint(e,b),a=rV(t,N),s=rV(r,M);if(!z&&!D){if(!e.cancelable)return I(e);if(z=a>s,!z)return I(e)}const u=i.pointerMove(e);a>h&&(L=!0),c.useFriction(.3).useDuration(.75),l.start(),o.add(w(u)),e.preventDefault()}function I(e){const t=u.byDistance(0,!1).index!==p.get(),r=i.pointerUp(e)*(m?P:S)[D?"mouse":"touch"],n=function(e,t){const r=p.add(-1*tV(e)),n=u.byDistance(e,!m).distance;return m||eV(e)<j?n:y&&t?.5*n:u.byIndex(r.get(),0).distance}(w(r),t),o=function(e,t){if(0===e||0===t)return 0;if(eV(e)<=eV(t))return 0;const r=rV(eV(e),eV(t));return eV(r/e)}(r,n),a=C-10*o,l=v+o/50;z=!1,A=!1,k.clear(),c.useDuration(a).useFriction(l),s.distance(n,!m),D=!1,f.emit("pointerUp")}function R(e){L&&(e.stopPropagation(),e.preventDefault(),L=!1)}return{init:function(e){if(!g)return;function l(l){(J$(g)||g(e,l))&&function(e){const l=uV(e,n);if(D=l,L=m&&l&&!e.buttons&&T,T=rV(o.get(),a.get())>=2,l&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;A=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=D?r:t;k.add(e,"touchmove",_,O).add(e,"touchend",I).add(e,"mousemove",_,O).add(e,"mouseup",I)}(),N=i.readPoint(e),M=i.readPoint(e,b),f.emit("pointerDown")}(l)}const s=t;E.add(s,"dragstart",e=>e.preventDefault(),O).add(s,"touchmove",()=>{},O).add(s,"touchend",()=>{}).add(s,"touchstart",l).add(s,"mousedown",l).add(s,"touchcancel",I).add(s,"contextmenu",I).add(s,"click",R,!0)},destroy:function(){E.clear(),k.clear()},pointerDown:function(){return A}}}function yV(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(uV(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),l=o(e)-o(n)>170,s=t/a;return a&&!l&&eV(s)>.1?s:0},readPoint:i}}function vV(e,t,r,n,o,i,a){const l=[e].concat(n);let s,c,u=[],p=!1;function f(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=f(e),u=n.map(f),s=new ResizeObserver(r=>{(J$(i)||i(o,r))&&function(r){for(const i of r){if(p)return;const r=i.target===e,a=n.indexOf(i.target),l=r?c:u[a];if(eV(f(r?e:n[a])-l)>=.5){o.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>{l.forEach(e=>s.observe(e))}))},destroy:function(){p=!0,s&&s.disconnect()}}}function gV(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),l=dV(.1,.99);let s=!1;function c(){return!s&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const s=e.reachedMin(t.get())?"min":"max",u=eV(e[s]-t.get()),p=r.get()-t.get(),f=l.constrain(u/a);r.subtract(p*f),!o&&eV(p)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){s=!e}}}function bV(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=dV(o,i);return{loop:function(t){if(!function(e){return 1===e?l(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach(e=>e.add(o))}}}function wV(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:l}=n;function s(e){return e.concat().sort((e,t)=>eV(e)-eV(t))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return s(o);const i=o.filter(e=>tV(e)===n);return i.length?s(i):oV(o)-r}const u={byDistance:function(r,n){const s=o.get()+r,{index:u,distance:p}=function(r){const n=e?a(r):l(r),o=t.map((e,t)=>({diff:c(e-n,0),index:t})).sort((e,t)=>eV(e.diff)-eV(t.diff)),{index:i}=o[0];return{index:i,distance:n}}(s),f=!e&&i(s);return!n||f?{index:u,distance:r}:{index:u,distance:r+c(t[u]-p,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return u}function xV(e,t,r,n,o,i,a,l){const s={passive:!0,capture:!0};let c=0;function u(e){"Tab"===e.code&&(c=(new Date).getTime())}const p={init:function(p){l&&(i.add(document,"keydown",u,!1),t.forEach((t,u)=>{i.add(t,"focus",t=>{(J$(l)||l(p,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex(e=>e.includes(t));K$(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(u)},s)}))}};return p}function OV(e){let t=e;function r(e){return K$(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function EV(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(l=e.direction(t),Math.round(100*l)/100);var l;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function kV(e,t,r,n,o,i,a,l,s){const c=nV(o),u=nV(o).reverse(),p=function(){const e=a[0];return m(d(u,e),r,!1)}().concat(function(){const e=t-a[0]-1;return m(d(c,e),-r,!0)}());function f(e,t){return e.reduce((e,t)=>e-o[t],t)}function d(e,t){return e.reduce((e,r)=>f(e,t)>0?e.concat([r]):e,[])}function m(o,a,c){const u=function(e){return i.map((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e}))}(a);return o.map(t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=u[t][i];return{index:t,loopPoint:a,slideLocation:OV(-1),translate:EV(e,s[t]),target:()=>l.get()>a?n:o}})}const h={canLoop:function(){return p.every(({index:e})=>f(c.filter(t=>t!==e),t)<=.1)},clear:function(){p.forEach(e=>e.translate.clear())},loop:function(){p.forEach(e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))})},loopPoints:p};return h}function jV(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver(e=>{o||(J$(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)}),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function SV(e,t,r,n){const o={};let i,a=null,l=null,s=!1;const c={init:function(){i=new IntersectionObserver(e=>{s||(e.forEach(e=>{const r=t.indexOf(e.target);o[r]=e}),a=null,l=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),s=!0},get:function(e=!0){if(e&&a)return a;if(!e&&l)return l;const t=function(e){return sV(o).reduce((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t},[])}(e);return e&&(a=t),e||(l=t),t}};return c}function PV(e,t,r,n,o,i,a,l,s){const{startEdge:c,endEdge:u,direction:p}=e,f=K$(r);const d={groupSlides:function(e){return f?function(e,t){return nV(e).filter(e=>e%t===0).map(r=>e.slice(r,r+t))}(e,r):function(e){return e.length?nV(e).reduce((r,f,d)=>{const m=oV(r)||0,h=0===m,y=f===iV(e),v=o[c]-i[m][c],g=o[c]-i[f][u],b=!n&&h?p(a):0,w=eV(g-(!n&&y?p(l):0)-(v+b));return d&&w>t+s&&r.push(f),y&&r.push(e.length),r},[]).map((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)}):[]}(e)}};return d}function CV(e,t,r,n,o,i,a){const{align:l,axis:s,direction:c,startIndex:u,loop:p,duration:f,dragFree:d,dragThreshold:m,inViewThreshold:h,slidesToScroll:y,skipSnaps:v,containScroll:g,watchResize:b,watchSlides:w,watchDrag:x,watchFocus:O}=i,E={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},k=E.measure(t),j=r.map(E.measure),S=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(s,c),P=S.measureSize(k),C=function(e){return{measure:function(t){return e*(t/100)}}}(P),T=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return Z$(e)?r[e](n):e(t,n,o)}};return o}(l,P),N=!p&&!!g,M=p||!!g,{slideSizes:A,slideSizesWithGaps:z,startGap:L,endGap:D}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:l,endEdge:s}=e,c=r[0]&&o,u=function(){if(!c)return 0;const e=r[0];return eV(t[l]-e[l])}(),p=function(){if(!c)return 0;const e=i.getComputedStyle(oV(n));return parseFloat(e.getPropertyValue(`margin-${s}`))}(),f=r.map(a),d=r.map((e,t,r)=>{const n=!t,o=aV(r,t);return n?f[t]+u:o?f[t]+p:r[t+1][l]-e[l]}).map(eV);return{slideSizes:f,slideSizesWithGaps:d,startGap:u,endGap:p}}(S,k,j,r,M,o),_=PV(S,P,y,p,k,j,L,D,2),{snaps:I,snapsAligned:R}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:l}=o,s=l(n).map(e=>oV(e)[a]-e[0][i]).map(eV).map(t.measure),c=n.map(e=>r[i]-e[i]).map(e=>-eV(e)),u=l(c).map(e=>e[0]).map((e,t)=>e+s[t]);return{snaps:c,snapsAligned:u}}(S,T,k,j,_),B=-oV(I)+oV(z),{snapsContained:W,scrollContainLimit:F}=function(e,t,r,n,o){const i=dV(-t+e,0),a=r.map((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),l=!t,s=aV(r,t);return l?o:s||c(n,a)?n:c(o,a)?o:a}).map(e=>parseFloat(e.toFixed(3))),l=function(){const e=a[0],t=oV(a);return dV(a.lastIndexOf(e),a.indexOf(t)+1)}(),s=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:s}=l;return a.slice(r,s)}();function c(e,t){return rV(e,t)<=1}return{snapsContained:s,scrollContainLimit:l}}(P,B,R,g,2),$=N?W:R,{limit:V}=function(e,t,r){const n=t[0];return{limit:dV(r?n-e:oV(t),n)}}(B,$,p),H=mV(iV($),u,p),U=H.clone(),q=nV(r),Y=fV(n,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(le),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:l,animation:s,eventHandler:c,scrollBounds:u,options:{loop:p}},f)=>{const d=e.settled(),m=!u.shouldConstrain(),h=p?d:d&&m,y=h&&!l.pointerDown();y&&s.stop();const v=r.get()*f+o.get()*(1-f);n.set(v),p&&(i.loop(e.direction()),a.loop()),t.to(n.get()),y&&c.emit("settle"),h||c.emit("scroll")})(le,e)),X=$[H.get()],G=OV(X),K=OV(X),Z=OV(X),J=OV(X),Q=function(e,t,r,n,o,i){let a=0,l=0,s=o,c=i,u=e.get(),p=0;function f(e){return s=e,m}function d(e){return c=e,m}const m={direction:function(){return l},duration:function(){return s},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return s?(r.set(e),a+=t/s,a*=c,u+=a,e.add(a),o=u-p):(a=0,r.set(n),e.set(n),o=t),l=tV(o),p=u,m},settled:function(){return eV(n.get()-t.get())<.001},useBaseFriction:function(){return d(i)},useBaseDuration:function(){return f(o)},useFriction:d,useDuration:f};return m}(G,Z,K,J,f,.68),ee=wV(p,$,B,V,J),te=function(e,t,r,n,o,i,a){function l(o){const l=o.distance,s=o.index!==t.get();i.add(l),l&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),s&&(r.set(t.get()),t.set(o.index),a.emit("select"))}return{distance:function(e,t){l(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);l(o.byIndex(n.get(),r))}}}(Y,H,U,Q,ee,J,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}(V),ne=pV(),oe=SV(t,r,a,h),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:l,max:s}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(l,s).map((e,t,r)=>{const n=!t,o=aV(r,t);return n?lV(oV(r[0])+1):o?lV(iV(i)-oV(r)[0]+1,oV(r)[0]):e})}();return{slideRegistry:c}}(N,g,$,F,_,q),ae=xV(e,r,ie,te,Q,ne,a,O),le={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:j,animation:Y,axis:S,dragHandler:hV(S,e,n,o,J,yV(S,o),G,Y,te,Q,ee,H,a,C,d,m,v,.68,x),eventStore:ne,percentOfView:C,index:H,indexPrevious:U,limit:V,location:G,offsetLocation:Z,previousLocation:K,options:i,resizeHandler:vV(t,a,o,r,S,b,E),scrollBody:Q,scrollBounds:gV(V,Z,J,Q,C),scrollLooper:bV(B,V,Z,[G,Z,K,J]),scrollProgress:re,scrollSnapList:$.map(re.get),scrollSnaps:$,scrollTarget:ee,scrollTo:te,slideLooper:kV(S,P,B,A,z,I,$,Z,r),slideFocus:ae,slidesHandler:jV(t,a,w),slidesInView:oe,slideIndexes:q,slideRegistry:ie,slidesToScroll:_,target:J,translate:EV(S,t)};return le}const TV={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function NV(e){function t(e,t){return cV(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=sV(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,o)},optionsMediaQueries:function(t){return t.map(e=>sV(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return r}function MV(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=NV(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(r,e)),n.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return r}(i),l=pV(),s=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach(r=>r(e,t)),n},off:function(e,o){return t[e]=r(e).filter(e=>e!==o),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:p}=i,{on:f,off:d,emit:m}=s,h=S;let y,v,g,b,w=!1,x=c(TV,MV.globalOptions),O=c(x),E=[];function k(t){const r=CV(e,g,b,n,o,t,s);if(t.loop&&!r.slideLooper.canLoop()){return k(Object.assign({},t,{loop:!1}))}return r}function j(t,r){w||(x=c(x,t),O=u(x),E=r||E,function(){const{container:t,slides:r}=O,n=Z$(t)?e.querySelector(t):t;g=n||e.children[0];const o=Z$(r)?g.querySelectorAll(r):r;b=[].slice.call(o||g.children)}(),y=k(O),p([x,...E.map(({options:e})=>e)]).forEach(e=>l.add(e,"change",S)),O.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(N),y.eventHandler.init(N),y.resizeHandler.init(N),y.slidesHandler.init(N),y.options.loop&&y.slideLooper.loop(),g.offsetParent&&b.length&&y.dragHandler.init(N),v=a.init(N,E)))}function S(e,t){const r=T();P(),j(c({startIndex:r},e),t),s.emit("reInit")}function P(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),a.destroy(),l.clear()}function C(e,t,r){O.active&&!w&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:O.duration),y.scrollTo.index(e,r||0))}function T(){return y.index.get()}const N={canScrollNext:function(){return y.index.add(1).get()!==T()},canScrollPrev:function(){return y.index.add(-1).get()!==T()},containerNode:function(){return g},internalEngine:function(){return y},destroy:function(){w||(w=!0,l.clear(),P(),s.emit("destroy"),s.clear())},off:d,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:h,rootNode:function(){return e},scrollNext:function(e){C(y.index.add(1).get(),e,-1)},scrollPrev:function(e){C(y.index.add(-1).get(),e,1)},scrollProgress:function(){return y.scrollProgress.get(y.offsetLocation.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:C,selectedScrollSnap:T,slideNodes:function(){return b},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return j(t,r),setTimeout(()=>s.emit("init"),0),N}function AV(e={},t=[]){const r=c(e),n=c(t),[o,l]=i(),[u,p]=i(),f=s(()=>{o&&o.reInit(r.current,n.current)},[o]);return a(()=>{X$(r.current,e)||(r.current=e,f())},[e,f]),a(()=>{(function(e,t){if(e.length!==t.length)return!1;const r=G$(e),n=G$(t);return r.every((e,t)=>X$(e,n[t]))})(n.current,t)||(n.current=t,f())},[t,f]),a(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&u){MV.globalOptions=AV.globalOptions;const e=MV(u,r.current,n.current);return l(e),()=>e.destroy()}l(void 0)},[u,l]),[p,o]}MV.globalOptions=void 0,AV.globalOptions=void 0;const zV=5e3,LV=m(null),DV=r(({children:e,orientation:r="x",showArrows:n=!0,showDots:o=!0,autoPlay:c=!1,interval:u=zV,disabled:p=!1,onSlideChange:f,className:d,...m},h)=>{const y="y"===r,[v,g]=AV({loop:!0,align:"start",axis:y?"y":"x",dragFree:!1,slidesToScroll:1,containScroll:"keepSnaps"}),[b,x]=i(!0),[O,E]=i(!0),[k,j]=i(0),S=w.count(e),P=l(()=>({selectedIndex:k,scrollNext:()=>g?.scrollNext(),scrollPrev:()=>g?.scrollPrev(),canScrollNext:!O,canScrollPrev:!b,setSelectedIndex:e=>{g?.scrollTo(e)}}),[g,O,b,k]),C=s(e=>{j(e.selectedScrollSnap()),x(!e.canScrollPrev()),E(!e.canScrollNext()),f?.(e.selectedScrollSnap())},[f]);return a(()=>{g&&(C(g),g.on("select",()=>C(g)),g.on("reInit",()=>C(g)))},[g,C]),a(()=>{if(!g||!c)return;const e=setInterval(()=>{O?g.scrollTo(0):g.scrollNext()},u);return()=>clearInterval(e)},[g,c,u,O]),t.createElement(LV.Provider,{value:P},t.createElement("div",{ref:h,className:Ye("relative group",y?"h-96":"w-full",d),role:"region","aria-roledescription":"carousel",style:{perspective:"1000px",perspectiveOrigin:"center center",overflow:"hidden"},...m},t.createElement("div",{ref:v,className:Ye("overflow-hidden h-full","rounded-2xl"),style:{WebkitMaskImage:"-webkit-radial-gradient(white, black)",willChange:"transform",transformStyle:"preserve-3d"}},t.createElement("div",{className:Ye("flex will-change-transform h-full",y?"flex-col":"flex-row")},w.map(e,(e,r)=>t.createElement("div",{className:Ye("transform transition-all duration-700 ease-out",y?"min-h-0 h-full w-full flex-[0_0_100%]":"min-w-0 w-full flex-[0_0_100%]",r===k?"scale-100 rotate-0 translate-z-0 opacity-100":"scale-95 opacity-0 -translate-z-8"),key:r},e)))),t.createElement("div",{className:Ye("absolute z-20 bg-background/30 backdrop-blur-xl px-4 py-2 rounded-full text-sm font-medium text-foreground shadow-xl border border-primary/20 transition-all duration-500 hover:bg-background/50 overflow-hidden group-hover:scale-105",y?"top-4 right-1/2 translate-x-1/2":"bottom-6 right-6")},t.createElement("div",{className:"absolute inset-0 bg-linear-to-r from-primary/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),t.createElement("span",{className:"text-primary font-bold"},k+1),t.createElement("span",{className:"mx-1 opacity-50"},"/"),t.createElement("span",null,S)),n&&t.createElement(t.Fragment,null,t.createElement("div",{className:Ye("absolute z-10 transition-opacity duration-300",y?"right-4 top-4":"top-1/2 -translate-y-1/2 left-4 opacity-0 group-hover:opacity-100")},t.createElement(vt,{variant:"secondary",size:"small",className:Ye("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:p||b,onClick:()=>P.scrollPrev()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),y?t.createElement(lt,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(it,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Previous slide"))),t.createElement("div",{className:Ye("absolute z-10 transition-opacity duration-300",y?"right-4 bottom-4":"top-1/2 -translate-y-1/2 right-4 opacity-0 group-hover:opacity-100")},t.createElement(vt,{variant:"secondary",size:"small",className:Ye("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:p||O,onClick:()=>P.scrollNext()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),y?t.createElement(ot,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(at,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Next slide")))),o&&t.createElement("div",{className:Ye("absolute z-10",y?"right-4 top-1/2 -translate-y-1/2 flex flex-col gap-3 px-2 py-4 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20":"bottom-6 left-1/2 -translate-x-1/2 flex gap-3 px-4 py-2 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20")},w.map(e,(e,r)=>t.createElement("button",{key:r,type:"button",className:Ye("h-8 w-8 flex items-center justify-center transition-all duration-500 ease-out hover:scale-125",r===k?"scale-110":"opacity-60 hover:opacity-90"),disabled:p,onClick:()=>P.setSelectedIndex(r)},r===k?t.createElement("div",{className:"w-2 h-2 rounded-full bg-primary shadow-md shadow-primary/30 ring-4 ring-primary/20 transition-all duration-500"}):t.createElement("div",{className:"w-2 h-2 rounded-full bg-muted transition-all duration-500 hover:bg-primary/50"}),t.createElement("span",{className:"sr-only"},"Jump to slide ",r+1))))))});DV.displayName="Carousel";r(({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,role:"group","aria-roledescription":"slide",className:Ye("min-w-0 shrink-0 grow-0 basis-full h-full relative overflow-hidden rounded-xl backdrop-blur-lg transition-all duration-700 ease-out will-change-transform shadow-2xl",e),...n},t.createElement("div",{className:"absolute inset-0 bg-linear-to-br from-background/5 via-primary/5 to-background/5 opacity-80 mix-blend-overlay pointer-events-none"}),t.createElement("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 bg-linear-to-t from-primary/10 to-transparent transition-opacity duration-700 ease-out pointer-events-none"}),t.createElement("div",{className:"absolute top-0 right-0 w-24 h-24 -translate-y-8 translate-x-8 bg-primary/20 rounded-full blur-3xl pointer-events-none"}),t.createElement("div",{className:"absolute bottom-0 left-0 w-32 h-32 translate-y-16 -translate-x-16 bg-secondary/10 rounded-full blur-3xl pointer-events-none"}),r)).displayName="CarouselItem";var _V=Object.defineProperty,IV=Object.defineProperties,RV=Object.getOwnPropertyDescriptors,BV=Object.getOwnPropertySymbols,WV=Object.prototype.hasOwnProperty,FV=Object.prototype.propertyIsEnumerable,$V=(e,t,r)=>t in e?_V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var VV=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");var HV=e.createContext({}),UV=e.forwardRef((t,r)=>{var n,o,i,a,l,s=t,{value:c,onChange:u,maxLength:p,textAlign:f="left",pattern:d,placeholder:m,inputMode:h="numeric",onComplete:y,pushPasswordManagerStrategy:v="increase-width",pasteTransformer:g,containerClassName:b,noScriptCSSFallback:w=YV,render:x,children:O}=s,E=((e,t)=>{var r={};for(var n in e)WV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&BV)for(var n of BV(e))t.indexOf(n)<0&&FV.call(e,n)&&(r[n]=e[n]);return r})(s,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[k,j]=e.useState("string"==typeof E.defaultValue?E.defaultValue:""),S=null!=c?c:k,P=function(t){let r=e.useRef();return e.useEffect(()=>{r.current=t}),r.current}(S),C=e.useCallback(e=>{null==u||u(e),j(e)},[u]),T=e.useMemo(()=>d?"string"==typeof d?new RegExp(d):d:null,[d]),N=e.useRef(null),M=e.useRef(null),A=e.useRef({value:S,onChange:C,isIOS:"undefined"!=typeof window&&(null==(o=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:o.call(n,"-webkit-touch-callout","none"))}),z=e.useRef({prev:[null==(i=N.current)?void 0:i.selectionStart,null==(a=N.current)?void 0:a.selectionEnd,null==(l=N.current)?void 0:l.selectionDirection]});e.useImperativeHandle(r,()=>N.current,[]),e.useEffect(()=>{let e=N.current,t=M.current;if(!e||!t)return;function r(){if(document.activeElement!==e)return B(null),void F(null);let t,r=e.selectionStart,n=e.selectionEnd,o=e.selectionDirection,i=e.maxLength,a=e.value,l=z.current.prev,s=-1,c=-1;if(0!==a.length&&null!==r&&null!==n){let e=r===n,o=r===a.length&&a.length<i;if(e&&!o){let e=r;if(0===e)s=0,c=1,t="forward";else if(e===i)s=e-1,c=e,t="backward";else if(i>1&&a.length>1){let r=0;if(null!==l[0]&&null!==l[1]){t=e<l[1]?"backward":"forward";let n=l[0]===l[1]&&l[0]<i;"backward"===t&&!n&&(r=-1)}s=r+e,c=r+e+1}}-1!==s&&-1!==c&&s!==c&&N.current.setSelectionRange(s,c,t)}let u=-1!==s?s:r,p=-1!==c?c:n,f=null!=t?t:o;B(u),F(p),z.current.prev=[u,p,f]}if(A.current.value!==e.value&&A.current.onChange(e.value),z.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",r,{capture:!0}),r(),document.activeElement===e&&I(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";qV(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),qV(e.sheet,`[data-input-otp]:autofill { ${t} }`),qV(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),qV(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),qV(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let n=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};n();let o=new ResizeObserver(n);return o.observe(e),()=>{document.removeEventListener("selectionchange",r,{capture:!0}),o.disconnect()}},[]);let[L,D]=e.useState(!1),[_,I]=e.useState(!1),[R,B]=e.useState(null),[W,F]=e.useState(null);e.useEffect(()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}(()=>{var e,t,r,n;null==(e=N.current)||e.dispatchEvent(new Event("input"));let o=null==(t=N.current)?void 0:t.selectionStart,i=null==(r=N.current)?void 0:r.selectionEnd,a=null==(n=N.current)?void 0:n.selectionDirection;null!==o&&null!==i&&(B(o),F(i),z.current.prev=[o,i,a])})},[S,_]),e.useEffect(()=>{void 0!==P&&S!==P&&P.length<p&&S.length===p&&(null==y||y(S))},[p,y,P,S]);let $=function({containerRef:t,inputRef:r,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=e.useState(!1),[l,s]=e.useState(!1),[c,u]=e.useState(!1),p=e.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&i&&l,[i,l,n]),f=e.useCallback(()=>{let e=t.current,o=r.current;if(!e||!o||c||"none"===n)return;let i=e,l=i.getBoundingClientRect().left+i.offsetWidth-18,s=i.getBoundingClientRect().top+i.offsetHeight/2;0===document.querySelectorAll(VV).length&&document.elementFromPoint(l,s)===e||(a(!0),u(!0))},[t,r,c,n]);return e.useEffect(()=>{let e=t.current;if(!e||"none"===n)return;function r(){let t=window.innerWidth-e.getBoundingClientRect().right;s(t>=40)}r();let o=setInterval(r,1e3);return()=>{clearInterval(o)}},[t,n]),e.useEffect(()=>{let e=o||document.activeElement===r.current;if("none"===n||!e)return;let t=setTimeout(f,0),i=setTimeout(f,2e3),a=setTimeout(f,5e3),l=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(i),clearTimeout(a),clearTimeout(l)}},[r,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:p,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:M,inputRef:N,pushPasswordManagerStrategy:v,isFocused:_}),V=e.useCallback(e=>{let t=e.currentTarget.value.slice(0,p);t.length>0&&T&&!T.test(t)?e.preventDefault():("string"==typeof P&&t.length<P.length&&document.dispatchEvent(new Event("selectionchange")),C(t))},[p,C,P,T]),H=e.useCallback(()=>{var e;if(N.current){let t=Math.min(N.current.value.length,p-1),r=N.current.value.length;null==(e=N.current)||e.setSelectionRange(t,r),B(t),F(r)}I(!0)},[p]),U=e.useCallback(e=>{var t,r;let n=N.current;if(!(g||A.current.isIOS&&e.clipboardData&&n))return;let o=e.clipboardData.getData("text/plain"),i=g?g(o):o;e.preventDefault();let a=null==(t=N.current)?void 0:t.selectionStart,l=null==(r=N.current)?void 0:r.selectionEnd,s=(a!==l?S.slice(0,a)+i+S.slice(l):S.slice(0,a)+i+S.slice(a)).slice(0,p);if(s.length>0&&T&&!T.test(s))return;n.value=s,C(s);let c=Math.min(s.length,p-1),u=s.length;n.setSelectionRange(c,u),B(c),F(u)},[p,C,T,S]),q=e.useMemo(()=>({position:"relative",cursor:E.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[E.disabled]),Y=e.useMemo(()=>({position:"absolute",inset:0,width:$.willPushPWMBadge?`calc(100% + ${$.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:$.willPushPWMBadge?`inset(0 ${$.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:f,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[$.PWM_BADGE_SPACE_WIDTH,$.willPushPWMBadge,f]),X=e.useMemo(()=>e.createElement("input",((e,t)=>IV(e,RV(t)))(((e,t)=>{for(var r in t||(t={}))WV.call(t,r)&&$V(e,r,t[r]);if(BV)for(var r of BV(t))FV.call(t,r)&&$V(e,r,t[r]);return e})({autoComplete:E.autoComplete||"one-time-code"},E),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===S.length||void 0,"data-input-otp-mss":R,"data-input-otp-mse":W,inputMode:h,pattern:null==T?void 0:T.source,"aria-placeholder":m,style:Y,maxLength:p,value:S,ref:N,onPaste:e=>{var t;U(e),null==(t=E.onPaste)||t.call(E,e)},onChange:V,onMouseOver:e=>{var t;D(!0),null==(t=E.onMouseOver)||t.call(E,e)},onMouseLeave:e=>{var t;D(!1),null==(t=E.onMouseLeave)||t.call(E,e)},onFocus:e=>{var t;H(),null==(t=E.onFocus)||t.call(E,e)},onBlur:e=>{var t;I(!1),null==(t=E.onBlur)||t.call(E,e)}})),[V,H,U,h,Y,p,W,R,E,null==T?void 0:T.source,S]),G=e.useMemo(()=>({slots:Array.from({length:p}).map((e,t)=>{var r;let n=_&&null!==R&&null!==W&&(R===W&&t===R||t>=R&&t<W),o=void 0!==S[t]?S[t]:null;return{char:o,placeholderChar:void 0!==S[0]?null:null!=(r=null==m?void 0:m[t])?r:null,isActive:n,hasFakeCaret:n&&null===o}}),isFocused:_,isHovering:!E.disabled&&L}),[_,L,p,W,R,E.disabled,S]),K=e.useMemo(()=>x?x(G):e.createElement(HV.Provider,{value:G},O),[O,G,x]);return e.createElement(e.Fragment,null,null!==w&&e.createElement("noscript",null,e.createElement("style",null,w)),e.createElement("div",{ref:M,"data-input-otp-container":!0,style:q,className:b},K,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},X)))});function qV(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}UV.displayName="Input";var YV="\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}";const XV=e.forwardRef(({className:t,containerClassName:r,...n},o)=>e.createElement(UV,{ref:o,containerClassName:Ye("flex items-center gap-2 has-disabled:opacity-50",r),className:Ye("disabled:cursor-not-allowed",t),...n}));XV.displayName="InputOTP";const GV=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{ref:n,className:Ye("flex items-center",t),...r}));GV.displayName="InputOTPGroup";const KV=e.forwardRef(({index:t,className:r,...n},o)=>{const i=e.useContext(HV),{char:a,hasFakeCaret:l,isActive:s}=i.slots[t];return e.createElement("div",{ref:o,className:Ye("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all first:rounded-l-md first:border-l last:rounded-r-md",s&&"z-10 ring-1 ring-ring",r),...n},a,l&&e.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center"},e.createElement("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})))});KV.displayName="InputOTPSlot";e.forwardRef(({...t},r)=>e.createElement("div",{ref:r,role:"separator",...t},e.createElement(zk,null))).displayName="InputOTPSeparator";const ZV=({value:e,maxLength:r=6,onChange:n,disabled:o=!1,isError:i=!1,placeholder:a="○",className:l})=>t.createElement(XV,{value:e,maxLength:r,onChange:n,disabled:o,className:l},t.createElement("div",{"aria-disabled":o},t.createElement(GV,{role:"group",className:Ye("gap-2",i&&"input-error")},Array.from({length:r}).map((r,n)=>t.createElement("div",{key:n,role:"textbox","data-value":e?.[n]||""},t.createElement(KV,{index:n,className:Ye("rounded-md border",i&&"border-destructive focus:ring-destructive")},e?.[n]||a))))));ZV.displayName="OTPInput";var JV=Symbol("radix.slottable");var QV="AlertDialog",[eH]=Lg(QV,[LT]),tH=LT(),rH=e=>{const{__scopeAlertDialog:t,...r}=e,n=tH(t);return k(pN,{...n,...r,modal:!0})};rH.displayName=QV;var nH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(fN,{...o,...n,ref:t})});nH.displayName="AlertDialogTrigger";var oH=e=>{const{__scopeAlertDialog:t,...r}=e,n=tH(t);return k(dN,{...n,...r})};oH.displayName="AlertDialogPortal";var iH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(mN,{...o,...n,ref:t})});iH.displayName="AlertDialogOverlay";var aH="AlertDialogContent",[lH,sH]=eH(aH),cH=function(e){const t=({children:e})=>k(S,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=JV,t}("AlertDialogContent"),uH=e.forwardRef((t,r)=>{const{__scopeAlertDialog:n,children:o,...i}=t,a=tH(n),l=e.useRef(null),s=zg(r,l),c=e.useRef(null);return k(lN,{contentName:aH,titleName:pH,docsSlug:"alert-dialog",children:k(lH,{scope:n,cancelRef:c,children:j(hN,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:Ng(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[k(cH,{children:o}),k(gH,{contentRef:l})]})})})});uH.displayName=aH;var pH="AlertDialogTitle",fH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(yN,{...o,...n,ref:t})});fH.displayName=pH;var dH="AlertDialogDescription",mH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(vN,{...o,...n,ref:t})});mH.displayName=dH;var hH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=tH(r);return k(gN,{...o,...n,ref:t})});hH.displayName="AlertDialogAction";var yH="AlertDialogCancel",vH=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=sH(yH,r),i=tH(r),a=zg(t,o);return k(gN,{...i,...n,ref:a})});vH.displayName=yH;var gH=({contentRef:t})=>{const r=`\`${aH}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${aH}\` by passing a \`${dH}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${aH}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return e.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(r)},[r,t]),null},bH=iH,wH=uH,xH=hH,OH=vH,EH=fH,kH=mH;const jH=rH,SH=nH,PH=oH,CH=e.forwardRef(({className:t,...r},n)=>e.createElement(bH,{className:Ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r,ref:n}));CH.displayName=bH.displayName;const TH=e.forwardRef(({className:t,...r},n)=>e.createElement(PH,null,e.createElement(CH,null),e.createElement(wH,{ref:n,className:Ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...r})));TH.displayName=wH.displayName;const NH=({className:t,...r})=>e.createElement("div",{className:Ye("flex flex-col space-y-2 text-center sm:text-left",t),...r});NH.displayName="AlertDialogHeader";const MH=({className:t,...r})=>e.createElement("div",{className:Ye("space-x-3 text-right",t),...r});MH.displayName="AlertDialogFooter";const AH=e.forwardRef(({className:t,...r},n)=>e.createElement(EH,{ref:n,className:Ye("text-lg font-semibold",t),...r}));AH.displayName=EH.displayName;const zH=e.forwardRef(({className:t,...r},n)=>e.createElement(kH,{ref:n,className:Ye("text-sm text-muted-foreground",t),...r}));zH.displayName=kH.displayName;const LH=e.forwardRef(({className:t,...r},n)=>e.createElement(xH,{ref:n,className:Ye(LP(),t),...r}));LH.displayName=xH.displayName;const DH=e.forwardRef(({className:t,...r},n)=>e.createElement(OH,{ref:n,className:Ye(LP({variant:"outline"}),"mt-2 sm:mt-0",t),...r}));DH.displayName=OH.displayName;const _H={CANCEL_TEXT:"Cancel",VARIANT:"default",DISABLED:!1},IH=({title:e,description:r,trigger:n,action:o,cancel:i=_H.CANCEL_TEXT,onAction:a,onCancel:l,variant:s=_H.VARIANT,disabled:c=_H.DISABLED,open:u,onOpenChange:p})=>t.createElement(jH,{open:u,onOpenChange:p},!u&&t.createElement(SH,{asChild:!0},"string"==typeof n?t.createElement(vt,{variant:"secondary",disabled:c},n):n),t.createElement(TH,null,t.createElement(NH,null,t.createElement(AH,null,e),t.createElement(zH,null,r)),t.createElement(MH,null,t.createElement(DH,{onClick:l,className:Ye("destructive"===s&&"border-destructive/50")},i),t.createElement(LH,{onClick:a,className:Ye("destructive"===s&&"bg-destructive hover:bg-destructive/90")},o)))),RH=!1,BH="chevron",WH="right",FH="",$H="",VH="",HH=300,UH=({title:e,children:r,defaultOpen:n=RH,icon:o=BH,iconPosition:a=WH,className:l=FH,headerClassName:c=$H,contentClassName:u=VH,animationDuration:p=HH,onToggle:f})=>{const[d,m]=i(n),h=s(()=>{const e=!d;m(e),f&&f(e)},[d,f]),y=s(()=>"chevron"===o?d?t.createElement(lt,{size:20}):t.createElement(ot,{size:20}):null,[o,d]);return t.createElement("div",{className:`collapsible-container border rounded-md overflow-hidden bg-card ${l}`,"data-state":d?"open":"closed"},t.createElement("button",{type:"button",onClick:h,className:`flex items-center justify-between w-full p-4 text-left font-medium transition-all bg-card hover:bg-accent hover:text-accent-foreground ${c}`,"aria-expanded":d},"left"===a&&y(),t.createElement("span",{className:"flex-1"},e),"right"===a&&y()),t.createElement("div",{className:`overflow-hidden transition-all ${u}`,style:{maxHeight:d?"1000px":"0px",opacity:d?1:0,transitionDuration:`${p}ms`}},t.createElement("div",{className:"p-4 border-t bg-card"},r)))},qH={simple:{title:"Click to expand",content:t.createElement(()=>t.createElement("div",null,"This is a simple collapsible content area."),null)},complex:{title:"Product Information",content:t.createElement(()=>t.createElement("div",null,t.createElement("h3",{className:"text-lg font-semibold mb-2"},"Product Features"),t.createElement("ul",{className:"list-disc pl-5 mb-4"},t.createElement("li",null,"Feature one with detailed description"),t.createElement("li",null,"Feature two with even more details about functionality"),t.createElement("li",null,"Feature three with technical specifications")),t.createElement("p",{className:"text-sm text-muted-foreground"},"Additional information about the product can be found in the documentation.")),null)},faq:[{title:"How do I reset my password?",content:t.createElement(()=>t.createElement("div",null,'You can reset your password by clicking on the "Forgot Password" link on the login page and following the instructions sent to your email.'),null)},{title:"What payment methods do you accept?",content:t.createElement(()=>t.createElement("div",null,"We accept all major credit cards, PayPal, and bank transfers. For enterprise customers, we also offer invoicing options."),null)},{title:"Can I cancel my subscription?",content:t.createElement(()=>t.createElement("div",null,"Yes, you can cancel your subscription at any time from your account settings. Your access will continue until the end of your billing period."),null)}]},YH=e=>t.createElement("div",{className:"w-full max-w-3xl mx-auto p-6 rounded-lg border bg-card text-card-foreground shadow-sm"},t.createElement("h2",{className:"text-xl font-bold mb-4"},"Frequently Asked Questions"),qH.faq.map((r,n)=>t.createElement("div",{key:n,className:n>0?"mt-2":""},t.createElement(UH,{...e,title:r.title},r.content)))),XH="xsmall",GH="small",KH="medium",ZH="large",JH={xsmall:"max-w-xs",small:"max-w-sm",medium:"max-w-2xl",large:"max-w-4xl"},QH={[XH]:{containerPadding:"p-1.5",avatarSize:"w-8 h-8",nameTextSize:"text-sm",metaTextSize:"text-xs",chevronSize:"w-3 h-3"},[GH]:{containerPadding:"p-2",avatarSize:"w-10 h-10",nameTextSize:"text-base",metaTextSize:"text-sm",chevronSize:"w-4 h-4"},[KH]:{containerPadding:"p-3",avatarSize:"w-12 h-12",nameTextSize:"text-lg",metaTextSize:"text-sm",chevronSize:"w-4 h-4"},[ZH]:{containerPadding:"p-4",avatarSize:"w-14 h-14",nameTextSize:"text-xl",metaTextSize:"text-sm",chevronSize:"w-4 h-4"}},eU=({avatarUrl:e,name:r,email:n,position:o,dropdownItems:i=[],size:l=KH,className:u,isDropdownOpen:p=!1,onToggleDropdown:f})=>{const d=c(null),m=i.length,h=QH[l],{containerPadding:y,avatarSize:v,nameTextSize:g,metaTextSize:b,chevronSize:w}=h,x=s(e=>{"Enter"!==e.key&&" "!==e.key||!f||(e.preventDefault(),f())},[f]),O=s((e,t)=>{e.stopPropagation(),t.isDisabled?e.preventDefault():t.onClick&&(e.preventDefault(),t.onClick(),f&&f())},[f]);return a(()=>{const e=e=>{d.current&&!d.current.contains(e.target)&&p&&f&&f()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[p,f]),t.createElement("div",{ref:d,role:m>0?"button":void 0,tabIndex:m>0?0:void 0,onClick:m>0&&f?f:void 0,onKeyDown:m>0?x:void 0,"aria-expanded":m>0?p:void 0,"aria-haspopup":m>0?"menu":void 0,className:Ye("inline-block bg-card/95 text-card-foreground rounded-xl overflow-visible backdrop-blur-xs transition-all duration-300",m>0&&f&&"cursor-pointer",JH[l],u)},t.createElement("div",{className:Ye("flex items-center gap-3",y)},t.createElement("img",{src:e,alt:`${r} profile`,className:Ye("rounded-full border-2 border-background transition-transform duration-300","ring-1 ring-primary/10",v)}),t.createElement("div",null,t.createElement("h2",{className:Ye("font-semibold text-foreground",g)},r),o&&t.createElement("p",{className:Ye("text-muted-foreground",b)},o),n&&t.createElement("p",{className:Ye("text-muted-foreground mt-0.5",b)},n)),m>0&&f&&t.createElement("div",{className:"ml-auto"},t.createElement("div",{className:"p-1"},p?t.createElement(lt,{className:Ye("text-muted-foreground",w)}):t.createElement(ot,{className:Ye("text-muted-foreground",w)})))),p&&m>0&&t.createElement("div",{role:"menu",className:"absolute mt-1 w-full bg-card rounded-md border border-border/30 z-20 py-1 left-0"},i.map((e,r)=>t.createElement("a",{key:r,href:e.link,className:Ye("block",{"pointer-events-none":e.isDisabled}),onClick:t=>O(t,e)},t.createElement("div",{role:"menuitem",className:Ye("flex items-center px-4 py-2 text-sm",{"opacity-50":e.isDisabled,"cursor-pointer hover:bg-accent/50":!e.isDisabled})},e.icon&&t.createElement("span",{className:"mr-2"},e.icon),e.name)))))},tU="horizontal",rU="tab1",nU=!1,oU="100%";var iU;!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(iU||(iU={}));const aU=({items:e,defaultValue:r=rU,orientation:n=tU,disabled:o=nU,onValueChange:l,className:c,width:u=oU})=>{const[p,f]=i(r);a(()=>{if("undefined"!=typeof window){const t=new URLSearchParams(window.location.search).get("tab");t&&e.some(e=>e.value===t)&&(f(t),l?.(t))}},[e,l]);const d=s((e,t)=>{if("undefined"==typeof window)return"";const r=new URLSearchParams(window.location.search);return r.set(e,t),r.toString()},[]),m=s(e=>{if(f(e),"undefined"!=typeof window){const t=d("tab",e),r=`${window.location.pathname}?${t}`;window.history&&window.history.pushState&&window.history.pushState({path:r},"",r)}l&&l(e)},[l,d]),h="vertical"===n,y=e=>Ye("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200",h?"px-4 py-3 w-full justify-start text-left rounded-l-md":"px-5 py-2.5 relative",p===e.value?h?"bg-background/80 text-primary font-semibold shadow-xs backdrop-blur-xs":"text-primary font-semibold":h?"text-muted-foreground hover:text-foreground hover:bg-muted/30":"text-muted-foreground hover:text-foreground",(o||e.disabled)&&"opacity-40 pointer-events-none"),v=s(e=>{o||e.disabled||m(e.value)},[o,m]);return t.createElement("div",{className:Ye(h?"flex space-x-6":"space-y-4 flex flex-col items-center",c),style:{width:u}},t.createElement("div",{role:"tablist","aria-orientation":n,className:Ye("flex relative",h?"flex-col h-full space-y-1 min-w-[200px] border-r border-border/40 pr-2":"w-full justify-center pb-px")},t.createElement("div",{className:Ye("flex relative",h?"flex-col w-full":"border-b border-border/30")},e.map(e=>t.createElement("div",{key:e.value,className:Ye("relative",h?"":"border-b-2 border-transparent",p===e.value&&!h&&"border-b-2 border-primary z-10")},t.createElement("button",{role:"tab",type:"button","aria-selected":p===e.value,"aria-controls":`tabpanel-${e.value}`,tabIndex:p===e.value?0:-1,className:y(e),onClick:()=>v(e),disabled:o||e.disabled},e.label,p===e.value&&!h&&t.createElement("div",{className:"absolute bottom-0 left-0 h-0.5 w-full bg-primary rounded-full"})),p===e.value&&h&&t.createElement("div",{className:"absolute top-0 left-0 h-full w-0.5 bg-primary rounded-full"}))))),e.map(e=>t.createElement("div",{key:e.value,role:"tabpanel",id:`tabpanel-${e.value}`,"aria-labelledby":`tab-${e.value}`,hidden:p!==e.value,className:Ye("focus-visible:outline-hidden rounded-md",h?"flex-1":"w-full",p===e.value?"animate-in fade-in-0 duration-300":"hidden"),style:h?void 0:{width:u}},e.content)))},lU={small:{node:"w-4 h-4",innerDot:{active:"w-2 h-2",completed:"w-1.5 h-1.5",default:"w-1 h-1"},text:"text-sm",description:"text-xs",connectorTop:"top-2",connectorHeight:"h-10",spacing:"mb-6",marginRight:"mr-4",verticalConnector:{left:"left-[7px]",top:"top-[16px]",height:"h-[calc(100%-16px)]"}},medium:{node:"w-6 h-6",innerDot:{active:"w-3 h-3",completed:"w-2.5 h-2.5",default:"w-2 h-2"},text:"text-base",description:"text-sm",connectorTop:"top-3",connectorHeight:"h-14",spacing:"mb-8",marginRight:"mr-6",verticalConnector:{left:"left-[11px]",top:"top-[24px]",height:"h-[calc(100%-24px)]"}},large:{node:"w-8 h-8",innerDot:{active:"w-4 h-4",completed:"w-3.5 h-3.5",default:"w-3 h-3"},text:"text-lg",description:"text-base",connectorTop:"top-4",connectorHeight:"h-16",spacing:"mb-10",marginRight:"mr-8",verticalConnector:{left:"left-[15px]",top:"top-[32px]",height:"h-[calc(100%-32px)]"}}},sU=({steps:e,activeStep:r=0,orientation:n="horizontal",size:o="medium",className:i,onStepClick:a})=>{const l="horizontal"===n,s=lU[o];return t.createElement("div",{className:Ye("max-w-full mx-auto mb-4 px-8",i)},t.createElement("div",{className:Ye("flex relative p-0",l?"flex-row justify-between":"flex-col")},e.map((n,o)=>{const i=o===r,c=o<r,u=a?t.createElement("button",{type:"button",className:Ye("relative text-left w-full bg-transparent border-0 p-0 m-0",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),onClick:()=>a(o),"aria-current":i?"step":void 0},t.createElement("div",{className:Ye("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:Ye("rounded-full transition-all duration-300 ease-in-out",i?Ye(s.innerDot.active,"bg-primary"):c?Ye(s.innerDot.completed,"bg-primary-foreground"):Ye(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:Ye("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:`w-0.5 ${s.verticalConnector.left} ${s.verticalConnector.top} ${s.verticalConnector.height}`,c?"bg-primary":"bg-border")}),t.createElement("div",{className:Ye(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:Ye("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:Ye("text-muted-foreground mt-1",s.description)},n.description))):t.createElement("div",{className:Ye("relative",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),"aria-current":i?"step":void 0},t.createElement("div",{className:Ye("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:Ye("rounded-full transition-all duration-300 ease-in-out",i?Ye(s.innerDot.active,"bg-primary"):c?Ye(s.innerDot.completed,"bg-primary-foreground"):Ye(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:Ye("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:"w-0.5 left-[12px] top-[24px] h-[calc(100%-24px)]",c?"bg-primary":"bg-border")}),t.createElement("div",{className:Ye(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:Ye("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:Ye("text-muted-foreground mt-1",s.description)},n.description)));return t.createElement(t.Fragment,{key:n.id},u)})))},cU=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function uU(e,t,r){const n=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const r=t.split(".").pop().toLowerCase(),n=cU.get(r);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof n.path&&pU(n,"path",i),pU(n,"relativePath",i),n}function pU(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const fU=[".DS_Store","Thumbs.db"];function dU(e){return"object"==typeof e&&null!==e}function mU(e){return e.filter(e=>-1===fU.indexOf(e.name))}function hU(e){if(null===e)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function yU(e){if("function"!=typeof e.webkitGetAsEntry)return gU(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?wU(t):gU(e,t)}function vU(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?vU(t):[t]],[])}function gU(e,t){return _C(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,uU(e)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return uU(n,null!==(r=null==t?void 0:t.fullPath)&&void 0!==r?r:void 0)})}function bU(e){return _C(this,void 0,void 0,function*(){return e.isDirectory?wU(e):function(e){return _C(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(r=>{const n=uU(r,e.fullPath);t(n)},e=>{r(e)})})})}(e)})}function wU(e){const t=e.createReader();return new Promise((e,r)=>{const n=[];!function o(){t.readEntries(t=>_C(this,void 0,void 0,function*(){if(t.length){const e=Promise.all(t.map(bU));n.push(e),o()}else try{const t=yield Promise.all(n);e(t)}catch(e){r(e)}}),e=>{r(e)})}()})}var xU,OU={};var EU=bt((xU||(xU=1,OU.__esModule=!0,OU.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(0===r.length)return!0;var n=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return r.some(function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t})}return!0}),OU));function kU(e){return function(e){if(Array.isArray(e))return NU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||TU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function SU(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jU(Object(r),!0).forEach(function(t){PU(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function PU(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(e,t)||TU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TU(e,t){if(e){if("string"==typeof e)return NU(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?NU(e,t):void 0}}function NU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var MU="function"==typeof EU?EU:EU.default,AU=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},zU=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},LU=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},DU={code:"too-many-files",message:"Too many files"};function _U(e,t){var r="application/x-moz-file"===e.type||MU(e,t);return[r,r?null:AU(t)]}function IU(e,t,r){if(RU(e.size))if(RU(t)&&RU(r)){if(e.size>r)return[!1,zU(r)];if(e.size<t)return[!1,LU(t)]}else{if(RU(t)&&e.size<t)return[!1,LU(t)];if(RU(r)&&e.size>r)return[!1,zU(r)]}return[!0,null]}function RU(e){return null!=e}function BU(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function WU(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function FU(e){e.preventDefault()}function $U(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return t.some(function(t){return!BU(e)&&t&&t.apply(void 0,[e].concat(n)),BU(e)})}}function VU(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function HU(e){return/^.*\.[\w]+$/.test(e)}var UU=["children"],qU=["open"],YU=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],XU=["refKey","onChange","onClick"];function GU(e){return function(e){if(Array.isArray(e))return JU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ZU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(e,t)||ZU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZU(e,t){if(e){if("string"==typeof e)return JU(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?JU(e,t):void 0}}function JU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?QU(Object(r),!0).forEach(function(t){tq(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tq(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rq(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var nq=r(function(e,r){var n=e.children,o=aq(rq(e,UU)),i=o.open,a=rq(o,qU);return d(r,function(){return{open:i}},[i]),t.createElement(y,null,n(eq(eq({},a),{},{open:i})))});nq.displayName="Dropzone";var oq={disabled:!1,getFilesFromEvent:function(e){return _C(this,void 0,void 0,function*(){return dU(e)&&dU(e.dataTransfer)?function(e,t){return _C(this,void 0,void 0,function*(){if(e.items){const r=hU(e.items).filter(e=>"file"===e.kind);if("drop"!==t)return r;return mU(vU(yield Promise.all(r.map(yU))))}return mU(hU(e.files).map(e=>uU(e)))})}(e.dataTransfer,e.type):function(e){return dU(e)&&dU(e.target)}(e)?function(e){return hU(e.target.files).map(e=>uU(e))}(e):Array.isArray(e)&&e.every(e=>"getFile"in e&&"function"==typeof e.getFile)?function(e){return _C(this,void 0,void 0,function*(){return(yield Promise.all(e.map(e=>e.getFile()))).map(e=>uU(e))})}(e):[]})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};nq.defaultProps=oq,nq.propTypes={children:Xt.func,accept:Xt.objectOf(Xt.arrayOf(Xt.string)),multiple:Xt.bool,preventDropOnDocument:Xt.bool,noClick:Xt.bool,noKeyboard:Xt.bool,noDrag:Xt.bool,noDragEventsBubbling:Xt.bool,minSize:Xt.number,maxSize:Xt.number,maxFiles:Xt.number,disabled:Xt.bool,getFilesFromEvent:Xt.func,onFileDialogCancel:Xt.func,onFileDialogOpen:Xt.func,useFsAccessApi:Xt.bool,autoFocus:Xt.bool,onDragEnter:Xt.func,onDragLeave:Xt.func,onDragOver:Xt.func,onDrop:Xt.func,onDropAccepted:Xt.func,onDropRejected:Xt.func,onError:Xt.func,validator:Xt.func};var iq={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function aq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=eq(eq({},oq),e),r=t.accept,n=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,u=t.minSize,p=t.multiple,f=t.maxFiles,d=t.onDragEnter,m=t.onDragLeave,h=t.onDragOver,y=t.onDrop,v=t.onDropAccepted,g=t.onDropRejected,b=t.onFileDialogCancel,w=t.onFileDialogOpen,x=t.useFsAccessApi,E=t.autoFocus,k=t.preventDropOnDocument,j=t.noClick,S=t.noKeyboard,P=t.noDrag,C=t.noDragEventsBubbling,T=t.onError,N=t.validator,M=l(function(){return function(e){if(RU(e))return Object.entries(e).reduce(function(e,t){var r=CU(t,2),n=r[0],o=r[1];return[].concat(kU(e),[n],kU(o))},[]).filter(function(e){return VU(e)||HU(e)}).join(",")}(r)},[r]),A=l(function(){return function(e){return RU(e)?[{description:"Files",accept:Object.entries(e).filter(function(e){var t=CU(e,2),r=t[0],n=t[1],o=!0;return VU(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(n)&&n.every(HU)||(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(e,t){var r=CU(t,2),n=r[0],o=r[1];return SU(SU({},e),{},PU({},n,o))},{})}]:e}(r)},[r]),z=l(function(){return"function"==typeof w?w:sq},[w]),L=l(function(){return"function"==typeof b?b:sq},[b]),D=c(null),_=c(null),I=KU(O(lq,iq),2),R=I[0],B=I[1],W=R.isFocused,F=R.isFileDialogActive,$=c("undefined"!=typeof window&&window.isSecureContext&&x&&"showOpenFilePicker"in window),V=function(){!$.current&&F&&setTimeout(function(){_.current&&(_.current.files.length||(B({type:"closeDialog"}),L()))},300)};a(function(){return window.addEventListener("focus",V,!1),function(){window.removeEventListener("focus",V,!1)}},[_,F,L,$]);var H=c([]),U=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),H.current=[])};a(function(){return k&&(document.addEventListener("dragover",FU,!1),document.addEventListener("drop",U,!1)),function(){k&&(document.removeEventListener("dragover",FU),document.removeEventListener("drop",U))}},[D,k]),a(function(){return!n&&E&&D.current&&D.current.focus(),function(){}},[D,E,n]);var q=s(function(e){T?T(e):console.error(e)},[T]),Y=s(function(e){e.preventDefault(),e.persist(),ae(e),H.current=[].concat(GU(H.current),[e.target]),WU(e)&&Promise.resolve(o(e)).then(function(t){if(!BU(e)||C){var r=t.length,n=r>0&&function(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,l=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every(function(e){var t=CU(_U(e,r),1)[0],i=CU(IU(e,n,o),1)[0],a=l?l(e):null;return t&&i&&!a})}({files:t,accept:M,minSize:u,maxSize:i,multiple:p,maxFiles:f,validator:N});B({isDragAccept:n,isDragReject:r>0&&!n,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e)}}).catch(function(e){return q(e)})},[o,d,q,C,M,u,i,p,f,N]),X=s(function(e){e.preventDefault(),e.persist(),ae(e);var t=WU(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&h&&h(e),!1},[h,C]),G=s(function(e){e.preventDefault(),e.persist(),ae(e);var t=H.current.filter(function(e){return D.current&&D.current.contains(e)}),r=t.indexOf(e.target);-1!==r&&t.splice(r,1),H.current=t,t.length>0||(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),WU(e)&&m&&m(e))},[D,m,C]),K=s(function(e,t){var r=[],n=[];e.forEach(function(e){var t=KU(_U(e,M),2),o=t[0],a=t[1],l=KU(IU(e,u,i),2),s=l[0],c=l[1],p=N?N(e):null;if(o&&s&&!p)r.push(e);else{var f=[a,c];p&&(f=f.concat(p)),n.push({file:e,errors:f.filter(function(e){return e})})}}),(!p&&r.length>1||p&&f>=1&&r.length>f)&&(r.forEach(function(e){n.push({file:e,errors:[DU]})}),r.splice(0)),B({acceptedFiles:r,fileRejections:n,isDragReject:n.length>0,type:"setFiles"}),y&&y(r,n,t),n.length>0&&g&&g(n,t),r.length>0&&v&&v(r,t)},[B,p,M,u,i,f,y,v,g,N]),Z=s(function(e){e.preventDefault(),e.persist(),ae(e),H.current=[],WU(e)&&Promise.resolve(o(e)).then(function(t){BU(e)&&!C||K(t,e)}).catch(function(e){return q(e)}),B({type:"reset"})},[o,K,q,C]),J=s(function(){if($.current){B({type:"openDialog"}),z();var e={multiple:p,types:A};window.showOpenFilePicker(e).then(function(e){return o(e)}).then(function(e){K(e,null),B({type:"closeDialog"})}).catch(function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(L(e),B({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?q(e):($.current=!1,_.current?(_.current.value=null,_.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))})}else _.current&&(B({type:"openDialog"}),z(),_.current.value=null,_.current.click())},[B,z,L,x,K,q,A,p]),Q=s(function(e){D.current&&D.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),J()))},[D,J]),ee=s(function(){B({type:"focus"})},[]),te=s(function(){B({type:"blur"})},[]),re=s(function(){j||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?J():setTimeout(J,0))},[j,J]),ne=function(e){return n?null:e},oe=function(e){return S?null:ne(e)},ie=function(e){return P?null:ne(e)},ae=function(e){C&&e.stopPropagation()},le=l(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,l=e.onBlur,s=e.onClick,c=e.onDragEnter,u=e.onDragOver,p=e.onDragLeave,f=e.onDrop,d=rq(e,YU);return eq(eq(tq({onKeyDown:oe($U(i,Q)),onFocus:oe($U(a,ee)),onBlur:oe($U(l,te)),onClick:ne($U(s,re)),onDragEnter:ie($U(c,Y)),onDragOver:ie($U(u,X)),onDragLeave:ie($U(p,G)),onDrop:ie($U(f,Z)),role:"string"==typeof o&&""!==o?o:"presentation"},r,D),n||S?{}:{tabIndex:0}),d)}},[D,Q,ee,te,re,Y,X,G,Z,S,P,n]),se=s(function(e){e.stopPropagation()},[]),ce=l(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,n=e.onChange,o=e.onClick,i=rq(e,XU);return eq(eq({},tq({accept:M,multiple:p,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ne($U(n,Z)),onClick:ne($U(o,se)),tabIndex:-1},r,_)),i)}},[_,r,p,Z,n]);return eq(eq({},R),{},{isFocused:W&&!n,getRootProps:le,getInputProps:ce,rootRef:D,inputRef:_,open:ne(J)})}function lq(e,t){switch(t.type){case"focus":return eq(eq({},e),{},{isFocused:!0});case"blur":return eq(eq({},e),{},{isFocused:!1});case"openDialog":return eq(eq({},iq),{},{isFileDialogActive:!0});case"closeDialog":return eq(eq({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return eq(eq({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return eq(eq({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return eq({},iq);default:return e}}function sq(){}const cq=10485760,uq=5,pq=1/0,fq={IMAGE:"image/*",PDF:"application/pdf",DOCUMENT:".doc,.docx,.pdf,.txt",ALL:"*"},dq={FILE_TOO_LARGE:"File size exceeds maximum allowed size",TOO_MANY_FILES:"Maximum number of files exceeded",INVALID_FILE_TYPE:"File type not supported",UPLOAD_FAILED:"Upload failed"},mq={UPLOADING:"uploading",SUCCESS:"success",ERROR:"error"},hq=e=>{if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]},yq=e=>{if("*"===e||!e||""===e.trim())return;return/^[a-zA-Z0-9][a-zA-Z0-9-]*\/[a-zA-Z0-9][a-zA-Z0-9\-*]*$/.test(e.trim())?{[e.trim()]:[]}:void 0},vq=({onFilesChange:e,accept:r="*",multiple:n=!1,maxSize:o=10485760,maxFiles:a=(n?pq:1),disabled:l=!1,className:c="",width:u="w-full",children:p,fileActions:f=[],showRemoveButton:d=!0,isLoading:m=!1})=>{const[h,y]=i([]),[v,g]=i([]),b=s(()=>{g([])},[]),w=s(t=>{const r=h.filter(e=>(e.id===t&&e.preview&&URL.revokeObjectURL(e.preview),e.id!==t));y(r),e(r.map(e=>e.file))},[h,e]),x=s(e=>()=>{w(e)},[w]),O=s(e=>h.some(t=>t.name===e.name&&t.size===e.size&&t.type===e.type),[h]),E=s((t,r)=>{g([]);const n=[];r.length>0&&r.forEach(e=>{e.errors&&e.errors.forEach(e=>{"file-too-large"===e.code?n.push(dq.FILE_TOO_LARGE):"file-invalid-type"===e.code&&n.push(dq.INVALID_FILE_TYPE)})});const o=[],i=t.filter(e=>{const t=O(e);return t&&o.push(e.name),!t});if(o.length>0){const e=1===o.length?`The following file is already uploaded:\n• ${o[0]}`:`The following files are already uploaded:\n${o.map(e=>`• ${e}`).join("\n")}`;n.push(e)}if(a!==1/0&&h.length+i.length>a&&n.push(dq.TOO_MANY_FILES),i.length>0&&(a===1/0||h.length+i.length<=a)){const t=i.map((e,t)=>({id:`${Date.now()}-${t}`,file:e,name:e.name,size:e.size,type:e.type,status:"success",preview:e.type.startsWith("image/")?URL.createObjectURL(e):void 0})),r=[...h,...t];y(r),e(r.map(e=>e.file))}n.length>0&&g(n)},[h,a,e,O]),{getRootProps:k,getInputProps:j,isDragActive:S}=aq({onDrop:E,accept:yq(r),multiple:n,maxSize:o,disabled:l||m});return t.createElement("div",{className:`${u} ${c}`},t.createElement("div",{...k(),className:`\n relative overflow-hidden\n border-2 border-dashed rounded-lg transition-all duration-200\n ${S?"border-primary bg-primary/5 shadow-md scale-[0.99]":"border-border/40 bg-muted/20 hover:border-primary/40 hover:bg-muted/30"}\n ${l||m?"opacity-50 cursor-not-allowed":"cursor-pointer"}\n `},t.createElement("input",{...j()}),p?t.createElement("div",{className:"p-6"},p):t.createElement("div",{className:"p-6 flex items-center justify-center gap-3"},t.createElement("div",{className:`\n p-2.5 rounded-full transition-all duration-200\n ${S?"bg-primary/10 scale-110":"bg-muted/60"}\n `},t.createElement(cg,{name:"UploadCloud",size:24})),t.createElement("div",{className:"text-left"},t.createElement(Eg,{variant:"caption",color:"quinary"},S?"Drop files here":"Drop files or click to browse"),t.createElement(Eg,{variant:"captionSm",color:"quinary"},"*"!==r&&`${r.toUpperCase()} • `,a!==1/0&&`${a} max • `,hq(o)))),m&&t.createElement("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-sm flex items-center justify-center z-10"},t.createElement(cg,{name:"Loader",size:20,className:"animate-spin"}))),v.length>0&&t.createElement("div",{className:"mt-2 p-2.5 bg-destructive/5 border border-destructive/20 rounded-lg"},t.createElement("div",{className:"flex items-start gap-2"},t.createElement(cg,{name:"AlertCircle",size:14,color:"red"}),t.createElement("div",{className:"flex-1 min-w-0"},v.map((e,r)=>t.createElement(Eg,{key:r,variant:"captionSm",color:"tertiary"},e))),t.createElement("button",{onClick:b,className:"text-destructive/60 hover:text-destructive p-0.5 flex-shrink-0",type:"button"},t.createElement(cg,{name:"X",size:14})))),h.length>0&&t.createElement("div",{className:"mt-3 space-y-1.5"},h.map(e=>t.createElement("div",{key:e.id,className:"group relative rounded-lg border border-border/40 bg-muted/30 hover:bg-muted/50 hover:border-border/60 transition-all duration-200"},t.createElement("div",{className:"flex items-center gap-3 p-2.5"},t.createElement("div",{className:"flex-shrink-0"},e.preview?t.createElement("div",{className:"w-10 h-10 rounded-md overflow-hidden ring-1 ring-border/50"},t.createElement("img",{src:e.preview,alt:e.name,className:"w-full h-full object-cover"})):t.createElement("div",{className:"w-10 h-10 rounded-md bg-primary/5 flex items-center justify-center ring-1 ring-primary/10"},t.createElement(cg,{name:"FileText",size:16}))),t.createElement("div",{className:"flex-1 min-w-0"},t.createElement(Eg,{variant:"captionSm",color:"quinary"},e.name),t.createElement("div",{className:"flex items-center gap-1.5"},t.createElement(Eg,{variant:"captionSm",color:"quinary"},hq(e.size)),"success"===e.status&&t.createElement(t.Fragment,null,t.createElement("span",{className:"text-muted-foreground/30"},"•"),t.createElement("div",{className:"w-1 h-1 rounded-full bg-green-500"})))),t.createElement("div",{className:"flex items-center gap-1.5 flex-shrink-0"},f.map((r,n)=>t.createElement(t.Fragment,{key:n},"function"==typeof r?r(e,m):r)),d&&t.createElement("button",{onClick:x(e.id),type:"button",disabled:m,className:"p-1.5 text-destructive/60 hover:text-destructive hover:bg-destructive/5 rounded-md transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed"},t.createElement(cg,{name:"Trash2",size:14,color:"red"}))))))))};function gq(e,t){return Array(t+1).join(e)}function bq(e){return e.replace(/^\n*/,"")}function wq(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}function xq(e){return wq(bq(e))}var Oq=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Eq(e){return Pq(e,Oq)}var kq=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function jq(e){return Pq(e,kq)}var Sq=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Pq(e,t){return t.indexOf(e.nodeName)>=0}function Cq(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var Tq={};function Nq(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function Mq(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function Aq(e,t,r){for(var n=0;n<e.length;n++){var o=e[n];if(zq(o,t,r))return o}}function zq(e,t,r){var n=e.filter;if("string"==typeof n){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof n)throw new TypeError("`filter` needs to be a string, array, or function");if(n.call(e,t,r))return!0}}function Lq(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function Dq(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}Tq.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},Tq.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+"\n"}},Tq.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var n=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&n<3?"\n\n"+e+"\n"+gq(1===n?"=":"-",e.length)+"\n\n":"\n\n"+gq("#",n)+" "+e+"\n\n"}},Tq.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=xq(e).replace(/^/gm,"> "))+"\n\n"}},Tq.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return"LI"===r.nodeName&&r.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},Tq.listItem={filter:"li",replacement:function(e,t,r){var n=r.bulletListMarker+" ",o=t.parentNode;if("OL"===o.nodeName){var i=o.getAttribute("start"),a=Array.prototype.indexOf.call(o.children,t);n=(i?Number(i)+a:a+1)+". "}var l=/\n$/.test(e);return n+(e=(e=xq(e)+(l?"\n":"")).replace(/\n/gm,"\n"+" ".repeat(n.length)))+(t.nextSibling?"\n":"")}},Tq.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},Tq.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){for(var n,o=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,a=r.fence.charAt(0),l=3,s=new RegExp("^"+a+"{3,}","gm");n=s.exec(i);)n[0].length>=l&&(l=n[0].length+1);var c=gq(a,l);return"\n\n"+c+o+"\n"+i.replace(/\n$/,"")+"\n"+c+"\n\n"}},Tq.horizontalRule={filter:"hr",replacement:function(e,t,r){return"\n\n"+r.hr+"\n\n"}},Tq.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href");r&&(r=r.replace(/([()])/g,"\\$1"));var n=Nq(t.getAttribute("title"));return n&&(n=' "'+n.replace(/"/g,'\\"')+'"'),"["+e+"]("+r+n+")"}},Tq.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,r){var n,o,i=t.getAttribute("href"),a=Nq(t.getAttribute("title"));switch(a&&(a=' "'+a+'"'),r.linkReferenceStyle){case"collapsed":n="["+e+"][]",o="["+e+"]: "+i+a;break;case"shortcut":n="["+e+"]",o="["+e+"]: "+i+a;break;default:var l=this.references.length+1;n="["+e+"]["+l+"]",o="["+l+"]: "+i+a}return this.references.push(o),n},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},Tq.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}},Tq.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}},Tq.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];-1!==n.indexOf(r);)r+="`";return r+t+e+t+r}},Tq.image={filter:"img",replacement:function(e,t){var r=Nq(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=Nq(t.getAttribute("title"));return n?"!["+r+"]("+n+(o?' "'+o+'"':"")+")":""}},Mq.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=Aq(this.array,e,this.options))||(t=Aq(this._keep,e,this.options))||(t=Aq(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var _q="undefined"!=typeof window?window:{};var Iq,Rq,Bq,Wq=function(){var e=_q.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?_q.DOMParser:(Iq=function(){},Rq=require("@mixmark-io/domino"),Iq.prototype.parseFromString=function(e){return Rq.createDocument(e)},Iq);function Fq(e,t){var r;"string"==typeof e?r=(Bq=Bq||new Wq).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):r=e.cloneNode(!0);return function(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!o(t)){for(var i=null,a=!1,l=null,s=Dq(l,t,o);s!==t;){if(3===s.nodeType||4===s.nodeType){var c=s.data.replace(/[ \r\n\t]+/g," ");if(i&&!/ $/.test(i.data)||a||" "!==c[0]||(c=c.substr(1)),!c){s=Lq(s);continue}s.data=c,i=s}else{if(1!==s.nodeType){s=Lq(s);continue}r(s)||"BR"===s.nodeName?(i&&(i.data=i.data.replace(/ $/,"")),i=null,a=!1):n(s)||o(s)?(i=null,a=!0):i&&(a=!1)}var u=Dq(l,s,o);l=s,s=u}i&&(i.data=i.data.replace(/ $/,""),i.data||Lq(i))}}({element:r,isBlock:Eq,isVoid:jq,isPre:t.preformattedCode?$q:null}),r}function $q(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function Vq(e,t){return e.isBlock=Eq(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!jq(e)&&!function(e){return Pq(e,Sq)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return Cq(e,kq)}(e)&&!function(e){return Cq(e,Sq)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=function(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}(e.textContent);r.leadingAscii&&Hq("left",e,t)&&(r.leading=r.leadingNonAscii);r.trailingAscii&&Hq("right",e,t)&&(r.trailing=r.trailingNonAscii);return{leading:r.leading,trailing:r.trailing}}(e,t),e}function Hq(e,t,r){var n,o,i;return"left"===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?i=o.test(n.nodeValue):r.preformattedCode&&"CODE"===n.nodeName?i=!1:1!==n.nodeType||Eq(n)||(i=o.test(n.textContent))),i}var Uq=Array.prototype.reduce,qq=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Yq(e){if(!(this instanceof Yq))return new Yq(e);var t={rules:Tq,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}({},t,e),this.rules=new Mq(this.options)}function Xq(e){var t=this;return Uq.call(e.childNodes,function(e,r){var n="";return 3===(r=new Vq(r,t.options)).nodeType?n=r.isCode?r.nodeValue:t.escape(r.nodeValue):1===r.nodeType&&(n=Kq.call(t,r)),Zq(e,n)},"")}function Gq(e){var t=this;return this.rules.forEach(function(r){"function"==typeof r.append&&(e=Zq(e,r.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Kq(e){var t=this.rules.forNode(e),r=Xq.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+t.replacement(r,e,this.options)+n.trailing}function Zq(e,t){var r=wq(e),n=bq(t),o=Math.max(e.length-r.length,t.length-n.length);return r+"\n\n".substring(0,o)+n}Yq.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=Xq.call(this,new Fq(e,this.options));return Gq.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return qq.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};const Jq=({value:e="",onChange:r,placeholder:n="Start writing...",className:o,disabled:u=!1,showToolbar:p=!0,minHeight:f=200})=>{const[d,m]=i(e),[h,y]=i(!1),[v,g]=i(""),[b,w]=i(new Set),[x,O]=i("left"),[E,k]=i("p"),[j,S]=i({ul:!1,ol:!1}),P=c(null),C=c(null),T=c(0),N=c(!1),M=c(new Yq({headingStyle:"atx",codeBlockStyle:"fenced",bulletListMarker:"*",emDelimiter:"*",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full"})),A=l(()=>[{pattern:/^### (.+)$/,tag:"h3"},{pattern:/^## (.+)$/,tag:"h2"},{pattern:/^# (.+)$/,tag:"h1"},{pattern:/^> (.+)$/,tag:"blockquote"},{pattern:/^```(.*)$/,tag:"pre"},{pattern:/^\* (.+)$/,tag:"ul"},{pattern:/^- (.+)$/,tag:"ul"},{pattern:/^1\. (.+)$/,tag:"ol"}],[]);a(()=>{const e=M.current;e.addRule("paragraph",{filter:["p","div"],replacement:function(e){return e?"\n\n"+e+"\n\n":""}}),e.addRule("blockquote",{filter:"blockquote",replacement:function(e){return"\n\n> "+e.trim().replace(/\n/g,"\n> ")+"\n\n"}}),e.addRule("codeBlock",{filter:"pre",replacement:function(e){return"\n\n```\n"+e.trim()+"\n```\n\n"}}),e.addRule("inlineCode",{filter:"code",replacement:function(e){return"`"+e+"`"}})},[]);const z=[{id:"p",label:"Paragraph",icon:t.createElement(cg,{name:"Type",size:16})},{id:"h1",label:"Heading 1",icon:t.createElement(cg,{name:"Type",size:20})},{id:"h2",label:"Heading 2",icon:t.createElement(cg,{name:"Type",size:16})},{id:"h3",label:"Heading 3",icon:t.createElement(cg,{name:"Type",size:12})}],L=[{id:"left",label:"Left",icon:t.createElement(cg,{name:"AlignLeft",size:16})},{id:"center",label:"Center",icon:t.createElement(cg,{name:"AlignCenter",size:16})},{id:"right",label:"Right",icon:t.createElement(cg,{name:"AlignRight",size:16})}],D=s(()=>{const e=window.getSelection();if(!e||0===e.rangeCount)return null;let t=e.anchorNode;return t?(t.nodeType===Node.TEXT_NODE&&(t=t.parentElement),t):null},[]),_=s(()=>{const e=D();if(!e)return{ul:!1,ol:!1};return{ul:!!e.closest("ul"),ol:!!e.closest("ol")}},[D]),I=s(()=>{if(!P.current)return;const e=window.getSelection();if(!e||0===e.rangeCount)return;const t=new Set;document.queryCommandState("bold")&&t.add("bold"),document.queryCommandState("italic")&&t.add("italic"),document.queryCommandState("underline")&&t.add("underline"),document.queryCommandState("justifyLeft")?O("left"):document.queryCommandState("justifyCenter")?O("center"):document.queryCommandState("justifyRight")?O("right"):O("left");const r=document.queryCommandValue("formatBlock").toLowerCase();r.includes("h1")?k("h1"):r.includes("h2")?k("h2"):r.includes("h3")?k("h3"):r.includes("pre")?(t.add("code"),k("p")):r.includes("blockquote")?(t.add("quote"),k("p")):k("p");const n=_();S(n),w(t)},[_]),R=s(()=>{if(P.current){const e=P.current.innerHTML;let t="";try{t=M.current.turndown(e),t=t.replace(/\n{3,}/g,"\n\n").replace(/^\n+/,"").replace(/\n+$/,"").trim()}catch{t=e}N.current=!0,m(t),r?.(t),setTimeout(I,10)}},[r,I]),B=s(()=>{const e=window.getSelection();if(!e||0===e.rangeCount)return null;const t=e.getRangeAt(0),r=t.startContainer;return r.nodeType===Node.TEXT_NODE&&r.parentElement?{element:r.parentElement,text:r.textContent||"",offset:t.startOffset}:r.nodeType===Node.ELEMENT_NODE?{element:r,text:r.textContent||"",offset:t.startOffset}:null},[]),W=s(()=>{const e=B();if(!e||!e.element||!P.current?.contains(e.element))return;const t=e.text.trim();for(const{pattern:r,tag:n}of A){const o=t.match(r);if(o){const t=o[1]||o[0],r=window.getSelection();if(!r)return;if("ul"===n||"ol"===n){e.element.textContent=t;const o="ul"===n?"insertUnorderedList":"insertOrderedList",i=document.createRange();i.selectNodeContents(e.element),r.removeAllRanges(),r.addRange(i),document.execCommand(o,!1)}else{e.element.textContent=t;const o=document.createRange();o.selectNodeContents(e.element),r.removeAllRanges(),r.addRange(o);const i={h1:"<h1>",h2:"<h2>",h3:"<h3>",blockquote:"<blockquote>",pre:"<pre>"};document.execCommand("formatBlock",!1,i[n])}setTimeout(()=>{const t=document.createRange(),n=e.element.firstChild;n&&(t.setStart(n,n.textContent?.length||0),t.collapse(!0),r.removeAllRanges(),r.addRange(t)),R()},10);break}}},[B,A,R]),F=s(()=>{const e=Date.now();T.current=e,R(),setTimeout(()=>{T.current===e&&W()},500)},[R,W]),$=s(()=>{const e=window.getSelection();e&&P.current&&P.current.contains(e.anchorNode)&&setTimeout(I,10)},[I]),V=s((e,t)=>{u||(document.execCommand(e,!1,t),R(),P.current?.focus())},[u,R]),H=s(e=>{if(u)return;const t={bold:"bold",italic:"italic",underline:"underline",code:"formatBlock"};"code"===e?b.has("code")?V("formatBlock","<div>"):V("formatBlock","<pre>"):V(t[e])},[V,b,u]),U=s(e=>{if(u)return;const t=e?"insertOrderedList":"insertUnorderedList",r=_();e&&r.ol?V("insertOrderedList"):!e&&r.ul?V("insertUnorderedList"):V(t)},[V,_,u]),q=s(()=>{u||(b.has("quote")?V("formatBlock","<div>"):V("formatBlock","<blockquote>"))},[V,b,u]),Y=s(e=>{if(u)return;V("formatBlock",{p:"<div>",h1:"<h1>",h2:"<h2>",h3:"<h3>"}[e])},[V,u]),X=s(e=>{u||V("justify"+e.charAt(0).toUpperCase()+e.slice(1))},[V,u]),G=s(()=>{v.trim()&&(V("createLink",v),g(""),y(!1))},[V,v]),K=s(e=>{if("Enter"===e.key&&h&&(e.preventDefault(),G()),"Escape"===e.key&&h&&(y(!1),g(""))," "===e.key&&setTimeout(()=>{W()},10),e.ctrlKey||e.metaKey)switch(e.key){case"b":e.preventDefault(),H("bold");break;case"i":e.preventDefault(),H("italic");break;case"u":e.preventDefault(),H("underline")}},[h,G,H,W]),Z=s(e=>{let t=e;t=t.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__(.*?)__/g,"<strong>$1</strong>"),t=t.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g,"<em>$1</em>"),t=t.replace(/(?<!_)_([^_]+)_(?!_)/g,"<em>$1</em>"),t=t.replace(/`([^`]+)`/g,"<code>$1</code>");const r=t.split("\n"),n=[];let o=!1,i="";for(let e=0;e<r.length;e++){const t=r[e].trim();if(t)if(t.startsWith("### "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<h3>${t.substring(4)}</h3>`);else if(t.startsWith("## "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<h2>${t.substring(3)}</h2>`);else if(t.startsWith("# "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<h1>${t.substring(2)}</h1>`);else if(t.startsWith("> "))o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<blockquote>${t.substring(2)}</blockquote>`);else if(/^\d+\.\s/.test(t)){const e=t.replace(/^\d+\.\s/,"");o&&"ol"===i||(o&&"ul"===i&&n.push("</ul>"),n.push("<ol>"),o=!0,i="ol"),n.push(`<li>${e}</li>`)}else if(t.startsWith("- ")||t.startsWith("* ")){const e=t.substring(2);o&&"ul"===i||(o&&"ol"===i&&n.push("</ol>"),n.push("<ul>"),o=!0,i="ul"),n.push(`<li>${e}</li>`)}else if(t.startsWith("```")){o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1);let t="";for(e++;e<r.length&&!r[e].trim().startsWith("```");)t+=r[e]+"\n",e++;n.push(`<pre>${t.trim()}</pre>`)}else o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push(`<p>${t}</p>`);else o&&(n.push("ol"===i?"</ol>":"</ul>"),o=!1),n.push("<br>")}return o&&n.push("ol"===i?"</ol>":"</ul>"),n.join("")},[]),J=s(e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");if(/(\*\*.*?\*\*|__.*?__|^\s*[-*]\s|^\s*\d+\.\s|^#+\s)/m.test(t)&&t.includes("\n")){const e=Z(t);document.execCommand("insertHTML",!1,e)}else document.execCommand("insertText",!1,t)},[Z]),Q=s(()=>{setTimeout(I,10)},[I]),ee=s(()=>{y(!1),g("")},[]),te=s(()=>{y(!0)},[]),re=s((e,t)=>{e.preventDefault(),e.stopPropagation(),t()},[]);return a(()=>{N.current||e===d||(m(e),P.current&&(P.current.innerHTML=e)),N.current=!1},[d,e]),a(()=>{h&&C.current&&C.current.focus()},[h]),a(()=>(document.addEventListener("selectionchange",$),()=>{document.removeEventListener("selectionchange",$)}),[$]),t.createElement("div",{className:Ye("border border-border rounded-lg bg-background overflow-hidden","focus-within:border-primary/30 focus-within:ring-1 focus-within:ring-primary/20","transition-all duration-200",u&&"opacity-50 cursor-not-allowed",o)},p&&t.createElement("div",{className:"flex items-center gap-1 p-2 border-b border-border bg-muted/30 flex-wrap"},t.createElement(HP,{options:z,value:E,onValueChange:Y,placeholder:"Format",size:"small",className:"min-w-[120px]"}),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("bold")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("bold")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Bold",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("italic")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("italic")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Italic",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("underline")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("underline")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Underline",size:16})),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>U(!1)),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",j.ul&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"List",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>U(!0)),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",j.ol&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Hash",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,q),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("quote")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"MessageSquare",size:16})),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,()=>H("code")),disabled:u,className:Ye("h-8 w-8 p-0 transition-all duration-150 ease-in-out","hover:bg-primary/10 hover:scale-105",b.has("code")&&"bg-primary/15 text-primary border-primary/30 shadow-sm scale-105")},t.createElement(cg,{name:"Code",size:16})),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),t.createElement(HP,{options:L,value:x,onValueChange:X,placeholder:"Align",size:"small",className:"min-w-[100px]"}),t.createElement("div",{className:"h-6 w-px bg-border mx-1"}),h?t.createElement("div",{className:"flex items-center gap-2"},t.createElement("input",{ref:C,type:"text",value:v,onChange:e=>g(e.target.value),onKeyDown:K,placeholder:"Enter URL",className:"px-2 py-1 text-sm border border-border rounded bg-background focus:outline-none focus:border-primary/30 focus:ring-1 focus:ring-primary/20 transition-all duration-150"}),t.createElement(vt,{type:"button",variant:"primary",size:"small",onClick:e=>re(e,G),className:"h-8 transition-all duration-150"},"Add"),t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,ee),className:"h-8 transition-all duration-150"},"Cancel")):t.createElement(vt,{type:"button",variant:"tertiary",size:"small",onClick:e=>re(e,te),disabled:u,className:"h-8 w-8 p-0 transition-all duration-150 ease-in-out hover:bg-primary/10 hover:scale-105"},t.createElement(cg,{name:"Link2",size:16}))),t.createElement("div",{ref:P,contentEditable:!u,role:"textbox",onInput:F,onKeyDown:K,onPaste:J,onFocus:Q,suppressContentEditableWarning:!0,className:Ye("p-4 focus:outline-none min-h-0","prose prose-sm max-w-none","text-foreground","[&_h1]:text-2xl [&_h1]:font-bold [&_h1]:text-foreground [&_h1]:mt-6 [&_h1]:mb-4","[&_h2]:text-xl [&_h2]:font-semibold [&_h2]:text-foreground [&_h2]:mt-5 [&_h2]:mb-3","[&_h3]:text-lg [&_h3]:font-medium [&_h3]:text-foreground [&_h3]:mt-4 [&_h3]:mb-2","[&_p]:text-foreground [&_p]:leading-relaxed [&_p]:mb-3","[&_div]:text-foreground [&_div]:leading-relaxed [&_div]:mb-3","[&_ul]:text-foreground [&_ul]:ml-6 [&_ul]:mb-3 [&_ul]:list-disc [&_ul]:pl-4","[&_ol]:text-foreground [&_ol]:ml-6 [&_ol]:mb-3 [&_ol]:list-decimal [&_ol]:pl-4","[&_li]:text-foreground [&_li]:mb-1 [&_li]:leading-relaxed","[&_blockquote]:border-l-4 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:text-muted-foreground [&_blockquote]:mb-4","[&_pre]:bg-muted [&_pre]:text-foreground [&_pre]:p-3 [&_pre]:rounded [&_pre]:mb-4 [&_pre]:font-mono [&_pre]:text-sm [&_pre]:overflow-x-auto [&_pre]:whitespace-pre-wrap","[&_code]:bg-muted [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:font-mono [&_code]:text-sm","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 [&_a]:decoration-primary/50 [&_a:hover]:decoration-primary","[&_strong]:font-semibold [&_strong]:text-foreground","[&_em]:italic [&_em]:text-foreground","[&_u]:underline [&_u]:text-foreground","empty:before:content-[attr(data-placeholder)] empty:before:text-muted-foreground empty:before:pointer-events-none empty:before:absolute"),style:{minHeight:f},"data-placeholder":n}))};var Qq,eY,tY,rY,nY,oY,iY,aY,lY,sY,cY,uY,pY,fY,dY,mY,hY,yY,vY,gY,bY,wY,xY,OY,EY,kY,jY,SY,PY,CY,TY,NY,MY,AY,zY,LY,DY,_Y,IY,RY,BY,WY,FY,$Y,VY,HY,UY,qY,YY,XY,GY,KY,ZY,JY,QY,eX,tX,rX,nX,oX,iX,aX,lX,sX,cX,uX,pX,fX,dX,mX,hX,yX,vX,gX,bX,wX,xX,OX,EX,kX,jX,SX,PX,CX,TX,NX,MX,AX,zX,LX,DX,_X,IX,RX,BX,WX,FX,$X,VX,HX,UX,qX,YX,XX;function GX(){if(eY)return Qq;eY=1;var e=Array.isArray;return Qq=e}function KX(){if(rY)return tY;rY=1;var e="object"==typeof gt&&gt&&gt.Object===Object&&gt;return tY=e}function ZX(){if(oY)return nY;oY=1;var e=KX(),t="object"==typeof self&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return nY=r}function JX(){if(aY)return iY;aY=1;var e=ZX().Symbol;return iY=e}function QX(){if(fY)return pY;fY=1;var e=JX(),t=function(){if(sY)return lY;sY=1;var e=JX(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;return lY=function(e){var t=r.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(e){}var l=n.call(e);return a&&(t?e[o]=i:delete e[o]),l}}(),r=function(){if(uY)return cY;uY=1;var e=Object.prototype.toString;return cY=function(t){return e.call(t)}}(),n=e?e.toStringTag:void 0;return pY=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?t(e):r(e)}}function eG(){if(mY)return dY;return mY=1,dY=function(e){return null!=e&&"object"==typeof e}}function tG(){if(yY)return hY;yY=1;var e=QX(),t=eG();return hY=function(r){return"symbol"==typeof r||t(r)&&"[object Symbol]"==e(r)}}function rG(){if(gY)return vY;gY=1;var e=GX(),t=tG(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return vY=function(o,i){if(e(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!t(o))||(n.test(o)||!r.test(o)||null!=i&&o in Object(i))},vY}function nG(){if(wY)return bY;return wY=1,bY=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function oG(){if(OY)return xY;OY=1;var e=QX(),t=nG();return xY=function(r){if(!t(r))return!1;var n=e(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function iG(){if(SY)return jY;SY=1;var e,t=function(){if(kY)return EY;kY=1;var e=ZX()["__core-js_shared__"];return EY=e}(),r=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return jY=function(e){return!!r&&r in e}}function aG(){if(CY)return PY;CY=1;var e=Function.prototype.toString;return PY=function(t){if(null!=t){try{return e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}}function lG(){if(LY)return zY;LY=1;var e=function(){if(NY)return TY;NY=1;var e=oG(),t=iG(),r=nG(),n=aG(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,l=i.toString,s=a.hasOwnProperty,c=RegExp("^"+l.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return TY=function(i){return!(!r(i)||t(i))&&(e(i)?c:o).test(n(i))}}(),t=(AY||(AY=1,MY=function(e,t){return null==e?void 0:e[t]}),MY);return zY=function(r,n){var o=t(r,n);return e(o)?o:void 0},zY}function sG(){if(_Y)return DY;_Y=1;var e=lG()(Object,"create");return DY=e}function cG(){if(XY)return YY;XY=1;var e=function(){if(RY)return IY;RY=1;var e=sG();return IY=function(){this.__data__=e?e(null):{},this.size=0}}(),t=WY?BY:(WY=1,BY=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),r=function(){if($Y)return FY;$Y=1;var e=sG(),t=Object.prototype.hasOwnProperty;return FY=function(r){var n=this.__data__;if(e){var o=n[r];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(n,r)?n[r]:void 0}}(),n=function(){if(HY)return VY;HY=1;var e=sG(),t=Object.prototype.hasOwnProperty;return VY=function(r){var n=this.__data__;return e?void 0!==n[r]:t.call(n,r)}}(),o=function(){if(qY)return UY;qY=1;var e=sG();return UY=function(t,r){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=e&&void 0===r?"__lodash_hash_undefined__":r,this}}();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,YY=i}function uG(){if(JY)return ZY;return JY=1,ZY=function(e,t){return e===t||e!=e&&t!=t}}function pG(){if(eX)return QY;eX=1;var e=uG();return QY=function(t,r){for(var n=t.length;n--;)if(e(t[n][0],r))return n;return-1},QY}function fG(){if(uX)return cX;uX=1;var e=KY?GY:(KY=1,GY=function(){this.__data__=[],this.size=0}),t=function(){if(rX)return tX;rX=1;var e=pG(),t=Array.prototype.splice;return tX=function(r){var n=this.__data__,o=e(n,r);return!(o<0||(o==n.length-1?n.pop():t.call(n,o,1),--this.size,0))},tX}(),r=function(){if(oX)return nX;oX=1;var e=pG();return nX=function(t){var r=this.__data__,n=e(r,t);return n<0?void 0:r[n][1]},nX}(),n=function(){if(aX)return iX;aX=1;var e=pG();return iX=function(t){return e(this.__data__,t)>-1}}(),o=function(){if(sX)return lX;sX=1;var e=pG();return lX=function(t,r){var n=this.__data__,o=e(n,t);return o<0?(++this.size,n.push([t,r])):n[o][1]=r,this},lX}();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,cX=i}function dG(){if(fX)return pX;fX=1;var e=lG()(ZX(),"Map");return pX=e}function mG(){if(gX)return vX;gX=1;var e=yX?hX:(yX=1,hX=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return vX=function(t,r){var n=t.__data__;return e(r)?n["string"==typeof r?"string":"hash"]:n.map},vX}function hG(){if(CX)return PX;CX=1;var e=function(){if(mX)return dX;mX=1;var e=cG(),t=fG(),r=dG();return dX=function(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}(),t=function(){if(wX)return bX;wX=1;var e=mG();return bX=function(t){var r=e(this,t).delete(t);return this.size-=r?1:0,r}}(),r=function(){if(OX)return xX;OX=1;var e=mG();return xX=function(t){return e(this,t).get(t)}}(),n=function(){if(kX)return EX;kX=1;var e=mG();return EX=function(t){return e(this,t).has(t)}}(),o=function(){if(SX)return jX;SX=1;var e=mG();return jX=function(t,r){var n=e(this,t),o=n.size;return n.set(t,r),this.size+=n.size==o?0:1,this},jX}();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,PX=i}function yG(){if(NX)return TX;NX=1;var e=hG();function t(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var e=arguments,t=n?n.apply(this,e):e[0],i=o.cache;if(i.has(t))return i.get(t);var a=r.apply(this,e);return o.cache=i.set(t,a)||i,a};return o.cache=new(t.Cache||e),o}return t.Cache=e,TX=t}function vG(){if(LX)return zX;LX=1;var e=function(){if(AX)return MX;AX=1;var e=yG();return MX=function(t){var r=e(t,function(e){return 500===n.size&&n.clear(),e}),n=r.cache;return r},MX}(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(t,function(e,t,o,i){n.push(o?i.replace(r,"$1"):t||e)}),n});return zX=n}function gG(){if(_X)return DX;return _X=1,DX=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},DX}function bG(){if(WX)return BX;WX=1;var e=function(){if(RX)return IX;RX=1;var e=JX(),t=gG(),r=GX(),n=tG(),o=e?e.prototype:void 0,i=o?o.toString:void 0;return IX=function e(o){if("string"==typeof o)return o;if(r(o))return t(o,e)+"";if(n(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},IX}();return BX=function(t){return null==t?"":e(t)}}function wG(){if($X)return FX;$X=1;var e=GX(),t=rG(),r=vG(),n=bG();return FX=function(o,i){return e(o)?o:t(o,i)?[o]:r(n(o))},FX}function xG(){if(HX)return VX;HX=1;var e=tG();return VX=function(t){if("string"==typeof t||e(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}}function OG(){if(qX)return UX;qX=1;var e=wG(),t=xG();return UX=function(r,n){for(var o=0,i=(n=e(n,r)).length;null!=r&&o<i;)r=r[t(n[o++])];return o&&o==i?r:void 0},UX}function EG(){if(XX)return YX;XX=1;var e=OG();return YX=function(t,r,n){var o=null==t?void 0:e(t,r);return void 0===o?n:o},YX}var kG,jG,SG=bt(EG());var PG,CG,TG=bt(jG?kG:(jG=1,kG=function(e){return null==e}));var NG,MG=bt(function(){if(CG)return PG;CG=1;var e=QX(),t=GX(),r=eG();return PG=function(n){return"string"==typeof n||!t(n)&&r(n)&&"[object String]"==e(n)}}()),AG=bt(oG()),zG=bt(nG()),LG={exports:{}},DG={};var _G,IG,RG={};
54
54
  /**
55
55
  * @license React
56
56
  * react-is.development.js