@moontra/moonui 2.3.9 → 2.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,168 +1,62 @@
1
1
  /** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
2
- var rU=Object.create;var pL=Object.defineProperty;var oU=Object.getOwnPropertyDescriptor;var nU=Object.getOwnPropertyNames;var aU=Object.getPrototypeOf,iU=Object.prototype.hasOwnProperty;var sU=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var tr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var lU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of nU(t))!iU.call(e,n)&&n!==r&&pL(e,n,{get:()=>t[n],enumerable:!(o=oU(t,n))||o.enumerable});return e};var b=(e,t,r)=>(r=e!=null?rU(aU(e)):{},lU(t||!e||!e.__esModule?pL(r,"default",{value:e,enumerable:!0}):r,e));var LL=tr(Re=>{"use strict";var Tc=Symbol.for("react.element"),uU=Symbol.for("react.portal"),cU=Symbol.for("react.fragment"),dU=Symbol.for("react.strict_mode"),fU=Symbol.for("react.profiler"),pU=Symbol.for("react.provider"),mU=Symbol.for("react.context"),gU=Symbol.for("react.forward_ref"),hU=Symbol.for("react.suspense"),vU=Symbol.for("react.memo"),yU=Symbol.for("react.lazy"),mL=Symbol.iterator;function xU(e){return e===null||typeof e!="object"?null:(e=mL&&e[mL]||e["@@iterator"],typeof e=="function"?e:null)}var vL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yL=Object.assign,xL={};function xl(e,t,r){this.props=e,this.context=t,this.refs=xL,this.updater=r||vL}xl.prototype.isReactComponent={};xl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wL(){}wL.prototype=xl.prototype;function My(e,t,r){this.props=e,this.context=t,this.refs=xL,this.updater=r||vL}var Ey=My.prototype=new wL;Ey.constructor=My;yL(Ey,xl.prototype);Ey.isPureReactComponent=!0;var gL=Array.isArray,CL=Object.prototype.hasOwnProperty,Ay={current:null},SL={key:!0,ref:!0,__self:!0,__source:!0};function bL(e,t,r){var o,n={},a=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)CL.call(t,o)&&!SL.hasOwnProperty(o)&&(n[o]=t[o]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];n.children=l}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)n[o]===void 0&&(n[o]=s[o]);return{$$typeof:Tc,type:e,key:a,ref:i,props:n,_owner:Ay.current}}function wU(e,t){return{$$typeof:Tc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Dy(e){return typeof e=="object"&&e!==null&&e.$$typeof===Tc}function CU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var hL=/\/+/g;function ky(e,t){return typeof e=="object"&&e!==null&&e.key!=null?CU(""+e.key):t.toString(36)}function Dp(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Tc:case uU:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+ky(i,0):o,gL(n)?(r="",e!=null&&(r=e.replace(hL,"$&/")+"/"),Dp(n,t,r,"",function(u){return u})):n!=null&&(Dy(n)&&(n=wU(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(hL,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",gL(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+ky(a,s);i+=Dp(a,t,r,l,n)}else if(l=xU(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+ky(a,s++),i+=Dp(a,t,r,l,n);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Ap(e,t,r){if(e==null)return e;var o=[],n=0;return Dp(e,o,"","",function(a){return t.call(r,a,n++)}),o}function SU(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var br={current:null},Np={transition:null},bU={ReactCurrentDispatcher:br,ReactCurrentBatchConfig:Np,ReactCurrentOwner:Ay};function RL(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:Ap,forEach:function(e,t,r){Ap(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ap(e,function(){t++}),t},toArray:function(e){return Ap(e,function(t){return t})||[]},only:function(e){if(!Dy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=xl;Re.Fragment=cU;Re.Profiler=fU;Re.PureComponent=My;Re.StrictMode=dU;Re.Suspense=hU;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bU;Re.act=RL;Re.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=yL({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Ay.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)CL.call(t,l)&&!SL.hasOwnProperty(l)&&(o[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}return{$$typeof:Tc,type:e.type,key:n,ref:a,props:o,_owner:i}};Re.createContext=function(e){return e={$$typeof:mU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pU,_context:e},e.Consumer=e};Re.createElement=bL;Re.createFactory=function(e){var t=bL.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:gU,render:e}};Re.isValidElement=Dy;Re.lazy=function(e){return{$$typeof:yU,_payload:{_status:-1,_result:e},_init:SU}};Re.memo=function(e,t){return{$$typeof:vU,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=Np.transition;Np.transition={};try{e()}finally{Np.transition=t}};Re.unstable_act=RL;Re.useCallback=function(e,t){return br.current.useCallback(e,t)};Re.useContext=function(e){return br.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return br.current.useDeferredValue(e)};Re.useEffect=function(e,t){return br.current.useEffect(e,t)};Re.useId=function(){return br.current.useId()};Re.useImperativeHandle=function(e,t,r){return br.current.useImperativeHandle(e,t,r)};Re.useInsertionEffect=function(e,t){return br.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return br.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return br.current.useMemo(e,t)};Re.useReducer=function(e,t,r){return br.current.useReducer(e,t,r)};Re.useRef=function(e){return br.current.useRef(e)};Re.useState=function(e){return br.current.useState(e)};Re.useSyncExternalStore=function(e,t,r){return br.current.useSyncExternalStore(e,t,r)};Re.useTransition=function(){return br.current.useTransition()};Re.version="18.3.1"});var E=tr((iZ,IL)=>{"use strict";IL.exports=LL()});var TL=tr(_p=>{"use strict";var RU=E(),LU=Symbol.for("react.element"),IU=Symbol.for("react.fragment"),PU=Object.prototype.hasOwnProperty,TU=RU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kU={key:!0,ref:!0,__self:!0,__source:!0};function PL(e,t,r){var o,n={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)PU.call(t,o)&&!kU.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:LU,type:e,key:a,ref:i,props:n,_owner:TU.current}}_p.Fragment=IU;_p.jsx=PL;_p.jsxs=PL});var M=tr((lZ,kL)=>{"use strict";kL.exports=TL()});var jL=tr(Ge=>{"use strict";function Vy(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<Vp(n,t))e[o]=t,e[r]=n,r=o;else break e}}function $o(e){return e.length===0?null:e[0]}function Hp(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,n=e.length,a=n>>>1;o<a;){var i=2*(o+1)-1,s=e[i],l=i+1,u=e[l];if(0>Vp(s,r))l<n&&0>Vp(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>Vp(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function Vp(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(OL=performance,Ge.unstable_now=function(){return OL.now()}):(_y=Date,FL=_y.now(),Ge.unstable_now=function(){return _y.now()-FL});var OL,_y,FL,kn=[],ja=[],HU=1,So=null,rr=3,Up=!1,as=!1,Mc=!1,HL=typeof setTimeout=="function"?setTimeout:null,UL=typeof clearTimeout=="function"?clearTimeout:null,VL=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function By(e){for(var t=$o(ja);t!==null;){if(t.callback===null)Hp(ja);else if(t.startTime<=e)Hp(ja),t.sortIndex=t.expirationTime,Vy(kn,t);else break;t=$o(ja)}}function Hy(e){if(Mc=!1,By(e),!as)if($o(kn)!==null)as=!0,zy(Uy);else{var t=$o(ja);t!==null&&Wy(Hy,t.startTime-e)}}function Uy(e,t){as=!1,Mc&&(Mc=!1,UL(Ec),Ec=-1),Up=!0;var r=rr;try{for(By(t),So=$o(kn);So!==null&&(!(So.expirationTime>t)||e&&!GL());){var o=So.callback;if(typeof o=="function"){So.callback=null,rr=So.priorityLevel;var n=o(So.expirationTime<=t);t=Ge.unstable_now(),typeof n=="function"?So.callback=n:So===$o(kn)&&Hp(kn),By(t)}else Hp(kn);So=$o(kn)}if(So!==null)var a=!0;else{var i=$o(ja);i!==null&&Wy(Hy,i.startTime-t),a=!1}return a}finally{So=null,rr=r,Up=!1}}var zp=!1,Bp=null,Ec=-1,zL=5,WL=-1;function GL(){return!(Ge.unstable_now()-WL<zL)}function Oy(){if(Bp!==null){var e=Ge.unstable_now();WL=e;var t=!0;try{t=Bp(!0,e)}finally{t?kc():(zp=!1,Bp=null)}}else zp=!1}var kc;typeof VL=="function"?kc=function(){VL(Oy)}:typeof MessageChannel<"u"?(Fy=new MessageChannel,BL=Fy.port2,Fy.port1.onmessage=Oy,kc=function(){BL.postMessage(null)}):kc=function(){HL(Oy,0)};var Fy,BL;function zy(e){Bp=e,zp||(zp=!0,kc())}function Wy(e,t){Ec=HL(function(){e(Ge.unstable_now())},t)}Ge.unstable_IdlePriority=5;Ge.unstable_ImmediatePriority=1;Ge.unstable_LowPriority=4;Ge.unstable_NormalPriority=3;Ge.unstable_Profiling=null;Ge.unstable_UserBlockingPriority=2;Ge.unstable_cancelCallback=function(e){e.callback=null};Ge.unstable_continueExecution=function(){as||Up||(as=!0,zy(Uy))};Ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):zL=0<e?Math.floor(1e3/e):5};Ge.unstable_getCurrentPriorityLevel=function(){return rr};Ge.unstable_getFirstCallbackNode=function(){return $o(kn)};Ge.unstable_next=function(e){switch(rr){case 1:case 2:case 3:var t=3;break;default:t=rr}var r=rr;rr=t;try{return e()}finally{rr=r}};Ge.unstable_pauseExecution=function(){};Ge.unstable_requestPaint=function(){};Ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=rr;rr=e;try{return t()}finally{rr=r}};Ge.unstable_scheduleCallback=function(e,t,r){var o=Ge.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?o+r:o):r=o,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=r+n,e={id:HU++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,Vy(ja,e),$o(kn)===null&&e===$o(ja)&&(Mc?(UL(Ec),Ec=-1):Mc=!0,Wy(Hy,r-o))):(e.sortIndex=n,Vy(kn,e),as||Up||(as=!0,zy(Uy))),e};Ge.unstable_shouldYield=GL;Ge.unstable_wrapCallback=function(e){var t=rr;return function(){var r=rr;rr=t;try{return e.apply(this,arguments)}finally{rr=r}}}});var $L=tr((TZ,qL)=>{"use strict";qL.exports=jL()});var Q1=tr(lo=>{"use strict";var UU=E(),io=$L();function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var eP=new Set,Jc={};function ys(e,t){Ul(e,t),Ul(e+"Capture",t)}function Ul(e,t){for(Jc[e]=t,e=0;e<t.length;e++)eP.add(t[e])}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fx=Object.prototype.hasOwnProperty,zU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,KL={},XL={};function WU(e){return fx.call(XL,e)?!0:fx.call(KL,e)?!1:zU.test(e)?XL[e]=!0:(KL[e]=!0,!1)}function GU(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jU(e,t,r,o){if(t===null||typeof t>"u"||GU(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ir(e,t,r,o,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var Xt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xt[e]=new Ir(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Xt[t]=new Ir(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xt[e]=new Ir(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xt[e]=new Ir(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Xt[e]=new Ir(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xt[e]=new Ir(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xt[e]=new Ir(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xt[e]=new Ir(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xt[e]=new Ir(e,5,!1,e.toLowerCase(),null,!1,!1)});var n0=/[\-:]([a-z])/g;function a0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n0,a0);Xt[t]=new Ir(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n0,a0);Xt[t]=new Ir(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n0,a0);Xt[t]=new Ir(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xt[e]=new Ir(e,1,!1,e.toLowerCase(),null,!1,!1)});Xt.xlinkHref=new Ir("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xt[e]=new Ir(e,1,!1,e.toLowerCase(),null,!0,!0)});function i0(e,t,r,o){var n=Xt.hasOwnProperty(t)?Xt[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jU(t,r,n,o)&&(r=null),o||n===null?WU(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,o=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var ca=UU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wp=Symbol.for("react.element"),bl=Symbol.for("react.portal"),Rl=Symbol.for("react.fragment"),s0=Symbol.for("react.strict_mode"),px=Symbol.for("react.profiler"),tP=Symbol.for("react.provider"),rP=Symbol.for("react.context"),l0=Symbol.for("react.forward_ref"),mx=Symbol.for("react.suspense"),gx=Symbol.for("react.suspense_list"),u0=Symbol.for("react.memo"),$a=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var oP=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var YL=Symbol.iterator;function Ac(e){return e===null||typeof e!="object"?null:(e=YL&&e[YL]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,Gy;function Hc(e){if(Gy===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Gy=t&&t[1]||""}return`
3
- `+Gy+e}var jy=!1;function qy(e,t){if(!e||jy)return"";jy=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var o=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){o=u}e.call(t.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var n=u.stack.split(`
4
- `),a=o.stack.split(`
5
- `),i=n.length-1,s=a.length-1;1<=i&&0<=s&&n[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(n[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||n[i]!==a[s]){var l=`
6
- `+n[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{jy=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Hc(e):""}function qU(e){switch(e.tag){case 5:return Hc(e.type);case 16:return Hc("Lazy");case 13:return Hc("Suspense");case 19:return Hc("SuspenseList");case 0:case 2:case 15:return e=qy(e.type,!1),e;case 11:return e=qy(e.type.render,!1),e;case 1:return e=qy(e.type,!0),e;default:return""}}function hx(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rl:return"Fragment";case bl:return"Portal";case px:return"Profiler";case s0:return"StrictMode";case mx:return"Suspense";case gx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rP:return(e.displayName||"Context")+".Consumer";case tP:return(e._context.displayName||"Context")+".Provider";case l0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case u0:return t=e.displayName||null,t!==null?t:hx(e.type)||"Memo";case $a:t=e._payload,e=e._init;try{return hx(e(t))}catch{}}return null}function $U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hx(t);case 8:return t===s0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function KU(e){var t=nP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){o=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gp(e){e._valueTracker||(e._valueTracker=KU(e))}function aP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=nP(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function ym(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vx(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function QL(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=si(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function iP(e,t){t=t.checked,t!=null&&i0(e,"checked",t,!1)}function yx(e,t){iP(e,t);var r=si(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xx(e,t.type,r):t.hasOwnProperty("defaultValue")&&xx(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ZL(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function xx(e,t,r){(t!=="number"||ym(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Uc=Array.isArray;function _l(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&o&&(e[r].defaultSelected=!0)}else{for(r=""+si(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,o&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function wx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function JL(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(W(92));if(Uc(r)){if(1<r.length)throw Error(W(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:si(r)}}function sP(e,t){var r=si(t.value),o=si(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function eI(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function lP(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Cx(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?lP(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var jp,uP=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(jp=jp||document.createElement("div"),jp.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=jp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ed(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Gc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},XU=["Webkit","ms","Moz","O"];Object.keys(Gc).forEach(function(e){XU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gc[t]=Gc[e]})});function cP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Gc.hasOwnProperty(e)&&Gc[e]?(""+t).trim():t+"px"}function dP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=cP(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var YU=pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sx(e,t){if(t){if(YU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function bx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rx=null;function c0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lx=null,Ol=null,Fl=null;function tI(e){if(e=yd(e)){if(typeof Lx!="function")throw Error(W(280));var t=e.stateNode;t&&(t=qm(t),Lx(e.stateNode,e.type,t))}}function fP(e){Ol?Fl?Fl.push(e):Fl=[e]:Ol=e}function pP(){if(Ol){var e=Ol,t=Fl;if(Fl=Ol=null,tI(e),t)for(e=0;e<t.length;e++)tI(t[e])}}function mP(e,t){return e(t)}function gP(){}var $y=!1;function hP(e,t,r){if($y)return e(t,r);$y=!0;try{return mP(e,t,r)}finally{$y=!1,(Ol!==null||Fl!==null)&&(gP(),pP())}}function td(e,t){var r=e.stateNode;if(r===null)return null;var o=qm(r);if(o===null)return null;r=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(W(231,t,typeof r));return r}var Ix=!1;if(ia)try{Cl={},Object.defineProperty(Cl,"passive",{get:function(){Ix=!0}}),window.addEventListener("test",Cl,Cl),window.removeEventListener("test",Cl,Cl)}catch{Ix=!1}var Cl;function QU(e,t,r,o,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var jc=!1,xm=null,wm=!1,Px=null,ZU={onError:function(e){jc=!0,xm=e}};function JU(e,t,r,o,n,a,i,s,l){jc=!1,xm=null,QU.apply(ZU,arguments)}function e4(e,t,r,o,n,a,i,s,l){if(JU.apply(this,arguments),jc){if(jc){var u=xm;jc=!1,xm=null}else throw Error(W(198));wm||(wm=!0,Px=u)}}function xs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function vP(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function rI(e){if(xs(e)!==e)throw Error(W(188))}function t4(e){var t=e.alternate;if(!t){if(t=xs(e),t===null)throw Error(W(188));return t!==e?null:e}for(var r=e,o=t;;){var n=r.return;if(n===null)break;var a=n.alternate;if(a===null){if(o=n.return,o!==null){r=o;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===r)return rI(n),e;if(a===o)return rI(n),t;a=a.sibling}throw Error(W(188))}if(r.return!==o.return)r=n,o=a;else{for(var i=!1,s=n.child;s;){if(s===r){i=!0,r=n,o=a;break}if(s===o){i=!0,o=n,r=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===r){i=!0,r=a,o=n;break}if(s===o){i=!0,o=a,r=n;break}s=s.sibling}if(!i)throw Error(W(189))}}if(r.alternate!==o)throw Error(W(190))}if(r.tag!==3)throw Error(W(188));return r.stateNode.current===r?e:t}function yP(e){return e=t4(e),e!==null?xP(e):null}function xP(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xP(e);if(t!==null)return t;e=e.sibling}return null}var wP=io.unstable_scheduleCallback,oI=io.unstable_cancelCallback,r4=io.unstable_shouldYield,o4=io.unstable_requestPaint,Ct=io.unstable_now,n4=io.unstable_getCurrentPriorityLevel,d0=io.unstable_ImmediatePriority,CP=io.unstable_UserBlockingPriority,Cm=io.unstable_NormalPriority,a4=io.unstable_LowPriority,SP=io.unstable_IdlePriority,zm=null,Dn=null;function i4(e){if(Dn&&typeof Dn.onCommitFiberRoot=="function")try{Dn.onCommitFiberRoot(zm,e,void 0,(e.current.flags&128)===128)}catch{}}var Zo=Math.clz32?Math.clz32:u4,s4=Math.log,l4=Math.LN2;function u4(e){return e>>>=0,e===0?32:31-(s4(e)/l4|0)|0}var qp=64,$p=4194304;function zc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sm(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~n;s!==0?o=zc(s):(a&=i,a!==0&&(o=zc(a)))}else i=r&~n,i!==0?o=zc(i):a!==0&&(o=zc(a));if(o===0)return 0;if(t!==0&&t!==o&&!(t&n)&&(n=o&-o,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(o&4&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-Zo(t),n=1<<r,o|=e[r],t&=~n;return o}function c4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function d4(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-Zo(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=c4(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function Tx(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bP(){var e=qp;return qp<<=1,!(qp&4194240)&&(qp=64),e}function Ky(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function hd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zo(t),e[t]=r}function f4(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-Zo(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function f0(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-Zo(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var Oe=0;function RP(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var LP,p0,IP,PP,TP,kx=!1,Kp=[],Ja=null,ei=null,ti=null,rd=new Map,od=new Map,Xa=[],p4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function nI(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":rd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":od.delete(t.pointerId)}}function Dc(e,t,r,o,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:a,targetContainers:[n]},t!==null&&(t=yd(t),t!==null&&p0(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function m4(e,t,r,o,n){switch(t){case"focusin":return Ja=Dc(Ja,e,t,r,o,n),!0;case"dragenter":return ei=Dc(ei,e,t,r,o,n),!0;case"mouseover":return ti=Dc(ti,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return rd.set(a,Dc(rd.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,od.set(a,Dc(od.get(a)||null,e,t,r,o,n)),!0}return!1}function kP(e){var t=ls(e.target);if(t!==null){var r=xs(t);if(r!==null){if(t=r.tag,t===13){if(t=vP(r),t!==null){e.blockedOn=t,TP(e.priority,function(){IP(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function lm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Mx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Rx=o,r.target.dispatchEvent(o),Rx=null}else return t=yd(r),t!==null&&p0(t),e.blockedOn=r,!1;t.shift()}return!0}function aI(e,t,r){lm(e)&&r.delete(t)}function g4(){kx=!1,Ja!==null&&lm(Ja)&&(Ja=null),ei!==null&&lm(ei)&&(ei=null),ti!==null&&lm(ti)&&(ti=null),rd.forEach(aI),od.forEach(aI)}function Nc(e,t){e.blockedOn===t&&(e.blockedOn=null,kx||(kx=!0,io.unstable_scheduleCallback(io.unstable_NormalPriority,g4)))}function nd(e){function t(n){return Nc(n,e)}if(0<Kp.length){Nc(Kp[0],e);for(var r=1;r<Kp.length;r++){var o=Kp[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Ja!==null&&Nc(Ja,e),ei!==null&&Nc(ei,e),ti!==null&&Nc(ti,e),rd.forEach(t),od.forEach(t),r=0;r<Xa.length;r++)o=Xa[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Xa.length&&(r=Xa[0],r.blockedOn===null);)kP(r),r.blockedOn===null&&Xa.shift()}var Vl=ca.ReactCurrentBatchConfig,bm=!0;function h4(e,t,r,o){var n=Oe,a=Vl.transition;Vl.transition=null;try{Oe=1,m0(e,t,r,o)}finally{Oe=n,Vl.transition=a}}function v4(e,t,r,o){var n=Oe,a=Vl.transition;Vl.transition=null;try{Oe=4,m0(e,t,r,o)}finally{Oe=n,Vl.transition=a}}function m0(e,t,r,o){if(bm){var n=Mx(e,t,r,o);if(n===null)tx(e,t,o,Rm,r),nI(e,o);else if(m4(n,e,t,r,o))o.stopPropagation();else if(nI(e,o),t&4&&-1<p4.indexOf(e)){for(;n!==null;){var a=yd(n);if(a!==null&&LP(a),a=Mx(e,t,r,o),a===null&&tx(e,t,o,Rm,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else tx(e,t,o,null,r)}}var Rm=null;function Mx(e,t,r,o){if(Rm=null,e=c0(o),e=ls(e),e!==null)if(t=xs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=vP(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Rm=e,null}function MP(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(n4()){case d0:return 1;case CP:return 4;case Cm:case a4:return 16;case SP:return 536870912;default:return 16}default:return 16}}var Qa=null,g0=null,um=null;function EP(){if(um)return um;var e,t=g0,r=t.length,o,n="value"in Qa?Qa.value:Qa.textContent,a=n.length;for(e=0;e<r&&t[e]===n[e];e++);var i=r-e;for(o=1;o<=i&&t[r-o]===n[a-o];o++);return um=n.slice(e,1<o?1-o:void 0)}function cm(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Xp(){return!0}function iI(){return!1}function so(e){function t(r,o,n,a,i){this._reactName=r,this._targetInst=n,this.type=o,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Xp:iI,this.isPropagationStopped=iI,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Xp)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xp)},persist:function(){},isPersistent:Xp}),t}var Kl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},h0=so(Kl),vd=pt({},Kl,{view:0,detail:0}),y4=so(vd),Xy,Yy,_c,Wm=pt({},vd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:v0,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_c&&(_c&&e.type==="mousemove"?(Xy=e.screenX-_c.screenX,Yy=e.screenY-_c.screenY):Yy=Xy=0,_c=e),Xy)},movementY:function(e){return"movementY"in e?e.movementY:Yy}}),sI=so(Wm),x4=pt({},Wm,{dataTransfer:0}),w4=so(x4),C4=pt({},vd,{relatedTarget:0}),Qy=so(C4),S4=pt({},Kl,{animationName:0,elapsedTime:0,pseudoElement:0}),b4=so(S4),R4=pt({},Kl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),L4=so(R4),I4=pt({},Kl,{data:0}),lI=so(I4),P4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},k4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=k4[e])?!!t[e]:!1}function v0(){return M4}var E4=pt({},vd,{key:function(e){if(e.key){var t=P4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?T4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:v0,charCode:function(e){return e.type==="keypress"?cm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),A4=so(E4),D4=pt({},Wm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uI=so(D4),N4=pt({},vd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:v0}),_4=so(N4),O4=pt({},Kl,{propertyName:0,elapsedTime:0,pseudoElement:0}),F4=so(O4),V4=pt({},Wm,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),B4=so(V4),H4=[9,13,27,32],y0=ia&&"CompositionEvent"in window,qc=null;ia&&"documentMode"in document&&(qc=document.documentMode);var U4=ia&&"TextEvent"in window&&!qc,AP=ia&&(!y0||qc&&8<qc&&11>=qc),cI=String.fromCharCode(32),dI=!1;function DP(e,t){switch(e){case"keyup":return H4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ll=!1;function z4(e,t){switch(e){case"compositionend":return NP(t);case"keypress":return t.which!==32?null:(dI=!0,cI);case"textInput":return e=t.data,e===cI&&dI?null:e;default:return null}}function W4(e,t){if(Ll)return e==="compositionend"||!y0&&DP(e,t)?(e=EP(),um=g0=Qa=null,Ll=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return AP&&t.locale!=="ko"?null:t.data;default:return null}}var G4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G4[e.type]:t==="textarea"}function _P(e,t,r,o){fP(o),t=Lm(t,"onChange"),0<t.length&&(r=new h0("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var $c=null,ad=null;function j4(e){qP(e,0)}function Gm(e){var t=Tl(e);if(aP(t))return e}function q4(e,t){if(e==="change")return t}var OP=!1;ia&&(ia?(Qp="oninput"in document,Qp||(Zy=document.createElement("div"),Zy.setAttribute("oninput","return;"),Qp=typeof Zy.oninput=="function"),Yp=Qp):Yp=!1,OP=Yp&&(!document.documentMode||9<document.documentMode));var Yp,Qp,Zy;function pI(){$c&&($c.detachEvent("onpropertychange",FP),ad=$c=null)}function FP(e){if(e.propertyName==="value"&&Gm(ad)){var t=[];_P(t,ad,e,c0(e)),hP(j4,t)}}function $4(e,t,r){e==="focusin"?(pI(),$c=t,ad=r,$c.attachEvent("onpropertychange",FP)):e==="focusout"&&pI()}function K4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gm(ad)}function X4(e,t){if(e==="click")return Gm(t)}function Y4(e,t){if(e==="input"||e==="change")return Gm(t)}function Q4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:Q4;function id(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var n=r[o];if(!fx.call(t,n)||!en(e[n],t[n]))return!1}return!0}function mI(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gI(e,t){var r=mI(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mI(r)}}function VP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function BP(){for(var e=window,t=ym();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ym(e.document)}return t}function x0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Z4(e){var t=BP(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&VP(r.ownerDocument.documentElement,r)){if(o!==null&&x0(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,a=Math.min(o.start,n);o=o.end===void 0?a:Math.min(o.end,n),!e.extend&&a>o&&(n=o,o=a,a=n),n=gI(r,a);var i=gI(r,o);n&&i&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),a>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var J4=ia&&"documentMode"in document&&11>=document.documentMode,Il=null,Ex=null,Kc=null,Ax=!1;function hI(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ax||Il==null||Il!==ym(o)||(o=Il,"selectionStart"in o&&x0(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Kc&&id(Kc,o)||(Kc=o,o=Lm(Ex,"onSelect"),0<o.length&&(t=new h0("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Il)))}function Zp(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Pl={animationend:Zp("Animation","AnimationEnd"),animationiteration:Zp("Animation","AnimationIteration"),animationstart:Zp("Animation","AnimationStart"),transitionend:Zp("Transition","TransitionEnd")},Jy={},HP={};ia&&(HP=document.createElement("div").style,"AnimationEvent"in window||(delete Pl.animationend.animation,delete Pl.animationiteration.animation,delete Pl.animationstart.animation),"TransitionEvent"in window||delete Pl.transitionend.transition);function jm(e){if(Jy[e])return Jy[e];if(!Pl[e])return e;var t=Pl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in HP)return Jy[e]=t[r];return e}var UP=jm("animationend"),zP=jm("animationiteration"),WP=jm("animationstart"),GP=jm("transitionend"),jP=new Map,vI="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ui(e,t){jP.set(e,t),ys(t,[e])}for(Jp=0;Jp<vI.length;Jp++)em=vI[Jp],yI=em.toLowerCase(),xI=em[0].toUpperCase()+em.slice(1),ui(yI,"on"+xI);var em,yI,xI,Jp;ui(UP,"onAnimationEnd");ui(zP,"onAnimationIteration");ui(WP,"onAnimationStart");ui("dblclick","onDoubleClick");ui("focusin","onFocus");ui("focusout","onBlur");ui(GP,"onTransitionEnd");Ul("onMouseEnter",["mouseout","mouseover"]);Ul("onMouseLeave",["mouseout","mouseover"]);Ul("onPointerEnter",["pointerout","pointerover"]);Ul("onPointerLeave",["pointerout","pointerover"]);ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ys("onBeforeInput",["compositionend","keypress","textInput","paste"]);ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ez=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wc));function wI(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,e4(o,t,void 0,e),e.currentTarget=null}function qP(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],n=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var i=o.length-1;0<=i;i--){var s=o[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;wI(n,s,u),a=l}else for(i=0;i<o.length;i++){if(s=o[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;wI(n,s,u),a=l}}}if(wm)throw e=Px,wm=!1,Px=null,e}function Qe(e,t){var r=t[Fx];r===void 0&&(r=t[Fx]=new Set);var o=e+"__bubble";r.has(o)||($P(t,e,2,!1),r.add(o))}function ex(e,t,r){var o=0;t&&(o|=4),$P(r,e,o,t)}var tm="_reactListening"+Math.random().toString(36).slice(2);function sd(e){if(!e[tm]){e[tm]=!0,eP.forEach(function(r){r!=="selectionchange"&&(ez.has(r)||ex(r,!1,e),ex(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tm]||(t[tm]=!0,ex("selectionchange",!1,t))}}function $P(e,t,r,o){switch(MP(t)){case 1:var n=h4;break;case 4:n=v4;break;default:n=m0}r=n.bind(null,t,r,e),n=void 0,!Ix||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),o?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function tx(e,t,r,o,n){var a=o;if(!(t&1)&&!(t&2)&&o!==null)e:for(;;){if(o===null)return;var i=o.tag;if(i===3||i===4){var s=o.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=o.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;i=i.return}for(;s!==null;){if(i=ls(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}hP(function(){var u=a,c=c0(r),d=[];e:{var f=jP.get(e);if(f!==void 0){var p=h0,h=e;switch(e){case"keypress":if(cm(r)===0)break e;case"keydown":case"keyup":p=A4;break;case"focusin":h="focus",p=Qy;break;case"focusout":h="blur",p=Qy;break;case"beforeblur":case"afterblur":p=Qy;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=sI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=w4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=_4;break;case UP:case zP:case WP:p=b4;break;case GP:p=F4;break;case"scroll":p=y4;break;case"wheel":p=B4;break;case"copy":case"cut":case"paste":p=L4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=uI}var m=(t&4)!==0,x=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,y;g!==null;){y=g;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,v!==null&&(w=td(g,v),w!=null&&m.push(ld(g,w,y)))),x)break;g=g.return}0<m.length&&(f=new p(f,h,null,r,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==Rx&&(h=r.relatedTarget||r.fromElement)&&(ls(h)||h[sa]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=r.relatedTarget||r.toElement,p=u,h=h?ls(h):null,h!==null&&(x=xs(h),h!==x||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(m=sI,w="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=uI,w="onPointerLeave",v="onPointerEnter",g="pointer"),x=p==null?f:Tl(p),y=h==null?f:Tl(h),f=new m(w,g+"leave",p,r,c),f.target=x,f.relatedTarget=y,w=null,ls(c)===u&&(m=new m(v,g+"enter",h,r,c),m.target=y,m.relatedTarget=x,w=m),x=w,p&&h)t:{for(m=p,v=h,g=0,y=m;y;y=Sl(y))g++;for(y=0,w=v;w;w=Sl(w))y++;for(;0<g-y;)m=Sl(m),g--;for(;0<y-g;)v=Sl(v),y--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Sl(m),v=Sl(v)}m=null}else m=null;p!==null&&CI(d,f,p,m,!1),h!==null&&x!==null&&CI(d,x,h,m,!0)}}e:{if(f=u?Tl(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=q4;else if(fI(f))if(OP)C=Y4;else{C=K4;var R=$4}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=X4);if(C&&(C=C(e,u))){_P(d,C,r,c);break e}R&&R(e,f,u),e==="focusout"&&(R=f._wrapperState)&&R.controlled&&f.type==="number"&&xx(f,"number",f.value)}switch(R=u?Tl(u):window,e){case"focusin":(fI(R)||R.contentEditable==="true")&&(Il=R,Ex=u,Kc=null);break;case"focusout":Kc=Ex=Il=null;break;case"mousedown":Ax=!0;break;case"contextmenu":case"mouseup":case"dragend":Ax=!1,hI(d,r,c);break;case"selectionchange":if(J4)break;case"keydown":case"keyup":hI(d,r,c)}var S;if(y0)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else Ll?DP(e,r)&&(L="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(L="onCompositionStart");L&&(AP&&r.locale!=="ko"&&(Ll||L!=="onCompositionStart"?L==="onCompositionEnd"&&Ll&&(S=EP()):(Qa=c,g0="value"in Qa?Qa.value:Qa.textContent,Ll=!0)),R=Lm(u,L),0<R.length&&(L=new lI(L,e,null,r,c),d.push({event:L,listeners:R}),S?L.data=S:(S=NP(r),S!==null&&(L.data=S)))),(S=U4?z4(e,r):W4(e,r))&&(u=Lm(u,"onBeforeInput"),0<u.length&&(c=new lI("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}qP(d,t)})}function ld(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Lm(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=td(e,r),a!=null&&o.unshift(ld(e,a,n)),a=td(e,t),a!=null&&o.push(ld(e,a,n))),e=e.return}return o}function Sl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function CI(e,t,r,o,n){for(var a=t._reactName,i=[];r!==null&&r!==o;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===o)break;s.tag===5&&u!==null&&(s=u,n?(l=td(r,a),l!=null&&i.unshift(ld(r,l,s))):n||(l=td(r,a),l!=null&&i.push(ld(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var tz=/\r\n?/g,rz=/\u0000|\uFFFD/g;function SI(e){return(typeof e=="string"?e:""+e).replace(tz,`
7
- `).replace(rz,"")}function rm(e,t,r){if(t=SI(t),SI(e)!==t&&r)throw Error(W(425))}function Im(){}var Dx=null,Nx=null;function _x(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ox=typeof setTimeout=="function"?setTimeout:void 0,oz=typeof clearTimeout=="function"?clearTimeout:void 0,bI=typeof Promise=="function"?Promise:void 0,nz=typeof queueMicrotask=="function"?queueMicrotask:typeof bI<"u"?function(e){return bI.resolve(null).then(e).catch(az)}:Ox;function az(e){setTimeout(function(){throw e})}function rx(e,t){var r=t,o=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(o===0){e.removeChild(n),nd(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);nd(t)}function ri(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function RI(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Xl=Math.random().toString(36).slice(2),An="__reactFiber$"+Xl,ud="__reactProps$"+Xl,sa="__reactContainer$"+Xl,Fx="__reactEvents$"+Xl,iz="__reactListeners$"+Xl,sz="__reactHandles$"+Xl;function ls(e){var t=e[An];if(t)return t;for(var r=e.parentNode;r;){if(t=r[sa]||r[An]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=RI(e);e!==null;){if(r=e[An])return r;e=RI(e)}return t}e=r,r=e.parentNode}return null}function yd(e){return e=e[An]||e[sa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Tl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function qm(e){return e[ud]||null}var Vx=[],kl=-1;function ci(e){return{current:e}}function Ze(e){0>kl||(e.current=Vx[kl],Vx[kl]=null,kl--)}function je(e,t){kl++,Vx[kl]=e.current,e.current=t}var li={},ir=ci(li),Hr=ci(!1),ps=li;function zl(e,t){var r=e.type.contextTypes;if(!r)return li;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in r)n[a]=t[a];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Ur(e){return e=e.childContextTypes,e!=null}function Pm(){Ze(Hr),Ze(ir)}function LI(e,t,r){if(ir.current!==li)throw Error(W(168));je(ir,t),je(Hr,r)}function KP(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error(W(108,$U(e)||"Unknown",n));return pt({},r,o)}function Tm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,ps=ir.current,je(ir,e),je(Hr,Hr.current),!0}function II(e,t,r){var o=e.stateNode;if(!o)throw Error(W(169));r?(e=KP(e,t,ps),o.__reactInternalMemoizedMergedChildContext=e,Ze(Hr),Ze(ir),je(ir,e)):Ze(Hr),je(Hr,r)}var ra=null,$m=!1,ox=!1;function XP(e){ra===null?ra=[e]:ra.push(e)}function lz(e){$m=!0,XP(e)}function di(){if(!ox&&ra!==null){ox=!0;var e=0,t=Oe;try{var r=ra;for(Oe=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}ra=null,$m=!1}catch(n){throw ra!==null&&(ra=ra.slice(e+1)),wP(d0,di),n}finally{Oe=t,ox=!1}}return null}var Ml=[],El=0,km=null,Mm=0,bo=[],Ro=0,ms=null,oa=1,na="";function is(e,t){Ml[El++]=Mm,Ml[El++]=km,km=e,Mm=t}function YP(e,t,r){bo[Ro++]=oa,bo[Ro++]=na,bo[Ro++]=ms,ms=e;var o=oa;e=na;var n=32-Zo(o)-1;o&=~(1<<n),r+=1;var a=32-Zo(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,oa=1<<32-Zo(t)+n|r<<n|o,na=a+e}else oa=1<<a|r<<n|o,na=e}function w0(e){e.return!==null&&(is(e,1),YP(e,1,0))}function C0(e){for(;e===km;)km=Ml[--El],Ml[El]=null,Mm=Ml[--El],Ml[El]=null;for(;e===ms;)ms=bo[--Ro],bo[Ro]=null,na=bo[--Ro],bo[Ro]=null,oa=bo[--Ro],bo[Ro]=null}var ao=null,no=null,at=!1,Qo=null;function QP(e,t){var r=Lo(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function PI(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ao=e,no=ri(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ao=e,no=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ms!==null?{id:oa,overflow:na}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Lo(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ao=e,no=null,!0):!1;default:return!1}}function Bx(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hx(e){if(at){var t=no;if(t){var r=t;if(!PI(e,t)){if(Bx(e))throw Error(W(418));t=ri(r.nextSibling);var o=ao;t&&PI(e,t)?QP(o,r):(e.flags=e.flags&-4097|2,at=!1,ao=e)}}else{if(Bx(e))throw Error(W(418));e.flags=e.flags&-4097|2,at=!1,ao=e}}}function TI(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ao=e}function om(e){if(e!==ao)return!1;if(!at)return TI(e),at=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_x(e.type,e.memoizedProps)),t&&(t=no)){if(Bx(e))throw ZP(),Error(W(418));for(;t;)QP(e,t),t=ri(t.nextSibling)}if(TI(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){no=ri(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}no=null}}else no=ao?ri(e.stateNode.nextSibling):null;return!0}function ZP(){for(var e=no;e;)e=ri(e.nextSibling)}function Wl(){no=ao=null,at=!1}function S0(e){Qo===null?Qo=[e]:Qo.push(e)}var uz=ca.ReactCurrentBatchConfig;function Oc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(W(309));var o=r.stateNode}if(!o)throw Error(W(147,e));var n=o,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=n.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(W(284));if(!r._owner)throw Error(W(290,e))}return e}function nm(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kI(e){var t=e._init;return t(e._payload)}function JP(e){function t(v,g){if(e){var y=v.deletions;y===null?(v.deletions=[g],v.flags|=16):y.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function o(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function n(v,g){return v=ii(v,g),v.index=0,v.sibling=null,v}function a(v,g,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<g?(v.flags|=2,g):y):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,g,y,w){return g===null||g.tag!==6?(g=cx(y,v.mode,w),g.return=v,g):(g=n(g,y),g.return=v,g)}function l(v,g,y,w){var C=y.type;return C===Rl?c(v,g,y.props.children,w,y.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$a&&kI(C)===g.type)?(w=n(g,y.props),w.ref=Oc(v,g,y),w.return=v,w):(w=vm(y.type,y.key,y.props,null,v.mode,w),w.ref=Oc(v,g,y),w.return=v,w)}function u(v,g,y,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=dx(y,v.mode,w),g.return=v,g):(g=n(g,y.children||[]),g.return=v,g)}function c(v,g,y,w,C){return g===null||g.tag!==7?(g=fs(y,v.mode,w,C),g.return=v,g):(g=n(g,y),g.return=v,g)}function d(v,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=cx(""+g,v.mode,y),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Wp:return y=vm(g.type,g.key,g.props,null,v.mode,y),y.ref=Oc(v,null,g),y.return=v,y;case bl:return g=dx(g,v.mode,y),g.return=v,g;case $a:var w=g._init;return d(v,w(g._payload),y)}if(Uc(g)||Ac(g))return g=fs(g,v.mode,y,null),g.return=v,g;nm(v,g)}return null}function f(v,g,y,w){var C=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:s(v,g,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Wp:return y.key===C?l(v,g,y,w):null;case bl:return y.key===C?u(v,g,y,w):null;case $a:return C=y._init,f(v,g,C(y._payload),w)}if(Uc(y)||Ac(y))return C!==null?null:c(v,g,y,w,null);nm(v,y)}return null}function p(v,g,y,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(y)||null,s(g,v,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Wp:return v=v.get(w.key===null?y:w.key)||null,l(g,v,w,C);case bl:return v=v.get(w.key===null?y:w.key)||null,u(g,v,w,C);case $a:var R=w._init;return p(v,g,y,R(w._payload),C)}if(Uc(w)||Ac(w))return v=v.get(y)||null,c(g,v,w,C,null);nm(g,w)}return null}function h(v,g,y,w){for(var C=null,R=null,S=g,L=g=0,T=null;S!==null&&L<y.length;L++){S.index>L?(T=S,S=null):T=S.sibling;var P=f(v,S,y[L],w);if(P===null){S===null&&(S=T);break}e&&S&&P.alternate===null&&t(v,S),g=a(P,g,L),R===null?C=P:R.sibling=P,R=P,S=T}if(L===y.length)return r(v,S),at&&is(v,L),C;if(S===null){for(;L<y.length;L++)S=d(v,y[L],w),S!==null&&(g=a(S,g,L),R===null?C=S:R.sibling=S,R=S);return at&&is(v,L),C}for(S=o(v,S);L<y.length;L++)T=p(S,v,L,y[L],w),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?L:T.key),g=a(T,g,L),R===null?C=T:R.sibling=T,R=T);return e&&S.forEach(function(N){return t(v,N)}),at&&is(v,L),C}function m(v,g,y,w){var C=Ac(y);if(typeof C!="function")throw Error(W(150));if(y=C.call(y),y==null)throw Error(W(151));for(var R=C=null,S=g,L=g=0,T=null,P=y.next();S!==null&&!P.done;L++,P=y.next()){S.index>L?(T=S,S=null):T=S.sibling;var N=f(v,S,P.value,w);if(N===null){S===null&&(S=T);break}e&&S&&N.alternate===null&&t(v,S),g=a(N,g,L),R===null?C=N:R.sibling=N,R=N,S=T}if(P.done)return r(v,S),at&&is(v,L),C;if(S===null){for(;!P.done;L++,P=y.next())P=d(v,P.value,w),P!==null&&(g=a(P,g,L),R===null?C=P:R.sibling=P,R=P);return at&&is(v,L),C}for(S=o(v,S);!P.done;L++,P=y.next())P=p(S,v,L,P.value,w),P!==null&&(e&&P.alternate!==null&&S.delete(P.key===null?L:P.key),g=a(P,g,L),R===null?C=P:R.sibling=P,R=P);return e&&S.forEach(function(F){return t(v,F)}),at&&is(v,L),C}function x(v,g,y,w){if(typeof y=="object"&&y!==null&&y.type===Rl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Wp:e:{for(var C=y.key,R=g;R!==null;){if(R.key===C){if(C=y.type,C===Rl){if(R.tag===7){r(v,R.sibling),g=n(R,y.props.children),g.return=v,v=g;break e}}else if(R.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$a&&kI(C)===R.type){r(v,R.sibling),g=n(R,y.props),g.ref=Oc(v,R,y),g.return=v,v=g;break e}r(v,R);break}else t(v,R);R=R.sibling}y.type===Rl?(g=fs(y.props.children,v.mode,w,y.key),g.return=v,v=g):(w=vm(y.type,y.key,y.props,null,v.mode,w),w.ref=Oc(v,g,y),w.return=v,v=w)}return i(v);case bl:e:{for(R=y.key;g!==null;){if(g.key===R)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(v,g.sibling),g=n(g,y.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=dx(y,v.mode,w),g.return=v,v=g}return i(v);case $a:return R=y._init,x(v,g,R(y._payload),w)}if(Uc(y))return h(v,g,y,w);if(Ac(y))return m(v,g,y,w);nm(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(v,g.sibling),g=n(g,y),g.return=v,v=g):(r(v,g),g=cx(y,v.mode,w),g.return=v,v=g),i(v)):r(v,g)}return x}var Gl=JP(!0),e1=JP(!1),Em=ci(null),Am=null,Al=null,b0=null;function R0(){b0=Al=Am=null}function L0(e){var t=Em.current;Ze(Em),e._currentValue=t}function Ux(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function Bl(e,t){Am=e,b0=Al=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Br=!0),e.firstContext=null)}function Po(e){var t=e._currentValue;if(b0!==e)if(e={context:e,memoizedValue:t,next:null},Al===null){if(Am===null)throw Error(W(308));Al=e,Am.dependencies={lanes:0,firstContext:e}}else Al=Al.next=e;return t}var us=null;function I0(e){us===null?us=[e]:us.push(e)}function t1(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,I0(t)):(r.next=n.next,n.next=r),t.interleaved=r,la(e,o)}function la(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ka=!1;function P0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function oi(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,Ie&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,la(e,r)}return n=o.interleaved,n===null?(t.next=t,I0(o)):(t.next=n.next,n.next=t),o.interleaved=t,la(e,r)}function dm(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,f0(e,r)}}function MI(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?n=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?n=a=t:a=a.next=t}else n=a=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Dm(e,t,r,o){var n=e.updateQueue;Ka=!1;var a=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=n.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((o&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=r,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=pt({},d,f);break e;case 2:Ka=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;f=s,s=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(1);if(c===null&&(l=d),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,t=n.shared.interleaved,t!==null){n=t;do i|=n.lane,n=n.next;while(n!==t)}else a===null&&(n.shared.lanes=0);hs|=i,e.lanes=i,e.memoizedState=d}}function EI(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],n=o.callback;if(n!==null){if(o.callback=null,o=r,typeof n!="function")throw Error(W(191,n));n.call(o)}}}var xd={},Nn=ci(xd),cd=ci(xd),dd=ci(xd);function cs(e){if(e===xd)throw Error(W(174));return e}function T0(e,t){switch(je(dd,t),je(cd,e),je(Nn,xd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cx(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cx(t,e)}Ze(Nn),je(Nn,t)}function jl(){Ze(Nn),Ze(cd),Ze(dd)}function o1(e){cs(dd.current);var t=cs(Nn.current),r=Cx(t,e.type);t!==r&&(je(cd,e),je(Nn,r))}function k0(e){cd.current===e&&(Ze(Nn),Ze(cd))}var dt=ci(0);function Nm(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nx=[];function M0(){for(var e=0;e<nx.length;e++)nx[e]._workInProgressVersionPrimary=null;nx.length=0}var fm=ca.ReactCurrentDispatcher,ax=ca.ReactCurrentBatchConfig,gs=0,ft=null,Mt=null,Bt=null,_m=!1,Xc=!1,fd=0,cz=0;function or(){throw Error(W(321))}function E0(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!en(e[r],t[r]))return!1;return!0}function A0(e,t,r,o,n,a){if(gs=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fm.current=e===null||e.memoizedState===null?mz:gz,e=r(o,n),Xc){a=0;do{if(Xc=!1,fd=0,25<=a)throw Error(W(301));a+=1,Bt=Mt=null,t.updateQueue=null,fm.current=hz,e=r(o,n)}while(Xc)}if(fm.current=Om,t=Mt!==null&&Mt.next!==null,gs=0,Bt=Mt=ft=null,_m=!1,t)throw Error(W(300));return e}function D0(){var e=fd!==0;return fd=0,e}function En(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?ft.memoizedState=Bt=e:Bt=Bt.next=e,Bt}function To(){if(Mt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Mt.next;var t=Bt===null?ft.memoizedState:Bt.next;if(t!==null)Bt=t,Mt=e;else{if(e===null)throw Error(W(310));Mt=e,e={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},Bt===null?ft.memoizedState=Bt=e:Bt=Bt.next=e}return Bt}function pd(e,t){return typeof t=="function"?t(e):t}function ix(e){var t=To(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var o=Mt,n=o.baseQueue,a=r.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}o.baseQueue=n=a,r.pending=null}if(n!==null){a=n.next,o=o.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((gs&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=o):l=l.next=d,ft.lanes|=c,hs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,en(o,t.memoizedState)||(Br=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}if(e=r.interleaved,e!==null){n=e;do a=n.lane,ft.lanes|=a,hs|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function sx(e){var t=To(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var o=r.dispatch,n=r.pending,a=t.memoizedState;if(n!==null){r.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);en(a,t.memoizedState)||(Br=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function n1(){}function a1(e,t){var r=ft,o=To(),n=t(),a=!en(o.memoizedState,n);if(a&&(o.memoizedState=n,Br=!0),o=o.queue,N0(l1.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||Bt!==null&&Bt.memoizedState.tag&1){if(r.flags|=2048,md(9,s1.bind(null,r,o,n,t),void 0,null),Ht===null)throw Error(W(349));gs&30||i1(r,t,n)}return n}function i1(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function s1(e,t,r,o){t.value=r,t.getSnapshot=o,u1(t)&&c1(e)}function l1(e,t,r){return r(function(){u1(t)&&c1(e)})}function u1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!en(e,r)}catch{return!0}}function c1(e){var t=la(e,1);t!==null&&Jo(t,e,1,-1)}function AI(e){var t=En();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pd,lastRenderedState:e},t.queue=e,e=e.dispatch=pz.bind(null,ft,e),[t.memoizedState,e]}function md(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function d1(){return To().memoizedState}function pm(e,t,r,o){var n=En();ft.flags|=e,n.memoizedState=md(1|t,r,void 0,o===void 0?null:o)}function Km(e,t,r,o){var n=To();o=o===void 0?null:o;var a=void 0;if(Mt!==null){var i=Mt.memoizedState;if(a=i.destroy,o!==null&&E0(o,i.deps)){n.memoizedState=md(t,r,a,o);return}}ft.flags|=e,n.memoizedState=md(1|t,r,a,o)}function DI(e,t){return pm(8390656,8,e,t)}function N0(e,t){return Km(2048,8,e,t)}function f1(e,t){return Km(4,2,e,t)}function p1(e,t){return Km(4,4,e,t)}function m1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function g1(e,t,r){return r=r!=null?r.concat([e]):null,Km(4,4,m1.bind(null,t,e),r)}function _0(){}function h1(e,t){var r=To();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&E0(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function v1(e,t){var r=To();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&E0(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function y1(e,t,r){return gs&21?(en(r,t)||(r=bP(),ft.lanes|=r,hs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Br=!0),e.memoizedState=r)}function dz(e,t){var r=Oe;Oe=r!==0&&4>r?r:4,e(!0);var o=ax.transition;ax.transition={};try{e(!1),t()}finally{Oe=r,ax.transition=o}}function x1(){return To().memoizedState}function fz(e,t,r){var o=ai(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},w1(e))C1(t,r);else if(r=t1(e,t,r,o),r!==null){var n=Lr();Jo(r,e,o,n),S1(r,t,o)}}function pz(e,t,r){var o=ai(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(w1(e))C1(t,n);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,r);if(n.hasEagerState=!0,n.eagerState=s,en(s,i)){var l=t.interleaved;l===null?(n.next=n,I0(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=t1(e,t,n,o),r!==null&&(n=Lr(),Jo(r,e,o,n),S1(r,t,o))}}function w1(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function C1(e,t){Xc=_m=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function S1(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,f0(e,r)}}var Om={readContext:Po,useCallback:or,useContext:or,useEffect:or,useImperativeHandle:or,useInsertionEffect:or,useLayoutEffect:or,useMemo:or,useReducer:or,useRef:or,useState:or,useDebugValue:or,useDeferredValue:or,useTransition:or,useMutableSource:or,useSyncExternalStore:or,useId:or,unstable_isNewReconciler:!1},mz={readContext:Po,useCallback:function(e,t){return En().memoizedState=[e,t===void 0?null:t],e},useContext:Po,useEffect:DI,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,pm(4194308,4,m1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return pm(4194308,4,e,t)},useInsertionEffect:function(e,t){return pm(4,2,e,t)},useMemo:function(e,t){var r=En();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=En();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=fz.bind(null,ft,e),[o.memoizedState,e]},useRef:function(e){var t=En();return e={current:e},t.memoizedState=e},useState:AI,useDebugValue:_0,useDeferredValue:function(e){return En().memoizedState=e},useTransition:function(){var e=AI(!1),t=e[0];return e=dz.bind(null,e[1]),En().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=ft,n=En();if(at){if(r===void 0)throw Error(W(407));r=r()}else{if(r=t(),Ht===null)throw Error(W(349));gs&30||i1(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,DI(l1.bind(null,o,a,e),[e]),o.flags|=2048,md(9,s1.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=En(),t=Ht.identifierPrefix;if(at){var r=na,o=oa;r=(o&~(1<<32-Zo(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=fd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=cz++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gz={readContext:Po,useCallback:h1,useContext:Po,useEffect:N0,useImperativeHandle:g1,useInsertionEffect:f1,useLayoutEffect:p1,useMemo:v1,useReducer:ix,useRef:d1,useState:function(){return ix(pd)},useDebugValue:_0,useDeferredValue:function(e){var t=To();return y1(t,Mt.memoizedState,e)},useTransition:function(){var e=ix(pd)[0],t=To().memoizedState;return[e,t]},useMutableSource:n1,useSyncExternalStore:a1,useId:x1,unstable_isNewReconciler:!1},hz={readContext:Po,useCallback:h1,useContext:Po,useEffect:N0,useImperativeHandle:g1,useInsertionEffect:f1,useLayoutEffect:p1,useMemo:v1,useReducer:sx,useRef:d1,useState:function(){return sx(pd)},useDebugValue:_0,useDeferredValue:function(e){var t=To();return Mt===null?t.memoizedState=e:y1(t,Mt.memoizedState,e)},useTransition:function(){var e=sx(pd)[0],t=To().memoizedState;return[e,t]},useMutableSource:n1,useSyncExternalStore:a1,useId:x1,unstable_isNewReconciler:!1};function Xo(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function zx(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:pt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Xm={isMounted:function(e){return(e=e._reactInternals)?xs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Lr(),n=ai(e),a=aa(o,n);a.payload=t,r!=null&&(a.callback=r),t=oi(e,a,n),t!==null&&(Jo(t,e,n,o),dm(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Lr(),n=ai(e),a=aa(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=oi(e,a,n),t!==null&&(Jo(t,e,n,o),dm(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Lr(),o=ai(e),n=aa(r,o);n.tag=2,t!=null&&(n.callback=t),t=oi(e,n,o),t!==null&&(Jo(t,e,o,r),dm(t,e,o))}};function NI(e,t,r,o,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,i):t.prototype&&t.prototype.isPureReactComponent?!id(r,o)||!id(n,a):!0}function b1(e,t,r){var o=!1,n=li,a=t.contextType;return typeof a=="object"&&a!==null?a=Po(a):(n=Ur(t)?ps:ir.current,o=t.contextTypes,a=(o=o!=null)?zl(e,n):li),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xm,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function _I(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Xm.enqueueReplaceState(t,t.state,null)}function Wx(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},P0(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Po(a):(a=Ur(t)?ps:ir.current,n.context=zl(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(zx(e,t,a,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&Xm.enqueueReplaceState(n,n.state,null),Dm(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function ql(e,t){try{var r="",o=t;do r+=qU(o),o=o.return;while(o);var n=r}catch(a){n=`
8
- Error generating stack: `+a.message+`
9
- `+a.stack}return{value:e,source:t,stack:n,digest:null}}function lx(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Gx(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var vz=typeof WeakMap=="function"?WeakMap:Map;function R1(e,t,r){r=aa(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){Vm||(Vm=!0,e0=o),Gx(e,t)},r}function L1(e,t,r){r=aa(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var n=t.value;r.payload=function(){return o(n)},r.callback=function(){Gx(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Gx(e,t),typeof o!="function"&&(ni===null?ni=new Set([this]):ni.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function OI(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new vz;var n=new Set;o.set(t,n)}else n=o.get(t),n===void 0&&(n=new Set,o.set(t,n));n.has(r)||(n.add(r),e=Ez.bind(null,e,t,r),t.then(e,e))}function FI(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function VI(e,t,r,o,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=aa(-1,1),t.tag=2,oi(r,t,1))),r.lanes|=1),e)}var yz=ca.ReactCurrentOwner,Br=!1;function Rr(e,t,r,o){t.child=e===null?e1(t,null,r,o):Gl(t,e.child,r,o)}function BI(e,t,r,o,n){r=r.render;var a=t.ref;return Bl(t,n),o=A0(e,t,r,o,a,n),r=D0(),e!==null&&!Br?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,ua(e,t,n)):(at&&r&&w0(t),t.flags|=1,Rr(e,t,o,n),t.child)}function HI(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!W0(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,I1(e,t,a,o,n)):(e=vm(r.type,null,o,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&n)){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:id,r(i,o)&&e.ref===t.ref)return ua(e,t,n)}return t.flags|=1,e=ii(a,o),e.ref=t.ref,e.return=t,t.child=e}function I1(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(id(a,o)&&e.ref===t.ref)if(Br=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&(Br=!0);else return t.lanes=e.lanes,ua(e,t,n)}return jx(e,t,r,o,n)}function P1(e,t,r){var o=t.pendingProps,n=o.children,a=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(Nl,oo),oo|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(Nl,oo),oo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,je(Nl,oo),oo|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,je(Nl,oo),oo|=o;return Rr(e,t,n,r),t.child}function T1(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function jx(e,t,r,o,n){var a=Ur(r)?ps:ir.current;return a=zl(t,a),Bl(t,n),r=A0(e,t,r,o,a,n),o=D0(),e!==null&&!Br?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,ua(e,t,n)):(at&&o&&w0(t),t.flags|=1,Rr(e,t,r,n),t.child)}function UI(e,t,r,o,n){if(Ur(r)){var a=!0;Tm(t)}else a=!1;if(Bl(t,n),t.stateNode===null)mm(e,t),b1(t,r,o),Wx(t,r,o,n),o=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=Po(u):(u=Ur(r)?ps:ir.current,u=zl(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==o||l!==u)&&_I(t,i,o,u),Ka=!1;var f=t.memoizedState;i.state=f,Dm(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Hr.current||Ka?(typeof c=="function"&&(zx(t,r,c,o),l=t.memoizedState),(s=Ka||NI(t,r,s,o,f,l,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=l),i.props=o,i.state=l,i.context=u,o=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,r1(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Xo(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Po(l):(l=Ur(r)?ps:ir.current,l=zl(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&_I(t,i,o,l),Ka=!1,f=t.memoizedState,i.state=f,Dm(t,o,i,n);var h=t.memoizedState;s!==d||f!==h||Hr.current||Ka?(typeof p=="function"&&(zx(t,r,p,o),h=t.memoizedState),(u=Ka||NI(t,r,u,o,f,h,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,h,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,h,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),i.props=o,i.state=h,i.context=l,o=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return qx(e,t,r,o,a,n)}function qx(e,t,r,o,n,a){T1(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&II(t,r,!1),ua(e,t,a);o=t.stateNode,yz.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Gl(t,e.child,null,a),t.child=Gl(t,null,s,a)):Rr(e,t,s,a),t.memoizedState=o.state,n&&II(t,r,!0),t.child}function k1(e){var t=e.stateNode;t.pendingContext?LI(e,t.pendingContext,t.pendingContext!==t.context):t.context&&LI(e,t.context,!1),T0(e,t.containerInfo)}function zI(e,t,r,o,n){return Wl(),S0(n),t.flags|=256,Rr(e,t,r,o),t.child}var $x={dehydrated:null,treeContext:null,retryLane:0};function Kx(e){return{baseLanes:e,cachePool:null,transitions:null}}function M1(e,t,r){var o=t.pendingProps,n=dt.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(n&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),je(dt,n&1),e===null)return Hx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=o.children,e=o.fallback,a?(o=t.mode,a=t.child,i={mode:"hidden",children:i},!(o&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=Zm(i,o,0,null),e=fs(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Kx(r),t.memoizedState=$x,e):O0(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return xz(e,t,i,o,s,n,r);if(a){a=o.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:o.children};return!(i&1)&&t.child!==n?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=ii(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=ii(s,a):(a=fs(a,i,r,null),a.flags|=2),a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,i=e.child.memoizedState,i=i===null?Kx(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=$x,o}return a=e.child,e=a.sibling,o=ii(a,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function O0(e,t){return t=Zm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function am(e,t,r,o){return o!==null&&S0(o),Gl(t,e.child,null,r),e=O0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xz(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=lx(Error(W(422))),am(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=Zm({mode:"visible",children:o.children},n,0,null),a=fs(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&Gl(t,e.child,null,i),t.child.memoizedState=Kx(i),t.memoizedState=$x,a);if(!(t.mode&1))return am(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error(W(419)),o=lx(a,o,void 0),am(e,t,i,o)}if(s=(i&e.childLanes)!==0,Br||s){if(o=Ht,o!==null){switch(i&-i){case 4:n=2;break;case 16:n=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(o.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,la(e,n),Jo(o,e,n,-1))}return z0(),o=lx(Error(W(421))),am(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=Az.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,no=ri(n.nextSibling),ao=t,at=!0,Qo=null,e!==null&&(bo[Ro++]=oa,bo[Ro++]=na,bo[Ro++]=ms,oa=e.id,na=e.overflow,ms=t),t=O0(t,o.children),t.flags|=4096,t)}function WI(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Ux(e.return,t,r)}function ux(e,t,r,o,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=r,a.tailMode=n)}function E1(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Rr(e,t,o.children,r),o=dt.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&WI(e,r,t);else if(e.tag===19)WI(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(je(dt,o),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&Nm(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),ux(t,!1,n,r,a);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Nm(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}ux(t,!0,r,null,a);break;case"together":ux(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function mm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ua(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),hs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,r=ii(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ii(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function wz(e,t,r){switch(t.tag){case 3:k1(t),Wl();break;case 5:o1(t);break;case 1:Ur(t.type)&&Tm(t);break;case 4:T0(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;je(Em,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(je(dt,dt.current&1),t.flags|=128,null):r&t.child.childLanes?M1(e,t,r):(je(dt,dt.current&1),e=ua(e,t,r),e!==null?e.sibling:null);je(dt,dt.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return E1(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),je(dt,dt.current),o)break;return null;case 22:case 23:return t.lanes=0,P1(e,t,r)}return ua(e,t,r)}var A1,Xx,D1,N1;A1=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Xx=function(){};D1=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,cs(Nn.current);var a=null;switch(r){case"input":n=vx(e,n),o=vx(e,o),a=[];break;case"select":n=pt({},n,{value:void 0}),o=pt({},o,{value:void 0}),a=[];break;case"textarea":n=wx(e,n),o=wx(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Im)}Sx(r,o);var i;r=null;for(u in n)if(!o.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Jc.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in o){var l=o[u];if(s=n?.[u],o.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Jc.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Qe("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};N1=function(e,t,r,o){r!==o&&(t.flags|=4)};function Fc(e,t){if(!at)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function nr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags&14680064,o|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function Cz(e,t,r){var o=t.pendingProps;switch(C0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nr(t),null;case 1:return Ur(t.type)&&Pm(),nr(t),null;case 3:return o=t.stateNode,jl(),Ze(Hr),Ze(ir),M0(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(om(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qo!==null&&(o0(Qo),Qo=null))),Xx(e,t),nr(t),null;case 5:k0(t);var n=cs(dd.current);if(r=t.type,e!==null&&t.stateNode!=null)D1(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(W(166));return nr(t),null}if(e=cs(Nn.current),om(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[An]=t,o[ud]=a,e=(t.mode&1)!==0,r){case"dialog":Qe("cancel",o),Qe("close",o);break;case"iframe":case"object":case"embed":Qe("load",o);break;case"video":case"audio":for(n=0;n<Wc.length;n++)Qe(Wc[n],o);break;case"source":Qe("error",o);break;case"img":case"image":case"link":Qe("error",o),Qe("load",o);break;case"details":Qe("toggle",o);break;case"input":QL(o,a),Qe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},Qe("invalid",o);break;case"textarea":JL(o,a),Qe("invalid",o)}Sx(r,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?o.textContent!==s&&(a.suppressHydrationWarning!==!0&&rm(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&rm(o.textContent,s,e),n=["children",""+s]):Jc.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&Qe("scroll",o)}switch(r){case"input":Gp(o),ZL(o,a,!0);break;case"textarea":Gp(o),eI(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=Im)}o=n,t.updateQueue=o,o!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=lP(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(r,{is:o.is}):(e=i.createElement(r),r==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,r),e[An]=t,e[ud]=o,A1(e,t,!1,!1),t.stateNode=e;e:{switch(i=bx(r,o),r){case"dialog":Qe("cancel",e),Qe("close",e),n=o;break;case"iframe":case"object":case"embed":Qe("load",e),n=o;break;case"video":case"audio":for(n=0;n<Wc.length;n++)Qe(Wc[n],e);n=o;break;case"source":Qe("error",e),n=o;break;case"img":case"image":case"link":Qe("error",e),Qe("load",e),n=o;break;case"details":Qe("toggle",e),n=o;break;case"input":QL(e,o),n=vx(e,o),Qe("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=pt({},o,{value:void 0}),Qe("invalid",e);break;case"textarea":JL(e,o),n=wx(e,o),Qe("invalid",e);break;default:n=o}Sx(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?dP(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&uP(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ed(e,l):typeof l=="number"&&ed(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Jc.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Qe("scroll",e):l!=null&&i0(e,a,l,i))}switch(r){case"input":Gp(e),ZL(e,o,!1);break;case"textarea":Gp(e),eI(e);break;case"option":o.value!=null&&e.setAttribute("value",""+si(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?_l(e,!!o.multiple,a,!1):o.defaultValue!=null&&_l(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Im)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return nr(t),null;case 6:if(e&&t.stateNode!=null)N1(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(W(166));if(r=cs(dd.current),cs(Nn.current),om(t)){if(o=t.stateNode,r=t.memoizedProps,o[An]=t,(a=o.nodeValue!==r)&&(e=ao,e!==null))switch(e.tag){case 3:rm(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rm(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[An]=t,t.stateNode=o}return nr(t),null;case 13:if(Ze(dt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(at&&no!==null&&t.mode&1&&!(t.flags&128))ZP(),Wl(),t.flags|=98560,a=!1;else if(a=om(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error(W(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(W(317));a[An]=t}else Wl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;nr(t),a=!1}else Qo!==null&&(o0(Qo),Qo=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?Et===0&&(Et=3):z0())),t.updateQueue!==null&&(t.flags|=4),nr(t),null);case 4:return jl(),Xx(e,t),e===null&&sd(t.stateNode.containerInfo),nr(t),null;case 10:return L0(t.type._context),nr(t),null;case 17:return Ur(t.type)&&Pm(),nr(t),null;case 19:if(Ze(dt),a=t.memoizedState,a===null)return nr(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)Fc(a,!1);else{if(Et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Nm(e),i!==null){for(t.flags|=128,Fc(a,!1),o=i.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)a=r,e=o,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return je(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ct()>$l&&(t.flags|=128,o=!0,Fc(a,!1),t.lanes=4194304)}else{if(!o)if(e=Nm(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Fc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!at)return nr(t),null}else 2*Ct()-a.renderingStartTime>$l&&r!==1073741824&&(t.flags|=128,o=!0,Fc(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ct(),t.sibling=null,r=dt.current,je(dt,o?r&1|2:r&1),t):(nr(t),null);case 22:case 23:return U0(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?oo&1073741824&&(nr(t),t.subtreeFlags&6&&(t.flags|=8192)):nr(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function Sz(e,t){switch(C0(t),t.tag){case 1:return Ur(t.type)&&Pm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jl(),Ze(Hr),Ze(ir),M0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return k0(t),null;case 13:if(Ze(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ze(dt),null;case 4:return jl(),null;case 10:return L0(t.type._context),null;case 22:case 23:return U0(),null;case 24:return null;default:return null}}var im=!1,ar=!1,bz=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Dl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){vt(e,t,o)}else r.current=null}function Yx(e,t,r){try{r()}catch(o){vt(e,t,o)}}var GI=!1;function Rz(e,t){if(Dx=bm,e=BP(),x0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==r||n!==0&&d.nodeType!==3||(s=i+n),d!==a||o!==0&&d.nodeType!==3||(l=i+o),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===n&&(s=i),f===a&&++c===o&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Nx={focusedElem:e,selectionRange:r},bm=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Xo(t.type,m),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=GI,GI=!1,h}function Yc(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&Yx(t,r,a)}n=n.next}while(n!==o)}}function Ym(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function Qx(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function _1(e){var t=e.alternate;t!==null&&(e.alternate=null,_1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[An],delete t[ud],delete t[Fx],delete t[iz],delete t[sz])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function O1(e){return e.tag===5||e.tag===3||e.tag===4}function jI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||O1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zx(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Im));else if(o!==4&&(e=e.child,e!==null))for(Zx(e,t,r),e=e.sibling;e!==null;)Zx(e,t,r),e=e.sibling}function Jx(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Jx(e,t,r),e=e.sibling;e!==null;)Jx(e,t,r),e=e.sibling}var $t=null,Yo=!1;function qa(e,t,r){for(r=r.child;r!==null;)F1(e,t,r),r=r.sibling}function F1(e,t,r){if(Dn&&typeof Dn.onCommitFiberUnmount=="function")try{Dn.onCommitFiberUnmount(zm,r)}catch{}switch(r.tag){case 5:ar||Dl(r,t);case 6:var o=$t,n=Yo;$t=null,qa(e,t,r),$t=o,Yo=n,$t!==null&&(Yo?(e=$t,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):$t.removeChild(r.stateNode));break;case 18:$t!==null&&(Yo?(e=$t,r=r.stateNode,e.nodeType===8?rx(e.parentNode,r):e.nodeType===1&&rx(e,r),nd(e)):rx($t,r.stateNode));break;case 4:o=$t,n=Yo,$t=r.stateNode.containerInfo,Yo=!0,qa(e,t,r),$t=o,Yo=n;break;case 0:case 11:case 14:case 15:if(!ar&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&Yx(r,t,i),n=n.next}while(n!==o)}qa(e,t,r);break;case 1:if(!ar&&(Dl(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){vt(r,t,s)}qa(e,t,r);break;case 21:qa(e,t,r);break;case 22:r.mode&1?(ar=(o=ar)||r.memoizedState!==null,qa(e,t,r),ar=o):qa(e,t,r);break;default:qa(e,t,r)}}function qI(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bz),t.forEach(function(o){var n=Dz.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function Ko(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var n=r[o];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:$t=s.stateNode,Yo=!1;break e;case 3:$t=s.stateNode.containerInfo,Yo=!0;break e;case 4:$t=s.stateNode.containerInfo,Yo=!0;break e}s=s.return}if($t===null)throw Error(W(160));F1(a,i,n),$t=null,Yo=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){vt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)V1(t,e),t=t.sibling}function V1(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ko(t,e),Mn(e),o&4){try{Yc(3,e,e.return),Ym(3,e)}catch(m){vt(e,e.return,m)}try{Yc(5,e,e.return)}catch(m){vt(e,e.return,m)}}break;case 1:Ko(t,e),Mn(e),o&512&&r!==null&&Dl(r,r.return);break;case 5:if(Ko(t,e),Mn(e),o&512&&r!==null&&Dl(r,r.return),e.flags&32){var n=e.stateNode;try{ed(n,"")}catch(m){vt(e,e.return,m)}}if(o&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&iP(n,a),bx(s,i);var u=bx(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?dP(n,d):c==="dangerouslySetInnerHTML"?uP(n,d):c==="children"?ed(n,d):i0(n,c,d,u)}switch(s){case"input":yx(n,a);break;case"textarea":sP(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?_l(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?_l(n,!!a.multiple,a.defaultValue,!0):_l(n,!!a.multiple,a.multiple?[]:"",!1))}n[ud]=a}catch(m){vt(e,e.return,m)}}break;case 6:if(Ko(t,e),Mn(e),o&4){if(e.stateNode===null)throw Error(W(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){vt(e,e.return,m)}}break;case 3:if(Ko(t,e),Mn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{nd(t.containerInfo)}catch(m){vt(e,e.return,m)}break;case 4:Ko(t,e),Mn(e);break;case 13:Ko(t,e),Mn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(B0=Ct())),o&4&&qI(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(ar=(u=ar)||c,Ko(t,e),ar=u):Ko(t,e),Mn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Q=e,c=e.child;c!==null;){for(d=Q=c;Q!==null;){switch(f=Q,p=f.child,f.tag){case 0:case 11:case 14:case 15:Yc(4,f,f.return);break;case 1:Dl(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){vt(o,r,m)}}break;case 5:Dl(f,f.return);break;case 22:if(f.memoizedState!==null){KI(d);continue}}p!==null?(p.return=f,Q=p):KI(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{n=d.stateNode,u?(a=n.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=cP("display",i))}catch(m){vt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){vt(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ko(t,e),Mn(e),o&4&&qI(e);break;case 21:break;default:Ko(t,e),Mn(e)}}function Mn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(O1(r)){var o=r;break e}r=r.return}throw Error(W(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(ed(n,""),o.flags&=-33);var a=jI(e);Jx(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=jI(e);Zx(e,s,i);break;default:throw Error(W(161))}}catch(l){vt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lz(e,t,r){Q=e,B1(e,t,r)}function B1(e,t,r){for(var o=(e.mode&1)!==0;Q!==null;){var n=Q,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||im;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||ar;s=im;var u=ar;if(im=i,(ar=l)&&!u)for(Q=n;Q!==null;)i=Q,l=i.child,i.tag===22&&i.memoizedState!==null?XI(n):l!==null?(l.return=i,Q=l):XI(n);for(;a!==null;)Q=a,B1(a,t,r),a=a.sibling;Q=n,im=s,ar=u}$I(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,Q=a):$I(e,t,r)}}function $I(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ar||Ym(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!ar)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Xo(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&EI(t,a,o);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}EI(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&nd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}ar||t.flags&512&&Qx(t)}catch(f){vt(t,t.return,f)}}if(t===e){Q=null;break}if(r=t.sibling,r!==null){r.return=t.return,Q=r;break}Q=t.return}}function KI(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Q=r;break}Q=t.return}}function XI(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ym(4,t)}catch(l){vt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){vt(t,n,l)}}var a=t.return;try{Qx(t)}catch(l){vt(t,a,l)}break;case 5:var i=t.return;try{Qx(t)}catch(l){vt(t,i,l)}}}catch(l){vt(t,t.return,l)}if(t===e){Q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Q=s;break}Q=t.return}}var Iz=Math.ceil,Fm=ca.ReactCurrentDispatcher,F0=ca.ReactCurrentOwner,Io=ca.ReactCurrentBatchConfig,Ie=0,Ht=null,Rt=null,Kt=0,oo=0,Nl=ci(0),Et=0,gd=null,hs=0,Qm=0,V0=0,Qc=null,Vr=null,B0=0,$l=1/0,ta=null,Vm=!1,e0=null,ni=null,sm=!1,Za=null,Bm=0,Zc=0,t0=null,gm=-1,hm=0;function Lr(){return Ie&6?Ct():gm!==-1?gm:gm=Ct()}function ai(e){return e.mode&1?Ie&2&&Kt!==0?Kt&-Kt:uz.transition!==null?(hm===0&&(hm=bP()),hm):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:MP(e.type)),e):1}function Jo(e,t,r,o){if(50<Zc)throw Zc=0,t0=null,Error(W(185));hd(e,r,o),(!(Ie&2)||e!==Ht)&&(e===Ht&&(!(Ie&2)&&(Qm|=r),Et===4&&Ya(e,Kt)),zr(e,o),r===1&&Ie===0&&!(t.mode&1)&&($l=Ct()+500,$m&&di()))}function zr(e,t){var r=e.callbackNode;d4(e,t);var o=Sm(e,e===Ht?Kt:0);if(o===0)r!==null&&oI(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&oI(r),t===1)e.tag===0?lz(YI.bind(null,e)):XP(YI.bind(null,e)),nz(function(){!(Ie&6)&&di()}),r=null;else{switch(RP(o)){case 1:r=d0;break;case 4:r=CP;break;case 16:r=Cm;break;case 536870912:r=SP;break;default:r=Cm}r=$1(r,H1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function H1(e,t){if(gm=-1,hm=0,Ie&6)throw Error(W(327));var r=e.callbackNode;if(Hl()&&e.callbackNode!==r)return null;var o=Sm(e,e===Ht?Kt:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=Hm(e,o);else{t=o;var n=Ie;Ie|=2;var a=z1();(Ht!==e||Kt!==t)&&(ta=null,$l=Ct()+500,ds(e,t));do try{kz();break}catch(s){U1(e,s)}while(1);R0(),Fm.current=a,Ie=n,Rt!==null?t=0:(Ht=null,Kt=0,t=Et)}if(t!==0){if(t===2&&(n=Tx(e),n!==0&&(o=n,t=r0(e,n))),t===1)throw r=gd,ds(e,0),Ya(e,o),zr(e,Ct()),r;if(t===6)Ya(e,o);else{if(n=e.current.alternate,!(o&30)&&!Pz(n)&&(t=Hm(e,o),t===2&&(a=Tx(e),a!==0&&(o=a,t=r0(e,a))),t===1))throw r=gd,ds(e,0),Ya(e,o),zr(e,Ct()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error(W(345));case 2:ss(e,Vr,ta);break;case 3:if(Ya(e,o),(o&130023424)===o&&(t=B0+500-Ct(),10<t)){if(Sm(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Lr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=Ox(ss.bind(null,e,Vr,ta),t);break}ss(e,Vr,ta);break;case 4:if(Ya(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-Zo(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=Ct()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Iz(o/1960))-o,10<o){e.timeoutHandle=Ox(ss.bind(null,e,Vr,ta),o);break}ss(e,Vr,ta);break;case 5:ss(e,Vr,ta);break;default:throw Error(W(329))}}}return zr(e,Ct()),e.callbackNode===r?H1.bind(null,e):null}function r0(e,t){var r=Qc;return e.current.memoizedState.isDehydrated&&(ds(e,t).flags|=256),e=Hm(e,t),e!==2&&(t=Vr,Vr=r,t!==null&&o0(t)),e}function o0(e){Vr===null?Vr=e:Vr.push.apply(Vr,e)}function Pz(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var n=r[o],a=n.getSnapshot;n=n.value;try{if(!en(a(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ya(e,t){for(t&=~V0,t&=~Qm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Zo(t),o=1<<r;e[r]=-1,t&=~o}}function YI(e){if(Ie&6)throw Error(W(327));Hl();var t=Sm(e,0);if(!(t&1))return zr(e,Ct()),null;var r=Hm(e,t);if(e.tag!==0&&r===2){var o=Tx(e);o!==0&&(t=o,r=r0(e,o))}if(r===1)throw r=gd,ds(e,0),Ya(e,t),zr(e,Ct()),r;if(r===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ss(e,Vr,ta),zr(e,Ct()),null}function H0(e,t){var r=Ie;Ie|=1;try{return e(t)}finally{Ie=r,Ie===0&&($l=Ct()+500,$m&&di())}}function vs(e){Za!==null&&Za.tag===0&&!(Ie&6)&&Hl();var t=Ie;Ie|=1;var r=Io.transition,o=Oe;try{if(Io.transition=null,Oe=1,e)return e()}finally{Oe=o,Io.transition=r,Ie=t,!(Ie&6)&&di()}}function U0(){oo=Nl.current,Ze(Nl)}function ds(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,oz(r)),Rt!==null)for(r=Rt.return;r!==null;){var o=r;switch(C0(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Pm();break;case 3:jl(),Ze(Hr),Ze(ir),M0();break;case 5:k0(o);break;case 4:jl();break;case 13:Ze(dt);break;case 19:Ze(dt);break;case 10:L0(o.type._context);break;case 22:case 23:U0()}r=r.return}if(Ht=e,Rt=e=ii(e.current,null),Kt=oo=t,Et=0,gd=null,V0=Qm=hs=0,Vr=Qc=null,us!==null){for(t=0;t<us.length;t++)if(r=us[t],o=r.interleaved,o!==null){r.interleaved=null;var n=o.next,a=r.pending;if(a!==null){var i=a.next;a.next=n,o.next=i}r.pending=o}us=null}return e}function U1(e,t){do{var r=Rt;try{if(R0(),fm.current=Om,_m){for(var o=ft.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}_m=!1}if(gs=0,Bt=Mt=ft=null,Xc=!1,fd=0,F0.current=null,r===null||r.return===null){Et=1,gd=t,Rt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=Kt,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=FI(i);if(p!==null){p.flags&=-257,VI(p,i,s,a,t),p.mode&1&&OI(a,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){OI(a,u,t),z0();break e}l=Error(W(426))}}else if(at&&s.mode&1){var x=FI(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),VI(x,i,s,a,t),S0(ql(l,s));break e}}a=l=ql(l,s),Et!==4&&(Et=2),Qc===null?Qc=[a]:Qc.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=R1(a,l,t);MI(a,v);break e;case 1:s=l;var g=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ni===null||!ni.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=L1(a,s,t);MI(a,w);break e}}a=a.return}while(a!==null)}G1(r)}catch(C){t=C,Rt===r&&r!==null&&(Rt=r=r.return);continue}break}while(1)}function z1(){var e=Fm.current;return Fm.current=Om,e===null?Om:e}function z0(){(Et===0||Et===3||Et===2)&&(Et=4),Ht===null||!(hs&268435455)&&!(Qm&268435455)||Ya(Ht,Kt)}function Hm(e,t){var r=Ie;Ie|=2;var o=z1();(Ht!==e||Kt!==t)&&(ta=null,ds(e,t));do try{Tz();break}catch(n){U1(e,n)}while(1);if(R0(),Ie=r,Fm.current=o,Rt!==null)throw Error(W(261));return Ht=null,Kt=0,Et}function Tz(){for(;Rt!==null;)W1(Rt)}function kz(){for(;Rt!==null&&!r4();)W1(Rt)}function W1(e){var t=q1(e.alternate,e,oo);e.memoizedProps=e.pendingProps,t===null?G1(e):Rt=t,F0.current=null}function G1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Sz(r,t),r!==null){r.flags&=32767,Rt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Et=6,Rt=null;return}}else if(r=Cz(r,t,oo),r!==null){Rt=r;return}if(t=t.sibling,t!==null){Rt=t;return}Rt=t=e}while(t!==null);Et===0&&(Et=5)}function ss(e,t,r){var o=Oe,n=Io.transition;try{Io.transition=null,Oe=1,Mz(e,t,r,o)}finally{Io.transition=n,Oe=o}return null}function Mz(e,t,r,o){do Hl();while(Za!==null);if(Ie&6)throw Error(W(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(f4(e,a),e===Ht&&(Rt=Ht=null,Kt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||sm||(sm=!0,$1(Cm,function(){return Hl(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Io.transition,Io.transition=null;var i=Oe;Oe=1;var s=Ie;Ie|=4,F0.current=null,Rz(e,r),V1(r,e),Z4(Nx),bm=!!Dx,Nx=Dx=null,e.current=r,Lz(r,e,n),o4(),Ie=s,Oe=i,Io.transition=a}else e.current=r;if(sm&&(sm=!1,Za=e,Bm=n),a=e.pendingLanes,a===0&&(ni=null),i4(r.stateNode,o),zr(e,Ct()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],o(n.value,{componentStack:n.stack,digest:n.digest});if(Vm)throw Vm=!1,e=e0,e0=null,e;return Bm&1&&e.tag!==0&&Hl(),a=e.pendingLanes,a&1?e===t0?Zc++:(Zc=0,t0=e):Zc=0,di(),null}function Hl(){if(Za!==null){var e=RP(Bm),t=Io.transition,r=Oe;try{if(Io.transition=null,Oe=16>e?16:e,Za===null)var o=!1;else{if(e=Za,Za=null,Bm=0,Ie&6)throw Error(W(331));var n=Ie;for(Ie|=4,Q=e.current;Q!==null;){var a=Q,i=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Q=u;Q!==null;){var c=Q;switch(c.tag){case 0:case 11:case 15:Yc(8,c,a)}var d=c.child;if(d!==null)d.return=c,Q=d;else for(;Q!==null;){c=Q;var f=c.sibling,p=c.return;if(_1(c),c===u){Q=null;break}if(f!==null){f.return=p,Q=f;break}Q=p}}}var h=a.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}Q=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,Q=i;else e:for(;Q!==null;){if(a=Q,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Yc(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,Q=v;break e}Q=a.return}}var g=e.current;for(Q=g;Q!==null;){i=Q;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,Q=y;else e:for(i=g;Q!==null;){if(s=Q,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ym(9,s)}}catch(C){vt(s,s.return,C)}if(s===i){Q=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,Q=w;break e}Q=s.return}}if(Ie=n,di(),Dn&&typeof Dn.onPostCommitFiberRoot=="function")try{Dn.onPostCommitFiberRoot(zm,e)}catch{}o=!0}return o}finally{Oe=r,Io.transition=t}}return!1}function QI(e,t,r){t=ql(r,t),t=R1(e,t,1),e=oi(e,t,1),t=Lr(),e!==null&&(hd(e,1,t),zr(e,t))}function vt(e,t,r){if(e.tag===3)QI(e,e,r);else for(;t!==null;){if(t.tag===3){QI(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ni===null||!ni.has(o))){e=ql(r,e),e=L1(t,e,1),t=oi(t,e,1),e=Lr(),t!==null&&(hd(t,1,e),zr(t,e));break}}t=t.return}}function Ez(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Lr(),e.pingedLanes|=e.suspendedLanes&r,Ht===e&&(Kt&r)===r&&(Et===4||Et===3&&(Kt&130023424)===Kt&&500>Ct()-B0?ds(e,0):V0|=r),zr(e,t)}function j1(e,t){t===0&&(e.mode&1?(t=$p,$p<<=1,!($p&130023424)&&($p=4194304)):t=1);var r=Lr();e=la(e,t),e!==null&&(hd(e,t,r),zr(e,r))}function Az(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),j1(e,r)}function Dz(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(W(314))}o!==null&&o.delete(t),j1(e,r)}var q1;q1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Hr.current)Br=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Br=!1,wz(e,t,r);Br=!!(e.flags&131072)}else Br=!1,at&&t.flags&1048576&&YP(t,Mm,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;mm(e,t),e=t.pendingProps;var n=zl(t,ir.current);Bl(t,r),n=A0(null,t,o,e,n,r);var a=D0();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ur(o)?(a=!0,Tm(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,P0(t),n.updater=Xm,t.stateNode=n,n._reactInternals=t,Wx(t,o,e,r),t=qx(null,t,o,!0,a,r)):(t.tag=0,at&&a&&w0(t),Rr(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(mm(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=_z(o),e=Xo(o,e),n){case 0:t=jx(null,t,o,e,r);break e;case 1:t=UI(null,t,o,e,r);break e;case 11:t=BI(null,t,o,e,r);break e;case 14:t=HI(null,t,o,Xo(o.type,e),r);break e}throw Error(W(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Xo(o,n),jx(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Xo(o,n),UI(e,t,o,n,r);case 3:e:{if(k1(t),e===null)throw Error(W(387));o=t.pendingProps,a=t.memoizedState,n=a.element,r1(e,t),Dm(t,o,null,r);var i=t.memoizedState;if(o=i.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=ql(Error(W(423)),t),t=zI(e,t,o,r,n);break e}else if(o!==n){n=ql(Error(W(424)),t),t=zI(e,t,o,r,n);break e}else for(no=ri(t.stateNode.containerInfo.firstChild),ao=t,at=!0,Qo=null,r=e1(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wl(),o===n){t=ua(e,t,r);break e}Rr(e,t,o,r)}t=t.child}return t;case 5:return o1(t),e===null&&Hx(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,_x(o,n)?i=null:a!==null&&_x(o,a)&&(t.flags|=32),T1(e,t),Rr(e,t,i,r),t.child;case 6:return e===null&&Hx(t),null;case 13:return M1(e,t,r);case 4:return T0(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Gl(t,null,o,r):Rr(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Xo(o,n),BI(e,t,o,n,r);case 7:return Rr(e,t,t.pendingProps,r),t.child;case 8:return Rr(e,t,t.pendingProps.children,r),t.child;case 12:return Rr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,je(Em,o._currentValue),o._currentValue=i,a!==null)if(en(a.value,i)){if(a.children===n.children&&!Hr.current){t=ua(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===o){if(a.tag===1){l=aa(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Ux(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(W(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),Ux(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Rr(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Bl(t,r),n=Po(n),o=o(n),t.flags|=1,Rr(e,t,o,r),t.child;case 14:return o=t.type,n=Xo(o,t.pendingProps),n=Xo(o.type,n),HI(e,t,o,n,r);case 15:return I1(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Xo(o,n),mm(e,t),t.tag=1,Ur(o)?(e=!0,Tm(t)):e=!1,Bl(t,r),b1(t,o,n),Wx(t,o,n,r),qx(null,t,o,!0,e,r);case 19:return E1(e,t,r);case 22:return P1(e,t,r)}throw Error(W(156,t.tag))};function $1(e,t){return wP(e,t)}function Nz(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lo(e,t,r,o){return new Nz(e,t,r,o)}function W0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _z(e){if(typeof e=="function")return W0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l0)return 11;if(e===u0)return 14}return 2}function ii(e,t){var r=e.alternate;return r===null?(r=Lo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function vm(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")W0(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Rl:return fs(r.children,n,a,t);case s0:i=8,n|=8;break;case px:return e=Lo(12,r,t,n|2),e.elementType=px,e.lanes=a,e;case mx:return e=Lo(13,r,t,n),e.elementType=mx,e.lanes=a,e;case gx:return e=Lo(19,r,t,n),e.elementType=gx,e.lanes=a,e;case oP:return Zm(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tP:i=10;break e;case rP:i=9;break e;case l0:i=11;break e;case u0:i=14;break e;case $a:i=16,o=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=Lo(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function fs(e,t,r,o){return e=Lo(7,e,o,t),e.lanes=r,e}function Zm(e,t,r,o){return e=Lo(22,e,o,t),e.elementType=oP,e.lanes=r,e.stateNode={isHidden:!1},e}function cx(e,t,r){return e=Lo(6,e,null,t),e.lanes=r,e}function dx(e,t,r){return t=Lo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Oz(e,t,r,o,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ky(0),this.expirationTimes=Ky(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ky(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function G0(e,t,r,o,n,a,i,s,l){return e=new Oz(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Lo(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},P0(a),e}function Fz(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bl,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function K1(e){if(!e)return li;e=e._reactInternals;e:{if(xs(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ur(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var r=e.type;if(Ur(r))return KP(e,r,t)}return t}function X1(e,t,r,o,n,a,i,s,l){return e=G0(r,o,!0,e,n,a,i,s,l),e.context=K1(null),r=e.current,o=Lr(),n=ai(r),a=aa(o,n),a.callback=t??null,oi(r,a,n),e.current.lanes=n,hd(e,n,o),zr(e,o),e}function Jm(e,t,r,o){var n=t.current,a=Lr(),i=ai(n);return r=K1(r),t.context===null?t.context=r:t.pendingContext=r,t=aa(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=oi(n,t,i),e!==null&&(Jo(e,n,i,a),dm(e,n,i)),i}function Um(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ZI(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function j0(e,t){ZI(e,t),(e=e.alternate)&&ZI(e,t)}function Vz(){return null}var Y1=typeof reportError=="function"?reportError:function(e){console.error(e)};function q0(e){this._internalRoot=e}eg.prototype.render=q0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Jm(e,t,null,null)};eg.prototype.unmount=q0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vs(function(){Jm(null,e,null,null)}),t[sa]=null}};function eg(e){this._internalRoot=e}eg.prototype.unstable_scheduleHydration=function(e){if(e){var t=PP();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Xa.length&&t!==0&&t<Xa[r].priority;r++);Xa.splice(r,0,e),r===0&&kP(e)}};function $0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function JI(){}function Bz(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=Um(i);a.call(u)}}var i=X1(t,o,e,0,null,!1,!1,"",JI);return e._reactRootContainer=i,e[sa]=i.current,sd(e.nodeType===8?e.parentNode:e),vs(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=Um(l);s.call(u)}}var l=G0(e,0,!1,null,null,!1,!1,"",JI);return e._reactRootContainer=l,e[sa]=l.current,sd(e.nodeType===8?e.parentNode:e),vs(function(){Jm(t,l,r,o)}),l}function rg(e,t,r,o,n){var a=r._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=Um(i);s.call(l)}}Jm(t,i,e,n)}else i=Bz(r,t,e,n,o);return Um(i)}LP=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=zc(t.pendingLanes);r!==0&&(f0(t,r|1),zr(t,Ct()),!(Ie&6)&&($l=Ct()+500,di()))}break;case 13:vs(function(){var o=la(e,1);if(o!==null){var n=Lr();Jo(o,e,1,n)}}),j0(e,1)}};p0=function(e){if(e.tag===13){var t=la(e,134217728);if(t!==null){var r=Lr();Jo(t,e,134217728,r)}j0(e,134217728)}};IP=function(e){if(e.tag===13){var t=ai(e),r=la(e,t);if(r!==null){var o=Lr();Jo(r,e,t,o)}j0(e,t)}};PP=function(){return Oe};TP=function(e,t){var r=Oe;try{return Oe=e,t()}finally{Oe=r}};Lx=function(e,t,r){switch(t){case"input":if(yx(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var n=qm(o);if(!n)throw Error(W(90));aP(o),yx(o,n)}}}break;case"textarea":sP(e,r);break;case"select":t=r.value,t!=null&&_l(e,!!r.multiple,t,!1)}};mP=H0;gP=vs;var Hz={usingClientEntryPoint:!1,Events:[yd,Tl,qm,fP,pP,H0]},Vc={findFiberByHostInstance:ls,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Uz={bundleType:Vc.bundleType,version:Vc.version,rendererPackageName:Vc.rendererPackageName,rendererConfig:Vc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ca.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=yP(e),e===null?null:e.stateNode},findFiberByHostInstance:Vc.findFiberByHostInstance||Vz,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Bc.isDisabled&&Bc.supportsFiber))try{zm=Bc.inject(Uz),Dn=Bc}catch{}var Bc;lo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hz;lo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$0(t))throw Error(W(200));return Fz(e,t,null,r)};lo.createRoot=function(e,t){if(!$0(e))throw Error(W(299));var r=!1,o="",n=Y1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=G0(e,1,!1,null,null,r,!1,o,n),e[sa]=t.current,sd(e.nodeType===8?e.parentNode:e),new q0(t)};lo.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=yP(t),e=e===null?null:e.stateNode,e};lo.flushSync=function(e){return vs(e)};lo.hydrate=function(e,t,r){if(!tg(t))throw Error(W(200));return rg(null,e,t,!0,r)};lo.hydrateRoot=function(e,t,r){if(!$0(e))throw Error(W(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=Y1;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=X1(t,null,e,1,r??null,n,!1,a,i),e[sa]=t.current,sd(e),o)for(e=0;e<o.length;e++)r=o[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new eg(t)};lo.render=function(e,t,r){if(!tg(t))throw Error(W(200));return rg(null,e,t,!1,r)};lo.unmountComponentAtNode=function(e){if(!tg(e))throw Error(W(40));return e._reactRootContainer?(vs(function(){rg(null,null,e,!1,function(){e._reactRootContainer=null,e[sa]=null})}),!0):!1};lo.unstable_batchedUpdates=H0;lo.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!tg(r))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return rg(e,t,r,!1,o)};lo.version="18.3.1-next-f1338f8080-20240426"});var Yl=tr((MZ,J1)=>{"use strict";function Z1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Z1)}catch(e){console.error(e)}}Z1(),J1.exports=Q1()});var $T=tr(qT=>{"use strict";var fu=E();function GW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jW=typeof Object.is=="function"?Object.is:GW,qW=fu.useState,$W=fu.useEffect,KW=fu.useLayoutEffect,XW=fu.useDebugValue;function YW(e,t){var r=t(),o=qW({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return KW(function(){n.value=r,n.getSnapshot=t,cw(n)&&a({inst:n})},[e,r,t]),$W(function(){return cw(n)&&a({inst:n}),e(function(){cw(n)&&a({inst:n})})},[e]),XW(r),r}function cw(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jW(e,r)}catch{return!0}}function QW(e,t){return t()}var ZW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?QW:YW;qT.useSyncExternalStore=fu.useSyncExternalStore!==void 0?fu.useSyncExternalStore:ZW});var XT=tr((Ere,KT)=>{"use strict";KT.exports=$T()});var s_=tr(we=>{"use strict";var CS=Symbol.for("react.transitional.element"),u8=Symbol.for("react.portal"),c8=Symbol.for("react.fragment"),d8=Symbol.for("react.strict_mode"),f8=Symbol.for("react.profiler"),p8=Symbol.for("react.consumer"),m8=Symbol.for("react.context"),g8=Symbol.for("react.forward_ref"),h8=Symbol.for("react.suspense"),v8=Symbol.for("react.memo"),t_=Symbol.for("react.lazy"),Y2=Symbol.iterator;function y8(e){return e===null||typeof e!="object"?null:(e=Y2&&e[Y2]||e["@@iterator"],typeof e=="function"?e:null)}var r_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},o_=Object.assign,n_={};function ic(e,t,r){this.props=e,this.context=t,this.refs=n_,this.updater=r||r_}ic.prototype.isReactComponent={};ic.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ic.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function a_(){}a_.prototype=ic.prototype;function SS(e,t,r){this.props=e,this.context=t,this.refs=n_,this.updater=r||r_}var bS=SS.prototype=new a_;bS.constructor=SS;o_(bS,ic.prototype);bS.isPureReactComponent=!0;var Q2=Array.isArray,ut={H:null,A:null,T:null,S:null,V:null},i_=Object.prototype.hasOwnProperty;function RS(e,t,r,o,n,a){return r=a.ref,{$$typeof:CS,type:e,key:t,ref:r!==void 0?r:null,props:a}}function x8(e,t){return RS(e.type,t,void 0,void 0,void 0,e.props)}function LS(e){return typeof e=="object"&&e!==null&&e.$$typeof===CS}function w8(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Z2=/\/+/g;function wS(e,t){return typeof e=="object"&&e!==null&&e.key!=null?w8(""+e.key):t.toString(36)}function J2(){}function C8(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(J2,J2):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ac(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case CS:case u8:i=!0;break;case t_:return i=e._init,ac(i(e._payload),t,r,o,n)}}if(i)return n=n(e),i=o===""?"."+wS(e,0):o,Q2(n)?(r="",i!=null&&(r=i.replace(Z2,"$&/")+"/"),ac(n,t,r,"",function(u){return u})):n!=null&&(LS(n)&&(n=x8(n,r+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(Z2,"$&/")+"/")+i)),t.push(n)),1;i=0;var s=o===""?".":o+":";if(Q2(e))for(var l=0;l<e.length;l++)o=e[l],a=s+wS(o,l),i+=ac(o,t,r,a,n);else if(l=y8(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,a=s+wS(o,l++),i+=ac(o,t,r,a,n);else if(a==="object"){if(typeof e.then=="function")return ac(C8(e),t,r,o,n);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return i}function pv(e,t,r){if(e==null)return e;var o=[],n=0;return ac(e,o,"","",function(a){return t.call(r,a,n++)}),o}function S8(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var e_=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function b8(){}we.Children={map:pv,forEach:function(e,t,r){pv(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return pv(e,function(){t++}),t},toArray:function(e){return pv(e,function(t){return t})||[]},only:function(e){if(!LS(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=ic;we.Fragment=c8;we.Profiler=f8;we.PureComponent=SS;we.StrictMode=d8;we.Suspense=h8;we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ut;we.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ut.H.useMemoCache(e)}};we.cache=function(e){return function(){return e.apply(null,arguments)}};we.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=o_({},e.props),n=e.key,a=void 0;if(t!=null)for(i in t.ref!==void 0&&(a=void 0),t.key!==void 0&&(n=""+t.key),t)!i_.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=r;else if(1<i){for(var s=Array(i),l=0;l<i;l++)s[l]=arguments[l+2];o.children=s}return RS(e.type,n,void 0,void 0,a,o)};we.createContext=function(e){return e={$$typeof:m8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:p8,_context:e},e};we.createElement=function(e,t,r){var o,n={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)i_.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(n[o]=t[o]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var s=Array(i),l=0;l<i;l++)s[l]=arguments[l+2];n.children=s}if(e&&e.defaultProps)for(o in i=e.defaultProps,i)n[o]===void 0&&(n[o]=i[o]);return RS(e,a,void 0,void 0,null,n)};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:g8,render:e}};we.isValidElement=LS;we.lazy=function(e){return{$$typeof:t_,_payload:{_status:-1,_result:e},_init:S8}};we.memo=function(e,t){return{$$typeof:v8,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=ut.T,r={};ut.T=r;try{var o=e(),n=ut.S;n!==null&&n(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(b8,e_)}catch(a){e_(a)}finally{ut.T=t}};we.unstable_useCacheRefresh=function(){return ut.H.useCacheRefresh()};we.use=function(e){return ut.H.use(e)};we.useActionState=function(e,t,r){return ut.H.useActionState(e,t,r)};we.useCallback=function(e,t){return ut.H.useCallback(e,t)};we.useContext=function(e){return ut.H.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e,t){return ut.H.useDeferredValue(e,t)};we.useEffect=function(e,t,r){var o=ut.H;if(typeof r=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return o.useEffect(e,t)};we.useId=function(){return ut.H.useId()};we.useImperativeHandle=function(e,t,r){return ut.H.useImperativeHandle(e,t,r)};we.useInsertionEffect=function(e,t){return ut.H.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return ut.H.useLayoutEffect(e,t)};we.useMemo=function(e,t){return ut.H.useMemo(e,t)};we.useOptimistic=function(e,t){return ut.H.useOptimistic(e,t)};we.useReducer=function(e,t,r){return ut.H.useReducer(e,t,r)};we.useRef=function(e){return ut.H.useRef(e)};we.useState=function(e){return ut.H.useState(e)};we.useSyncExternalStore=function(e,t,r){return ut.H.useSyncExternalStore(e,t,r)};we.useTransition=function(){return ut.H.useTransition()};we.version="19.1.1"});var Pe=tr((MSe,l_)=>{"use strict";l_.exports=s_()});var f_=tr(mv=>{"use strict";var R8=Symbol.for("react.transitional.element"),L8=Symbol.for("react.fragment");function d_(e,t,r){var o=null;if(r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),"key"in t){r={};for(var n in t)n!=="key"&&(r[n]=t[n])}else r=t;return t=r.ref,{$$typeof:R8,type:e,key:o,ref:t!==void 0?t:null,props:r}}mv.Fragment=L8;mv.jsx=d_;mv.jsxs=d_});var vn=tr((_Se,p_)=>{"use strict";p_.exports=f_()});var v_=tr(Ar=>{"use strict";var A8=Pe();function h_(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Wi(){}var Er={d:{f:Wi,r:function(){throw Error(h_(522))},D:Wi,C:Wi,L:Wi,m:Wi,X:Wi,S:Wi,M:Wi},p:0,findDOMNode:null},D8=Symbol.for("react.portal");function N8(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D8,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var np=A8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function yv(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Er;Ar.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(h_(299));return N8(e,t,null,r)};Ar.flushSync=function(e){var t=np.T,r=Er.p;try{if(np.T=null,Er.p=2,e)return e()}finally{np.T=t,Er.p=r,Er.d.f()}};Ar.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Er.d.C(e,t))};Ar.prefetchDNS=function(e){typeof e=="string"&&Er.d.D(e)};Ar.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,o=yv(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Er.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:n,fetchPriority:a}):r==="script"&&Er.d.X(e,{crossOrigin:o,integrity:n,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ar.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=yv(t.as,t.crossOrigin);Er.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Er.d.M(e)};Ar.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,o=yv(r,t.crossOrigin);Er.d.L(e,r,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Ar.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=yv(t.as,t.crossOrigin);Er.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Er.d.m(e)};Ar.requestFormReset=function(e){Er.d.r(e)};Ar.unstable_batchedUpdates=function(e,t){return e(t)};Ar.useFormState=function(e,t,r){return np.H.useFormState(e,t,r)};Ar.useFormStatus=function(){return np.H.useHostTransitionStatus()};Ar.version="19.1.1"});var TS=tr((GSe,x_)=>{"use strict";function y_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),x_.exports=v_()});var mg=b(E());var Gr=b(E(),1);var wo=b(E(),1),Ny=b(M(),1);function ML(e,t){let r=wo.createContext(t),o=a=>{let{children:i,...s}=a,l=wo.useMemo(()=>s,Object.values(s));return(0,Ny.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=wo.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function Te(e,t=[]){let r=[];function o(a,i){let s=wo.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,x=wo.useMemo(()=>h,Object.values(h));return(0,Ny.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,h=wo.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=r.map(i=>wo.createContext(i));return function(s){let l=s?.[e]||a;return wo.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,MU(n,...t)]}function MU(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return wo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Ga=b(E(),1);var AL=b(E(),1);function EL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ns(...e){return t=>{let r=!1,o=e.map(n=>{let a=EL(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():EL(e[n],null)}}}}function ne(...e){return AL.useCallback(ns(...e),e)}var kt=b(E(),1);var wl=b(M(),1);function ro(e){let t=EU(e),r=kt.forwardRef((o,n)=>{let{children:a,...i}=o,s=kt.Children.toArray(a),l=s.find(AU);if(l){let u=l.props.children,c=s.map(d=>d===l?kt.Children.count(u)>1?kt.Children.only(null):kt.isValidElement(u)?u.props.children:null:d);return(0,wl.jsx)(t,{...i,ref:n,children:kt.isValidElement(u)?kt.cloneElement(u,void 0,c):null})}return(0,wl.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function EU(e){let t=kt.forwardRef((r,o)=>{let{children:n,...a}=r;if(kt.isValidElement(n)){let i=NU(n),s=DU(a,n.props);return n.type!==kt.Fragment&&(s.ref=o?ns(o,i):i),kt.cloneElement(n,s)}return kt.Children.count(n)>1?kt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DL=Symbol("radix.slottable");function NL(e){let t=({children:r})=>(0,wl.jsx)(wl.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=DL,t}function AU(e){return kt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DL}function DU(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function NU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Op=b(M(),1),_U=b(E(),1);var OU=b(M(),1);function Tn(e){let t=e+"CollectionProvider",[r,o]=Te(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:v}=m,g=Ga.default.useRef(null),y=Ga.default.useRef(new Map).current;return(0,Op.jsx)(n,{scope:x,itemMap:y,collectionRef:g,children:v})};i.displayName=t;let s=e+"CollectionSlot",l=ro(s),u=Ga.default.forwardRef((m,x)=>{let{scope:v,children:g}=m,y=a(s,v),w=ne(x,y.collectionRef);return(0,Op.jsx)(l,{ref:w,children:g})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=ro(c),p=Ga.default.forwardRef((m,x)=>{let{scope:v,children:g,...y}=m,w=Ga.default.useRef(null),C=ne(x,w),R=a(c,v);return Ga.default.useEffect(()=>(R.itemMap.set(w,{ref:w,...y}),()=>void R.itemMap.delete(w))),(0,Op.jsx)(f,{[d]:"",ref:C,children:g})});p.displayName=c;function h(m){let x=a(e+"CollectionConsumer",m);return Ga.default.useCallback(()=>{let g=x.collectionRef.current;if(!g)return[];let y=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((R,S)=>y.indexOf(R.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},h,o]}var CZ=!!(typeof window<"u"&&window.document&&window.document.createElement);function H(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Co=b(E(),1);var _L=b(E(),1),ke=globalThis?.document?_L.useLayoutEffect:()=>{};var Fp=b(E(),1);var FU=Co[" useInsertionEffect ".trim().toString()]||ke;function Ue({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=VU({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Co.useRef(e!==void 0);Co.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,o])}let u=Co.useCallback(c=>{if(s){let d=BU(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function VU({defaultProp:e,onChange:t}){let[r,o]=Co.useState(e),n=Co.useRef(r),a=Co.useRef(t);return FU(()=>{a.current=t},[t]),Co.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function BU(e){return typeof e=="function"}var LZ=Symbol("RADIX:SYNC_STATE");var eT=b(E(),1),tT=b(Yl(),1);var rT=b(M(),1),zz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=zz.reduce((e,t)=>{let r=ro(`Primitive.${t}`),o=eT.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,rT.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Ql(e,t){e&&tT.flushSync(()=>e.dispatchEvent(t))}var Yt=b(E(),1);var Wr=b(E(),1);var oT=b(E(),1);function Wz(e,t){return oT.useReducer((r,o)=>t[r][o]??r,e)}var it=e=>{let{present:t,children:r}=e,o=Gz(t),n=typeof r=="function"?r({present:o.isPresent}):Wr.Children.only(r),a=ne(o.ref,jz(n));return typeof r=="function"||o.isPresent?Wr.cloneElement(n,{ref:a}):null};it.displayName="Presence";function Gz(e){let[t,r]=Wr.useState(),o=Wr.useRef(null),n=Wr.useRef(e),a=Wr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Wz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Wr.useEffect(()=>{let u=og(o.current);a.current=s==="mounted"?u:"none"},[s]),ke(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=og(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ke(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=og(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(a.current=og(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Wr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function og(e){return e?.animationName||"none"}function jz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var K0=b(E(),1);var qz=K0[" useId ".trim().toString()]||(()=>{}),$z=0;function qe(e){let[t,r]=K0.useState(qz());return ke(()=>{e||r(o=>o??String($z++))},[e]),e||(t?`radix-${t}`:"")}var ws=b(M(),1),ng="Collapsible",[Kz,X0]=Te(ng),[Xz,Y0]=Kz(ng),nT=Yt.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=Ue({prop:o,defaultProp:n??!1,onChange:i,caller:ng});return(0,ws.jsx)(Xz,{scope:r,disabled:a,contentId:qe(),open:l,onOpenToggle:Yt.useCallback(()=>u(c=>!c),[u]),children:(0,ws.jsx)($.div,{"data-state":Z0(l),"data-disabled":a?"":void 0,...s,ref:t})})});nT.displayName=ng;var aT="CollapsibleTrigger",iT=Yt.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=Y0(aT,r);return(0,ws.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Z0(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:H(e.onClick,n.onOpenToggle)})});iT.displayName=aT;var Q0="CollapsibleContent",sT=Yt.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Y0(Q0,e.__scopeCollapsible);return(0,ws.jsx)(it,{present:r||n.open,children:({present:a})=>(0,ws.jsx)(Yz,{...o,ref:t,present:a})})});sT.displayName=Q0;var Yz=Yt.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=Y0(Q0,r),[s,l]=Yt.useState(o),u=Yt.useRef(null),c=ne(t,u),d=Yt.useRef(0),f=d.current,p=Yt.useRef(0),h=p.current,m=i.open||s,x=Yt.useRef(m),v=Yt.useRef(void 0);return Yt.useEffect(()=>{let g=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(g)},[]),ke(()=>{let g=u.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";let y=g.getBoundingClientRect();d.current=y.height,p.current=y.width,x.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(o)}},[i.open,o]),(0,ws.jsx)($.div,{"data-state":Z0(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&n})});function Z0(e){return e?"open":"closed"}var ag=nT,Zl=iT,wd=sT;var ig=b(E(),1),Qz=b(M(),1),Zz=ig.createContext(void 0);function _n(e){let t=ig.useContext(Zz);return e||t||"ltr"}var At=b(M(),1),tn="Accordion",Jz=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ew,e5,t5]=Tn(tn),[lg,rJ]=Te(tn,[t5,X0]),tw=X0(),uT=Gr.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,At.jsx)(ew.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,At.jsx)(a5,{...a,ref:t}):(0,At.jsx)(n5,{...n,ref:t})})});uT.displayName=tn;var[cT,r5]=lg(tn),[dT,o5]=lg(tn,{collapsible:!1}),n5=Gr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=Ue({prop:r,defaultProp:o??"",onChange:n,caller:tn});return(0,At.jsx)(cT,{scope:e.__scopeAccordion,value:Gr.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Gr.default.useCallback(()=>a&&l(""),[a,l]),children:(0,At.jsx)(dT,{scope:e.__scopeAccordion,collapsible:a,children:(0,At.jsx)(fT,{...i,ref:t})})})}),a5=Gr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=Ue({prop:r,defaultProp:o??[],onChange:n,caller:tn}),l=Gr.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Gr.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,At.jsx)(cT,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,At.jsx)(dT,{scope:e.__scopeAccordion,collapsible:!0,children:(0,At.jsx)(fT,{...a,ref:t})})})}),[i5,ug]=lg(tn),fT=Gr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=Gr.default.useRef(null),l=ne(s,t),u=e5(r),d=_n(n)==="ltr",f=H(e.onKeyDown,p=>{if(!Jz.includes(p.key))return;let h=p.target,m=u().filter(L=>!L.ref.current?.disabled),x=m.findIndex(L=>L.ref.current===h),v=m.length;if(x===-1)return;p.preventDefault();let g=x,y=0,w=v-1,C=()=>{g=x+1,g>w&&(g=y)},R=()=>{g=x-1,g<y&&(g=w)};switch(p.key){case"Home":g=y;break;case"End":g=w;break;case"ArrowRight":a==="horizontal"&&(d?C():R());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?R():C());break;case"ArrowUp":a==="vertical"&&R();break}let S=g%v;m[S].ref.current?.focus()});return(0,At.jsx)(i5,{scope:r,disabled:o,direction:n,orientation:a,children:(0,At.jsx)(ew.Slot,{scope:r,children:(0,At.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),sg="AccordionItem",[s5,rw]=lg(sg),pT=Gr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=ug(sg,r),i=r5(sg,r),s=tw(r),l=qe(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,At.jsx)(s5,{scope:r,open:u,disabled:c,triggerId:l,children:(0,At.jsx)(ag,{"data-orientation":a.orientation,"data-state":xT(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});pT.displayName=sg;var mT="AccordionHeader",gT=Gr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=ug(tn,r),a=rw(mT,r);return(0,At.jsx)($.h3,{"data-orientation":n.orientation,"data-state":xT(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});gT.displayName=mT;var J0="AccordionTrigger",hT=Gr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=ug(tn,r),a=rw(J0,r),i=o5(J0,r),s=tw(r);return(0,At.jsx)(ew.ItemSlot,{scope:r,children:(0,At.jsx)(Zl,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});hT.displayName=J0;var vT="AccordionContent",yT=Gr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=ug(tn,r),a=rw(vT,r),i=tw(r);return(0,At.jsx)(wd,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});yT.displayName=vT;function xT(e){return e?"open":"closed"}var wT=uT,CT=pT,ST=gT,ow=hT,nw=yT;var dg=b(E());var bT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),u5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),aw=e=>{let t=u5(e);return t.charAt(0).toUpperCase()+t.slice(1)},cg=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),RT=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Cd=b(E());var LT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var IT=(0,Cd.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Cd.createElement)("svg",{ref:l,...LT,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:cg("lucide",n),...!a&&!RT(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Cd.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var O=(e,t)=>{let r=(0,dg.forwardRef)(({className:o,...n},a)=>(0,dg.createElement)(IT,{ref:a,iconNode:t,className:cg(`lucide-${bT(aw(e))}`,`lucide-${e}`,o),...n}));return r.displayName=aw(e),r};var c5=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Sd=O("align-center",c5);var d5=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],bd=O("align-justify",d5);var f5=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Rd=O("align-left",f5);var p5=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Ld=O("align-right",p5);var m5=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Jl=O("arrow-down",m5);var g5=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],eu=O("arrow-up-down",g5);var h5=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],tu=O("arrow-up",h5);var v5=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Id=O("bold",v5);var y5=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Cs=O("calendar",y5);var x5=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sr=O("check",x5);var w5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],On=O("chevron-down",w5);var C5=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rn=O("chevron-left",C5);var S5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pr=O("chevron-right",S5);var b5=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Pd=O("chevron-up",b5);var R5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],on=O("circle-alert",R5);var L5=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],fi=O("circle-check-big",L5);var I5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ss=O("circle",I5);var P5=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Td=O("clock",P5);var T5=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],kd=O("code",T5);var k5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Md=O("copy",k5);var M5=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ed=O("credit-card",M5);var E5=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],ru=O("crown",E5);var A5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Fn=O("ellipsis",A5);var D5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ad=O("external-link",D5);var N5=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bs=O("eye",N5);var _5=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Dd=O("file-text",_5);var O5=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Nd=O("file",O5);var F5=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],_d=O("git-fork",F5);var V5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Rs=O("image",V5);var B5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ou=O("info",B5);var H5=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Od=O("italic",H5);var U5=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Fd=O("link",U5);var z5=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],Vd=O("list-ordered",z5);var W5=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Bd=O("list",W5);var G5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qt=O("loader-circle",G5);var j5=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],nu=O("lock",j5);var q5=[["path",{d:"M5 12h14",key:"1ays0h"}]],Hd=O("minus",q5);var $5=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Ud=O("music",$5);var K5=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],au=O("palette",K5);var X5=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],zd=O("phone",X5);var Y5=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],fg=O("pipette",Y5);var Q5=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Wd=O("quote",Q5);var Z5=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],Gd=O("redo",Z5);var J5=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ls=O("search",J5);var eW=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],jr=O("square-pen",eW);var tW=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],iu=O("star",tW);var rW=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],jd=O("strikethrough",rW);var oW=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],pi=O("triangle-alert",oW);var nW=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],qd=O("underline",nW);var aW=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],$d=O("undo",aW);var iW=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Kd=O("upload",iW);var sW=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Xd=O("video",sW);var lW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uo=O("x",lW);var uW=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],su=O("zap",uW);function PT(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=PT(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function pg(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=PT(e))&&(o&&(o+=" "),o+=t);return o}var lw="-",cW=e=>{let t=fW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(lw);return s[0]===""&&s.length!==1&&s.shift(),MT(s,t)||dW(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},MT=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?MT(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(lw);return t.validators.find(({validator:i})=>i(a))?.classGroupId},TT=/^\[(.+)\]$/,dW=e=>{if(TT.test(e)){let t=TT.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},fW=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return mW(Object.entries(e.classGroups),r).forEach(([a,i])=>{sw(i,o,a,t)}),o},sw=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:kT(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(pW(n)){sw(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{sw(i,kT(t,a),r,o)})})},kT=(e,t)=>{let r=e;return t.split(lw).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},pW=e=>e.isThemeGetter,mW=(e,t)=>t?e.map(([r,o])=>{let n=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,n]}):e,gW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,n=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return n(a,i),i},set(a,i){r.has(a)?r.set(a,i):n(a,i)}}},ET="!",hW=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],a=t.length,i=s=>{let l=[],u=0,c=0,d;for(let x=0;x<s.length;x++){let v=s[x];if(u===0){if(v===n&&(o||s.slice(x,x+a)===t)){l.push(s.slice(c,x)),c=x+a;continue}if(v==="/"){d=x;continue}}v==="["?u++:v==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(ET),h=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},vW=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},yW=e=>({cache:gW(e.cacheSize),parseClassName:hW(e),...cW(e)}),xW=/\s+/,wW=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(xW),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(u),h=!!p,m=o(h?f.substring(0,p):f);if(!m){if(!h){s=u+(s.length>0?" "+s:s);continue}if(m=o(f),!m){s=u+(s.length>0?" "+s:s);continue}h=!1}let x=vW(c).join(":"),v=d?x+ET:x,g=v+m;if(a.includes(g))continue;a.push(g);let y=n(m,h);for(let w=0;w<y.length;++w){let C=y[w];a.push(v+C)}s=u+(s.length>0?" "+s:s)}return s};function CW(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=AT(t))&&(o&&(o+=" "),o+=r);return o}var AT=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=AT(e[o]))&&(r&&(r+=" "),r+=t);return r};function SW(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=yW(u),o=r.cache.get,n=r.cache.set,a=s,s(l)}function s(l){let u=o(l);if(u)return u;let c=wW(l,r);return n(l,c),c}return function(){return a(CW.apply(null,arguments))}}var Je=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},DT=/^\[(?:([a-z-]+):)?(.+)\]$/i,bW=/^\d+\/\d+$/,RW=new Set(["px","full","screen"]),LW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,PW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,TW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,da=e=>lu(e)||RW.has(e)||bW.test(e),mi=e=>uu(e,"length",FW),lu=e=>!!e&&!Number.isNaN(Number(e)),iw=e=>uu(e,"number",lu),Yd=e=>!!e&&Number.isInteger(Number(e)),MW=e=>e.endsWith("%")&&lu(e.slice(0,-1)),ye=e=>DT.test(e),gi=e=>LW.test(e),EW=new Set(["length","size","percentage"]),AW=e=>uu(e,EW,NT),DW=e=>uu(e,"position",NT),NW=new Set(["image","url"]),_W=e=>uu(e,NW,BW),OW=e=>uu(e,"",VW),Qd=()=>!0,uu=(e,t,r)=>{let o=DT.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},FW=e=>IW.test(e)&&!PW.test(e),NT=()=>!1,VW=e=>TW.test(e),BW=e=>kW.test(e);var HW=()=>{let e=Je("colors"),t=Je("spacing"),r=Je("blur"),o=Je("brightness"),n=Je("borderColor"),a=Je("borderRadius"),i=Je("borderSpacing"),s=Je("borderWidth"),l=Je("contrast"),u=Je("grayscale"),c=Je("hueRotate"),d=Je("invert"),f=Je("gap"),p=Je("gradientColorStops"),h=Je("gradientColorStopPositions"),m=Je("inset"),x=Je("margin"),v=Je("opacity"),g=Je("padding"),y=Je("saturate"),w=Je("scale"),C=Je("sepia"),R=Je("skew"),S=Je("space"),L=Je("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ye,t],F=()=>[ye,t],q=()=>["",da,mi],A=()=>["auto",lu,ye],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",ye],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ve=()=>[lu,ye];return{cacheSize:500,separator:":",theme:{colors:[Qd],spacing:[da,mi],blur:["none","",gi,ye],brightness:ve(),borderColor:[e],borderRadius:["none","","full",gi,ye],borderSpacing:F(),borderWidth:q(),contrast:ve(),grayscale:k(),hueRotate:ve(),invert:k(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[MW,mi],inset:N(),margin:N(),opacity:ve(),padding:F(),saturate:ve(),scale:ve(),sepia:k(),skew:ve(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[gi]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),ye]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yd,ye]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",Yd,ye]}],"grid-cols":[{"grid-cols":[Qd]}],"col-start-end":[{col:["auto",{span:["full",Yd,ye]},ye]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Qd]}],"row-start-end":[{row:["auto",{span:[Yd,ye]},ye]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,t]}],"min-w":[{"min-w":[ye,t,"min","max","fit"]}],"max-w":[{"max-w":[ye,t,"none","full","min","max","fit","prose",{screen:[gi]},gi]}],h:[{h:[ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gi,mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",iw]}],"font-family":[{font:[Qd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",lu,iw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",da,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",da,mi]}],"underline-offset":[{"underline-offset":["auto",da,ye]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),DW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",AW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_W]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:D()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[da,ye]}],"outline-w":[{outline:[da,mi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[da,mi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gi,OW]}],"shadow-color":[{shadow:[Qd]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",gi,ye]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:ve()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:ve()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Yd,ye]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[da,mi,iw]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var _T=SW(HW);function I(...e){return _T(pg(e))}var hi=b(M()),UW=wT,OT=mg.forwardRef(({className:e,...t},r)=>(0,hi.jsx)(CT,{ref:r,className:I("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));OT.displayName="AccordionItem";var FT=mg.forwardRef(({className:e,children:t,...r},o)=>(0,hi.jsx)(ST,{className:"flex",children:(0,hi.jsxs)(ow,{ref:o,className:I("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary dark:hover:text-primary-400","[&[data-state=open]>svg]:rotate-180",e),...r,children:[t,(0,hi.jsx)(On,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));FT.displayName=ow.displayName;var VT=mg.forwardRef(({className:e,children:t,...r},o)=>(0,hi.jsx)(nw,{ref:o,className:I("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...r,children:(0,hi.jsx)("div",{className:"pb-4 pt-0",children:t})}));VT.displayName=nw.displayName;var cu=b(E());var BT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,HT=pg,J=(e,t)=>r=>{var o;if(t?.variants==null)return HT(e,r?.class,r?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=r?.[u],d=a?.[u];if(c===null)return null;let f=BT(c)||BT(d);return n[u][f]}),s=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(h=>{let[m,x]=h;return Array.isArray(x)?x.includes({...a,...s}[m]):{...a,...s}[m]===x})?[...u,d,f]:u},[]);return HT(e,i,l,r?.class,r?.className)};var fa=b(M()),zW=J("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-blue-500/10 text-blue-500 border-blue-500/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),UT=cu.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=cu.useMemo(()=>{switch(t){case"success":return sr;case"warning":return pi;case"error":return on;case"info":return ou;default:return ou}},[t]);return(0,fa.jsxs)("div",{ref:u,role:"alert",className:I("moonui-theme",zW({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,fa.jsx)(c,{className:"h-5 w-5"}),(0,fa.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,fa.jsx)("button",{onClick:i,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Kapat",children:(0,fa.jsx)(uo,{className:"h-4 w-4"})})]})});UT.displayName="Alert";var zT=cu.forwardRef(({className:e,...t},r)=>(0,fa.jsx)("h5",{ref:r,className:I("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));zT.displayName="AlertTitle";var WT=cu.forwardRef(({className:e,...t},r)=>(0,fa.jsx)("div",{ref:r,className:I("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));WT.displayName="AlertDescription";var GT=b(E());var uw=b(M()),WW=J("relative overflow-hidden",{variants:{variant:{default:"rounded-md bg-muted/10",ghost:"bg-transparent",outline:"rounded-md border border-border",card:"rounded-md bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default"}}),jT=GT.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,uw.jsx)("div",{ref:s,className:I("moonui-theme",WW({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,uw.jsx)("div",{className:"absolute inset-0",children:a})}));jT.displayName="AspectRatio";var Jd=b(E());var ko=b(E(),1);var du=b(E(),1);function et(e){let t=du.useRef(e);return du.useEffect(()=>{t.current=e}),du.useMemo(()=>(...r)=>t.current?.(...r),[])}var YT=b(XT(),1);function QT(){return(0,YT.useSyncExternalStore)(JW,()=>!0,()=>!1)}function JW(){return()=>{}}var Zd=b(M(),1),dw="Avatar",[eG,Vre]=Te(dw),[tG,JT]=eG(dw),ek=ko.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=ko.useState("idle");return(0,Zd.jsx)(tG,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,Zd.jsx)($.span,{...o,ref:t})})});ek.displayName=dw;var tk="AvatarImage",rk=ko.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=JT(tk,r),s=rG(o,a),l=et(u=>{n(u),i.onImageLoadingStatusChange(u)});return ke(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,Zd.jsx)($.img,{...a,ref:t,src:o}):null});rk.displayName=tk;var ok="AvatarFallback",nk=ko.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=JT(ok,r),[i,s]=ko.useState(o===void 0);return ko.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,Zd.jsx)($.span,{...n,ref:t}):null});nk.displayName=ok;function ZT(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function rG(e,{referrerPolicy:t,crossOrigin:r}){let o=QT(),n=ko.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=ko.useState(()=>ZT(a,e));return ke(()=>{s(ZT(a,e))},[a,e]),ke(()=>{let l=d=>()=>{s(d)};if(!a)return;let u=l("loaded"),c=l("error");return a.addEventListener("load",u),a.addEventListener("error",c),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,r,t]),i}var fw=ek,pw=rk,mw=nk;var nn=b(M()),nG=J("relative flex shrink-0 overflow-hidden",{variants:{size:{default:"h-10 w-10",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"default",radius:"default",variant:"default"}}),gw=Jd.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,nn.jsx)(fw,{ref:a,className:I("moonui-theme",nG({size:t,radius:r,variant:o}),e),...n}));gw.displayName=fw.displayName;var ak=Jd.forwardRef(({className:e,...t},r)=>(0,nn.jsx)(pw,{ref:r,className:I("moonui-theme","aspect-square h-full w-full",e),...t}));ak.displayName=pw.displayName;var hw=Jd.forwardRef(({className:e,...t},r)=>(0,nn.jsx)(mw,{ref:r,className:I("flex h-full w-full items-center justify-center bg-muted",e),...t}));hw.displayName=mw.displayName;var ik=Jd.forwardRef(({className:e,limit:t,avatars:r,overlapOffset:o=-8,...n},a)=>{let i=t?r.slice(0,t):r,s=t?Math.max(0,r.length-t):0;return(0,nn.jsx)("div",{ref:a,className:I("moonui-theme","flex items-center",e),...n,children:(0,nn.jsxs)("div",{className:"flex",children:[i.map((l,u)=>(0,nn.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${o}px`,zIndex:i.length-u},children:l},u)),s>0&&(0,nn.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,nn.jsx)(gw,{variant:"border",children:(0,nn.jsxs)(hw,{children:["+",s]})})})]})})});ik.displayName="AvatarGroup";var lr=b(M()),sk=J(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-gray-900 text-white","hover:bg-gray-800 dark:hover:bg-gray-700","focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40","dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-white","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-white","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}});function co({className:e,variant:t,size:r,radius:o,withDot:n,dotColor:a,removable:i,onRemove:s,leftIcon:l,rightIcon:u,noAutoSpacing:c,children:d,...f}){let p=l,h=d;return t==="pro"&&(p=l||(0,lr.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[(0,lr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,lr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,lr.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),h=d||"Pro"),t==="admin"&&(p=l||(0,lr.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:(0,lr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),h=d||"Admin Pro"),(0,lr.jsxs)("div",{className:I("moonui-theme",sk({variant:t,size:r,radius:o}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,lr.jsx)("span",{className:I("h-2 w-2 rounded-full",a||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),p&&(0,lr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,lr.jsx)("span",{className:"inline-flex items-center",children:h}),u&&(0,lr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,lr.jsx)("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:m=>{m.stopPropagation(),s()},"aria-label":"Remove badge",children:(0,lr.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:(0,lr.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var Vn=b(E());var Tr=b(M()),aG=J("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),lk=Vn.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Tr.jsx)("nav",{ref:n,className:I("moonui-theme",aG({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));lk.displayName="Breadcrumb";var uk=Vn.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=Vn.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Tr.jsxs)("ol",{ref:n,className:I("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Tr.jsx)(vw,{}),l]})}return(0,Tr.jsx)("ol",{ref:n,className:I("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});uk.displayName="BreadcrumbList";var ck=Vn.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?Vn.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Tr.jsx)("li",{ref:a,className:I("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Tr.jsx)(i,{className:I("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...s,children:n.children})})});ck.displayName="BreadcrumbItem";var dk=({children:e,className:t,...r})=>(0,Tr.jsx)("span",{role:"presentation","aria-hidden":"true",className:I("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Tr.jsx)(Pr,{className:"h-3.5 w-3.5"})});dk.displayName="BreadcrumbSeparator";var vw=({className:e,...t})=>(0,Tr.jsxs)("span",{role:"presentation","aria-hidden":"true",className:I("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Tr.jsx)(Fn,{className:"h-4 w-4"}),(0,Tr.jsx)("span",{className:"sr-only",children:"More pages"})]});vw.displayName="BreadcrumbEllipsis";var fk=Vn.forwardRef(({className:e,href:t,...r},o)=>(0,Tr.jsx)("a",{ref:o,href:t,className:I("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...r}));fk.displayName="BreadcrumbLink";var pk=Vn.forwardRef(({className:e,...t},r)=>(0,Tr.jsx)("span",{ref:r,className:I("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));pk.displayName="BreadcrumbPage";var mk=b(E());var hg=b(M()),gg=J(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-gray-200 dark:border-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),Fe=mk.forwardRef(({className:e,variant:t,size:r,rounded:o,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,hg.jsxs)("button",{className:I("moonui-theme",gg({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"data-loading":i?"":void 0,...d,children:[i&&(0,hg.jsx)(Qt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Fe.displayName="Button";var $s=b(E());var Vf=b(M(),1),zn=b(E(),1);var gk=b(E(),1),pu=(0,gk.createContext)({});var hk=b(E(),1);function Bn(e){let t=(0,hk.useRef)(null);return t.current===null&&(t.current=e()),t.current}var vg=b(E(),1);var mu=typeof window<"u";var gu=mu?vg.useLayoutEffect:vg.useEffect;var Qw=b(M(),1),yM=b(E(),1),Of=b(E(),1);var vk=b(E(),1),vi=(0,vk.createContext)(null);var hM=b(M(),1);function Is(e,t){e.indexOf(t)===-1&&e.push(t)}function an(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Ut=(e,t,r)=>r>t?t:r<e?e:r;var pa=()=>{},Zt=()=>{};var ur={};var ef=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function tf(e){return typeof e=="object"&&e!==null}var rf=e=>/^0[^.\s]+$/u.test(e);function Ps(e){let t;return()=>(t===void 0&&(t=e()),t)}var mt=e=>e;var iG=(e,t)=>r=>t(e(r)),sn=(...e)=>e.reduce(iG);var Mo=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var ma=class{constructor(){this.subscriptions=[]}add(t){return Is(this.subscriptions,t),()=>an(this.subscriptions,t)}notify(t,r,o){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,o);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var St=e=>e*1e3,Jt=e=>e/1e3;function of(e,t){return t?e*(1e3/t):0}var yk=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var xk=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,sG=1e-7,lG=12;function uG(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=xk(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>sG&&++s<lG);return i}function yi(e,t,r,o){if(e===t&&r===o)return mt;let n=a=>uG(a,0,1,e,r);return a=>a===0||a===1?a:xk(n(a),t,o)}var yg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var xg=e=>t=>1-e(1-t);var wg=yi(.33,1.53,.69,.99),hu=xg(wg),nf=yg(hu);var af=e=>(e*=2)<1?.5*hu(e):.5*(2-Math.pow(2,-10*(e-1)));var sf=e=>1-Math.sin(Math.acos(e)),lf=xg(sf),uf=yg(sf);var yw=yi(.42,0,1,1),xw=yi(0,0,.58,1),cf=yi(.42,0,.58,1);var df=e=>Array.isArray(e)&&typeof e[0]!="number";function ff(e,t){return df(e)?e[yk(0,e.length,t)]:e}var pf=e=>Array.isArray(e)&&typeof e[0]=="number";var wk={linear:mt,easeIn:yw,easeInOut:cf,easeOut:xw,circIn:sf,circInOut:uf,circOut:lf,backIn:hu,backInOut:nf,backOut:wg,anticipate:af},cG=e=>typeof e=="string",Cg=e=>{if(pf(e)){Zt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return yi(t,r,o,n)}else if(cG(e))return Zt(wk[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),wk[e];return e};var mf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var qr={value:null,addProjectionMetrics:null};function Ck(e,t){let r=new Set,o=new Set,n=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){i.has(d)&&(c.schedule(d),e()),l++,d(s)}let c={schedule:(d,f=!1,p=!1)=>{let m=p&&n?r:o;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[r,o]=[o,r],r.forEach(u),t&&qr.value&&qr.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var dG=40;function Sg(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=mf.reduce((y,w)=>(y[w]=Ck(a,t?w:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{let y=ur.useManualTiming?n.timestamp:performance.now();r=!1,ur.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(y-n.timestamp,dG),1)),n.timestamp=y,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),c.process(n),d.process(n),f.process(n),p.process(n),h.process(n),n.isProcessing=!1,r&&t&&(o=!1,e(m))},x=()=>{r=!0,o=!0,n.isProcessing||e(m)};return{schedule:mf.reduce((y,w)=>{let C=i[w];return y[w]=(R,S=!1,L=!1)=>(r||x(),C.schedule(R,S,L)),y},{}),cancel:y=>{for(let w=0;w<mf.length;w++)i[mf[w]].cancel(y)},state:n,steps:i}}var{schedule:xe,cancel:cr,state:yt,steps:gf}=Sg(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);var bg;function fG(){bg=void 0}var xt={now:()=>(bg===void 0&&xt.set(yt.isProcessing||ur.useManualTiming?yt.timestamp:performance.now()),bg),set:e=>{bg=e,queueMicrotask(fG)}};var ln={layout:0,mainThread:0,waapi:0};var Sk=e=>t=>typeof t=="string"&&t.startsWith(e),Ts=Sk("--"),pG=Sk("var(--"),ks=e=>pG(e)?mG.test(e.split("/*")[0].trim()):!1,mG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Hn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ga={...Hn,transform:e=>Ut(0,1,e)},hf={...Hn,default:1};var xi=e=>Math.round(e*1e5)/1e5;var vu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bk(e){return e==null}var Rk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var yu=(e,t)=>r=>!!(typeof r=="string"&&Rk.test(r)&&r.startsWith(e)||t&&!bk(r)&&Object.prototype.hasOwnProperty.call(r,t)),Rg=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(vu);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var gG=e=>Ut(0,255,e),ww={...Hn,transform:e=>Math.round(gG(e))},Un={test:yu("rgb","red"),parse:Rg("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+ww.transform(e)+", "+ww.transform(t)+", "+ww.transform(r)+", "+xi(ga.transform(o))+")"};function hG(e){let t="",r="",o="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,o+=o,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:n?parseInt(n,16)/255:1}}var vf={test:yu("#"),parse:hG,transform:Un.transform};var yf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),un=yf("deg"),dr=yf("%"),re=yf("px"),Cw=yf("vh"),Sw=yf("vw"),Lg=(()=>({...dr,parse:e=>dr.parse(e)/100,transform:e=>dr.transform(e*100)}))();var wi={test:yu("hsl","hue"),parse:Rg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+dr.transform(xi(t))+", "+dr.transform(xi(r))+", "+xi(ga.transform(o))+")"};var st={test:e=>Un.test(e)||vf.test(e)||wi.test(e),parse:e=>Un.test(e)?Un.parse(e):wi.test(e)?wi.parse(e):vf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Un.transform(e):wi.transform(e),getAnimatableNone:e=>{let t=st.parse(e);return t.alpha=0,st.transform(t)}};var Lk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vG(e){return isNaN(e)&&typeof e=="string"&&(e.match(vu)?.length||0)+(e.match(Lk)?.length||0)>0}var Pk="number",Tk="color",yG="var",xG="var(",Ik="${}",wG=/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 Ci(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(wG,l=>(st.test(l)?(o.color.push(a),n.push(Tk),r.push(st.parse(l))):l.startsWith(xG)?(o.var.push(a),n.push(yG),r.push(l)):(o.number.push(a),n.push(Pk),r.push(parseFloat(l))),++a,Ik)).split(Ik);return{values:r,split:s,indexes:o,types:n}}function kk(e){return Ci(e).values}function Mk(e){let{split:t,types:r}=Ci(e),o=t.length;return n=>{let a="";for(let i=0;i<o;i++)if(a+=t[i],n[i]!==void 0){let s=r[i];s===Pk?a+=xi(n[i]):s===Tk?a+=st.transform(n[i]):a+=n[i]}return a}}var CG=e=>typeof e=="number"?0:st.test(e)?st.getAnimatableNone(e):e;function SG(e){let t=kk(e);return Mk(e)(t.map(CG))}var fr={test:vG,parse:kk,createTransformer:Mk,getAnimatableNone:SG};function bw(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Ek({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let n=0,a=0,i=0;if(!t)n=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=bw(l,s,e+1/3),a=bw(l,s,e),i=bw(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function xu(e,t){return r=>r>0?t:e}var Se=(e,t,r)=>e+(t-e)*r;var Rw=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},bG=[vf,Un,wi],RG=e=>bG.find(t=>t.test(e));function Ak(e){let t=RG(e);if(pa(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===wi&&(r=Ek(r)),r}var Lw=(e,t)=>{let r=Ak(e),o=Ak(t);if(!r||!o)return xu(e,t);let n={...r};return a=>(n.red=Rw(r.red,o.red,a),n.green=Rw(r.green,o.green,a),n.blue=Rw(r.blue,o.blue,a),n.alpha=Se(r.alpha,o.alpha,a),Un.transform(n))};var Ig=new Set(["none","hidden"]);function Dk(e,t){return Ig.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function LG(e,t){return r=>Se(e,t,r)}function Pg(e){return typeof e=="number"?LG:typeof e=="string"?ks(e)?xu:st.test(e)?Lw:TG:Array.isArray(e)?Nk:typeof e=="object"?st.test(e)?Lw:IG:xu}function Nk(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>Pg(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function IG(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=Pg(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function PG(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][o[a]],s=e.values[i]??0;r[n]=s,o[a]++}return r}var TG=(e,t)=>{let r=fr.createTransformer(t),o=Ci(e),n=Ci(t);return o.indexes.var.length===n.indexes.var.length&&o.indexes.color.length===n.indexes.color.length&&o.indexes.number.length>=n.indexes.number.length?Ig.has(e)&&!n.values.length||Ig.has(t)&&!o.values.length?Dk(e,t):sn(Nk(PG(o,n),n.values),r):(pa(!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"),xu(e,t))};function Tg(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Se(e,t,r):Pg(e)(e,t)}var _k=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>xe.update(t,r),stop:()=>cr(t),now:()=>yt.isProcessing?yt.timestamp:xt.now()}};var kg=(e,t,r=10)=>{let o="",n=Math.max(Math.round(t/r),2);for(let a=0;a<n;a++)o+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`};function wu(e){let t=0,r=50,o=e.next(t);for(;!o.done&&t<2e4;)t+=r,o=e.next(t);return t>=2e4?1/0:t}function xf(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(wu(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Jt(n)}}var kG=5;function Mg(e,t,r){let o=Math.max(t-kG,0);return of(r-e(o),t-o)}var tt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Pw=.001;function Ok({duration:e=tt.duration,bounce:t=tt.bounce,velocity:r=tt.velocity,mass:o=tt.mass}){let n,a;pa(e<=St(tt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Ut(tt.minDamping,tt.maxDamping,i),e=Ut(tt.minDuration,tt.maxDuration,Jt(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=Eg(u,i),h=Math.exp(-d);return Pw-f/p*h},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,h=Math.exp(-d),m=Eg(Math.pow(u,2),i);return(-n(u)+Pw>0?-1:1)*((f-p)*h)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-Pw+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=EG(n,a,s);if(e=St(e),isNaN(l))return{stiffness:tt.stiffness,damping:tt.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var MG=12;function EG(e,t,r){let o=r;for(let n=1;n<MG;n++)o=o-e(o)/t(o);return o}function Eg(e,t){return e*Math.sqrt(1-t*t)}var AG=["duration","bounce"],DG=["stiffness","damping","mass"];function Fk(e,t){return t.some(r=>e[r]!==void 0)}function NG(e){let t={velocity:tt.velocity,stiffness:tt.stiffness,damping:tt.damping,mass:tt.mass,isResolvedFromDuration:!1,...e};if(!Fk(e,DG)&&Fk(e,AG))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Ut(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:tt.mass,stiffness:n,damping:a}}else{let r=Ok(e);t={...t,...r,mass:tt.mass},t.isResolvedFromDuration=!0}return t}function ha(e=tt.visualDuration,t=tt.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:n}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=NG({...r,velocity:-Jt(r.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,v=Jt(Math.sqrt(l/c)),g=Math.abs(x)<5;o||(o=g?tt.restSpeed.granular:tt.restSpeed.default),n||(n=g?tt.restDelta.granular:tt.restDelta.default);let y;if(m<1){let C=Eg(v,m);y=R=>{let S=Math.exp(-m*v*R);return i-S*((h+m*v*x)/C*Math.sin(C*R)+x*Math.cos(C*R))}}else if(m===1)y=C=>i-Math.exp(-v*C)*(x+(h+v*x)*C);else{let C=v*Math.sqrt(m*m-1);y=R=>{let S=Math.exp(-m*v*R),L=Math.min(C*R,300);return i-S*((h+m*v*x)*Math.sinh(L)+C*x*Math.cosh(L))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let R=y(C);if(p)s.done=C>=d;else{let S=C===0?h:0;m<1&&(S=C===0?St(h):Mg(y,C,R));let L=Math.abs(S)<=o,T=Math.abs(i-R)<=n;s.done=L&&T}return s.value=s.done?i:R,s},toString:()=>{let C=Math.min(wu(w),2e4),R=kg(S=>w.next(C*S).value,C,30);return C+"ms "+R},toTransition:()=>{}};return w}ha.applyToOptions=e=>{let t=xf(e,100,ha);return e.ease=t.ease,e.duration=St(t.duration),e.type="keyframes",e};function wf({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},p=L=>s!==void 0&&L<s||l!==void 0&&L>l,h=L=>s===void 0?l:l===void 0||Math.abs(s-L)<Math.abs(l-L)?s:l,m=r*t,x=d+m,v=i===void 0?x:i(x);v!==x&&(m=v-d);let g=L=>-m*Math.exp(-L/o),y=L=>v+g(L),w=L=>{let T=g(L),P=y(L);f.done=Math.abs(T)<=u,f.value=f.done?v:P},C,R,S=L=>{p(f.value)&&(C=L,R=ha({keyframes:[f.value,h(f.value)],velocity:Mg(y,L,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:L=>{let T=!1;return!R&&C===void 0&&(T=!0,w(L),S(L)),C!==void 0&&L>=C?R.next(L-C):(!T&&w(L),f)}}}function _G(e,t,r){let o=[],n=r||ur.mix||Tg,a=e.length-1;for(let i=0;i<a;i++){let s=n(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||mt:t;s=sn(l,s)}o.push(s)}return o}function Ag(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(Zt(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=_G(t,o,n),l=s.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=Mo(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Ut(e[0],e[a-1],c)):u}function Cf(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=Mo(0,t,o);e.push(Se(r,1,n))}}function Sf(e){let t=[0];return Cf(t,e.length-1),t}function Vk(e,t){return e.map(r=>r*t)}function OG(e,t){return e.map(()=>t||cf).splice(0,e.length-1)}function Ms({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=df(o)?o.map(Cg):Cg(o),a={done:!1,value:t[0]},i=Vk(r&&r.length===t.length?r:Sf(t),e),s=Ag(i,t,{ease:Array.isArray(n)?n:OG(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var FG=e=>e!==null;function Cu(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(FG),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var VG={decay:wf,inertia:wf,tween:Ms,keyframes:Ms,spring:ha};function Dg(e){typeof e.type=="string"&&(e.type=VG[e.type])}var Si=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var BG=e=>e/100,va=class extends Si{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==xt.now()&&this.tick(xt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},ln.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Dg(t);let{type:r=Ms,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||Ms;l!==Ms&&typeof s[0]!="number"&&(this.mixKeyframes=sn(BG,Tg(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=wu(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(o+1)-n,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:o,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>n;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,w=o;if(d){let L=Math.min(this.currentTime,n)/s,T=Math.floor(L),P=L%1;!P&&L>=1&&(P=1),P===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(P=1-P,p&&(P-=p/s)):f==="mirror"&&(w=i)),y=Ut(0,1,P)*s}let C=g?{done:!1,value:c[0]}:w.next(y);a&&(C.value=a(C.value));let{done:R}=C;!g&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return S&&h!==wf&&(C.value=Cu(c,this.options,x,this.speed)),m&&m(C.value),S&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return Jt(this.calculatedDuration)}get time(){return Jt(this.currentTime)}set time(t){t=St(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(xt.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Jt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=_k,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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,ln.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Bk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Es=e=>e*180/Math.PI,Tw=e=>{let t=Es(Math.atan2(e[1],e[0]));return kw(t)},HG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tw,rotateZ:Tw,skewX:e=>Es(Math.atan(e[1])),skewY:e=>Es(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},kw=e=>(e=e%360,e<0&&(e+=360),e),Hk=Tw,Uk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),UG={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Uk,scaleY:zk,scale:e=>(Uk(e)+zk(e))/2,rotateX:e=>kw(Es(Math.atan2(e[6],e[5]))),rotateY:e=>kw(Es(Math.atan2(-e[2],e[0]))),rotateZ:Hk,rotate:Hk,skewX:e=>Es(Math.atan(e[4])),skewY:e=>Es(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bf(e){return e.includes("scale")?1:0}function Rf(e,t){if(!e||e==="none")return bf(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=UG,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=HG,n=s}if(!n)return bf(t);let a=o[t],i=n[1].split(",").map(zG);return typeof a=="function"?a(i):i[a]}var Mw=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Rf(r,t)};function zG(e){return parseFloat(e.trim())}var cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fo=(()=>new Set(cn))();var Ew=e=>e===Hn||e===re,WG=new Set(["x","y","z"]),GG=cn.filter(e=>!WG.has(e));function Wk(e){let t=[];return GG.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var bi={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})=>Rf(t,"x"),y:(e,{transform:t})=>Rf(t,"y")};bi.translateX=bi.x;bi.translateY=bi.y;var As=new Set,Aw=!1,Dw=!1,Nw=!1;function Gk(){if(Dw){let e=Array.from(As).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=Wk(o);n.length&&(r.set(o,n),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();let n=r.get(o);n&&n.forEach(([a,i])=>{o.getValue(a)?.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Dw=!1,Aw=!1,As.forEach(e=>e.complete(Nw)),As.clear()}function jk(){As.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Dw=!0)})}function _w(){Nw=!0,jk(),Gk(),Nw=!1}var ya=class{constructor(t,r,o,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(As.add(this),Aw||(Aw=!0,xe.read(jk),xe.resolveKeyframes(Gk))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:o,motionValue:n}=this;if(t[0]===null){let a=n?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&r){let s=o.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}Bk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),As.delete(this)}cancel(){this.state==="scheduled"&&(As.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var qk=e=>e.startsWith("--");function $k(e,t,r){qk(t)?e.style.setProperty(t,r):e.style[t]=r}var Kk=Ps(()=>window.ScrollTimeline!==void 0);var Xk={};function Yk(e,t){let r=Ps(e);return()=>Xk[t]??r()}var Ng=Yk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Ds=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var Ow={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ds([0,.65,.55,1]),circOut:Ds([.55,0,1,.45]),backIn:Ds([.31,.01,.66,-.59]),backOut:Ds([.33,1.53,.69,.99])};function Fw(e,t){if(e)return typeof e=="function"?Ng()?kg(e,t):"ease-out":pf(e)?Ds(e):Array.isArray(e)?e.map(r=>Fw(r,t)||Ow.easeOut):Ow[e]}function Qk(e,t,r,{delay:o=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:r};l&&(c.offset=l);let d=Fw(s,n);Array.isArray(d)&&(c.easing=d),qr.value&&ln.waapi++;let f={delay:o,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=e.animate(c,f);return qr.value&&p.finished.finally(()=>{ln.waapi--}),p}function Ns(e){return typeof e=="function"&&"applyToOptions"in e}function Zk({type:e,...t}){return Ns(e)&&Ng()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var _g=class extends Si{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:o,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Zt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Zk(t);this.animation=Qk(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=Cu(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):$k(r,o,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Jt(Number(t))}get time(){return Jt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=St(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Kk()?(this.animation.timeline=t,mt):r(this)}};var Jk={anticipate:af,backInOut:nf,circInOut:uf};function jG(e){return e in Jk}function eM(e){typeof e.ease=="string"&&jG(e.ease)&&(e.ease=Jk[e.ease])}var tM=10,Og=class extends _g{constructor(t){eM(t),Dg(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:o,onComplete:n,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new va({...i,autoplay:!1}),l=St(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-tM).value,s.sample(l).value,tM),s.stop()}};var Vw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fr.test(e)||e==="0")&&!e.startsWith("url("));function qG(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function rM(e,t,r,o){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=Vw(n,t),s=Vw(a,t);return pa(i===s,`You are trying to animate ${t} from "${n}" to "${a}". "${i?a:n}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:qG(e)||(r==="spring"||Ns(r))&&o}function Su(e){e.duration=0,e.type}var $G=new Set(["opacity","clipPath","filter","transform"]),KG=Ps(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function oM(e){let{motionValue:t,name:r,repeatDelay:o,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return KG()&&r&&$G.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var XG=40,Lf=class extends Si{constructor({autoplay:t=!0,delay:r=0,type:o="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xt.now();let f={autoplay:t,delay:r,type:o,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||ya;this.keyframeResolver=new p(s,(h,m,x)=>this.onKeyframesResolved(h,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=o;this.resolvedAt=xt.now(),rM(t,a,i,s)||((ur.instantAnimations||!l)&&c?.(Cu(t,o,r)),t[0]=t[t.length-1],Su(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>XG?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&oM(f)?new Og({...f,element:f.motionValue.owner.current}):new va(f);p.finished.then(()=>this.notifyFinished()).catch(mt),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(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),_w()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var Fg=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=r}attachTimeline(t){let r=this.animations.map(o=>o.attachTimeline(t));return()=>{r.forEach((o,n)=>{o&&o(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var If=class extends Fg{then(t,r){return this.finished.finally(t).then(()=>{})}};var YG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QG(e){let t=YG.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var ZG=4;function Bw(e,t,r=1){Zt(r<=ZG,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=QG(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return ef(i)?parseFloat(i):i}return ks(n)?Bw(n,t,r+1):n}function _s(e,t){return e?.[t]??e?.default??e}var Pf=new Set(["width","height","top","left","right","bottom",...cn]);var nM={test:e=>e==="auto",parse:e=>e};var Vg=e=>t=>t.test(e);var Hw=[Hn,re,dr,un,Sw,Cw,nM],Uw=e=>Hw.find(Vg(e));function aM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rf(e):!0}var JG=new Set(["brightness","contrast","saturate","opacity"]);function ej(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(vu)||[];if(!o)return e;let n=r.replace(o,""),a=JG.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var tj=/\b([a-z-]*)\(.*?\)/gu,Tf={...fr,getAnimatableNone:e=>{let t=e.match(tj);return t?t.map(ej).join(" "):e}};var zw={...Hn,transform:Math.round};var iM={rotate:un,rotateX:un,rotateY:un,rotateZ:un,scale:hf,scaleX:hf,scaleY:hf,scaleZ:hf,skew:un,skewX:un,skewY:un,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:ga,originX:Lg,originY:Lg,originZ:re};var Os={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,...iM,zIndex:zw,fillOpacity:ga,strokeOpacity:ga,numOctaves:zw};var sM={...Os,color:st,backgroundColor:st,outlineColor:st,fill:st,stroke:st,borderColor:st,borderTopColor:st,borderRightColor:st,borderBottomColor:st,borderLeftColor:st,filter:Tf,WebkitFilter:Tf},kf=e=>sM[e];function Mf(e,t){let r=kf(e);return r!==Tf&&(r=fr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var rj=new Set(["auto","none","0"]);function lM(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!rj.has(a)&&Ci(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=Mf(r,n)}var Ef=class extends ya{constructor(t,r,o,n,a){super(t,r,o,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),ks(u))){let c=Bw(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Pf.has(o)||t.length!==2)return;let[n,a]=t,i=Uw(n),s=Uw(a);if(i!==s)if(Ew(i)&&Ew(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else bi[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||aM(t[n]))&&o.push(n);o.length&&lM(t,o,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bi[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let n=r[r.length-1];n!==void 0&&t.getValue(o,n).jump(n,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let n=t.getValue(r);n&&n.jump(this.measuredOrigin,!1);let a=o.length-1,i=o[a];o[a]=bi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function Af(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=r?.[e]??o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Df=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Nf(e){return tf(e)&&"offsetHeight"in e}var uM=30,oj=e=>!isNaN(parseFloat(e)),Fs={current:void 0},Bg=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=xt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new ma);let o=this.events[t].add(r);return t==="change"?()=>{o(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Fs.current&&Fs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>uM)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,uM);return of(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 $r(e,t){return new Bg(e,t)}var{schedule:Vs,cancel:nj}=Sg(queueMicrotask,!1);var Eo={x:!1,y:!1};function Hg(){return Eo.x||Eo.y}function Ww(e){return e==="x"||e==="y"?Eo[e]?null:(Eo[e]=!0,()=>{Eo[e]=!1}):Eo.x||Eo.y?null:(Eo.x=Eo.y=!0,()=>{Eo.x=Eo.y=!1})}function Ug(e,t){let r=Af(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function cM(e){return!(e.pointerType==="touch"||Hg())}function Gw(e,t,r={}){let[o,n,a]=Ug(e,r),i=s=>{if(!cM(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{cM(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var jw=(e,t)=>t?e===t?!0:jw(e,t.parentElement):!1;var Bs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var aj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dM(e){return aj.has(e.tagName)||e.tabIndex!==-1}var bu=new WeakSet;function fM(e){return t=>{t.key==="Enter"&&e(t)}}function qw(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var pM=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=fM(()=>{if(bu.has(r))return;qw(r,"down");let n=fM(()=>{qw(r,"up")}),a=()=>qw(r,"cancel");r.addEventListener("keyup",n,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",o,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),t)};function mM(e){return Bs(e)&&!Hg()}function $w(e,t,r={}){let[o,n,a]=Ug(e,r),i=s=>{let l=s.currentTarget;if(!mM(s))return;bu.add(l);let u=t(l,s),c=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),bu.has(l)&&bu.delete(l),mM(p)&&typeof u=="function"&&u(p,{success:h})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||jw(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return o.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Nf(s)&&(s.addEventListener("focus",u=>pM(u,n)),!dM(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Hs(e){return tf(e)&&"ownerSVGElement"in e}function _f(e){return Hs(e)&&e.tagName==="svg"}function Kw(...e){let t=!Array.isArray(e[0]),r=t?0:-1,o=e[0+r],n=e[1+r],a=e[2+r],i=e[3+r],s=Ag(n,a,i);return t?s(o):s}var Me=e=>!!(e&&e.getVelocity);var ij=[...Hw,st,fr],Xw=e=>ij.find(Vg(e));var zg=b(E(),1),xa=b(E(),1);var gM=b(E(),1),Ri=(0,gM.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var Yw=class extends zg.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Nf(o)&&o.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function vM({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,xa.useId)(),a=(0,xa.useRef)(null),i=(0,xa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,xa.useContext)(Ri);return(0,xa.useInsertionEffect)(()=>{let{width:l,height:u,top:c,left:d,right:f}=i.current;if(t||!a.current||!l||!u)return;let p=r==="left"?`left: ${d}`:`right: ${f}`;a.current.dataset.motionPopId=n;let h=document.createElement("style");s&&(h.nonce=s);let m=o??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
10
- [data-motion-pop-id="${n}"] {
2
+ var tA=Object.create;var Wx=Object.defineProperty;var oA=Object.getOwnPropertyDescriptor;var rA=Object.getOwnPropertyNames;var aA=Object.getPrototypeOf,nA=Object.prototype.hasOwnProperty;var sA=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var aa=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var iA=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of rA(t))!nA.call(e,a)&&a!==o&&Wx(e,a,{get:()=>t[a],enumerable:!(r=oA(t,a))||r.enumerable});return e};var b=(e,t,o)=>(o=e!=null?tA(aA(e)):{},iA(t||!e||!e.__esModule?Wx(o,"default",{value:e,enumerable:!0}):o,e));var rv=aa(ye=>{"use strict";var om=Symbol.for("react.transitional.element"),lA=Symbol.for("react.portal"),uA=Symbol.for("react.fragment"),cA=Symbol.for("react.strict_mode"),dA=Symbol.for("react.profiler"),fA=Symbol.for("react.consumer"),mA=Symbol.for("react.context"),pA=Symbol.for("react.forward_ref"),gA=Symbol.for("react.suspense"),hA=Symbol.for("react.memo"),Zx=Symbol.for("react.lazy"),$x=Symbol.iterator;function xA(e){return e===null||typeof e!="object"?null:(e=$x&&e[$x]||e["@@iterator"],typeof e=="function"?e:null)}var Qx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jx=Object.assign,ev={};function Zn(e,t,o){this.props=e,this.context=t,this.refs=ev,this.updater=o||Qx}Zn.prototype.isReactComponent={};Zn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Zn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tv(){}tv.prototype=Zn.prototype;function rm(e,t,o){this.props=e,this.context=t,this.refs=ev,this.updater=o||Qx}var am=rm.prototype=new tv;am.constructor=rm;Jx(am,Zn.prototype);am.isPureReactComponent=!0;var jx=Array.isArray,Ke={H:null,A:null,T:null,S:null,V:null},ov=Object.prototype.hasOwnProperty;function nm(e,t,o,r,a,n){return o=n.ref,{$$typeof:om,type:e,key:t,ref:o!==void 0?o:null,props:n}}function vA(e,t){return nm(e.type,t,void 0,void 0,void 0,e.props)}function sm(e){return typeof e=="object"&&e!==null&&e.$$typeof===om}function yA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return t[o]})}var Kx=/\/+/g;function tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yA(""+e.key):t.toString(36)}function Xx(){}function bA(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Xx,Xx):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Yn(e,t,o,r,a){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(n){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case om:case lA:s=!0;break;case Zx:return s=e._init,Yn(s(e._payload),t,o,r,a)}}if(s)return a=a(e),s=r===""?"."+tm(e,0):r,jx(a)?(o="",s!=null&&(o=s.replace(Kx,"$&/")+"/"),Yn(a,t,o,"",function(u){return u})):a!=null&&(sm(a)&&(a=vA(a,o+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Kx,"$&/")+"/")+s)),t.push(a)),1;s=0;var i=r===""?".":r+":";if(jx(e))for(var l=0;l<e.length;l++)r=e[l],n=i+tm(r,l),s+=Yn(r,t,o,n,a);else if(l=xA(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,n=i+tm(r,l++),s+=Yn(r,t,o,n,a);else if(n==="object"){if(typeof e.then=="function")return Yn(bA(e),t,o,r,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function Fu(e,t,o){if(e==null)return e;var r=[],a=0;return Yn(e,r,"","",function(n){return t.call(o,n,a++)}),r}function CA(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(o){(e._status===0||e._status===-1)&&(e._status=1,e._result=o)},function(o){(e._status===0||e._status===-1)&&(e._status=2,e._result=o)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yx=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function wA(){}ye.Children={map:Fu,forEach:function(e,t,o){Fu(e,function(){t.apply(this,arguments)},o)},count:function(e){var t=0;return Fu(e,function(){t++}),t},toArray:function(e){return Fu(e,function(t){return t})||[]},only:function(e){if(!sm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Zn;ye.Fragment=uA;ye.Profiler=dA;ye.PureComponent=rm;ye.StrictMode=cA;ye.Suspense=gA;ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ke;ye.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ke.H.useMemoCache(e)}};ye.cache=function(e){return function(){return e.apply(null,arguments)}};ye.cloneElement=function(e,t,o){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Jx({},e.props),a=e.key,n=void 0;if(t!=null)for(s in t.ref!==void 0&&(n=void 0),t.key!==void 0&&(a=""+t.key),t)!ov.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=o;else if(1<s){for(var i=Array(s),l=0;l<s;l++)i[l]=arguments[l+2];r.children=i}return nm(e.type,a,void 0,void 0,n,r)};ye.createContext=function(e){return e={$$typeof:mA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:fA,_context:e},e};ye.createElement=function(e,t,o){var r,a={},n=null;if(t!=null)for(r in t.key!==void 0&&(n=""+t.key),t)ov.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=o;else if(1<s){for(var i=Array(s),l=0;l<s;l++)i[l]=arguments[l+2];a.children=i}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)a[r]===void 0&&(a[r]=s[r]);return nm(e,n,void 0,void 0,null,a)};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:pA,render:e}};ye.isValidElement=sm;ye.lazy=function(e){return{$$typeof:Zx,_payload:{_status:-1,_result:e},_init:CA}};ye.memo=function(e,t){return{$$typeof:hA,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Ke.T,o={};Ke.T=o;try{var r=e(),a=Ke.S;a!==null&&a(o,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(wA,Yx)}catch(n){Yx(n)}finally{Ke.T=t}};ye.unstable_useCacheRefresh=function(){return Ke.H.useCacheRefresh()};ye.use=function(e){return Ke.H.use(e)};ye.useActionState=function(e,t,o){return Ke.H.useActionState(e,t,o)};ye.useCallback=function(e,t){return Ke.H.useCallback(e,t)};ye.useContext=function(e){return Ke.H.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e,t){return Ke.H.useDeferredValue(e,t)};ye.useEffect=function(e,t,o){var r=Ke.H;if(typeof o=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return r.useEffect(e,t)};ye.useId=function(){return Ke.H.useId()};ye.useImperativeHandle=function(e,t,o){return Ke.H.useImperativeHandle(e,t,o)};ye.useInsertionEffect=function(e,t){return Ke.H.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return Ke.H.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return Ke.H.useMemo(e,t)};ye.useOptimistic=function(e,t){return Ke.H.useOptimistic(e,t)};ye.useReducer=function(e,t,o){return Ke.H.useReducer(e,t,o)};ye.useRef=function(e){return Ke.H.useRef(e)};ye.useState=function(e){return Ke.H.useState(e)};ye.useSyncExternalStore=function(e,t,o){return Ke.H.useSyncExternalStore(e,t,o)};ye.useTransition=function(){return Ke.H.useTransition()};ye.version="19.1.1"});var A=aa((S3,av)=>{"use strict";av.exports=rv()});var sv=aa(Ou=>{"use strict";var SA=Symbol.for("react.transitional.element"),RA=Symbol.for("react.fragment");function nv(e,t,o){var r=null;if(o!==void 0&&(r=""+o),t.key!==void 0&&(r=""+t.key),"key"in t){o={};for(var a in t)a!=="key"&&(o[a]=t[a])}else o=t;return t=o.ref,{$$typeof:SA,type:e,key:r,ref:t!==void 0?t:null,props:o}}Ou.Fragment=RA;Ou.jsx=nv;Ou.jsxs=nv});var D=aa((I3,iv)=>{"use strict";iv.exports=sv()});var gv=aa(Ht=>{"use strict";var FA=A();function pv(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function sa(){}var Bt={d:{f:sa,r:function(){throw Error(pv(522))},D:sa,C:sa,L:sa,m:sa,X:sa,S:sa,M:sa},p:0,findDOMNode:null},OA=Symbol.for("react.portal");function _A(e,t,o){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:OA,key:r==null?null:""+r,children:e,containerInfo:t,implementation:o}}var Ri=FA.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Bu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Bt;Ht.createPortal=function(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(pv(299));return _A(e,t,null,o)};Ht.flushSync=function(e){var t=Ri.T,o=Bt.p;try{if(Ri.T=null,Bt.p=2,e)return e()}finally{Ri.T=t,Bt.p=o,Bt.d.f()}};Ht.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Bt.d.C(e,t))};Ht.prefetchDNS=function(e){typeof e=="string"&&Bt.d.D(e)};Ht.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var o=t.as,r=Bu(o,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;o==="style"?Bt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:n}):o==="script"&&Bt.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ht.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var o=Bu(t.as,t.crossOrigin);Bt.d.M(e,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Bt.d.M(e)};Ht.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var o=t.as,r=Bu(o,t.crossOrigin);Bt.d.L(e,o,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Ht.preloadModule=function(e,t){if(typeof e=="string")if(t){var o=Bu(t.as,t.crossOrigin);Bt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Bt.d.m(e)};Ht.requestFormReset=function(e){Bt.d.r(e)};Ht.unstable_batchedUpdates=function(e,t){return e(t)};Ht.useFormState=function(e,t,o){return Ri.H.useFormState(e,t,o)};Ht.useFormStatus=function(){return Ri.H.useHostTransitionStatus()};Ht.version="19.1.1"});var Jn=aa((W3,xv)=>{"use strict";function hv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hv)}catch(e){console.error(e)}}hv(),xv.exports=gv()});var vy=aa(xy=>{"use strict";var hs=A();function UE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GE=typeof Object.is=="function"?Object.is:UE,zE=hs.useState,qE=hs.useEffect,WE=hs.useLayoutEffect,$E=hs.useDebugValue;function jE(e,t){var o=t(),r=zE({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return WE(function(){a.value=o,a.getSnapshot=t,Rm(a)&&n({inst:a})},[e,o,t]),qE(function(){return Rm(a)&&n({inst:a}),e(function(){Rm(a)&&n({inst:a})})},[e]),$E(o),o}function Rm(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!GE(e,o)}catch{return!0}}function KE(e,t){return t()}var XE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?KE:jE;xy.useSyncExternalStore=hs.useSyncExternalStore!==void 0?hs.useSyncExternalStore:XE});var by=aa(($q,yy)=>{"use strict";yy.exports=vy()});var Ju=b(A());var Qt=b(A(),1);var Co=b(A(),1),im=b(D(),1);function lv(e,t){let o=Co.createContext(t),r=n=>{let{children:s,...i}=n,l=Co.useMemo(()=>i,Object.values(i));return(0,im.jsx)(o.Provider,{value:l,children:s})};r.displayName=e+"Provider";function a(n){let s=Co.useContext(o);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[r,a]}function Re(e,t=[]){let o=[];function r(n,s){let i=Co.createContext(s),l=o.length;o=[...o,s];let u=d=>{let{scope:f,children:m,...p}=d,g=f?.[e]?.[l]||i,h=Co.useMemo(()=>p,Object.values(p));return(0,im.jsx)(g.Provider,{value:h,children:m})};u.displayName=n+"Provider";function c(d,f){let m=f?.[e]?.[l]||i,p=Co.useContext(m);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${n}\``)}return[u,c]}let a=()=>{let n=o.map(s=>Co.createContext(s));return function(i){let l=i?.[e]||n;return Co.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,IA(a,...t)]}function IA(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){let s=r.reduce((i,{useScope:l,scopeName:u})=>{let d=l(n)[`__scope${u}`];return{...i,...d}},{});return Co.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}var na=b(A(),1);var cv=b(A(),1);function uv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lo(...e){return t=>{let o=!1,r=e.map(a=>{let n=uv(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():uv(e[a],null)}}}}function ee(...e){return cv.useCallback(lo(...e),e)}var ut=b(A(),1);var Qn=b(D(),1);function uo(e){let t=LA(e),o=ut.forwardRef((r,a)=>{let{children:n,...s}=r,i=ut.Children.toArray(n),l=i.find(PA);if(l){let u=l.props.children,c=i.map(d=>d===l?ut.Children.count(u)>1?ut.Children.only(null):ut.isValidElement(u)?u.props.children:null:d);return(0,Qn.jsx)(t,{...s,ref:a,children:ut.isValidElement(u)?ut.cloneElement(u,void 0,c):null})}return(0,Qn.jsx)(t,{...s,ref:a,children:n})});return o.displayName=`${e}.Slot`,o}function LA(e){let t=ut.forwardRef((o,r)=>{let{children:a,...n}=o;if(ut.isValidElement(a)){let s=MA(a),i=TA(n,a.props);return a.type!==ut.Fragment&&(i.ref=r?lo(r,s):s),ut.cloneElement(a,i)}return ut.Children.count(a)>1?ut.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dv=Symbol("radix.slottable");function fv(e){let t=({children:o})=>(0,Qn.jsx)(Qn.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=dv,t}function PA(e){return ut.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dv}function TA(e,t){let o={...t};for(let r in t){let a=e[r],n=t[r];/^on[A-Z]/.test(r)?a&&n?o[r]=(...i)=>{let l=n(...i);return a(...i),l}:a&&(o[r]=a):r==="style"?o[r]={...a,...n}:r==="className"&&(o[r]=[a,n].filter(Boolean).join(" "))}return{...e,...o}}function MA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var _u=b(D(),1),kA=b(A(),1);var AA=b(D(),1);function lr(e){let t=e+"CollectionProvider",[o,r]=Re(t),[a,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{let{scope:h,children:v}=g,x=na.default.useRef(null),y=na.default.useRef(new Map).current;return(0,_u.jsx)(a,{scope:h,itemMap:y,collectionRef:x,children:v})};s.displayName=t;let i=e+"CollectionSlot",l=uo(i),u=na.default.forwardRef((g,h)=>{let{scope:v,children:x}=g,y=n(i,v),R=ee(h,y.collectionRef);return(0,_u.jsx)(l,{ref:R,children:x})});u.displayName=i;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=uo(c),m=na.default.forwardRef((g,h)=>{let{scope:v,children:x,...y}=g,R=na.default.useRef(null),C=ee(h,R),w=n(c,v);return na.default.useEffect(()=>(w.itemMap.set(R,{ref:R,...y}),()=>void w.itemMap.delete(R))),(0,_u.jsx)(f,{[d]:"",ref:C,children:x})});m.displayName=c;function p(g){let h=n(e+"CollectionConsumer",g);return na.default.useCallback(()=>{let x=h.collectionRef.current;if(!x)return[];let y=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((w,I)=>y.indexOf(w.ref.current)-y.indexOf(I.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},p,r]}var V3=!!(typeof window<"u"&&window.document&&window.document.createElement);function V(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a.defaultPrevented)return t?.(a)}}var wo=b(A(),1);var mv=b(A(),1),Le=globalThis?.document?mv.useLayoutEffect:()=>{};var Vu=b(A(),1);var DA=wo[" useInsertionEffect ".trim().toString()]||Le;function Fe({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=EA({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;{let c=wo.useRef(e!==void 0);wo.useEffect(()=>{let d=c.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=i},[i,r])}let u=wo.useCallback(c=>{if(i){let d=NA(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[i,e,n,s]);return[l,u]}function EA({defaultProp:e,onChange:t}){let[o,r]=wo.useState(e),a=wo.useRef(o),n=wo.useRef(t);return DA(()=>{n.current=t},[t]),wo.useEffect(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function NA(e){return typeof e=="function"}var G3=Symbol("RADIX:SYNC_STATE");var vv=b(A(),1),yv=b(Jn(),1);var bv=b(D(),1),VA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=VA.reduce((e,t)=>{let o=uo(`Primitive.${t}`),r=vv.forwardRef((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,bv.jsx)(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function es(e,t){e&&yv.flushSync(()=>e.dispatchEvent(t))}var wt=b(A(),1);var Zt=b(A(),1);var Cv=b(A(),1);function BA(e,t){return Cv.useReducer((o,r)=>t[o][r]??o,e)}var Oe=e=>{let{present:t,children:o}=e,r=HA(t),a=typeof o=="function"?o({present:r.isPresent}):Zt.Children.only(o),n=ee(r.ref,UA(a));return typeof o=="function"||r.isPresent?Zt.cloneElement(a,{ref:n}):null};Oe.displayName="Presence";function HA(e){let[t,o]=Zt.useState(),r=Zt.useRef(null),a=Zt.useRef(e),n=Zt.useRef("none"),s=e?"mounted":"unmounted",[i,l]=BA(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Zt.useEffect(()=>{let u=Hu(r.current);n.current=i==="mounted"?u:"none"},[i]),Le(()=>{let u=r.current,c=a.current;if(c!==e){let f=n.current,m=Hu(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Le(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=m=>{let g=Hu(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!a.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},f=m=>{m.target===t&&(n.current=Hu(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:Zt.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Hu(e){return e?.animationName||"none"}function UA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var lm=b(A(),1);var GA=lm[" useId ".trim().toString()]||(()=>{}),zA=0;function Pe(e){let[t,o]=lm.useState(GA());return Le(()=>{e||o(r=>r??String(zA++))},[e]),e||(t?`radix-${t}`:"")}var Qa=b(D(),1),Uu="Collapsible",[qA,um]=Re(Uu),[WA,cm]=qA(Uu),wv=wt.forwardRef((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:a,disabled:n,onOpenChange:s,...i}=e,[l,u]=Fe({prop:r,defaultProp:a??!1,onChange:s,caller:Uu});return(0,Qa.jsx)(WA,{scope:o,disabled:n,contentId:Pe(),open:l,onOpenToggle:wt.useCallback(()=>u(c=>!c),[u]),children:(0,Qa.jsx)(H.div,{"data-state":fm(l),"data-disabled":n?"":void 0,...i,ref:t})})});wv.displayName=Uu;var Sv="CollapsibleTrigger",Rv=wt.forwardRef((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=cm(Sv,o);return(0,Qa.jsx)(H.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":fm(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:V(e.onClick,a.onOpenToggle)})});Rv.displayName=Sv;var dm="CollapsibleContent",Iv=wt.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=cm(dm,e.__scopeCollapsible);return(0,Qa.jsx)(Oe,{present:o||a.open,children:({present:n})=>(0,Qa.jsx)($A,{...r,ref:t,present:n})})});Iv.displayName=dm;var $A=wt.forwardRef((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=cm(dm,o),[i,l]=wt.useState(r),u=wt.useRef(null),c=ee(t,u),d=wt.useRef(0),f=d.current,m=wt.useRef(0),p=m.current,g=s.open||i,h=wt.useRef(g),v=wt.useRef(void 0);return wt.useEffect(()=>{let x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),Le(()=>{let x=u.current;if(x){v.current=v.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";let y=x.getBoundingClientRect();d.current=y.height,m.current=y.width,h.current||(x.style.transitionDuration=v.current.transitionDuration,x.style.animationName=v.current.animationName),l(r)}},[s.open,r]),(0,Qa.jsx)(H.div,{"data-state":fm(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...n,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:g&&a})});function fm(e){return e?"open":"closed"}var Gu=wv,ts=Rv,Ii=Iv;var zu=b(A(),1),jA=b(D(),1),KA=zu.createContext(void 0);function So(e){let t=zu.useContext(KA);return e||t||"ltr"}var ct=b(D(),1),Ho="Accordion",XA=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[pm,YA,ZA]=lr(Ho),[Wu,xG]=Re(Ho,[ZA,um]),gm=um(),Pv=Qt.default.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return(0,ct.jsx)(pm.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?(0,ct.jsx)(tD,{...n,ref:t}):(0,ct.jsx)(eD,{...a,ref:t})})});Pv.displayName=Ho;var[Tv,QA]=Wu(Ho),[Mv,JA]=Wu(Ho,{collapsible:!1}),eD=Qt.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},collapsible:n=!1,...s}=e,[i,l]=Fe({prop:o,defaultProp:r??"",onChange:a,caller:Ho});return(0,ct.jsx)(Tv,{scope:e.__scopeAccordion,value:Qt.default.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:Qt.default.useCallback(()=>n&&l(""),[n,l]),children:(0,ct.jsx)(Mv,{scope:e.__scopeAccordion,collapsible:n,children:(0,ct.jsx)(kv,{...s,ref:t})})})}),tD=Qt.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},...n}=e,[s,i]=Fe({prop:o,defaultProp:r??[],onChange:a,caller:Ho}),l=Qt.default.useCallback(c=>i((d=[])=>[...d,c]),[i]),u=Qt.default.useCallback(c=>i((d=[])=>d.filter(f=>f!==c)),[i]);return(0,ct.jsx)(Tv,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:(0,ct.jsx)(Mv,{scope:e.__scopeAccordion,collapsible:!0,children:(0,ct.jsx)(kv,{...n,ref:t})})})}),[oD,$u]=Wu(Ho),kv=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:a,orientation:n="vertical",...s}=e,i=Qt.default.useRef(null),l=ee(i,t),u=YA(o),d=So(a)==="ltr",f=V(e.onKeyDown,m=>{if(!XA.includes(m.key))return;let p=m.target,g=u().filter(L=>!L.ref.current?.disabled),h=g.findIndex(L=>L.ref.current===p),v=g.length;if(h===-1)return;m.preventDefault();let x=h,y=0,R=v-1,C=()=>{x=h+1,x>R&&(x=y)},w=()=>{x=h-1,x<y&&(x=R)};switch(m.key){case"Home":x=y;break;case"End":x=R;break;case"ArrowRight":n==="horizontal"&&(d?C():w());break;case"ArrowDown":n==="vertical"&&C();break;case"ArrowLeft":n==="horizontal"&&(d?w():C());break;case"ArrowUp":n==="vertical"&&w();break}let I=x%v;g[I].ref.current?.focus()});return(0,ct.jsx)(oD,{scope:o,disabled:r,direction:a,orientation:n,children:(0,ct.jsx)(pm.Slot,{scope:o,children:(0,ct.jsx)(H.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:f})})})}),qu="AccordionItem",[rD,hm]=Wu(qu),Av=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=$u(qu,o),s=QA(qu,o),i=gm(o),l=Pe(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return(0,ct.jsx)(rD,{scope:o,open:u,disabled:c,triggerId:l,children:(0,ct.jsx)(Gu,{"data-orientation":n.orientation,"data-state":_v(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})})});Av.displayName=qu;var Dv="AccordionHeader",Ev=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=$u(Ho,o),n=hm(Dv,o);return(0,ct.jsx)(H.h3,{"data-orientation":a.orientation,"data-state":_v(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Ev.displayName=Dv;var mm="AccordionTrigger",Nv=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=$u(Ho,o),n=hm(mm,o),s=JA(mm,o),i=gm(o);return(0,ct.jsx)(pm.ItemSlot,{scope:o,children:(0,ct.jsx)(ts,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});Nv.displayName=mm;var Fv="AccordionContent",Ov=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=$u(Ho,o),n=hm(Fv,o),s=gm(o);return(0,ct.jsx)(Ii,{role:"region","aria-labelledby":n.triggerId,"data-orientation":a.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ov.displayName=Fv;function _v(e){return e?"open":"closed"}var Vv=Pv,Bv=Av,Hv=Ev,xm=Nv,vm=Ov;var Ku=b(A());var Uv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),ym=e=>{let t=nD(e);return t.charAt(0).toUpperCase()+t.slice(1)},ju=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),Gv=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Li=b(A());var zv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var qv=(0,Li.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>(0,Li.createElement)("svg",{ref:l,...zv,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:ju("lucide",a),...!n&&!Gv(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,c])=>(0,Li.createElement)(u,c)),...Array.isArray(n)?n:[n]]));var B=(e,t)=>{let o=(0,Ku.forwardRef)(({className:r,...a},n)=>(0,Ku.createElement)(qv,{ref:n,iconNode:t,className:ju(`lucide-${Uv(ym(e))}`,`lucide-${e}`,r),...a}));return o.displayName=ym(e),o};var sD=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Pi=B("align-center",sD);var iD=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Ti=B("align-justify",iD);var lD=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Mi=B("align-left",lD);var uD=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],ki=B("align-right",uD);var cD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],os=B("arrow-down",cD);var dD=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],rs=B("arrow-up-down",dD);var fD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],as=B("arrow-up",fD);var mD=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Ai=B("bold",mD);var pD=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ja=B("calendar",pD);var gD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],It=B("check",gD);var hD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ur=B("chevron-down",hD);var xD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Uo=B("chevron-left",xD);var vD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ut=B("chevron-right",vD);var yD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Di=B("chevron-up",yD);var bD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Go=B("circle-alert",bD);var CD=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ia=B("circle-check-big",CD);var wD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],en=B("circle",wD);var SD=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ei=B("clock",SD);var RD=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ni=B("code",RD);var ID=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Fi=B("copy",ID);var LD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Oi=B("credit-card",LD);var PD=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],ns=B("crown",PD);var TD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],cr=B("ellipsis",TD);var MD=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],_i=B("external-link",MD);var kD=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tn=B("eye",kD);var AD=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Vi=B("file-text",AD);var DD=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Bi=B("file",DD);var ED=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Hi=B("git-fork",ED);var ND=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],on=B("image",ND);var FD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ss=B("info",FD);var OD=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Ui=B("italic",OD);var _D=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Gi=B("link",_D);var VD=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],zi=B("list-ordered",VD);var BD=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],qi=B("list",BD);var HD=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],St=B("loader-circle",HD);var UD=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],is=B("lock",UD);var GD=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wi=B("minus",GD);var zD=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],$i=B("music",zD);var qD=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],ls=B("palette",qD);var WD=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ji=B("phone",WD);var $D=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],Xu=B("pipette",$D);var jD=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Ki=B("quote",jD);var KD=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],Xi=B("redo",KD);var XD=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],rn=B("search",XD);var YD=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Jt=B("square-pen",YD);var ZD=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],us=B("star",ZD);var QD=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],Yi=B("strikethrough",QD);var JD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],la=B("triangle-alert",JD);var eE=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Zi=B("underline",eE);var tE=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Qi=B("undo",tE);var oE=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ji=B("upload",oE);var rE=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],el=B("video",rE);var aE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],co=B("x",aE);var nE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],cs=B("zap",nE);function Wv(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=Wv(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Yu(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Wv(e))&&(r&&(r+=" "),r+=t);return r}var sE=e=>{let t=lE(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split("-");return i[0]===""&&i.length!==1&&i.shift(),Yv(i,t)||iE(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},Yv=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?Yv(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join("-");return t.validators.find(({validator:s})=>s(n))?.classGroupId},$v=/^\[(.+)\]$/,iE=e=>{if($v.test(e)){let t=$v.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},lE=e=>{let{theme:t,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(let a in o)wm(o[a],r,a,t);return r},wm=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:jv(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(uE(a)){wm(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{wm(s,jv(t,n),o,r)})})},jv=(e,t)=>{let o=e;return t.split("-").forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},uE=e=>e.isThemeGetter,cE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,s)=>{o.set(n,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let s=o.get(n);if(s!==void 0)return s;if((s=r.get(n))!==void 0)return a(n,s),s},set(n,s){o.has(n)?o.set(n,s):a(n,s)}}};var dE=e=>{let{prefix:t,experimentalParseClassName:o}=e,r=a=>{let n=[],s=0,i=0,l=0,u;for(let p=0;p<a.length;p++){let g=a[p];if(s===0&&i===0){if(g===":"){n.push(a.slice(l,p)),l=p+1;continue}if(g==="/"){u=p;continue}}g==="["?s++:g==="]"?s--:g==="("?i++:g===")"&&i--}let c=n.length===0?a:a.substring(l),d=fE(c),f=d!==c,m=u&&u>l?u-l:void 0;return{modifiers:n,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:m}};if(t){let a=t+":",n=r;r=s=>s.startsWith(a)?n(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(o){let a=r;r=n=>o({className:n,parseClassName:a})}return r},fE=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,mE=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;let a=[],n=[];return r.forEach(s=>{s[0]==="["||t[s]?(a.push(...n.sort(),s),n=[]):n.push(s)}),a.push(...n.sort()),a}},pE=e=>({cache:cE(e.cacheSize),parseClassName:dE(e),sortModifiers:mE(e),...sE(e)}),gE=/\s+/,hE=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:n}=t,s=[],i=e.trim().split(gE),l="";for(let u=i.length-1;u>=0;u-=1){let c=i[u],{isExternal:d,modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:g}=o(c);if(d){l=c+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?p.substring(0,g):p);if(!v){if(!h){l=c+(l.length>0?" "+l:l);continue}if(v=r(p),!v){l=c+(l.length>0?" "+l:l);continue}h=!1}let x=n(f).join(":"),y=m?x+"!":x,R=y+v;if(s.includes(R))continue;s.push(R);let C=a(v,h);for(let w=0;w<C.length;++w){let I=C[w];s.push(y+I)}l=c+(l.length>0?" "+l:l)}return l};function xE(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Zv(t))&&(r&&(r+=" "),r+=o);return r}var Zv=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Zv(e[r]))&&(o&&(o+=" "),o+=t);return o};function vE(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,d)=>d(c),e());return o=pE(u),r=o.cache.get,a=o.cache.set,n=i,i(l)}function i(l){let u=r(l);if(u)return u;let c=hE(l,o);return a(l,c),c}return function(){return n(xE.apply(null,arguments))}}var dt=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Qv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yE=/^\d+\/\d+$/,bE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ds=e=>yE.test(e),be=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>!!e&&Number.isInteger(Number(e)),bm=e=>e.endsWith("%")&&be(e.slice(0,-1)),Lr=e=>bE.test(e),IE=()=>!0,LE=e=>CE.test(e)&&!wE.test(e),ey=()=>!1,PE=e=>SE.test(e),TE=e=>RE.test(e),ME=e=>!Q(e)&&!J(e),kE=e=>fs(e,ry,ey),Q=e=>Qv.test(e),an=e=>fs(e,ay,LE),Cm=e=>fs(e,FE,be),Kv=e=>fs(e,ty,ey),AE=e=>fs(e,oy,TE),Zu=e=>fs(e,ny,PE),J=e=>Jv.test(e),tl=e=>ms(e,ay),DE=e=>ms(e,OE),Xv=e=>ms(e,ty),EE=e=>ms(e,ry),NE=e=>ms(e,oy),Qu=e=>ms(e,ny,!0),fs=(e,t,o)=>{let r=Qv.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},ms=(e,t,o=!1)=>{let r=Jv.exec(e);return r?r[1]?t(r[1]):o:!1},ty=e=>e==="position"||e==="percentage",oy=e=>e==="image"||e==="url",ry=e=>e==="length"||e==="size"||e==="bg-size",ay=e=>e==="length",FE=e=>e==="number",OE=e=>e==="family-name",ny=e=>e==="shadow";var _E=()=>{let e=dt("color"),t=dt("font"),o=dt("text"),r=dt("font-weight"),a=dt("tracking"),n=dt("leading"),s=dt("breakpoint"),i=dt("container"),l=dt("spacing"),u=dt("radius"),c=dt("shadow"),d=dt("inset-shadow"),f=dt("text-shadow"),m=dt("drop-shadow"),p=dt("blur"),g=dt("perspective"),h=dt("aspect"),v=dt("ease"),x=dt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...R(),J,Q],w=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],L=()=>[J,Q,l],P=()=>[ds,"full","auto",...L()],T=()=>[ua,"none","subgrid",J,Q],O=()=>["auto",{span:["full",ua,J,Q]},ua,J,Q],$=()=>[ua,"auto",J,Q],W=()=>["auto","min","max","fr",J,Q],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...L()],G=()=>[ds,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],M=()=>[e,J,Q],k=()=>[...R(),Xv,Kv,{position:[J,Q]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",EE,kE,{size:[J,Q]}],F=()=>[bm,tl,an],j=()=>["","none","full",u,J,Q],Z=()=>["",be,tl,an],X=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[be,bm,Xv,Kv],ce=()=>["","none",p,J,Q],he=()=>["none",be,J,Q],we=()=>["none",be,J,Q],_e=()=>[be,J,Q],We=()=>[ds,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Lr],breakpoint:[Lr],color:[IE],container:[Lr],"drop-shadow":[Lr],ease:["in","out","in-out"],font:[ME],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Lr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Lr],shadow:[Lr],spacing:["px",be],text:[Lr],"text-shadow":[Lr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ds,Q,J,h]}],container:["container"],columns:[{columns:[be,Q,J,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ua,"auto",J,Q]}],basis:[{basis:[ds,"full","auto",i,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,ds,"auto","initial","none",Q]}],grow:[{grow:["",be,J,Q]}],shrink:[{shrink:["",be,J,Q]}],order:[{order:[ua,"first","last","none",J,Q]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[i,"screen",...G()]}],"min-w":[{"min-w":[i,"screen","none",...G()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",o,tl,an]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,J,Cm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bm,Q]}],"font-family":[{font:[DE,Q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,J,Q]}],"line-clamp":[{"line-clamp":[be,"none",J,Cm]}],leading:[{leading:[n,...L()]}],"list-image":[{"list-image":["none",J,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",J,an]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[be,"auto",J,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ua,J,Q],radial:["",J,Q],conic:[ua,J,Q]},NE,AE]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,J,Q]}],"outline-w":[{outline:["",be,tl,an]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",c,Qu,Zu]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,Qu,Zu]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[be,an]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",f,Qu,Zu]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[be,J,Q]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[J,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Q]}],filter:[{filter:["","none",J,Q]}],blur:[{blur:ce()}],brightness:[{brightness:[be,J,Q]}],contrast:[{contrast:[be,J,Q]}],"drop-shadow":[{"drop-shadow":["","none",m,Qu,Zu]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",be,J,Q]}],"hue-rotate":[{"hue-rotate":[be,J,Q]}],invert:[{invert:["",be,J,Q]}],saturate:[{saturate:[be,J,Q]}],sepia:[{sepia:["",be,J,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Q]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[be,J,Q]}],"backdrop-contrast":[{"backdrop-contrast":[be,J,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,J,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,J,Q]}],"backdrop-invert":[{"backdrop-invert":["",be,J,Q]}],"backdrop-opacity":[{"backdrop-opacity":[be,J,Q]}],"backdrop-saturate":[{"backdrop-saturate":[be,J,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",be,J,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",J,Q]}],ease:[{ease:["linear","initial",v,J,Q]}],delay:[{delay:[be,J,Q]}],animate:[{animate:["none",x,J,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,J,Q]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J,Q]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[be,tl,an,Cm]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var sy=vE(_E);function S(...e){return sy(Yu(e))}var ca=b(D()),VE=Vv,iy=Ju.forwardRef(({className:e,...t},o)=>(0,ca.jsx)(Bv,{ref:o,className:S("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));iy.displayName="AccordionItem";var ly=Ju.forwardRef(({className:e,children:t,...o},r)=>(0,ca.jsx)(Hv,{className:"flex",children:(0,ca.jsxs)(xm,{ref:r,className:S("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary dark:hover:text-primary-400","[&[data-state=open]>svg]:rotate-180",e),...o,children:[t,(0,ca.jsx)(ur,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));ly.displayName=xm.displayName;var uy=Ju.forwardRef(({className:e,children:t,...o},r)=>(0,ca.jsx)(vm,{ref:r,className:S("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:(0,ca.jsx)("div",{className:"pb-4 pt-0",children:t})}));uy.displayName=vm.displayName;var ps=b(A());var cy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dy=Yu,te=(e,t)=>o=>{var r;if(t?.variants==null)return dy(e,o?.class,o?.className);let{variants:a,defaultVariants:n}=t,s=Object.keys(a).map(u=>{let c=o?.[u],d=n?.[u];if(c===null)return null;let f=cy(c)||cy(d);return a[u][f]}),i=o&&Object.entries(o).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(p=>{let[g,h]=p;return Array.isArray(h)?h.includes({...n,...i}[g]):{...n,...i}[g]===h})?[...u,d,f]:u},[]);return dy(e,s,l,o?.class,o?.className)};var Pr=b(D()),BE=te("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-blue-500/10 text-blue-500 border-blue-500/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),fy=ps.forwardRef(({className:e,variant:t="default",size:o,radius:r,hideIcon:a=!1,closable:n=!1,onClose:s,children:i,...l},u)=>{let c=ps.useMemo(()=>{switch(t){case"success":return It;case"warning":return la;case"error":return Go;case"info":return ss;default:return ss}},[t]);return(0,Pr.jsxs)("div",{ref:u,role:"alert",className:S("moonui-theme",BE({variant:t,size:o,radius:r,withClose:n}),e),...l,children:[!a&&(0,Pr.jsx)(c,{className:"h-5 w-5"}),(0,Pr.jsx)("div",{className:"flex-1",children:i}),n&&s&&(0,Pr.jsx)("button",{onClick:s,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Kapat",children:(0,Pr.jsx)(co,{className:"h-4 w-4"})})]})});fy.displayName="Alert";var my=ps.forwardRef(({className:e,...t},o)=>(0,Pr.jsx)("h5",{ref:o,className:S("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));my.displayName="AlertTitle";var py=ps.forwardRef(({className:e,...t},o)=>(0,Pr.jsx)("div",{ref:o,className:S("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));py.displayName="AlertDescription";var gy=b(A());var Sm=b(D()),HE=te("relative overflow-hidden",{variants:{variant:{default:"rounded-md bg-muted/10",ghost:"bg-transparent",outline:"rounded-md border border-border",card:"rounded-md bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default"}}),hy=gy.forwardRef(({className:e,variant:t,radius:o,ratio:r=16/9,style:a,children:n,...s},i)=>(0,Sm.jsx)("div",{ref:i,className:S("moonui-theme",HE({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:(0,Sm.jsx)("div",{className:"absolute inset-0",children:n})}));hy.displayName="AspectRatio";var rl=b(A());var Ro=b(A(),1);var gs=b(A(),1);function Te(e){let t=gs.useRef(e);return gs.useEffect(()=>{t.current=e}),gs.useMemo(()=>(...o)=>t.current?.(...o),[])}var Cy=b(by(),1);function wy(){return(0,Cy.useSyncExternalStore)(YE,()=>!0,()=>!1)}function YE(){return()=>{}}var ol=b(D(),1),Im="Avatar",[ZE,Jq]=Re(Im),[QE,Ry]=ZE(Im),Iy=Ro.forwardRef((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=Ro.useState("idle");return(0,ol.jsx)(QE,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:(0,ol.jsx)(H.span,{...r,ref:t})})});Iy.displayName=Im;var Ly="AvatarImage",Py=Ro.forwardRef((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=Ry(Ly,o),i=JE(r,n),l=Te(u=>{a(u),s.onImageLoadingStatusChange(u)});return Le(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?(0,ol.jsx)(H.img,{...n,ref:t,src:r}):null});Py.displayName=Ly;var Ty="AvatarFallback",My=Ro.forwardRef((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=Ry(Ty,o),[s,i]=Ro.useState(r===void 0);return Ro.useEffect(()=>{if(r!==void 0){let l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&n.imageLoadingStatus!=="loaded"?(0,ol.jsx)(H.span,{...a,ref:t}):null});My.displayName=Ty;function Sy(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function JE(e,{referrerPolicy:t,crossOrigin:o}){let r=wy(),a=Ro.useRef(null),n=r?(a.current||(a.current=new window.Image),a.current):null,[s,i]=Ro.useState(()=>Sy(n,e));return Le(()=>{i(Sy(n,e))},[n,e]),Le(()=>{let l=d=>()=>{i(d)};if(!n)return;let u=l("loaded"),c=l("error");return n.addEventListener("load",u),n.addEventListener("error",c),t&&(n.referrerPolicy=t),typeof o=="string"&&(n.crossOrigin=o),()=>{n.removeEventListener("load",u),n.removeEventListener("error",c)}},[n,o,t]),s}var Lm=Iy,Pm=Py,Tm=My;var zo=b(D()),t1=te("relative flex shrink-0 overflow-hidden",{variants:{size:{default:"h-10 w-10",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"default",radius:"default",variant:"default"}}),Mm=rl.forwardRef(({className:e,size:t,radius:o,variant:r,...a},n)=>(0,zo.jsx)(Lm,{ref:n,className:S("moonui-theme",t1({size:t,radius:o,variant:r}),e),...a}));Mm.displayName=Lm.displayName;var ky=rl.forwardRef(({className:e,...t},o)=>(0,zo.jsx)(Pm,{ref:o,className:S("moonui-theme","aspect-square h-full w-full",e),...t}));ky.displayName=Pm.displayName;var km=rl.forwardRef(({className:e,...t},o)=>(0,zo.jsx)(Tm,{ref:o,className:S("flex h-full w-full items-center justify-center bg-muted",e),...t}));km.displayName=Tm.displayName;var Ay=rl.forwardRef(({className:e,limit:t,avatars:o,overlapOffset:r=-8,...a},n)=>{let s=t?o.slice(0,t):o,i=t?Math.max(0,o.length-t):0;return(0,zo.jsx)("div",{ref:n,className:S("moonui-theme","flex items-center",e),...a,children:(0,zo.jsxs)("div",{className:"flex",children:[s.map((l,u)=>(0,zo.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${r}px`,zIndex:s.length-u},children:l},u)),i>0&&(0,zo.jsx)("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:(0,zo.jsx)(Mm,{variant:"border",children:(0,zo.jsxs)(km,{children:["+",i]})})})]})})});Ay.displayName="AvatarGroup";var Lt=b(D()),Dy=te(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-gray-900 text-white","hover:bg-gray-800 dark:hover:bg-gray-700","focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40","dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-white","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-white","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}});function fo({className:e,variant:t,size:o,radius:r,withDot:a,dotColor:n,removable:s,onRemove:i,leftIcon:l,rightIcon:u,noAutoSpacing:c,children:d,...f}){let m=l,p=d;return t==="pro"&&(m=l||(0,Lt.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[(0,Lt.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,Lt.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,Lt.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),p=d||"Pro"),t==="admin"&&(m=l||(0,Lt.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:(0,Lt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),p=d||"Admin Pro"),(0,Lt.jsxs)("div",{className:S("moonui-theme",Dy({variant:t,size:o,radius:r}),c&&"mr-0 mb-0",e),"data-removable":s?"":void 0,...f,children:[a&&(0,Lt.jsx)("span",{className:S("h-2 w-2 rounded-full",n||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),m&&(0,Lt.jsx)("span",{className:"inline-flex shrink-0 items-center",children:m}),(0,Lt.jsx)("span",{className:"inline-flex items-center",children:p}),u&&(0,Lt.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),s&&i&&(0,Lt.jsx)("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:g=>{g.stopPropagation(),i()},"aria-label":"Remove badge",children:(0,Lt.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:(0,Lt.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var dr=b(A());var Gt=b(D()),o1=te("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),Ey=dr.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,Gt.jsx)("nav",{ref:a,className:S("moonui-theme",o1({variant:t,size:o}),e),"aria-label":"breadcrumb",...r}));Ey.displayName="Breadcrumb";var Ny=dr.forwardRef(({className:e,collapsed:t,collapsedWidth:o=3,...r},a)=>{let n=dr.Children.toArray(r.children).filter(Boolean),s=n.length;if(t&&s>o){let i=n[0],l=n.slice(-2);return(0,Gt.jsxs)("ol",{ref:a,className:S("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[i,(0,Gt.jsx)(Am,{}),l]})}return(0,Gt.jsx)("ol",{ref:a,className:S("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Ny.displayName="BreadcrumbList";var Fy=dr.forwardRef(({className:e,isCurrent:t,href:o,asChild:r=!1,...a},n)=>{let s=r?dr.Fragment:o?"a":"span",i=r?{}:o?{href:o}:{};return(0,Gt.jsx)("li",{ref:n,className:S("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...a,children:(0,Gt.jsx)(s,{className:S("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...i,children:a.children})})});Fy.displayName="BreadcrumbItem";var Oy=({children:e,className:t,...o})=>(0,Gt.jsx)("span",{role:"presentation","aria-hidden":"true",className:S("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||(0,Gt.jsx)(Ut,{className:"h-3.5 w-3.5"})});Oy.displayName="BreadcrumbSeparator";var Am=({className:e,...t})=>(0,Gt.jsxs)("span",{role:"presentation","aria-hidden":"true",className:S("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Gt.jsx)(cr,{className:"h-4 w-4"}),(0,Gt.jsx)("span",{className:"sr-only",children:"More pages"})]});Am.displayName="BreadcrumbEllipsis";var _y=dr.forwardRef(({className:e,href:t,...o},r)=>(0,Gt.jsx)("a",{ref:r,href:t,className:S("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));_y.displayName="BreadcrumbLink";var Vy=dr.forwardRef(({className:e,...t},o)=>(0,Gt.jsx)("span",{ref:o,className:S("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Vy.displayName="BreadcrumbPage";var By=b(A());var tc=b(D()),ec=te(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-gray-200 dark:border-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),Ve=By.forwardRef(({className:e,variant:t,size:o,rounded:r,fullWidth:a,asChild:n=!1,loading:s=!1,leftIcon:i,rightIcon:l,children:u,disabled:c,...d},f)=>(0,tc.jsxs)("button",{className:S("moonui-theme",ec({variant:t,size:o,rounded:r,fullWidth:a,className:e})),ref:f,disabled:c||s,"data-loading":s?"":void 0,...d,children:[s&&(0,tc.jsx)(St,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,u,!s&&l]}));Ve.displayName="Button";var Tn=b(A());var Hl=b(D(),1),pr=b(A(),1);var Hy=b(A(),1),xs=(0,Hy.createContext)({});var Uy=b(A(),1);function Io(e){let t=(0,Uy.useRef)(null);return t.current===null&&(t.current=e()),t.current}var oc=b(A(),1);var vs=typeof window<"u";var da=vs?oc.useLayoutEffect:oc.useEffect;var dp=b(D(),1),zb=b(A(),1),Vl=b(A(),1);var Gy=b(A(),1),fa=(0,Gy.createContext)(null);var Ub=b(D(),1);function nn(e,t){e.indexOf(t)===-1&&e.push(t)}function qo(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var xt=(e,t,o)=>o>t?t:o<e?e:o;var Tr=()=>{},nt=()=>{};var Pt={};var al=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nl(e){return typeof e=="object"&&e!==null}var sl=e=>/^0[^.\s]+$/u.test(e);function sn(e){let t;return()=>(t===void 0&&(t=e()),t)}var Qe=e=>e;var r1=(e,t)=>o=>t(e(o)),Wo=(...e)=>e.reduce(r1);var Lo=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var Mr=class{constructor(){this.subscriptions=[]}add(t){return nn(this.subscriptions,t),()=>qo(this.subscriptions,t)}notify(t,o,r){let a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,o,r);else for(let n=0;n<a;n++){let s=this.subscriptions[n];s&&s(t,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var at=e=>e*1e3,Rt=e=>e/1e3;function il(e,t){return t?e*(1e3/t):0}var zy=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var qy=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,a1=1e-7,n1=12;function s1(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=qy(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>a1&&++i<n1);return s}function ma(e,t,o,r){if(e===t&&o===r)return Qe;let a=n=>s1(n,0,1,e,o);return n=>n===0||n===1?n:qy(a(n),t,r)}var rc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var ac=e=>t=>1-e(1-t);var nc=ma(.33,1.53,.69,.99),ys=ac(nc),ll=rc(ys);var ul=e=>(e*=2)<1?.5*ys(e):.5*(2-Math.pow(2,-10*(e-1)));var cl=e=>1-Math.sin(Math.acos(e)),dl=ac(cl),fl=rc(cl);var Dm=ma(.42,0,1,1),Em=ma(0,0,.58,1),ml=ma(.42,0,.58,1);var pl=e=>Array.isArray(e)&&typeof e[0]!="number";function gl(e,t){return pl(e)?e[zy(0,e.length,t)]:e}var hl=e=>Array.isArray(e)&&typeof e[0]=="number";var Wy={linear:Qe,easeIn:Dm,easeInOut:ml,easeOut:Em,circIn:cl,circInOut:fl,circOut:dl,backIn:ys,backInOut:ll,backOut:nc,anticipate:ul},i1=e=>typeof e=="string",sc=e=>{if(hl(e)){nt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,a]=e;return ma(t,o,r,a)}else if(i1(e))return nt(Wy[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Wy[e];return e};var xl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var eo={value:null,addProjectionMetrics:null};function $y(e,t){let o=new Set,r=new Set,a=!1,n=!1,s=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){s.has(d)&&(c.schedule(d),e()),l++,d(i)}let c={schedule:(d,f=!1,m=!1)=>{let g=m&&a?o:r;return f&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(i=d,a){n=!0;return}a=!0,[o,r]=[r,o],o.forEach(u),t&&eo.value&&eo.value.frameloop[t].push(l),l=0,o.clear(),a=!1,n&&(n=!1,c.process(d))}};return c}var l1=40;function ic(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=xl.reduce((y,R)=>(y[R]=$y(n,t?R:void 0),y),{}),{setup:i,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:m,postRender:p}=s,g=()=>{let y=Pt.useManualTiming?a.timestamp:performance.now();o=!1,Pt.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,l1),1)),a.timestamp=y,a.isProcessing=!0,i.process(a),l.process(a),u.process(a),c.process(a),d.process(a),f.process(a),m.process(a),p.process(a),a.isProcessing=!1,o&&t&&(r=!1,e(g))},h=()=>{o=!0,r=!0,a.isProcessing||e(g)};return{schedule:xl.reduce((y,R)=>{let C=s[R];return y[R]=(w,I=!1,L=!1)=>(o||h(),C.schedule(w,I,L)),y},{}),cancel:y=>{for(let R=0;R<xl.length;R++)s[xl[R]].cancel(y)},state:a,steps:s}}var{schedule:ve,cancel:Tt,state:tt,steps:vl}=ic(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qe,!0);var lc;function u1(){lc=void 0}var ot={now:()=>(lc===void 0&&ot.set(tt.isProcessing||Pt.useManualTiming?tt.timestamp:performance.now()),lc),set:e=>{lc=e,queueMicrotask(u1)}};var $o={layout:0,mainThread:0,waapi:0};var jy=e=>t=>typeof t=="string"&&t.startsWith(e),ln=jy("--"),c1=jy("var(--"),un=e=>c1(e)?d1.test(e.split("/*")[0].trim()):!1,d1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kr={...fr,transform:e=>xt(0,1,e)},yl={...fr,default:1};var pa=e=>Math.round(e*1e5)/1e5;var bs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ky(e){return e==null}var Xy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Cs=(e,t)=>o=>!!(typeof o=="string"&&Xy.test(o)&&o.startsWith(e)||t&&!Ky(o)&&Object.prototype.hasOwnProperty.call(o,t)),uc=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(bs);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var f1=e=>xt(0,255,e),Nm={...fr,transform:e=>Math.round(f1(e))},mr={test:Cs("rgb","red"),parse:uc("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+Nm.transform(e)+", "+Nm.transform(t)+", "+Nm.transform(o)+", "+pa(kr.transform(r))+")"};function m1(e){let t="",o="",r="",a="";return e.length>5?(t=e.substring(1,3),o=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),o=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,o+=o,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}var bl={test:Cs("#"),parse:m1,transform:mr.transform};var Cl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),jo=Cl("deg"),Mt=Cl("%"),ae=Cl("px"),Fm=Cl("vh"),Om=Cl("vw"),cc={...Mt,parse:e=>Mt.parse(e)/100,transform:e=>Mt.transform(e*100)};var ga={test:Cs("hsl","hue"),parse:uc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mt.transform(pa(t))+", "+Mt.transform(pa(o))+", "+pa(kr.transform(r))+")"};var Xe={test:e=>mr.test(e)||bl.test(e)||ga.test(e),parse:e=>mr.test(e)?mr.parse(e):ga.test(e)?ga.parse(e):bl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mr.transform(e):ga.transform(e),getAnimatableNone:e=>{let t=Xe.parse(e);return t.alpha=0,Xe.transform(t)}};var Yy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function p1(e){return isNaN(e)&&typeof e=="string"&&(e.match(bs)?.length||0)+(e.match(Yy)?.length||0)>0}var Qy="number",Jy="color",g1="var",h1="var(",Zy="${}",x1=/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 ha(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},a=[],n=0,i=t.replace(x1,l=>(Xe.test(l)?(r.color.push(n),a.push(Jy),o.push(Xe.parse(l))):l.startsWith(h1)?(r.var.push(n),a.push(g1),o.push(l)):(r.number.push(n),a.push(Qy),o.push(parseFloat(l))),++n,Zy)).split(Zy);return{values:o,split:i,indexes:r,types:a}}function eb(e){return ha(e).values}function tb(e){let{split:t,types:o}=ha(e),r=t.length;return a=>{let n="";for(let s=0;s<r;s++)if(n+=t[s],a[s]!==void 0){let i=o[s];i===Qy?n+=pa(a[s]):i===Jy?n+=Xe.transform(a[s]):n+=a[s]}return n}}var v1=e=>typeof e=="number"?0:Xe.test(e)?Xe.getAnimatableNone(e):e;function y1(e){let t=eb(e);return tb(e)(t.map(v1))}var kt={test:p1,parse:eb,createTransformer:tb,getAnimatableNone:y1};function _m(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function ob({hue:e,saturation:t,lightness:o,alpha:r}){e/=360,t/=100,o/=100;let a=0,n=0,s=0;if(!t)a=n=s=o;else{let i=o<.5?o*(1+t):o+t-o*t,l=2*o-i;a=_m(l,i,e+1/3),n=_m(l,i,e),s=_m(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function ws(e,t){return o=>o>0?t:e}var Ce=(e,t,o)=>e+(t-e)*o;var Vm=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},b1=[bl,mr,ga],C1=e=>b1.find(t=>t.test(e));function rb(e){let t=C1(e);if(Tr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let o=t.parse(e);return t===ga&&(o=ob(o)),o}var Bm=(e,t)=>{let o=rb(e),r=rb(t);if(!o||!r)return ws(e,t);let a={...o};return n=>(a.red=Vm(o.red,r.red,n),a.green=Vm(o.green,r.green,n),a.blue=Vm(o.blue,r.blue,n),a.alpha=Ce(o.alpha,r.alpha,n),mr.transform(a))};var dc=new Set(["none","hidden"]);function ab(e,t){return dc.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function w1(e,t){return o=>Ce(e,t,o)}function fc(e){return typeof e=="number"?w1:typeof e=="string"?un(e)?ws:Xe.test(e)?Bm:I1:Array.isArray(e)?nb:typeof e=="object"?Xe.test(e)?Bm:S1:ws}function nb(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>fc(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function S1(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=fc(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function R1(e,t){let o=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let n=t.types[a],s=e.indexes[n][r[n]],i=e.values[s]??0;o[a]=i,r[n]++}return o}var I1=(e,t)=>{let o=kt.createTransformer(t),r=ha(e),a=ha(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?dc.has(e)&&!a.values.length||dc.has(t)&&!r.values.length?ab(e,t):Wo(nb(R1(r,a),a.values),o):(Tr(!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"),ws(e,t))};function mc(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Ce(e,t,o):fc(e)(e,t)}var sb=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>ve.update(t,o),stop:()=>Tt(t),now:()=>tt.isProcessing?tt.timestamp:ot.now()}};var pc=(e,t,o=10)=>{let r="",a=Math.max(Math.round(t/o),2);for(let n=0;n<a;n++)r+=Math.round(e(n/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function Ss(e){let t=0,o=50,r=e.next(t);for(;!r.done&&t<2e4;)t+=o,r=e.next(t);return t>=2e4?1/0:t}function wl(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(Ss(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:Rt(a)}}var L1=5;function gc(e,t,o){let r=Math.max(t-L1,0);return il(o-e(r),t-r)}var $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Um=.001;function ib({duration:e=$e.duration,bounce:t=$e.bounce,velocity:o=$e.velocity,mass:r=$e.mass}){let a,n;Tr(e<=at($e.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=xt($e.minDamping,$e.maxDamping,s),e=xt($e.minDuration,$e.maxDuration,Rt(e)),s<1?(a=u=>{let c=u*s,d=c*e,f=c-o,m=hc(u,s),p=Math.exp(-d);return Um-f/m*p},n=u=>{let d=u*s*e,f=d*o+o,m=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=hc(Math.pow(u,2),s);return(-a(u)+Um>0?-1:1)*((f-m)*p)/g}):(a=u=>{let c=Math.exp(-u*e),d=(u-o)*e+1;return-Um+c*d},n=u=>{let c=Math.exp(-u*e),d=(o-u)*(e*e);return c*d});let i=5/e,l=T1(a,n,i);if(e=at(e),isNaN(l))return{stiffness:$e.stiffness,damping:$e.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}var P1=12;function T1(e,t,o){let r=o;for(let a=1;a<P1;a++)r=r-e(r)/t(r);return r}function hc(e,t){return e*Math.sqrt(1-t*t)}var M1=["duration","bounce"],k1=["stiffness","damping","mass"];function lb(e,t){return t.some(o=>e[o]!==void 0)}function A1(e){let t={velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1,...e};if(!lb(e,k1)&&lb(e,M1))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),a=r*r,n=2*xt(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:$e.mass,stiffness:a,damping:n}}else{let o=ib(e);t={...t,...o,mass:$e.mass},t.isResolvedFromDuration=!0}return t}function Ar(e=$e.visualDuration,t=$e.bounce){let o=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:a}=o,n=o.keyframes[0],s=o.keyframes[o.keyframes.length-1],i={done:!1,value:n},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:m}=A1({...o,velocity:-Rt(o.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),h=s-n,v=Rt(Math.sqrt(l/c)),x=Math.abs(h)<5;r||(r=x?$e.restSpeed.granular:$e.restSpeed.default),a||(a=x?$e.restDelta.granular:$e.restDelta.default);let y;if(g<1){let C=hc(v,g);y=w=>{let I=Math.exp(-g*v*w);return s-I*((p+g*v*h)/C*Math.sin(C*w)+h*Math.cos(C*w))}}else if(g===1)y=C=>s-Math.exp(-v*C)*(h+(p+v*h)*C);else{let C=v*Math.sqrt(g*g-1);y=w=>{let I=Math.exp(-g*v*w),L=Math.min(C*w,300);return s-I*((p+g*v*h)*Math.sinh(L)+C*h*Math.cosh(L))/C}}let R={calculatedDuration:m&&d||null,next:C=>{let w=y(C);if(m)i.done=C>=d;else{let I=C===0?p:0;g<1&&(I=C===0?at(p):gc(y,C,w));let L=Math.abs(I)<=r,P=Math.abs(s-w)<=a;i.done=L&&P}return i.value=i.done?s:w,i},toString:()=>{let C=Math.min(Ss(R),2e4),w=pc(I=>R.next(C*I).value,C,30);return C+"ms "+w},toTransition:()=>{}};return R}Ar.applyToOptions=e=>{let t=wl(e,100,Ar);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function Sl({keyframes:e,velocity:t=0,power:o=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:n=500,modifyTarget:s,min:i,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},m=L=>i!==void 0&&L<i||l!==void 0&&L>l,p=L=>i===void 0?l:l===void 0||Math.abs(i-L)<Math.abs(l-L)?i:l,g=o*t,h=d+g,v=s===void 0?h:s(h);v!==h&&(g=v-d);let x=L=>-g*Math.exp(-L/r),y=L=>v+x(L),R=L=>{let P=x(L),T=y(L);f.done=Math.abs(P)<=u,f.value=f.done?v:T},C,w,I=L=>{m(f.value)&&(C=L,w=Ar({keyframes:[f.value,p(f.value)],velocity:gc(y,L,f.value),damping:a,stiffness:n,restDelta:u,restSpeed:c}))};return I(0),{calculatedDuration:null,next:L=>{let P=!1;return!w&&C===void 0&&(P=!0,R(L),I(L)),C!==void 0&&L>=C?w.next(L-C):(!P&&R(L),f)}}}function D1(e,t,o){let r=[],a=o||Pt.mix||mc,n=e.length-1;for(let s=0;s<n;s++){let i=a(e[s],e[s+1]);if(t){let l=Array.isArray(t)?t[s]||Qe:t;i=Wo(l,i)}r.push(i)}return r}function xc(e,t,{clamp:o=!0,ease:r,mixer:a}={}){let n=e.length;if(nt(n===t.length,"Both input and output ranges must be the same length","range-length"),n===1)return()=>t[0];if(n===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let i=D1(t,r,a),l=i.length,u=c=>{if(s&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=Lo(e[d],e[d+1],c);return i[d](f)};return o?c=>u(xt(e[0],e[n-1],c)):u}function Rl(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let a=Lo(0,t,r);e.push(Ce(o,1,a))}}function Il(e){let t=[0];return Rl(t,e.length-1),t}function ub(e,t){return e.map(o=>o*t)}function E1(e,t){return e.map(()=>t||ml).splice(0,e.length-1)}function cn({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=pl(r)?r.map(sc):sc(r),n={done:!1,value:t[0]},s=ub(o&&o.length===t.length?o:Il(t),e),i=xc(s,t,{ease:Array.isArray(a)?a:E1(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var N1=e=>e!==null;function Rs(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(N1),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var F1={decay:Sl,inertia:Sl,tween:cn,keyframes:cn,spring:Ar};function vc(e){typeof e.type=="string"&&(e.type=F1[e.type])}var xa=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,o){return this.finished.then(t,o)}};var O1=e=>e/100,Dr=class extends xa{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==ot.now()&&this.tick(ot.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$o.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;vc(t);let{type:o=cn,repeat:r=0,repeatDelay:a=0,repeatType:n,velocity:s=0}=t,{keyframes:i}=t,l=o||cn;l!==cn&&typeof i[0]!="number"&&(this.mixKeyframes=Wo(O1,mc(i[0],i[1])),i=[0,100]);let u=l({...t,keyframes:i});n==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...i].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Ss(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=u}updateTime(t){let o=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(t,o=!1){let{generator:r,totalDuration:a,mixKeyframes:n,mirroredGenerator:s,resolvedDuration:i,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:m,type:p,onUpdate:g,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),o?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>a;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let y=this.currentTime,R=r;if(d){let L=Math.min(this.currentTime,a)/i,P=Math.floor(L),T=L%1;!T&&L>=1&&(T=1),T===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(f==="reverse"?(T=1-T,m&&(T-=m/i)):f==="mirror"&&(R=s)),y=xt(0,1,T)*i}let C=x?{done:!1,value:c[0]}:R.next(y);n&&(C.value=n(C.value));let{done:w}=C;!x&&l!==null&&(w=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);let I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return I&&p!==Sl&&(C.value=Rs(c,this.options,h,this.speed)),g&&g(C.value),I&&this.finish(),C}then(t,o){return this.finished.then(t,o)}get duration(){return Rt(this.calculatedDuration)}get time(){return Rt(this.currentTime)}set time(t){t=at(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ot.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=Rt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=sb,startTime:o}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ot.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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,$o.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function cb(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var dn=e=>e*180/Math.PI,Gm=e=>{let t=dn(Math.atan2(e[1],e[0]));return zm(t)},_1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gm,rotateZ:Gm,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zm=e=>(e=e%360,e<0&&(e+=360),e),db=Gm,fb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),V1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fb,scaleY:mb,scale:e=>(fb(e)+mb(e))/2,rotateX:e=>zm(dn(Math.atan2(e[6],e[5]))),rotateY:e=>zm(dn(Math.atan2(-e[2],e[0]))),rotateZ:db,rotate:db,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ll(e){return e.includes("scale")?1:0}function Pl(e,t){if(!e||e==="none")return Ll(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=V1,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_1,a=i}if(!a)return Ll(t);let n=r[t],s=a[1].split(",").map(B1);return typeof n=="function"?n(s):s[n]}var qm=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return Pl(o,t)};function B1(e){return parseFloat(e.trim())}var Ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mo=new Set(Ko);var Wm=e=>e===fr||e===ae,H1=new Set(["x","y","z"]),U1=Ko.filter(e=>!H1.has(e));function pb(e){let t=[];return U1.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var va={width:({x:e},{paddingLeft:t="0",paddingRight:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),height:({y:e},{paddingTop:t="0",paddingBottom:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),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})=>Pl(t,"x"),y:(e,{transform:t})=>Pl(t,"y")};va.translateX=va.x;va.translateY=va.y;var fn=new Set,$m=!1,jm=!1,Km=!1;function gb(){if(jm){let e=Array.from(fn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let a=pb(r);a.length&&(o.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();let a=o.get(r);a&&a.forEach(([n,s])=>{r.getValue(n)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}jm=!1,$m=!1,fn.forEach(e=>e.complete(Km)),fn.clear()}function hb(){fn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jm=!0)})}function Xm(){Km=!0,hb(),gb(),Km=!1}var Er=class{constructor(t,o,r,a,n,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=o,this.name=r,this.motionValue=a,this.element=n,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(fn.add(this),$m||($m=!0,ve.read(hb),ve.resolveKeyframes(gb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:o,element:r,motionValue:a}=this;if(t[0]===null){let n=a?.get(),s=t[t.length-1];if(n!==void 0)t[0]=n;else if(r&&o){let i=r.readValue(o,s);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=s),a&&n===void 0&&a.set(t[0])}cb(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fn.delete(this)}cancel(){this.state==="scheduled"&&(fn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var xb=e=>e.startsWith("--");function vb(e,t,o){xb(t)?e.style.setProperty(t,o):e.style[t]=o}var yb=sn(()=>window.ScrollTimeline!==void 0);var bb={};function Cb(e,t){let o=sn(e);return()=>bb[t]??o()}var yc=Cb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var mn=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var Ym={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mn([0,.65,.55,1]),circOut:mn([.55,0,1,.45]),backIn:mn([.31,.01,.66,-.59]),backOut:mn([.33,1.53,.69,.99])};function Zm(e,t){if(e)return typeof e=="function"?yc()?pc(e,t):"ease-out":hl(e)?mn(e):Array.isArray(e)?e.map(o=>Zm(o,t)||Ym.easeOut):Ym[e]}function wb(e,t,o,{delay:r=0,duration:a=300,repeat:n=0,repeatType:s="loop",ease:i="easeOut",times:l}={},u=void 0){let c={[t]:o};l&&(c.offset=l);let d=Zm(i,a);Array.isArray(d)&&(c.easing=d),eo.value&&$o.waapi++;let f={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:n+1,direction:s==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let m=e.animate(c,f);return eo.value&&m.finished.finally(()=>{$o.waapi--}),m}function pn(e){return typeof e=="function"&&"applyToOptions"in e}function Sb({type:e,...t}){return pn(e)&&yc()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var bc=class extends xa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:o,name:r,keyframes:a,pseudoElement:n,allowFlatten:s=!1,finalKeyframe:i,onComplete:l}=t;this.isPseudoElement=!!n,this.allowFlatten=s,this.options=t,nt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Sb(t);this.animation=wb(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=Rs(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):vb(o,r,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Rt(Number(t))}get time(){return Rt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&yb()?(this.animation.timeline=t,Qe):o(this)}};var Rb={anticipate:ul,backInOut:ll,circInOut:fl};function G1(e){return e in Rb}function Ib(e){typeof e.ease=="string"&&G1(e.ease)&&(e.ease=Rb[e.ease])}var Lb=10,Cc=class extends bc{constructor(t){Ib(t),vc(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:o,onUpdate:r,onComplete:a,element:n,...s}=this.options;if(!o)return;if(t!==void 0){o.set(t);return}let i=new Dr({...s,autoplay:!1}),l=at(this.finishedTime??this.time);o.setWithVelocity(i.sample(l-Lb).value,i.sample(l).value,Lb),i.stop()}};var Qm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(kt.test(e)||e==="0")&&!e.startsWith("url("));function z1(e){let t=e[0];if(e.length===1)return!0;for(let o=0;o<e.length;o++)if(e[o]!==t)return!0}function Pb(e,t,o,r){let a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;let n=e[e.length-1],s=Qm(a,t),i=Qm(n,t);return Tr(s===i,`You are trying to animate ${t} from "${a}" to "${n}". "${s?n:a}" is not an animatable value.`,"value-not-animatable"),!s||!i?!1:z1(e)||(o==="spring"||pn(o))&&r}function Is(e){e.duration=0,e.type}var q1=new Set(["opacity","clipPath","filter","transform"]),W1=sn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tb(e){let{motionValue:t,name:o,repeatDelay:r,repeatType:a,damping:n,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return W1()&&o&&q1.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var $1=40,Tl=class extends xa{constructor({autoplay:t=!0,delay:o=0,type:r="keyframes",repeat:a=0,repeatDelay:n=0,repeatType:s="loop",keyframes:i,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ot.now();let f={autoplay:t,delay:o,type:r,repeat:a,repeatDelay:n,repeatType:s,name:l,motionValue:u,element:c,...d},m=c?.KeyframeResolver||Er;this.keyframeResolver=new m(i,(p,g,h)=>this.onKeyframesResolved(p,g,f,!h),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,o,r,a){this.keyframeResolver=void 0;let{name:n,type:s,velocity:i,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=ot.now(),Pb(t,n,s,i)||((Pt.instantAnimations||!l)&&c?.(Rs(t,r,o)),t[0]=t[t.length-1],Is(r),r.repeat=0);let f={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>$1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},m=!u&&Tb(f)?new Cc({...f,element:f.motionValue.owner.current}):new Dr(f);m.finished.then(()=>this.notifyFinished()).catch(Qe),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Xm()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var wc=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,o){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=o}attachTimeline(t){let o=this.animations.map(r=>r.attachTimeline(t));return()=>{o.forEach((r,a)=>{r&&r(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let o=0;o<this.animations.length;o++)t=Math.max(t,this.animations[o].duration);return t}runAll(t){this.animations.forEach(o=>o[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var Ml=class extends wc{then(t,o){return this.finished.finally(t).then(()=>{})}};var j1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K1(e){let t=j1.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var X1=4;function Jm(e,t,o=1){nt(o<=X1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=K1(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return al(s)?parseFloat(s):s}return un(a)?Jm(a,t,o+1):a}function gn(e,t){return e?.[t]??e?.default??e}var kl=new Set(["width","height","top","left","right","bottom",...Ko]);var Mb={test:e=>e==="auto",parse:e=>e};var Sc=e=>t=>t.test(e);var ep=[fr,ae,Mt,jo,Om,Fm,Mb],tp=e=>ep.find(Sc(e));function kb(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sl(e):!0}var Y1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(bs)||[];if(!r)return e;let a=o.replace(r,""),n=Y1.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var Q1=/\b([a-z-]*)\(.*?\)/gu,Al={...kt,getAnimatableNone:e=>{let t=e.match(Q1);return t?t.map(Z1).join(" "):e}};var op={...fr,transform:Math.round};var Ab={rotate:jo,rotateX:jo,rotateY:jo,rotateZ:jo,scale:yl,scaleX:yl,scaleY:yl,scaleZ:yl,skew:jo,skewX:jo,skewY:jo,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:kr,originX:cc,originY:cc,originZ:ae};var hn={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,backgroundPositionX:ae,backgroundPositionY:ae,...Ab,zIndex:op,fillOpacity:kr,strokeOpacity:kr,numOctaves:op};var Db={...hn,color:Xe,backgroundColor:Xe,outlineColor:Xe,fill:Xe,stroke:Xe,borderColor:Xe,borderTopColor:Xe,borderRightColor:Xe,borderBottomColor:Xe,borderLeftColor:Xe,filter:Al,WebkitFilter:Al},Dl=e=>Db[e];function El(e,t){let o=Dl(e);return o!==Al&&(o=kt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var J1=new Set(["auto","none","0"]);function Eb(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!J1.has(n)&&ha(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=El(o,a)}var Nl=class extends Er{constructor(t,o,r,a,n){super(t,o,r,a,n,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),un(u))){let c=Jm(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!kl.has(r)||t.length!==2)return;let[a,n]=t,s=tp(a),i=tp(n);if(s!==i)if(Wm(s)&&Wm(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else va[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||kb(t[a]))&&r.push(a);r.length&&Eb(t,r,o)}measureInitialState(){let{element:t,unresolvedKeyframes:o,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=va[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o[0]=this.measuredOrigin;let a=o[o.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){let{element:t,name:o,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let a=t.getValue(o);a&&a.jump(this.measuredOrigin,!1);let n=r.length-1,s=r[n];r[n]=va[o](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,l])=>{t.getValue(i).set(l)}),this.resolveNoneKeyframes()}};function xn(e,t,o){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);let a=o?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}var Fl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ol(e){return nl(e)&&"offsetHeight"in e}var Nb=30,eN=e=>!isNaN(parseFloat(e)),vn={current:void 0},Rc=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let a=ot.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=o.owner}setCurrent(t){this.current=t,this.updatedAt=ot.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=eN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,o){this.events[t]||(this.events[t]=new Mr);let r=this.events[t].add(o);return t==="change"?()=>{r(),ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,o){this.passiveEffect=t,this.stopPassiveEffect=o}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,o=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return vn.current&&vn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ot.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Nb)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Nb);return il(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(t){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=t(o),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 to(e,t){return new Rc(e,t)}var{schedule:yn,cancel:tN}=ic(queueMicrotask,!1);var Po={x:!1,y:!1};function Ic(){return Po.x||Po.y}function rp(e){return e==="x"||e==="y"?Po[e]?null:(Po[e]=!0,()=>{Po[e]=!1}):Po.x||Po.y?null:(Po.x=Po.y=!0,()=>{Po.x=Po.y=!1})}function Lc(e,t){let o=xn(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function Fb(e){return!(e.pointerType==="touch"||Ic())}function ap(e,t,o={}){let[r,a,n]=Lc(e,o),s=i=>{if(!Fb(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=d=>{Fb(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var np=(e,t)=>t?e===t?!0:np(e,t.parentElement):!1;var bn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var oN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ob(e){return oN.has(e.tagName)||e.tabIndex!==-1}var Ls=new WeakSet;function _b(e){return t=>{t.key==="Enter"&&e(t)}}function sp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Vb=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=_b(()=>{if(Ls.has(o))return;sp(o,"down");let a=_b(()=>{sp(o,"up")}),n=()=>sp(o,"cancel");o.addEventListener("keyup",a,t),o.addEventListener("blur",n,t)});o.addEventListener("keydown",r,t),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),t)};function Bb(e){return bn(e)&&!Ic()}function ip(e,t,o={}){let[r,a,n]=Lc(e,o),s=i=>{let l=i.currentTarget;if(!Bb(i))return;Ls.add(l);let u=t(l,i),c=(m,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ls.has(l)&&Ls.delete(l),Bb(m)&&typeof u=="function"&&u(m,{success:p})},d=m=>{c(m,l===window||l===document||o.useGlobalTarget||np(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",f,a)};return r.forEach(i=>{(o.useGlobalTarget?window:i).addEventListener("pointerdown",s,a),Ol(i)&&(i.addEventListener("focus",u=>Vb(u,a)),!Ob(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Cn(e){return nl(e)&&"ownerSVGElement"in e}function _l(e){return Cn(e)&&e.tagName==="svg"}function lp(...e){let t=!Array.isArray(e[0]),o=t?0:-1,r=e[0+o],a=e[1+o],n=e[2+o],s=e[3+o],i=xc(a,n,s);return t?i(r):i}var ke=e=>!!(e&&e.getVelocity);var rN=[...ep,Xe,kt],up=e=>rN.find(Sc(e));var Pc=b(A(),1),Nr=b(A(),1);var Hb=b(A(),1),ya=(0,Hb.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var cp=class extends Pc.Component{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=Ol(r)&&r.offsetWidth||0,n=this.props.sizeRef.current;n.height=o.offsetHeight||0,n.width=o.offsetWidth||0,n.top=o.offsetTop,n.left=o.offsetLeft,n.right=a-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}};function Gb({children:e,isPresent:t,anchorX:o,root:r}){let a=(0,Nr.useId)(),n=(0,Nr.useRef)(null),s=(0,Nr.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=(0,Nr.useContext)(ya);return(0,Nr.useInsertionEffect)(()=>{let{width:l,height:u,top:c,left:d,right:f}=s.current;if(t||!n.current||!l||!u)return;let m=o==="left"?`left: ${d}`:`right: ${f}`;n.current.dataset.motionPopId=a;let p=document.createElement("style");i&&(p.nonce=i);let g=r??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
3
+ [data-motion-pop-id="${a}"] {
11
4
  position: absolute !important;
12
5
  width: ${l}px !important;
13
6
  height: ${u}px !important;
14
- ${p}px !important;
7
+ ${m}px !important;
15
8
  top: ${c}px !important;
16
9
  }
17
- `),()=>{m.contains(h)&&m.removeChild(h)}},[t]),(0,hM.jsx)(Yw,{isPresent:t,childRef:a,sizeRef:i,children:zg.cloneElement(e,{ref:a})})}var xM=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=Bn(sj),c=(0,Of.useId)(),d=!0,f=(0,Of.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:p=>{u.set(p,!0);for(let h of u.values())if(!h)return;o&&o()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,o]);return a&&d&&(f={...f}),(0,Of.useMemo)(()=>{u.forEach((p,h)=>u.set(h,!1))},[r]),yM.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,Qw.jsx)(vM,{isPresent:r,anchorX:s,root:l,children:e})),(0,Qw.jsx)(vi.Provider,{value:f,children:e})};function sj(){return new Map}var Li=b(E(),1);function Wg(e=!0){let t=(0,Li.useContext)(vi);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,Li.useId)();(0,Li.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,Li.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var Gg=b(E(),1),Ff=e=>e.key||"";function Zw(e){let t=[];return Gg.Children.forEach(e,r=>{(0,Gg.isValidElement)(r)&&t.push(r)}),t}var wa=({children:e,custom:t,initial:r=!0,onExitComplete:o,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=Wg(i),d=(0,zn.useMemo)(()=>Zw(e),[e]),f=i&&!u?[]:d.map(Ff),p=(0,zn.useRef)(!0),h=(0,zn.useRef)(d),m=Bn(()=>new Map),[x,v]=(0,zn.useState)(d),[g,y]=(0,zn.useState)(d);gu(()=>{p.current=!1,h.current=d;for(let R=0;R<g.length;R++){let S=Ff(g[R]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[g,f.length,f.join("-")]);let w=[];if(d!==x){let R=[...d];for(let S=0;S<g.length;S++){let L=g[S],T=Ff(L);f.includes(T)||(R.splice(S,0,L),w.push(L))}return a==="wait"&&w.length&&(R=w),y(Zw(R)),v(d),null}let{forceRender:C}=(0,zn.useContext)(pu);return(0,Vf.jsx)(Vf.Fragment,{children:g.map(R=>{let S=Ff(R),L=i&&!u?!1:d===g||f.includes(S),T=()=>{if(m.has(S))m.set(S,!0);else return;let P=!0;m.forEach(N=>{N||(P=!1)}),P&&(C?.(),y(h.current),i&&c?.(),o&&o())};return(0,Vf.jsx)(xM,{isPresent:L,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:L?void 0:T,anchorX:s,children:R},S)})})};var wM=b(E(),1),jg=(0,wM.createContext)({strict:!1});var CM={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"]},Ca={};for(let e in CM)Ca[e]={isEnabled:t=>CM[e].some(r=>!!t[r])};function SM(e){for(let t in e)Ca[t]={...Ca[t],...e[t]}}var lj=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 Bf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lj.has(e)}var bM=e=>!Bf(e);function uj(e){typeof e=="function"&&(bM=t=>t.startsWith("on")?!Bf(t):e(t))}try{uj(sU("@emotion/is-prop-valid").default)}catch{}function RM(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(bM(n)||r===!0&&Bf(n)||!t&&!Bf(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var oh=b(M(),1);var Au=b(E(),1);var LM=b(E(),1),Ii=(0,LM.createContext)({});var Kg=b(E(),1);function Pi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sa(e){return typeof e=="string"||Array.isArray(e)}var qg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hf=["initial",...qg];function Us(e){return Pi(e.animate)||Hf.some(t=>Sa(e[t]))}function $g(e){return!!(Us(e)||e.variants)}function IM(e,t){if(Us(e)){let{initial:r,animate:o}=e;return{initial:r===!1||Sa(r)?r:void 0,animate:Sa(o)?o:void 0}}return e.inherit!==!1?t:{}}function TM(e){let{initial:t,animate:r}=IM(e,(0,Kg.useContext)(Ii));return(0,Kg.useMemo)(()=>({initial:t,animate:r}),[PM(t),PM(r)])}function PM(e){return Array.isArray(e)?e.join(" "):e}var Pu=b(E(),1);var EM=b(E(),1);var zs={};function kM(e){for(let t in e)zs[t]=e[t],Ts(t)&&(zs[t].isCSSVariable=!0)}function Xg(e,{layout:t,layoutId:r}){return fo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!zs[e]||e==="opacity")}var cj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dj=cn.length;function MM(e,t,r){let o="",n=!0;for(let a=0;a<dj;a++){let i=cn[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let u=Df(s,Os[i]);if(!l){n=!1;let c=cj[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function Ru(e,t,r){let{style:o,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(fo.has(l)){i=!0;continue}else if(Ts(l)){n[l]=u;continue}else{let c=Df(u,Os[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=MM(t,e.transform,r):o.transform&&(o.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;o.transformOrigin=`${l} ${u} ${c}`}}var Lu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jw(e,t,r){for(let o in t)!Me(t[o])&&!Xg(o,r)&&(e[o]=t[o])}function fj({transformTemplate:e},t){return(0,EM.useMemo)(()=>{let r=Lu();return Ru(r,t,e),Object.assign({},r.vars,r.style)},[t])}function pj(e,t){let r=e.style||{},o={};return Jw(o,r,e),Object.assign(o,fj(e,t)),o}function AM(e,t){let r={},o=pj(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}var NM=b(E(),1);var mj={offset:"stroke-dashoffset",array:"stroke-dasharray"},gj={offset:"strokeDashoffset",array:"strokeDasharray"};function DM(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?mj:gj;e[a.offset]=re.transform(-o);let i=re.transform(t),s=re.transform(r);e[a.array]=`${i} ${s}`}function Yg(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(Ru(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),o!==void 0&&(d.scale=o),n!==void 0&&DM(d,n,a,i,!1)}var Qg=()=>({...Lu(),attrs:{}});var Zg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _M(e,t,r,o){let n=(0,NM.useMemo)(()=>{let a=Qg();return Yg(a,t,Zg(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};Jw(a,e.style,e),n.style={...a,...n.style}}return n}var OM=["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 Iu(e){return typeof e!="string"||e.includes("-")?!1:!!(OM.indexOf(e)>-1||/[A-Z]/u.test(e))}function FM(e,t,r,{latestValues:o},n,a=!1){let s=(Iu(e)?_M:AM)(t,o,n,e),l=RM(t,typeof e=="string",a),u=e!==Pu.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,Pu.useMemo)(()=>Me(c)?c.get():c,[c]);return(0,Pu.createElement)(e,{...u,children:d})}var eC=b(E(),1);function VM(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function Tu(e,t,r,o){if(typeof t=="function"){let[n,a]=VM(o);t=t(r!==void 0?r:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=VM(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function ku(e){return Me(e)?e.get():e}function hj({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:vj(r,o,n,e),renderState:t()}}function vj(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=ku(a[f]);let{initial:i,animate:s}=e,l=Us(e),u=$g(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!Pi(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let h=Tu(e,f[p]);if(h){let{transitionEnd:m,transition:x,...v}=h;for(let g in v){let y=v[g];if(Array.isArray(y)){let w=c?y.length-1:0;y=y[w]}y!==null&&(n[g]=y)}for(let g in m)n[g]=m[g]}}}return n}var Jg=e=>(t,r)=>{let o=(0,eC.useContext)(Ii),n=(0,eC.useContext)(vi),a=()=>hj(e,t,o,n);return r?a():Bn(a)};function Mu(e,t,r){let{style:o}=e,n={};for(let a in o)(Me(o[a])||t.style&&Me(t.style[a])||Xg(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var BM=Jg({scrapeMotionValuesFromProps:Mu,createRenderState:Lu});function eh(e,t,r){let o=Mu(e,t,r);for(let n in e)if(Me(e[n])||Me(t[n])){let a=cn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var HM=Jg({scrapeMotionValuesFromProps:eh,createRenderState:Qg});var UM=Symbol.for("motionComponentSymbol");var zM=b(E(),1);function ba(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function WM(e,t,r){return(0,zM.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):ba(r)&&(r.current=o))},[t])}var Kr=b(E(),1);var Eu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var yj="framerAppearId",th="data-"+Eu(yj);var GM=b(E(),1),rh=(0,GM.createContext)({});function jM(e,t,r,o,n){let{visualElement:a}=(0,Kr.useContext)(Ii),i=(0,Kr.useContext)(jg),s=(0,Kr.useContext)(vi),l=(0,Kr.useContext)(Ri).reducedMotion,u=(0,Kr.useRef)(null);o=o||i.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,Kr.useContext)(rh);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&xj(u.current,r,n,d);let f=(0,Kr.useRef)(!1);(0,Kr.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[th],h=(0,Kr.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return gu(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),h.current&&c.animationState&&c.animationState.animateChanges())}),(0,Kr.useEffect)(()=>{c&&(!h.current&&c.animationState&&c.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),h.current=!1),c.enteringChildren=void 0)}),c}function xj(e,t,r,o){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:qM(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&ba(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function qM(e){if(e)return e.options.allowProjection!==!1?e.projection:qM(e.parent)}function nh(e,{forwardMotionProps:t=!1}={},r,o){r&&SM(r);let n=Iu(e)?HM:BM;function a(s,l){let u,c={...(0,Au.useContext)(Ri),...s,layoutId:wj(s)},{isStatic:d}=c,f=TM(s),p=n(s,d);if(!d&&mu){Cj(c,r);let h=Sj(c);u=h.MeasureLayout,f.visualElement=jM(e,p,c,o,h.ProjectionNode)}return(0,oh.jsxs)(Ii.Provider,{value:f,children:[u&&f.visualElement?(0,oh.jsx)(u,{visualElement:f.visualElement,...c}):null,FM(e,s,WM(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,Au.forwardRef)(a);return i[UM]=e,i}function wj({layoutId:e}){let t=(0,Au.useContext)(pu).id;return t&&e!==void 0?t+"-"+e:e}function Cj(e,t){let r=(0,Au.useContext)(jg).strict}function Sj(e){let{drag:t,layout:r}=Ca;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function $M(e,t){if(typeof Proxy>"u")return nh;let r=new Map,o=(a,i)=>nh(a,i,e,t),n=(a,i)=>o(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?o:(r.has(i)||r.set(i,nh(i,void 0,e,t)),r.get(i))})}var uE=b(E(),1);function ah({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function KM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function XM(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function tC(e){return e===void 0||e===1}function ih({scale:e,scaleX:t,scaleY:r}){return!tC(e)||!tC(t)||!tC(r)}function Ra(e){return ih(e)||rC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rC(e){return YM(e.x)||YM(e.y)}function YM(e){return e&&e!=="0%"}function Uf(e,t,r){let o=e-r,n=t*o;return r+n}function QM(e,t,r,o,n){return n!==void 0&&(e=Uf(e,n,o)),Uf(e,r,o)+t}function oC(e,t=0,r=1,o,n){e.min=QM(e.min,t,r,o,n),e.max=QM(e.max,t,r,o,n)}function nC(e,{x:t,y:r}){oC(e.x,t.translate,t.scale,t.originPoint),oC(e.y,r.translate,r.scale,r.originPoint)}var ZM=.999999999999,JM=1.0000000000001;function tE(e,t,r,o=!1){let n=r.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Ws(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,nC(e,i)),o&&Ra(a.latestValues)&&Ws(e,a.latestValues))}t.x<JM&&t.x>ZM&&(t.x=1),t.y<JM&&t.y>ZM&&(t.y=1)}function Ti(e,t){e.min=e.min+t,e.max=e.max+t}function eE(e,t,r,o,n=.5){let a=Se(e.min,e.max,n);oC(e,t,r,a,o)}function Ws(e,t){eE(e.x,t.x,t.scaleX,t.scale,t.originX),eE(e.y,t.y,t.scaleY,t.scale,t.originY)}function aC(e,t){return ah(XM(e.getBoundingClientRect(),t))}function rE(e,t,r){let o=aC(e,r),{scroll:n}=t;return n&&(Ti(o.x,n.offset.x),Ti(o.y,n.offset.y)),o}var oE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gs=()=>({x:oE(),y:oE()}),nE=()=>({min:0,max:0}),ze=()=>({x:nE(),y:nE()});var zf={current:null},sh={current:!1};function aE(){if(sh.current=!0,!!mu)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zf.current=e.matches;e.addEventListener("change",t),t()}else zf.current=!1}var ki=new WeakMap;function iE(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Me(n))e.addValue(o,n);else if(Me(a))e.addValue(o,$r(n,{owner:e}));else if(a!==n)if(e.hasValue(o)){let i=e.getValue(o);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(o);e.addValue(o,$r(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var sE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Du=class{scrapeMotionValuesFromProps(t,r,o){return{}}constructor({parent:t,props:r,presenceContext:o,reducedMotionConfig:n,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ya,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=()=>{let f=xt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,xe.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Us(r),this.isVariantNode=$g(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Me(p)&&p.set(l[f])}}mount(t){this.current=t,ki.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),sh.current||aE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:zf.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),cr(this.notifyUpdate),cr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let o=fo.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&xe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ca){let r=Ca[t];if(!r)continue;let{isEnabled:o,Feature:n}=r;if(!this.features[t]&&n&&o(this.props)&&(this.features[t]=new n(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ze()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<sE.length;o++){let n=sE[o];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,i=t[a];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=iE(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=$r(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ef(o)||rf(o))?o=parseFloat(o):!Xw(o)&&fr.test(r)&&(o=Mf(t,r)),this.setBaseTarget(t,Me(o)?o.get():o)),Me(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let a=Tu(this.props,r,this.presenceContext?.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Me(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new ma),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Vs.render(this.render)}};var Nu=class extends Du{constructor(){super(...arguments),this.KeyframeResolver=Ef}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Me(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function lh(e,{style:t,vars:r},o,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,o);for(i in r)a.setProperty(i,r[i])}function bj(e){return window.getComputedStyle(e)}var _u=class extends Nu{constructor(){super(...arguments),this.type="html",this.renderInstance=lh}readValueFromInstance(t,r){if(fo.has(r))return this.projection?.isProjecting?bf(r):Mw(t,r);{let o=bj(t),n=(Ts(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return aC(t,r)}build(t,r,o){Ru(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return Mu(t,r,o)}};var uh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lE(e,t,r,o){lh(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(uh.has(n)?n:Eu(n),t.attrs[n])}var Ou=class extends Nu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ze}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(fo.has(r)){let o=kf(r);return o&&o.default||0}return r=uh.has(r)?r:Eu(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return eh(t,r,o)}build(t,r,o){Yg(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){lE(t,r,o,n)}mount(t){this.isSVGTag=Zg(t.tagName),super.mount(t)}};var cE=(e,t)=>Iu(e)?new Ou(t):new _u(t,{allowProjection:e!==uE.Fragment});function Wn(e,t,r){let o=e.getProps();return Tu(o,t,r!==void 0?r:o.custom,e)}var Wf=e=>Array.isArray(e);function Rj(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,$r(r))}function Lj(e){return Wf(e)?e[e.length-1]||0:e}function dE(e,t){let r=Wn(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=Lj(a[i]);Rj(e,i,s)}}function fE(e){return!!(Me(e)&&e.add)}function Gf(e,t){let r=e.getValue("willChange");if(fE(r))return r.add(t);if(!r&&ur.WillChange){let o=new ur.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function ch(e){return e.props[th]}var Ij=e=>e!==null;function pE(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(Ij),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var Pj={type:"spring",stiffness:500,damping:25,restSpeed:10},Tj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kj={type:"keyframes",duration:.8},Mj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mE=(e,{keyframes:t})=>t.length>2?kj:fo.has(e)?e.startsWith("scale")?Tj(t[1]):Pj:Mj;function gE({when:e,delay:t,delayChildren:r,staggerChildren:o,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var Fu=(e,t,r,o={},n,a)=>i=>{let s=_s(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-St(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:n};gE(s)||Object.assign(c,mE(e,c)),c.duration&&(c.duration=St(c.duration)),c.repeatDelay&&(c.repeatDelay=St(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Su(c),c.delay===0&&(d=!0)),(ur.instantAnimations||ur.skipAnimations)&&(d=!0,Su(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=pE(c.keyframes,s);if(f!==void 0){xe.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new va(c):new Lf(c)};function Ej({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function Vu(e,t,{delay:r=0,transitionOverride:o,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;o&&(a=o);let l=[],u=n&&e.animationState&&e.animationState.getState()[n];for(let c in s){let d=e.getValue(c,e.latestValues[c]??null),f=s[c];if(f===void 0||u&&Ej(u,c))continue;let p={delay:r,..._s(a||{},c)},h=d.get();if(h!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===h&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){let v=ch(e);if(v){let g=window.MotionHandoffAnimation(v,c,xe);g!==null&&(p.startTime=g,m=!0)}}Gf(e,c),d.start(Fu(c,d,f,e.shouldReduceMotion&&Pf.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{xe.update(()=>{i&&dE(e,i)})}),l}function dh(e,t,r,o=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*o;return typeof r=="function"?r(a,i):n===1?a*o:s-a*o}function fh(e,t,r={}){let o=Wn(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let a=o?()=>Promise.all(Vu(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return Aj(e,t,l,u,c,d,r)}:()=>Promise.resolve(),{when:s}=n;if(s){let[l,u]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>u())}else return Promise.all([a(),i(r.delay)])}function Aj(e,t,r=0,o=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(fh(l,t,{...i,delay:r+(typeof o=="function"?0:o)+dh(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function hE(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>fh(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=fh(e,t,r);else{let n=typeof t=="function"?Wn(e,t,r.custom):t;o=Promise.all(Vu(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function iC(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(t[o]!==e[o])return!1;return!0}var Dj=Hf.length;function sC(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?sC(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<Dj;r++){let o=Hf[r],n=e.props[o];(Sa(n)||n===!1)&&(t[o]=n)}return t}var Nj=[...qg].reverse(),_j=qg.length;function Oj(e){return t=>Promise.all(t.map(({animation:r,options:o})=>hE(e,r,o)))}function yE(e){let t=Oj(e),r=vE(),o=!0,n=l=>(u,c)=>{let d=Wn(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...h}=d;u={...u,...h,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=sC(e.parent)||{},d=[],f=new Set,p={},h=1/0;for(let x=0;x<_j;x++){let v=Nj[x],g=r[v],y=u[v]!==void 0?u[v]:c[v],w=Sa(y),C=v===l?g.isActive:null;C===!1&&(h=x);let R=y===c[v]&&y!==u[v]&&w;if(R&&o&&e.manuallyAnimateOnMount&&(R=!1),g.protectedKeys={...p},!g.isActive&&C===null||!y&&!g.prevProp||Pi(y)||typeof y=="boolean")continue;let S=Fj(g.prevProp,y),L=S||v===l&&g.isActive&&!R&&w||x>h&&w,T=!1,P=Array.isArray(y)?y:[y],N=P.reduce(n(v),{});C===!1&&(N={});let{prevResolvedValues:F={}}=g,q={...F,...N},A=z=>{L=!0,f.has(z)&&(T=!0,f.delete(z)),g.needsAnimating[z]=!0;let B=e.getValue(z);B&&(B.liveStyle=!1)};for(let z in q){let B=N[z],k=F[z];if(p.hasOwnProperty(z))continue;let te=!1;Wf(B)&&Wf(k)?te=!iC(B,k):te=B!==k,te?B!=null?A(z):f.add(z):B!==void 0&&f.has(z)?A(z):g.protectedKeys[z]=!0}g.prevProp=y,g.prevResolvedValues=N,g.isActive&&(p={...p,...N}),o&&e.blockInitialAnimation&&(L=!1);let G=R&&S;L&&(!G||T)&&d.push(...P.map(z=>{let B={type:v};if(typeof z=="string"&&o&&!G&&e.manuallyAnimateOnMount&&e.parent){let{parent:k}=e,te=Wn(k,z);if(k.enteringChildren&&te){let{delayChildren:ve}=te.transition||{};B.delay=dh(k.enteringChildren,e,ve)}}return{animation:z,options:B}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let v=Wn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{let g=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),x[v]=g??null}),d.push({animation:x})}let m=!!d.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),o=!1,m?t(d):Promise.resolve()}function s(l,u){if(r[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),r[l].isActive=u;let c=i(l);for(let d in r)r[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=vE(),o=!0}}}function Fj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!iC(t,e):!1}function js(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vE(){return{animate:js(!0),whileInView:js(),whileHover:js(),whileTap:js(),whileDrag:js(),whileFocus:js(),exit:js()}}var zt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var ph=class extends zt{constructor(t){super(t),t.animationState||(t.animationState=yE(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Pi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var Vj=0,mh=class extends zt{constructor(){super(...arguments),this.id=Vj++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;let n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var xE={animation:{Feature:ph},exit:{Feature:mh}};function La(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function Ia(e){return{point:{x:e.pageX,y:e.pageY}}}var wE=e=>t=>Bs(t)&&e(t,Ia(t));function Mi(e,t,r,o){return La(e,t,wE(r),o)}var RE=1e-4,Bj=1-RE,Hj=1+RE,LE=.01,Uj=0-LE,zj=0+LE;function Dt(e){return e.max-e.min}function IE(e,t,r){return Math.abs(e-t)<=r}function CE(e,t,r,o=.5){e.origin=o,e.originPoint=Se(t.min,t.max,e.origin),e.scale=Dt(r)/Dt(t),e.translate=Se(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Bj&&e.scale<=Hj||isNaN(e.scale))&&(e.scale=1),(e.translate>=Uj&&e.translate<=zj||isNaN(e.translate))&&(e.translate=0)}function Bu(e,t,r,o){CE(e.x,t.x,r.x,o?o.originX:void 0),CE(e.y,t.y,r.y,o?o.originY:void 0)}function SE(e,t,r){e.min=r.min+t.min,e.max=e.min+Dt(t)}function PE(e,t,r){SE(e.x,t.x,r.x),SE(e.y,t.y,r.y)}function bE(e,t,r){e.min=t.min-r.min,e.max=e.min+Dt(t)}function Hu(e,t,r){bE(e.x,t.x,r.x),bE(e.y,t.y,r.y)}function Xr(e){return[e("x"),e("y")]}var gh=({current:e})=>e?e.ownerDocument.defaultView:null;var TE=(e,t)=>Math.abs(e-t);function kE(e,t){let r=TE(e.x,t.x),o=TE(e.y,t.y);return Math.sqrt(r**2+o**2)}var Uu=class{constructor(t,r,{transformPagePoint:o,contextWindow:n=window,dragSnapToOrigin:a=!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;let f=uC(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=kE(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!h)return;let{point:m}=f,{timestamp:x}=yt;this.history.push({...m,timestamp:x});let{onStart:v,onMove:g}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=lC(p,this.transformPagePoint),xe.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=uC(f.type==="pointercancel"?this.lastMoveEventInfo:lC(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),m&&m(f,v)},!Bs(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=Ia(t),l=lC(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=yt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,uC(l,this.history)),this.removeListeners=sn(Mi(this.contextWindow,"pointermove",this.handlePointerMove),Mi(this.contextWindow,"pointerup",this.handlePointerUp),Mi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cr(this.updatePoint)}};function lC(e,t){return t?{point:t(e.point)}:e}function ME(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uC({point:e},t){return{point:e,delta:ME(e,EE(t)),offset:ME(e,Wj(t)),velocity:Gj(t,.1)}}function Wj(e){return e[0]}function EE(e){return e[e.length-1]}function Gj(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=EE(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>St(t)));)r--;if(!o)return{x:0,y:0};let a=Jt(n.timestamp-o.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-o.x)/a,y:(n.y-o.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function OE(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?Se(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?Se(r,e,o.max):Math.min(e,r)),e}function AE(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function FE(e,{top:t,left:r,bottom:o,right:n}){return{x:AE(e.x,r,n),y:AE(e.y,t,o)}}function DE(e,t){let r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function VE(e,t){return{x:DE(e.x,t.x),y:DE(e.y,t.y)}}function BE(e,t){let r=.5,o=Dt(e),n=Dt(t);return n>o?r=Mo(t.min,t.max-o,e.min):o>n&&(r=Mo(e.min,e.max-n,t.min)),Ut(0,1,r)}function HE(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var hh=.35;function UE(e=hh){return e===!1?e=0:e===!0&&(e=hh),{x:NE(e,"left","right"),y:NE(e,"top","bottom")}}function NE(e,t,r){return{min:_E(e,t),max:_E(e,r)}}function _E(e,t){return typeof e=="number"?e:e[t]||0}var jj=new WeakMap,yh=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ze(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:o}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Ia(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:h,onDragStart:m}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ww(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xr(v=>{let g=this.getAxisMotionValue(v).get()||0;if(dr.test(g)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[v];w&&(g=Dt(w)*(parseFloat(g)/100))}}this.originPoint[v]=g}),m&&xe.postRender(()=>m(d,f)),Gf(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=qj(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Xr(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Uu(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:gh(this.visualElement)})}stop(t,r){let o=t||this.latestPointerEvent,n=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!o)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&xe.postRender(()=>s(o,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,o){let{drag:n}=this.getProps();if(!o||!vh(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=OE(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&ba(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=FE(o.layoutBox,t):this.constraints=!1,this.elastic=UE(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=HE(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!ba(t))return!1;let o=t.current;Zt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let a=rE(o,n.root,this.visualElement.getTransformPagePoint()),i=VE(n.layout.layoutBox,a);if(r){let s=r(KM(i));this.hasMutatedConstraints=!!s,s&&(i=ah(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Xr(c=>{if(!vh(c,r,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});let f=n?200:1e6,p=n?40:1e7,h={type:"inertia",velocity:o?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){let o=this.getAxisMotionValue(t);return Gf(this.visualElement,t),o.start(Fu(t,o,0,r,this.visualElement,!1))}stopAnimation(){Xr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xr(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),n=o[r];return n||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Xr(r=>{let{drag:o}=this.getProps();if(!vh(r,o,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(r);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[r];a.set(t[r]-Se(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!ba(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};Xr(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=BE({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Xr(i=>{if(!vh(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(Se(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;jj.set(this.visualElement,this);let t=this.visualElement.current,r=Mi(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();ba(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",o);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),xe.read(o);let i=La(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xr(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=hh,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function vh(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function qj(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var xh=class extends zt{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new yh(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}unmount(){this.removeGroupControls(),this.removeListeners()}};var zE=e=>(t,r)=>{e&&xe.postRender(()=>e(t,r))},wh=class extends zt{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new Uu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gh(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:zE(t),onStart:zE(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&xe.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=Mi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var jE=b(M(),1);var jf=b(E(),1);var zu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function WE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Wu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;let r=WE(e,t.target.x),o=WE(e,t.target.y);return`${r}% ${o}%`}};var GE={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=fr.parse(e);if(n.length>5)return o;let a=fr.createTransformer(e),i=typeof n[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;n[0+i]/=s,n[1+i]/=l;let u=Se(s,l,.5);return typeof n[2+i]=="number"&&(n[2+i]/=u),typeof n[3+i]=="number"&&(n[3+i]/=u),a(n)}};var cC=!1,dC=class extends jf.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;kM($j),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),cC&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),zu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,cC=!0,n||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||xe.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;cC=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),o&&o.deregister&&o.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Ch(e){let[t,r]=Wg(),o=(0,jf.useContext)(pu);return(0,jE.jsx)(dC,{...e,layoutGroup:o,switchLayoutGroup:(0,jf.useContext)(rh),isPresent:t,safeToRemove:r})}var $j={borderRadius:{...Wu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wu,borderTopRightRadius:Wu,borderBottomLeftRadius:Wu,borderBottomRightRadius:Wu,boxShadow:GE};function Sh(e,t,r){let o=Me(e)?e:$r(e);return o.start(Fu("",o,t,r)),o.animation}var qE=(e,t)=>e.depth-t.depth;var bh=class{constructor(){this.children=[],this.isDirty=!1}add(t){Is(this.children,t),this.isDirty=!0}remove(t){an(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qE),this.isDirty=!1,this.children.forEach(t)}};function $E(e,t){let r=xt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(cr(o),e(a-t))};return xe.setup(o,!0),()=>cr(o)}var QE=["TopLeft","TopRight","BottomLeft","BottomRight"],Kj=QE.length,KE=e=>typeof e=="string"?parseFloat(e):e,XE=e=>typeof e=="number"||re.test(e);function ZE(e,t,r,o,n,a){n?(e.opacity=Se(0,r.opacity??1,Xj(o)),e.opacityExit=Se(t.opacity??1,0,Yj(o))):a&&(e.opacity=Se(t.opacity??1,r.opacity??1,o));for(let i=0;i<Kj;i++){let s=`border${QE[i]}Radius`,l=YE(t,s),u=YE(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||XE(l)===XE(u)?(e[s]=Math.max(Se(KE(l),KE(u),o),0),(dr.test(u)||dr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=Se(t.rotate||0,r.rotate||0,o))}function YE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Xj=JE(0,.5,lf),Yj=JE(.5,.95,mt);function JE(e,t,r){return o=>o<e?0:o>t?1:r(Mo(e,t,o))}function eA(e,t){e.min=t.min,e.max=t.max}function po(e,t){eA(e.x,t.x),eA(e.y,t.y)}function fC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function tA(e,t,r,o,n){return e-=t,e=Uf(e,1/r,o),n!==void 0&&(e=Uf(e,1/n,o)),e}function Qj(e,t=0,r=1,o=.5,n,a=e,i=e){if(dr.test(t)&&(t=parseFloat(t),t=Se(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=Se(a.min,a.max,o);e===a&&(s-=t),e.min=tA(e.min,t,r,s,n),e.max=tA(e.max,t,r,s,n)}function rA(e,t,[r,o,n],a,i){Qj(e,t[r],t[o],t[n],t.scale,a,i)}var Zj=["x","scaleX","originX"],Jj=["y","scaleY","originY"];function pC(e,t,r,o){rA(e.x,t,Zj,r?r.x:void 0,o?o.x:void 0),rA(e.y,t,Jj,r?r.y:void 0,o?o.y:void 0)}function oA(e){return e.translate===0&&e.scale===1}function mC(e){return oA(e.x)&&oA(e.y)}function nA(e,t){return e.min===t.min&&e.max===t.max}function iA(e,t){return nA(e.x,t.x)&&nA(e.y,t.y)}function aA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gC(e,t){return aA(e.x,t.x)&&aA(e.y,t.y)}function hC(e){return Dt(e.x)/Dt(e.y)}function vC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Rh=class{constructor(){this.members=[]}add(t){Is(this.members,t),t.scheduleRender()}remove(t){if(an(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(n=>t===n);if(r===0)return!1;let o;for(let n=r;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){o=a;break}}return o?(this.promote(o),!0):!1}promote(t,r){let o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;n===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:o}=t;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function sA(e,t,r){let o="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((n||a||i)&&(o=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:h}=r;u&&(o=`perspective(${u}px) ${o}`),c&&(o+=`rotate(${c}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),p&&(o+=`skewX(${p}deg) `),h&&(o+=`skewY(${h}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(o+=`scale(${s}, ${l})`),o||"none"}var qs={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},yC=["","X","Y","Z"],eq=1e3,tq=0;function xC(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function hA(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=ch(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",xe,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&hA(o)}function Lh({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=tq++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,qr.value&&(qs.nodes=qs.calculatedTargetDeltas=qs.calculatedProjections=0),this.nodes.forEach(nq),this.nodes.forEach(lq),this.nodes.forEach(uq),this.nodes.forEach(aq),qr.addProjectionMetrics&&qr.addProjectionMetrics(qs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new bh)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new ma),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Hs(i)&&!_f(i),this.instance=i;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;xe.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=$E(f,250),zu.hasAnimatedSinceResize&&(zu.hasAnimatedSinceResize=!1,this.nodes.forEach(cA)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||mq,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!gC(this.targetLayout,p),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={..._s(h,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,g)}else d||cA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),cr(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(cq),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hA(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lA);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uA);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sq),this.nodes.forEach(rq),this.nodes.forEach(oq)):this.nodes.forEach(uA),this.clearAllSnapshots();let s=xt.now();yt.delta=Ut(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,gf.update.process(yt),gf.preRender.process(yt),gf.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iq),this.sharedNodes.forEach(dq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Dt(this.snapshot.measuredBox.x)&&!Dt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ze(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s&&this.instance){let l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!mC(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Ra(this.latestValues)||c)&&(n(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),gq(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return ze();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hq))){let{scroll:u}=this.root;u&&(Ti(s.x,u.offset.x),Ti(s.y,u.offset.y))}return s}removeElementScroll(i){let s=ze();if(po(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&po(s,i),Ti(s.x,c.offset.x),Ti(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=ze();po(l,i);for(let u=0;u<this.path.length;u++){let c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ws(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ra(c.latestValues)&&Ws(l,c.latestValues)}return Ra(this.latestValues)&&Ws(l,this.latestValues),l}removeTransform(i){let s=ze();po(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Ra(u.latestValues))continue;ih(u.latestValues)&&u.updateSnapshot();let c=ze(),d=u.measurePageBox();po(c,d),pC(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ra(this.latestValues)&&pC(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=yt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ze(),this.relativeTargetOrigin=ze(),Hu(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),po(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ze(),this.targetWithTransforms=ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):po(this.target,this.layout.layoutBox),nC(this.target,this.targetDelta)):po(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ze(),this.relativeTargetOrigin=ze(),Hu(this.relativeTargetOrigin,this.target,f.target),po(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}qr.value&&qs.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ih(this.parent.latestValues)||rC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let i=this.getLead(),s=!!this.resumingFrom||this!==i,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;po(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;tE(this.layoutCorrected,this.treeScale,this.path,s),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=ze());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fC(this.prevProjectionDelta.x,this.projectionDelta.x),fC(this.prevProjectionDelta.y,this.projectionDelta.y)),Bu(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!vC(this.projectionDelta.x,this.prevProjectionDelta.x)||!vC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),qr.value&&qs.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gs(),this.projectionDelta=Gs(),this.projectionDeltaWithTransform=Gs()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Gs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=ze(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,x=this.getStack(),v=!x||x.members.length<=1,g=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(pq));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;dA(d.x,i.x,C),dA(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fq(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&iA(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ze()),po(y,this.relativeTarget)),m&&(this.animationValues=c,ZE(c,u,this.latestValues,C,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xe.update(()=>{zu.hasAnimatedSinceResize=!0,ln.layout++,this.motionValue||(this.motionValue=$r(0)),this.currentAnimation=Sh(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{ln.layout--},onComplete:()=>{ln.layout--,i.onComplete&&i.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);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(eq),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:c}=i;if(!(!s||!l||!u)){if(this!==i&&this.layout&&u&&vA(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ze();let d=Dt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Dt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}po(s,l),Ws(s,c),Bu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Rh),this.sharedNodes.get(i).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){let{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&xC("z",i,u,this.animationValues);for(let c=0;c<yC.length;c++)xC(`rotate${yC[c]}`,i,u,this.animationValues),xC(`skew${yC[c]}`,i,u,this.animationValues);i.render();for(let c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}applyProjectionStyles(i,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=ku(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=ku(s?.pointerEvents)||""),this.hasProjected&&!Ra(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=sA(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let h in zs){if(c[h]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:v}=zs[h],g=d==="none"?c[h]:m(c[h],u);if(x){let y=x.length;for(let w=0;w<y;w++)i[x[w]]=g}else v?this.options.visualElement.renderState.vars[h]=g:i[h]=g}this.options.layoutId&&(i.pointerEvents=u===this?ku(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(lA),this.root.sharedNodes.clear()}}}function rq(e){e.updateLayout()}function oq(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?Xr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Dt(d);d.min=r[c].min,d.max=d.min+f}):vA(n,t.layoutBox,r)&&Xr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Dt(r[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Gs();Bu(i,r,t.layoutBox);let s=Gs();a?Bu(s,e.applyTransform(o,!0),t.measuredBox):Bu(s,r,t.layoutBox);let l=!mC(i),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let p=ze();Hu(p,t.layoutBox,d.layoutBox);let h=ze();Hu(h,r,f.layoutBox),gC(p,h)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function nq(e){qr.value&&qs.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function aq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function iq(e){e.clearSnapshot()}function lA(e){e.clearMeasurements()}function uA(e){e.isLayoutDirty=!1}function sq(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lq(e){e.resolveTargetDelta()}function uq(e){e.calcProjection()}function cq(e){e.resetSkewAndRotation()}function dq(e){e.removeLeadSnapshot()}function dA(e,t,r){e.translate=Se(t.translate,0,r),e.scale=Se(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function fA(e,t,r,o){e.min=Se(t.min,r.min,o),e.max=Se(t.max,r.max,o)}function fq(e,t,r,o){fA(e.x,t.x,r.x,o),fA(e.y,t.y,r.y,o)}function pq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var mq={duration:.45,ease:[.4,0,.1,1]},pA=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mA=pA("applewebkit/")&&!pA("chrome/")?Math.round:mt;function gA(e){e.min=mA(e.min),e.max=mA(e.max)}function gq(e){gA(e.x),gA(e.y)}function vA(e,t,r){return e==="position"||e==="preserve-aspect"&&!IE(hC(t),hC(r),.2)}function hq(e){return e!==e.root&&e.scroll?.wasRoot}var yA=Lh({attachResizeListener:(e,t)=>La(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var wC={current:void 0},Ih=Lh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wC.current){let e=new yA({});e.mount(window),e.setOptions({layoutScroll:!0}),wC.current=e}return wC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var xA={pan:{Feature:wh},drag:{Feature:xh,ProjectionNode:Ih,MeasureLayout:Ch}};function wA(e,t,r){let{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");let n="onHover"+r,a=o[n];a&&xe.postRender(()=>a(t,Ia(t)))}var Ph=class extends zt{mount(){let{current:t}=this.node;t&&(this.unmount=Gw(t,(r,o)=>(wA(this.node,o,"Start"),n=>wA(this.node,n,"End"))))}unmount(){}};var Th=class extends zt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=sn(La(this.node.current,"focus",()=>this.onFocus()),La(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function CA(e,t,r){let{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");let n="onTap"+(r==="End"?"":r),a=o[n];a&&xe.postRender(()=>a(t,Ia(t)))}var kh=class extends zt{mount(){let{current:t}=this.node;t&&(this.unmount=$w(t,(r,o)=>(CA(this.node,o,"Start"),(n,{success:a})=>CA(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var SC=new WeakMap,CC=new WeakMap,vq=e=>{let t=SC.get(e.target);t&&t(e)},yq=e=>{e.forEach(vq)};function xq({root:e,...t}){let r=e||document;CC.has(r)||CC.set(r,{});let o=CC.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(yq,{root:e,...t})),o[n]}function SA(e,t,r){let o=xq(t);return SC.set(e,r),o.observe(e),()=>{SC.delete(e),o.unobserve(e)}}var wq={some:0,all:1},Mh=class extends zt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:o,amount:n="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:o,threshold:typeof n=="number"?n:wq[n]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return SA(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Cq(t,r))&&this.startObserver()}unmount(){}};function Cq({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var bA={inView:{Feature:Mh},tap:{Feature:kh},focus:{Feature:Th},hover:{Feature:Ph}};var RA={layout:{ProjectionNode:Ih,MeasureLayout:Ch}};var LA={...xE,...bA,...xA,...RA};var We=$M(LA,cE);var Gu=b(E(),1);function ju(e){let t=Bn(()=>$r(e)),{isStatic:r}=(0,Gu.useContext)(Ri);if(r){let[,o]=(0,Gu.useState)(e);(0,Gu.useEffect)(()=>t.on("change",o),[])}return t}function Eh(e,t){let r=ju(t()),o=()=>r.set(t());return o(),gu(()=>{let n=()=>xe.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),cr(o)}}),r}function IA(e){Fs.current=[],e();let t=Eh(Fs.current,e);return Fs.current=void 0,t}function bC(e,t,r,o){if(typeof e=="function")return IA(e);let n=typeof t=="function"?t:Kw(t,r,o);return Array.isArray(e)?PA(e,n):PA([e],([a])=>n(a))}function PA(e,t){let r=Bn(()=>[]);return Eh(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function qf(e){return typeof e=="object"&&!Array.isArray(e)}function Ah(e,t,r,o){return typeof e=="string"&&qf(t)?Af(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function TA(e,t,r){return e*(t+1)}function RC(e,t,r,o){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):o.get(t)??e}function Sq(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(an(e,n),o--)}}function kA(e,t,r,o,n,a){Sq(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Se(n,a,o[i]),easing:ff(r,i)})}function MA(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function EA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var bq="easeInOut",Rq=20;function NA(e,{defaultTransition:t={},...r}={},o,n){let a=t.duration||.3,i=new Map,s=new Map,l={},u=new Map,c=0,d=0,f=0;for(let p=0;p<e.length;p++){let h=e[p];if(typeof h=="string"){u.set(h,d);continue}else if(!Array.isArray(h)){u.set(h.name,RC(d,h.at,c,u));continue}let[m,x,v={}]=h;v.at!==void 0&&(d=RC(d,v.at,c,u));let g=0,y=(w,C,R,S=0,L=0)=>{let T=Lq(w),{delay:P=0,times:N=Sf(T),type:F="keyframes",repeat:q,repeatType:A,repeatDelay:G=0,...D}=C,{ease:z=t.ease||"easeOut",duration:B}=C,k=typeof P=="function"?P(S,L):P,te=T.length,ve=Ns(F)?F:n?.[F||"keyframes"];if(te<=2&&ve){let Y=100;if(te===2&&Tq(T)){let pe=T[1]-T[0];Y=Math.abs(pe)}let ce={...D};B!==void 0&&(ce.duration=St(B));let j=xf(ce,Y,ve);z=j.ease,B=j.duration}B??(B=a);let _=d+k;N.length===1&&N[0]===0&&(N[1]=1);let Z=N.length-T.length;if(Z>0&&Cf(N,Z),T.length===1&&T.unshift(null),q){Zt(q<Rq,"Repeat count too high, must be less than 20","repeat-count-high"),B=TA(B,q);let Y=[...T],ce=[...N];z=Array.isArray(z)?[...z]:[z];let j=[...z];for(let pe=0;pe<q;pe++){T.push(...Y);for(let be=0;be<Y.length;be++)N.push(ce[be]+(pe+1)),z.push(be===0?"linear":ff(j,be-1))}MA(N,q)}let ae=_+B;kA(R,T,z,N,_,ae),g=Math.max(k+B,g),f=Math.max(ae,f)};if(Me(m)){let w=AA(m,s);y(x,v,DA("default",w))}else{let w=Ah(m,x,o,l),C=w.length;for(let R=0;R<C;R++){x=x,v=v;let S=w[R],L=AA(S,s);for(let T in x)y(x[T],Iq(v,T),DA(T,L),R,C)}}c=d,d+=g}return s.forEach((p,h)=>{for(let m in p){let x=p[m];x.sort(EA);let v=[],g=[],y=[];for(let C=0;C<x.length;C++){let{at:R,value:S,easing:L}=x[C];v.push(S),g.push(Mo(0,f,R)),y.push(L||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),y.unshift(bq)),g[g.length-1]!==1&&(g.push(1),v.push(null)),i.has(h)||i.set(h,{keyframes:{},transition:{}});let w=i.get(h);w.keyframes[m]=v,w.transition[m]={...t,duration:f,ease:y,times:g,...r}}}),i}function AA(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function DA(e,t){return t[e]||(t[e]=[]),t[e]}function Lq(e){return Array.isArray(e)?e:[e]}function Iq(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Pq=e=>typeof e=="number",Tq=e=>e.every(Pq);function kq(e,t){return e in t}var Dh=class extends Du{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(kq(r,t)){let o=t[r];if(typeof o=="string"||typeof o=="number")return o}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return ze()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function _A(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Hs(e)&&!_f(e)?new Ou(t):new _u(t);r.mount(e),ki.set(e,r)}function OA(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new Dh(t);r.mount(e),ki.set(e,r)}function Mq(e,t){return Me(e)||typeof e=="number"||typeof e=="string"&&!qf(t)}function Nh(e,t,r,o){let n=[];if(Mq(e,t))n.push(Sh(e,qf(t)&&t.default||t,r&&(r.default||r)));else{let a=Ah(e,t,o),i=a.length;Zt(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];Zt(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?_A:OA;ki.has(l)||u(l);let c=ki.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...Vu(c,{...t,transition:d},{}))}}return n}function FA(e,t,r){let o=[];return NA(e,t,r,{spring:ha}).forEach(({keyframes:a,transition:i},s)=>{o.push(...Nh(s,a,i))}),o}function Eq(e){return Array.isArray(e)&&e.some(Array.isArray)}function VA(e){function t(r,o,n){let a=[];Eq(r)?a=FA(r,o,e):a=Nh(r,o,n,e);let i=new If(a);return e&&(e.animations.push(i),i.finished.then(()=>{an(e.animations,i)})),i}return t}var LC=VA();var Fxe=J("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),dn={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},_h={lift:{y:-2,transition:dn.smooth},scale:{scale:1.05,transition:dn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:dn.smooth},rotate:{rotate:2,transition:dn.bouncy}},BA={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},Vxe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:dn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:dn.smooth}},Bxe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:dn.smooth}}},Hxe={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:dn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:dn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:dn.smooth}},HA={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var Uxe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:dn.bouncy};var Ei=b(M()),UA=J("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-gray-850 dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),zA=$s.forwardRef(({className:e,variant:t,size:r,radius:o,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?_h.scale:a==="glow"?_h.glow:_h.lift,whileTap:BA.scale};return(0,Ei.jsx)(We.div,{ref:s,className:I("moonui-theme",UA({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,Ei.jsx)("div",{ref:s,className:I("moonui-theme",UA({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});zA.displayName="Card";var WA=$s.forwardRef(({className:e,...t},r)=>(0,Ei.jsx)("div",{ref:r,className:I("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));WA.displayName="CardHeader";var GA=$s.forwardRef(({className:e,...t},r)=>(0,Ei.jsx)("h3",{ref:r,className:I("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));GA.displayName="CardTitle";var jA=$s.forwardRef(({className:e,...t},r)=>(0,Ei.jsx)("p",{ref:r,className:I("moonui-theme","text-sm text-muted-foreground",e),...t}));jA.displayName="CardDescription";var qA=$s.forwardRef(({className:e,...t},r)=>(0,Ei.jsx)("div",{ref:r,className:I("moonui-theme","p-6 pt-0",e),...t}));qA.displayName="CardContent";var $A=$s.forwardRef(({className:e,...t},r)=>(0,Ei.jsx)("div",{ref:r,className:I("moonui-theme","flex items-center p-6 pt-0",e),...t}));$A.displayName="CardFooter";var Ks=b(E());var Ai=b(M()),Aq=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[r,o]of Object.entries(t))if(o.test(e))return r;return"unknown"},KA=(e,t)=>{let r=e.replace(/\s+/g,""),o=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of o){if(a>=r.length)break;n&&(n+=" "),n+=r.slice(a,a+i),a+=i}return n},XA=Ks.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=Ks.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=Aq(d);l(f);let p=f==="amex"?15:16,h=d.slice(0,p),m=KA(h,f);r?.(h,f),c.target.value=m};return(0,Ai.jsxs)("div",{className:"relative",children:[(0,Ai.jsx)(pr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:KA(t,s),onChange:u,className:I(o&&"pl-10",e),...a}),o&&(0,Ai.jsx)(Ed,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});XA.displayName="CardNumberInput";var YA=Ks.forwardRef(({className:e,value:t="",onChange:r,size:o,...n},a)=>{let i=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let d=parseInt(u.slice(0,2));d>12?u="12"+u.slice(2):d===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),r?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,Ai.jsx)(pr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});YA.displayName="CardExpiryInput";var QA=Ks.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,Ai.jsx)(pr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:o==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,s);r?.(c)},maxLength:s,className:e,...a})});QA.displayName="CardCVCInput";var ZA=Ks.forwardRef(({className:e,value:t="",onChange:r,format:o="US",size:n,...a},i)=>{let s=u=>{let c=u.target.value;switch(o){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}r?.(c.replace(/\s/g,"")),u.target.value=c};return(0,Ai.jsx)(pr,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(o){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:s,className:e,...a})});ZA.displayName="CardZipInput";var fn=b(E());var kr=b(E(),1);var Oh=b(E(),1);function qu(e){let t=Oh.useRef({value:e,previous:e});return Oh.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var JA=b(E(),1);function $u(e){let[t,r]=JA.useState(void 0);return ke(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let a=n[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var mo=b(M(),1),Fh="Checkbox",[Dq,c0e]=Te(Fh),[Nq,IC]=Dq(Fh);function _q(e){let{__scopeCheckbox:t,checked:r,children:o,defaultChecked:n,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=Ue({prop:r,defaultProp:n??!1,onChange:l,caller:Fh}),[h,m]=kr.useState(null),[x,v]=kr.useState(null),g=kr.useRef(!1),y=h?!!i||!!h.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:h,setControl:m,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:Di(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:v};return(0,mo.jsx)(Nq,{scope:t,...w,children:Oq(d)?d(w):o})}var eD="CheckboxTrigger",tD=kr.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:h}=IC(eD,e),m=ne(n,c),x=kr.useRef(l);return kr.useEffect(()=>{let v=a?.form;if(v){let g=()=>d(x.current);return v.addEventListener("reset",g),()=>v.removeEventListener("reset",g)}},[a,d]),(0,mo.jsx)($.button,{type:"button",role:"checkbox","aria-checked":Di(l)?"mixed":l,"aria-required":u,"data-state":aD(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:m,onKeyDown:H(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:H(r,v=>{d(g=>Di(g)?!0:!g),h&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});tD.displayName=eD;var Vh=kr.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,mo.jsx)(_q,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:o,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)(tD,{...d,ref:t,__scopeCheckbox:r}),f&&(0,mo.jsx)(nD,{__scopeCheckbox:r})]})})});Vh.displayName=Fh;var rD="CheckboxIndicator",PC=kr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=IC(rD,r);return(0,mo.jsx)(it,{present:o||Di(a.checked)||a.checked===!0,children:(0,mo.jsx)($.span,{"data-state":aD(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});PC.displayName=rD;var oD="CheckboxBubbleInput",nD=kr.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=IC(oD,e),h=ne(r,p),m=qu(a),x=$u(o);kr.useEffect(()=>{let g=f;if(!g)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,R=!n.current;if(m!==a&&C){let S=new Event("click",{bubbles:R});g.indeterminate=Di(a),C.call(g,Di(a)?!1:a),g.dispatchEvent(S)}},[f,m,a,n]);let v=kr.useRef(Di(a)?!1:a);return(0,mo.jsx)($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:h,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});nD.displayName=oD;function Oq(e){return typeof e=="function"}function Di(e){return e==="indeterminate"}function aD(e){return Di(e)?"indeterminate":e?"checked":"unchecked"}var Ao=b(M()),Vq=J("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),TC=fn.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>{let[c,d]=fn.useState(a);return fn.useEffect(()=>{d(a)},[a]),(0,Ao.jsx)(Vh,{ref:u,checked:c?!1:s,className:I("moonui-theme",Vq({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,Ao.jsx)(PC,{className:I("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,Ao.jsx)(Hd,{className:"h-[65%] w-[65%]"}):i||(0,Ao.jsx)(sr,{className:"h-[65%] w-[65%]"})})})});TC.displayName=Vh.displayName;var iD=fn.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,Ao.jsx)("div",{ref:a,className:I("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));iD.displayName="CheckboxGroup";var Bh=fn.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,Ao.jsx)("label",{ref:i,htmlFor:t,className:I("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:r}));Bh.displayName="CheckboxLabel";var sD=fn.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=fn.useId(),s=e||i;return(0,Ao.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,Ao.jsx)(Bh,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,Ao.jsx)(TC,{ref:a,id:s,...n}),r==="end"&&(0,Ao.jsx)(Bh,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});sD.displayName="CheckboxWithLabel";var kC=b(E());var Xs=b(M()),Bq=ag,lD=J("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",default:"text-sm py-3 px-4",md:"text-base py-4 px-4",lg:"text-lg py-5 px-5"}},defaultVariants:{variant:"default",size:"default"}}),uD=kC.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,Xs.jsx)(Zl,{ref:i,className:I("moonui-theme",lD({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,Xs.jsxs)(Zl,{ref:i,className:I("moonui-theme",lD({variant:r,size:o}),e),...a,children:[t,(0,Xs.jsx)(On,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));uD.displayName=Zl.displayName;var Hq=J("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",default:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"default"}}),cD=kC.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,Xs.jsx)(wd,{ref:a,className:I("moonui-theme",Hq({variant:r,size:o}),e),...n,children:(0,Xs.jsx)("div",{className:"p-4",children:t})}));cD.displayName=wd.displayName;var Bo=b(E());var dD=b(E());var Do=b(M()),Uq=J("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),zq=J(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),pr=dD.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,size:n,isError:a,disabled:i,error:s,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,...h},m)=>{let x=p||s||l,v=s?"error":l?"success":"normal";return(0,Do.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,Do.jsxs)("div",{className:I("moonui-theme",Uq({size:n}),t),children:[c&&(0,Do.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,Do.jsx)(Qt,{className:"h-4 w-4 animate-spin"}):c}),(0,Do.jsx)("input",{className:I(zq({variant:o,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:m,disabled:i||u,"data-loading":u?"":void 0,"data-error":s?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!s||!!a||void 0,"aria-describedby":s?`${h.id||""}-error`:l?`${h.id||""}-success`:void 0,...h}),d&&!u&&(0,Do.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,Do.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,Do.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,Do.jsx)(Qt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),x&&(0,Do.jsx)("p",{className:I("text-xs transition-all",v==="error"&&"text-error",v==="success"&&"text-success",v==="normal"&&"text-muted-foreground",r),id:s?`${h.id||""}-error`:l?`${h.id||""}-success`:void 0,children:s||l||""})]})});pr.displayName="Input";var gD=b(E());var fD=b(E(),1);var pD=b(M(),1),Wq="Label",mD=fD.forwardRef((e,t)=>(0,pD.jsx)($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));mD.displayName=Wq;var MC=mD;var hD=b(M()),jq=J("text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Yr=gD.forwardRef(({className:e,...t},r)=>(0,hD.jsx)(MC,{ref:r,className:I(jq(),e),...t}));Yr.displayName=MC.displayName;var L2=b(E());var lt=b(E(),1);var gt=b(E(),1);var vD=b(E(),1);function yD(e,t=globalThis?.document){let r=et(e);vD.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var AC=b(M(),1),qq="DismissableLayer",EC="dismissableLayer.update",$q="dismissableLayer.pointerDownOutside",Kq="dismissableLayer.focusOutside",xD,CD=gt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),No=gt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=gt.useContext(CD),[c,d]=gt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=gt.useState({}),h=ne(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(x),g=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=g>=v,C=Yq(S=>{let L=S.target,T=[...u.branches].some(P=>P.contains(L));!w||T||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),R=Qq(S=>{let L=S.target;[...u.branches].some(P=>P.contains(L))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return yD(S=>{g===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),gt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xD=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),wD(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=xD)}},[c,f,r,u]),gt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),wD())},[c,u]),gt.useEffect(()=>{let S=()=>p({});return document.addEventListener(EC,S),()=>document.removeEventListener(EC,S)},[]),(0,AC.jsx)($.div,{...l,ref:h,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,R.onFocusCapture),onBlurCapture:H(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,C.onPointerDownCapture)})});No.displayName=qq;var Xq="DismissableLayerBranch",SD=gt.forwardRef((e,t)=>{let r=gt.useContext(CD),o=gt.useRef(null),n=ne(t,o);return gt.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,AC.jsx)($.div,{...e,ref:n})});SD.displayName=Xq;function Yq(e,t=globalThis?.document){let r=et(e),o=gt.useRef(!1),n=gt.useRef(()=>{});return gt.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){bD($q,r,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function Qq(e,t=globalThis?.document){let r=et(e),o=gt.useRef(!1);return gt.useEffect(()=>{let n=a=>{a.target&&!o.current&&bD(Kq,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function wD(){let e=new CustomEvent(EC);document.dispatchEvent(e)}function bD(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?Ql(n,a):n.dispatchEvent(a)}var RD=No,LD=SD;var PD=b(E(),1),DC=0;function Ni(){PD.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ID()),document.body.insertAdjacentElement("beforeend",e[1]??ID()),DC++,()=>{DC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),DC--}},[])}function ID(){let 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 _o=b(E(),1);var AD=b(M(),1),NC="focusScope.autoFocusOnMount",_C="focusScope.autoFocusOnUnmount",TD={bubbles:!1,cancelable:!0},Jq="FocusScope",Pa=_o.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=_o.useState(null),u=et(n),c=et(a),d=_o.useRef(null),f=ne(t,m=>l(m)),p=_o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_o.useEffect(()=>{if(o){let g=function(R){if(p.paused||!s)return;let S=R.target;s.contains(S)?d.current=S:_i(d.current,{select:!0})},y=function(R){if(p.paused||!s)return;let S=R.relatedTarget;S!==null&&(s.contains(S)||_i(d.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(let L of R)L.removedNodes.length>0&&_i(s)};var m=g,x=y,v=w;document.addEventListener("focusin",g),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),C.disconnect()}}},[o,s,p.paused]),_o.useEffect(()=>{if(s){MD.add(p);let m=document.activeElement;if(!s.contains(m)){let v=new CustomEvent(NC,TD);s.addEventListener(NC,u),s.dispatchEvent(v),v.defaultPrevented||(e6(a6(DD(s)),{select:!0}),document.activeElement===m&&_i(s))}return()=>{s.removeEventListener(NC,u),setTimeout(()=>{let v=new CustomEvent(_C,TD);s.addEventListener(_C,c),s.dispatchEvent(v),v.defaultPrevented||_i(m??document.body,{select:!0}),s.removeEventListener(_C,c),MD.remove(p)},0)}}},[s,u,c,p]);let h=_o.useCallback(m=>{if(!r&&!o||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(x&&v){let g=m.currentTarget,[y,w]=t6(g);y&&w?!m.shiftKey&&v===w?(m.preventDefault(),r&&_i(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),r&&_i(w,{select:!0})):v===g&&m.preventDefault()}},[r,o,p.paused]);return(0,AD.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});Pa.displayName=Jq;function e6(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(_i(o,{select:t}),document.activeElement!==r)return}function t6(e){let t=DD(e),r=kD(t,e),o=kD(t.reverse(),e);return[r,o]}function DD(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function kD(e,t){for(let r of e)if(!r6(r,{upTo:t}))return r}function r6(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function o6(e){return e instanceof HTMLInputElement&&"select"in e}function _i(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&o6(e)&&t&&e.select()}}var MD=n6();function n6(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=ED(e,t),e.unshift(t)},remove(t){e=ED(e,t),e[0]?.resume()}}}function ED(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function a6(e){return e.filter(t=>t.tagName!=="A")}var Zr=b(E(),1);var OD=["top","right","bottom","left"];var Gn=Math.min,Mr=Math.max,Kf=Math.round,Xf=Math.floor,pn=e=>({x:e,y:e}),i6={left:"right",right:"left",bottom:"top",top:"bottom"},s6={start:"end",end:"start"};function Uh(e,t,r){return Mr(e,Gn(t,r))}function jn(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function Ys(e){return e.split("-")[1]}function zh(e){return e==="x"?"y":"x"}function Wh(e){return e==="y"?"height":"width"}var l6=new Set(["top","bottom"]);function mn(e){return l6.has(qn(e))?"y":"x"}function Gh(e){return zh(mn(e))}function FD(e,t,r){r===void 0&&(r=!1);let o=Ys(e),n=Gh(e),a=Wh(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=$f(i)),[i,$f(i)]}function VD(e){let t=$f(e);return[Hh(e),t,Hh(t)]}function Hh(e){return e.replace(/start|end/g,t=>s6[t])}var ND=["left","right"],_D=["right","left"],u6=["top","bottom"],c6=["bottom","top"];function d6(e,t,r){switch(e){case"top":case"bottom":return r?t?_D:ND:t?ND:_D;case"left":case"right":return t?u6:c6;default:return[]}}function BD(e,t,r,o){let n=Ys(e),a=d6(qn(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Hh)))),a}function $f(e){return e.replace(/left|right|bottom|top/g,t=>i6[t])}function f6(e){return{top:0,right:0,bottom:0,left:0,...e}}function OC(e){return typeof e!="number"?f6(e):{top:e,right:e,bottom:e,left:e}}function Qs(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function HD(e,t,r){let{reference:o,floating:n}=e,a=mn(t),i=Gh(t),s=Wh(i),l=qn(t),u=a==="y",c=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:o.y-n.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-n.width,y:d};break;default:p={x:o.x,y:o.y}}switch(Ys(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var WD=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:d}=HD(u,o,l),f=o,p={},h=0;for(let m=0;m<s.length;m++){let{name:x,fn:v}=s[m],{x:g,y,data:w,reset:C}=await v({x:c,y:d,initialPlacement:o,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=g??c,d=y??d,p={...p,[x]:{...p[x],...w}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:c,y:d}=HD(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function Ku(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=jn(t,e),h=OC(p),x=s[f?d==="floating"?"reference":"floating":d],v=Qs(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Qs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-C.top+h.top)/w.y,bottom:(C.bottom-v.bottom+h.bottom)/w.y,left:(v.left-C.left+h.left)/w.x,right:(C.right-v.right+h.right)/w.x}}var GD=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=jn(e,t)||{};if(u==null)return{};let d=OC(c),f={x:r,y:o},p=Gh(n),h=Wh(p),m=await i.getDimensions(u),x=p==="y",v=x?"top":"left",g=x?"bottom":"right",y=x?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],C=f[p]-a.reference[p],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),S=R?R[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(R)))&&(S=s.floating[y]||a.floating[h]);let L=w/2-C/2,T=S/2-m[h]/2-1,P=Gn(d[v],T),N=Gn(d[g],T),F=P,q=S-m[h]-N,A=S/2-m[h]/2+L,G=Uh(F,A,q),D=!l.arrow&&Ys(n)!=null&&A!==G&&a.reference[h]/2-(A<F?P:N)-m[h]/2<0,z=D?A<F?A-F:A-q:0;return{[p]:f[p]+z,data:{[p]:G,centerOffset:A-G-z,...D&&{alignmentOffset:z}},reset:D}}});var jD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...x}=jn(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let v=qn(n),g=mn(s),y=qn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!m?[$f(s)]:VD(s)),R=h!=="none";!f&&R&&C.push(...BD(s,m,h,w));let S=[s,...C],L=await Ku(t,x),T=[],P=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&T.push(L[v]),d){let A=FD(n,i,w);T.push(L[A[0]],L[A[1]])}if(P=[...P,{placement:n,overflows:T}],!T.every(A=>A<=0)){var N,F;let A=(((N=a.flip)==null?void 0:N.index)||0)+1,G=S[A];if(G&&(!(d==="alignment"?g!==mn(G):!1)||P.every(B=>mn(B.placement)===g?B.overflows[0]>0:!0)))return{data:{index:A,overflows:P},reset:{placement:G}};let D=(F=P.filter(z=>z.overflows[0]<=0).sort((z,B)=>z.overflows[1]-B.overflows[1])[0])==null?void 0:F.placement;if(!D)switch(p){case"bestFit":{var q;let z=(q=P.filter(B=>{if(R){let k=mn(B.placement);return k===g||k==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(k=>k>0).reduce((k,te)=>k+te,0)]).sort((B,k)=>B[1]-k[1])[0])==null?void 0:q[0];z&&(D=z);break}case"initialPlacement":D=s;break}if(n!==D)return{reset:{placement:D}}}return{}}}};function UD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zD(e){return OD.some(t=>e[t]>=0)}var qD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=jn(e,t);switch(o){case"referenceHidden":{let a=await Ku(t,{...n,elementContext:"reference"}),i=UD(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:zD(i)}}}case"escaped":{let a=await Ku(t,{...n,altBoundary:!0}),i=UD(a,r.floating);return{data:{escapedOffsets:i,escaped:zD(i)}}}default:return{}}}}};var $D=new Set(["left","top"]);async function p6(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=qn(r),s=Ys(r),l=mn(r)==="y",u=$D.has(i)?-1:1,c=a&&l?-1:1,d=jn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var KD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await p6(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},XD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:v,y:g}=x;return{x:v,y:g}}},...l}=jn(e,t),u={x:r,y:o},c=await Ku(t,l),d=mn(qn(n)),f=zh(d),p=u[f],h=u[d];if(a){let x=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=p+c[x],y=p-c[v];p=Uh(g,p,y)}if(i){let x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=h+c[x],y=h-c[v];h=Uh(g,h,y)}let m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-o,enabled:{[f]:a,[d]:i}}}}}},YD=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=jn(e,t),c={x:r,y:o},d=mn(n),f=zh(d),p=c[f],h=c[d],m=jn(s,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",w=a.reference[f]-a.floating[y]+x.mainAxis,C=a.reference[f]+a.reference[y]-x.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var v,g;let y=f==="y"?"width":"height",w=$D.has(qn(n)),C=a.reference[d]-a.floating[y]+(w&&((v=i.offset)==null?void 0:v[d])||0)+(w?0:x.crossAxis),R=a.reference[d]+a.reference[y]+(w?0:((g=i.offset)==null?void 0:g[d])||0)-(w?x.crossAxis:0);h<C?h=C:h>R&&(h=R)}return{[f]:p,[d]:h}}}},QD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=jn(e,t),c=await Ku(t,u),d=qn(n),f=Ys(n),p=mn(n)==="y",{width:h,height:m}=a.floating,x,v;d==="top"||d==="bottom"?(x=d,v=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,x=f==="end"?"top":"bottom");let g=m-c.top-c.bottom,y=h-c.left-c.right,w=Gn(m-c[x],g),C=Gn(h-c[v],y),R=!t.middlewareData.shift,S=w,L=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=g),R&&!f){let P=Mr(c.left,0),N=Mr(c.right,0),F=Mr(c.top,0),q=Mr(c.bottom,0);p?L=h-2*(P!==0||N!==0?P+N:Mr(c.left,c.right)):S=m-2*(F!==0||q!==0?F+q:Mr(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:S});let T=await i.getDimensions(s.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function jh(){return typeof window<"u"}function Js(e){return JD(e)?(e.nodeName||"").toLowerCase():"#document"}function Qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gn(e){var t;return(t=(JD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function JD(e){return jh()?e instanceof Node||e instanceof Qr(e).Node:!1}function Oo(e){return jh()?e instanceof Element||e instanceof Qr(e).Element:!1}function hn(e){return jh()?e instanceof HTMLElement||e instanceof Qr(e).HTMLElement:!1}function ZD(e){return!jh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qr(e).ShadowRoot}var m6=new Set(["inline","contents"]);function Xu(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Fo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!m6.has(n)}var g6=new Set(["table","td","th"]);function eN(e){return g6.has(Js(e))}var h6=[":popover-open",":modal"];function Yf(e){return h6.some(t=>{try{return e.matches(t)}catch{return!1}})}var v6=["transform","translate","scale","rotate","perspective"],y6=["transform","translate","scale","rotate","perspective","filter"],x6=["paint","layout","strict","content"];function qh(e){let t=$h(),r=Oo(e)?Fo(e):e;return v6.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||y6.some(o=>(r.willChange||"").includes(o))||x6.some(o=>(r.contain||"").includes(o))}function tN(e){let t=Ta(e);for(;hn(t)&&!el(t);){if(qh(t))return t;if(Yf(t))return null;t=Ta(t)}return null}function $h(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var w6=new Set(["html","body","#document"]);function el(e){return w6.has(Js(e))}function Fo(e){return Qr(e).getComputedStyle(e)}function Qf(e){return Oo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ta(e){if(Js(e)==="html")return e;let t=e.assignedSlot||e.parentNode||ZD(e)&&e.host||gn(e);return ZD(t)?t.host:t}function rN(e){let t=Ta(e);return el(t)?e.ownerDocument?e.ownerDocument.body:e.body:hn(t)&&Xu(t)?t:rN(t)}function Zs(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=rN(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=Qr(n);if(a){let s=Kh(i);return t.concat(i,i.visualViewport||[],Xu(n)?n:[],s&&r?Zs(s):[])}return t.concat(n,Zs(n,[],r))}function Kh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function aN(e){let t=Fo(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=hn(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=Kf(r)!==a||Kf(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function VC(e){return Oo(e)?e:e.contextElement}function Yu(e){let t=VC(e);if(!hn(t))return pn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=aN(t),i=(a?Kf(r.width):r.width)/o,s=(a?Kf(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var C6=pn(0);function iN(e){let t=Qr(e);return!$h()||!t.visualViewport?C6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function S6(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Qr(e)?!1:t}function tl(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=VC(e),i=pn(1);t&&(o?Oo(o)&&(i=Yu(o)):i=Yu(e));let s=S6(a,r,o)?iN(a):pn(0),l=(n.left+s.x)/i.x,u=(n.top+s.y)/i.y,c=n.width/i.x,d=n.height/i.y;if(a){let f=Qr(a),p=o&&Oo(o)?Qr(o):o,h=f,m=Kh(h);for(;m&&o&&p!==h;){let x=Yu(m),v=m.getBoundingClientRect(),g=Fo(m),y=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*x.x,w=v.top+(m.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=w,h=Qr(m),m=Kh(h)}}return Qs({width:c,height:d,x:l,y:u})}function BC(e,t){let r=Qf(e).scrollLeft;return t?t.left+r:tl(gn(e)).left+r}function sN(e,t,r){r===void 0&&(r=!1);let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-(r?0:BC(e,o)),a=o.top+t.scrollTop;return{x:n,y:a}}function b6(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=gn(o),s=t?Yf(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=pn(1),c=pn(0),d=hn(o);if((d||!d&&!a)&&((Js(o)!=="body"||Xu(i))&&(l=Qf(o)),hn(o))){let p=tl(o);u=Yu(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?sN(i,l,!0):pn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function R6(e){return Array.from(e.getClientRects())}function L6(e){let t=gn(e),r=Qf(e),o=e.ownerDocument.body,n=Mr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Mr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+BC(e),s=-r.scrollTop;return Fo(o).direction==="rtl"&&(i+=Mr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}function I6(e,t){let r=Qr(e),o=gn(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let u=$h();(!u||u&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:a,height:i,x:s,y:l}}var P6=new Set(["absolute","fixed"]);function T6(e,t){let r=tl(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=hn(e)?Yu(e):pn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:i,height:s,x:l,y:u}}function oN(e,t,r){let o;if(t==="viewport")o=I6(e,r);else if(t==="document")o=L6(gn(e));else if(Oo(t))o=T6(t,r);else{let n=iN(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qs(o)}function lN(e,t){let r=Ta(e);return r===t||!Oo(r)||el(r)?!1:Fo(r).position==="fixed"||lN(r,t)}function k6(e,t){let r=t.get(e);if(r)return r;let o=Zs(e,[],!1).filter(s=>Oo(s)&&Js(s)!=="body"),n=null,a=Fo(e).position==="fixed",i=a?Ta(e):e;for(;Oo(i)&&!el(i);){let s=Fo(i),l=qh(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&P6.has(n.position)||Xu(i)&&!l&&lN(e,i))?o=o.filter(c=>c!==i):n=s,i=Ta(i)}return t.set(e,o),o}function M6(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?Yf(t)?[]:k6(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=oN(t,c,n);return u.top=Mr(d.top,u.top),u.right=Gn(d.right,u.right),u.bottom=Gn(d.bottom,u.bottom),u.left=Mr(d.left,u.left),u},oN(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function E6(e){let{width:t,height:r}=aN(e);return{width:t,height:r}}function A6(e,t,r){let o=hn(t),n=gn(t),a=r==="fixed",i=tl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=pn(0);function u(){l.x=BC(n)}if(o||!o&&!a)if((Js(t)!=="body"||Xu(n))&&(s=Qf(t)),o){let p=tl(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!o&&n&&u();let c=n&&!o&&!a?sN(n,s):pn(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function FC(e){return Fo(e).position==="static"}function nN(e,t){if(!hn(e)||Fo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return gn(e)===r&&(r=r.ownerDocument.body),r}function uN(e,t){let r=Qr(e);if(Yf(e))return r;if(!hn(e)){let n=Ta(e);for(;n&&!el(n);){if(Oo(n)&&!FC(n))return n;n=Ta(n)}return r}let o=nN(e,t);for(;o&&eN(o)&&FC(o);)o=nN(o,t);return o&&el(o)&&FC(o)&&!qh(o)?r:o||tN(e)||r}var D6=async function(e){let t=this.getOffsetParent||uN,r=this.getDimensions,o=await r(e.floating);return{reference:A6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function N6(e){return Fo(e).direction==="rtl"}var cN={convertOffsetParentRelativeRectToViewportRelativeRect:b6,getDocumentElement:gn,getClippingRect:M6,getOffsetParent:uN,getElementRects:D6,getClientRects:R6,getDimensions:E6,getScale:Yu,isElement:Oo,isRTL:N6};function dN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _6(e,t){let r=null,o,n=gn(e);function a(){var s;clearTimeout(o),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let h=Xf(d),m=Xf(n.clientWidth-(c+f)),x=Xf(n.clientHeight-(d+p)),v=Xf(c),y={rootMargin:-h+"px "+-m+"px "+-x+"px "+-v+"px",threshold:Mr(0,Gn(1,l))||1},w=!0;function C(R){let S=R[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!dN(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(C,y)}r.observe(e)}return i(!0),a}function HC(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=VC(e),c=n||a?[...u?Zs(u):[],...Zs(t)]:[];c.forEach(v=>{n&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});let d=u&&s?_6(u,r):null,f=-1,p=null;i&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let h,m=l?tl(e):null;l&&x();function x(){let v=tl(e);m&&!dN(m,v)&&r(),m=v,h=requestAnimationFrame(x)}return r(),()=>{var v;c.forEach(g=>{n&&g.removeEventListener("scroll",r),a&&g.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var fN=KD;var pN=XD,mN=jD,gN=QD,hN=qD,UC=GD;var vN=YD,zC=(e,t,r)=>{let o=new Map,n={platform:cN,...r},a={...n.platform,_c:o};return WD(e,t,{...n,platform:a})};var Lt=b(E(),1),xN=b(E(),1),wN=b(Yl(),1),O6=typeof document<"u",F6=function(){},Xh=O6?xN.useLayoutEffect:F6;function Yh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Yh(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!Yh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function CN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yN(e,t){let r=CN(e);return Math.round(t*r)/r}function WC(e){let t=Lt.useRef(e);return Xh(()=>{t.current=e}),t}function SN(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=Lt.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Lt.useState(o);Yh(f,o)||p(o);let[h,m]=Lt.useState(null),[x,v]=Lt.useState(null),g=Lt.useCallback(B=>{B!==R.current&&(R.current=B,m(B))},[]),y=Lt.useCallback(B=>{B!==S.current&&(S.current=B,v(B))},[]),w=a||h,C=i||x,R=Lt.useRef(null),S=Lt.useRef(null),L=Lt.useRef(c),T=l!=null,P=WC(l),N=WC(n),F=WC(u),q=Lt.useCallback(()=>{if(!R.current||!S.current)return;let B={placement:t,strategy:r,middleware:f};N.current&&(B.platform=N.current),zC(R.current,S.current,B).then(k=>{let te={...k,isPositioned:F.current!==!1};A.current&&!Yh(L.current,te)&&(L.current=te,wN.flushSync(()=>{d(te)}))})},[f,t,r,N,F]);Xh(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let A=Lt.useRef(!1);Xh(()=>(A.current=!0,()=>{A.current=!1}),[]),Xh(()=>{if(w&&(R.current=w),C&&(S.current=C),w&&C){if(P.current)return P.current(w,C,q);q()}},[w,C,q,P,T]);let G=Lt.useMemo(()=>({reference:R,floating:S,setReference:g,setFloating:y}),[g,y]),D=Lt.useMemo(()=>({reference:w,floating:C}),[w,C]),z=Lt.useMemo(()=>{let B={position:r,left:0,top:0};if(!D.floating)return B;let k=yN(D.floating,c.x),te=yN(D.floating,c.y);return s?{...B,transform:"translate("+k+"px, "+te+"px)",...CN(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:te}},[r,s,D.floating,c.x,c.y]);return Lt.useMemo(()=>({...c,update:q,refs:G,elements:D,floatingStyles:z}),[c,q,G,D,z])}var V6=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?UC({element:o.current,padding:n}).fn(r):{}:o?UC({element:o,padding:n}).fn(r):{}}}},bN=(e,t)=>({...fN(e),options:[e,t]}),RN=(e,t)=>({...pN(e),options:[e,t]}),LN=(e,t)=>({...vN(e),options:[e,t]}),IN=(e,t)=>({...mN(e),options:[e,t]}),PN=(e,t)=>({...gN(e),options:[e,t]});var TN=(e,t)=>({...hN(e),options:[e,t]});var kN=(e,t)=>({...V6(e),options:[e,t]});var MN=b(E(),1);var GC=b(M(),1),B6="Arrow",EN=MN.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,GC.jsx)($.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,GC.jsx)("polygon",{points:"0,0 30,0 15,10"})})});EN.displayName=B6;var AN=EN;var Oi=b(M(),1);var jC="Popper",[DN,Vo]=Te(jC),[U6,NN]=DN(jC),_N=e=>{let{__scopePopper:t,children:r}=e,[o,n]=Zr.useState(null);return(0,Oi.jsx)(U6,{scope:t,anchor:o,onAnchorChange:n,children:r})};_N.displayName=jC;var ON="PopperAnchor",FN=Zr.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=NN(ON,r),i=Zr.useRef(null),s=ne(t,i),l=Zr.useRef(null);return Zr.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,Oi.jsx)($.div,{...n,ref:s})});FN.displayName=ON;var qC="PopperContent",[z6,W6]=DN(qC),VN=Zr.forwardRef((e,t)=>{let{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,x=NN(qC,r),[v,g]=Zr.useState(null),y=ne(t,j=>g(j)),[w,C]=Zr.useState(null),R=$u(w),S=R?.width??0,L=R?.height??0,T=o+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},N=Array.isArray(u)?u:[u],F=N.length>0,q={padding:P,boundary:N.filter(j6),altBoundary:F},{refs:A,floatingStyles:G,placement:D,isPositioned:z,middlewareData:B}=SN({strategy:"fixed",placement:T,whileElementsMounted:(...j)=>HC(...j,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[bN({mainAxis:n+L,alignmentAxis:i}),l&&RN({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?LN():void 0,...q}),l&&IN({...q}),PN({...q,apply:({elements:j,rects:pe,availableWidth:be,availableHeight:Ne})=>{let{width:nt,height:bt}=pe.reference,xo=j.floating.style;xo.setProperty("--radix-popper-available-width",`${be}px`),xo.setProperty("--radix-popper-available-height",`${Ne}px`),xo.setProperty("--radix-popper-anchor-width",`${nt}px`),xo.setProperty("--radix-popper-anchor-height",`${bt}px`)}}),w&&kN({element:w,padding:s}),q6({arrowWidth:S,arrowHeight:L}),f&&TN({strategy:"referenceHidden",...q})]}),[k,te]=UN(D),ve=et(h);ke(()=>{z&&ve?.()},[z,ve]);let _=B.arrow?.x,Z=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[Y,ce]=Zr.useState();return ke(()=>{v&&ce(window.getComputedStyle(v).zIndex)},[v]),(0,Oi.jsx)("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:z?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Oi.jsx)(z6,{scope:r,placedSide:k,onArrowChange:C,arrowX:_,arrowY:Z,shouldHideArrow:ae,children:(0,Oi.jsx)($.div,{"data-side":k,"data-align":te,...m,ref:y,style:{...m.style,animation:z?void 0:"none"}})})})});VN.displayName=qC;var BN="PopperArrow",G6={top:"bottom",right:"left",bottom:"top",left:"right"},HN=Zr.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=W6(BN,o),i=G6[a.placedSide];return(0,Oi.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,Oi.jsx)(AN,{...n,ref:r,style:{...n.style,display:"block"}})})});HN.displayName=BN;function j6(e){return e!==null}var q6=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:o,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=UN(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,h="",m="";return u==="bottom"?(h=i?d:`${f}px`,m=`${-l}px`):u==="top"?(h=i?d:`${f}px`,m=`${o.floating.height+l}px`):u==="right"?(h=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(h=`${o.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:h,y:m}}}});function UN(e){let[t,r="center"]=e.split("-");return[t,r]}var ka=_N,Ma=FN,Fi=VN,Vi=HN;var Zh=b(E(),1),zN=b(Yl(),1);var WN=b(M(),1),$6="Portal",go=Zh.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Zh.useState(!1);ke(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?zN.default.createPortal((0,WN.jsx)($.div,{...o,ref:t}),i):null});go.displayName=$6;var K6=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qu=new WeakMap,Jh=new WeakMap,ev={},$C=0,GN=function(e){return e&&(e.host||GN(e.parentNode))},X6=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=GN(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Y6=function(e,t,r,o){var n=X6(t,Array.isArray(e)?e:[e]);ev[r]||(ev[r]=new WeakMap);var a=ev[r],i=[],s=new Set,l=new Set(n),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};n.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(o),h=p!==null&&p!=="false",m=(Qu.get(f)||0)+1,x=(a.get(f)||0)+1;Qu.set(f,m),a.set(f,x),i.push(f),m===1&&h&&Jh.set(f,!0),x===1&&f.setAttribute(r,"true"),h||f.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),s.clear(),$C++,function(){i.forEach(function(d){var f=Qu.get(d)-1,p=a.get(d)-1;Qu.set(d,f),a.set(d,p),f||(Jh.has(d)||d.removeAttribute(o),Jh.delete(d)),p||d.removeAttribute(r)}),$C--,$C||(Qu=new WeakMap,Qu=new WeakMap,Jh=new WeakMap,ev={})}},Bi=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||K6(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),Y6(o,n,r,"aria-hidden")):function(){return null}};var Jr=function(){return Jr=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Jr.apply(this,arguments)};function tv(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function jN(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var iv=b(E());var mr=b(E());var rl="right-scroll-bar-position",ol="width-before-scroll-bar",KC="with-scroll-bars-hidden",XC="--removed-body-scroll-bar-size";function rv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var qN=b(E());function $N(e,t){var r=(0,qN.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var ov=b(E());var Q6=typeof window<"u"?ov.useLayoutEffect:ov.useEffect,KN=new WeakMap;function YC(e,t){var r=$N(t||null,function(o){return e.forEach(function(n){return rv(n,o)})});return Q6(function(){var o=KN.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||rv(s,null)}),a.forEach(function(s){n.has(s)||rv(s,i)})}KN.set(r,e)},[e]),r}function Z6(e){return e}function J6(e,t){t===void 0&&(t=Z6);var r=[],o=!1,n={read:function(){if(o)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(a){var i=t(a,o);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){o=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return n}function QC(e){e===void 0&&(e={});var t=J6(null);return t.options=Jr({async:!0,ssr:!1},e),t}var XN=b(E()),YN=function(e){var t=e.sideCar,r=tv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return XN.createElement(o,Jr({},r))};YN.isSideCarExport=!0;function ZC(e,t){return e.useMedium(t),YN}var nv=QC();var JC=function(){},Zf=mr.forwardRef(function(e,t){var r=mr.useRef(null),o=mr.useState({onScrollCapture:JC,onWheelCapture:JC,onTouchMoveCapture:JC}),n=o[0],a=o[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,x=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=e.gapMode,w=tv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,R=YC([r,t]),S=Jr(Jr({},w),n);return mr.createElement(mr.Fragment,null,c&&mr.createElement(C,{sideCar:nv,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?mr.cloneElement(mr.Children.only(s),Jr(Jr({},S),{ref:R})):mr.createElement(g,Jr({},S,{className:l,ref:R}),s))});Zf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zf.classNames={fullWidth:ol,zeroRight:rl};var rt=b(E());var Ju=b(E());var JN=b(E());var QN;var ZN=function(){if(QN)return QN;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function e$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ZN();return t&&e.setAttribute("nonce",t),e}function t$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var eS=function(){var e=0,t=null;return{add:function(r){e==0&&(t=e$())&&(t$(t,r),r$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var tS=function(){var e=eS();return function(t,r){JN.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Jf=function(){var e=tS(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var o$={left:0,top:0,right:0,gap:0},rS=function(e){return parseInt(e||"",10)||0},n$=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[rS(r),rS(o),rS(n)]},oS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return o$;var t=n$(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var a$=Jf(),Zu="data-scroll-locked",i$=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
18
- .`.concat(KC,` {
19
- overflow: hidden `).concat(o,`;
20
- padding-right: `).concat(s,"px ").concat(o,`;
10
+ `),()=>{g.contains(p)&&g.removeChild(p)}},[t]),(0,Ub.jsx)(cp,{isPresent:t,childRef:n,sizeRef:s,children:Pc.cloneElement(e,{ref:n})})}var qb=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:a,presenceAffectsLayout:n,mode:s,anchorX:i,root:l})=>{let u=Io(aN),c=(0,Vl.useId)(),d=!0,f=(0,Vl.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:o,custom:a,onExitComplete:m=>{u.set(m,!0);for(let p of u.values())if(!p)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[o,u,r]);return n&&d&&(f={...f}),(0,Vl.useMemo)(()=>{u.forEach((m,p)=>u.set(p,!1))},[o]),zb.useEffect(()=>{!o&&!u.size&&r&&r()},[o]),s==="popLayout"&&(e=(0,dp.jsx)(Gb,{isPresent:o,anchorX:i,root:l,children:e})),(0,dp.jsx)(fa.Provider,{value:f,children:e})};function aN(){return new Map}var ba=b(A(),1);function Tc(e=!0){let t=(0,ba.useContext)(fa);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:a}=t,n=(0,ba.useId)();(0,ba.useEffect)(()=>{if(e)return a(n)},[e]);let s=(0,ba.useCallback)(()=>e&&r&&r(n),[n,r,e]);return!o&&r?[!1,s]:[!0]}var Mc=b(A(),1),Bl=e=>e.key||"";function fp(e){let t=[];return Mc.Children.forEach(e,o=>{(0,Mc.isValidElement)(o)&&t.push(o)}),t}var Fr=({children:e,custom:t,initial:o=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:n="sync",propagate:s=!1,anchorX:i="left",root:l})=>{let[u,c]=Tc(s),d=(0,pr.useMemo)(()=>fp(e),[e]),f=s&&!u?[]:d.map(Bl),m=(0,pr.useRef)(!0),p=(0,pr.useRef)(d),g=Io(()=>new Map),[h,v]=(0,pr.useState)(d),[x,y]=(0,pr.useState)(d);da(()=>{m.current=!1,p.current=d;for(let w=0;w<x.length;w++){let I=Bl(x[w]);f.includes(I)?g.delete(I):g.get(I)!==!0&&g.set(I,!1)}},[x,f.length,f.join("-")]);let R=[];if(d!==h){let w=[...d];for(let I=0;I<x.length;I++){let L=x[I],P=Bl(L);f.includes(P)||(w.splice(I,0,L),R.push(L))}return n==="wait"&&R.length&&(w=R),y(fp(w)),v(d),null}let{forceRender:C}=(0,pr.useContext)(xs);return(0,Hl.jsx)(Hl.Fragment,{children:x.map(w=>{let I=Bl(w),L=s&&!u?!1:d===x||f.includes(I),P=()=>{if(g.has(I))g.set(I,!0);else return;let T=!0;g.forEach(O=>{O||(T=!1)}),T&&(C?.(),y(p.current),s&&c?.(),r&&r())};return(0,Hl.jsx)(qb,{isPresent:L,initial:!m.current||o?void 0:!1,custom:t,presenceAffectsLayout:a,mode:n,root:l,onExitComplete:L?void 0:P,anchorX:i,children:w},I)})})};var Wb=b(A(),1),kc=(0,Wb.createContext)({strict:!1});var $b={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"]},Or={};for(let e in $b)Or[e]={isEnabled:t=>$b[e].some(o=>!!t[o])};function jb(e){for(let t in e)Or[t]={...Or[t],...e[t]}}var nN=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 Ul(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nN.has(e)}var Kb=e=>!Ul(e);function sN(e){typeof e=="function"&&(Kb=t=>t.startsWith("on")?!Ul(t):e(t))}try{sN(sA("@emotion/is-prop-valid").default)}catch{}function Xb(e,t,o){let r={};for(let a in e)a==="values"&&typeof e.values=="object"||(Kb(a)||o===!0&&Ul(a)||!t&&!Ul(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}var Gc=b(D(),1);var Fs=b(A(),1);var Yb=b(A(),1),Ca=(0,Yb.createContext)({});var Ec=b(A(),1);function wa(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _r(e){return typeof e=="string"||Array.isArray(e)}var Ac=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gl=["initial",...Ac];function wn(e){return wa(e.animate)||Gl.some(t=>_r(e[t]))}function Dc(e){return!!(wn(e)||e.variants)}function Zb(e,t){if(wn(e)){let{initial:o,animate:r}=e;return{initial:o===!1||_r(o)?o:void 0,animate:_r(r)?r:void 0}}return e.inherit!==!1?t:{}}function Jb(e){let{initial:t,animate:o}=Zb(e,(0,Ec.useContext)(Ca));return(0,Ec.useMemo)(()=>({initial:t,animate:o}),[Qb(t),Qb(o)])}function Qb(e){return Array.isArray(e)?e.join(" "):e}var ks=b(A(),1);var oC=b(A(),1);var Sn={};function eC(e){for(let t in e)Sn[t]=e[t],ln(t)&&(Sn[t].isCSSVariable=!0)}function Nc(e,{layout:t,layoutId:o}){return mo.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Sn[e]||e==="opacity")}var iN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lN=Ko.length;function tC(e,t,o){let r="",a=!0;for(let n=0;n<lN;n++){let s=Ko[n],i=e[s];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(s.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||o){let u=Fl(i,hn[s]);if(!l){a=!1;let c=iN[s]||s;r+=`${c}(${u}) `}o&&(t[s]=u)}}return r=r.trim(),o?r=o(t,a?"":r):a&&(r="none"),r}function Ps(e,t,o){let{style:r,vars:a,transformOrigin:n}=e,s=!1,i=!1;for(let l in t){let u=t[l];if(mo.has(l)){s=!0;continue}else if(ln(l)){a[l]=u;continue}else{let c=Fl(u,hn[l]);l.startsWith("origin")?(i=!0,n[l]=c):r[l]=c}}if(t.transform||(s||o?r.transform=tC(t,e.transform,o):r.transform&&(r.transform="none")),i){let{originX:l="50%",originY:u="50%",originZ:c=0}=n;r.transformOrigin=`${l} ${u} ${c}`}}var Ts=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mp(e,t,o){for(let r in t)!ke(t[r])&&!Nc(r,o)&&(e[r]=t[r])}function uN({transformTemplate:e},t){return(0,oC.useMemo)(()=>{let o=Ts();return Ps(o,t,e),Object.assign({},o.vars,o.style)},[t])}function cN(e,t){let o=e.style||{},r={};return mp(r,o,e),Object.assign(r,uN(e,t)),r}function rC(e,t){let o={},r=cN(e,t);return e.drag&&e.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(o.tabIndex=0),o.style=r,o}var nC=b(A(),1);var dN={offset:"stroke-dashoffset",array:"stroke-dasharray"},fN={offset:"strokeDashoffset",array:"strokeDasharray"};function aC(e,t,o=1,r=0,a=!0){e.pathLength=1;let n=a?dN:fN;e[n.offset]=ae.transform(-r);let s=ae.transform(t),i=ae.transform(o);e[n.array]=`${s} ${i}`}function Fc(e,{attrX:t,attrY:o,attrScale:r,pathLength:a,pathSpacing:n=1,pathOffset:s=0,...i},l,u,c){if(Ps(e,i,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),o!==void 0&&(d.y=o),r!==void 0&&(d.scale=r),a!==void 0&&aC(d,a,n,s,!1)}var Oc=()=>({...Ts(),attrs:{}});var _c=e=>typeof e=="string"&&e.toLowerCase()==="svg";function sC(e,t,o,r){let a=(0,nC.useMemo)(()=>{let n=Oc();return Fc(n,t,_c(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};mp(n,e.style,e),a.style={...n,...a.style}}return a}var iC=["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 Ms(e){return typeof e!="string"||e.includes("-")?!1:!!(iC.indexOf(e)>-1||/[A-Z]/u.test(e))}function lC(e,t,o,{latestValues:r},a,n=!1){let i=(Ms(e)?sC:rC)(t,r,a,e),l=Xb(t,typeof e=="string",n),u=e!==ks.Fragment?{...l,...i,ref:o}:{},{children:c}=t,d=(0,ks.useMemo)(()=>ke(c)?c.get():c,[c]);return(0,ks.createElement)(e,{...u,children:d})}var pp=b(A(),1);function uC(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function As(e,t,o,r){if(typeof t=="function"){let[a,n]=uC(r);t=t(o!==void 0?o:e.custom,a,n)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[a,n]=uC(r);t=t(o!==void 0?o:e.custom,a,n)}return t}function Ds(e){return ke(e)?e.get():e}function mN({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,a){return{latestValues:pN(o,r,a,e),renderState:t()}}function pN(e,t,o,r){let a={},n=r(e,{});for(let f in n)a[f]=Ds(n[f]);let{initial:s,animate:i}=e,l=wn(e),u=Dc(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let c=o?o.initial===!1:!1;c=c||s===!1;let d=c?i:s;if(d&&typeof d!="boolean"&&!wa(d)){let f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){let p=As(e,f[m]);if(p){let{transitionEnd:g,transition:h,...v}=p;for(let x in v){let y=v[x];if(Array.isArray(y)){let R=c?y.length-1:0;y=y[R]}y!==null&&(a[x]=y)}for(let x in g)a[x]=g[x]}}}return a}var Vc=e=>(t,o)=>{let r=(0,pp.useContext)(Ca),a=(0,pp.useContext)(fa),n=()=>mN(e,t,r,a);return o?n():Io(n)};function Es(e,t,o){let{style:r}=e,a={};for(let n in r)(ke(r[n])||t.style&&ke(t.style[n])||Nc(n,e)||o?.getValue(n)?.liveStyle!==void 0)&&(a[n]=r[n]);return a}var cC=Vc({scrapeMotionValuesFromProps:Es,createRenderState:Ts});function Bc(e,t,o){let r=Es(e,t,o);for(let a in e)if(ke(e[a])||ke(t[a])){let n=Ko.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[n]=e[a]}return r}var dC=Vc({scrapeMotionValuesFromProps:Bc,createRenderState:Oc});var fC=Symbol.for("motionComponentSymbol");var mC=b(A(),1);function Vr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pC(e,t,o){return(0,mC.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):Vr(o)&&(o.current=r))},[t])}var oo=b(A(),1);var Ns=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var gN="framerAppearId",Hc="data-"+Ns(gN);var gC=b(A(),1),Uc=(0,gC.createContext)({});function hC(e,t,o,r,a){let{visualElement:n}=(0,oo.useContext)(Ca),s=(0,oo.useContext)(kc),i=(0,oo.useContext)(fa),l=(0,oo.useContext)(ya).reducedMotion,u=(0,oo.useRef)(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:n,props:o,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,oo.useContext)(Uc);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&hN(u.current,o,a,d);let f=(0,oo.useRef)(!1);(0,oo.useInsertionEffect)(()=>{c&&f.current&&c.update(o,i)});let m=o[Hc],p=(0,oo.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return da(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),(0,oo.useEffect)(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),c.enteringChildren=void 0)}),c}function hN(e,t,o,r){let{layoutId:a,layout:n,drag:s,dragConstraints:i,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:xC(e.parent)),e.projection.setOptions({layoutId:a,layout:n,alwaysMeasureLayout:!!s||i&&Vr(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function xC(e){if(e)return e.options.allowProjection!==!1?e.projection:xC(e.parent)}function zc(e,{forwardMotionProps:t=!1}={},o,r){o&&jb(o);let a=Ms(e)?dC:cC;function n(i,l){let u,c={...(0,Fs.useContext)(ya),...i,layoutId:xN(i)},{isStatic:d}=c,f=Jb(i),m=a(i,d);if(!d&&vs){vN(c,o);let p=yN(c);u=p.MeasureLayout,f.visualElement=hC(e,m,c,r,p.ProjectionNode)}return(0,Gc.jsxs)(Ca.Provider,{value:f,children:[u&&f.visualElement?(0,Gc.jsx)(u,{visualElement:f.visualElement,...c}):null,lC(e,i,pC(m,f.visualElement,l),m,d,t)]})}n.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let s=(0,Fs.forwardRef)(n);return s[fC]=e,s}function xN({layoutId:e}){let t=(0,Fs.useContext)(xs).id;return t&&e!==void 0?t+"-"+e:e}function vN(e,t){let o=(0,Fs.useContext)(kc).strict}function yN(e){let{drag:t,layout:o}=Or;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function vC(e,t){if(typeof Proxy>"u")return zc;let o=new Map,r=(n,s)=>zc(n,s,e,t),a=(n,s)=>r(n,s);return new Proxy(a,{get:(n,s)=>s==="create"?r:(o.has(s)||o.set(s,zc(s,void 0,e,t)),o.get(s))})}var NC=b(A(),1);function qc({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function yC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bC(e,t){if(!t)return e;let o=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function gp(e){return e===void 0||e===1}function Wc({scale:e,scaleX:t,scaleY:o}){return!gp(e)||!gp(t)||!gp(o)}function Br(e){return Wc(e)||hp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hp(e){return CC(e.x)||CC(e.y)}function CC(e){return e&&e!=="0%"}function zl(e,t,o){let r=e-o,a=t*r;return o+a}function wC(e,t,o,r,a){return a!==void 0&&(e=zl(e,a,r)),zl(e,o,r)+t}function xp(e,t=0,o=1,r,a){e.min=wC(e.min,t,o,r,a),e.max=wC(e.max,t,o,r,a)}function vp(e,{x:t,y:o}){xp(e.x,t.translate,t.scale,t.originPoint),xp(e.y,o.translate,o.scale,o.originPoint)}var SC=.999999999999,RC=1.0000000000001;function LC(e,t,o,r=!1){let a=o.length;if(!a)return;t.x=t.y=1;let n,s;for(let i=0;i<a;i++){n=o[i],s=n.projectionDelta;let{visualElement:l}=n.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&n.options.layoutScroll&&n.scroll&&n!==n.root&&Rn(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,vp(e,s)),r&&Br(n.latestValues)&&Rn(e,n.latestValues))}t.x<RC&&t.x>SC&&(t.x=1),t.y<RC&&t.y>SC&&(t.y=1)}function Sa(e,t){e.min=e.min+t,e.max=e.max+t}function IC(e,t,o,r,a=.5){let n=Ce(e.min,e.max,a);xp(e,t,o,n,r)}function Rn(e,t){IC(e.x,t.x,t.scaleX,t.scale,t.originX),IC(e.y,t.y,t.scaleY,t.scale,t.originY)}function yp(e,t){return qc(bC(e.getBoundingClientRect(),t))}function PC(e,t,o){let r=yp(e,o),{scroll:a}=t;return a&&(Sa(r.x,a.offset.x),Sa(r.y,a.offset.y)),r}var TC=()=>({translate:0,scale:1,origin:0,originPoint:0}),In=()=>({x:TC(),y:TC()}),MC=()=>({min:0,max:0}),Ue=()=>({x:MC(),y:MC()});var ql={current:null},$c={current:!1};function kC(){if($c.current=!0,!!vs)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ql.current=e.matches;e.addEventListener("change",t),t()}else ql.current=!1}var Ra=new WeakMap;function AC(e,t,o){for(let r in t){let a=t[r],n=o[r];if(ke(a))e.addValue(r,a);else if(ke(n))e.addValue(r,to(a,{owner:e}));else if(n!==a)if(e.hasValue(r)){let s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{let s=e.getStaticValue(r);e.addValue(r,to(s!==void 0?s:a,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var DC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Os=class{scrapeMotionValuesFromProps(t,o,r){return{}}constructor({parent:t,props:o,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Er,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=()=>{let f=ot.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ve.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=o.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=o,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=i,this.blockInitialAnimation=!!n,this.isControllingVariants=wn(o),this.isVariantNode=Dc(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(o,{},this);for(let f in d){let m=d[f];l[f]!==void 0&&ke(m)&&m.set(l[f])}}mount(t){this.current=t,Ra.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),$c.current||kC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ql.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Tt(this.notifyUpdate),Tt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let o=this.features[t];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,o){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let r=mo.has(t);r&&this.onBindTransform&&this.onBindTransform();let a=o.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),n;window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{a(),n&&n(),o.owner&&o.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Or){let o=Or[t];if(!o)continue;let{isEnabled:r,Feature:a}=o;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){let n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ue()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,o){this.latestValues[t]=o}update(t,o){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<DC.length;r++){let a=DC[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);let n="on"+a,s=t[n];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=AC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(t),()=>o.variantChildren.delete(t)}addValue(t,o){let r=this.values.get(t);o!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,o),this.values.set(t,o),this.latestValues[t]=o.get())}removeValue(t){this.values.delete(t);let o=this.valueSubscriptions.get(t);o&&(o(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,o){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&o!==void 0&&(r=to(o===null?void 0:o,{owner:this}),this.addValue(t,r)),r}readValue(t,o){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(al(r)||sl(r))?r=parseFloat(r):!up(r)&&kt.test(o)&&(r=El(t,o)),this.setBaseTarget(t,ke(r)?r.get():r)),ke(r)?r.get():r}setBaseTarget(t,o){this.baseTarget[t]=o}getBaseTarget(t){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let n=As(this.props,o,this.presenceContext?.custom);n&&(r=n[t])}if(o&&r!==void 0)return r;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ke(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new Mr),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){yn.render(this.render)}};var _s=class extends Os{constructor(){super(...arguments),this.KeyframeResolver=Nl}sortInstanceNodePosition(t,o){return t.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(t,o){return t.style?t.style[o]:void 0}removeValueFromRenderState(t,{vars:o,style:r}){delete o[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function jc(e,{style:t,vars:o},r,a){let n=e.style,s;for(s in t)n[s]=t[s];a?.applyProjectionStyles(n,r);for(s in o)n.setProperty(s,o[s])}function bN(e){return window.getComputedStyle(e)}var Vs=class extends _s{constructor(){super(...arguments),this.type="html",this.renderInstance=jc}readValueFromInstance(t,o){if(mo.has(o))return this.projection?.isProjecting?Ll(o):qm(t,o);{let r=bN(t),a=(ln(o)?r.getPropertyValue(o):r[o])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:o}){return yp(t,o)}build(t,o,r){Ps(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return Es(t,o,r)}};var Kc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function EC(e,t,o,r){jc(e,t,void 0,r);for(let a in t.attrs)e.setAttribute(Kc.has(a)?a:Ns(a),t.attrs[a])}var Bs=class extends _s{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ue}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(mo.has(o)){let r=Dl(o);return r&&r.default||0}return o=Kc.has(o)?o:Ns(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return Bc(t,o,r)}build(t,o,r){Fc(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,a){EC(t,o,r,a)}mount(t){this.isSVGTag=_c(t.tagName),super.mount(t)}};var FC=(e,t)=>Ms(e)?new Bs(t):new Vs(t,{allowProjection:e!==NC.Fragment});function gr(e,t,o){let r=e.getProps();return As(r,t,o!==void 0?o:r.custom,e)}var Wl=e=>Array.isArray(e);function CN(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,to(o))}function wN(e){return Wl(e)?e[e.length-1]||0:e}function $l(e,t){let o=gr(e,t),{transitionEnd:r={},transition:a={},...n}=o||{};n={...n,...r};for(let s in n){let i=wN(n[s]);CN(e,s,i)}}function OC(e){return!!(ke(e)&&e.add)}function jl(e,t){let o=e.getValue("willChange");if(OC(o))return o.add(t);if(!o&&Pt.WillChange){let r=new Pt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Xc(e){return e.props[Hc]}var SN=e=>e!==null;function _C(e,{repeat:t,repeatType:o="loop"},r){let a=e.filter(SN),n=t&&o!=="loop"&&t%2===1?0:a.length-1;return!n||r===void 0?a[n]:r}var RN={type:"spring",stiffness:500,damping:25,restSpeed:10},IN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LN={type:"keyframes",duration:.8},PN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VC=(e,{keyframes:t})=>t.length>2?LN:mo.has(e)?e.startsWith("scale")?IN(t[1]):RN:PN;function BC({when:e,delay:t,delayChildren:o,staggerChildren:r,staggerDirection:a,repeat:n,repeatType:s,repeatDelay:i,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var Hs=(e,t,o,r={},a,n)=>s=>{let i=gn(r,e)||{},l=i.delay||r.delay||0,{elapsed:u=0}=r;u=u-at(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:n?void 0:a};BC(i)||Object.assign(c,VC(e,c)),c.duration&&(c.duration=at(c.duration)),c.repeatDelay&&(c.repeatDelay=at(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Is(c),c.delay===0&&(d=!0)),(Pt.instantAnimations||Pt.skipAnimations)&&(d=!0,Is(c),c.delay=0),c.allowFlatten=!i.type&&!i.ease,d&&!n&&t.get()!==void 0){let f=_C(c.keyframes,i);if(f!==void 0){ve.update(()=>{c.onUpdate(f),c.onComplete()});return}}return i.isSync?new Dr(c):new Tl(c)};function TN({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function Us(e,t,{delay:o=0,transitionOverride:r,type:a}={}){let{transition:n=e.getDefaultTransition(),transitionEnd:s,...i}=t;r&&(n=r);let l=[],u=a&&e.animationState&&e.animationState.getState()[a];for(let c in i){let d=e.getValue(c,e.latestValues[c]??null),f=i[c];if(f===void 0||u&&TN(u,c))continue;let m={delay:o,...gn(n||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){let v=Xc(e);if(v){let x=window.MotionHandoffAnimation(v,c,ve);x!==null&&(m.startTime=x,g=!0)}}jl(e,c),d.start(Hs(c,d,f,e.shouldReduceMotion&&kl.has(c)?{type:!1}:m,e,g));let h=d.animation;h&&l.push(h)}return s&&Promise.all(l).then(()=>{ve.update(()=>{s&&$l(e,s)})}),l}function Yc(e,t,o,r=0,a=1){let n=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,i=(s-1)*r;return typeof o=="function"?o(n,s):a===1?n*r:i-n*r}function Zc(e,t,o={}){let r=gr(e,t,o.type==="exit"?e.presenceContext?.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(a=o.transitionOverride);let n=r?()=>Promise.all(Us(e,r,o)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=a;return MN(e,t,l,u,c,d,o)}:()=>Promise.resolve(),{when:i}=a;if(i){let[l,u]=i==="beforeChildren"?[n,s]:[s,n];return l().then(()=>u())}else return Promise.all([n(),s(o.delay)])}function MN(e,t,o=0,r=0,a=0,n=1,s){let i=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),i.push(Zc(l,t,{...s,delay:o+(typeof r=="function"?0:r)+Yc(e.variantChildren,l,r,a,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function Qc(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let a=t.map(n=>Zc(e,n,o));r=Promise.all(a)}else if(typeof t=="string")r=Zc(e,t,o);else{let a=typeof t=="function"?gr(e,t,o.custom):t;r=Promise.all(Us(e,a,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function bp(e,t){if(!Array.isArray(t))return!1;let o=t.length;if(o!==e.length)return!1;for(let r=0;r<o;r++)if(t[r]!==e[r])return!1;return!0}var kN=Gl.length;function Cp(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?Cp(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<kN;o++){let r=Gl[o],a=e.props[r];(_r(a)||a===!1)&&(t[r]=a)}return t}var AN=[...Ac].reverse(),DN=Ac.length;function EN(e){return t=>Promise.all(t.map(({animation:o,options:r})=>Qc(e,o,r)))}function UC(e){let t=EN(e),o=HC(),r=!0,a=l=>(u,c)=>{let d=gr(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:m,...p}=d;u={...u,...p,...m}}return u};function n(l){t=l(e)}function s(l){let{props:u}=e,c=Cp(e.parent)||{},d=[],f=new Set,m={},p=1/0;for(let h=0;h<DN;h++){let v=AN[h],x=o[v],y=u[v]!==void 0?u[v]:c[v],R=_r(y),C=v===l?x.isActive:null;C===!1&&(p=h);let w=y===c[v]&&y!==u[v]&&R;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),x.protectedKeys={...m},!x.isActive&&C===null||!y&&!x.prevProp||wa(y)||typeof y=="boolean")continue;let I=NN(x.prevProp,y),L=I||v===l&&x.isActive&&!w&&R||h>p&&R,P=!1,T=Array.isArray(y)?y:[y],O=T.reduce(a(v),{});C===!1&&(O={});let{prevResolvedValues:$={}}=x,W={...$,...O},N=G=>{L=!0,f.has(G)&&(P=!0,f.delete(G)),x.needsAnimating[G]=!0;let M=e.getValue(G);M&&(M.liveStyle=!1)};for(let G in W){let M=O[G],k=$[G];if(m.hasOwnProperty(G))continue;let re=!1;Wl(M)&&Wl(k)?re=!bp(M,k):re=M!==k,re?M!=null?N(G):f.add(G):M!==void 0&&f.has(G)?N(G):x.protectedKeys[G]=!0}x.prevProp=y,x.prevResolvedValues=O,x.isActive&&(m={...m,...O}),r&&e.blockInitialAnimation&&(L=!1);let q=w&&I;L&&(!q||P)&&d.push(...T.map(G=>{let M={type:v};if(typeof G=="string"&&r&&!q&&e.manuallyAnimateOnMount&&e.parent){let{parent:k}=e,re=gr(k,G);if(k.enteringChildren&&re){let{delayChildren:Se}=re.transition||{};M.delay=Yc(k.enteringChildren,e,Se)}}return{animation:G,options:M}}))}if(f.size){let h={};if(typeof u.initial!="boolean"){let v=gr(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(h.transition=v.transition)}f.forEach(v=>{let x=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),h[v]=x??null}),d.push({animation:h})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function i(l,u){if(o[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),o[l].isActive=u;let c=s(l);for(let d in o)o[d].protectedKeys={};return c}return{animateChanges:s,setActive:i,setAnimateFunction:n,getState:()=>o,reset:()=>{o=HC(),r=!0}}}function NN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bp(t,e):!1}function Ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function HC(){return{animate:Ln(!0),whileInView:Ln(),whileHover:Ln(),whileTap:Ln(),whileDrag:Ln(),whileFocus:Ln(),exit:Ln()}}var vt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Jc=class extends vt{constructor(t){super(t),t.animationState||(t.animationState=UC(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();wa(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:o}=this.node.prevProps||{};t!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var FN=0,ed=class extends vt{constructor(){super(...arguments),this.id=FN++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;let a=this.node.animationState.setActive("exit",!t);o&&!t&&a.then(()=>{o(this.id)})}mount(){let{register:t,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var GC={animation:{Feature:Jc},exit:{Feature:ed}};function Hr(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function Ur(e){return{point:{x:e.pageX,y:e.pageY}}}var zC=e=>t=>bn(t)&&e(t,Ur(t));function Ia(e,t,o,r){return Hr(e,t,zC(o),r)}var jC=1e-4,ON=1-jC,_N=1+jC,KC=.01,VN=0-KC,BN=0+KC;function ft(e){return e.max-e.min}function XC(e,t,o){return Math.abs(e-t)<=o}function qC(e,t,o,r=.5){e.origin=r,e.originPoint=Ce(t.min,t.max,e.origin),e.scale=ft(o)/ft(t),e.translate=Ce(o.min,o.max,e.origin)-e.originPoint,(e.scale>=ON&&e.scale<=_N||isNaN(e.scale))&&(e.scale=1),(e.translate>=VN&&e.translate<=BN||isNaN(e.translate))&&(e.translate=0)}function Gs(e,t,o,r){qC(e.x,t.x,o.x,r?r.originX:void 0),qC(e.y,t.y,o.y,r?r.originY:void 0)}function WC(e,t,o){e.min=o.min+t.min,e.max=e.min+ft(t)}function YC(e,t,o){WC(e.x,t.x,o.x),WC(e.y,t.y,o.y)}function $C(e,t,o){e.min=t.min-o.min,e.max=e.min+ft(t)}function zs(e,t,o){$C(e.x,t.x,o.x),$C(e.y,t.y,o.y)}function ro(e){return[e("x"),e("y")]}var td=({current:e})=>e?e.ownerDocument.defaultView:null;var ZC=(e,t)=>Math.abs(e-t);function QC(e,t){let o=ZC(e.x,t.x),r=ZC(e.y,t.y);return Math.sqrt(o**2+r**2)}var qs=class{constructor(t,o,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:n=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let f=Sp(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=QC(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;let{point:g}=f,{timestamp:h}=tt;this.history.push({...g,timestamp:h});let{onStart:v,onMove:x}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=wp(m,this.transformPagePoint),ve.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();let{onEnd:p,onSessionEnd:g,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=Sp(f.type==="pointercancel"?this.lastMoveEventInfo:wp(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!bn(t))return;this.dragSnapToOrigin=n,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=a||window;let i=Ur(t),l=wp(i,this.transformPagePoint),{point:u}=l,{timestamp:c}=tt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=o;d&&d(t,Sp(l,this.history)),this.removeListeners=Wo(Ia(this.contextWindow,"pointermove",this.handlePointerMove),Ia(this.contextWindow,"pointerup",this.handlePointerUp),Ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Tt(this.updatePoint)}};function wp(e,t){return t?{point:t(e.point)}:e}function JC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sp({point:e},t){return{point:e,delta:JC(e,ew(t)),offset:JC(e,HN(t)),velocity:UN(t,.1)}}function HN(e){return e[0]}function ew(e){return e[e.length-1]}function UN(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,a=ew(e);for(;o>=0&&(r=e[o],!(a.timestamp-r.timestamp>at(t)));)o--;if(!r)return{x:0,y:0};let n=Rt(a.timestamp-r.timestamp);if(n===0)return{x:0,y:0};let s={x:(a.x-r.x)/n,y:(a.y-r.y)/n};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function nw(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?Ce(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?Ce(o,e,r.max):Math.min(e,o)),e}function tw(e,t,o){return{min:t!==void 0?e.min+t:void 0,max:o!==void 0?e.max+o-(e.max-e.min):void 0}}function sw(e,{top:t,left:o,bottom:r,right:a}){return{x:tw(e.x,o,a),y:tw(e.y,t,r)}}function ow(e,t){let o=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([o,r]=[r,o]),{min:o,max:r}}function iw(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function lw(e,t){let o=.5,r=ft(e),a=ft(t);return a>r?o=Lo(t.min,t.max-r,e.min):r>a&&(o=Lo(e.min,e.max-a,t.min)),xt(0,1,o)}function uw(e,t){let o={};return t.min!==void 0&&(o.min=t.min-e.min),t.max!==void 0&&(o.max=t.max-e.min),o}var od=.35;function cw(e=od){return e===!1?e=0:e===!0&&(e=od),{x:rw(e,"left","right"),y:rw(e,"top","bottom")}}function rw(e,t,o){return{min:aw(e,t),max:aw(e,o)}}function aw(e,t){return typeof e=="number"?e:e[t]||0}var GN=new WeakMap,ad=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ue(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;let n=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Ur(d).point)},s=(d,f)=>{let{drag:m,dragPropagation:p,onDragStart:g}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rp(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ro(v=>{let x=this.getAxisMotionValue(v).get()||0;if(Mt.test(x)){let{projection:y}=this.visualElement;if(y&&y.layout){let R=y.layout.layoutBox[v];R&&(x=ft(R)*(parseFloat(x)/100))}}this.originPoint[v]=x}),g&&ve.postRender(()=>g(d,f)),jl(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},i=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:m,dragDirectionLock:p,onDirectionLock:g,onDrag:h}=this.getProps();if(!m&&!this.openDragLock)return;let{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=zN(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ro(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qs(t,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:td(this.visualElement)})}stop(t,o){let r=t||this.latestPointerEvent,a=o||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!a||!r)return;let{velocity:s}=a;this.startAnimation(s);let{onDragEnd:i}=this.getProps();i&&ve.postRender(()=>i(r,a))}cancel(){this.isDragging=!1;let{projection:t,animationState:o}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(t,o,r){let{drag:a}=this.getProps();if(!r||!rd(t,a,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=nw(s,this.constraints[t],this.elastic[t])),n.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,a=this.constraints;t&&Vr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=sw(r.layoutBox,t):this.constraints=!1,this.elastic=cw(o),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ro(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=uw(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!Vr(t))return!1;let r=t.current;nt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:a}=this.visualElement;if(!a||!a.layout)return!1;let n=PC(r,a.root,this.visualElement.getTransformPagePoint()),s=iw(a.layout.layoutBox,n);if(o){let i=o(yC(s));this.hasMutatedConstraints=!!i,i&&(s=qc(i))}return s}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:a,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=ro(c=>{if(!rd(c,o,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});let f=a?200:1e6,m=a?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...n,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(i)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return jl(this.visualElement,t),r.start(Hs(t,r,0,o,this.visualElement,!1))}stopAnimation(){ro(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ro(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let o=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[o];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ro(o=>{let{drag:r}=this.getProps();if(!rd(o,r,this.currentDirection))return;let{projection:a}=this.visualElement,n=this.getAxisMotionValue(o);if(a&&a.layout){let{min:s,max:i}=a.layout.layoutBox[o];n.set(t[o]-Ce(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Vr(o)||!r||!this.constraints)return;this.stopAnimation();let a={x:0,y:0};ro(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();a[s]=lw({min:l,max:l},this.constraints[s])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ro(s=>{if(!rd(s,t,null))return;let i=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];i.set(Ce(l,u,a[s]))})}addListeners(){if(!this.visualElement.current)return;GN.set(this.visualElement,this);let t=this.visualElement.current,o=Ia(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();Vr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,n=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ve.read(r);let s=Hr(window,"resize",()=>this.scalePositionWithinConstraints()),i=a.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ro(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{s(),o(),n(),i&&i()}}getProps(){let t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:n=!1,dragElastic:s=od,dragMomentum:i=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:a,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function rd(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function zN(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var nd=class extends vt{constructor(t){super(t),this.removeGroupControls=Qe,this.removeListeners=Qe,this.controls=new ad(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qe}unmount(){this.removeGroupControls(),this.removeListeners()}};var dw=e=>(t,o)=>{e&&ve.postRender(()=>e(t,o))},sd=class extends vt{constructor(){super(...arguments),this.removePointerDownListener=Qe}onPointerDown(t){this.session=new qs(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:td(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:dw(t),onStart:dw(o),onMove:r,onEnd:(n,s)=>{delete this.session,a&&ve.postRender(()=>a(n,s))}}}mount(){this.removePointerDownListener=Ia(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var pw=b(D(),1);var Kl=b(A(),1);var Ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var $s={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;let o=fw(e,t.target.x),r=fw(e,t.target.y);return`${o}% ${r}%`}};var mw={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,a=kt.parse(e);if(a.length>5)return r;let n=kt.createTransformer(e),s=typeof a[0]!="number"?1:0,i=o.x.scale*t.x,l=o.y.scale*t.y;a[0+s]/=i,a[1+s]/=l;let u=Ce(i,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=u),typeof a[3+s]=="number"&&(a[3+s]/=u),n(a)}};var Rp=!1,Ip=class extends Kl.Component{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:a}=this.props,{projection:n}=t;eC(qN),n&&(o.group&&o.group.add(n),r&&r.register&&a&&r.register(n),Rp&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),Ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:a,isPresent:n}=this.props,{projection:s}=r;return s&&(s.isPresent=n,Rp=!0,a||t.layoutDependency!==o||o===void 0||t.isPresent!==n?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||ve.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:a}=t;Rp=!0,a&&(a.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function id(e){let[t,o]=Tc(),r=(0,Kl.useContext)(xs);return(0,pw.jsx)(Ip,{...e,layoutGroup:r,switchLayoutGroup:(0,Kl.useContext)(Uc),isPresent:t,safeToRemove:o})}var qN={borderRadius:{...$s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$s,borderTopRightRadius:$s,borderBottomLeftRadius:$s,borderBottomRightRadius:$s,boxShadow:mw};function ld(e,t,o){let r=ke(e)?e:to(e);return r.start(Hs("",r,t,o)),r.animation}var gw=(e,t)=>e.depth-t.depth;var ud=class{constructor(){this.children=[],this.isDirty=!1}add(t){nn(this.children,t),this.isDirty=!0}remove(t){qo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gw),this.isDirty=!1,this.children.forEach(t)}};function hw(e,t){let o=ot.now(),r=({timestamp:a})=>{let n=a-o;n>=t&&(Tt(r),e(n-t))};return ve.setup(r,!0),()=>Tt(r)}var bw=["TopLeft","TopRight","BottomLeft","BottomRight"],WN=bw.length,xw=e=>typeof e=="string"?parseFloat(e):e,vw=e=>typeof e=="number"||ae.test(e);function Cw(e,t,o,r,a,n){a?(e.opacity=Ce(0,o.opacity??1,$N(r)),e.opacityExit=Ce(t.opacity??1,0,jN(r))):n&&(e.opacity=Ce(t.opacity??1,o.opacity??1,r));for(let s=0;s<WN;s++){let i=`border${bw[s]}Radius`,l=yw(t,i),u=yw(o,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||vw(l)===vw(u)?(e[i]=Math.max(Ce(xw(l),xw(u),r),0),(Mt.test(u)||Mt.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||o.rotate)&&(e.rotate=Ce(t.rotate||0,o.rotate||0,r))}function yw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var $N=ww(0,.5,dl),jN=ww(.5,.95,Qe);function ww(e,t,o){return r=>r<e?0:r>t?1:o(Lo(e,t,r))}function Sw(e,t){e.min=t.min,e.max=t.max}function po(e,t){Sw(e.x,t.x),Sw(e.y,t.y)}function Lp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Rw(e,t,o,r,a){return e-=t,e=zl(e,1/o,r),a!==void 0&&(e=zl(e,1/a,r)),e}function KN(e,t=0,o=1,r=.5,a,n=e,s=e){if(Mt.test(t)&&(t=parseFloat(t),t=Ce(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=Ce(n.min,n.max,r);e===n&&(i-=t),e.min=Rw(e.min,t,o,i,a),e.max=Rw(e.max,t,o,i,a)}function Iw(e,t,[o,r,a],n,s){KN(e,t[o],t[r],t[a],t.scale,n,s)}var XN=["x","scaleX","originX"],YN=["y","scaleY","originY"];function Pp(e,t,o,r){Iw(e.x,t,XN,o?o.x:void 0,r?r.x:void 0),Iw(e.y,t,YN,o?o.y:void 0,r?r.y:void 0)}function Lw(e){return e.translate===0&&e.scale===1}function Tp(e){return Lw(e.x)&&Lw(e.y)}function Pw(e,t){return e.min===t.min&&e.max===t.max}function Mw(e,t){return Pw(e.x,t.x)&&Pw(e.y,t.y)}function Tw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mp(e,t){return Tw(e.x,t.x)&&Tw(e.y,t.y)}function kp(e){return ft(e.x)/ft(e.y)}function Ap(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var cd=class{constructor(){this.members=[]}add(t){nn(this.members,t),t.scheduleRender()}remove(t){if(qo(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(t){let o=this.members.findIndex(a=>t===a);if(o===0)return!1;let r;for(let a=o;a>=0;a--){let n=this.members[a];if(n.isPresent!==!1){r=n;break}}return r?(this.promote(r),!0):!1}promote(t,o){let r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,o&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:o,resumingFrom:r}=t;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function kw(e,t,o){let r="",a=e.x.translate/t.x,n=e.y.translate/t.y,s=o?.z||0;if((a||n||s)&&(r=`translate3d(${a}px, ${n}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),o){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:m,skewY:p}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),p&&(r+=`skewY(${p}deg) `)}let i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(r+=`scale(${i}, ${l})`),r||"none"}var Pn={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Dp=["","X","Y","Z"],ZN=1e3,QN=0;function Ep(e,t,o,r){let{latestValues:a}=t;a[e]&&(o[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Bw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=Xc(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:a,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",ve,!(a||n))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Bw(r)}function dd({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},i=t?.()){this.id=QN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,eo.value&&(Pn.nodes=Pn.calculatedTargetDeltas=Pn.calculatedProjections=0),this.nodes.forEach(t2),this.nodes.forEach(n2),this.nodes.forEach(s2),this.nodes.forEach(o2),eo.addProjectionMetrics&&eo.addProjectionMetrics(Pn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ud)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Mr),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){let l=this.eventHandlers.get(s);l&&l.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Cn(s)&&!_l(s),this.instance=s;let{layoutId:i,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;ve.read(()=>{d=window.innerWidth}),e(s,()=>{let m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=hw(f,250),Ws.hasAnimatedSinceResize&&(Ws.hasAnimatedSinceResize=!1,this.nodes.forEach(Ew)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||u.getDefaultTransition()||d2,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=u.getProps(),v=!this.targetLayout||!Mp(this.targetLayout,m),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...gn(p,"layout"),onPlay:g,onComplete:h};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,x)}else d||Ew(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Tt(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(i2),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Aw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Dw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(a2),this.nodes.forEach(JN),this.nodes.forEach(e2)):this.nodes.forEach(Dw),this.clearAllSnapshots();let i=ot.now();tt.delta=xt(0,1e3/60,i-tt.timestamp),tt.timestamp=i,tt.isProcessing=!0,vl.update.process(tt),vl.preRender.process(tt),vl.render.process(tt),tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r2),this.sharedNodes.forEach(l2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ft(this.snapshot.measuredBox.x)&&!ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ue(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i&&this.instance){let l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!a)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Tp(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||Br(this.latestValues)||c)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let i=this.measurePageBox(),l=this.removeElementScroll(i);return s&&(l=this.removeTransform(l)),f2(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return Ue();let i=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(m2))){let{scroll:u}=this.root;u&&(Sa(i.x,u.offset.x),Sa(i.y,u.offset.y))}return i}removeElementScroll(s){let i=Ue();if(po(i,s),this.scroll?.wasRoot)return i;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&po(i,s),Sa(i.x,c.offset.x),Sa(i.y,c.offset.y))}return i}applyTransform(s,i=!1){let l=Ue();po(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];!i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Rn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Br(c.latestValues)&&Rn(l,c.latestValues)}return Br(this.latestValues)&&Rn(l,this.latestValues),l}removeTransform(s){let i=Ue();po(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Br(u.latestValues))continue;Wc(u.latestValues)&&u.updateSnapshot();let c=Ue(),d=u.measurePageBox();po(c,d),Pp(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Br(this.latestValues)&&Pp(i,this.latestValues),i}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){let i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==i;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=tt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ue(),this.relativeTargetOrigin=Ue(),zs(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),po(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ue(),this.targetWithTransforms=Ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):po(this.target,this.layout.layoutBox),vp(this.target,this.targetDelta)):po(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ue(),this.relativeTargetOrigin=Ue(),zs(this.relativeTargetOrigin,this.target,f.target),po(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}eo.value&&Pn.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Wc(this.parent.latestValues)||hp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let s=this.getLead(),i=!!this.resumingFrom||this!==s,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===tt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;po(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;LC(this.layoutCorrected,this.treeScale,this.path,i),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Ue());let{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Lp(this.prevProjectionDelta.x,this.projectionDelta.x),Lp(this.prevProjectionDelta.y,this.projectionDelta.y)),Gs(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Ap(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ap(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),eo.value&&Pn.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){let i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=In(),this.projectionDelta=In(),this.projectionDeltaWithTransform=In()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=In();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let f=Ue(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,h=this.getStack(),v=!h||h.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(c2));this.animationProgress=0;let y;this.mixTargetDelta=R=>{let C=R/1e3;Nw(d.x,s.x,C),Nw(d.y,s.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),u2(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&Mw(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ue()),po(y,this.relativeTarget)),g&&(this.animationValues=c,Cw(c,u,this.latestValues,C,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ve.update(()=>{Ws.hasAnimatedSinceResize=!0,$o.layout++,this.motionValue||(this.motionValue=to(0)),this.currentAnimation=ld(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onStop:()=>{$o.layout--},onComplete:()=>{$o.layout--,s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ZN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:i,target:l,layout:u,latestValues:c}=s;if(!(!i||!l||!u)){if(this!==s&&this.layout&&u&&Hw(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ue();let d=ft(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let f=ft(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}po(i,l),Rn(i,c),Gs(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new cd),this.sharedNodes.get(s).add(i);let u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let i=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;let u={};l.z&&Ep("z",s,u,this.animationValues);for(let c=0;c<Dp.length;c++)Ep(`rotate${Dp[c]}`,s,u,this.animationValues),Ep(`skew${Dp[c]}`,s,u,this.animationValues);s.render();for(let c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}applyProjectionStyles(s,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ds(i?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ds(i?.pointerEvents)||""),this.hasProjected&&!Br(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=kw(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),s.transform=d;let{x:f,y:m}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?s.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let p in Sn){if(c[p]===void 0)continue;let{correct:g,applyTo:h,isCSSVariable:v}=Sn[p],x=d==="none"?c[p]:g(c[p],u);if(h){let y=h.length;for(let R=0;R<y;R++)s[h[R]]=x}else v?this.options.visualElement.renderState.vars[p]=x:s[p]=x}this.options.layoutId&&(s.pointerEvents=u===this?Ds(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Aw),this.root.sharedNodes.clear()}}}function JN(e){e.updateLayout()}function e2(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=e.layout,{animationType:a}=e.options,n=t.source!==e.layout.source;a==="size"?ro(c=>{let d=n?t.measuredBox[c]:t.layoutBox[c],f=ft(d);d.min=o[c].min,d.max=d.min+f}):Hw(a,t.layoutBox,o)&&ro(c=>{let d=n?t.measuredBox[c]:t.layoutBox[c],f=ft(o[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let s=In();Gs(s,o,t.layoutBox);let i=In();n?Gs(i,e.applyTransform(r,!0),t.measuredBox):Gs(i,o,t.layoutBox);let l=!Tp(s),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let m=Ue();zs(m,t.layoutBox,d.layoutBox);let p=Ue();zs(p,o,f.layoutBox),Mp(m,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:i,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function t2(e){eo.value&&Pn.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function o2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r2(e){e.clearSnapshot()}function Aw(e){e.clearMeasurements()}function Dw(e){e.isLayoutDirty=!1}function a2(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ew(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n2(e){e.resolveTargetDelta()}function s2(e){e.calcProjection()}function i2(e){e.resetSkewAndRotation()}function l2(e){e.removeLeadSnapshot()}function Nw(e,t,o){e.translate=Ce(t.translate,0,o),e.scale=Ce(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function Fw(e,t,o,r){e.min=Ce(t.min,o.min,r),e.max=Ce(t.max,o.max,r)}function u2(e,t,o,r){Fw(e.x,t.x,o.x,r),Fw(e.y,t.y,o.y,r)}function c2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var d2={duration:.45,ease:[.4,0,.1,1]},Ow=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_w=Ow("applewebkit/")&&!Ow("chrome/")?Math.round:Qe;function Vw(e){e.min=_w(e.min),e.max=_w(e.max)}function f2(e){Vw(e.x),Vw(e.y)}function Hw(e,t,o){return e==="position"||e==="preserve-aspect"&&!XC(kp(t),kp(o),.2)}function m2(e){return e!==e.root&&e.scroll?.wasRoot}var Uw=dd({attachResizeListener:(e,t)=>Hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var Np={current:void 0},fd=dd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Np.current){let e=new Uw({});e.mount(window),e.setOptions({layoutScroll:!0}),Np.current=e}return Np.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var Gw={pan:{Feature:sd},drag:{Feature:nd,ProjectionNode:fd,MeasureLayout:id}};function zw(e,t,o){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",o==="Start");let a="onHover"+o,n=r[a];n&&ve.postRender(()=>n(t,Ur(t)))}var md=class extends vt{mount(){let{current:t}=this.node;t&&(this.unmount=ap(t,(o,r)=>(zw(this.node,r,"Start"),a=>zw(this.node,a,"End"))))}unmount(){}};var pd=class extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wo(Hr(this.node.current,"focus",()=>this.onFocus()),Hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function qw(e,t,o){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",o==="Start");let a="onTap"+(o==="End"?"":o),n=r[a];n&&ve.postRender(()=>n(t,Ur(t)))}var gd=class extends vt{mount(){let{current:t}=this.node;t&&(this.unmount=ip(t,(o,r)=>(qw(this.node,r,"Start"),(a,{success:n})=>qw(this.node,a,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var Op=new WeakMap,Fp=new WeakMap,p2=e=>{let t=Op.get(e.target);t&&t(e)},g2=e=>{e.forEach(p2)};function h2({root:e,...t}){let o=e||document;Fp.has(o)||Fp.set(o,{});let r=Fp.get(o),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(g2,{root:e,...t})),r[a]}function Ww(e,t,o){let r=h2(t);return Op.set(e,o),r.observe(e),()=>{Op.delete(e),r.unobserve(e)}}var x2={some:0,all:1},hd=class extends vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:o,margin:r,amount:a="some",once:n}=t,s={root:o?o.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:x2[a]},i=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,n&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return Ww(this.node.current,s,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:o}=this.node;["amount","margin","root"].some(v2(t,o))&&this.startObserver()}unmount(){}};function v2({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var $w={inView:{Feature:hd},tap:{Feature:gd},focus:{Feature:pd},hover:{Feature:md}};var jw={layout:{ProjectionNode:fd,MeasureLayout:id}};var Kw={...GC,...$w,...Gw,...jw};var Ae=vC(Kw,FC);var js=b(A(),1);function Ks(e){let t=Io(()=>to(e)),{isStatic:o}=(0,js.useContext)(ya);if(o){let[,r]=(0,js.useState)(e);(0,js.useEffect)(()=>t.on("change",r),[])}return t}function xd(e,t){let o=Ks(t()),r=()=>o.set(t());return r(),da(()=>{let a=()=>ve.preRender(r,!1,!0),n=e.map(s=>s.on("change",a));return()=>{n.forEach(s=>s()),Tt(r)}}),o}function Xw(e){vn.current=[],e();let t=xd(vn.current,e);return vn.current=void 0,t}function _p(e,t,o,r){if(typeof e=="function")return Xw(e);let a=typeof t=="function"?t:lp(t,o,r);return Array.isArray(e)?Yw(e,a):Yw([e],([n])=>a(n))}function Yw(e,t){let o=Io(()=>[]);return xd(e,()=>{o.length=0;let r=e.length;for(let a=0;a<r;a++)o[a]=e[a].get();return t(o)})}function y2(e){e.values.forEach(t=>t.stop())}function Vp(e,t){[...t].reverse().forEach(r=>{let a=e.getVariant(r);a&&$l(e,a),e.variantChildren&&e.variantChildren.forEach(n=>{Vp(n,t)})})}function b2(e,t){if(Array.isArray(t))return Vp(e,t);if(typeof t=="string")return Vp(e,[t]);$l(e,t)}function Zw(){let e=!1,t=new Set,o={subscribe(r){return t.add(r),()=>void t.delete(r)},start(r,a){nt(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let n=[];return t.forEach(s=>{n.push(Qc(s,r,{transitionOverride:a}))}),Promise.all(n)},set(r){return nt(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(a=>{b2(a,r)})},stop(){t.forEach(r=>{y2(r)})},mount(){return e=!0,()=>{e=!1,o.stop()}}};return o}function Xl(e){return typeof e=="object"&&!Array.isArray(e)}function vd(e,t,o,r){return typeof e=="string"&&Xl(t)?xn(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Qw(e,t,o){return e*(t+1)}function Bp(e,t,o,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?o:t.startsWith("<")?Math.max(0,o+parseFloat(t.slice(1))):r.get(t)??e}function C2(e,t,o){for(let r=0;r<e.length;r++){let a=e[r];a.at>t&&a.at<o&&(qo(e,a),r--)}}function Jw(e,t,o,r,a,n){C2(e,a,n);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ce(a,n,r[s]),easing:gl(o,s)})}function e0(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function t0(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var w2="easeInOut",S2=20;function a0(e,{defaultTransition:t={},...o}={},r,a){let n=t.duration||.3,s=new Map,i=new Map,l={},u=new Map,c=0,d=0,f=0;for(let m=0;m<e.length;m++){let p=e[m];if(typeof p=="string"){u.set(p,d);continue}else if(!Array.isArray(p)){u.set(p.name,Bp(d,p.at,c,u));continue}let[g,h,v={}]=p;v.at!==void 0&&(d=Bp(d,v.at,c,u));let x=0,y=(R,C,w,I=0,L=0)=>{let P=R2(R),{delay:T=0,times:O=Il(P),type:$="keyframes",repeat:W,repeatType:N,repeatDelay:q=0,...E}=C,{ease:G=t.ease||"easeOut",duration:M}=C,k=typeof T=="function"?T(I,L):T,re=P.length,Se=pn($)?$:a?.[$||"keyframes"];if(re<=2&&Se){let X=100;if(re===2&&P2(P)){let ce=P[1]-P[0];X=Math.abs(ce)}let ue={...E};M!==void 0&&(ue.duration=at(M));let _=wl(ue,X,Se);G=_.ease,M=_.duration}M??(M=n);let F=d+k;O.length===1&&O[0]===0&&(O[1]=1);let j=O.length-P.length;if(j>0&&Rl(O,j),P.length===1&&P.unshift(null),W){nt(W<S2,"Repeat count too high, must be less than 20","repeat-count-high"),M=Qw(M,W);let X=[...P],ue=[...O];G=Array.isArray(G)?[...G]:[G];let _=[...G];for(let ce=0;ce<W;ce++){P.push(...X);for(let he=0;he<X.length;he++)O.push(ue[he]+(ce+1)),G.push(he===0?"linear":gl(_,he-1))}e0(O,W)}let Z=F+M;Jw(w,P,G,O,F,Z),x=Math.max(k+M,x),f=Math.max(Z,f)};if(ke(g)){let R=o0(g,i);y(h,v,r0("default",R))}else{let R=vd(g,h,r,l),C=R.length;for(let w=0;w<C;w++){h=h,v=v;let I=R[w],L=o0(I,i);for(let P in h)y(h[P],I2(v,P),r0(P,L),w,C)}}c=d,d+=x}return i.forEach((m,p)=>{for(let g in m){let h=m[g];h.sort(t0);let v=[],x=[],y=[];for(let C=0;C<h.length;C++){let{at:w,value:I,easing:L}=h[C];v.push(I),x.push(Lo(0,f,w)),y.push(L||"easeOut")}x[0]!==0&&(x.unshift(0),v.unshift(v[0]),y.unshift(w2)),x[x.length-1]!==1&&(x.push(1),v.push(null)),s.has(p)||s.set(p,{keyframes:{},transition:{}});let R=s.get(p);R.keyframes[g]=v,R.transition[g]={...t,duration:f,ease:y,times:x,...o}}}),s}function o0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function r0(e,t){return t[e]||(t[e]=[]),t[e]}function R2(e){return Array.isArray(e)?e:[e]}function I2(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var L2=e=>typeof e=="number",P2=e=>e.every(L2);function T2(e,t){return e in t}var yd=class extends Os{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(T2(o,t)){let r=t[o];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,o){delete o.output[t]}measureInstanceViewportBox(){return Ue()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function n0(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=Cn(e)&&!_l(e)?new Bs(t):new Vs(t);o.mount(e),Ra.set(e,o)}function s0(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new yd(t);o.mount(e),Ra.set(e,o)}function M2(e,t){return ke(e)||typeof e=="number"||typeof e=="string"&&!Xl(t)}function bd(e,t,o,r){let a=[];if(M2(e,t))a.push(ld(e,Xl(t)&&t.default||t,o&&(o.default||o)));else{let n=vd(e,t,r),s=n.length;nt(!!s,"No valid elements provided.","no-valid-elements");for(let i=0;i<s;i++){let l=n[i];nt(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?n0:s0;Ra.has(l)||u(l);let c=Ra.get(l),d={...o};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(i,s)),a.push(...Us(c,{...t,transition:d},{}))}}return a}function i0(e,t,o){let r=[];return a0(e,t,o,{spring:Ar}).forEach(({keyframes:n,transition:s},i)=>{r.push(...bd(i,n,s))}),r}function k2(e){return Array.isArray(e)&&e.some(Array.isArray)}function l0(e){function t(o,r,a){let n=[];k2(o)?n=i0(o,r,e):n=bd(o,r,a,e);let s=new Ml(n);return e&&(e.animations.push(s),s.finished.then(()=>{qo(e.animations,s)})),s}return t}var Hp=l0();function u0(){let e=Io(Zw);return da(e.mount,[]),e}var Up=u0;var Cd=b(A(),1);var A2={some:0,all:1};function c0(e,t,{root:o,margin:r,amount:a="some"}={}){let n=xn(e),s=new WeakMap,i=u=>{u.forEach(c=>{let d=s.get(c.target);if(c.isIntersecting!==!!d)if(c.isIntersecting){let f=t(c.target,c);typeof f=="function"?s.set(c.target,f):l.unobserve(c.target)}else typeof d=="function"&&(d(c),s.delete(c.target))})},l=new IntersectionObserver(i,{root:o,rootMargin:r,threshold:typeof a=="number"?a:A2[a]});return n.forEach(u=>l.observe(u)),()=>l.disconnect()}function wd(e,{root:t,margin:o,amount:r,once:a=!1,initial:n=!1}={}){let[s,i]=(0,Cd.useState)(n);return(0,Cd.useEffect)(()=>{if(!e.current||a&&s)return;let l=()=>(i(!0),a?void 0:()=>i(!1)),u={root:t&&t.current||void 0,margin:o,amount:r};return c0(e.current,l,u)},[t,e,o,a,r]),s}var fre=te("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),Xo={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},Sd={lift:{y:-2,transition:Xo.smooth},scale:{scale:1.05,transition:Xo.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Xo.smooth},rotate:{rotate:2,transition:Xo.bouncy}},d0={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},mre={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Xo.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Xo.smooth}},pre={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Xo.smooth}}},gre={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:Xo.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Xo.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Xo.smooth}},f0={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var hre={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Xo.bouncy};var La=b(D()),m0=te("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-gray-850 dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),p0=Tn.forwardRef(({className:e,variant:t,size:o,radius:r,interactive:a,microInteraction:n="lift",...s},i)=>{if(a&&n!=="none"){let l={whileHover:n==="scale"?Sd.scale:n==="glow"?Sd.glow:Sd.lift,whileTap:d0.scale};return(0,La.jsx)(Ae.div,{ref:i,className:S("moonui-theme",m0({variant:t,size:o,radius:r,interactive:a,className:e})),...l,...s})}return(0,La.jsx)("div",{ref:i,className:S("moonui-theme",m0({variant:t,size:o,radius:r,interactive:a,className:e})),...s})});p0.displayName="Card";var g0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("div",{ref:o,className:S("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));g0.displayName="CardHeader";var h0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("h3",{ref:o,className:S("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));h0.displayName="CardTitle";var x0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("p",{ref:o,className:S("moonui-theme","text-sm text-muted-foreground",e),...t}));x0.displayName="CardDescription";var v0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("div",{ref:o,className:S("moonui-theme","p-6 pt-0",e),...t}));v0.displayName="CardContent";var y0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("div",{ref:o,className:S("moonui-theme","flex items-center p-6 pt-0",e),...t}));y0.displayName="CardFooter";var Mn=b(A());var Pa=b(D()),D2=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[o,r]of Object.entries(t))if(r.test(e))return o;return"unknown"},b0=(e,t)=>{let o=e.replace(/\s+/g,""),r=t==="amex"?[4,6,5]:[4,4,4,4],a="",n=0;for(let s of r){if(n>=o.length)break;a&&(a+=" "),a+=o.slice(n,n+s),n+=s}return a},C0=Mn.forwardRef(({className:e,value:t="",onChange:o,showIcon:r=!0,size:a,...n},s)=>{let[i,l]=Mn.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=D2(d);l(f);let m=f==="amex"?15:16,p=d.slice(0,m),g=b0(p,f);o?.(p,f),c.target.value=g};return(0,Pa.jsxs)("div",{className:"relative",children:[(0,Pa.jsx)(At,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:b0(t,i),onChange:u,className:S(r&&"pl-10",e),...n}),r&&(0,Pa.jsx)(Oi,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});C0.displayName="CardNumberInput";var w0=Mn.forwardRef(({className:e,value:t="",onChange:o,size:r,...a},n)=>{let s=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let d=parseInt(u.slice(0,2));d>12?u="12"+u.slice(2):d===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),o?.(u),l.target.value=c},i=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,Pa.jsx)(At,{ref:n,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:i,onChange:s,className:e,...a})});w0.displayName="CardExpiryInput";var S0=Mn.forwardRef(({className:e,value:t="",onChange:o,cardType:r="unknown",size:a,...n},s)=>{let i=r==="amex"?4:3;return(0,Pa.jsx)(At,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:r==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,i);o?.(c)},maxLength:i,className:e,...n})});S0.displayName="CardCVCInput";var R0=Mn.forwardRef(({className:e,value:t="",onChange:o,format:r="US",size:a,...n},s)=>{let i=u=>{let c=u.target.value;switch(r){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}o?.(c.replace(/\s/g,"")),u.target.value=c};return(0,Pa.jsx)(At,{ref:s,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(r){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:i,className:e,...n})});R0.displayName="CardZipInput";var Yo=b(A());var zt=b(A(),1);var Rd=b(A(),1);function Xs(e){let t=Rd.useRef({value:e,previous:e});return Rd.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var I0=b(A(),1);function Ys(e){let[t,o]=I0.useState(void 0);return Le(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let n=a[0],s,i;if("borderBoxSize"in n){let l=n.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var go=b(D(),1),Id="Checkbox",[E2,Bre]=Re(Id),[N2,Gp]=E2(Id);function F2(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:a,disabled:n,form:s,name:i,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,m]=Fe({prop:o,defaultProp:a??!1,onChange:l,caller:Id}),[p,g]=zt.useState(null),[h,v]=zt.useState(null),x=zt.useRef(!1),y=p?!!s||!!p.closest("form"):!0,R={checked:f,disabled:n,setChecked:m,control:p,setControl:g,name:i,form:s,value:c,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Ta(a)?!1:a,isFormControl:y,bubbleInput:h,setBubbleInput:v};return(0,go.jsx)(N2,{scope:t,...R,children:O2(d)?d(R):r})}var L0="CheckboxTrigger",P0=zt.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},a)=>{let{control:n,value:s,disabled:i,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:p}=Gp(L0,e),g=ee(a,c),h=zt.useRef(l);return zt.useEffect(()=>{let v=n?.form;if(v){let x=()=>d(h.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[n,d]),(0,go.jsx)(H.button,{type:"button",role:"checkbox","aria-checked":Ta(l)?"mixed":l,"aria-required":u,"data-state":A0(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:V(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:V(o,v=>{d(x=>Ta(x)?!0:!x),p&&m&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});P0.displayName=L0;var Ld=zt.forwardRef((e,t)=>{let{__scopeCheckbox:o,name:r,checked:a,defaultChecked:n,required:s,disabled:i,value:l,onCheckedChange:u,form:c,...d}=e;return(0,go.jsx)(F2,{__scopeCheckbox:o,checked:a,defaultChecked:n,disabled:i,required:s,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(P0,{...d,ref:t,__scopeCheckbox:o}),f&&(0,go.jsx)(k0,{__scopeCheckbox:o})]})})});Ld.displayName=Id;var T0="CheckboxIndicator",zp=zt.forwardRef((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...a}=e,n=Gp(T0,o);return(0,go.jsx)(Oe,{present:r||Ta(n.checked)||n.checked===!0,children:(0,go.jsx)(H.span,{"data-state":A0(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});zp.displayName=T0;var M0="CheckboxBubbleInput",k0=zt.forwardRef(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:a,checked:n,defaultChecked:s,required:i,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:m}=Gp(M0,e),p=ee(o,m),g=Xs(n),h=Ys(r);zt.useEffect(()=>{let x=f;if(!x)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,w=!a.current;if(g!==n&&C){let I=new Event("click",{bubbles:w});x.indeterminate=Ta(n),C.call(x,Ta(n)?!1:n),x.dispatchEvent(I)}},[f,g,n,a]);let v=zt.useRef(Ta(n)?!1:n);return(0,go.jsx)(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});k0.displayName=M0;function O2(e){return typeof e=="function"}function Ta(e){return e==="indeterminate"}function A0(e){return Ta(e)?"indeterminate":e?"checked":"unchecked"}var To=b(D()),V2=te("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),qp=Yo.forwardRef(({className:e,variant:t,size:o,radius:r,animation:a,indeterminate:n=!1,icon:s,checked:i,...l},u)=>{let[c,d]=Yo.useState(n);return Yo.useEffect(()=>{d(n)},[n]),(0,To.jsx)(Ld,{ref:u,checked:c?!1:i,className:S("moonui-theme",V2({variant:t,size:o,radius:r,animation:a}),e),...l,children:(0,To.jsx)(zp,{className:S("flex items-center justify-center text-current",a==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,To.jsx)(Wi,{className:"h-[65%] w-[65%]"}):s||(0,To.jsx)(It,{className:"h-[65%] w-[65%]"})})})});qp.displayName=Ld.displayName;var D0=Yo.forwardRef(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...a},n)=>(0,To.jsx)("div",{ref:n,className:S("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...a,children:r}));D0.displayName="CheckboxGroup";var Pd=Yo.forwardRef(({className:e,htmlFor:t,children:o,position:r="end",disabled:a=!1,...n},s)=>(0,To.jsx)("label",{ref:s,htmlFor:t,className:S("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r==="start"?"mr-2":"ml-2",a&&"cursor-not-allowed opacity-70",e),...n,children:o}));Pd.displayName="CheckboxLabel";var E0=Yo.forwardRef(({id:e,label:t,labelPosition:o="end",labelClassName:r,...a},n)=>{let s=Yo.useId(),i=e||s;return(0,To.jsxs)("div",{className:"flex items-center",children:[o==="start"&&(0,To.jsx)(Pd,{htmlFor:i,position:"start",disabled:a.disabled,className:r,children:t}),(0,To.jsx)(qp,{ref:n,id:i,...a}),o==="end"&&(0,To.jsx)(Pd,{htmlFor:i,position:"end",disabled:a.disabled,className:r,children:t})]})});E0.displayName="CheckboxWithLabel";var Wp=b(A());var kn=b(D()),B2=Gu,N0=te("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",default:"text-sm py-3 px-4",md:"text-base py-4 px-4",lg:"text-lg py-5 px-5"}},defaultVariants:{variant:"default",size:"default"}}),F0=Wp.forwardRef(({className:e,children:t,variant:o,size:r,asChild:a,...n},s)=>a?(0,kn.jsx)(ts,{ref:s,className:S("moonui-theme",N0({variant:o,size:r}),e),asChild:a,...n,children:t}):(0,kn.jsxs)(ts,{ref:s,className:S("moonui-theme",N0({variant:o,size:r}),e),...n,children:[t,(0,kn.jsx)(ur,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));F0.displayName=ts.displayName;var H2=te("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",default:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"default"}}),O0=Wp.forwardRef(({className:e,children:t,variant:o,size:r,...a},n)=>(0,kn.jsx)(Ii,{ref:n,className:S("moonui-theme",H2({variant:o,size:r}),e),...a,children:(0,kn.jsx)("div",{className:"p-4",children:t})}));O0.displayName=Ii.displayName;var Fo=b(A());var _0=b(A());var Mo=b(D()),U2=te("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),G2=te(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),At=_0.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:a,isError:n,disabled:s,error:i,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:m=!1,...p},g)=>{let h=m||i||l,v=i?"error":l?"success":"normal";return(0,Mo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,Mo.jsxs)("div",{className:S("moonui-theme",U2({size:a}),t),children:[c&&(0,Mo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,Mo.jsx)(St,{className:"h-4 w-4 animate-spin"}):c}),(0,Mo.jsx)("input",{className:S(G2({variant:r,size:a,isError:!!i||n,isSuccess:!!l,isDisabled:s||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:g,disabled:s||u,"data-loading":u?"":void 0,"data-error":i?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!i||!!n||void 0,"aria-describedby":i?`${p.id||""}-error`:l?`${p.id||""}-success`:void 0,...p}),d&&!u&&(0,Mo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,Mo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,Mo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,Mo.jsx)(St,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),h&&(0,Mo.jsx)("p",{className:S("text-xs transition-all",v==="error"&&"text-error",v==="success"&&"text-success",v==="normal"&&"text-muted-foreground",o),id:i?`${p.id||""}-error`:l?`${p.id||""}-success`:void 0,children:i||l||""})]})});At.displayName="Input";var U0=b(A());var V0=b(A(),1);var B0=b(D(),1),z2="Label",H0=V0.forwardRef((e,t)=>(0,B0.jsx)(H.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));H0.displayName=z2;var $p=H0;var G0=b(D()),W2=te("text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),ao=U0.forwardRef(({className:e,...t},o)=>(0,G0.jsx)($p,{ref:o,className:S(W2(),e),...t}));ao.displayName=$p.displayName;var QR=b(A());var Ye=b(A(),1);var Je=b(A(),1);var z0=b(A(),1);function q0(e,t=globalThis?.document){let o=Te(e);z0.useEffect(()=>{let r=a=>{a.key==="Escape"&&o(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var Kp=b(D(),1),$2="DismissableLayer",jp="dismissableLayer.update",j2="dismissableLayer.pointerDownOutside",K2="dismissableLayer.focusOutside",W0,j0=Je.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ko=Je.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:s,onDismiss:i,...l}=e,u=Je.useContext(j0),[c,d]=Je.useState(null),f=c?.ownerDocument??globalThis?.document,[,m]=Je.useState({}),p=ee(t,I=>d(I)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),x=c?g.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,R=x>=v,C=Y2(I=>{let L=I.target,P=[...u.branches].some(T=>T.contains(L));!R||P||(a?.(I),s?.(I),I.defaultPrevented||i?.())},f),w=Z2(I=>{let L=I.target;[...u.branches].some(T=>T.contains(L))||(n?.(I),s?.(I),I.defaultPrevented||i?.())},f);return q0(I=>{x===u.layers.size-1&&(r?.(I),!I.defaultPrevented&&i&&(I.preventDefault(),i()))},f),Je.useEffect(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(W0=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),$0(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=W0)}},[c,f,o,u]),Je.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),$0())},[c,u]),Je.useEffect(()=>{let I=()=>m({});return document.addEventListener(jp,I),()=>document.removeEventListener(jp,I)},[]),(0,Kp.jsx)(H.div,{...l,ref:p,style:{pointerEvents:y?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,w.onFocusCapture),onBlurCapture:V(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});ko.displayName=$2;var X2="DismissableLayerBranch",K0=Je.forwardRef((e,t)=>{let o=Je.useContext(j0),r=Je.useRef(null),a=ee(t,r);return Je.useEffect(()=>{let n=r.current;if(n)return o.branches.add(n),()=>{o.branches.delete(n)}},[o.branches]),(0,Kp.jsx)(H.div,{...e,ref:a})});K0.displayName=X2;function Y2(e,t=globalThis?.document){let o=Te(e),r=Je.useRef(!1),a=Je.useRef(()=>{});return Je.useEffect(()=>{let n=i=>{if(i.target&&!r.current){let u=function(){X0(j2,o,c,{discrete:!0})};var l=u;let c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function Z2(e,t=globalThis?.document){let o=Te(e),r=Je.useRef(!1);return Je.useEffect(()=>{let a=n=>{n.target&&!r.current&&X0(K2,o,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $0(){let e=new CustomEvent(jp);document.dispatchEvent(e)}function X0(e,t,o,{discrete:r}){let a=o.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),r?es(a,n):a.dispatchEvent(n)}var Y0=ko,Z0=K0;var J0=b(A(),1),Xp=0;function Ma(){J0.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Q0()),document.body.insertAdjacentElement("beforeend",e[1]??Q0()),Xp++,()=>{Xp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xp--}},[])}function Q0(){let 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 Ao=b(A(),1);var aS=b(D(),1),Yp="focusScope.autoFocusOnMount",Zp="focusScope.autoFocusOnUnmount",eS={bubbles:!1,cancelable:!0},J2="FocusScope",Gr=Ao.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...s}=e,[i,l]=Ao.useState(null),u=Te(a),c=Te(n),d=Ao.useRef(null),f=ee(t,g=>l(g)),m=Ao.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Ao.useEffect(()=>{if(r){let x=function(w){if(m.paused||!i)return;let I=w.target;i.contains(I)?d.current=I:ka(d.current,{select:!0})},y=function(w){if(m.paused||!i)return;let I=w.relatedTarget;I!==null&&(i.contains(I)||ka(d.current,{select:!0}))},R=function(w){if(document.activeElement===document.body)for(let L of w)L.removedNodes.length>0&&ka(i)};var g=x,h=y,v=R;document.addEventListener("focusin",x),document.addEventListener("focusout",y);let C=new MutationObserver(R);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y),C.disconnect()}}},[r,i,m.paused]),Ao.useEffect(()=>{if(i){oS.add(m);let g=document.activeElement;if(!i.contains(g)){let v=new CustomEvent(Yp,eS);i.addEventListener(Yp,u),i.dispatchEvent(v),v.defaultPrevented||(eF(nF(nS(i)),{select:!0}),document.activeElement===g&&ka(i))}return()=>{i.removeEventListener(Yp,u),setTimeout(()=>{let v=new CustomEvent(Zp,eS);i.addEventListener(Zp,c),i.dispatchEvent(v),v.defaultPrevented||ka(g??document.body,{select:!0}),i.removeEventListener(Zp,c),oS.remove(m)},0)}}},[i,u,c,m]);let p=Ao.useCallback(g=>{if(!o&&!r||m.paused)return;let h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(h&&v){let x=g.currentTarget,[y,R]=tF(x);y&&R?!g.shiftKey&&v===R?(g.preventDefault(),o&&ka(y,{select:!0})):g.shiftKey&&v===y&&(g.preventDefault(),o&&ka(R,{select:!0})):v===x&&g.preventDefault()}},[o,r,m.paused]);return(0,aS.jsx)(H.div,{tabIndex:-1,...s,ref:f,onKeyDown:p})});Gr.displayName=J2;function eF(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(ka(r,{select:t}),document.activeElement!==o)return}function tF(e){let t=nS(e),o=tS(t,e),r=tS(t.reverse(),e);return[o,r]}function nS(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function tS(e,t){for(let o of e)if(!oF(o,{upTo:t}))return o}function oF(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function rF(e){return e instanceof HTMLInputElement&&"select"in e}function ka(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&rF(e)&&t&&e.select()}}var oS=aF();function aF(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=rS(e,t),e.unshift(t)},remove(t){e=rS(e,t),e[0]?.resume()}}}function rS(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function nF(e){return e.filter(t=>t.tagName!=="A")}var so=b(A(),1);var lS=["top","right","bottom","left"];var hr=Math.min,qt=Math.max,Zl=Math.round,Ql=Math.floor,Zo=e=>({x:e,y:e}),sF={left:"right",right:"left",bottom:"top",top:"bottom"},iF={start:"end",end:"start"};function Md(e,t,o){return qt(e,hr(t,o))}function xr(e,t){return typeof e=="function"?e(t):e}function vr(e){return e.split("-")[0]}function An(e){return e.split("-")[1]}function kd(e){return e==="x"?"y":"x"}function Ad(e){return e==="y"?"height":"width"}var lF=new Set(["top","bottom"]);function Qo(e){return lF.has(vr(e))?"y":"x"}function Dd(e){return kd(Qo(e))}function uS(e,t,o){o===void 0&&(o=!1);let r=An(e),a=Dd(e),n=Ad(a),s=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=Yl(s)),[s,Yl(s)]}function cS(e){let t=Yl(e);return[Td(e),t,Td(t)]}function Td(e){return e.replace(/start|end/g,t=>iF[t])}var sS=["left","right"],iS=["right","left"],uF=["top","bottom"],cF=["bottom","top"];function dF(e,t,o){switch(e){case"top":case"bottom":return o?t?iS:sS:t?sS:iS;case"left":case"right":return t?uF:cF;default:return[]}}function dS(e,t,o,r){let a=An(e),n=dF(vr(e),o==="start",r);return a&&(n=n.map(s=>s+"-"+a),t&&(n=n.concat(n.map(Td)))),n}function Yl(e){return e.replace(/left|right|bottom|top/g,t=>sF[t])}function fF(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qp(e){return typeof e!="number"?fF(e):{top:e,right:e,bottom:e,left:e}}function Dn(e){let{x:t,y:o,width:r,height:a}=e;return{width:r,height:a,top:o,left:t,right:t+r,bottom:o+a,x:t,y:o}}function fS(e,t,o){let{reference:r,floating:a}=e,n=Qo(t),s=Dd(t),i=Ad(s),l=vr(t),u=n==="y",c=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,f=r[i]/2-a[i]/2,m;switch(l){case"top":m={x:c,y:r.y-a.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-a.width,y:d};break;default:m={x:r.x,y:r.y}}switch(An(t)){case"start":m[s]-=f*(o&&u?-1:1);break;case"end":m[s]+=f*(o&&u?-1:1);break}return m}var gS=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:s}=o,i=n.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:d}=fS(u,r,l),f=r,m={},p=0;for(let g=0;g<i.length;g++){let{name:h,fn:v}=i[g],{x,y,data:R,reset:C}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=x??c,d=y??d,m={...m,[h]:{...m[h],...R}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):C.rects),{x:c,y:d}=fS(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:a,middlewareData:m}};async function Zs(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=xr(t,e),p=Qp(m),h=i[f?d==="floating"?"reference":"floating":d],v=Dn(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(h)))==null||o?h:h.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:u,rootBoundary:c,strategy:l})),x=d==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,y=await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),R=await(n.isElement==null?void 0:n.isElement(y))?await(n.getScale==null?void 0:n.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Dn(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:l}):x);return{top:(v.top-C.top+p.top)/R.y,bottom:(C.bottom-v.bottom+p.bottom)/R.y,left:(v.left-C.left+p.left)/R.x,right:(C.right-v.right+p.right)/R.x}}var hS=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:a,rects:n,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:c=0}=xr(e,t)||{};if(u==null)return{};let d=Qp(c),f={x:o,y:r},m=Dd(a),p=Ad(m),g=await s.getDimensions(u),h=m==="y",v=h?"top":"left",x=h?"bottom":"right",y=h?"clientHeight":"clientWidth",R=n.reference[p]+n.reference[m]-f[m]-n.floating[p],C=f[m]-n.reference[m],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),I=w?w[y]:0;(!I||!await(s.isElement==null?void 0:s.isElement(w)))&&(I=i.floating[y]||n.floating[p]);let L=R/2-C/2,P=I/2-g[p]/2-1,T=hr(d[v],P),O=hr(d[x],P),$=T,W=I-g[p]-O,N=I/2-g[p]/2+L,q=Md($,N,W),E=!l.arrow&&An(a)!=null&&N!==q&&n.reference[p]/2-(N<$?T:O)-g[p]/2<0,G=E?N<$?N-$:N-W:0;return{[m]:f[m]+G,data:{[m]:q,centerOffset:N-q-G,...E&&{alignmentOffset:G}},reset:E}}});var xS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:a,middlewareData:n,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...h}=xr(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};let v=vr(a),x=Qo(i),y=vr(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!g?[Yl(i)]:cS(i)),w=p!=="none";!f&&w&&C.push(...dS(i,g,p,R));let I=[i,...C],L=await Zs(t,h),P=[],T=((r=n.flip)==null?void 0:r.overflows)||[];if(c&&P.push(L[v]),d){let N=uS(a,s,R);P.push(L[N[0]],L[N[1]])}if(T=[...T,{placement:a,overflows:P}],!P.every(N=>N<=0)){var O,$;let N=(((O=n.flip)==null?void 0:O.index)||0)+1,q=I[N];if(q&&(!(d==="alignment"?x!==Qo(q):!1)||T.every(M=>Qo(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:N,overflows:T},reset:{placement:q}};let E=($=T.filter(G=>G.overflows[0]<=0).sort((G,M)=>G.overflows[1]-M.overflows[1])[0])==null?void 0:$.placement;if(!E)switch(m){case"bestFit":{var W;let G=(W=T.filter(M=>{if(w){let k=Qo(M.placement);return k===x||k==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(k=>k>0).reduce((k,re)=>k+re,0)]).sort((M,k)=>M[1]-k[1])[0])==null?void 0:W[0];G&&(E=G);break}case"initialPlacement":E=i;break}if(a!==E)return{reset:{placement:E}}}return{}}}};function mS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pS(e){return lS.some(t=>e[t]>=0)}var vS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...a}=xr(e,t);switch(r){case"referenceHidden":{let n=await Zs(t,{...a,elementContext:"reference"}),s=mS(n,o.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pS(s)}}}case"escaped":{let n=await Zs(t,{...a,altBoundary:!0}),s=mS(n,o.floating);return{data:{escapedOffsets:s,escaped:pS(s)}}}default:return{}}}}};var yS=new Set(["left","top"]);async function mF(e,t){let{placement:o,platform:r,elements:a}=e,n=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=vr(o),i=An(o),l=Qo(o)==="y",u=yS.has(s)?-1:1,c=n&&l?-1:1,d=xr(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof p=="number"&&(m=i==="end"?p*-1:p),l?{x:m*c,y:f*u}:{x:f*u,y:m*c}}var bS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:a,y:n,placement:s,middlewareData:i}=t,l=await mF(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:a+l.x,y:n+l.y,data:{...l,placement:s}}}}},CS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:i={fn:h=>{let{x:v,y:x}=h;return{x:v,y:x}}},...l}=xr(e,t),u={x:o,y:r},c=await Zs(t,l),d=Qo(vr(a)),f=kd(d),m=u[f],p=u[d];if(n){let h=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=m+c[h],y=m-c[v];m=Md(x,m,y)}if(s){let h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=p+c[h],y=p-c[v];p=Md(x,p,y)}let g=i.fn({...t,[f]:m,[d]:p});return{...g,data:{x:g.x-o,y:g.y-r,enabled:{[f]:n,[d]:s}}}}}},wS=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:a,rects:n,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=xr(e,t),c={x:o,y:r},d=Qo(a),f=kd(d),m=c[f],p=c[d],g=xr(i,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){let y=f==="y"?"height":"width",R=n.reference[f]-n.floating[y]+h.mainAxis,C=n.reference[f]+n.reference[y]-h.mainAxis;m<R?m=R:m>C&&(m=C)}if(u){var v,x;let y=f==="y"?"width":"height",R=yS.has(vr(a)),C=n.reference[d]-n.floating[y]+(R&&((v=s.offset)==null?void 0:v[d])||0)+(R?0:h.crossAxis),w=n.reference[d]+n.reference[y]+(R?0:((x=s.offset)==null?void 0:x[d])||0)-(R?h.crossAxis:0);p<C?p=C:p>w&&(p=w)}return{[f]:m,[d]:p}}}},SS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:a,rects:n,platform:s,elements:i}=t,{apply:l=()=>{},...u}=xr(e,t),c=await Zs(t,u),d=vr(a),f=An(a),m=Qo(a)==="y",{width:p,height:g}=n.floating,h,v;d==="top"||d==="bottom"?(h=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(v=d,h=f==="end"?"top":"bottom");let x=g-c.top-c.bottom,y=p-c.left-c.right,R=hr(g-c[h],x),C=hr(p-c[v],y),w=!t.middlewareData.shift,I=R,L=C;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(L=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=x),w&&!f){let T=qt(c.left,0),O=qt(c.right,0),$=qt(c.top,0),W=qt(c.bottom,0);m?L=p-2*(T!==0||O!==0?T+O:qt(c.left,c.right)):I=g-2*($!==0||W!==0?$+W:qt(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:I});let P=await s.getDimensions(i.floating);return p!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function Ed(){return typeof window<"u"}function Nn(e){return IS(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jo(e){var t;return(t=(IS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function IS(e){return Ed()?e instanceof Node||e instanceof no(e).Node:!1}function Do(e){return Ed()?e instanceof Element||e instanceof no(e).Element:!1}function er(e){return Ed()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function RS(e){return!Ed()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}var pF=new Set(["inline","contents"]);function Qs(e){let{overflow:t,overflowX:o,overflowY:r,display:a}=Eo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!pF.has(a)}var gF=new Set(["table","td","th"]);function LS(e){return gF.has(Nn(e))}var hF=[":popover-open",":modal"];function Jl(e){return hF.some(t=>{try{return e.matches(t)}catch{return!1}})}var xF=["transform","translate","scale","rotate","perspective"],vF=["transform","translate","scale","rotate","perspective","filter"],yF=["paint","layout","strict","content"];function Nd(e){let t=Fd(),o=Do(e)?Eo(e):e;return xF.some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||vF.some(r=>(o.willChange||"").includes(r))||yF.some(r=>(o.contain||"").includes(r))}function PS(e){let t=zr(e);for(;er(t)&&!Fn(t);){if(Nd(t))return t;if(Jl(t))return null;t=zr(t)}return null}function Fd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var bF=new Set(["html","body","#document"]);function Fn(e){return bF.has(Nn(e))}function Eo(e){return no(e).getComputedStyle(e)}function eu(e){return Do(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zr(e){if(Nn(e)==="html")return e;let t=e.assignedSlot||e.parentNode||RS(e)&&e.host||Jo(e);return RS(t)?t.host:t}function TS(e){let t=zr(e);return Fn(t)?e.ownerDocument?e.ownerDocument.body:e.body:er(t)&&Qs(t)?t:TS(t)}function En(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=TS(e),n=a===((r=e.ownerDocument)==null?void 0:r.body),s=no(a);if(n){let i=Od(s);return t.concat(s,s.visualViewport||[],Qs(a)?a:[],i&&o?En(i):[])}return t.concat(a,En(a,[],o))}function Od(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DS(e){let t=Eo(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=er(e),n=a?e.offsetWidth:o,s=a?e.offsetHeight:r,i=Zl(o)!==n||Zl(r)!==s;return i&&(o=n,r=s),{width:o,height:r,$:i}}function eg(e){return Do(e)?e:e.contextElement}function Js(e){let t=eg(e);if(!er(t))return Zo(1);let o=t.getBoundingClientRect(),{width:r,height:a,$:n}=DS(t),s=(n?Zl(o.width):o.width)/r,i=(n?Zl(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}var CF=Zo(0);function ES(e){let t=no(e);return!Fd()||!t.visualViewport?CF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wF(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==no(e)?!1:t}function On(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),n=eg(e),s=Zo(1);t&&(r?Do(r)&&(s=Js(r)):s=Js(e));let i=wF(n,o,r)?ES(n):Zo(0),l=(a.left+i.x)/s.x,u=(a.top+i.y)/s.y,c=a.width/s.x,d=a.height/s.y;if(n){let f=no(n),m=r&&Do(r)?no(r):r,p=f,g=Od(p);for(;g&&r&&m!==p;){let h=Js(g),v=g.getBoundingClientRect(),x=Eo(g),y=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*h.x,R=v.top+(g.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,u*=h.y,c*=h.x,d*=h.y,l+=y,u+=R,p=no(g),g=Od(p)}}return Dn({width:c,height:d,x:l,y:u})}function _d(e,t){let o=eu(e).scrollLeft;return t?t.left+o:On(Jo(e)).left+o}function NS(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-_d(e,o),a=o.top+t.scrollTop;return{x:r,y:a}}function SF(e){let{elements:t,rect:o,offsetParent:r,strategy:a}=e,n=a==="fixed",s=Jo(r),i=t?Jl(t.floating):!1;if(r===s||i&&n)return o;let l={scrollLeft:0,scrollTop:0},u=Zo(1),c=Zo(0),d=er(r);if((d||!d&&!n)&&((Nn(r)!=="body"||Qs(s))&&(l=eu(r)),er(r))){let m=On(r);u=Js(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}let f=s&&!d&&!n?NS(s,l):Zo(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:o.y*u.y-l.scrollTop*u.y+c.y+f.y}}function RF(e){return Array.from(e.getClientRects())}function IF(e){let t=Jo(e),o=eu(e),r=e.ownerDocument.body,a=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+_d(e),i=-o.scrollTop;return Eo(r).direction==="rtl"&&(s+=qt(t.clientWidth,r.clientWidth)-a),{width:a,height:n,x:s,y:i}}var MS=25;function LF(e,t){let o=no(e),r=Jo(e),a=o.visualViewport,n=r.clientWidth,s=r.clientHeight,i=0,l=0;if(a){n=a.width,s=a.height;let c=Fd();(!c||c&&t==="fixed")&&(i=a.offsetLeft,l=a.offsetTop)}let u=_d(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-m);p<=MS&&(n-=p)}else u<=MS&&(n+=u);return{width:n,height:s,x:i,y:l}}var PF=new Set(["absolute","fixed"]);function TF(e,t){let o=On(e,!0,t==="fixed"),r=o.top+e.clientTop,a=o.left+e.clientLeft,n=er(e)?Js(e):Zo(1),s=e.clientWidth*n.x,i=e.clientHeight*n.y,l=a*n.x,u=r*n.y;return{width:s,height:i,x:l,y:u}}function kS(e,t,o){let r;if(t==="viewport")r=LF(e,o);else if(t==="document")r=IF(Jo(e));else if(Do(t))r=TF(t,o);else{let a=ES(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Dn(r)}function FS(e,t){let o=zr(e);return o===t||!Do(o)||Fn(o)?!1:Eo(o).position==="fixed"||FS(o,t)}function MF(e,t){let o=t.get(e);if(o)return o;let r=En(e,[],!1).filter(i=>Do(i)&&Nn(i)!=="body"),a=null,n=Eo(e).position==="fixed",s=n?zr(e):e;for(;Do(s)&&!Fn(s);){let i=Eo(s),l=Nd(s);!l&&i.position==="fixed"&&(a=null),(n?!l&&!a:!l&&i.position==="static"&&!!a&&PF.has(a.position)||Qs(s)&&!l&&FS(e,s))?r=r.filter(c=>c!==s):a=i,s=zr(s)}return t.set(e,r),r}function kF(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,s=[...o==="clippingAncestors"?Jl(t)?[]:MF(t,this._c):[].concat(o),r],i=s[0],l=s.reduce((u,c)=>{let d=kS(t,c,a);return u.top=qt(d.top,u.top),u.right=hr(d.right,u.right),u.bottom=hr(d.bottom,u.bottom),u.left=qt(d.left,u.left),u},kS(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function AF(e){let{width:t,height:o}=DS(e);return{width:t,height:o}}function DF(e,t,o){let r=er(t),a=Jo(t),n=o==="fixed",s=On(e,!0,n,t),i={scrollLeft:0,scrollTop:0},l=Zo(0);function u(){l.x=_d(a)}if(r||!r&&!n)if((Nn(t)!=="body"||Qs(a))&&(i=eu(t)),r){let m=On(t,!0,n,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else a&&u();n&&!r&&a&&u();let c=a&&!r&&!n?NS(a,i):Zo(0),d=s.left+i.scrollLeft-l.x-c.x,f=s.top+i.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function Jp(e){return Eo(e).position==="static"}function AS(e,t){if(!er(e)||Eo(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Jo(e)===o&&(o=o.ownerDocument.body),o}function OS(e,t){let o=no(e);if(Jl(e))return o;if(!er(e)){let a=zr(e);for(;a&&!Fn(a);){if(Do(a)&&!Jp(a))return a;a=zr(a)}return o}let r=AS(e,t);for(;r&&LS(r)&&Jp(r);)r=AS(r,t);return r&&Fn(r)&&Jp(r)&&!Nd(r)?o:r||PS(e)||o}var EF=async function(e){let t=this.getOffsetParent||OS,o=this.getDimensions,r=await o(e.floating);return{reference:DF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NF(e){return Eo(e).direction==="rtl"}var _S={convertOffsetParentRelativeRectToViewportRelativeRect:SF,getDocumentElement:Jo,getClippingRect:kF,getOffsetParent:OS,getElementRects:EF,getClientRects:RF,getDimensions:AF,getScale:Js,isElement:Do,isRTL:NF};function VS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FF(e,t){let o=null,r,a=Jo(e);function n(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),n();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:m}=u;if(i||t(),!f||!m)return;let p=Ql(d),g=Ql(a.clientWidth-(c+f)),h=Ql(a.clientHeight-(d+m)),v=Ql(c),y={rootMargin:-p+"px "+-g+"px "+-h+"px "+-v+"px",threshold:qt(0,hr(1,l))||1},R=!0;function C(w){let I=w[0].intersectionRatio;if(I!==l){if(!R)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!VS(u,e.getBoundingClientRect())&&s(),R=!1}try{o=new IntersectionObserver(C,{...y,root:a.ownerDocument})}catch{o=new IntersectionObserver(C,y)}o.observe(e)}return s(!0),n}function tg(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:a=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=eg(e),c=a||n?[...u?En(u):[],...En(t)]:[];c.forEach(v=>{a&&v.addEventListener("scroll",o,{passive:!0}),n&&v.addEventListener("resize",o)});let d=u&&i?FF(u,o):null,f=-1,m=null;s&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),o()}),u&&!l&&m.observe(u),m.observe(t));let p,g=l?On(e):null;l&&h();function h(){let v=On(e);g&&!VS(g,v)&&o(),g=v,p=requestAnimationFrame(h)}return o(),()=>{var v;c.forEach(x=>{a&&x.removeEventListener("scroll",o),n&&x.removeEventListener("resize",o)}),d?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var BS=bS;var HS=CS,US=xS,GS=SS,zS=vS,og=hS;var qS=wS,rg=(e,t,o)=>{let r=new Map,a={platform:_S,...o},n={...a.platform,_c:r};return gS(e,t,{...a,platform:n})};var st=b(A(),1),$S=b(A(),1),jS=b(Jn(),1),OF=typeof document<"u",_F=function(){},Vd=OF?$S.useLayoutEffect:_F;function Bd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!Bd(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),o=a.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=o;r--!==0;){let n=a[r];if(!(n==="_owner"&&e.$$typeof)&&!Bd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function KS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WS(e,t){let o=KS(e);return Math.round(t*o)/o}function ag(e){let t=st.useRef(e);return Vd(()=>{t.current=e}),t}function XS(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:a,elements:{reference:n,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[c,d]=st.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=st.useState(r);Bd(f,r)||m(r);let[p,g]=st.useState(null),[h,v]=st.useState(null),x=st.useCallback(M=>{M!==w.current&&(w.current=M,g(M))},[]),y=st.useCallback(M=>{M!==I.current&&(I.current=M,v(M))},[]),R=n||p,C=s||h,w=st.useRef(null),I=st.useRef(null),L=st.useRef(c),P=l!=null,T=ag(l),O=ag(a),$=ag(u),W=st.useCallback(()=>{if(!w.current||!I.current)return;let M={placement:t,strategy:o,middleware:f};O.current&&(M.platform=O.current),rg(w.current,I.current,M).then(k=>{let re={...k,isPositioned:$.current!==!1};N.current&&!Bd(L.current,re)&&(L.current=re,jS.flushSync(()=>{d(re)}))})},[f,t,o,O,$]);Vd(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[u]);let N=st.useRef(!1);Vd(()=>(N.current=!0,()=>{N.current=!1}),[]),Vd(()=>{if(R&&(w.current=R),C&&(I.current=C),R&&C){if(T.current)return T.current(R,C,W);W()}},[R,C,W,T,P]);let q=st.useMemo(()=>({reference:w,floating:I,setReference:x,setFloating:y}),[x,y]),E=st.useMemo(()=>({reference:R,floating:C}),[R,C]),G=st.useMemo(()=>{let M={position:o,left:0,top:0};if(!E.floating)return M;let k=WS(E.floating,c.x),re=WS(E.floating,c.y);return i?{...M,transform:"translate("+k+"px, "+re+"px)",...KS(E.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:k,top:re}},[o,i,E.floating,c.x,c.y]);return st.useMemo(()=>({...c,update:W,refs:q,elements:E,floatingStyles:G}),[c,W,q,E,G])}var VF=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){let{element:r,padding:a}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?og({element:r.current,padding:a}).fn(o):{}:r?og({element:r,padding:a}).fn(o):{}}}},YS=(e,t)=>({...BS(e),options:[e,t]}),ZS=(e,t)=>({...HS(e),options:[e,t]}),QS=(e,t)=>({...qS(e),options:[e,t]}),JS=(e,t)=>({...US(e),options:[e,t]}),eR=(e,t)=>({...GS(e),options:[e,t]});var tR=(e,t)=>({...zS(e),options:[e,t]});var oR=(e,t)=>({...VF(e),options:[e,t]});var rR=b(A(),1);var ng=b(D(),1),BF="Arrow",aR=rR.forwardRef((e,t)=>{let{children:o,width:r=10,height:a=5,...n}=e;return(0,ng.jsx)(H.svg,{...n,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,ng.jsx)("polygon",{points:"0,0 30,0 15,10"})})});aR.displayName=BF;var nR=aR;var Aa=b(D(),1);var sg="Popper",[sR,No]=Re(sg),[UF,iR]=sR(sg),lR=e=>{let{__scopePopper:t,children:o}=e,[r,a]=so.useState(null);return(0,Aa.jsx)(UF,{scope:t,anchor:r,onAnchorChange:a,children:o})};lR.displayName=sg;var uR="PopperAnchor",cR=so.forwardRef((e,t)=>{let{__scopePopper:o,virtualRef:r,...a}=e,n=iR(uR,o),s=so.useRef(null),i=ee(t,s),l=so.useRef(null);return so.useEffect(()=>{let u=l.current;l.current=r?.current||s.current,u!==l.current&&n.onAnchorChange(l.current)}),r?null:(0,Aa.jsx)(H.div,{...a,ref:i})});cR.displayName=uR;var ig="PopperContent",[GF,zF]=sR(ig),dR=so.forwardRef((e,t)=>{let{__scopePopper:o,side:r="bottom",sideOffset:a=0,align:n="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:p,...g}=e,h=iR(ig,o),[v,x]=so.useState(null),y=ee(t,_=>x(_)),[R,C]=so.useState(null),w=Ys(R),I=w?.width??0,L=w?.height??0,P=r+(n!=="center"?"-"+n:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},O=Array.isArray(u)?u:[u],$=O.length>0,W={padding:T,boundary:O.filter(WF),altBoundary:$},{refs:N,floatingStyles:q,placement:E,isPositioned:G,middlewareData:M}=XS({strategy:"fixed",placement:P,whileElementsMounted:(..._)=>tg(..._,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[YS({mainAxis:a+L,alignmentAxis:s}),l&&ZS({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?QS():void 0,...W}),l&&JS({...W}),eR({...W,apply:({elements:_,rects:ce,availableWidth:he,availableHeight:we})=>{let{width:_e,height:We}=ce.reference,bo=_.floating.style;bo.setProperty("--radix-popper-available-width",`${he}px`),bo.setProperty("--radix-popper-available-height",`${we}px`),bo.setProperty("--radix-popper-anchor-width",`${_e}px`),bo.setProperty("--radix-popper-anchor-height",`${We}px`)}}),R&&oR({element:R,padding:i}),$F({arrowWidth:I,arrowHeight:L}),f&&tR({strategy:"referenceHidden",...W})]}),[k,re]=pR(E),Se=Te(p);Le(()=>{G&&Se?.()},[G,Se]);let F=M.arrow?.x,j=M.arrow?.y,Z=M.arrow?.centerOffset!==0,[X,ue]=so.useState();return Le(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),(0,Aa.jsx)("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Aa.jsx)(GF,{scope:o,placedSide:k,onArrowChange:C,arrowX:F,arrowY:j,shouldHideArrow:Z,children:(0,Aa.jsx)(H.div,{"data-side":k,"data-align":re,...g,ref:y,style:{...g.style,animation:G?void 0:"none"}})})})});dR.displayName=ig;var fR="PopperArrow",qF={top:"bottom",right:"left",bottom:"top",left:"right"},mR=so.forwardRef(function(t,o){let{__scopePopper:r,...a}=t,n=zF(fR,r),s=qF[n.placedSide];return(0,Aa.jsx)("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:(0,Aa.jsx)(nR,{...a,ref:o,style:{...a.style,display:"block"}})})});mR.displayName=fR;function WF(e){return e!==null}var $F=e=>({name:"transformOrigin",options:e,fn(t){let{placement:o,rects:r,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=pR(o),d={start:"0%",center:"50%",end:"100%"}[c],f=(a.arrow?.x??0)+i/2,m=(a.arrow?.y??0)+l/2,p="",g="";return u==="bottom"?(p=s?d:`${f}px`,g=`${-l}px`):u==="top"?(p=s?d:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,g=s?d:`${m}px`):u==="left"&&(p=`${r.floating.width+l}px`,g=s?d:`${m}px`),{data:{x:p,y:g}}}});function pR(e){let[t,o="center"]=e.split("-");return[t,o]}var qr=lR,Wr=cR,Da=dR,Ea=mR;var Ud=b(A(),1),gR=b(Jn(),1);var hR=b(D(),1),jF="Portal",ho=Ud.forwardRef((e,t)=>{let{container:o,...r}=e,[a,n]=Ud.useState(!1);Le(()=>n(!0),[]);let s=o||a&&globalThis?.document?.body;return s?gR.default.createPortal((0,hR.jsx)(H.div,{...r,ref:t}),s):null});ho.displayName=jF;var KF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ei=new WeakMap,Gd=new WeakMap,zd={},lg=0,xR=function(e){return e&&(e.host||xR(e.parentNode))},XF=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=xR(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},YF=function(e,t,o,r){var a=XF(t,Array.isArray(e)?e:[e]);zd[o]||(zd[o]=new WeakMap);var n=zd[o],s=[],i=new Set,l=new Set(a),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};a.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(i.has(f))c(f);else try{var m=f.getAttribute(r),p=m!==null&&m!=="false",g=(ei.get(f)||0)+1,h=(n.get(f)||0)+1;ei.set(f,g),n.set(f,h),s.push(f),g===1&&p&&Gd.set(f,!0),h===1&&f.setAttribute(o,"true"),p||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),i.clear(),lg++,function(){s.forEach(function(d){var f=ei.get(d)-1,m=n.get(d)-1;ei.set(d,f),n.set(d,m),f||(Gd.has(d)||d.removeAttribute(r),Gd.delete(d)),m||d.removeAttribute(o)}),lg--,lg||(ei=new WeakMap,ei=new WeakMap,Gd=new WeakMap,zd={})}},Na=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||KF(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),YF(r,a,o,"aria-hidden")):function(){return null}};var io=function(){return io=Object.assign||function(t){for(var o,r=1,a=arguments.length;r<a;r++){o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},io.apply(this,arguments)};function qd(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(o[r[a]]=e[r[a]]);return o}function vR(e,t,o){if(o||arguments.length===2)for(var r=0,a=t.length,n;r<a;r++)(n||!(r in t))&&(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}var Xd=b(A());var Dt=b(A());var _n="right-scroll-bar-position",Vn="width-before-scroll-bar",ug="with-scroll-bars-hidden",cg="--removed-body-scroll-bar-size";function Wd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var yR=b(A());function bR(e,t){var o=(0,yR.useState)(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var a=o.value;a!==r&&(o.value=r,o.callback(r,a))}}}})[0];return o.callback=t,o.facade}var $d=b(A());var ZF=typeof window<"u"?$d.useLayoutEffect:$d.useEffect,CR=new WeakMap;function dg(e,t){var o=bR(t||null,function(r){return e.forEach(function(a){return Wd(a,r)})});return ZF(function(){var r=CR.get(o);if(r){var a=new Set(r),n=new Set(e),s=o.current;a.forEach(function(i){n.has(i)||Wd(i,null)}),n.forEach(function(i){a.has(i)||Wd(i,s)})}CR.set(o,e)},[e]),o}function QF(e){return e}function JF(e,t){t===void 0&&(t=QF);var o=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(n){var s=t(n,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(n){for(r=!0;o.length;){var s=o;o=[],s.forEach(n)}o={push:function(i){return n(i)},filter:function(){return o}}},assignMedium:function(n){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(n),s=o}var l=function(){var c=s;s=[],c.forEach(n)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),o}}}};return a}function fg(e){e===void 0&&(e={});var t=JF(null);return t.options=io({async:!0,ssr:!1},e),t}var wR=b(A()),SR=function(e){var t=e.sideCar,o=qd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return wR.createElement(r,io({},o))};SR.isSideCarExport=!0;function mg(e,t){return e.useMedium(t),SR}var jd=fg();var pg=function(){},tu=Dt.forwardRef(function(e,t){var o=Dt.useRef(null),r=Dt.useState({onScrollCapture:pg,onWheelCapture:pg,onTouchMoveCapture:pg}),a=r[0],n=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,g=e.inert,h=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,y=e.gapMode,R=qd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,w=dg([o,t]),I=io(io({},R),a);return Dt.createElement(Dt.Fragment,null,c&&Dt.createElement(C,{sideCar:jd,removeScrollBar:u,shards:d,noRelative:m,noIsolation:p,inert:g,setCallbacks:n,allowPinchZoom:!!h,lockRef:o,gapMode:y}),s?Dt.cloneElement(Dt.Children.only(i),io(io({},I),{ref:w})):Dt.createElement(x,io({},I,{className:l,ref:w}),i))});tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tu.classNames={fullWidth:Vn,zeroRight:_n};var je=b(A());var oi=b(A());var LR=b(A());var RR;var IR=function(){if(RR)return RR;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=IR();return t&&e.setAttribute("nonce",t),e}function tO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gg=function(){var e=0,t=null;return{add:function(o){e==0&&(t=eO())&&(tO(t,o),oO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var hg=function(){var e=gg();return function(t,o){LR.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var ou=function(){var e=hg(),t=function(o){var r=o.styles,a=o.dynamic;return e(r,a),null};return t};var rO={left:0,top:0,right:0,gap:0},xg=function(e){return parseInt(e||"",10)||0},aO=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[xg(o),xg(r),xg(a)]},vg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rO;var t=aO(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}};var nO=ou(),ti="data-scroll-locked",sO=function(e,t,o,r){var a=e.left,n=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
11
+ .`.concat(ug,` {
12
+ overflow: hidden `).concat(r,`;
13
+ padding-right: `).concat(i,"px ").concat(r,`;
21
14
  }
22
- body[`).concat(Zu,`] {
23
- overflow: hidden `).concat(o,`;
15
+ body[`).concat(ti,`] {
16
+ overflow: hidden `).concat(r,`;
24
17
  overscroll-behavior: contain;
25
- `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
26
- padding-left: `.concat(n,`px;
27
- padding-top: `).concat(a,`px;
28
- padding-right: `).concat(i,`px;
18
+ `).concat([t&&"position: relative ".concat(r,";"),o==="margin"&&`
19
+ padding-left: `.concat(a,`px;
20
+ padding-top: `).concat(n,`px;
21
+ padding-right: `).concat(s,`px;
29
22
  margin-left:0;
30
23
  margin-top:0;
31
- margin-right: `).concat(s,"px ").concat(o,`;
32
- `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
24
+ margin-right: `).concat(i,"px ").concat(r,`;
25
+ `),o==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
33
26
  }
34
27
 
35
- .`).concat(rl,` {
36
- right: `).concat(s,"px ").concat(o,`;
28
+ .`).concat(_n,` {
29
+ right: `).concat(i,"px ").concat(r,`;
37
30
  }
38
31
 
39
- .`).concat(ol,` {
40
- margin-right: `).concat(s,"px ").concat(o,`;
32
+ .`).concat(Vn,` {
33
+ margin-right: `).concat(i,"px ").concat(r,`;
41
34
  }
42
35
 
43
- .`).concat(rl," .").concat(rl,` {
44
- right: 0 `).concat(o,`;
36
+ .`).concat(_n," .").concat(_n,` {
37
+ right: 0 `).concat(r,`;
45
38
  }
46
39
 
47
- .`).concat(ol," .").concat(ol,` {
48
- margin-right: 0 `).concat(o,`;
40
+ .`).concat(Vn," .").concat(Vn,` {
41
+ margin-right: 0 `).concat(r,`;
49
42
  }
50
43
 
51
- body[`).concat(Zu,`] {
52
- `).concat(XC,": ").concat(s,`px;
44
+ body[`).concat(ti,`] {
45
+ `).concat(cg,": ").concat(i,`px;
53
46
  }
54
- `)},e2=function(){var e=parseInt(document.body.getAttribute(Zu)||"0",10);return isFinite(e)?e:0},s$=function(){Ju.useEffect(function(){return document.body.setAttribute(Zu,(e2()+1).toString()),function(){var e=e2()-1;e<=0?document.body.removeAttribute(Zu):document.body.setAttribute(Zu,e.toString())}},[])},nS=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;s$();var a=Ju.useMemo(function(){return oS(n)},[n]);return Ju.createElement(a$,{styles:i$(a,!t,n,r?"":"!important")})};var aS=!1;if(typeof window<"u")try{ep=Object.defineProperty({},"passive",{get:function(){return aS=!0,!0}}),window.addEventListener("test",ep,ep),window.removeEventListener("test",ep,ep)}catch{aS=!1}var ep,nl=aS?{passive:!1}:!1;var l$=function(e){return e.tagName==="TEXTAREA"},t2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!l$(e)&&r[t]==="visible")},u$=function(e){return t2(e,"overflowY")},c$=function(e){return t2(e,"overflowX")},iS=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=r2(e,o);if(n){var a=o2(e,o),i=a[1],s=a[2];if(i>s)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},d$=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},f$=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},r2=function(e,t){return e==="v"?u$(t):c$(t)},o2=function(e,t){return e==="v"?d$(t):f$(t)},p$=function(e,t){return e==="h"&&t==="rtl"?-1:1},n2=function(e,t,r,o,n){var a=p$(e,window.getComputedStyle(t).direction),i=a*o,s=r.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=o2(e,s),h=p[0],m=p[1],x=p[2],v=m-x-a*h;(h||v)&&r2(e,s)&&(d+=v,f+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(n&&Math.abs(d)<1||!n&&i>d)||!c&&(n&&Math.abs(f)<1||!n&&-i>f))&&(u=!0),u};var av=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},a2=function(e){return[e.deltaX,e.deltaY]},i2=function(e){return e&&"current"in e?e.current:e},m$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},g$=function(e){return`
47
+ `)},PR=function(){var e=parseInt(document.body.getAttribute(ti)||"0",10);return isFinite(e)?e:0},iO=function(){oi.useEffect(function(){return document.body.setAttribute(ti,(PR()+1).toString()),function(){var e=PR()-1;e<=0?document.body.removeAttribute(ti):document.body.setAttribute(ti,e.toString())}},[])},yg=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;iO();var n=oi.useMemo(function(){return vg(a)},[a]);return oi.createElement(nO,{styles:sO(n,!t,a,o?"":"!important")})};var bg=!1;if(typeof window<"u")try{ru=Object.defineProperty({},"passive",{get:function(){return bg=!0,!0}}),window.addEventListener("test",ru,ru),window.removeEventListener("test",ru,ru)}catch{bg=!1}var ru,Bn=bg?{passive:!1}:!1;var lO=function(e){return e.tagName==="TEXTAREA"},TR=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!lO(e)&&o[t]==="visible")},uO=function(e){return TR(e,"overflowY")},cO=function(e){return TR(e,"overflowX")},Cg=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=MR(e,r);if(a){var n=kR(e,r),s=n[1],i=n[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},dO=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},fO=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},MR=function(e,t){return e==="v"?uO(t):cO(t)},kR=function(e,t){return e==="v"?dO(t):fO(t)},mO=function(e,t){return e==="h"&&t==="rtl"?-1:1},AR=function(e,t,o,r,a){var n=mO(e,window.getComputedStyle(t).direction),s=n*r,i=o.target,l=t.contains(i),u=!1,c=s>0,d=0,f=0;do{if(!i)break;var m=kR(e,i),p=m[0],g=m[1],h=m[2],v=g-h-n*p;(p||v)&&MR(e,i)&&(d+=v,f+=p);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&(a&&Math.abs(d)<1||!a&&s>d)||!c&&(a&&Math.abs(f)<1||!a&&-s>f))&&(u=!0),u};var Kd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DR=function(e){return[e.deltaX,e.deltaY]},ER=function(e){return e&&"current"in e?e.current:e},pO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gO=function(e){return`
55
48
  .block-interactivity-`.concat(e,` {pointer-events: none;}
56
49
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
57
- `)},h$=0,ec=[];function s2(e){var t=rt.useRef([]),r=rt.useRef([0,0]),o=rt.useRef(),n=rt.useState(h$++)[0],a=rt.useState(Jf)[0],i=rt.useRef(e);rt.useEffect(function(){i.current=e},[e]),rt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=jN([e.lockRef.current],(e.shards||[]).map(i2),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=rt.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=av(m),g=r.current,y="deltaX"in m?m.deltaX:g[0]-v[0],w="deltaY"in m?m.deltaY:g[1]-v[1],C,R=m.target,S=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in m&&S==="h"&&R.type==="range")return!1;var L=iS(S,R);if(!L)return!0;if(L?C=S:(C=S==="v"?"h":"v",L=iS(S,R)),!L)return!1;if(!o.current&&"changedTouches"in m&&(y||w)&&(o.current=C),!C)return!0;var T=o.current||C;return n2(T,x,m,T==="h"?y:w,!0)},[]),l=rt.useCallback(function(m){var x=m;if(!(!ec.length||ec[ec.length-1]!==a)){var v="deltaY"in x?a2(x):av(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&m$(C.delta,v)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var y=(i.current.shards||[]).map(i2).filter(Boolean).filter(function(C){return C.contains(x.target)}),w=y.length>0?s(x,y[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=rt.useCallback(function(m,x,v,g){var y={name:m,delta:x,target:v,should:g,shadowParent:v$(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=rt.useCallback(function(m){r.current=av(m),o.current=void 0},[]),d=rt.useCallback(function(m){u(m.type,a2(m),m.target,s(m,e.lockRef.current))},[]),f=rt.useCallback(function(m){u(m.type,av(m),m.target,s(m,e.lockRef.current))},[]);rt.useEffect(function(){return ec.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,nl),document.addEventListener("touchmove",l,nl),document.addEventListener("touchstart",c,nl),function(){ec=ec.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,nl),document.removeEventListener("touchmove",l,nl),document.removeEventListener("touchstart",c,nl)}},[]);var p=e.removeScrollBar,h=e.inert;return rt.createElement(rt.Fragment,null,h?rt.createElement(a,{styles:g$(n)}):null,p?rt.createElement(nS,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function v$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var l2=ZC(nv,s2);var u2=iv.forwardRef(function(e,t){return iv.createElement(Zf,Jr({},e,{ref:t,sideCar:l2}))});u2.classNames=Zf.classNames;var Ea=u2;var It=b(M(),1),sv="Popover",[c2,VCe]=Te(sv,[Vo]),tp=Vo(),[y$,Hi]=c2(sv),d2=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=tp(t),l=lt.useRef(null),[u,c]=lt.useState(!1),[d,f]=Ue({prop:o,defaultProp:n??!1,onChange:a,caller:sv});return(0,It.jsx)(ka,{...s,children:(0,It.jsx)(y$,{scope:t,contentId:qe(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:lt.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:lt.useCallback(()=>c(!0),[]),onCustomAnchorRemove:lt.useCallback(()=>c(!1),[]),modal:i,children:r})})};d2.displayName=sv;var f2="PopoverAnchor",p2=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Hi(f2,r),a=tp(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return lt.useEffect(()=>(i(),()=>s()),[i,s]),(0,It.jsx)(Ma,{...a,...o,ref:t})});p2.displayName=f2;var m2="PopoverTrigger",g2=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Hi(m2,r),a=tp(r),i=ne(t,n.triggerRef),s=(0,It.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":w2(n.open),...o,ref:i,onClick:H(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,It.jsx)(Ma,{asChild:!0,...a,children:s})});g2.displayName=m2;var sS="PopoverPortal",[x$,w$]=c2(sS,{forceMount:void 0}),C$=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=Hi(sS,t);return(0,It.jsx)(x$,{scope:t,forceMount:r,children:(0,It.jsx)(it,{present:r||a.open,children:(0,It.jsx)(go,{asChild:!0,container:n,children:o})})})};C$.displayName=sS;var tc="PopoverContent",h2=lt.forwardRef((e,t)=>{let r=w$(tc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=Hi(tc,e.__scopePopover);return(0,It.jsx)(it,{present:o||a.open,children:a.modal?(0,It.jsx)(b$,{...n,ref:t}):(0,It.jsx)(R$,{...n,ref:t})})});h2.displayName=tc;var S$=ro("PopoverContent.RemoveScroll"),b$=lt.forwardRef((e,t)=>{let r=Hi(tc,e.__scopePopover),o=lt.useRef(null),n=ne(t,o),a=lt.useRef(!1);return lt.useEffect(()=>{let i=o.current;if(i)return Bi(i)},[]),(0,It.jsx)(Ea,{as:S$,allowPinchZoom:!0,children:(0,It.jsx)(v2,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:H(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),R$=lt.forwardRef((e,t)=>{let r=Hi(tc,e.__scopePopover),o=lt.useRef(!1),n=lt.useRef(!1);return(0,It.jsx)(v2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),v2=lt.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Hi(tc,r),p=tp(r);return Ni(),(0,It.jsx)(Pa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,It.jsx)(No,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,It.jsx)(Fi,{"data-state":w2(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.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)"}})})})}),y2="PopoverClose",x2=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Hi(y2,r);return(0,It.jsx)($.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>n.onOpenChange(!1))})});x2.displayName=y2;var L$="PopoverArrow",I$=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=tp(r);return(0,It.jsx)(Vi,{...n,...o,ref:t})});I$.displayName=L$;function w2(e){return e?"open":"closed"}var C2=d2,S2=p2,b2=g2;var lS=h2,R2=x2;var $n=b(M()),T$=J("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none 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",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",default:"w-72 p-4",lg:"w-96 p-5"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"default",radius:"default",shadow:"default"}}),Aa=C2,Da=b2,UCe=S2,Kn=L2.forwardRef(({className:e,variant:t,size:r,side:o,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,$n.jsxs)($n.Fragment,{children:[u&&(0,$n.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,$n.jsx)(lS,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:I(T$({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Kn.displayName=lS.displayName;var zCe=R2,k$=({className:e,...t})=>(0,$n.jsx)("div",{className:I("moonui-theme","my-2 h-px bg-border",e),...t});k$.displayName="PopoverSeparator";var M$=({className:e,...t})=>(0,$n.jsx)("div",{className:I("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});M$.displayName="PopoverHeader";var E$=({className:e,...t})=>(0,$n.jsx)("div",{className:I("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});E$.displayName="PopoverFooter";var op=b(E());var _a=b(E(),1);var Wt=b(E(),1);var Ui=b(M(),1),uS="rovingFocusGroup.onEntryFocus",A$={bubbles:!1,cancelable:!0},rp="RovingFocusGroup",[cS,I2,D$]=Tn(rp),[N$,rc]=Te(rp,[D$]),[_$,O$]=N$(rp),P2=Wt.forwardRef((e,t)=>(0,Ui.jsx)(cS.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Ui.jsx)(cS.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Ui.jsx)(F$,{...e,ref:t})})}));P2.displayName=rp;var F$=Wt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=Wt.useRef(null),p=ne(t,f),h=_n(a),[m,x]=Ue({prop:i,defaultProp:s??null,onChange:l,caller:rp}),[v,g]=Wt.useState(!1),y=et(u),w=I2(r),C=Wt.useRef(!1),[R,S]=Wt.useState(0);return Wt.useEffect(()=>{let L=f.current;if(L)return L.addEventListener(uS,y),()=>L.removeEventListener(uS,y)},[y]),(0,Ui.jsx)(_$,{scope:r,orientation:o,dir:h,loop:n,currentTabStopId:m,onItemFocus:Wt.useCallback(L=>x(L),[x]),onItemShiftTab:Wt.useCallback(()=>g(!0),[]),onFocusableItemAdd:Wt.useCallback(()=>S(L=>L+1),[]),onFocusableItemRemove:Wt.useCallback(()=>S(L=>L-1),[]),children:(0,Ui.jsx)($.div,{tabIndex:v||R===0?-1:0,"data-orientation":o,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:H(e.onMouseDown,()=>{C.current=!0}),onFocus:H(e.onFocus,L=>{let T=!C.current;if(L.target===L.currentTarget&&T&&!v){let P=new CustomEvent(uS,A$);if(L.currentTarget.dispatchEvent(P),!P.defaultPrevented){let N=w().filter(D=>D.focusable),F=N.find(D=>D.active),q=N.find(D=>D.id===m),G=[F,q,...N].filter(Boolean).map(D=>D.ref.current);M2(G,c)}}C.current=!1}),onBlur:H(e.onBlur,()=>g(!1))})})}),T2="RovingFocusGroupItem",k2=Wt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=qe(),u=a||l,c=O$(T2,r),d=c.currentTabStopId===u,f=I2(r),{onFocusableItemAdd:p,onFocusableItemRemove:h,currentTabStopId:m}=c;return Wt.useEffect(()=>{if(o)return p(),()=>h()},[o,p,h]),(0,Ui.jsx)(cS.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,Ui.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:H(e.onMouseDown,x=>{o?c.onItemFocus(u):x.preventDefault()}),onFocus:H(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:H(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let v=H$(x,c.orientation,c.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=f().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();let w=y.indexOf(x.currentTarget);y=c.loop?U$(y,w+1):y.slice(w+1)}setTimeout(()=>M2(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});k2.displayName=T2;var V$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B$(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function H$(e,t,r){let o=B$(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return V$[o]}function M2(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function U$(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var lv=P2,uv=k2;var Na=b(M(),1),cv="Tabs",[z$,sSe]=Te(cv,[rc]),A2=rc(),[W$,dS]=z$(cv),D2=_a.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=_n(s),[d,f]=Ue({prop:o,onChange:n,defaultProp:a??"",caller:cv});return(0,Na.jsx)(W$,{scope:r,baseId:qe(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,Na.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});D2.displayName=cv;var N2="TabsList",_2=_a.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=dS(N2,r),i=A2(r);return(0,Na.jsx)(lv,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,Na.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});_2.displayName=N2;var O2="TabsTrigger",F2=_a.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=dS(O2,r),s=A2(r),l=H2(i.baseId,o),u=U2(i.baseId,o),c=o===i.value;return(0,Na.jsx)(uv,{asChild:!0,...s,focusable:!n,active:c,children:(0,Na.jsx)($.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:H(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(o):d.preventDefault()}),onKeyDown:H(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(o)}),onFocus:H(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(o)})})})});F2.displayName=O2;var V2="TabsContent",B2=_a.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=dS(V2,r),l=H2(s.baseId,o),u=U2(s.baseId,o),c=o===s.value,d=_a.useRef(c);return _a.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Na.jsx)(it,{present:n||c,children:({present:f})=>(0,Na.jsx)($.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});B2.displayName=V2;function H2(e,t){return`${e}-trigger-${t}`}function U2(e,t){return`${e}-content-${t}`}var fS=D2,pS=_2,mS=F2,gS=B2;var Oa=b(M()),dv=op.forwardRef(({vertical:e=!1,...t},r)=>(0,Oa.jsx)(fS,{ref:r,className:I("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));dv.displayName=fS.displayName;var j$=J("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-2 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1}}),fv=op.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,...n},a)=>(0,Oa.jsx)(pS,{ref:a,className:I("moonui-theme",j$({variant:t,orientation:r,fullWidth:o,className:e})),...n}));fv.displayName=pS.displayName;var q$=J("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),oc=op.forwardRef(({className:e,variant:t,size:r,icon:o,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>(0,Oa.jsxs)(mS,{ref:d,className:I("moonui-theme",q$({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,Oa.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,Oa.jsx)("span",{className:"ml-2",children:o}),a&&(0,Oa.jsx)("span",{className:"ml-2",children:a})]}));oc.displayName=mS.displayName;var nc=op.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,Oa.jsx)(gS,{ref:o,className:I("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...r}));nc.displayName=gS.displayName;var zi=b(E());var Xn=b(M()),$$=J("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),K$=J("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),X$=J("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),Y$=J("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),Fa=zi.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:o,thumbVariant:n,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...p},h)=>{let[m,x]=zi.useState(u||c||[0]);zi.useEffect(()=>{u!==void 0&&x(u)},[u]);let v=P=>s?s(P):`${Math.round(P*100)/100}`,g=(P,N,F)=>(P-N)/(F-N)*100,y=zi.useRef(null),w=p.min||0,C=p.max||100,R=p.step||1,S=P=>{let N=P.map(F=>{if(R<1){let q=R.toString().split(".")[1]?.length||0;return Math.round(F*Math.pow(10,q))/Math.pow(10,q)}return Math.round(F)});x(N),d&&d(N)},L=P=>{if(f)return;let N=y.current;if(!N)return;let F=N.getBoundingClientRect(),q=(P.clientX-F.left)/F.width,A=w+q*(C-w),G=Math.round(A/R)*R,D=Math.max(w,Math.min(C,G)),z=[...m];z[0]=D,S(z)},T=P=>N=>{if(f)return;N.preventDefault();let F=A=>{let G=y.current;if(!G)return;let D=G.getBoundingClientRect(),z=(A.clientX-D.left)/D.width,B=w+z*(C-w),k=Math.round(B/R)*R,te=Math.max(w,Math.min(C,k)),ve=[...m];ve[P]=te,S(ve)},q=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",q)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",q)};return(0,Xn.jsxs)("div",{className:"w-full",ref:h,...p,children:[i&&(0,Xn.jsx)("div",{className:I("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,Xn.jsx)("span",{children:v(m[0])}):(0,Xn.jsxs)("span",{children:[v(m[0])," - ",v(m[m.length-1])]})}),(0,Xn.jsxs)("div",{className:I("moonui-theme",$$({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Xn.jsx)("div",{ref:y,className:I(K$({variant:r||n||"default"})),onClick:L,children:(0,Xn.jsx)("div",{className:I(X$({variant:o||n||"primary"})),style:{left:"0%",width:`${g(m[0],w,C)}%`}})}),m.map((P,N)=>(0,Xn.jsx)("div",{className:I(Y$({variant:n||"primary",size:a})),style:{left:`${g(P,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:T(N),"aria-label":`Thumb ${N+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":P,"aria-disabled":f},N))]})]})});Fa.displayName="Slider";var U=b(M()),z2=J("relative inline-flex items-center justify-center",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"default",shape:"square"}});function W2(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function G2(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function Q$(e){let t=W2(e);if(!t)return null;let r=t.r/255,o=t.g/255,n=t.b/255,a=Math.max(r,o,n),i=Math.min(r,o,n),s=0,l=0,u=(a+i)/2;if(a!==i){let c=a-i;switch(l=u>.5?c/(2-a-i):c/(a+i),a){case r:s=((o-n)/c+(o<n?6:0))/6;break;case o:s=((n-r)/c+2)/6;break;case n:s=((r-o)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function Z$(e,t,r){e=e/360,t=t/100,r=r/100;let o,n,a;if(t===0)o=n=a=r;else{let i=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return G2(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var j2=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function hS({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=j2,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[h,m]=Bo.useState(!1),[x,v]=Bo.useState(o),[g,y]=Bo.useState(100),[w,C]=Bo.useState(!1),[R,S]=Bo.useState(o),L=Bo.useMemo(()=>Q$(x)||{h:0,s:0,l:0},[x]),T=Bo.useMemo(()=>W2(x)||{r:0,g:0,b:0},[x]);Bo.useEffect(()=>{v(o),S(o)},[o]);let P=D=>{v(D),S(D),n?.(D)},N=(D,z)=>{let B={...L,[D]:z},k=Z$(B.h,B.s,B.l);P(k)},F=(D,z)=>{let B={...T,[D]:z},k=G2(B.r,B.g,B.b);P(k)},q=D=>{let z=D.target.value;S(z),/^#[0-9A-F]{6}$/i.test(z)&&P(z)},A=async()=>{try{let D=x;u==="rgb"?D=`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"&&(D=`hsl(${L.h}, ${L.s}%, ${L.l}%)`),await navigator.clipboard.writeText(D),C(!0),setTimeout(()=>C(!1),2e3)}catch(D){console.error("Failed to copy:",D)}},G=()=>u==="rgb"?`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"?`hsl(${L.h}, ${L.s}%, ${L.l}%)`:x;return(0,U.jsxs)(Aa,{open:h,onOpenChange:m,children:[(0,U.jsx)(Da,{asChild:!0,children:(0,U.jsx)(Fe,{variant:"outline",className:I(z2({size:t,shape:r}),"p-0 border-2",e),style:{backgroundColor:x},disabled:f,...p,children:(0,U.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,U.jsxs)(Kn,{className:"w-80",align:"start",sideOffset:8,children:[(0,U.jsxs)(dv,{defaultValue:"picker",className:"w-full",children:[(0,U.jsxs)(fv,{className:"grid w-full grid-cols-3",children:[(0,U.jsx)(oc,{value:"picker",children:"Picker"}),(0,U.jsx)(oc,{value:"sliders",children:"Sliders"}),(0,U.jsx)(oc,{value:"input",children:"Input"})]}),(0,U.jsxs)(nc,{value:"picker",className:"space-y-4",children:[(0,U.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,U.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${L.h}, 100%, 50%))`}}),(0,U.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,U.jsx)(We.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:x,left:`${L.s/100*280-8}px`,top:`${(1-L.l/100)*192-8}px`}})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Yr,{children:"Hue"}),(0,U.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,U.jsx)(Fa,{value:[L.h],onValueChange:([D])=>N("h",D),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Yr,{children:"Opacity"}),(0,U.jsxs)("div",{className:"flex items-center gap-3",children:[(0,U.jsx)(Fa,{value:[g],onValueChange:([D])=>y(D),max:100,step:1,className:"flex-1"}),(0,U.jsxs)("span",{className:"text-sm w-10 text-right",children:[g,"%"]})]})]})]}),(0,U.jsxs)(nc,{value:"sliders",className:"space-y-4",children:[(0,U.jsxs)("div",{className:"space-y-3",children:[(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Yr,{children:"Red"}),(0,U.jsx)("span",{className:"text-sm text-muted-foreground",children:T.r})]}),(0,U.jsx)(Fa,{value:[T.r],onValueChange:([D])=>F("r",D),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Yr,{children:"Green"}),(0,U.jsx)("span",{className:"text-sm text-muted-foreground",children:T.g})]}),(0,U.jsx)(Fa,{value:[T.g],onValueChange:([D])=>F("g",D),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Yr,{children:"Blue"}),(0,U.jsx)("span",{className:"text-sm text-muted-foreground",children:T.b})]}),(0,U.jsx)(Fa,{value:[T.b],onValueChange:([D])=>F("b",D),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,U.jsx)("div",{className:"pt-2 border-t",children:(0,U.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,U.jsxs)("p",{className:"font-medium",children:[L.h,"\xB0"]})]}),(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,U.jsxs)("p",{className:"font-medium",children:[L.s,"%"]})]}),(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,U.jsxs)("p",{className:"font-medium",children:[L.l,"%"]})]})]})})]}),(0,U.jsxs)(nc,{value:"input",className:"space-y-4",children:[(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Yr,{children:"Hex Color"}),(0,U.jsxs)("div",{className:"flex gap-2",children:[(0,U.jsx)(pr,{value:R,onChange:q,placeholder:"#000000",className:"font-mono"}),(0,U.jsx)(Fe,{size:"icon",variant:"outline",onClick:()=>P(R),children:(0,U.jsx)(sr,{className:"h-4 w-4"})})]})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Yr,{children:"RGB Values"}),(0,U.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,U.jsx)(pr,{type:"number",value:T.r,onChange:D=>F("r",parseInt(D.target.value)||0),min:0,max:255,className:"text-center"}),(0,U.jsx)(pr,{type:"number",value:T.g,onChange:D=>F("g",parseInt(D.target.value)||0),min:0,max:255,className:"text-center"}),(0,U.jsx)(pr,{type:"number",value:T.b,onChange:D=>F("b",parseInt(D.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,U.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,U.jsxs)("div",{className:"flex items-center gap-3",children:[(0,U.jsx)("div",{className:I("h-10 w-10 rounded border-2",z2({shape:r})),style:{backgroundColor:x}}),(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-sm font-medium",children:G()}),(0,U.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,U.jsx)(Fe,{size:"icon",variant:"ghost",onClick:A,className:"h-8 w-8",children:(0,U.jsx)(wa,{mode:"wait",children:w?(0,U.jsx)(We.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,U.jsx)(sr,{className:"h-4 w-4 text-green-600"})},"check"):(0,U.jsx)(We.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,U.jsx)(Md,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,U.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,U.jsx)(Yr,{children:"Preset Colors"}),(0,U.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(D=>(0,U.jsx)("button",{className:I("h-7 w-7 rounded border-2 transition-all hover:scale-110",x===D?"border-primary":"border-transparent"),style:{backgroundColor:D},onClick:()=>P(D)},D))})]})]})]})}function J$({value:e="#000000",onChange:t,colors:r=j2.slice(0,10),className:o,size:n="default"}){let a={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,U.jsx)("div",{className:I("moonui-theme","flex flex-wrap gap-2",o),children:r.map(i=>(0,U.jsx)("button",{className:I("rounded-full border-2 transition-all hover:scale-110",a[n],e===i?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:i},onClick:()=>t?.(i)},i))})}function e8({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=Bo.useState(e),a=(i,s)=>{let l={...o,[i]:s};n(l),t?.(l)};return(0,U.jsxs)("div",{className:I("moonui-theme","space-y-4",r),children:[(0,U.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.end})`}}),(0,U.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Yr,{children:"Start Color"}),(0,U.jsx)(hS,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Yr,{children:"End Color"}),(0,U.jsx)(hS,{value:o.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Yr,{children:"Angle"}),(0,U.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,U.jsx)(Fa,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var qi=b(E());var q2=1,t8=.9,r8=.8,o8=.17,vS=.1,yS=.999,n8=.9999,a8=.99,i8=/[\\\/_+.#"@\[\(\{&]/,s8=/[\\\/_+.#"@\[\(\{&]/g,l8=/[\s-]/,K2=/[\s-]/g;function xS(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?q2:a8;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=o.charAt(a),u=r.indexOf(l,n),c=0,d,f,p,h;u>=0;)d=xS(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=q2:i8.test(e.charAt(u-1))?(d*=r8,p=e.slice(n,u-1).match(s8),p&&n>0&&(d*=Math.pow(yS,p.length))):l8.test(e.charAt(u-1))?(d*=t8,h=e.slice(n,u-1).match(K2),h&&n>0&&(d*=Math.pow(yS,h.length))):(d*=o8,n>0&&(d*=Math.pow(yS,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=n8)),(d<vS&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=xS(e,t,r,o,u+1,a+2,i),f*vS>d&&(d=f*vS)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function $2(e){return e.toLowerCase().replace(K2," ")}function X2(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,xS(e,t,$2(e),$2(t),0,0,{})}var $e=b(Pe(),1);var ESe=!!(typeof window<"u"&&window.document&&window.document.createElement);function Pt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var c_=b(Pe(),1);function u_(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Va(...e){return t=>{let r=!1,o=e.map(n=>{let a=u_(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():u_(e[n],null)}}}}function Gt(...e){return c_.useCallback(Va(...e),e)}var Ho=b(Pe(),1),IS=b(vn(),1);function m_(e,t){let r=Ho.createContext(t),o=a=>{let{children:i,...s}=a,l=Ho.useMemo(()=>s,Object.values(s));return(0,IS.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Ho.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function gv(e,t=[]){let r=[];function o(a,i){let s=Ho.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,x=Ho.useMemo(()=>h,Object.values(h));return(0,IS.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,h=Ho.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=r.map(i=>Ho.createContext(i));return function(s){let l=s?.[e]||a;return Ho.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,I8(n,...t)]}function I8(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return Ho.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var PS=b(Pe(),1);var g_=b(Pe(),1),yn=globalThis?.document?g_.useLayoutEffect:()=>{};var P8=PS[" useId ".trim().toString()]||(()=>{}),T8=0;function xn(e){let[t,r]=PS.useState(P8());return yn(()=>{e||r(o=>o??String(T8++))},[e]),e||(t?`radix-${t}`:"")}var Uo=b(Pe(),1);var vv=b(Pe(),1);var k8=Uo[" useInsertionEffect ".trim().toString()]||yn;function hv({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=M8({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Uo.useRef(e!==void 0);Uo.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,o])}let u=Uo.useCallback(c=>{if(s){let d=E8(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function M8({defaultProp:e,onChange:t}){let[r,o]=Uo.useState(e),n=Uo.useRef(r),a=Uo.useRef(t);return k8(()=>{a.current=t},[t]),Uo.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function E8(e){return typeof e=="function"}var USe=Symbol("RADIX:SYNC_STATE");var ht=b(Pe(),1);var w_=b(Pe(),1),C_=b(TS(),1);var Nt=b(Pe(),1);var xv=b(vn(),1);function wv(e){let t=_8(e),r=Nt.forwardRef((o,n)=>{let{children:a,...i}=o,s=Nt.Children.toArray(a),l=s.find(F8);if(l){let u=l.props.children,c=s.map(d=>d===l?Nt.Children.count(u)>1?Nt.Children.only(null):Nt.isValidElement(u)?u.props.children:null:d);return(0,xv.jsx)(t,{...i,ref:n,children:Nt.isValidElement(u)?Nt.cloneElement(u,void 0,c):null})}return(0,xv.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function _8(e){let t=Nt.forwardRef((r,o)=>{let{children:n,...a}=r;if(Nt.isValidElement(n)){let i=B8(n),s=V8(a,n.props);return n.type!==Nt.Fragment&&(s.ref=o?Va(o,i):i),Nt.cloneElement(n,s)}return Nt.Children.count(n)>1?Nt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var O8=Symbol("radix.slottable");function F8(e){return Nt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O8}function V8(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function B8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var S_=b(vn(),1),H8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=H8.reduce((e,t)=>{let r=wv(`Primitive.${t}`),o=w_.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,S_.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function b_(e,t){e&&C_.flushSync(()=>e.dispatchEvent(t))}var sc=b(Pe(),1);function gr(e){let t=sc.useRef(e);return sc.useEffect(()=>{t.current=e}),sc.useMemo(()=>(...r)=>t.current?.(...r),[])}var R_=b(Pe(),1);function L_(e,t=globalThis?.document){let r=gr(e);R_.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var MS=b(vn(),1),U8="DismissableLayer",kS="dismissableLayer.update",z8="dismissableLayer.pointerDownOutside",W8="dismissableLayer.focusOutside",I_,T_=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ES=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(T_),[c,d]=ht.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),h=Gt(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(x),g=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=g>=v,C=q8(S=>{let L=S.target,T=[...u.branches].some(P=>P.contains(L));!w||T||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),R=$8(S=>{let L=S.target;[...u.branches].some(P=>P.contains(L))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return L_(S=>{g===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),ht.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(I_=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),P_(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=I_)}},[c,f,r,u]),ht.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),P_())},[c,u]),ht.useEffect(()=>{let S=()=>p({});return document.addEventListener(kS,S),()=>document.removeEventListener(kS,S)},[]),(0,MS.jsx)(_e.div,{...l,ref:h,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:Pt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Pt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Pt(e.onPointerDownCapture,C.onPointerDownCapture)})});ES.displayName=U8;var G8="DismissableLayerBranch",j8=ht.forwardRef((e,t)=>{let r=ht.useContext(T_),o=ht.useRef(null),n=Gt(t,o);return ht.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,MS.jsx)(_e.div,{...e,ref:n})});j8.displayName=G8;function q8(e,t=globalThis?.document){let r=gr(e),o=ht.useRef(!1),n=ht.useRef(()=>{});return ht.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){k_(z8,r,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function $8(e,t=globalThis?.document){let r=gr(e),o=ht.useRef(!1);return ht.useEffect(()=>{let n=a=>{a.target&&!o.current&&k_(W8,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function P_(){let e=new CustomEvent(kS);document.dispatchEvent(e)}function k_(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?b_(n,a):n.dispatchEvent(a)}var zo=b(Pe(),1);var N_=b(vn(),1),AS="focusScope.autoFocusOnMount",DS="focusScope.autoFocusOnUnmount",M_={bubbles:!1,cancelable:!0},K8="FocusScope",NS=zo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=zo.useState(null),u=gr(n),c=gr(a),d=zo.useRef(null),f=Gt(t,m=>l(m)),p=zo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;zo.useEffect(()=>{if(o){let g=function(R){if(p.paused||!s)return;let S=R.target;s.contains(S)?d.current=S:Gi(d.current,{select:!0})},y=function(R){if(p.paused||!s)return;let S=R.relatedTarget;S!==null&&(s.contains(S)||Gi(d.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(let L of R)L.removedNodes.length>0&&Gi(s)};var m=g,x=y,v=w;document.addEventListener("focusin",g),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),C.disconnect()}}},[o,s,p.paused]),zo.useEffect(()=>{if(s){A_.add(p);let m=document.activeElement;if(!s.contains(m)){let v=new CustomEvent(AS,M_);s.addEventListener(AS,u),s.dispatchEvent(v),v.defaultPrevented||(X8(e9(__(s)),{select:!0}),document.activeElement===m&&Gi(s))}return()=>{s.removeEventListener(AS,u),setTimeout(()=>{let v=new CustomEvent(DS,M_);s.addEventListener(DS,c),s.dispatchEvent(v),v.defaultPrevented||Gi(m??document.body,{select:!0}),s.removeEventListener(DS,c),A_.remove(p)},0)}}},[s,u,c,p]);let h=zo.useCallback(m=>{if(!r&&!o||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(x&&v){let g=m.currentTarget,[y,w]=Y8(g);y&&w?!m.shiftKey&&v===w?(m.preventDefault(),r&&Gi(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),r&&Gi(w,{select:!0})):v===g&&m.preventDefault()}},[r,o,p.paused]);return(0,N_.jsx)(_e.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});NS.displayName=K8;function X8(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(Gi(o,{select:t}),document.activeElement!==r)return}function Y8(e){let t=__(e),r=E_(t,e),o=E_(t.reverse(),e);return[r,o]}function __(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function E_(e,t){for(let r of e)if(!Q8(r,{upTo:t}))return r}function Q8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Z8(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Z8(e)&&t&&e.select()}}var A_=J8();function J8(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=D_(e,t),e.unshift(t)},remove(t){e=D_(e,t),e[0]?.resume()}}}function D_(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function e9(e){return e.filter(t=>t.tagName!=="A")}var Cv=b(Pe(),1),O_=b(TS(),1);var F_=b(vn(),1),t9="Portal",_S=Cv.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Cv.useState(!1);yn(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?O_.default.createPortal((0,F_.jsx)(_e.div,{...o,ref:t}),i):null});_S.displayName=t9;var eo=b(Pe(),1);var V_=b(Pe(),1);function r9(e,t){return V_.useReducer((r,o)=>t[r][o]??r,e)}var Yn=e=>{let{present:t,children:r}=e,o=o9(t),n=typeof r=="function"?r({present:o.isPresent}):eo.Children.only(r),a=Gt(o.ref,n9(n));return typeof r=="function"||o.isPresent?eo.cloneElement(n,{ref:a}):null};Yn.displayName="Presence";function o9(e){let[t,r]=eo.useState(),o=eo.useRef(null),n=eo.useRef(e),a=eo.useRef("none"),i=e?"mounted":"unmounted",[s,l]=r9(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return eo.useEffect(()=>{let u=Sv(o.current);a.current=s==="mounted"?u:"none"},[s]),yn(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=Sv(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),yn(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=Sv(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(a.current=Sv(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:eo.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Sv(e){return e?.animationName||"none"}function n9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var H_=b(Pe(),1),OS=0;function U_(){H_.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??B_()),document.body.insertAdjacentElement("beforeend",e[1]??B_()),OS++,()=>{OS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),OS--}},[])}function B_(){let 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 to=function(){return to=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},to.apply(this,arguments)};function bv(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function z_(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Tv=b(Pe());var hr=b(Pe());var al="right-scroll-bar-position",il="width-before-scroll-bar",FS="with-scroll-bars-hidden",VS="--removed-body-scroll-bar-size";function Rv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var W_=b(Pe());function G_(e,t){var r=(0,W_.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var Lv=b(Pe());var a9=typeof window<"u"?Lv.useLayoutEffect:Lv.useEffect,j_=new WeakMap;function BS(e,t){var r=G_(t||null,function(o){return e.forEach(function(n){return Rv(n,o)})});return a9(function(){var o=j_.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Rv(s,null)}),a.forEach(function(s){n.has(s)||Rv(s,i)})}j_.set(r,e)},[e]),r}function i9(e){return e}function s9(e,t){t===void 0&&(t=i9);var r=[],o=!1,n={read:function(){if(o)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(a){var i=t(a,o);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){o=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return n}function HS(e){e===void 0&&(e={});var t=s9(null);return t.options=to({async:!0,ssr:!1},e),t}var q_=b(Pe()),$_=function(e){var t=e.sideCar,r=bv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return q_.createElement(o,to({},r))};$_.isSideCarExport=!0;function US(e,t){return e.useMedium(t),$_}var Iv=HS();var zS=function(){},ap=hr.forwardRef(function(e,t){var r=hr.useRef(null),o=hr.useState({onScrollCapture:zS,onWheelCapture:zS,onTouchMoveCapture:zS}),n=o[0],a=o[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,x=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=e.gapMode,w=bv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,R=BS([r,t]),S=to(to({},w),n);return hr.createElement(hr.Fragment,null,c&&hr.createElement(C,{sideCar:Iv,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?hr.cloneElement(hr.Children.only(s),to(to({},S),{ref:R})):hr.createElement(g,to({},S,{className:l,ref:R}),s))});ap.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ap.classNames={fullWidth:il,zeroRight:al};var ot=b(Pe());var uc=b(Pe());var Y_=b(Pe());var K_;var X_=function(){if(K_)return K_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function l9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=X_();return t&&e.setAttribute("nonce",t),e}function u9(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function c9(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var WS=function(){var e=0,t=null;return{add:function(r){e==0&&(t=l9())&&(u9(t,r),c9(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var GS=function(){var e=WS();return function(t,r){Y_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var ip=function(){var e=GS(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var d9={left:0,top:0,right:0,gap:0},jS=function(e){return parseInt(e||"",10)||0},f9=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[jS(r),jS(o),jS(n)]},qS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return d9;var t=f9(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var p9=ip(),lc="data-scroll-locked",m9=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
58
- .`.concat(FS,` {
59
- overflow: hidden `).concat(o,`;
60
- padding-right: `).concat(s,"px ").concat(o,`;
61
- }
62
- body[`).concat(lc,`] {
63
- overflow: hidden `).concat(o,`;
64
- overscroll-behavior: contain;
65
- `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
66
- padding-left: `.concat(n,`px;
67
- padding-top: `).concat(a,`px;
68
- padding-right: `).concat(i,`px;
69
- margin-left:0;
70
- margin-top:0;
71
- margin-right: `).concat(s,"px ").concat(o,`;
72
- `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
73
- }
74
-
75
- .`).concat(al,` {
76
- right: `).concat(s,"px ").concat(o,`;
77
- }
78
-
79
- .`).concat(il,` {
80
- margin-right: `).concat(s,"px ").concat(o,`;
81
- }
82
-
83
- .`).concat(al," .").concat(al,` {
84
- right: 0 `).concat(o,`;
85
- }
86
-
87
- .`).concat(il," .").concat(il,` {
88
- margin-right: 0 `).concat(o,`;
89
- }
90
-
91
- body[`).concat(lc,`] {
92
- `).concat(VS,": ").concat(s,`px;
93
- }
94
- `)},Q_=function(){var e=parseInt(document.body.getAttribute(lc)||"0",10);return isFinite(e)?e:0},g9=function(){uc.useEffect(function(){return document.body.setAttribute(lc,(Q_()+1).toString()),function(){var e=Q_()-1;e<=0?document.body.removeAttribute(lc):document.body.setAttribute(lc,e.toString())}},[])},$S=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;g9();var a=uc.useMemo(function(){return qS(n)},[n]);return uc.createElement(p9,{styles:m9(a,!t,n,r?"":"!important")})};var KS=!1;if(typeof window<"u")try{sp=Object.defineProperty({},"passive",{get:function(){return KS=!0,!0}}),window.addEventListener("test",sp,sp),window.removeEventListener("test",sp,sp)}catch{KS=!1}var sp,sl=KS?{passive:!1}:!1;var h9=function(e){return e.tagName==="TEXTAREA"},Z_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!h9(e)&&r[t]==="visible")},v9=function(e){return Z_(e,"overflowY")},y9=function(e){return Z_(e,"overflowX")},XS=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=J_(e,o);if(n){var a=eO(e,o),i=a[1],s=a[2];if(i>s)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},x9=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},w9=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},J_=function(e,t){return e==="v"?v9(t):y9(t)},eO=function(e,t){return e==="v"?x9(t):w9(t)},C9=function(e,t){return e==="h"&&t==="rtl"?-1:1},tO=function(e,t,r,o,n){var a=C9(e,window.getComputedStyle(t).direction),i=a*o,s=r.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=eO(e,s),h=p[0],m=p[1],x=p[2],v=m-x-a*h;(h||v)&&J_(e,s)&&(d+=v,f+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(n&&Math.abs(d)<1||!n&&i>d)||!c&&(n&&Math.abs(f)<1||!n&&-i>f))&&(u=!0),u};var Pv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rO=function(e){return[e.deltaX,e.deltaY]},oO=function(e){return e&&"current"in e?e.current:e},S9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b9=function(e){return`
95
- .block-interactivity-`.concat(e,` {pointer-events: none;}
96
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
97
- `)},R9=0,cc=[];function nO(e){var t=ot.useRef([]),r=ot.useRef([0,0]),o=ot.useRef(),n=ot.useState(R9++)[0],a=ot.useState(ip)[0],i=ot.useRef(e);ot.useEffect(function(){i.current=e},[e]),ot.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=z_([e.lockRef.current],(e.shards||[]).map(oO),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ot.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=Pv(m),g=r.current,y="deltaX"in m?m.deltaX:g[0]-v[0],w="deltaY"in m?m.deltaY:g[1]-v[1],C,R=m.target,S=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in m&&S==="h"&&R.type==="range")return!1;var L=XS(S,R);if(!L)return!0;if(L?C=S:(C=S==="v"?"h":"v",L=XS(S,R)),!L)return!1;if(!o.current&&"changedTouches"in m&&(y||w)&&(o.current=C),!C)return!0;var T=o.current||C;return tO(T,x,m,T==="h"?y:w,!0)},[]),l=ot.useCallback(function(m){var x=m;if(!(!cc.length||cc[cc.length-1]!==a)){var v="deltaY"in x?rO(x):Pv(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&S9(C.delta,v)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var y=(i.current.shards||[]).map(oO).filter(Boolean).filter(function(C){return C.contains(x.target)}),w=y.length>0?s(x,y[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=ot.useCallback(function(m,x,v,g){var y={name:m,delta:x,target:v,should:g,shadowParent:L9(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=ot.useCallback(function(m){r.current=Pv(m),o.current=void 0},[]),d=ot.useCallback(function(m){u(m.type,rO(m),m.target,s(m,e.lockRef.current))},[]),f=ot.useCallback(function(m){u(m.type,Pv(m),m.target,s(m,e.lockRef.current))},[]);ot.useEffect(function(){return cc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,sl),document.addEventListener("touchmove",l,sl),document.addEventListener("touchstart",c,sl),function(){cc=cc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,sl),document.removeEventListener("touchmove",l,sl),document.removeEventListener("touchstart",c,sl)}},[]);var p=e.removeScrollBar,h=e.inert;return ot.createElement(ot.Fragment,null,h?ot.createElement(a,{styles:b9(n)}):null,p?ot.createElement($S,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function L9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var aO=US(Iv,nO);var iO=Tv.forwardRef(function(e,t){return Tv.createElement(ap,to({},e,{ref:t,sideCar:aO}))});iO.classNames=ap.classNames;var YS=iO;var I9=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dc=new WeakMap,kv=new WeakMap,Mv={},QS=0,sO=function(e){return e&&(e.host||sO(e.parentNode))},P9=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=sO(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},T9=function(e,t,r,o){var n=P9(t,Array.isArray(e)?e:[e]);Mv[r]||(Mv[r]=new WeakMap);var a=Mv[r],i=[],s=new Set,l=new Set(n),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};n.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(o),h=p!==null&&p!=="false",m=(dc.get(f)||0)+1,x=(a.get(f)||0)+1;dc.set(f,m),a.set(f,x),i.push(f),m===1&&h&&kv.set(f,!0),x===1&&f.setAttribute(r,"true"),h||f.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),s.clear(),QS++,function(){i.forEach(function(d){var f=dc.get(d)-1,p=a.get(d)-1;dc.set(d,f),a.set(d,p),f||(kv.has(d)||d.removeAttribute(o),kv.delete(d)),p||d.removeAttribute(r)}),QS--,QS||(dc=new WeakMap,dc=new WeakMap,kv=new WeakMap,Mv={})}},lO=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||I9(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),T9(o,n,r,"aria-hidden")):function(){return null}};var Ve=b(vn(),1),Av="Dialog",[uO,VRe]=gv(Av),[k9,wn]=uO(Av),cO=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=$e.useRef(null),l=$e.useRef(null),[u,c]=hv({prop:o,defaultProp:n??!1,onChange:a,caller:Av});return(0,Ve.jsx)(k9,{scope:t,triggerRef:s,contentRef:l,contentId:xn(),titleId:xn(),descriptionId:xn(),open:u,onOpenChange:c,onOpenToggle:$e.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};cO.displayName=Av;var dO="DialogTrigger",M9=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=wn(dO,r),a=Gt(t,n.triggerRef);return(0,Ve.jsx)(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":eb(n.open),...o,ref:a,onClick:Pt(e.onClick,n.onOpenToggle)})});M9.displayName=dO;var ZS="DialogPortal",[E9,fO]=uO(ZS,{forceMount:void 0}),pO=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=wn(ZS,t);return(0,Ve.jsx)(E9,{scope:t,forceMount:r,children:$e.Children.map(o,i=>(0,Ve.jsx)(Yn,{present:r||a.open,children:(0,Ve.jsx)(_S,{asChild:!0,container:n,children:i})}))})};pO.displayName=ZS;var Ev="DialogOverlay",mO=$e.forwardRef((e,t)=>{let r=fO(Ev,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=wn(Ev,e.__scopeDialog);return a.modal?(0,Ve.jsx)(Yn,{present:o||a.open,children:(0,Ve.jsx)(D9,{...n,ref:t})}):null});mO.displayName=Ev;var A9=wv("DialogOverlay.RemoveScroll"),D9=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=wn(Ev,r);return(0,Ve.jsx)(YS,{as:A9,allowPinchZoom:!0,shards:[n.contentRef],children:(0,Ve.jsx)(_e.div,{"data-state":eb(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),ll="DialogContent",gO=$e.forwardRef((e,t)=>{let r=fO(ll,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=wn(ll,e.__scopeDialog);return(0,Ve.jsx)(Yn,{present:o||a.open,children:a.modal?(0,Ve.jsx)(N9,{...n,ref:t}):(0,Ve.jsx)(_9,{...n,ref:t})})});gO.displayName=ll;var N9=$e.forwardRef((e,t)=>{let r=wn(ll,e.__scopeDialog),o=$e.useRef(null),n=Gt(t,r.contentRef,o);return $e.useEffect(()=>{let a=o.current;if(a)return lO(a)},[]),(0,Ve.jsx)(hO,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pt(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Pt(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Pt(e.onFocusOutside,a=>a.preventDefault())})}),_9=$e.forwardRef((e,t)=>{let r=wn(ll,e.__scopeDialog),o=$e.useRef(!1),n=$e.useRef(!1);return(0,Ve.jsx)(hO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),hO=$e.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=wn(ll,r),l=$e.useRef(null),u=Gt(t,l);return U_(),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(NS,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Ve.jsx)(ES,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":eb(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(B9,{titleId:s.titleId}),(0,Ve.jsx)(U9,{contentRef:l,descriptionId:s.descriptionId})]})]})}),JS="DialogTitle",O9=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=wn(JS,r);return(0,Ve.jsx)(_e.h2,{id:n.titleId,...o,ref:t})});O9.displayName=JS;var vO="DialogDescription",F9=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=wn(vO,r);return(0,Ve.jsx)(_e.p,{id:n.descriptionId,...o,ref:t})});F9.displayName=vO;var yO="DialogClose",V9=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=wn(yO,r);return(0,Ve.jsx)(_e.button,{type:"button",...o,ref:t,onClick:Pt(e.onClick,()=>n.onOpenChange(!1))})});V9.displayName=yO;function eb(e){return e?"open":"closed"}var xO="DialogTitleWarning",[BRe,wO]=m_(xO,{contentName:ll,titleName:JS,docsSlug:"dialog"}),B9=({titleId:e})=>{let t=wO(xO),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
98
-
99
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
100
-
101
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return $e.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},H9="DialogDescriptionWarning",U9=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wO(H9).contentName}}.`;return $e.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},CO=cO;var SO=pO,bO=mO,RO=gO;var X=b(Pe(),1);var lp='[cmdk-group=""]',tb='[cmdk-group-items=""]',W9='[cmdk-group-heading=""]',IO='[cmdk-item=""]',LO=`${IO}:not([aria-disabled="true"])`,rb="cmdk-item-select",fc="data-value",G9=(e,t,r)=>X2(e,t,r),PO=X.createContext(void 0),up=()=>X.useContext(PO),TO=X.createContext(void 0),ob=()=>X.useContext(TO),kO=X.createContext(void 0),MO=X.forwardRef((e,t)=>{let r=pc(()=>{var _,Z;return{search:"",value:(Z=(_=e.value)!=null?_:e.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=pc(()=>new Set),n=pc(()=>new Map),a=pc(()=>new Map),i=pc(()=>new Set),s=EO(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:x=!0,...v}=e,g=xn(),y=xn(),w=xn(),C=X.useRef(null),R=t7();ul(()=>{if(c!==void 0){let _=c.trim();r.current.value=_,S.emit()}},[c]),ul(()=>{R(6,q)},[]);let S=X.useMemo(()=>({subscribe:_=>(i.current.add(_),()=>i.current.delete(_)),snapshot:()=>r.current,setState:(_,Z,ae)=>{var Y,ce,j,pe;if(!Object.is(r.current[_],Z)){if(r.current[_]=Z,_==="search")F(),P(),R(1,N);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let be=document.getElementById(w);be?be.focus():(Y=document.getElementById(g))==null||Y.focus()}if(R(7,()=>{var be;r.current.selectedItemId=(be=A())==null?void 0:be.id,S.emit()}),ae||R(5,q),((ce=s.current)==null?void 0:ce.value)!==void 0){let be=Z??"";(pe=(j=s.current).onValueChange)==null||pe.call(j,be);return}}S.emit()}},emit:()=>{i.current.forEach(_=>_())}}),[]),L=X.useMemo(()=>({value:(_,Z,ae)=>{var Y;Z!==((Y=a.current.get(_))==null?void 0:Y.value)&&(a.current.set(_,{value:Z,keywords:ae}),r.current.filtered.items.set(_,T(Z,ae)),R(2,()=>{P(),S.emit()}))},item:(_,Z)=>(o.current.add(_),Z&&(n.current.has(Z)?n.current.get(Z).add(_):n.current.set(Z,new Set([_]))),R(3,()=>{F(),P(),r.current.value||N(),S.emit()}),()=>{a.current.delete(_),o.current.delete(_),r.current.filtered.items.delete(_);let ae=A();R(4,()=>{F(),ae?.getAttribute("id")===_&&N(),S.emit()})}),group:_=>(n.current.has(_)||n.current.set(_,new Set),()=>{a.current.delete(_),n.current.delete(_)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:g,inputId:w,labelId:y,listInnerRef:C}),[]);function T(_,Z){var ae,Y;let ce=(Y=(ae=s.current)==null?void 0:ae.filter)!=null?Y:G9;return _?ce(_,r.current.search,Z):0}function P(){if(!r.current.search||s.current.shouldFilter===!1)return;let _=r.current.filtered.items,Z=[];r.current.filtered.groups.forEach(Y=>{let ce=n.current.get(Y),j=0;ce.forEach(pe=>{let be=_.get(pe);j=Math.max(be,j)}),Z.push([Y,j])});let ae=C.current;G().sort((Y,ce)=>{var j,pe;let be=Y.getAttribute("id"),Ne=ce.getAttribute("id");return((j=_.get(Ne))!=null?j:0)-((pe=_.get(be))!=null?pe:0)}).forEach(Y=>{let ce=Y.closest(tb);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${tb} > *`)):ae.appendChild(Y.parentElement===ae?Y:Y.closest(`${tb} > *`))}),Z.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let j=(ce=C.current)==null?void 0:ce.querySelector(`${lp}[${fc}="${encodeURIComponent(Y[0])}"]`);j?.parentElement.appendChild(j)})}function N(){let _=G().find(ae=>ae.getAttribute("aria-disabled")!=="true"),Z=_?.getAttribute(fc);S.setState("value",Z||void 0)}function F(){var _,Z,ae,Y;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let j of o.current){let pe=(Z=(_=a.current.get(j))==null?void 0:_.value)!=null?Z:"",be=(Y=(ae=a.current.get(j))==null?void 0:ae.keywords)!=null?Y:[],Ne=T(pe,be);r.current.filtered.items.set(j,Ne),Ne>0&&ce++}for(let[j,pe]of n.current)for(let be of pe)if(r.current.filtered.items.get(be)>0){r.current.filtered.groups.add(j);break}r.current.filtered.count=ce}function q(){var _,Z,ae;let Y=A();Y&&(((_=Y.parentElement)==null?void 0:_.firstChild)===Y&&((ae=(Z=Y.closest(lp))==null?void 0:Z.querySelector(W9))==null||ae.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function A(){var _;return(_=C.current)==null?void 0:_.querySelector(`${IO}[aria-selected="true"]`)}function G(){var _;return Array.from(((_=C.current)==null?void 0:_.querySelectorAll(LO))||[])}function D(_){let Z=G()[_];Z&&S.setState("value",Z.getAttribute(fc))}function z(_){var Z;let ae=A(),Y=G(),ce=Y.findIndex(pe=>pe===ae),j=Y[ce+_];(Z=s.current)!=null&&Z.loop&&(j=ce+_<0?Y[Y.length-1]:ce+_===Y.length?Y[0]:Y[ce+_]),j&&S.setState("value",j.getAttribute(fc))}function B(_){let Z=A(),ae=Z?.closest(lp),Y;for(;ae&&!Y;)ae=_>0?J9(ae,lp):e7(ae,lp),Y=ae?.querySelector(LO);Y?S.setState("value",Y.getAttribute(fc)):z(_)}let k=()=>D(G().length-1),te=_=>{_.preventDefault(),_.metaKey?k():_.altKey?B(1):z(1)},ve=_=>{_.preventDefault(),_.metaKey?D(0):_.altKey?B(-1):z(-1)};return X.createElement(_e.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:_=>{var Z;(Z=v.onKeyDown)==null||Z.call(v,_);let ae=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||ae))switch(_.key){case"n":case"j":{x&&_.ctrlKey&&te(_);break}case"ArrowDown":{te(_);break}case"p":case"k":{x&&_.ctrlKey&&ve(_);break}case"ArrowUp":{ve(_);break}case"Home":{_.preventDefault(),D(0);break}case"End":{_.preventDefault(),k();break}case"Enter":{_.preventDefault();let Y=A();if(Y){let ce=new Event(rb);Y.dispatchEvent(ce)}}}}},X.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:o7},l),Dv(e,_=>X.createElement(TO.Provider,{value:S},X.createElement(PO.Provider,{value:L},_))))}),j9=X.forwardRef((e,t)=>{var r,o;let n=xn(),a=X.useRef(null),i=X.useContext(kO),s=up(),l=EO(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;ul(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=AO(n,a,[e.value,e.children,a],e.keywords),d=ob(),f=ji(R=>R.value&&R.value===c.current),p=ji(R=>u||s.filter()===!1?!0:R.search?R.filtered.items.get(n)>0:!0);X.useEffect(()=>{let R=a.current;if(!(!R||e.disabled))return R.addEventListener(rb,h),()=>R.removeEventListener(rb,h)},[p,e.onSelect,e.disabled]);function h(){var R,S;m(),(S=(R=l.current).onSelect)==null||S.call(R,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:x,value:v,onSelect:g,forceMount:y,keywords:w,...C}=e;return X.createElement(_e.div,{ref:Va(a,t),...C,id:n,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!f,"data-disabled":!!x,"data-selected":!!f,onPointerMove:x||s.getDisablePointerSelection()?void 0:m,onClick:x?void 0:h},e.children)}),q9=X.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=xn(),s=X.useRef(null),l=X.useRef(null),u=xn(),c=up(),d=ji(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);ul(()=>c.group(i),[]),AO(i,s,[e.value,e.heading,l]);let f=X.useMemo(()=>({id:i,forceMount:n}),[n]);return X.createElement(_e.div,{ref:Va(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&X.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Dv(e,p=>X.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},X.createElement(kO.Provider,{value:f},p))))}),$9=X.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=X.useRef(null),a=ji(i=>!i.search);return!r&&!a?null:X.createElement(_e.div,{ref:Va(n,t),...o,"cmdk-separator":"",role:"separator"})}),K9=X.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=ob(),i=ji(u=>u.search),s=ji(u=>u.selectedItemId),l=up();return X.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),X.createElement(_e.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:n?e.value:i,onChange:u=>{n||a.setState("search",u.target.value),r?.(u.target.value)}})}),X9=X.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=X.useRef(null),i=X.useRef(null),s=ji(u=>u.selectedItemId),l=up();return X.useEffect(()=>{if(i.current&&a.current){let u=i.current,c=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),X.createElement(_e.div,{ref:Va(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},Dv(e,u=>X.createElement("div",{ref:Va(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),Y9=X.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return X.createElement(CO,{open:r,onOpenChange:o},X.createElement(SO,{container:i},X.createElement(bO,{"cmdk-overlay":"",className:n}),X.createElement(RO,{"aria-label":e.label,"cmdk-dialog":"",className:a},X.createElement(MO,{ref:t,...s}))))}),Q9=X.forwardRef((e,t)=>ji(r=>r.filtered.count===0)?X.createElement(_e.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Z9=X.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return X.createElement(_e.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},Dv(e,i=>X.createElement("div",{"aria-hidden":!0},i)))}),Dr=Object.assign(MO,{List:X9,Item:j9,Input:K9,Group:q9,Separator:$9,Dialog:Y9,Empty:Q9,Loading:Z9});function J9(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function e7(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function EO(e){let t=X.useRef(e);return ul(()=>{t.current=e}),t}var ul=typeof window>"u"?X.useEffect:X.useLayoutEffect;function pc(e){let t=X.useRef();return t.current===void 0&&(t.current=e()),t}function ji(e){let t=ob(),r=()=>e(t.snapshot());return X.useSyncExternalStore(t.subscribe,r,r)}function AO(e,t,r,o=[]){let n=X.useRef(),a=up();return ul(()=>{var i;let s=(()=>{var u;for(let c of r){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():n.current}})(),l=o.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(fc,s),n.current=s}),n}var t7=()=>{let[e,t]=X.useState(),r=pc(()=>new Map);return ul(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function r7(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Dv({asChild:e,children:t},r){return e&&X.isValidElement(t)?X.cloneElement(r7(t),{ref:t.ref},r(t.props.children)):r(t)}var o7={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var mc=b(E());var Ke=b(E(),1);var Be=b(M(),1),_v="Dialog",[DO,aLe]=Te(_v),[n7,Cn]=DO(_v),NO=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Ke.useRef(null),l=Ke.useRef(null),[u,c]=Ue({prop:o,defaultProp:n??!1,onChange:a,caller:_v});return(0,Be.jsx)(n7,{scope:t,triggerRef:s,contentRef:l,contentId:qe(),titleId:qe(),descriptionId:qe(),open:u,onOpenChange:c,onOpenToggle:Ke.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};NO.displayName=_v;var _O="DialogTrigger",OO=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Cn(_O,r),a=ne(t,n.triggerRef);return(0,Be.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":ib(n.open),...o,ref:a,onClick:H(e.onClick,n.onOpenToggle)})});OO.displayName=_O;var nb="DialogPortal",[a7,FO]=DO(nb,{forceMount:void 0}),VO=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Cn(nb,t);return(0,Be.jsx)(a7,{scope:t,forceMount:r,children:Ke.Children.map(o,i=>(0,Be.jsx)(it,{present:r||a.open,children:(0,Be.jsx)(go,{asChild:!0,container:n,children:i})}))})};VO.displayName=nb;var Nv="DialogOverlay",BO=Ke.forwardRef((e,t)=>{let r=FO(Nv,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Cn(Nv,e.__scopeDialog);return a.modal?(0,Be.jsx)(it,{present:o||a.open,children:(0,Be.jsx)(s7,{...n,ref:t})}):null});BO.displayName=Nv;var i7=ro("DialogOverlay.RemoveScroll"),s7=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Cn(Nv,r);return(0,Be.jsx)(Ea,{as:i7,allowPinchZoom:!0,shards:[n.contentRef],children:(0,Be.jsx)($.div,{"data-state":ib(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),cl="DialogContent",HO=Ke.forwardRef((e,t)=>{let r=FO(cl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Cn(cl,e.__scopeDialog);return(0,Be.jsx)(it,{present:o||a.open,children:a.modal?(0,Be.jsx)(l7,{...n,ref:t}):(0,Be.jsx)(u7,{...n,ref:t})})});HO.displayName=cl;var l7=Ke.forwardRef((e,t)=>{let r=Cn(cl,e.__scopeDialog),o=Ke.useRef(null),n=ne(t,r.contentRef,o);return Ke.useEffect(()=>{let a=o.current;if(a)return Bi(a)},[]),(0,Be.jsx)(UO,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault())})}),u7=Ke.forwardRef((e,t)=>{let r=Cn(cl,e.__scopeDialog),o=Ke.useRef(!1),n=Ke.useRef(!1);return(0,Be.jsx)(UO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),UO=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Cn(cl,r),l=Ke.useRef(null),u=ne(t,l);return Ni(),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Pa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Be.jsx)(No,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ib(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(c7,{titleId:s.titleId}),(0,Be.jsx)(f7,{contentRef:l,descriptionId:s.descriptionId})]})]})}),ab="DialogTitle",zO=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Cn(ab,r);return(0,Be.jsx)($.h2,{id:n.titleId,...o,ref:t})});zO.displayName=ab;var WO="DialogDescription",GO=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Cn(WO,r);return(0,Be.jsx)($.p,{id:n.descriptionId,...o,ref:t})});GO.displayName=WO;var jO="DialogClose",qO=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Cn(jO,r);return(0,Be.jsx)($.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>n.onOpenChange(!1))})});qO.displayName=jO;function ib(e){return e?"open":"closed"}var $O="DialogTitleWarning",[iLe,KO]=ML($O,{contentName:cl,titleName:ab,docsSlug:"dialog"}),c7=({titleId:e})=>{let t=KO($O),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
50
+ `)},hO=0,ri=[];function NR(e){var t=je.useRef([]),o=je.useRef([0,0]),r=je.useRef(),a=je.useState(hO++)[0],n=je.useState(ou)[0],s=je.useRef(e);je.useEffect(function(){s.current=e},[e]),je.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=vR([e.lockRef.current],(e.shards||[]).map(ER),!0).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=je.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var v=Kd(g),x=o.current,y="deltaX"in g?g.deltaX:x[0]-v[0],R="deltaY"in g?g.deltaY:x[1]-v[1],C,w=g.target,I=Math.abs(y)>Math.abs(R)?"h":"v";if("touches"in g&&I==="h"&&w.type==="range")return!1;var L=Cg(I,w);if(!L)return!0;if(L?C=I:(C=I==="v"?"h":"v",L=Cg(I,w)),!L)return!1;if(!r.current&&"changedTouches"in g&&(y||R)&&(r.current=C),!C)return!0;var P=r.current||C;return AR(P,h,g,P==="h"?y:R,!0)},[]),l=je.useCallback(function(g){var h=g;if(!(!ri.length||ri[ri.length-1]!==n)){var v="deltaY"in h?DR(h):Kd(h),x=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&pO(C.delta,v)})[0];if(x&&x.should){h.cancelable&&h.preventDefault();return}if(!x){var y=(s.current.shards||[]).map(ER).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=y.length>0?i(h,y[0]):!s.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=je.useCallback(function(g,h,v,x){var y={name:g,delta:h,target:v,should:x,shadowParent:xO(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(R){return R!==y})},1)},[]),c=je.useCallback(function(g){o.current=Kd(g),r.current=void 0},[]),d=je.useCallback(function(g){u(g.type,DR(g),g.target,i(g,e.lockRef.current))},[]),f=je.useCallback(function(g){u(g.type,Kd(g),g.target,i(g,e.lockRef.current))},[]);je.useEffect(function(){return ri.push(n),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Bn),document.addEventListener("touchmove",l,Bn),document.addEventListener("touchstart",c,Bn),function(){ri=ri.filter(function(g){return g!==n}),document.removeEventListener("wheel",l,Bn),document.removeEventListener("touchmove",l,Bn),document.removeEventListener("touchstart",c,Bn)}},[]);var m=e.removeScrollBar,p=e.inert;return je.createElement(je.Fragment,null,p?je.createElement(n,{styles:gO(a)}):null,m?je.createElement(yg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var FR=mg(jd,NR);var OR=Xd.forwardRef(function(e,t){return Xd.createElement(tu,io({},e,{ref:t,sideCar:FR}))});OR.classNames=tu.classNames;var $r=OR;var it=b(D(),1),Yd="Popover",[_R,mse]=Re(Yd,[No]),au=No(),[vO,Fa]=_R(Yd),VR=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!1}=e,i=au(t),l=Ye.useRef(null),[u,c]=Ye.useState(!1),[d,f]=Fe({prop:r,defaultProp:a??!1,onChange:n,caller:Yd});return(0,it.jsx)(qr,{...i,children:(0,it.jsx)(vO,{scope:t,contentId:Pe(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:Ye.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:Ye.useCallback(()=>c(!0),[]),onCustomAnchorRemove:Ye.useCallback(()=>c(!1),[]),modal:s,children:o})})};VR.displayName=Yd;var BR="PopoverAnchor",HR=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Fa(BR,o),n=au(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=a;return Ye.useEffect(()=>(s(),()=>i()),[s,i]),(0,it.jsx)(Wr,{...n,...r,ref:t})});HR.displayName=BR;var UR="PopoverTrigger",GR=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Fa(UR,o),n=au(o),s=ee(t,a.triggerRef),i=(0,it.jsx)(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jR(a.open),...r,ref:s,onClick:V(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:(0,it.jsx)(Wr,{asChild:!0,...n,children:i})});GR.displayName=UR;var wg="PopoverPortal",[yO,bO]=_R(wg,{forceMount:void 0}),CO=e=>{let{__scopePopover:t,forceMount:o,children:r,container:a}=e,n=Fa(wg,t);return(0,it.jsx)(yO,{scope:t,forceMount:o,children:(0,it.jsx)(Oe,{present:o||n.open,children:(0,it.jsx)(ho,{asChild:!0,container:a,children:r})})})};CO.displayName=wg;var ai="PopoverContent",zR=Ye.forwardRef((e,t)=>{let o=bO(ai,e.__scopePopover),{forceMount:r=o.forceMount,...a}=e,n=Fa(ai,e.__scopePopover);return(0,it.jsx)(Oe,{present:r||n.open,children:n.modal?(0,it.jsx)(SO,{...a,ref:t}):(0,it.jsx)(RO,{...a,ref:t})})});zR.displayName=ai;var wO=uo("PopoverContent.RemoveScroll"),SO=Ye.forwardRef((e,t)=>{let o=Fa(ai,e.__scopePopover),r=Ye.useRef(null),a=ee(t,r),n=Ye.useRef(!1);return Ye.useEffect(()=>{let s=r.current;if(s)return Na(s)},[]),(0,it.jsx)($r,{as:wO,allowPinchZoom:!0,children:(0,it.jsx)(qR,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(e.onCloseAutoFocus,s=>{s.preventDefault(),n.current||o.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,s=>{let i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;n.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:V(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),RO=Ye.forwardRef((e,t)=>{let o=Fa(ai,e.__scopePopover),r=Ye.useRef(!1),a=Ye.useRef(!1);return(0,it.jsx)(qR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),qR=Ye.forwardRef((e,t)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Fa(ai,o),m=au(o);return Ma(),(0,it.jsx)(Gr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,it.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,it.jsx)(Da,{"data-state":jR(f.open),role:"dialog",id:f.contentId,...m,...d,ref:t,style:{...d.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)"}})})})}),WR="PopoverClose",$R=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Fa(WR,o);return(0,it.jsx)(H.button,{type:"button",...r,ref:t,onClick:V(e.onClick,()=>a.onOpenChange(!1))})});$R.displayName=WR;var IO="PopoverArrow",LO=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=au(o);return(0,it.jsx)(Ea,{...a,...r,ref:t})});LO.displayName=IO;function jR(e){return e?"open":"closed"}var KR=VR,XR=HR,YR=GR;var Sg=zR,ZR=$R;var yr=b(D()),TO=te("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none 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",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",default:"w-72 p-4",lg:"w-96 p-5"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"default",radius:"default",shadow:"default"}}),jr=KR,Kr=YR,hse=XR,br=QR.forwardRef(({className:e,variant:t,size:o,side:r,position:a,radius:n,shadow:s,backdrop:i=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,yr.jsxs)(yr.Fragment,{children:[u&&(0,yr.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,yr.jsx)(Sg,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:m=>{l||m.preventDefault()},className:S(TO({variant:t,size:o,side:r,position:a,radius:n,shadow:s}),i&&"backdrop-blur-md bg-opacity-80",e),...d})]}));br.displayName=Sg.displayName;var xse=ZR,MO=({className:e,...t})=>(0,yr.jsx)("div",{className:S("moonui-theme","my-2 h-px bg-border",e),...t});MO.displayName="PopoverSeparator";var kO=({className:e,...t})=>(0,yr.jsx)("div",{className:S("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});kO.displayName="PopoverHeader";var AO=({className:e,...t})=>(0,yr.jsx)("div",{className:S("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});AO.displayName="PopoverFooter";var su=b(A());var Yr=b(A(),1);var yt=b(A(),1);var Oa=b(D(),1),Rg="rovingFocusGroup.onEntryFocus",DO={bubbles:!1,cancelable:!0},nu="RovingFocusGroup",[Ig,JR,EO]=lr(nu),[NO,ni]=Re(nu,[EO]),[FO,OO]=NO(nu),eI=yt.forwardRef((e,t)=>(0,Oa.jsx)(Ig.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Oa.jsx)(Ig.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Oa.jsx)(_O,{...e,ref:t})})}));eI.displayName=nu;var _O=yt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:r,loop:a=!1,dir:n,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=yt.useRef(null),m=ee(t,f),p=So(n),[g,h]=Fe({prop:s,defaultProp:i??null,onChange:l,caller:nu}),[v,x]=yt.useState(!1),y=Te(u),R=JR(o),C=yt.useRef(!1),[w,I]=yt.useState(0);return yt.useEffect(()=>{let L=f.current;if(L)return L.addEventListener(Rg,y),()=>L.removeEventListener(Rg,y)},[y]),(0,Oa.jsx)(FO,{scope:o,orientation:r,dir:p,loop:a,currentTabStopId:g,onItemFocus:yt.useCallback(L=>h(L),[h]),onItemShiftTab:yt.useCallback(()=>x(!0),[]),onFocusableItemAdd:yt.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:yt.useCallback(()=>I(L=>L-1),[]),children:(0,Oa.jsx)(H.div,{tabIndex:v||w===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{C.current=!0}),onFocus:V(e.onFocus,L=>{let P=!C.current;if(L.target===L.currentTarget&&P&&!v){let T=new CustomEvent(Rg,DO);if(L.currentTarget.dispatchEvent(T),!T.defaultPrevented){let O=R().filter(E=>E.focusable),$=O.find(E=>E.active),W=O.find(E=>E.id===g),q=[$,W,...O].filter(Boolean).map(E=>E.ref.current);rI(q,c)}}C.current=!1}),onBlur:V(e.onBlur,()=>x(!1))})})}),tI="RovingFocusGroupItem",oI=yt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:n,children:s,...i}=e,l=Pe(),u=n||l,c=OO(tI,o),d=c.currentTabStopId===u,f=JR(o),{onFocusableItemAdd:m,onFocusableItemRemove:p,currentTabStopId:g}=c;return yt.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),(0,Oa.jsx)(Ig.ItemSlot,{scope:o,id:u,focusable:r,active:a,children:(0,Oa.jsx)(H.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:V(e.onMouseDown,h=>{r?c.onItemFocus(u):h.preventDefault()}),onFocus:V(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:V(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let v=HO(h,c.orientation,c.dir);if(v!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=f().filter(R=>R.focusable).map(R=>R.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();let R=y.indexOf(h.currentTarget);y=c.loop?UO(y,R+1):y.slice(R+1)}setTimeout(()=>rI(y))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:g!=null}):s})})});oI.displayName=tI;var VO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function BO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function HO(e,t,o){let r=BO(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return VO[r]}function rI(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function UO(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var Zd=eI,Qd=oI;var Xr=b(D(),1),Jd="Tabs",[GO,Ose]=Re(Jd,[ni]),nI=ni(),[zO,Lg]=GO(Jd),sI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:a,defaultValue:n,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,c=So(i),[d,f]=Fe({prop:r,onChange:a,defaultProp:n??"",caller:Jd});return(0,Xr.jsx)(zO,{scope:o,baseId:Pe(),value:d,onValueChange:f,orientation:s,dir:c,activationMode:l,children:(0,Xr.jsx)(H.div,{dir:c,"data-orientation":s,...u,ref:t})})});sI.displayName=Jd;var iI="TabsList",lI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,loop:r=!0,...a}=e,n=Lg(iI,o),s=nI(o);return(0,Xr.jsx)(Zd,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:r,children:(0,Xr.jsx)(H.div,{role:"tablist","aria-orientation":n.orientation,...a,ref:t})})});lI.displayName=iI;var uI="TabsTrigger",cI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,disabled:a=!1,...n}=e,s=Lg(uI,o),i=nI(o),l=mI(s.baseId,r),u=pI(s.baseId,r),c=r===s.value;return(0,Xr.jsx)(Qd,{asChild:!0,...i,focusable:!a,active:c,children:(0,Xr.jsx)(H.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:l,...n,ref:t,onMouseDown:V(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:V(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:V(e.onFocus,()=>{let d=s.activationMode!=="manual";!c&&!a&&d&&s.onValueChange(r)})})})});cI.displayName=uI;var dI="TabsContent",fI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,forceMount:a,children:n,...s}=e,i=Lg(dI,o),l=mI(i.baseId,r),u=pI(i.baseId,r),c=r===i.value,d=Yr.useRef(c);return Yr.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Xr.jsx)(Oe,{present:a||c,children:({present:f})=>(0,Xr.jsx)(H.div,{"data-state":c?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&n})})});fI.displayName=dI;function mI(e,t){return`${e}-trigger-${t}`}function pI(e,t){return`${e}-content-${t}`}var Pg=sI,Tg=lI,Mg=cI,kg=fI;var Zr=b(D()),ef=su.forwardRef(({vertical:e=!1,...t},o)=>(0,Zr.jsx)(Pg,{ref:o,className:S("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));ef.displayName=Pg.displayName;var WO=te("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-2 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1}}),tf=su.forwardRef(({className:e,variant:t,orientation:o,fullWidth:r,...a},n)=>(0,Zr.jsx)(Tg,{ref:n,className:S("moonui-theme",WO({variant:t,orientation:o,fullWidth:r,className:e})),...a}));tf.displayName=Tg.displayName;var $O=te("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),si=su.forwardRef(({className:e,variant:t,size:o,icon:r,iconPosition:a="left",badge:n,fadeTabs:s=!1,orientation:i,fullWidth:l,children:u,...c},d)=>(0,Zr.jsxs)(Mg,{ref:d,className:S("moonui-theme",$O({variant:t,size:o,orientation:i,fullWidth:l}),s&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&a==="left"&&(0,Zr.jsx)("span",{className:"mr-2",children:r}),u,r&&a==="right"&&(0,Zr.jsx)("span",{className:"ml-2",children:r}),n&&(0,Zr.jsx)("span",{className:"ml-2",children:n})]}));si.displayName=Mg.displayName;var ii=su.forwardRef(({className:e,animated:t=!1,...o},r)=>(0,Zr.jsx)(kg,{ref:r,className:S("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...o}));ii.displayName=kg.displayName;var _a=b(A());var Cr=b(D()),jO=te("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),KO=te("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),XO=te("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),YO=te("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),Qr=_a.forwardRef(({className:e,size:t,trackVariant:o,rangeVariant:r,thumbVariant:a,thumbSize:n,showValueLabel:s=!1,valueLabelFormat:i,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...m},p)=>{let[g,h]=_a.useState(u||c||[0]);_a.useEffect(()=>{u!==void 0&&h(u)},[u]);let v=T=>i?i(T):`${Math.round(T*100)/100}`,x=(T,O,$)=>(T-O)/($-O)*100,y=_a.useRef(null),R=m.min||0,C=m.max||100,w=m.step||1,I=T=>{let O=T.map($=>{if(w<1){let W=w.toString().split(".")[1]?.length||0;return Math.round($*Math.pow(10,W))/Math.pow(10,W)}return Math.round($)});h(O),d&&d(O)},L=T=>{if(f)return;let O=y.current;if(!O)return;let $=O.getBoundingClientRect(),W=(T.clientX-$.left)/$.width,N=R+W*(C-R),q=Math.round(N/w)*w,E=Math.max(R,Math.min(C,q)),G=[...g];G[0]=E,I(G)},P=T=>O=>{if(f)return;O.preventDefault();let $=N=>{let q=y.current;if(!q)return;let E=q.getBoundingClientRect(),G=(N.clientX-E.left)/E.width,M=R+G*(C-R),k=Math.round(M/w)*w,re=Math.max(R,Math.min(C,k)),Se=[...g];Se[T]=re,I(Se)},W=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",W)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",W)};return(0,Cr.jsxs)("div",{className:"w-full",ref:p,...m,children:[s&&(0,Cr.jsx)("div",{className:S("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?(0,Cr.jsx)("span",{children:v(g[0])}):(0,Cr.jsxs)("span",{children:[v(g[0])," - ",v(g[g.length-1])]})}),(0,Cr.jsxs)("div",{className:S("moonui-theme",jO({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Cr.jsx)("div",{ref:y,className:S(KO({variant:o||a||"default"})),onClick:L,children:(0,Cr.jsx)("div",{className:S(XO({variant:r||a||"primary"})),style:{left:"0%",width:`${x(g[0],R,C)}%`}})}),g.map((T,O)=>(0,Cr.jsx)("div",{className:S(YO({variant:a||"primary",size:n})),style:{left:`${x(T,R,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:n==="sm"?"-6px":n==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:P(O),"aria-label":`Thumb ${O+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":R,"aria-valuemax":C,"aria-valuenow":T,"aria-disabled":f},O))]})]})});Qr.displayName="Slider";var z=b(D()),gI=te("relative inline-flex items-center justify-center",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"default",shape:"square"}});function hI(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function xI(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function ZO(e){let t=hI(e);if(!t)return null;let o=t.r/255,r=t.g/255,a=t.b/255,n=Math.max(o,r,a),s=Math.min(o,r,a),i=0,l=0,u=(n+s)/2;if(n!==s){let c=n-s;switch(l=u>.5?c/(2-n-s):c/(n+s),n){case o:i=((r-a)/c+(r<a?6:0))/6;break;case r:i=((a-o)/c+2)/6;break;case a:i=((o-r)/c+4)/6;break}}return{h:Math.round(i*360),s:Math.round(l*100),l:Math.round(u*100)}}function QO(e,t,o){e=e/360,t=t/100,o=o/100;let r,a,n;if(t===0)r=a=n=o;else{let s=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),i=o<.5?o*(1+t):o+t-o*t,l=2*o-i;r=s(l,i,e+1/3),a=s(l,i,e),n=s(l,i,e-1/3)}return xI(Math.round(r*255),Math.round(a*255),Math.round(n*255))}var vI=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function Ag({className:e,size:t,shape:o,value:r="#000000",onChange:a,showInput:n=!0,showPresets:s=!0,presets:i=vI,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...m}){let[p,g]=Fo.useState(!1),[h,v]=Fo.useState(r),[x,y]=Fo.useState(100),[R,C]=Fo.useState(!1),[w,I]=Fo.useState(r),L=Fo.useMemo(()=>ZO(h)||{h:0,s:0,l:0},[h]),P=Fo.useMemo(()=>hI(h)||{r:0,g:0,b:0},[h]);Fo.useEffect(()=>{v(r),I(r)},[r]);let T=E=>{v(E),I(E),a?.(E)},O=(E,G)=>{let M={...L,[E]:G},k=QO(M.h,M.s,M.l);T(k)},$=(E,G)=>{let M={...P,[E]:G},k=xI(M.r,M.g,M.b);T(k)},W=E=>{let G=E.target.value;I(G),/^#[0-9A-F]{6}$/i.test(G)&&T(G)},N=async()=>{try{let E=h;u==="rgb"?E=`rgb(${P.r}, ${P.g}, ${P.b})`:u==="hsl"&&(E=`hsl(${L.h}, ${L.s}%, ${L.l}%)`),await navigator.clipboard.writeText(E),C(!0),setTimeout(()=>C(!1),2e3)}catch(E){console.error("Failed to copy:",E)}},q=()=>u==="rgb"?`rgb(${P.r}, ${P.g}, ${P.b})`:u==="hsl"?`hsl(${L.h}, ${L.s}%, ${L.l}%)`:h;return(0,z.jsxs)(jr,{open:p,onOpenChange:g,children:[(0,z.jsx)(Kr,{asChild:!0,children:(0,z.jsx)(Ve,{variant:"outline",className:S(gI({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:h},disabled:f,...m,children:(0,z.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,z.jsxs)(br,{className:"w-80",align:"start",sideOffset:8,children:[(0,z.jsxs)(ef,{defaultValue:"picker",className:"w-full",children:[(0,z.jsxs)(tf,{className:"grid w-full grid-cols-3",children:[(0,z.jsx)(si,{value:"picker",children:"Picker"}),(0,z.jsx)(si,{value:"sliders",children:"Sliders"}),(0,z.jsx)(si,{value:"input",children:"Input"})]}),(0,z.jsxs)(ii,{value:"picker",className:"space-y-4",children:[(0,z.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,z.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${L.h}, 100%, 50%))`}}),(0,z.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,z.jsx)(Ae.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:h,left:`${L.s/100*280-8}px`,top:`${(1-L.l/100)*192-8}px`}})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Hue"}),(0,z.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,z.jsx)(Qr,{value:[L.h],onValueChange:([E])=>O("h",E),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Opacity"}),(0,z.jsxs)("div",{className:"flex items-center gap-3",children:[(0,z.jsx)(Qr,{value:[x],onValueChange:([E])=>y(E),max:100,step:1,className:"flex-1"}),(0,z.jsxs)("span",{className:"text-sm w-10 text-right",children:[x,"%"]})]})]})]}),(0,z.jsxs)(ii,{value:"sliders",className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-3",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Red"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:P.r})]}),(0,z.jsx)(Qr,{value:[P.r],onValueChange:([E])=>$("r",E),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Green"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:P.g})]}),(0,z.jsx)(Qr,{value:[P.g],onValueChange:([E])=>$("g",E),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Blue"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:P.b})]}),(0,z.jsx)(Qr,{value:[P.b],onValueChange:([E])=>$("b",E),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,z.jsx)("div",{className:"pt-2 border-t",children:(0,z.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,z.jsxs)("p",{className:"font-medium",children:[L.h,"\xB0"]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,z.jsxs)("p",{className:"font-medium",children:[L.s,"%"]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,z.jsxs)("p",{className:"font-medium",children:[L.l,"%"]})]})]})})]}),(0,z.jsxs)(ii,{value:"input",className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Hex Color"}),(0,z.jsxs)("div",{className:"flex gap-2",children:[(0,z.jsx)(At,{value:w,onChange:W,placeholder:"#000000",className:"font-mono"}),(0,z.jsx)(Ve,{size:"icon",variant:"outline",onClick:()=>T(w),children:(0,z.jsx)(It,{className:"h-4 w-4"})})]})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"RGB Values"}),(0,z.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,z.jsx)(At,{type:"number",value:P.r,onChange:E=>$("r",parseInt(E.target.value)||0),min:0,max:255,className:"text-center"}),(0,z.jsx)(At,{type:"number",value:P.g,onChange:E=>$("g",parseInt(E.target.value)||0),min:0,max:255,className:"text-center"}),(0,z.jsx)(At,{type:"number",value:P.b,onChange:E=>$("b",parseInt(E.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,z.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,z.jsxs)("div",{className:"flex items-center gap-3",children:[(0,z.jsx)("div",{className:S("h-10 w-10 rounded border-2",gI({shape:o})),style:{backgroundColor:h}}),(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-sm font-medium",children:q()}),(0,z.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,z.jsx)(Ve,{size:"icon",variant:"ghost",onClick:N,className:"h-8 w-8",children:(0,z.jsx)(Fr,{mode:"wait",children:R?(0,z.jsx)(Ae.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,z.jsx)(It,{className:"h-4 w-4 text-green-600"})},"check"):(0,z.jsx)(Ae.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,z.jsx)(Fi,{className:"h-4 w-4"})},"copy")})})]}),s&&i.length>0&&(0,z.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,z.jsx)(ao,{children:"Preset Colors"}),(0,z.jsx)("div",{className:"grid grid-cols-10 gap-1",children:i.map(E=>(0,z.jsx)("button",{className:S("h-7 w-7 rounded border-2 transition-all hover:scale-110",h===E?"border-primary":"border-transparent"),style:{backgroundColor:E},onClick:()=>T(E)},E))})]})]})]})}function JO({value:e="#000000",onChange:t,colors:o=vI.slice(0,10),className:r,size:a="default"}){let n={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,z.jsx)("div",{className:S("moonui-theme","flex flex-wrap gap-2",r),children:o.map(s=>(0,z.jsx)("button",{className:S("rounded-full border-2 transition-all hover:scale-110",n[a],e===s?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:s},onClick:()=>t?.(s)},s))})}function e_({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,a]=Fo.useState(e),n=(s,i)=>{let l={...r,[s]:i};a(l),t?.(l)};return(0,z.jsxs)("div",{className:S("moonui-theme","space-y-4",o),children:[(0,z.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),(0,z.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Start Color"}),(0,z.jsx)(Ag,{value:r.start,onChange:s=>n("start",s),size:"sm"})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"End Color"}),(0,z.jsx)(Ag,{value:r.end,onChange:s=>n("end",s),size:"sm"})]})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Angle"}),(0,z.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),(0,z.jsx)(Qr,{value:[r.angle||90],onValueChange:([s])=>n("angle",s),max:360,step:1})]})]})}var Ba=b(A());var yI=1,t_=.9,o_=.8,r_=.17,Dg=.1,Eg=.999,a_=.9999,n_=.99,s_=/[\\\/_+.#"@\[\(\{&]/,i_=/[\\\/_+.#"@\[\(\{&]/g,l_=/[\s-]/,CI=/[\s-]/g;function Ng(e,t,o,r,a,n,s){if(n===t.length)return a===e.length?yI:n_;var i=`${a},${n}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(n),u=o.indexOf(l,a),c=0,d,f,m,p;u>=0;)d=Ng(e,t,o,r,u+1,n+1,s),d>c&&(u===a?d*=yI:s_.test(e.charAt(u-1))?(d*=o_,m=e.slice(a,u-1).match(i_),m&&a>0&&(d*=Math.pow(Eg,m.length))):l_.test(e.charAt(u-1))?(d*=t_,p=e.slice(a,u-1).match(CI),p&&a>0&&(d*=Math.pow(Eg,p.length))):(d*=r_,a>0&&(d*=Math.pow(Eg,u-a))),e.charAt(u)!==t.charAt(n)&&(d*=a_)),(d<Dg&&o.charAt(u-1)===r.charAt(n+1)||r.charAt(n+1)===r.charAt(n)&&o.charAt(u-1)!==r.charAt(n))&&(f=Ng(e,t,o,r,u+1,n+2,s),f*Dg>d&&(d=f*Dg)),d>c&&(c=d),u=o.indexOf(l,u+1);return s[i]=c,c}function bI(e){return e.toLowerCase().replace(CI," ")}function wI(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Ng(e,t,bI(e),bI(t),0,0,{})}var Ge=b(A(),1);var Be=b(D(),1),rf="Dialog",[SI,vie]=Re(rf),[u_,tr]=SI(rf),RI=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!0}=e,i=Ge.useRef(null),l=Ge.useRef(null),[u,c]=Fe({prop:r,defaultProp:a??!1,onChange:n,caller:rf});return(0,Be.jsx)(u_,{scope:t,triggerRef:i,contentRef:l,contentId:Pe(),titleId:Pe(),descriptionId:Pe(),open:u,onOpenChange:c,onOpenToggle:Ge.useCallback(()=>c(d=>!d),[c]),modal:s,children:o})};RI.displayName=rf;var II="DialogTrigger",LI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(II,o),n=ee(t,a.triggerRef);return(0,Be.jsx)(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":_g(a.open),...r,ref:n,onClick:V(e.onClick,a.onOpenToggle)})});LI.displayName=II;var Fg="DialogPortal",[c_,PI]=SI(Fg,{forceMount:void 0}),TI=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:a}=e,n=tr(Fg,t);return(0,Be.jsx)(c_,{scope:t,forceMount:o,children:Ge.Children.map(r,s=>(0,Be.jsx)(Oe,{present:o||n.open,children:(0,Be.jsx)(ho,{asChild:!0,container:a,children:s})}))})};TI.displayName=Fg;var of="DialogOverlay",MI=Ge.forwardRef((e,t)=>{let o=PI(of,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=tr(of,e.__scopeDialog);return n.modal?(0,Be.jsx)(Oe,{present:r||n.open,children:(0,Be.jsx)(f_,{...a,ref:t})}):null});MI.displayName=of;var d_=uo("DialogOverlay.RemoveScroll"),f_=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(of,o);return(0,Be.jsx)($r,{as:d_,allowPinchZoom:!0,shards:[a.contentRef],children:(0,Be.jsx)(H.div,{"data-state":_g(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Hn="DialogContent",kI=Ge.forwardRef((e,t)=>{let o=PI(Hn,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=tr(Hn,e.__scopeDialog);return(0,Be.jsx)(Oe,{present:r||n.open,children:n.modal?(0,Be.jsx)(m_,{...a,ref:t}):(0,Be.jsx)(p_,{...a,ref:t})})});kI.displayName=Hn;var m_=Ge.forwardRef((e,t)=>{let o=tr(Hn,e.__scopeDialog),r=Ge.useRef(null),a=ee(t,o.contentRef,r);return Ge.useEffect(()=>{let n=r.current;if(n)return Na(n)},[]),(0,Be.jsx)(AI,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,n=>{let s=n.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&n.preventDefault()}),onFocusOutside:V(e.onFocusOutside,n=>n.preventDefault())})}),p_=Ge.forwardRef((e,t)=>{let o=tr(Hn,e.__scopeDialog),r=Ge.useRef(!1),a=Ge.useRef(!1);return(0,Be.jsx)(AI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),AI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,...s}=e,i=tr(Hn,o),l=Ge.useRef(null),u=ee(t,l);return Ma(),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Gr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,Be.jsx)(ko,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":_g(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(g_,{titleId:i.titleId}),(0,Be.jsx)(x_,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Og="DialogTitle",DI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(Og,o);return(0,Be.jsx)(H.h2,{id:a.titleId,...r,ref:t})});DI.displayName=Og;var EI="DialogDescription",NI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(EI,o);return(0,Be.jsx)(H.p,{id:a.descriptionId,...r,ref:t})});NI.displayName=EI;var FI="DialogClose",OI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(FI,o);return(0,Be.jsx)(H.button,{type:"button",...r,ref:t,onClick:V(e.onClick,()=>a.onOpenChange(!1))})});OI.displayName=FI;function _g(e){return e?"open":"closed"}var _I="DialogTitleWarning",[yie,VI]=lv(_I,{contentName:Hn,titleName:Og,docsSlug:"dialog"}),g_=({titleId:e})=>{let t=VI(_I),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
102
51
 
103
52
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
104
53
 
105
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ke.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},d7="DialogDescriptionWarning",f7=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${KO(d7).contentName}}.`;return Ke.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},XO=NO,YO=OO,QO=VO,sb=BO,lb=HO,ub=zO,cb=GO,db=qO;var wt=b(M()),fb=XO,m7=YO,g7=QO,h7=db,v7=J("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),ZO=mc.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,wt.jsx)(sb,{ref:n,className:I("moonui-theme",v7({variant:t,animation:r}),e),...o}));ZO.displayName=sb.displayName;var y7=J("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",default:"max-w-lg p-6",md:"max-w-md p-6",lg:"max-w-2xl p-7",xl:"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"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",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"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",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default",position:"default"}}),Ov=mc.forwardRef(({className:e,children:t,variant:r,size:o,radius:n,animation:a,position:i,overlayVariant:s="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:d,icon:f,loading:p=!1,success:h=!1,onClose:m,...x},v)=>{let g=()=>{m&&m()};return(0,wt.jsxs)(g7,{children:[(0,wt.jsx)(ZO,{variant:s,animation:l,onClick:u?void 0:g}),(0,wt.jsxs)(lb,{ref:v,onEscapeKeyDown:u?void 0:g,onInteractOutside:u?void 0:g,className:I(y7({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",h&&"border-success/40",e),...x,children:[(c||d||f)&&(0,wt.jsxs)(pb,{className:"flex gap-4",children:[(f||p||h)&&(0,wt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,wt.jsx)(Qt,{className:"h-5 w-5 animate-spin text-primary"}),h&&(0,wt.jsx)(sr,{className:"h-5 w-5 text-success"}),!p&&!h&&f&&(0,wt.jsx)("span",{className:"text-primary",children:f})]}),(0,wt.jsxs)("div",{className:"flex-1",children:[c&&(0,wt.jsx)(cp,{children:c}),d&&(0,wt.jsx)(mb,{children:d})]})]}),t,!u&&(0,wt.jsxs)(db,{onClick:g,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[(0,wt.jsx)(uo,{className:"h-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Ov.displayName=lb.displayName;var pb=({className:e,...t})=>(0,wt.jsx)("div",{className:I("flex flex-col space-y-2 text-center sm:text-left",e),...t});pb.displayName="DialogHeader";var JO=({className:e,...t})=>(0,wt.jsx)("div",{className:I("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});JO.displayName="DialogFooter";var cp=mc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)(ub,{ref:r,className:I("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));cp.displayName=ub.displayName;var mb=mc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)(cb,{ref:r,className:I("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));mb.displayName=cb.displayName;var x7=mc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)("form",{ref:r,className:I("moonui-theme","flex flex-col gap-4",e),...t}));x7.displayName="DialogForm";var vr=b(M()),w7=J("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",default:"min-h-[300px]",lg:"min-h-[400px]"}},defaultVariants:{variant:"default",size:"default"}}),gb=qi.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,vr.jsx)(Dr,{ref:n,className:I("moonui-theme",w7({variant:t,size:r}),e),...o}));gb.displayName=Dr.displayName;var C7=({children:e,commandClassName:t,...r})=>(0,vr.jsx)(fb,{...r,children:(0,vr.jsxs)(Ov,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,vr.jsx)(cp,{className:"sr-only",children:"Command Menu"}),(0,vr.jsx)(gb,{className:I("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",t),children:e})]})}),eF=qi.forwardRef(({className:e,...t},r)=>(0,vr.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,vr.jsx)(Ls,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,vr.jsx)(Dr.Input,{ref:r,className:I("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));eF.displayName=Dr.Input.displayName;var tF=qi.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Dr.List,{ref:r,className:I("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));tF.displayName=Dr.List.displayName;var rF=qi.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Dr.Empty,{ref:r,className:I("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));rF.displayName=Dr.Empty.displayName;var oF=qi.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Dr.Group,{ref:r,className:I("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));oF.displayName=Dr.Group.displayName;var nF=qi.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Dr.Separator,{ref:r,className:I("moonui-theme","-mx-1 h-px bg-border",e),...t}));nF.displayName=Dr.Separator.displayName;var aF=qi.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Dr.Item,{ref:r,className:I("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));aF.displayName=Dr.Item.displayName;var iF=({className:e,...t})=>(0,vr.jsx)("span",{className:I("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});iF.displayName="CommandShortcut";var Db=b(E());var pp=b(Pe(),1);function $i(e,t){return typeof e=="function"?e(t):e}function ho(e,t){return r=>{t.setState(o=>({...o,[e]:$i(r,o[e])}))}}function Hv(e){return e instanceof Function}function S7(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function b7(e,t){let r=[],o=n=>{n.forEach(a=>{r.push(a);let i=t(a);i!=null&&i.length&&o(i)})};return o(e),r}function se(e,t,r){let o=[],n;return a=>{let i;r.key&&r.debug&&(i=Date.now());let s=e(a);if(!(s.length!==o.length||s.some((c,d)=>o[d]!==c)))return n;o=s;let u;if(r.key&&r.debug&&(u=Date.now()),n=t(...s),r==null||r.onChange==null||r.onChange(n),r.key&&r.debug&&r!=null&&r.debug()){let c=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,p=(h,m)=>{for(h=String(h);h.length<m;)h=" "+h;return h};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
54
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ge.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},h_="DialogDescriptionWarning",x_=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VI(h_).contentName}}.`;return Ge.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},af=RI,BI=LI,nf=TI,iu=MI,lu=kI,Vg=DI,Bg=NI,Hg=OI;var Y=b(A(),1);var uu='[cmdk-group=""]',Ug='[cmdk-group-items=""]',v_='[cmdk-group-heading=""]',GI='[cmdk-item=""]',UI=`${GI}:not([aria-disabled="true"])`,Gg="cmdk-item-select",li="data-value",y_=(e,t,o)=>wI(e,t,o),zI=Y.createContext(void 0),cu=()=>Y.useContext(zI),qI=Y.createContext(void 0),zg=()=>Y.useContext(qI),WI=Y.createContext(void 0),$I=Y.forwardRef((e,t)=>{let o=ui(()=>{var F,j;return{search:"",value:(j=(F=e.value)!=null?F:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ui(()=>new Set),a=ui(()=>new Map),n=ui(()=>new Map),s=ui(()=>new Set),i=jI(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:m,loop:p,disablePointerSelection:g=!1,vimBindings:h=!0,...v}=e,x=Pe(),y=Pe(),R=Pe(),C=Y.useRef(null),w=k_();Un(()=>{if(c!==void 0){let F=c.trim();o.current.value=F,I.emit()}},[c]),Un(()=>{w(6,W)},[]);let I=Y.useMemo(()=>({subscribe:F=>(s.current.add(F),()=>s.current.delete(F)),snapshot:()=>o.current,setState:(F,j,Z)=>{var X,ue,_,ce;if(!Object.is(o.current[F],j)){if(o.current[F]=j,F==="search")$(),T(),w(1,O);else if(F==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(R);he?he.focus():(X=document.getElementById(x))==null||X.focus()}if(w(7,()=>{var he;o.current.selectedItemId=(he=N())==null?void 0:he.id,I.emit()}),Z||w(5,W),((ue=i.current)==null?void 0:ue.value)!==void 0){let he=j??"";(ce=(_=i.current).onValueChange)==null||ce.call(_,he);return}}I.emit()}},emit:()=>{s.current.forEach(F=>F())}}),[]),L=Y.useMemo(()=>({value:(F,j,Z)=>{var X;j!==((X=n.current.get(F))==null?void 0:X.value)&&(n.current.set(F,{value:j,keywords:Z}),o.current.filtered.items.set(F,P(j,Z)),w(2,()=>{T(),I.emit()}))},item:(F,j)=>(r.current.add(F),j&&(a.current.has(j)?a.current.get(j).add(F):a.current.set(j,new Set([F]))),w(3,()=>{$(),T(),o.current.value||O(),I.emit()}),()=>{n.current.delete(F),r.current.delete(F),o.current.filtered.items.delete(F);let Z=N();w(4,()=>{$(),Z?.getAttribute("id")===F&&O(),I.emit()})}),group:F=>(a.current.has(F)||a.current.set(F,new Set),()=>{n.current.delete(F),a.current.delete(F)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:R,labelId:y,listInnerRef:C}),[]);function P(F,j){var Z,X;let ue=(X=(Z=i.current)==null?void 0:Z.filter)!=null?X:y_;return F?ue(F,o.current.search,j):0}function T(){if(!o.current.search||i.current.shouldFilter===!1)return;let F=o.current.filtered.items,j=[];o.current.filtered.groups.forEach(X=>{let ue=a.current.get(X),_=0;ue.forEach(ce=>{let he=F.get(ce);_=Math.max(he,_)}),j.push([X,_])});let Z=C.current;q().sort((X,ue)=>{var _,ce;let he=X.getAttribute("id"),we=ue.getAttribute("id");return((_=F.get(we))!=null?_:0)-((ce=F.get(he))!=null?ce:0)}).forEach(X=>{let ue=X.closest(Ug);ue?ue.appendChild(X.parentElement===ue?X:X.closest(`${Ug} > *`)):Z.appendChild(X.parentElement===Z?X:X.closest(`${Ug} > *`))}),j.sort((X,ue)=>ue[1]-X[1]).forEach(X=>{var ue;let _=(ue=C.current)==null?void 0:ue.querySelector(`${uu}[${li}="${encodeURIComponent(X[0])}"]`);_?.parentElement.appendChild(_)})}function O(){let F=q().find(Z=>Z.getAttribute("aria-disabled")!=="true"),j=F?.getAttribute(li);I.setState("value",j||void 0)}function $(){var F,j,Z,X;if(!o.current.search||i.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let ue=0;for(let _ of r.current){let ce=(j=(F=n.current.get(_))==null?void 0:F.value)!=null?j:"",he=(X=(Z=n.current.get(_))==null?void 0:Z.keywords)!=null?X:[],we=P(ce,he);o.current.filtered.items.set(_,we),we>0&&ue++}for(let[_,ce]of a.current)for(let he of ce)if(o.current.filtered.items.get(he)>0){o.current.filtered.groups.add(_);break}o.current.filtered.count=ue}function W(){var F,j,Z;let X=N();X&&(((F=X.parentElement)==null?void 0:F.firstChild)===X&&((Z=(j=X.closest(uu))==null?void 0:j.querySelector(v_))==null||Z.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function N(){var F;return(F=C.current)==null?void 0:F.querySelector(`${GI}[aria-selected="true"]`)}function q(){var F;return Array.from(((F=C.current)==null?void 0:F.querySelectorAll(UI))||[])}function E(F){let j=q()[F];j&&I.setState("value",j.getAttribute(li))}function G(F){var j;let Z=N(),X=q(),ue=X.findIndex(ce=>ce===Z),_=X[ue+F];(j=i.current)!=null&&j.loop&&(_=ue+F<0?X[X.length-1]:ue+F===X.length?X[0]:X[ue+F]),_&&I.setState("value",_.getAttribute(li))}function M(F){let j=N(),Z=j?.closest(uu),X;for(;Z&&!X;)Z=F>0?T_(Z,uu):M_(Z,uu),X=Z?.querySelector(UI);X?I.setState("value",X.getAttribute(li)):G(F)}let k=()=>E(q().length-1),re=F=>{F.preventDefault(),F.metaKey?k():F.altKey?M(1):G(1)},Se=F=>{F.preventDefault(),F.metaKey?E(0):F.altKey?M(-1):G(-1)};return Y.createElement(H.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:F=>{var j;(j=v.onKeyDown)==null||j.call(v,F);let Z=F.nativeEvent.isComposing||F.keyCode===229;if(!(F.defaultPrevented||Z))switch(F.key){case"n":case"j":{h&&F.ctrlKey&&re(F);break}case"ArrowDown":{re(F);break}case"p":case"k":{h&&F.ctrlKey&&Se(F);break}case"ArrowUp":{Se(F);break}case"Home":{F.preventDefault(),E(0);break}case"End":{F.preventDefault(),k();break}case"Enter":{F.preventDefault();let X=N();if(X){let ue=new Event(Gg);X.dispatchEvent(ue)}}}}},Y.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:D_},l),sf(e,F=>Y.createElement(qI.Provider,{value:I},Y.createElement(zI.Provider,{value:L},F))))}),b_=Y.forwardRef((e,t)=>{var o,r;let a=Pe(),n=Y.useRef(null),s=Y.useContext(WI),i=cu(),l=jI(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:s?.forceMount;Un(()=>{if(!u)return i.item(a,s?.id)},[u]);let c=KI(a,n,[e.value,e.children,n],e.keywords),d=zg(),f=Va(w=>w.value&&w.value===c.current),m=Va(w=>u||i.filter()===!1?!0:w.search?w.filtered.items.get(a)>0:!0);Y.useEffect(()=>{let w=n.current;if(!(!w||e.disabled))return w.addEventListener(Gg,p),()=>w.removeEventListener(Gg,p)},[m,e.onSelect,e.disabled]);function p(){var w,I;g(),(I=(w=l.current).onSelect)==null||I.call(w,c.current)}function g(){d.setState("value",c.current,!0)}if(!m)return null;let{disabled:h,value:v,onSelect:x,forceMount:y,keywords:R,...C}=e;return Y.createElement(H.div,{ref:lo(n,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!f,"data-disabled":!!h,"data-selected":!!f,onPointerMove:h||i.getDisablePointerSelection()?void 0:g,onClick:h?void 0:p},e.children)}),C_=Y.forwardRef((e,t)=>{let{heading:o,children:r,forceMount:a,...n}=e,s=Pe(),i=Y.useRef(null),l=Y.useRef(null),u=Pe(),c=cu(),d=Va(m=>a||c.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);Un(()=>c.group(s),[]),KI(s,i,[e.value,e.heading,l]);let f=Y.useMemo(()=>({id:s,forceMount:a}),[a]);return Y.createElement(H.div,{ref:lo(i,t),...n,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},o&&Y.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),sf(e,m=>Y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},Y.createElement(WI.Provider,{value:f},m))))}),w_=Y.forwardRef((e,t)=>{let{alwaysRender:o,...r}=e,a=Y.useRef(null),n=Va(s=>!s.search);return!o&&!n?null:Y.createElement(H.div,{ref:lo(a,t),...r,"cmdk-separator":"",role:"separator"})}),S_=Y.forwardRef((e,t)=>{let{onValueChange:o,...r}=e,a=e.value!=null,n=zg(),s=Va(u=>u.search),i=Va(u=>u.selectedItemId),l=cu();return Y.useEffect(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),Y.createElement(H.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:a?e.value:s,onChange:u=>{a||n.setState("search",u.target.value),o?.(u.target.value)}})}),R_=Y.forwardRef((e,t)=>{let{children:o,label:r="Suggestions",...a}=e,n=Y.useRef(null),s=Y.useRef(null),i=Va(u=>u.selectedItemId),l=cu();return Y.useEffect(()=>{if(s.current&&n.current){let u=s.current,c=n.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let m=u.offsetHeight;c.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),Y.createElement(H.div,{ref:lo(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},sf(e,u=>Y.createElement("div",{ref:lo(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),I_=Y.forwardRef((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:a,contentClassName:n,container:s,...i}=e;return Y.createElement(af,{open:o,onOpenChange:r},Y.createElement(nf,{container:s},Y.createElement(iu,{"cmdk-overlay":"",className:a}),Y.createElement(lu,{"aria-label":e.label,"cmdk-dialog":"",className:n},Y.createElement($I,{ref:t,...i}))))}),L_=Y.forwardRef((e,t)=>Va(o=>o.filtered.count===0)?Y.createElement(H.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),P_=Y.forwardRef((e,t)=>{let{progress:o,children:r,label:a="Loading...",...n}=e;return Y.createElement(H.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},sf(e,s=>Y.createElement("div",{"aria-hidden":!0},s)))}),Wt=Object.assign($I,{List:R_,Item:b_,Input:S_,Group:C_,Separator:w_,Dialog:I_,Empty:L_,Loading:P_});function T_(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function M_(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function jI(e){let t=Y.useRef(e);return Un(()=>{t.current=e}),t}var Un=typeof window>"u"?Y.useEffect:Y.useLayoutEffect;function ui(e){let t=Y.useRef();return t.current===void 0&&(t.current=e()),t}function Va(e){let t=zg(),o=()=>e(t.snapshot());return Y.useSyncExternalStore(t.subscribe,o,o)}function KI(e,t,o,r=[]){let a=Y.useRef(),n=cu();return Un(()=>{var s;let i=(()=>{var u;for(let c of o){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():a.current}})(),l=r.map(u=>u.trim());n.value(e,i,l),(s=t.current)==null||s.setAttribute(li,i),a.current=i}),a}var k_=()=>{let[e,t]=Y.useState(),o=ui(()=>new Map);return Un(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,a)=>{o.current.set(r,a),t({})}};function A_(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function sf({asChild:e,children:t},o){return e&&Y.isValidElement(t)?Y.cloneElement(A_(t),{ref:t.ref},o(t.props.children)):o(t)}var D_={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var ci=b(A());var rt=b(D()),qg=af,E_=BI,N_=nf,F_=Hg,O_=te("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),XI=ci.forwardRef(({className:e,variant:t,animation:o,...r},a)=>(0,rt.jsx)(iu,{ref:a,className:S("moonui-theme",O_({variant:t,animation:o}),e),...r}));XI.displayName=iu.displayName;var __=te("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",default:"max-w-lg p-6",md:"max-w-md p-6",lg:"max-w-2xl p-7",xl:"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"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",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"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",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default",position:"default"}}),lf=ci.forwardRef(({className:e,children:t,variant:o,size:r,radius:a,animation:n,position:s,overlayVariant:i="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:d,icon:f,loading:m=!1,success:p=!1,onClose:g,...h},v)=>{let x=()=>{g&&g()};return(0,rt.jsxs)(N_,{children:[(0,rt.jsx)(XI,{variant:i,animation:l,onClick:u?void 0:x}),(0,rt.jsxs)(lu,{ref:v,onEscapeKeyDown:u?void 0:x,onInteractOutside:u?void 0:x,className:S(__({variant:o,size:r,radius:a,animation:n,position:s}),"outline-none",m&&"pointer-events-none",p&&"border-success/40",e),...h,children:[(c||d||f)&&(0,rt.jsxs)(Wg,{className:"flex gap-4",children:[(f||m||p)&&(0,rt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[m&&(0,rt.jsx)(St,{className:"h-5 w-5 animate-spin text-primary"}),p&&(0,rt.jsx)(It,{className:"h-5 w-5 text-success"}),!m&&!p&&f&&(0,rt.jsx)("span",{className:"text-primary",children:f})]}),(0,rt.jsxs)("div",{className:"flex-1",children:[c&&(0,rt.jsx)(du,{children:c}),d&&(0,rt.jsx)($g,{children:d})]})]}),t,!u&&(0,rt.jsxs)(Hg,{onClick:x,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[(0,rt.jsx)(co,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});lf.displayName=lu.displayName;var Wg=({className:e,...t})=>(0,rt.jsx)("div",{className:S("flex flex-col space-y-2 text-center sm:text-left",e),...t});Wg.displayName="DialogHeader";var YI=({className:e,...t})=>(0,rt.jsx)("div",{className:S("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});YI.displayName="DialogFooter";var du=ci.forwardRef(({className:e,...t},o)=>(0,rt.jsx)(Vg,{ref:o,className:S("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));du.displayName=Vg.displayName;var $g=ci.forwardRef(({className:e,...t},o)=>(0,rt.jsx)(Bg,{ref:o,className:S("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));$g.displayName=Bg.displayName;var V_=ci.forwardRef(({className:e,...t},o)=>(0,rt.jsx)("form",{ref:o,className:S("moonui-theme","flex flex-col gap-4",e),...t}));V_.displayName="DialogForm";var Et=b(D()),B_=te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",default:"min-h-[300px]",lg:"min-h-[400px]"}},defaultVariants:{variant:"default",size:"default"}}),jg=Ba.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,Et.jsx)(Wt,{ref:a,className:S("moonui-theme",B_({variant:t,size:o}),e),...r}));jg.displayName=Wt.displayName;var H_=({children:e,commandClassName:t,...o})=>(0,Et.jsx)(qg,{...o,children:(0,Et.jsxs)(lf,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Et.jsx)(du,{className:"sr-only",children:"Command Menu"}),(0,Et.jsx)(jg,{className:S("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",t),children:e})]})}),ZI=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Et.jsx)(rn,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Et.jsx)(Wt.Input,{ref:o,className:S("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ZI.displayName=Wt.Input.displayName;var QI=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.List,{ref:o,className:S("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));QI.displayName=Wt.List.displayName;var JI=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Empty,{ref:o,className:S("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));JI.displayName=Wt.Empty.displayName;var eL=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Group,{ref:o,className:S("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));eL.displayName=Wt.Group.displayName;var tL=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Separator,{ref:o,className:S("moonui-theme","-mx-1 h-px bg-border",e),...t}));tL.displayName=Wt.Separator.displayName;var oL=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Item,{ref:o,className:S("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));oL.displayName=Wt.Item.displayName;var rL=({className:e,...t})=>(0,Et.jsx)("span",{className:S("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});rL.displayName="CommandShortcut";var dh=b(A());var pu=b(A(),1);function Ha(e,t){return typeof e=="function"?e(t):e}function xo(e,t){return o=>{t.setState(r=>({...r,[e]:Ha(o,r[e])}))}}function ff(e){return e instanceof Function}function U_(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function G_(e,t){let o=[],r=a=>{a.forEach(n=>{o.push(n);let s=t(n);s!=null&&s.length&&r(s)})};return r(e),o}function ie(e,t,o){let r=[],a;return n=>{let s;o.key&&o.debug&&(s=Date.now());let i=e(n);if(!(i.length!==r.length||i.some((c,d)=>r[d]!==c)))return a;r=i;let u;if(o.key&&o.debug&&(u=Date.now()),a=t(...i),o==null||o.onChange==null||o.onChange(a),o.key&&o.debug&&o!=null&&o.debug()){let c=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,m=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c\u23F1 ${m(d,5)} /${m(c,5)} ms`,`
106
55
  font-size: .6rem;
107
56
  font-weight: bold;
108
- color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,r?.key)}return n}}function le(e,t,r,o){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:o}}function R7(e,t,r,o){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(o),renderValue:n,getContext:se(()=>[e,r,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),le(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,r,t,e)},{}),a}function L7(e,t,r,o){var n,a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=(n=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?n:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=f=>{let p=f;for(let m of l.split(".")){var h;p=(h=p)==null?void 0:h[m]}return p}:c=f=>f[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:o,depth:r,columnDef:s,columns:[],getFlatColumns:se(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},le(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:se(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let h=d.columns.flatMap(m=>m.getLeafColumns());return f(h)}return[d]},le(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var yr="debugHeaders";function sF(e,t,r){var o;let a={id:(o=r.id)!=null?o:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}var I7={createTable:e=>{e.getHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>{var a,i;let s=(a=o?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=r.filter(d=>!(o!=null&&o.includes(d.id))&&!(n!=null&&n.includes(d.id)));return Fv(t,[...s,...u,...l],e)},le(e.options,yr,"getHeaderGroups")),e.getCenterHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>(r=r.filter(a=>!(o!=null&&o.includes(a.id))&&!(n!=null&&n.includes(a.id))),Fv(t,r,e,"center")),le(e.options,yr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Fv(t,a,e,"left")},le(e.options,yr,"getLeftHeaderGroups")),e.getRightHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Fv(t,a,e,"right")},le(e.options,yr,"getRightHeaderGroups")),e.getFooterGroups=se(()=>[e.getHeaderGroups()],t=>[...t].reverse(),le(e.options,yr,"getFooterGroups")),e.getLeftFooterGroups=se(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),le(e.options,yr,"getLeftFooterGroups")),e.getCenterFooterGroups=se(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),le(e.options,yr,"getCenterFooterGroups")),e.getRightFooterGroups=se(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),le(e.options,yr,"getRightFooterGroups")),e.getFlatHeaders=se(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,yr,"getFlatHeaders")),e.getLeftFlatHeaders=se(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,yr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=se(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,yr,"getCenterFlatHeaders")),e.getRightFlatHeaders=se(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,yr,"getRightFlatHeaders")),e.getCenterLeafHeaders=se(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),le(e.options,yr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=se(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),le(e.options,yr,"getLeftLeafHeaders")),e.getRightLeafHeaders=se(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),le(e.options,yr,"getRightLeafHeaders")),e.getLeafHeaders=se(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,o)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=r[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=o[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},le(e.options,yr,"getLeafHeaders"))}};function Fv(e,t,r,o){var n,a;let i=0,s=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(h=>h.getIsVisible()).forEach(h=>{var m;(m=h.columns)!=null&&m.length&&s(h.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let h={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(x=>{let v=[...m].reverse()[0],g=x.column.depth===h.depth,y,w=!1;if(g&&x.column.parent?y=x.column.parent:(y=x.column,w=!0),v&&v?.column===y)v.subHeaders.push(x);else{let C=sF(r,y,{id:[o,p,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${m.filter(R=>R.column===y).length}`:void 0,depth:p,index:m.length});C.subHeaders.push(x),m.push(C)}h.headers.push(x),x.headerGroup=h}),l.push(h),p>0&&u(m,p-1)},c=t.map((f,p)=>sF(r,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(h=>h.column.getIsVisible()).map(h=>{let m=0,x=0,v=[0];h.subHeaders&&h.subHeaders.length?(v=[],d(h.subHeaders).forEach(y=>{let{colSpan:w,rowSpan:C}=y;m+=w,v.push(C)})):m=1;let g=Math.min(...v);return x=x+g,h.colSpan=m,h.rowSpan=x,{colSpan:m,rowSpan:x}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var Tb=(e,t,r,o,n,a,i)=>{let s={id:t,index:o,original:r,depth:n,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,o),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,o),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>b7(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:se(()=>[e.getAllLeafColumns()],l=>l.map(u=>R7(e,s,u,u.id)),le(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:se(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),le(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},P7={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},uF=(e,t,r)=>{var o,n;let a=r==null||(o=r.toString())==null?void 0:o.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};uF.autoRemove=e=>Sn(e);var cF=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};cF.autoRemove=e=>Sn(e);var dF=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};dF.autoRemove=e=>Sn(e);var fF=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};fF.autoRemove=e=>Sn(e);var pF=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});pF.autoRemove=e=>Sn(e)||!(e!=null&&e.length);var mF=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});mF.autoRemove=e=>Sn(e)||!(e!=null&&e.length);var gF=(e,t,r)=>e.getValue(t)===r;gF.autoRemove=e=>Sn(e);var hF=(e,t,r)=>e.getValue(t)==r;hF.autoRemove=e=>Sn(e);var kb=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};kb.resolveFilterValue=e=>{let[t,r]=e,o=typeof t!="number"?parseFloat(t):t,n=typeof r!="number"?parseFloat(r):r,a=t===null||Number.isNaN(o)?-1/0:o,i=r===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};kb.autoRemove=e=>Sn(e)||Sn(e[0])&&Sn(e[1]);var Ba={includesString:uF,includesStringSensitive:cF,equalsString:dF,arrIncludes:fF,arrIncludesAll:pF,arrIncludesSome:mF,equals:gF,weakEquals:hF,inNumberRange:kb};function Sn(e){return e==null||e===""}var T7={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:ho("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);return typeof o=="string"?Ba.includesString:typeof o=="number"?Ba.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ba.equals:Array.isArray(o)?Ba.arrIncludes:Ba.weakEquals},e.getFilterFn=()=>{var r,o;return Hv(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?r:Ba[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,o,n;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(o=>o.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,o;return(r=(o=t.getState().columnFilters)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(o=>{let n=e.getFilterFn(),a=o?.find(c=>c.id===e.id),i=$i(r,a?a.value:void 0);if(lF(n,i,e)){var s;return(s=o?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){var u;return(u=o?.map(c=>c.id===e.id?l:c))!=null?u:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),o=n=>{var a;return(a=$i(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(lF(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var r,o;e.setColumnFilters(t?[]:(r=(o=e.initialState)==null?void 0:o.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function lF(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var k7=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),M7=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},E7=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},A7=(e,t,r)=>{let o,n;return r.forEach(a=>{let i=a.getValue(e);i!=null&&(o===void 0?i>=i&&(o=n=i):(o>i&&(o=i),n<i&&(n=i)))}),[o,n]},D7=(e,t)=>{let r=0,o=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++r,o+=a)}),r)return o/r},N7=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!S7(r))return;if(r.length===1)return r[0];let o=Math.floor(r.length/2),n=r.sort((a,i)=>a-i);return r.length%2!==0?n[o]:(n[o-1]+n[o])/2},_7=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),O7=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,F7=(e,t)=>t.length,hb={sum:k7,min:M7,max:E7,extent:A7,mean:D7,median:N7,unique:_7,uniqueCount:O7,count:F7},V7={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:ho("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(o=>o!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,o;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((o=t.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);if(typeof o=="number")return hb.sum;if(Object.prototype.toString.call(o)==="[object Date]")return hb.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return Hv(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?r:hb[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,o;e.setGrouping(t?[]:(r=(o=e.initialState)==null?void 0:o.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let o=t.getColumn(r);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[r]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=r.subRows)!=null&&n.length)}}};function B7(e,t,r){if(!(t!=null&&t.length)||!r)return e;let o=e.filter(a=>!t.includes(a.id));return r==="remove"?o:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...o]}var H7={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ho("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=se(r=>[fp(t,r)],r=>r.findIndex(o=>o.id===e.id),le(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=fp(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=fp(t,r);return((o=n[n.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=se(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,o)=>n=>{let a=[];if(!(t!=null&&t.length))a=n;else{let i=[...t],s=[...n];for(;s.length&&i.length;){let l=i.shift(),u=s.findIndex(c=>c.id===l);u>-1&&a.push(s.splice(u,1)[0])}a=[...a,...s]}return B7(a,r,o)},le(e.options,"debugTable","_getOrderColumnsFn"))}},vb=()=>({left:[],right:[]}),U7={getInitialState:e=>({columnPinning:vb(),...e}),getDefaultOptions:e=>({onColumnPinningChange:ho("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{let o=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(r==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(o!=null&&o.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(o!=null&&o.includes(d))),...o]}}if(r==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(o!=null&&o.includes(d))),...o],right:((c=n?.right)!=null?c:[]).filter(d=>!(o!=null&&o.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(o!=null&&o.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(o!=null&&o.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var n,a,i;return((n=o.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(s=>s.id),{left:o,right:n}=t.getState().columnPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();return n?(r=(o=t.getState().columnPinning)==null||(o=o[n])==null?void 0:o.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,o,n)=>{let a=[...o??[],...n??[]];return r.filter(i=>!a.includes(i.column.id))},le(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,o)=>(o??[]).map(a=>r.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),le(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,o)=>(o??[]).map(a=>r.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),le(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,o;return e.setColumnPinning(t?vb():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:vb())},e.getIsSomeColumnsPinned=t=>{var r;let o=e.getState().columnPinning;if(!t){var n,a;return!!((n=o.left)!=null&&n.length||(a=o.right)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e.getLeftLeafColumns=se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),le(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),le(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o)=>{let n=[...r??[],...o??[]];return t.filter(a=>!n.includes(a.id))},le(e.options,"debugColumns","getCenterLeafColumns"))}};function z7(e){return e||(typeof document<"u"?document:null)}var Vv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yb=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),W7={getDefaultColumnDef:()=>Vv,getInitialState:e=>({columnSizing:{},columnSizingInfo:yb(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ho("columnSizing",e),onColumnSizingInfoChange:ho("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,o,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:Vv.minSize,(o=a??e.columnDef.size)!=null?o:Vv.size),(n=e.columnDef.maxSize)!=null?n:Vv.maxSize)},e.getStart=se(r=>[r,fp(t,r),t.getState().columnSizing],(r,o)=>o.slice(0,e.getIndex(r)).reduce((n,a)=>n+a.getSize(),0),le(t.options,"debugColumns","getStart")),e.getAfter=se(r=>[r,fp(t,r),t.getState().columnSizing],(r,o)=>o.slice(e.getIndex(r)+1).reduce((n,a)=>n+a.getSize(),0),le(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:o,...n}=r;return n})},e.getCanResize=()=>{var r,o;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,o=n=>{if(n.subHeaders.length)n.subHeaders.forEach(o);else{var a;r+=(a=n.column.getSize())!=null?a:0}};return o(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let o=t.getColumn(e.column.id),n=o?.getCanResize();return a=>{if(!o||!n||(a.persist==null||a.persist(),xb(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[o.id,o.getSize()]],l=xb(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(v,g)=>{typeof g=="number"&&(t.setColumnSizingInfo(y=>{var w,C;let R=t.options.columnResizeDirection==="rtl"?-1:1,S=(g-((w=y?.startOffset)!=null?w:0))*R,L=Math.max(S/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(T=>{let[P,N]=T;u[P]=Math.round(Math.max(N+N*L,0)*100)/100}),{...y,deltaOffset:S,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(g=>({...g,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=z7(r),h={moveHandler:v=>d(v.clientX),upHandler:v=>{p?.removeEventListener("mousemove",h.moveHandler),p?.removeEventListener("mouseup",h.upHandler),f(v.clientX)}},m={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var g;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((g=v.touches[0])==null?void 0:g.clientX)}},x=G7()?{passive:!1}:!1;xb(a)?(p?.addEventListener("touchmove",m.moveHandler,x),p?.addEventListener("touchend",m.upHandler,x)):(p?.addEventListener("mousemove",h.moveHandler,x),p?.addEventListener("mouseup",h.upHandler,x)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:o.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?yb():(r=e.initialState.columnSizingInfo)!=null?r:yb())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0}}},Bv=null;function G7(){if(typeof Bv=="boolean")return Bv;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return Bv=e,Bv}function xb(e){return e.type==="touchstart"}var j7={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:ho("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,o;let n=e.columns;return(r=n.length?n.some(a=>a.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?r:!0},e.getCanHide=()=>{var r,o;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=se(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(o=>o.column.getIsVisible()),le(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=se(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,o,n)=>[...r,...o,...n],le(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,o)=>se(()=>[o(),o().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),le(e.options,"debugColumns",r));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var o;e.setColumnVisibility(r?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=r=>{var o;r=(o=r)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,a)=>({...n,[a.id]:r||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var o;e.toggleAllColumnsVisible((o=r.target)==null?void 0:o.checked)}}};function fp(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var q7={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},$7={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:ho("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;let o=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,o,n,a;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ba.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return Hv(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:Ba[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},K7={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:ho("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var n,a;e.setExpanded(o?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{let o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");o=Math.max(o,i.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=r=>{t.setExpanded(o=>{var n;let a=o===!0?!0:!!(o!=null&&o[e.id]),i={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=o,r=(n=r)!=null?n:!a,!a&&r)return{...i,[e.id]:!0};if(a&&!r){let{[e.id]:s,...l}=i;return l}return o})},e.getIsExpanded=()=>{var r;let o=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:o===!0||o?.[e.id])},e.getCanExpand=()=>{var r,o,n;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((o=t.options.enableExpanding)!=null?o:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let r=!0,o=e;for(;r&&o.parentId;)o=t.getRow(o.parentId,!0),r=o.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},bb=0,Rb=10,wb=()=>({pageIndex:bb,pageSize:Rb}),X7={getInitialState:e=>({...e,pagination:{...wb(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:ho("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=o=>{let n=a=>$i(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?wb():(n=e.initialState.pagination)!=null?n:wb())},e.setPageIndex=o=>{e.setPagination(n=>{let a=$i(o,n.pageIndex),i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...n,pageIndex:a}})},e.resetPageIndex=o=>{var n,a;e.setPageIndex(o?bb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:bb)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?Rb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:Rb)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,$i(o,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=o=>e.setPagination(n=>{var a;let i=$i(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=se(()=>[e.getPageCount()],o=>{let n=[];return o&&o>0&&(n=[...new Array(o)].fill(null).map((a,i)=>i)),n},le(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:o}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:o<n-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},Cb=()=>({top:[],bottom:[]}),Y7={getInitialState:e=>({rowPinning:Cb(),...e}),getDefaultOptions:e=>({onRowPinningChange:ho("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,o,n)=>{let a=o?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],i=n?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var u,c;if(r==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(r==="top"){var p,h;return{top:[...((p=l?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((h=l?.bottom)!=null?h:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=l?.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((c=l?.bottom)!=null?c:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var r;let{enableRowPinning:o,enablePinning:n}=t.options;return typeof o=="function"?o(e):(r=o??n)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:o,bottom:n}=t.getState().rowPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();if(!n)return-1;let a=(r=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(i=>{let{id:s}=i;return s});return(o=a?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,o;return e.setRowPinning(t?Cb():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:Cb())},e.getIsSomeRowsPinned=t=>{var r;let o=e.getState().rowPinning;if(!t){var n,a;return!!((n=o.top)!=null&&n.length||(a=o.bottom)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e._getPinnedRows=(t,r,o)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(r??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(r??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:o}))},e.getTopRows=se(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),le(e.options,"debugRows","getTopRows")),e.getBottomRows=se(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),le(e.options,"debugRows","getBottomRows")),e.getCenterRows=se(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,o)=>{let n=new Set([...r??[],...o??[]]);return t.filter(a=>!n.has(a.id))},le(e.options,"debugRows","getCenterRows"))}},Q7={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:ho("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let o={...r},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):n.forEach(a=>{delete o[a.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...r};return e.getRowModel().rows.forEach(a=>{Lb(n,a.id,o,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=se(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?Sb(e,r):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=se(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?Sb(e,r):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=se(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?Sb(e,r):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),o=!!(t.length&&Object.keys(r).length);return o&&t.some(n=>n.getCanSelect()&&!r[n.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:r}=e.getState(),o=!!t.length;return o&&t.some(n=>!r[n.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,o)=>{let n=e.getIsSelected();t.setRowSelection(a=>{var i;if(r=typeof r<"u"?r:!n,e.getCanSelect()&&n===r)return a;let s={...a};return Lb(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return Mb(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return Ib(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return Ib(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return o=>{var n;r&&e.toggleSelected((n=o.target)==null?void 0:n.checked)}}}},Lb=(e,t,r,o,n)=>{var a;let i=n.getRow(t,!0);r?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Lb(e,s.id,r,o,n))};function Sb(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=Mb(l,r);if(c&&(o.push(l),n[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:a(l.subRows)}),c)return l}).filter(Boolean)};return{rows:a(t.rows),flatRows:o,rowsById:n}}function Mb(e,t){var r;return(r=t[e.id])!=null?r:!1}function Ib(e,t,r){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(Mb(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=Ib(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var Pb=/([0-9]+)/gm,Z7=(e,t,r)=>vF(Ki(e.getValue(r)).toLowerCase(),Ki(t.getValue(r)).toLowerCase()),J7=(e,t,r)=>vF(Ki(e.getValue(r)),Ki(t.getValue(r))),eK=(e,t,r)=>Eb(Ki(e.getValue(r)).toLowerCase(),Ki(t.getValue(r)).toLowerCase()),tK=(e,t,r)=>Eb(Ki(e.getValue(r)),Ki(t.getValue(r))),rK=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},oK=(e,t,r)=>Eb(e.getValue(r),t.getValue(r));function Eb(e,t){return e===t?0:e>t?1:-1}function Ki(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function vF(e,t){let r=e.split(Pb).filter(Boolean),o=t.split(Pb).filter(Boolean);for(;r.length&&o.length;){let n=r.shift(),a=o.shift(),i=parseInt(n,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(n>a)return 1;if(a>n)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return r.length-o.length}var dp={alphanumeric:Z7,alphanumericCaseSensitive:J7,text:eK,textCaseSensitive:tK,datetime:rK,basic:oK},nK={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:ho("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),o=!1;for(let n of r){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return dp.datetime;if(typeof a=="string"&&(o=!0,a.split(Pb).length>1))return dp.alphanumeric}return o?dp.text:dp.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,o;if(!e)throw new Error;return Hv(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?r:dp[e.columnDef.sortingFn]},e.toggleSorting=(r,o)=>{let n=e.getNextSortingOrder(),a=typeof r<"u"&&r!==null;t.setSorting(i=>{let s=i?.find(p=>p.id===e.id),l=i?.findIndex(p=>p.id===e.id),u=[],c,d=a?r:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?s?c="toggle":c="add":i!=null&&i.length&&l!==i.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(a||n||(c="remove")),c==="add"){var f;u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=i.map(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=i.filter(p=>p.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var r,o;return((r=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var o,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((o=t.options.enableSortingRemoval)==null||o)&&(!(r&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var r,o;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,o;return(r=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let o=(r=t.getState().sorting)==null?void 0:r.find(n=>n.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,o;return(r=(o=t.getState().sorting)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return o=>{r&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,o;e.setSorting(t?[]:(r=(o=e.initialState)==null?void 0:o.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},aK=[I7,j7,H7,U7,P7,T7,q7,$7,nK,V7,K7,X7,Y7,Q7,W7];function yF(e){var t,r;let o=[...aK,...(t=e._features)!=null?t:[]],n={_features:o},a=n._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(n)),{}),i=f=>n.options.mergeOptions?n.options.mergeOptions(a,f):{...a,...f},l={...{},...(r=e.initialState)!=null?r:{}};n._features.forEach(f=>{var p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p:l});let u=[],c=!1,d={_features:o,options:{...a,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{n.setState(n.initialState)},setOptions:f=>{let p=$i(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,h)=>{var m;return(m=n.options.getRowId==null?void 0:n.options.getRowId(f,p,h))!=null?m:`${h?[h.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let h=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!h&&(h=n.getCoreRowModel().rowsById[f],!h))throw new Error;return h},_getDefaultColumnDef:se(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:h=>{let m=h.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:h=>{var m,x;return(m=(x=h.renderValue())==null||x.toString==null?void 0:x.toString())!=null?m:null},...n._features.reduce((h,m)=>Object.assign(h,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},le(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:se(()=>[n._getColumnDefs()],f=>{let p=function(h,m,x){return x===void 0&&(x=0),h.map(v=>{let g=L7(n,v,x,m),y=v;return g.columns=y.columns?p(y.columns,g,x+1):[],g})};return p(f)},le(e,"debugColumns","getAllColumns")),getAllFlatColumns:se(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),le(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:se(()=>[n.getAllFlatColumns()],f=>f.reduce((p,h)=>(p[h.id]=h,p),{}),le(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:se(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let h=f.flatMap(m=>m.getLeafColumns());return p(h)},le(e,"debugColumns","getAllLeafColumns")),getColumn:f=>n._getAllFlatColumnsById()[f]};Object.assign(n,d);for(let f=0;f<n._features.length;f++){let p=n._features[f];p==null||p.createTable==null||p.createTable(n)}return n}function xF(){return e=>se(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},o=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=Tb(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(r.flatRows.push(c),r.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(n[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=o(c.originalSubRows,a+1,c))}}return s};return r.rows=o(t),r},le(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function iK(e){let t=[],r=o=>{var n;t.push(o),(n=o.subRows)!=null&&n.length&&o.getIsExpanded()&&o.subRows.forEach(r)};return e.rows.forEach(r),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function sK(e,t,r){return r.options.filterFromLeafRows?lK(e,t,r):uK(e,t,r)}function lK(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){var d;let p=l[f],h=Tb(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(h.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(h.subRows=s(p.subRows,u+1),p=h,t(p)&&!h.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||h.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=h,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function uK(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){let p=l[f];if(t(p)){var d;if((d=p.subRows)!=null&&d.length&&u<i){let m=Tb(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,u+1),p=m}c.push(p),n.push(p),a[p.id]=p}}return c};return{rows:s(e),flatRows:n,rowsById:a}}function wF(){return e=>se(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,o)=>{if(!t.rows.length||!(r!=null&&r.length)&&!o){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let n=[],a=[];(r??[]).forEach(f=>{var p;let h=e.getColumn(f.id);if(!h)return;let m=h.getFilterFn();m&&n.push({id:f.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(f.value))!=null?p:f.value})});let i=(r??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());o&&s&&l.length&&(i.push("__global__"),l.forEach(f=>{var p;a.push({id:f.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(o))!=null?p:o})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let p=t.flatRows[f];if(p.columnFilters={},n.length)for(let h=0;h<n.length;h++){u=n[h];let m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,x=>{p.columnFiltersMeta[m]=x})}if(a.length){for(let h=0;h<a.length;h++){c=a[h];let m=c.id;if(c.filterFn(p,m,c.resolvedValue,x=>{p.columnFiltersMeta[m]=x})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}let d=f=>{for(let p=0;p<i.length;p++)if(f.columnFilters[i[p]]===!1)return!1;return!0};return sK(t.rows,d,e)},le(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function CF(e){return t=>se(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(r,o)=>{if(!o.rows.length)return o;let{pageSize:n,pageIndex:a}=r,{rows:i,flatRows:s,rowsById:l}=o,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=iK({rows:i,flatRows:s,rowsById:l}),d.flatRows=[];let f=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(f)};return d.rows.forEach(f),d},le(t.options,"debugTable","getPaginationRowModel"))}function SF(){return e=>se(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;let o=e.getState().sorting,n=[],a=o.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),i={};a.forEach(l=>{let u=e.getColumn(l.id);u&&(i[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let s=l=>{let u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let p=0;p<a.length;p+=1){var f;let h=a[p],m=i[h.id],x=m.sortUndefined,v=(f=h?.desc)!=null?f:!1,g=0;if(x){let y=c.getValue(h.id),w=d.getValue(h.id),C=y===void 0,R=w===void 0;if(C||R){if(x==="first")return C?-1:1;if(x==="last")return C?1:-1;g=C&&R?0:C?x:-x}}if(g===0&&(g=m.sortingFn(c,d,h.id)),g!==0)return v&&(g*=-1),m.invertSorting&&(g*=-1),g}return c.index-d.index}),u.forEach(c=>{var d;n.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(r.rows),flatRows:n,rowsById:r.rowsById}},le(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Ab(e,t){return e?cK(e)?pp.createElement(e,t):e:null}function cK(e){return dK(e)||typeof e=="function"||fK(e)}function dK(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function fK(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function bF(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=pp.useState(()=>({current:yF(t)})),[o,n]=pp.useState(()=>r.current.initialState);return r.current.setOptions(a=>({...a,...e,state:{...o,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),r.current}var xr=b(E());var ct=b(M()),pK=J("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),Uv=xr.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,...a},i)=>{let s=t==="striped",l=xr.Children.map(a.children,u=>{if(xr.isValidElement(u)&&u.type==="tbody"){let c=u.props;return xr.cloneElement(u,{className:I(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,ct.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,ct.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,ct.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,ct.jsx)("table",{ref:i,className:I(pK({variant:t,size:r}),o&&"opacity-70",e),...a,children:l})]})});Uv.displayName="Table";var zv=xr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("thead",{ref:r,className:I("moonui-theme","[&_tr]:border-b",e),...t}));zv.displayName="TableHeader";var Wv=xr.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=xr.Children.count(o)>0;return(0,ct.jsx)("tbody",{ref:a,className:I("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,ct.jsx)("tr",{children:(0,ct.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,ct.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,ct.jsx)("div",{className:"text-sm",children:r})})})})})});Wv.displayName="TableBody";var RF=xr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("tfoot",{ref:r,className:I("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));RF.displayName="TableFooter";var gc=xr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("tr",{ref:r,className:I("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));gc.displayName="TableRow";var Gv=xr.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,children:n,...a},i)=>{let s=()=>t?r==="asc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):r==="desc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null;return(0,ct.jsx)("th",{ref:i,className:I("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?o:void 0,...a,children:(0,ct.jsxs)("div",{className:"flex items-center",children:[n,t&&s()]})})});Gv.displayName="TableHead";var mp=xr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("td",{ref:r,className:I("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));mp.displayName="TableCell";var LF=xr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("caption",{ref:r,className:I("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));LF.displayName="TableCaption";var Le=b(M());function mK({columns:e,data:t,enableSorting:r=!0,enablePagination:o=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=Db.useState([]),[d,f]=Db.useState(""),p=bF({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:xF(),getPaginationRowModel:o?CF():void 0,getSortedRowModel:r?SF():void 0,getFilteredRowModel:n?wF():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Le.jsxs)("div",{className:I("space-y-4",l),children:[n&&(0,Le.jsx)("div",{className:"flex items-center",children:(0,Le.jsxs)("div",{className:"relative max-w-sm",children:[(0,Le.jsx)(Ls,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Le.jsx)(pr,{placeholder:i,value:d,onChange:h=>f(h.target.value),className:"pl-8"})]})}),(0,Le.jsx)("div",{className:"rounded-md border",children:(0,Le.jsxs)(Uv,{children:[(0,Le.jsx)(zv,{children:p.getHeaderGroups().map(h=>(0,Le.jsx)(gc,{children:h.headers.map(m=>(0,Le.jsx)(Gv,{children:m.isPlaceholder?null:(0,Le.jsxs)("div",{className:I("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[Ab(m.column.columnDef.header,m.getContext()),r&&m.column.getCanSort()&&(0,Le.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Le.jsx)(Jl,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Le.jsx)(tu,{className:"h-4 w-4"}):(0,Le.jsx)(eu,{className:"h-4 w-4 opacity-50"})})]})},m.id))},h.id))}),(0,Le.jsx)(Wv,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(h=>(0,Le.jsx)(gc,{"data-state":h.getIsSelected()&&"selected",children:h.getVisibleCells().map(m=>(0,Le.jsx)(mp,{children:Ab(m.column.columnDef.cell,m.getContext())},m.id))},h.id)):(0,Le.jsx)(gc,{children:(0,Le.jsx)(mp,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Le.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Le.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Le.jsxs)("div",{className:"space-x-2",children:[(0,Le.jsxs)(Fe,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Le.jsx)(rn,{className:"h-4 w-4"}),"Previous"]}),(0,Le.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Le.jsxs)(Fe,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Le.jsx)(Pr,{className:"h-4 w-4"})]})]})]})]})}function gK(e){return({column:t})=>(0,Le.jsxs)(Fe,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Le.jsx)(Jl,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Le.jsx)(tu,{className:"ml-2 h-4 w-4"}):(0,Le.jsx)(eu,{className:"ml-2 h-4 w-4"})]})}var _r=b(E());function Ce(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function er(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function jv(e,t){let r=Ce(e);if(isNaN(t))return er(e,NaN);if(!t)return r;let o=r.getDate(),n=er(e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let a=n.getDate();return o>=a?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}var hK=Math.pow(10,8)*24*60*60*1e3,VLe=-hK,qv=6048e5,IF=864e5;var vK=3600;var PF=vK*24,BLe=PF*7,yK=PF*365.2425,xK=yK/12,HLe=xK*3;var wK={};function Qn(){return wK}function bn(e,t){let r=Qn(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Ce(e),a=n.getDay(),i=(a<o?7:0)+a-o;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function dl(e){return bn(e,{weekStartsOn:1})}function $v(e){let t=Ce(e),r=t.getFullYear(),o=er(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=dl(o),a=er(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=dl(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function hc(e){let t=Ce(e);return t.setHours(0,0,0,0),t}function Nb(e){let t=Ce(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 TF(e,t){let r=hc(e),o=hc(t),n=+r-Nb(r),a=+o-Nb(o);return Math.round((n-a)/IF)}function kF(e){let t=$v(e),r=er(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),dl(r)}function MF(e){return er(e,Date.now())}function fl(e,t){let r=hc(e),o=hc(t);return+r==+o}function EF(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Kv(e){if(!EF(e)&&typeof e!="number")return!1;let t=Ce(e);return!isNaN(Number(t))}function AF(e){let t=Ce(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Xv(e,t){let r=Ce(e.start),o=Ce(e.end),n=+r>+o,a=n?+r:+o,i=n?o:r;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,n=!n);let l=[];for(;+i<=a;)l.push(Ce(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function DF(e){let t=Ce(e);return t.setDate(1),t.setHours(0,0,0,0),t}function NF(e){let t=Ce(e),r=er(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function _F(e,t){let r=Qn(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Ce(e),a=n.getDay(),i=(a<o?-7:0)+6-(a-o);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var CK={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"}},OF=(e,t,r)=>{let o,n=CK[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function Yv(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var SK={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bK={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},RK={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},FF={date:Yv({formats:SK,defaultWidth:"full"}),time:Yv({formats:bK,defaultWidth:"full"}),dateTime:Yv({formats:RK,defaultWidth:"full"})};var LK={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},VF=(e,t,r,o)=>LK[e];function vc(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var IK={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PK={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},TK={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"]},kK={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"]},MK={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"}},EK={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"}},AK=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},BF={ordinalNumber:AK,era:vc({values:IK,defaultWidth:"wide"}),quarter:vc({values:PK,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vc({values:TK,defaultWidth:"wide"}),day:vc({values:kK,defaultWidth:"wide"}),dayPeriod:vc({values:MK,defaultWidth:"wide",formattingValues:EK,defaultFormattingWidth:"wide"})};function yc(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?NK(s,d=>d.test(i)):DK(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function DK(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function NK(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function HF(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=r.valueCallback?r.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var _K=/^(\d+)(th|st|nd|rd)?/i,OK=/\d+/i,FK={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},VK={any:[/^b/i,/^(a|c)/i]},BK={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},HK={any:[/1/i,/2/i,/3/i,/4/i]},UK={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},zK={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]},WK={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},GK={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]},jK={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},qK={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}},UF={ordinalNumber:HF({matchPattern:_K,parsePattern:OK,valueCallback:e=>parseInt(e,10)}),era:yc({matchPatterns:FK,defaultMatchWidth:"wide",parsePatterns:VK,defaultParseWidth:"any"}),quarter:yc({matchPatterns:BK,defaultMatchWidth:"wide",parsePatterns:HK,defaultParseWidth:"any",valueCallback:e=>e+1}),month:yc({matchPatterns:UK,defaultMatchWidth:"wide",parsePatterns:zK,defaultParseWidth:"any"}),day:yc({matchPatterns:WK,defaultMatchWidth:"wide",parsePatterns:GK,defaultParseWidth:"any"}),dayPeriod:yc({matchPatterns:jK,defaultMatchWidth:"any",parsePatterns:qK,defaultParseWidth:"any"})};var _b={code:"en-US",formatDistance:OF,formatLong:FF,formatRelative:VF,localize:BF,match:UF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zF(e){let t=Ce(e);return TF(t,NF(t))+1}function WF(e){let t=Ce(e),r=+dl(t)-+kF(t);return Math.round(r/qv)+1}function Qv(e,t){let r=Ce(e),o=r.getFullYear(),n=Qn(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=er(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=bn(i,t),l=er(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=bn(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function GF(e,t){let r=Qn(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=Qv(e,t),a=er(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),bn(a,t)}function jF(e,t){let r=Ce(e),o=+bn(r,t)-+GF(r,t);return Math.round(o/qv)+1}function Ee(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Ha={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Ee(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Ee(r+1,2)},d(e,t){return Ee(e.getDate(),t.length)},a(e,t){let 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];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ee(e.getHours()%12||12,t.length)},H(e,t){return Ee(e.getHours(),t.length)},m(e,t){return Ee(e.getMinutes(),t.length)},s(e,t){return Ee(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Ee(n,t.length)}};var xc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ob={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Ha.y(e,t)},Y:function(e,t,r,o){let n=Qv(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return Ee(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Ee(a,t.length)},R:function(e,t){let r=$v(e);return Ee(r,t.length)},u:function(e,t){let r=e.getFullYear();return Ee(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Ee(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Ee(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Ha.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return Ee(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=jF(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ee(n,t.length)},I:function(e,t,r){let o=WF(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Ee(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ha.d(e,t)},D:function(e,t,r){let o=zF(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ee(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":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"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ee(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});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"});case"eeee":default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ee(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});case"cccc":default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return Ee(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let 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"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=xc.noon:o===0?n=xc.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=xc.evening:o>=12?n=xc.afternoon:o>=4?n=xc.morning:n=xc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Ha.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ha.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ee(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ee(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ha.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ha.s(e,t)},S:function(e,t){return Ha.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return $F(o);case"XXXX":case"XX":return pl(o);case"XXXXX":case"XXX":default:return pl(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return $F(o);case"xxxx":case"xx":return pl(o);case"xxxxx":case"xxx":default:return pl(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qF(o,":");case"OOOO":default:return"GMT"+pl(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qF(o,":");case"zzzz":default:return"GMT"+pl(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return Ee(o,t.length)},T:function(e,t,r){let o=e.getTime();return Ee(o,t.length)}};function qF(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),a=o%60;return a===0?r+String(n):r+String(n)+t+Ee(a,2)}function $F(e,t){return e%60===0?(e>0?"-":"+")+Ee(Math.abs(e)/60,2):pl(e,t)}function pl(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Ee(Math.trunc(o/60),2),a=Ee(o%60,2);return r+n+t+a}var KF=(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"});case"PPPP":default:return t.date({width:"full"})}},XF=(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"});case"pppp":default:return t.time({width:"full"})}},$K=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return KF(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",KF(o,t)).replace("{{time}}",XF(n,t))},YF={p:XF,P:$K};var KK=/^D+$/,XK=/^Y+$/,YK=["D","DD","YY","YYYY"];function QF(e){return KK.test(e)}function ZF(e){return XK.test(e)}function JF(e,t,r){let o=QK(e,t,r);if(console.warn(o),YK.includes(e))throw new RangeError(o)}function QK(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var ZK=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JK=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eX=/^'([^]*?)'?$/,tX=/''/g,rX=/[a-zA-Z]/;function Rn(e,t,r){let o=Qn(),n=r?.locale??o.locale??_b,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=Ce(e);if(!Kv(s))throw new RangeError("Invalid time value");let l=t.match(JK).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=YF[d];return f(c,n.formatLong)}return c}).join("").match(ZK).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:oX(c)};if(Ob[d])return{isToken:!0,value:c};if(d.match(rX))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));let u={firstWeekContainsDate:a,weekStartsOn:i,locale:n};return l.map(c=>{if(!c.isToken)return c.value;let d=c.value;(!r?.useAdditionalWeekYearTokens&&ZF(d)||!r?.useAdditionalDayOfYearTokens&&QF(d))&&JF(d,t,String(e));let f=Ob[d[0]];return f(s,d,n.localize,u)}).join("")}function oX(e){let t=e.match(eX);return t?t[1].replace(tX,"'"):e}function Fb(e){return Ce(e).getDay()}function eV(e,t){let r=Ce(e),o=Ce(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function tV(e){return fl(e,MF(e))}function rV(e,t){return jv(e,-t)}var oV=b(E());var Nr=b(M());function Zv({mode:e="single",selected:t,onSelect:r,disabled:o,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=oV.useState(l||t&&t||new Date),f=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],p=()=>{d(rV(c,1))},h=()=>{d(jv(c,1))},m=R=>{if(!o?.(R)){if(e==="single")r?.(R);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:R,to:void 0}):R<S.from?r?.({from:R,to:S.from}):r?.({from:S.from,to:R})}}},x=R=>{if(!t)return!1;if(e==="single")return fl(R,t);if(e==="range"){let S=t;return S.from&&S.to?R>=S.from&&R<=S.to:S.from?fl(R,S.from):!1}return!1},v=R=>{if(e!=="range"||!t)return!1;let S=t;return S.from?fl(R,S.from):!1},g=R=>{if(e!=="range"||!t)return!1;let S=t;return S.to?fl(R,S.to):!1},y=R=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:R>S.from&&R<S.to},C=(()=>{let R=DF(c),S=AF(c),L=Xv({start:R,end:S}),T=Fb(R),P=[];if(T>0&&n){let A=bn(R),G=new Date(R);G.setDate(G.getDate()-1),P.push(...Xv({start:A,end:G}))}let N=Fb(S),F=[];if(N<6&&n){let A=new Date(S);A.setDate(A.getDate()+1);let G=_F(S);F.push(...Xv({start:A,end:G}))}let q=[];if(!n&&T>0)for(let A=0;A<T;A++)q.push(null);return[...P,...q,...L,...F]})();return(0,Nr.jsxs)("div",{className:I("moonui-theme","p-0",a),children:[(0,Nr.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Nr.jsx)("button",{onClick:p,className:I("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,Nr.jsx)(rn,{className:"h-5 w-5"})}),(0,Nr.jsx)("h2",{className:"text-base font-medium",children:Rn(c,"MMMM yyyy")}),(0,Nr.jsx)("button",{onClick:h,className:I("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,Nr.jsx)(Pr,{className:"h-5 w-5"})})]}),(0,Nr.jsxs)("div",{className:"px-6 pb-4",children:[(0,Nr.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((R,S)=>(0,Nr.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:R.full,children:R.short},`weekday-${S}`))}),(0,Nr.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((R,S)=>{if(!R)return(0,Nr.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let L=!eV(R,c),T=o?.(R)||!1,P=x(R),N=tV(R),F=v(R),q=g(R),A=y(R);return(0,Nr.jsx)("button",{onClick:()=>m(R),disabled:T,className:I("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",L&&"text-muted-foreground/50",T&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",P&&!A&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",N&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",A&&"bg-accent/30 text-accent-foreground rounded-none",F&&"rounded-r-none",q&&"rounded-l-none"),type:"button",children:Rn(R,"d")},R.toISOString())})})]})]})}Zv.displayName="Calendar";var de=b(M()),nX={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},Vb=J("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"default",state:"default"}});function nV({className:e,variant:t,size:r,state:o,value:n,onChange:a,placeholder:i="Pick a date",formatString:s="PPP",minDate:l,maxDate:u,disabledDates:c,disabledDaysOfWeek:d,showWeekNumbers:f,iconPosition:p="left",icon:h,allowClear:m=!0,readOnly:x=!1,showTodayButton:v=!0,calendarProps:g,disabled:y,...w}){let[C,R]=_r.useState(!1),[S,L]=_r.useState(n);_r.useEffect(()=>{L(n)},[n]);let T=G=>{let D=Array.isArray(G)?G[0]:G&&typeof G=="object"&&"from"in G?G.from:G;L(D),a?.(D),D&&R(!1)},P=G=>{G.stopPropagation(),T(void 0)},N=()=>{T(new Date)},F=G=>!!(l&&G<l||u&&G>u||c?.some(D=>D.toDateString()===G.toDateString())||d?.includes(G.getDay())),q=S&&Kv(S)?Rn(S,s):null,A=h||(0,de.jsx)(Cs,{className:"h-4 w-4"});return(0,de.jsx)("div",{className:"moonui-theme",children:(0,de.jsxs)(Aa,{open:C,onOpenChange:R,children:[(0,de.jsx)(Da,{asChild:!0,children:(0,de.jsxs)(Fe,{variant:t==="ghost"?"ghost":"outline",className:I(Vb({variant:t,size:r,state:o}),!q&&"text-muted-foreground",e),disabled:y||x,...w,children:[(0,de.jsx)(wa,{mode:"wait",children:(0,de.jsxs)(We.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[p==="left"&&A,(0,de.jsx)("span",{className:"flex-1 truncate",children:q||i}),p==="right"&&A]},q||"placeholder")}),m&&q&&!x&&!y&&(0,de.jsxs)(We.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer",onClick:P,role:"button",tabIndex:0,onKeyDown:G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),P(G))},children:[(0,de.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,de.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,de.jsx)("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:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})]})]})}),(0,de.jsx)(Kn,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,de.jsxs)(We.div,{...nX,className:"rounded-2xl bg-background overflow-hidden",children:[(0,de.jsx)(Zv,{mode:"single",selected:S,onSelect:T,disabled:F,showOutsideDays:!1,className:I("rounded-2xl",g?.className),...g}),v&&(0,de.jsx)("div",{className:"border-t px-4 py-3",children:(0,de.jsx)(Fe,{variant:"ghost",size:"sm",onClick:N,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})}function aX({className:e,value:t,onChange:r,placeholder:o="Pick a date range",formatString:n="LLL dd, y",separator:a=" - ",...i}){let[s,l]=_r.useState(!1),[u,c]=_r.useState(t);_r.useEffect(()=>{c(t)},[t]);let d=p=>{c(p),r?.(p),p?.from&&p?.to&&l(!1)},f=_r.useMemo(()=>u?.from?u?.to?`${Rn(u.from,n)}${a}${Rn(u.to,n)}`:Rn(u.from,n):null,[u,n,a]);return(0,de.jsxs)(Aa,{open:s,onOpenChange:l,children:[(0,de.jsx)(Da,{asChild:!0,children:(0,de.jsxs)(Fe,{variant:i.variant==="ghost"?"ghost":"outline",className:I(Vb({variant:i.variant,size:i.size,state:i.state}),!f&&"text-muted-foreground",e),disabled:i.disabled||i.readOnly,children:[(0,de.jsx)(Cs,{className:"mr-2 h-4 w-4"}),(0,de.jsx)("span",{className:"flex-1 truncate text-left",children:f||o})]})}),(0,de.jsx)(Kn,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,de.jsx)(Zv,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})}function iX({value:e,onChange:t,formatString:r="PPP p",showTimePicker:o=!0,timeFormat:n="24",timeInterval:a=15,...i}){let[s,l]=_r.useState(e),[u,c]=_r.useState(e?Rn(e,n==="24"?"HH:mm":"hh:mm a"):"00:00"),d=h=>{if(!h){l(void 0),t?.(void 0);return}let[m,x]=u.split(":").map(Number);h.setHours(m,x),l(h),t?.(h)},f=h=>{let m=h.target.value;if(c(m),s){let[x,v]=m.split(":").map(Number),g=new Date(s);g.setHours(x,v),l(g),t?.(g)}},p=_r.useMemo(()=>{let h=[];for(let m=0;m<24;m++)for(let x=0;x<60;x+=a){let v=m.toString().padStart(2,"0"),g=x.toString().padStart(2,"0"),y=`${v}:${g}`;if(n==="12"){let w=m===0?12:m>12?m-12:m,C=m<12?"AM":"PM",R=`${w}:${g} ${C}`;h.push({value:y,label:R})}else h.push({value:y,label:y})}return h},[n,a]);return(0,de.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,de.jsx)(nV,{...i,value:s,onChange:d,formatString:"PPP",showTodayButton:!1}),o&&s&&(0,de.jsxs)(We.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,de.jsx)(Td,{className:"h-4 w-4 text-muted-foreground"}),(0,de.jsx)("select",{value:u,onChange:f,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:p.map(h=>(0,de.jsx)("option",{value:h.value,children:h.label},h.value))})]})]})}function sX({value:e,onChange:t,placeholder:r="Pick a month",formatString:o="MMMM yyyy",...n}){let[a,i]=_r.useState(!1),[s,l]=_r.useState(e||new Date),u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=p=>{let h=new Date(s);h.setMonth(p),t?.(h),i(!1)},d=p=>{let h=new Date(s);h.setFullYear(h.getFullYear()+p),l(h)},f=e?Rn(e,o):null;return(0,de.jsxs)(Aa,{open:a,onOpenChange:i,children:[(0,de.jsx)(Da,{asChild:!0,children:(0,de.jsxs)(Fe,{variant:n.variant==="default"?"outline":n.variant||"outline",className:I(Vb({variant:n.variant,size:n.size,state:n.state}),!f&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[(0,de.jsx)(Cs,{className:"mr-2 h-4 w-4"}),f||r]})}),(0,de.jsx)(Kn,{className:"w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]",align:"start",children:(0,de.jsxs)("div",{className:"p-3",children:[(0,de.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,de.jsx)(Fe,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,de.jsx)(rn,{className:"h-4 w-4"})}),(0,de.jsx)("span",{className:"font-semibold",children:s.getFullYear()}),(0,de.jsx)(Fe,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,de.jsx)(Pr,{className:"h-4 w-4"})})]}),(0,de.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((p,h)=>(0,de.jsx)(Fe,{variant:e&&e.getMonth()===h?"primary":"outline",size:"sm",onClick:()=>c(h),className:"h-8 text-xs",children:p.slice(0,3)},p))})]})})]})}var aV=b(E());var Bb=b(M());function lX({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=aV.useState(null),l=(f,p)=>{a||(s(p),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,p)=>{if(f.preventDefault(),a||i===null||i===p){s(null);return}let h=[...e],m=h[i];h.splice(i,1),h.splice(p,0,m),t(h),s(null)},d=()=>{s(null)};return(0,Bb.jsx)("div",{className:I("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,Bb.jsx)("div",{draggable:!a,onDragStart:h=>l(h,p),onDragOver:u,onDrop:h=>c(h,p),onDragEnd:d,className:I("transition-opacity duration-200",!a&&"cursor-move hover:opacity-80",i===p&&"opacity-50",a&&"cursor-not-allowed"),children:r(f,p)},o(f)))})}var Ua=b(E());var Ot=b(E(),1);var ee=b(E(),1);var fe=b(M(),1),Hb=["Enter"," "],uX=["ArrowDown","PageUp","Home"],sV=["ArrowUp","PageDown","End"],cX=[...uX,...sV],dX={ltr:[...Hb,"ArrowRight"],rtl:[...Hb,"ArrowLeft"]},fX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yp="Menu",[hp,pX,mX]=Tn(yp),[ml,Ub]=Te(yp,[mX,Vo,rc]),xp=Vo(),lV=rc(),[uV,Xi]=ml(yp),[gX,wp]=ml(yp),cV=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=xp(t),[l,u]=ee.useState(null),c=ee.useRef(!1),d=et(a),f=_n(n);return ee.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),(0,fe.jsx)(ka,{...s,children:(0,fe.jsx)(uV,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,fe.jsx)(gX,{scope:t,onClose:ee.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};cV.displayName=yp;var hX="MenuAnchor",zb=ee.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=xp(r);return(0,fe.jsx)(Ma,{...n,...o,ref:t})});zb.displayName=hX;var Wb="MenuPortal",[vX,dV]=ml(Wb,{forceMount:void 0}),fV=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=Xi(Wb,t);return(0,fe.jsx)(vX,{scope:t,forceMount:r,children:(0,fe.jsx)(it,{present:r||a.open,children:(0,fe.jsx)(go,{asChild:!0,container:n,children:o})})})};fV.displayName=Wb;var Wo="MenuContent",[yX,Gb]=ml(Wo),pV=ee.forwardRef((e,t)=>{let r=dV(Wo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Xi(Wo,e.__scopeMenu),i=wp(Wo,e.__scopeMenu);return(0,fe.jsx)(hp.Provider,{scope:e.__scopeMenu,children:(0,fe.jsx)(it,{present:o||a.open,children:(0,fe.jsx)(hp.Slot,{scope:e.__scopeMenu,children:i.modal?(0,fe.jsx)(xX,{...n,ref:t}):(0,fe.jsx)(wX,{...n,ref:t})})})})}),xX=ee.forwardRef((e,t)=>{let r=Xi(Wo,e.__scopeMenu),o=ee.useRef(null),n=ne(t,o);return ee.useEffect(()=>{let a=o.current;if(a)return Bi(a)},[]),(0,fe.jsx)(jb,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),wX=ee.forwardRef((e,t)=>{let r=Xi(Wo,e.__scopeMenu);return(0,fe.jsx)(jb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),CX=ro("MenuContent.ScrollLock"),jb=ee.forwardRef((e,t)=>{let{__scopeMenu:r,loop:o=!1,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,x=Xi(Wo,r),v=wp(Wo,r),g=xp(r),y=lV(r),w=pX(r),[C,R]=ee.useState(null),S=ee.useRef(null),L=ne(t,S,x.onContentChange),T=ee.useRef(0),P=ee.useRef(""),N=ee.useRef(0),F=ee.useRef(null),q=ee.useRef("right"),A=ee.useRef(0),G=h?Ea:ee.Fragment,D=h?{as:CX,allowPinchZoom:!0}:void 0,z=k=>{let te=P.current+k,ve=w().filter(j=>!j.disabled),_=document.activeElement,Z=ve.find(j=>j.ref.current===_)?.textValue,ae=ve.map(j=>j.textValue),Y=DX(ae,te,Z),ce=ve.find(j=>j.textValue===Y)?.ref.current;(function j(pe){P.current=pe,window.clearTimeout(T.current),pe!==""&&(T.current=window.setTimeout(()=>j(""),1e3))})(te),ce&&setTimeout(()=>ce.focus())};ee.useEffect(()=>()=>window.clearTimeout(T.current),[]),Ni();let B=ee.useCallback(k=>q.current===F.current?.side&&_X(k,F.current?.area),[]);return(0,fe.jsx)(yX,{scope:r,searchRef:P,onItemEnter:ee.useCallback(k=>{B(k)&&k.preventDefault()},[B]),onItemLeave:ee.useCallback(k=>{B(k)||(S.current?.focus(),R(null))},[B]),onTriggerLeave:ee.useCallback(k=>{B(k)&&k.preventDefault()},[B]),pointerGraceTimerRef:N,onPointerGraceIntentChange:ee.useCallback(k=>{F.current=k},[]),children:(0,fe.jsx)(G,{...D,children:(0,fe.jsx)(Pa,{asChild:!0,trapped:n,onMountAutoFocus:H(a,k=>{k.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,fe.jsx)(No,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,fe.jsx)(lv,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:R,onEntryFocus:H(l,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,fe.jsx)(Fi,{role:"menu","aria-orientation":"vertical","data-state":MV(x.open),"data-radix-menu-content":"",dir:v.dir,...g,...m,ref:L,style:{outline:"none",...m.style},onKeyDown:H(m.onKeyDown,k=>{let ve=k.target.closest("[data-radix-menu-content]")===k.currentTarget,_=k.ctrlKey||k.altKey||k.metaKey,Z=k.key.length===1;ve&&(k.key==="Tab"&&k.preventDefault(),!_&&Z&&z(k.key));let ae=S.current;if(k.target!==ae||!cX.includes(k.key))return;k.preventDefault();let ce=w().filter(j=>!j.disabled).map(j=>j.ref.current);sV.includes(k.key)&&ce.reverse(),EX(ce)}),onBlur:H(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(T.current),P.current="")}),onPointerMove:H(e.onPointerMove,vp(k=>{let te=k.target,ve=A.current!==k.clientX;if(k.currentTarget.contains(te)&&ve){let _=k.clientX>A.current?"right":"left";q.current=_,A.current=k.clientX}}))})})})})})})});pV.displayName=Wo;var SX="MenuGroup",qb=ee.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,fe.jsx)($.div,{role:"group",...o,ref:t})});qb.displayName=SX;var bX="MenuLabel",mV=ee.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,fe.jsx)($.div,{...o,ref:t})});mV.displayName=bX;var Jv="MenuItem",iV="menu.itemSelect",ty=ee.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=ee.useRef(null),i=wp(Jv,e.__scopeMenu),s=Gb(Jv,e.__scopeMenu),l=ne(t,a),u=ee.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(iV,{bubbles:!0,cancelable:!0});d.addEventListener(iV,p=>o?.(p),{once:!0}),Ql(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,fe.jsx)(gV,{...n,ref:l,disabled:r,onClick:H(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:H(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:H(e.onKeyDown,d=>{let f=s.searchRef.current!=="";r||f&&d.key===" "||Hb.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});ty.displayName=Jv;var gV=ee.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=Gb(Jv,r),s=lV(r),l=ee.useRef(null),u=ne(t,l),[c,d]=ee.useState(!1),[f,p]=ee.useState("");return ee.useEffect(()=>{let h=l.current;h&&p((h.textContent??"").trim())},[a.children]),(0,fe.jsx)(hp.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,fe.jsx)(uv,{asChild:!0,...s,focusable:!o,children:(0,fe.jsx)($.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:H(e.onPointerMove,vp(h=>{o?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(e.onPointerLeave,vp(h=>i.onItemLeave(h))),onFocus:H(e.onFocus,()=>d(!0)),onBlur:H(e.onBlur,()=>d(!1))})})})}),RX="MenuCheckboxItem",hV=ee.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,fe.jsx)(CV,{scope:e.__scopeMenu,checked:r,children:(0,fe.jsx)(ty,{role:"menuitemcheckbox","aria-checked":ey(r)?"mixed":r,...n,ref:t,"data-state":Xb(r),onSelect:H(n.onSelect,()=>o?.(ey(r)?!0:!r),{checkForDefaultPrevented:!1})})})});hV.displayName=RX;var vV="MenuRadioGroup",[LX,IX]=ml(vV,{value:void 0,onValueChange:()=>{}}),yV=ee.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=et(o);return(0,fe.jsx)(LX,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,fe.jsx)(qb,{...n,ref:t})})});yV.displayName=vV;var xV="MenuRadioItem",wV=ee.forwardRef((e,t)=>{let{value:r,...o}=e,n=IX(xV,e.__scopeMenu),a=r===n.value;return(0,fe.jsx)(CV,{scope:e.__scopeMenu,checked:a,children:(0,fe.jsx)(ty,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":Xb(a),onSelect:H(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});wV.displayName=xV;var $b="MenuItemIndicator",[CV,PX]=ml($b,{checked:!1}),SV=ee.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=PX($b,r);return(0,fe.jsx)(it,{present:o||ey(a.checked)||a.checked===!0,children:(0,fe.jsx)($.span,{...n,ref:t,"data-state":Xb(a.checked)})})});SV.displayName=$b;var TX="MenuSeparator",bV=ee.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,fe.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});bV.displayName=TX;var kX="MenuArrow",RV=ee.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=xp(r);return(0,fe.jsx)(Vi,{...n,...o,ref:t})});RV.displayName=kX;var Kb="MenuSub",[MX,LV]=ml(Kb),IV=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=Xi(Kb,t),i=xp(t),[s,l]=ee.useState(null),[u,c]=ee.useState(null),d=et(n);return ee.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,fe.jsx)(ka,{...i,children:(0,fe.jsx)(uV,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,fe.jsx)(MX,{scope:t,contentId:qe(),triggerId:qe(),trigger:s,onTriggerChange:l,children:r})})})};IV.displayName=Kb;var gp="MenuSubTrigger",PV=ee.forwardRef((e,t)=>{let r=Xi(gp,e.__scopeMenu),o=wp(gp,e.__scopeMenu),n=LV(gp,e.__scopeMenu),a=Gb(gp,e.__scopeMenu),i=ee.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=ee.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return ee.useEffect(()=>c,[c]),ee.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,fe.jsx)(zb,{asChild:!0,...u,children:(0,fe.jsx)(gV,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":MV(r.open),...e,ref:ns(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:H(e.onPointerMove,vp(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:H(e.onPointerLeave,vp(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,h=p==="right",m=h?-5:5,x=f[h?"left":"right"],v=f[h?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x,y:f.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:H(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||dX[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});PV.displayName=gp;var TV="MenuSubContent",kV=ee.forwardRef((e,t)=>{let r=dV(Wo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Xi(Wo,e.__scopeMenu),i=wp(Wo,e.__scopeMenu),s=LV(TV,e.__scopeMenu),l=ee.useRef(null),u=ne(t,l);return(0,fe.jsx)(hp.Provider,{scope:e.__scopeMenu,children:(0,fe.jsx)(it,{present:o||a.open,children:(0,fe.jsx)(hp.Slot,{scope:e.__scopeMenu,children:(0,fe.jsx)(jb,{id:s.contentId,"aria-labelledby":s.triggerId,...n,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{i.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:H(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:H(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:H(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=fX[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});kV.displayName=TV;function MV(e){return e?"open":"closed"}function ey(e){return e==="indeterminate"}function Xb(e){return ey(e)?"indeterminate":e?"checked":"unchecked"}function EX(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function AX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function DX(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=AX(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function NX(e,t){let{x:r,y:o}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function _X(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return NX(r,t)}function vp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var EV=cV,AV=zb,DV=fV,NV=pV,_V=qb,OV=mV,FV=ty,VV=hV,BV=yV,HV=wV,UV=SV,zV=bV,WV=RV,GV=IV,jV=PV,qV=kV;var _t=b(M(),1),ry="DropdownMenu",[FX,B1e]=Te(ry,[Ub]),wr=Ub(),[VX,$V]=FX(ry),KV=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=wr(t),u=Ot.useRef(null),[c,d]=Ue({prop:n,defaultProp:a??!1,onChange:i,caller:ry});return(0,_t.jsx)(VX,{scope:t,triggerId:qe(),triggerRef:u,contentId:qe(),open:c,onOpenChange:d,onOpenToggle:Ot.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,_t.jsx)(EV,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};KV.displayName=ry;var XV="DropdownMenuTrigger",YV=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=$V(XV,r),i=wr(r);return(0,_t.jsx)(AV,{asChild:!0,...i,children:(0,_t.jsx)($.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...n,ref:ns(t,a.triggerRef),onPointerDown:H(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:H(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});YV.displayName=XV;var BX="DropdownMenuPortal",QV=e=>{let{__scopeDropdownMenu:t,...r}=e,o=wr(t);return(0,_t.jsx)(DV,{...o,...r})};QV.displayName=BX;var ZV="DropdownMenuContent",JV=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=$V(ZV,r),a=wr(r),i=Ot.useRef(!1);return(0,_t.jsx)(NV,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...o,ref:t,onCloseAutoFocus:H(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:H(e.onInteractOutside,s=>{let l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!n.modal||c)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});JV.displayName=ZV;var HX="DropdownMenuGroup",eB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(_V,{...n,...o,ref:t})});eB.displayName=HX;var UX="DropdownMenuLabel",tB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(OV,{...n,...o,ref:t})});tB.displayName=UX;var zX="DropdownMenuItem",rB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(FV,{...n,...o,ref:t})});rB.displayName=zX;var WX="DropdownMenuCheckboxItem",oB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(VV,{...n,...o,ref:t})});oB.displayName=WX;var GX="DropdownMenuRadioGroup",nB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(BV,{...n,...o,ref:t})});nB.displayName=GX;var jX="DropdownMenuRadioItem",aB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(HV,{...n,...o,ref:t})});aB.displayName=jX;var qX="DropdownMenuItemIndicator",iB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(UV,{...n,...o,ref:t})});iB.displayName=qX;var $X="DropdownMenuSeparator",sB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(zV,{...n,...o,ref:t})});sB.displayName=$X;var KX="DropdownMenuArrow",XX=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(WV,{...n,...o,ref:t})});XX.displayName=KX;var YX=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=wr(t),[s,l]=Ue({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,_t.jsx)(GV,{...i,open:s,onOpenChange:l,children:r})},QX="DropdownMenuSubTrigger",lB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(jV,{...n,...o,ref:t})});lB.displayName=QX;var ZX="DropdownMenuSubContent",uB=Ot.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(qV,{...n,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uB.displayName=ZX;var cB=KV,dB=YV,Yb=QV,Qb=JV,fB=eB,Zb=tB,Jb=rB,eR=oB,pB=nB,tR=aB,rR=iB,oR=sB;var mB=YX,nR=lB,aR=uB;var Ft=b(M()),eY=cB,tY=dB,rY=fB,oY=Yb,nY=mB,aY=pB,gB=Ua.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,Ft.jsxs)(nR,{ref:n,className:I("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[r,(0,Ft.jsx)(Pr,{className:"ml-auto h-4 w-4"})]}));gB.displayName=nR.displayName;var hB=Ua.forwardRef(({className:e,...t},r)=>(0,Ft.jsx)(aR,{ref:r,className:I("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));hB.displayName=aR.displayName;var vB=Ua.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,Ft.jsx)(Yb,{children:(0,Ft.jsx)(Qb,{ref:o,sideOffset:t,className:I("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...r})}));vB.displayName=Qb.displayName;var yB=Ua.forwardRef(({className:e,inset:t,...r},o)=>(0,Ft.jsx)(Jb,{ref:o,className:I("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));yB.displayName=Jb.displayName;var xB=Ua.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,Ft.jsxs)(eR,{ref:n,className:I("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[(0,Ft.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ft.jsx)(rR,{children:(0,Ft.jsx)(sr,{className:"h-4 w-4"})})}),t]}));xB.displayName=eR.displayName;var wB=Ua.forwardRef(({className:e,children:t,...r},o)=>(0,Ft.jsxs)(tR,{ref:o,className:I("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,Ft.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ft.jsx)(rR,{children:(0,Ft.jsx)(Ss,{className:"h-2 w-2 fill-current"})})}),t]}));wB.displayName=tR.displayName;var CB=Ua.forwardRef(({className:e,inset:t,...r},o)=>(0,Ft.jsx)(Zb,{ref:o,className:I("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));CB.displayName=Zb.displayName;var SB=Ua.forwardRef(({className:e,...t},r)=>(0,Ft.jsx)(oR,{ref:r,className:I("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));SB.displayName=oR.displayName;var bB=({className:e,...t})=>(0,Ft.jsx)("span",{className:I("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});bB.displayName="DropdownMenuShortcut";var vo=b(E());var RB=b(E());var za=b(M()),iY=J("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",default:"h-2",md:"h-2.5",lg:"h-3",xl:"h-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"default",radius:"full",animation:"default"}}),sY=J("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",error:"bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),oy=RB.forwardRef(({className:e,value:t=0,variant:r,size:o,radius:n,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},p)=>{let h=Math.max(0,Math.min(t,d)),m=d>0?h/d*100:0,x=l||`${Math.round(m)}%`;return(0,za.jsxs)(za.Fragment,{children:[s&&(0,za.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,za.jsx)("span",{className:I("text-sm font-medium text-muted-foreground",u),children:x})}),(0,za.jsx)("div",{ref:p,className:I("moonui-theme",iY({variant:r,size:o,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:h,...f,children:(0,za.jsx)("div",{className:I(sY({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});oy.displayName="Progress";var ue=b(M()),lY=e=>e.startsWith("image/")?(0,ue.jsx)(Rs,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ue.jsx)(Xd,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ue.jsx)(Ud,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ue.jsx)(Dd,{className:"h-4 w-4"}):(0,ue.jsx)(Nd,{className:"h-4 w-4"}),iR=e=>{if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+r[o]},uY=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,progress:n,status:a,preview:i}=e;return(0,ue.jsxs)(We.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[(0,ue.jsx)("div",{className:"flex-shrink-0",children:i?(0,ue.jsx)("img",{src:i,alt:o.name,className:"h-10 w-10 object-cover rounded"}):(0,ue.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:lY(o.type)})}),(0,ue.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ue.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ue.jsx)("p",{className:"text-sm font-medium truncate",children:o.name}),(0,ue.jsx)(Fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,ue.jsx)(uo,{className:"h-3 w-3"})})]}),(0,ue.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ue.jsx)("p",{className:"text-xs text-muted-foreground",children:iR(o.size)}),a==="uploading"&&(0,ue.jsxs)(co,{variant:"secondary",className:"h-5",children:[(0,ue.jsx)(Qt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ue.jsxs)(co,{variant:"success",className:"h-5",children:[(0,ue.jsx)(fi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ue.jsxs)(co,{variant:"destructive",className:"h-5",children:[(0,ue.jsx)(on,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ue.jsx)("div",{className:"mt-2",children:(0,ue.jsx)(oy,{value:n,className:"h-1"})})]})]})},LB=vo.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:r=10*1024*1024,maxFiles:o=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,vo.useState)([]),[p,h]=(0,vo.useState)(!1),[m,x]=(0,vo.useState)(null),v=L=>L.size>r?`File size exceeds ${iR(r)}`:e!=="*"&&!e.split(",").some(T=>{let P=T.trim();return P.includes("*")?L.type.startsWith(P.replace("*","")):L.type===P})?"File type not supported":null,g=(0,vo.useCallback)(async L=>{let T=Array.from(L);if(x(null),d.length+T.length>o){x(`Maximum ${o} files allowed`);return}let P=[],N=[];if(T.forEach(q=>{let A=v(q);A?N.push(`${q.name}: ${A}`):P.push(q)}),N.length>0){x(N.join(", "));return}let F=P.map((q,A)=>({id:`${Date.now()}-${A}-${q.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:q,progress:0,status:"uploading",preview:q.type.startsWith("image/")?URL.createObjectURL(q):void 0}));f(q=>[...q,...F]);for(let q of F){let A=0,G=setInterval(()=>{A+=15+q.file.size%10,A>=100?(A=100,clearInterval(G),f(D=>D.map(z=>z.id===q.id?{...z,progress:100,status:"success"}:z))):f(D=>D.map(z=>z.id===q.id?{...z,progress:A}:z))},200)}if(i)try{await i(P)}catch(q){console.error("Upload failed:",q),f(A=>A.map(G=>F.some(D=>D.id===G.id)?{...G,status:"error"}:G))}},[d.length,o,r,e,i]),y=(0,vo.useCallback)(L=>{if(L.preventDefault(),h(!1),n)return;let T=L.dataTransfer.files;T.length>0&&g(T)},[g,n]),w=(0,vo.useCallback)(L=>{L.preventDefault(),n||h(!0)},[n]),C=(0,vo.useCallback)(L=>{L.preventDefault(),h(!1)},[]),R=(0,vo.useCallback)(L=>{let T=L.target.files;T&&T.length>0&&g(T),L.target.value=""},[g]),S=(0,vo.useCallback)(L=>{f(T=>{let P=T.find(N=>N.id===L);return P?.preview&&URL.revokeObjectURL(P.preview),T.filter(N=>N.id!==L)}),s&&s(L)},[s]);return(0,ue.jsxs)("div",{ref:c,className:I("moonui-theme","space-y-4",a),...u,children:[(0,ue.jsxs)(We.div,{className:I("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",n&&"opacity-50 cursor-not-allowed",!n&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:w,onDragLeave:C,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,ue.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:R,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ue.jsxs)("div",{className:"space-y-4",children:[(0,ue.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ue.jsx)(Kd,{className:"h-full w-full"})}),(0,ue.jsxs)("div",{children:[(0,ue.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ue.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ue.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",o," files, ",iR(r)," each"]})]}),(0,ue.jsx)(Fe,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ue.jsx)(wa,{children:m&&(0,ue.jsxs)(We.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[(0,ue.jsx)(on,{className:"h-4 w-4"}),(0,ue.jsx)("span",{children:m})]})}),(0,ue.jsx)(wa,{children:d.length>0&&(0,ue.jsxs)(We.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ue.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ue.jsx)("div",{className:"space-y-2",children:(0,ue.jsx)(wa,{children:d.map(L=>(0,ue.jsx)(uY,{uploadedFile:L,onRemove:S},L.id))})})]})})]})});LB.displayName="FileUpload";var IB=b(E());var gl=b(M()),PB=IB.default.forwardRef(({children:e,isOpen:t,onOpenChange:r,direction:o="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=ju(0),d=ju(0),f=o==="up"||o==="down",p=f?c:d,h=bC(p,[0,n],[1,.5]),m=(g,y)=>{if(!s)return;let w=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,R=!1;switch(o){case"up":R=w>n||C>500;break;case"down":R=w<-n||C<-500;break;case"left":R=w>n||C>500;break;case"right":R=w<-n||C<-500;break}R?r(!1):LC(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(o){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},v=()=>f?{y:0}:{x:0};return t?(0,gl.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,gl.jsx)(We.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:I("absolute inset-0 bg-black/50",i)}),(0,gl.jsxs)(We.div,{ref:u,drag:s?f?"y":"x":!1,dragConstraints:{top:o==="up"?0:void 0,bottom:o==="down"?0:void 0,left:o==="left"?0:void 0,right:o==="right"?0:void 0},dragElastic:.2,onDragEnd:m,style:{[f?"y":"x"]:p,opacity:h},initial:x(),animate:v(),exit:x(),transition:{type:"spring",damping:30,stiffness:300},className:I("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":o==="up","top-0 left-0 right-0 rounded-b-lg":o==="down","top-0 bottom-0 right-0 rounded-l-lg":o==="left","top-0 bottom-0 left-0 rounded-r-lg":o==="right"},a),...l,children:[(o==="up"||o==="down")&&(0,gl.jsx)("div",{className:"flex justify-center p-2",children:(0,gl.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});PB.displayName="GestureDrawer";var Yi=b(E());var Xe=b(M());function cY({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,Yi.useState)(null),[s,l]=(0,Yi.useState)(!0);(0,Yi.useEffect)(()=>{(async()=>{try{let h=await(await fetch("/api/github-stars")).json();i(h)}catch(p){console.error("Failed to fetch GitHub stats:",p),i({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=f=>f>=1e3?(f/1e3).toFixed(1)+"k":f.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},d={sm:14,md:16,lg:20};return s?(0,Xe.jsxs)("div",{className:I("flex items-center animate-pulse",c[t],e),children:[(0,Xe.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Xe.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Xe.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),r&&(0,Xe.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Xe.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Xe.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Xe.jsxs)("div",{className:I("flex items-center",c[t],e),children:[(0,Xe.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Xe.jsx)(iu,{className:"fill-current text-yellow-500",size:d[t]}),(0,Xe.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(0,Xe.jsxs)("a",{href:`${n}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Xe.jsx)(_d,{size:d[t]}),(0,Xe.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(0,Xe.jsxs)("a",{href:`${n}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Xe.jsx)(bs,{size:d[t]}),(0,Xe.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Xe.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function cTe({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,Yi.useState)(null),[a,i]=(0,Yi.useState)(!0);(0,Yi.useEffect)(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();n(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),n(1240)}finally{i(!1)}})()},[]);let s=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return(0,Xe.jsx)(Fe,{variant:"outline",size:t,className:I("moonui-theme","group",e),asChild:!0,children:(0,Xe.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Xe.jsx)(iu,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Xe.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(0,Xe.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:s(o)}),(0,Xe.jsx)(Ad,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var wc=b(E());var me=b(M());function TB({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,wc.useState)(!1),[s,l]=(0,wc.useState)(null),u=()=>{if(!o)return;i(!0),s&&clearTimeout(s);let d=setTimeout(()=>{i(!1)},n);l(d)},c=()=>{s&&(clearTimeout(s),l(null)),i(!1)};return(0,me.jsxs)("div",{className:I("relative group cursor-pointer transition-all duration-300",r),onMouseEnter:u,onMouseLeave:c,children:[(0,me.jsx)("div",{className:I("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,me.jsx)("div",{className:I("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",a?"opacity-0":"opacity-100"),children:(0,me.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,me.jsx)("div",{className:"flex justify-center",children:(0,me.jsxs)(co,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,me.jsx)(ru,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,me.jsx)("div",{className:"flex justify-center",children:(0,me.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,me.jsx)(nu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,me.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,me.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),(0,me.jsxs)(Fe,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[(0,me.jsx)(su,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),o&&!a&&(0,me.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,me.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function dY({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,wc.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,wc.useEffect)(()=>{if(!(()=>{let d={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:d.nodeEnv&&d.localhost&&!d.vercelEnv&&!d.ciEnv})()||!a){s({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let d=localStorage.getItem("moonui_cli_token"),f=localStorage.getItem("moonui_device_id");if(!d||!f){s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let p=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${d}`,"X-Device-ID":f,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(p.ok){let h=await p.json();s({isAuthenticated:!0,deviceValid:h.valid,hasProAccess:h.hasProAccess,loading:!1})}else s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[a]),i.loading)return(0,me.jsx)("div",{className:I("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",o),children:(0,me.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,me.jsx)("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&a){if(!i.isAuthenticated)return(0,me.jsxs)("div",{className:I("relative",o),children:[(0,me.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,me.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:(0,me.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,me.jsxs)(co,{variant:"destructive",className:"mb-2",children:[(0,me.jsx)(nu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,me.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,me.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,me.jsx)("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!i.deviceValid)return(0,me.jsxs)("div",{className:I("relative",o),children:[(0,me.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,me.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:(0,me.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,me.jsxs)(co,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,me.jsx)(su,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,me.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,me.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),(0,me.jsx)(Fe,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!i.hasProAccess)return(0,me.jsx)(TB,{componentName:r||t,className:o,children:n||e})}return(0,me.jsx)("div",{className:o,children:e})}function fY({className:e}){return(0,me.jsxs)(co,{variant:"secondary",className:I("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,me.jsx)(ru,{className:"w-3 h-3 mr-1"}),"PRO"]})}function pY({className:e}){return(0,me.jsx)(co,{variant:"outline",className:I("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var kB=b(E());var Cr=b(M());function sR({className:e,variant:t="default",showText:r=!0,...o}){let a=`moon-gradient-${kB.useId()}`;return(0,Cr.jsxs)("div",{className:I("moonui-theme","flex items-center gap-2",e),children:[(0,Cr.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...o,children:[t==="gradient"&&(0,Cr.jsx)("defs",{children:(0,Cr.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Cr.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Cr.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Cr.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]})}),(0,Cr.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":""}),(0,Cr.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"white",className:"dark:fill-background"})]}),r&&(0,Cr.jsxs)("span",{className:"text-xl font-bold",children:[(0,Cr.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Cr.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function wTe({className:e,variant:t="default",...r}){return(0,Cr.jsx)(sR,{showText:!1,className:e,variant:t,...r})}function CTe({className:e,variant:t="default",showText:r=!0,...o}){return(0,Cr.jsx)(sR,{className:I("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var lR=b(E());var Or=b(M()),MB=({className:e,...t})=>(0,Or.jsx)("nav",{role:"navigation","aria-label":"pagination",className:I("moonui-theme","mx-auto flex w-full justify-center",e),...t});MB.displayName="Pagination";var EB=lR.forwardRef(({className:e,...t},r)=>(0,Or.jsx)("ul",{ref:r,className:I("moonui-theme","flex flex-row items-center gap-1",e),...t}));EB.displayName="PaginationContent";var AB=lR.forwardRef(({className:e,...t},r)=>(0,Or.jsx)("li",{ref:r,className:I("moonui-theme","",e),...t}));AB.displayName="PaginationItem";var ny=({className:e,isActive:t,size:r="icon",...o})=>(0,Or.jsx)("a",{"aria-current":t?"page":void 0,className:I(gg({variant:t?"outline":"ghost",size:r}),e),...o});ny.displayName="PaginationLink";var DB=({className:e,...t})=>(0,Or.jsxs)(ny,{"aria-label":"Go to previous page",size:"md",className:I("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Or.jsx)(rn,{className:"h-4 w-4"}),(0,Or.jsx)("span",{children:"Previous"})]});DB.displayName="PaginationPrevious";var NB=({className:e,...t})=>(0,Or.jsxs)(ny,{"aria-label":"Go to next page",size:"md",className:I("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Or.jsx)("span",{children:"Next"}),(0,Or.jsx)(Pr,{className:"h-4 w-4"})]});NB.displayName="PaginationNext";var _B=({className:e,...t})=>(0,Or.jsxs)("span",{"aria-hidden":!0,className:I("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Or.jsx)(Fn,{className:"h-4 w-4"}),(0,Or.jsx)("span",{className:"sr-only",children:"More pages"})]});_B.displayName="PaginationEllipsis";var Rp=b(E());var Ji=b(E());var K=b(E(),1),hR=b(Yl(),1);function uR(e,[t,r]){return Math.min(r,Math.max(t,e))}var OB=b(E(),1);var FB=b(M(),1),cR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),mY="VisuallyHidden",Cp=OB.forwardRef((e,t)=>(0,FB.jsx)($.span,{...e,ref:t,style:{...cR,...e.style}}));Cp.displayName=mY;var VB=Cp;var ie=b(M(),1),hY=[" ","Enter","ArrowUp","ArrowDown"],vY=[" ","Enter"],hl="Select",[iy,sy,yY]=Tn(hl),[Cc,QTe]=Te(hl,[yY,Vo]),ly=Vo(),[xY,Qi]=Cc(hl),[wY,CY]=Cc(hl),BB=e=>{let{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h}=e,m=ly(t),[x,v]=K.useState(null),[g,y]=K.useState(null),[w,C]=K.useState(!1),R=_n(u),[S,L]=Ue({prop:o,defaultProp:n??!1,onChange:a,caller:hl}),[T,P]=Ue({prop:i,defaultProp:s,onChange:l,caller:hl}),N=K.useRef(null),F=x?h||!!x.closest("form"):!0,[q,A]=K.useState(new Set),G=Array.from(q).map(D=>D.props.value).join(";");return(0,ie.jsx)(ka,{...m,children:(0,ie.jsxs)(xY,{required:p,scope:t,trigger:x,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:qe(),value:T,onValueChange:P,open:S,onOpenChange:L,dir:R,triggerPointerDownPosRef:N,disabled:f,children:[(0,ie.jsx)(iy.Provider,{scope:t,children:(0,ie.jsx)(wY,{scope:e.__scopeSelect,onNativeOptionAdd:K.useCallback(D=>{A(z=>new Set(z).add(D))},[]),onNativeOptionRemove:K.useCallback(D=>{A(z=>{let B=new Set(z);return B.delete(D),B})},[]),children:r})}),F?(0,ie.jsxs)(cH,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:D=>P(D.target.value),disabled:f,form:h,children:[T===void 0?(0,ie.jsx)("option",{value:""}):null,Array.from(q)]},G):null]})})};BB.displayName=hl;var HB="SelectTrigger",UB=K.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=ly(r),i=Qi(HB,r),s=i.disabled||o,l=ne(t,i.onTriggerChange),u=sy(r),c=K.useRef("touch"),[d,f,p]=fH(m=>{let x=u().filter(y=>!y.disabled),v=x.find(y=>y.value===i.value),g=pH(x,m,v);g!==void 0&&i.onValueChange(g.value)}),h=m=>{s||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return(0,ie.jsx)(Ma,{asChild:!0,...a,children:(0,ie.jsx)($.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":dH(i.value)?"":void 0,...n,ref:l,onClick:H(n.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&h(m)}),onPointerDown:H(n.onPointerDown,m=>{c.current=m.pointerType;let x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(h(m),m.preventDefault())}),onKeyDown:H(n.onKeyDown,m=>{let x=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(x&&m.key===" ")&&hY.includes(m.key)&&(h(),m.preventDefault())})})})});UB.displayName=HB;var zB="SelectValue",WB=K.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=Qi(zB,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=ne(t,l.onValueNodeChange);return ke(()=>{u(c)},[u,c]),(0,ie.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:dH(l.value)?(0,ie.jsx)(ie.Fragment,{children:i}):a})});WB.displayName=zB;var SY="SelectIcon",GB=K.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,ie.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});GB.displayName=SY;var bY="SelectPortal",jB=e=>(0,ie.jsx)(go,{asChild:!0,...e});jB.displayName=bY;var vl="SelectContent",qB=K.forwardRef((e,t)=>{let r=Qi(vl,e.__scopeSelect),[o,n]=K.useState();if(ke(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?hR.createPortal((0,ie.jsx)($B,{scope:e.__scopeSelect,children:(0,ie.jsx)(iy.Slot,{scope:e.__scopeSelect,children:(0,ie.jsx)("div",{children:e.children})})}),a):null}return(0,ie.jsx)(KB,{...e,ref:t})});qB.displayName=vl;var Ln=10,[$B,Zi]=Cc(vl),RY="SelectContentImpl",LY=ro("SelectContent.RemoveScroll"),KB=K.forwardRef((e,t)=>{let{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:x,...v}=e,g=Qi(vl,r),[y,w]=K.useState(null),[C,R]=K.useState(null),S=ne(t,j=>w(j)),[L,T]=K.useState(null),[P,N]=K.useState(null),F=sy(r),[q,A]=K.useState(!1),G=K.useRef(!1);K.useEffect(()=>{if(y)return Bi(y)},[y]),Ni();let D=K.useCallback(j=>{let[pe,...be]=F().map(bt=>bt.ref.current),[Ne]=be.slice(-1),nt=document.activeElement;for(let bt of j)if(bt===nt||(bt?.scrollIntoView({block:"nearest"}),bt===pe&&C&&(C.scrollTop=0),bt===Ne&&C&&(C.scrollTop=C.scrollHeight),bt?.focus(),document.activeElement!==nt))return},[F,C]),z=K.useCallback(()=>D([L,y]),[D,L,y]);K.useEffect(()=>{q&&z()},[q,z]);let{onOpenChange:B,triggerPointerDownPosRef:k}=g;K.useEffect(()=>{if(y){let j={x:0,y:0},pe=Ne=>{j={x:Math.abs(Math.round(Ne.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(Ne.pageY)-(k.current?.y??0))}},be=Ne=>{j.x<=10&&j.y<=10?Ne.preventDefault():y.contains(Ne.target)||B(!1),document.removeEventListener("pointermove",pe),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",be,{capture:!0})}}},[y,B,k]),K.useEffect(()=>{let j=()=>B(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[B]);let[te,ve]=fH(j=>{let pe=F().filter(nt=>!nt.disabled),be=pe.find(nt=>nt.ref.current===document.activeElement),Ne=pH(pe,j,be);Ne&&setTimeout(()=>Ne.ref.current.focus())}),_=K.useCallback((j,pe,be)=>{let Ne=!G.current&&!be;(g.value!==void 0&&g.value===pe||Ne)&&(T(j),Ne&&(G.current=!0))},[g.value]),Z=K.useCallback(()=>y?.focus(),[y]),ae=K.useCallback((j,pe,be)=>{let Ne=!G.current&&!be;(g.value!==void 0&&g.value===pe||Ne)&&N(j)},[g.value]),Y=o==="popper"?dR:XB,ce=Y===dR?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:x}:{};return(0,ie.jsx)($B,{scope:r,content:y,viewport:C,onViewportChange:R,itemRefCallback:_,selectedItem:L,onItemLeave:Z,itemTextRefCallback:ae,focusSelectedItem:z,selectedItemText:P,position:o,isPositioned:q,searchRef:te,children:(0,ie.jsx)(Ea,{as:LY,allowPinchZoom:!0,children:(0,ie.jsx)(Pa,{asChild:!0,trapped:g.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:H(n,j=>{g.trigger?.focus({preventScroll:!0}),j.preventDefault()}),children:(0,ie.jsx)(No,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:(0,ie.jsx)(Y,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:j=>j.preventDefault(),...v,...ce,onPlaced:()=>A(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:H(v.onKeyDown,j=>{let pe=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!pe&&j.key.length===1&&ve(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let Ne=F().filter(nt=>!nt.disabled).map(nt=>nt.ref.current);if(["ArrowUp","End"].includes(j.key)&&(Ne=Ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){let nt=j.target,bt=Ne.indexOf(nt);Ne=Ne.slice(bt+1)}setTimeout(()=>D(Ne)),j.preventDefault()}})})})})})})});KB.displayName=RY;var IY="SelectItemAlignedPosition",XB=K.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=Qi(vl,r),i=Zi(vl,r),[s,l]=K.useState(null),[u,c]=K.useState(null),d=ne(t,S=>c(S)),f=sy(r),p=K.useRef(!1),h=K.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:v,focusSelectedItem:g}=i,y=K.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&x&&v){let S=a.trigger.getBoundingClientRect(),L=u.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),P=v.getBoundingClientRect();if(a.dir!=="rtl"){let nt=P.left-L.left,bt=T.left-nt,xo=S.left-bt,os=S.width+xo,Iy=Math.max(os,L.width),Py=window.innerWidth-Ln,Ty=uR(bt,[Ln,Math.max(Ln,Py-Iy)]);s.style.minWidth=os+"px",s.style.left=Ty+"px"}else{let nt=L.right-P.right,bt=window.innerWidth-T.right-nt,xo=window.innerWidth-S.right-bt,os=S.width+xo,Iy=Math.max(os,L.width),Py=window.innerWidth-Ln,Ty=uR(bt,[Ln,Math.max(Ln,Py-Iy)]);s.style.minWidth=os+"px",s.style.right=Ty+"px"}let N=f(),F=window.innerHeight-Ln*2,q=m.scrollHeight,A=window.getComputedStyle(u),G=parseInt(A.borderTopWidth,10),D=parseInt(A.paddingTop,10),z=parseInt(A.borderBottomWidth,10),B=parseInt(A.paddingBottom,10),k=G+D+q+B+z,te=Math.min(x.offsetHeight*5,k),ve=window.getComputedStyle(m),_=parseInt(ve.paddingTop,10),Z=parseInt(ve.paddingBottom,10),ae=S.top+S.height/2-Ln,Y=F-ae,ce=x.offsetHeight/2,j=x.offsetTop+ce,pe=G+D+j,be=k-pe;if(pe<=ae){let nt=N.length>0&&x===N[N.length-1].ref.current;s.style.bottom="0px";let bt=u.clientHeight-m.offsetTop-m.offsetHeight,xo=Math.max(Y,ce+(nt?Z:0)+bt+z),os=pe+xo;s.style.height=os+"px"}else{let nt=N.length>0&&x===N[0].ref.current;s.style.top="0px";let xo=Math.max(ae,G+m.offsetTop+(nt?_:0)+ce)+be;s.style.height=xo+"px",m.scrollTop=pe-ae+m.offsetTop}s.style.margin=`${Ln}px 0`,s.style.minHeight=te+"px",s.style.maxHeight=F+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,v,a.dir,o]);ke(()=>y(),[y]);let[w,C]=K.useState();ke(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let R=K.useCallback(S=>{S&&h.current===!0&&(y(),g?.(),h.current=!1)},[y,g]);return(0,ie.jsx)(TY,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:R,children:(0,ie.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,ie.jsx)($.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});XB.displayName=IY;var PY="SelectPopperPosition",dR=K.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=Ln,...a}=e,i=ly(r);return(0,ie.jsx)(Fi,{...i,...a,ref:t,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});dR.displayName=PY;var[TY,vR]=Cc(vl,{}),fR="SelectViewport",YB=K.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=Zi(fR,r),i=vR(fR,r),s=ne(t,a.onViewportChange),l=K.useRef(0);return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,ie.jsx)(iy.Slot,{scope:r,children:(0,ie.jsx)($.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:H(n.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-c.scrollTop);if(p>0){let h=window.innerHeight-Ln*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),v=Math.max(m,x);if(v<h){let g=v+p,y=Math.min(h,g),w=g-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});YB.displayName=fR;var QB="SelectGroup",[kY,MY]=Cc(QB),ZB=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=qe();return(0,ie.jsx)(kY,{scope:r,id:n,children:(0,ie.jsx)($.div,{role:"group","aria-labelledby":n,...o,ref:t})})});ZB.displayName=QB;var JB="SelectLabel",eH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=MY(JB,r);return(0,ie.jsx)($.div,{id:n.id,...o,ref:t})});eH.displayName=JB;var ay="SelectItem",[EY,tH]=Cc(ay),rH=K.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=Qi(ay,r),l=Zi(ay,r),u=s.value===o,[c,d]=K.useState(a??""),[f,p]=K.useState(!1),h=ne(t,g=>l.itemRefCallback?.(g,o,n)),m=qe(),x=K.useRef("touch"),v=()=>{n||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,ie.jsx)(EY,{scope:r,value:o,disabled:n,textId:m,isSelected:u,onItemTextChange:K.useCallback(g=>{d(y=>y||(g?.textContent??"").trim())},[]),children:(0,ie.jsx)(iy.ItemSlot,{scope:r,value:o,disabled:n,textValue:c,children:(0,ie.jsx)($.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...i,ref:h,onFocus:H(i.onFocus,()=>p(!0)),onBlur:H(i.onBlur,()=>p(!1)),onClick:H(i.onClick,()=>{x.current!=="mouse"&&v()}),onPointerUp:H(i.onPointerUp,()=>{x.current==="mouse"&&v()}),onPointerDown:H(i.onPointerDown,g=>{x.current=g.pointerType}),onPointerMove:H(i.onPointerMove,g=>{x.current=g.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:H(i.onPointerLeave,g=>{g.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:H(i.onKeyDown,g=>{l.searchRef?.current!==""&&g.key===" "||(vY.includes(g.key)&&v(),g.key===" "&&g.preventDefault())})})})})});rH.displayName=ay;var Sp="SelectItemText",oH=K.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=Qi(Sp,r),s=Zi(Sp,r),l=tH(Sp,r),u=CY(Sp,r),[c,d]=K.useState(null),f=ne(t,v=>d(v),l.onItemTextChange,v=>s.itemTextRefCallback?.(v,l.value,l.disabled)),p=c?.textContent,h=K.useMemo(()=>(0,ie.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return ke(()=>(m(h),()=>x(h)),[m,x,h]),(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)($.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?hR.createPortal(a.children,i.valueNode):null]})});oH.displayName=Sp;var nH="SelectItemIndicator",aH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return tH(nH,r).isSelected?(0,ie.jsx)($.span,{"aria-hidden":!0,...o,ref:t}):null});aH.displayName=nH;var pR="SelectScrollUpButton",iH=K.forwardRef((e,t)=>{let r=Zi(pR,e.__scopeSelect),o=vR(pR,e.__scopeSelect),[n,a]=K.useState(!1),i=ne(t,o.onScrollButtonChange);return ke(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,ie.jsx)(lH,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});iH.displayName=pR;var mR="SelectScrollDownButton",sH=K.forwardRef((e,t)=>{let r=Zi(mR,e.__scopeSelect),o=vR(mR,e.__scopeSelect),[n,a]=K.useState(!1),i=ne(t,o.onScrollButtonChange);return ke(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,ie.jsx)(lH,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});sH.displayName=mR;var lH=K.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Zi("SelectScrollButton",r),i=K.useRef(null),s=sy(r),l=K.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return K.useEffect(()=>()=>l(),[l]),ke(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,ie.jsx)($.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:H(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:H(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:H(n.onPointerLeave,()=>{l()})})}),AY="SelectSeparator",uH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,ie.jsx)($.div,{"aria-hidden":!0,...o,ref:t})});uH.displayName=AY;var gR="SelectArrow",DY=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=ly(r),a=Qi(gR,r),i=Zi(gR,r);return a.open&&i.position==="popper"?(0,ie.jsx)(Vi,{...n,...o,ref:t}):null});DY.displayName=gR;var NY="SelectBubbleInput",cH=K.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=K.useRef(null),a=ne(o,n),i=qu(t);return K.useEffect(()=>{let s=n.current;if(!s)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&c){let d=new Event("change",{bubbles:!0});c.call(s,t),s.dispatchEvent(d)}},[i,t]),(0,ie.jsx)($.select,{...r,style:{...cR,...r.style},ref:a,defaultValue:t})});cH.displayName=NY;function dH(e){return e===""||e===void 0}function fH(e){let t=et(e),r=K.useRef(""),o=K.useRef(0),n=K.useCallback(i=>{let s=r.current+i;t(s),function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=K.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return K.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function pH(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=_Y(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function _Y(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var mH=BB,yR=UB,gH=WB,hH=GB,vH=jB,xR=qB,yH=YB,xH=ZB,wR=eH,CR=rH,wH=oH,CH=aH,SR=iH,bR=sH,RR=uH;var He=b(M()),Sc=mH;Sc.displayName="Select";var FY=xH,bp=gH,bc=Ji.forwardRef(({className:e,children:t,variant:r="standard",size:o="md",error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,He.jsxs)(yR,{ref:c,className:I("flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none",n&&"border-error focus-visible:ring-error/30 focus-visible:border-error",a&&"border-success focus-visible:ring-success/30 focus-visible:border-success",o==="sm"&&"h-8 text-xs px-2",o==="md"&&"h-10 text-sm px-3",o==="lg"&&"h-12 text-base px-4",r==="standard"&&"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",r==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",e),...u,disabled:u.disabled||i,"data-error":n?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,He.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,He.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,He.jsxs)("div",{className:"flex items-center gap-2",children:[(0,He.jsx)(Qt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,He.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,He.jsx)(hH,{asChild:!0,children:l?(0,He.jsx)("span",{className:"opacity-60",children:l}):(0,He.jsx)(On,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));bc.displayName=yR.displayName;var LR=Ji.forwardRef(({className:e,...t},r)=>(0,He.jsx)(SR,{ref:r,className:I("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,He.jsx)(Pd,{className:"h-4 w-4"})}));LR.displayName=SR.displayName;var IR=Ji.forwardRef(({className:e,...t},r)=>(0,He.jsx)(bR,{ref:r,className:I("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,He.jsx)(On,{className:"h-4 w-4"})}));IR.displayName=bR.displayName;var Rc=Ji.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,He.jsx)(vH,{children:(0,He.jsxs)(xR,{ref:s,side:o,sideOffset:n,align:a,avoidCollisions:!1,className:I(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900 text-foreground","shadow-lg dark:shadow-gray-900/20","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=open]:duration-150"],r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[(0,He.jsx)(LR,{}),(0,He.jsx)(yH,{className:I("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,He.jsx)(IR,{})]})}));Rc.displayName=xR.displayName;var SH=Ji.forwardRef(({className:e,...t},r)=>(0,He.jsx)(wR,{ref:r,className:I("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));SH.displayName=wR.displayName;var Fr=Ji.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,He.jsxs)(CR,{ref:s,className:I("relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o==="sm"&&"py-1 pl-7 pr-2 text-xs",o==="md"&&"py-1.5 pl-8 pr-2 text-sm",o==="lg"&&"py-2 pl-9 pr-3 text-base",r==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",r==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",r==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",r==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",r==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...i,children:[(0,He.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,He.jsx)(CH,{children:a||(0,He.jsx)(sr,{className:"h-4 w-4"})})}),(0,He.jsx)(wH,{children:t}),n&&(0,He.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Fr.displayName=CR.displayName;var bH=Ji.forwardRef(({className:e,...t},r)=>(0,He.jsx)(RR,{ref:r,className:I("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));bH.displayName=RR.displayName;var jt=b(M()),VY=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],RH=(e,t)=>{let r=e.replace(/\D/g,"");switch(t){case"+1":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:`(${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,10)}`;case"+44":return r.length<=4?r:r.length<=7?`${r.slice(0,4)} ${r.slice(4)}`:`${r.slice(0,4)} ${r.slice(4,7)} ${r.slice(7,11)}`;case"+90":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:r.length<=9?`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6)}`:`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8,10)}`;default:let o="";for(let n=0;n<r.length;n++)n>0&&n%3===0&&(o+=" "),o+=r[n];return o}},BY=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},LH=Rp.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=VY,size:s,...l},u)=>{let[c,d]=Rp.useState(o),[f,p]=Rp.useState(t),h=i.find(g=>g.code===c)||i[0],m=g=>{let y=g.target.value.replace(/\D/g,""),w=BY(c),C=y.slice(0,w),R=RH(C,c);p(C),r?.(C,c),g.target.value=R},x=g=>{d(g),r?.(f,g)},v=RH(f,c);return(0,jt.jsxs)("div",{className:I("relative flex gap-2",e),children:[a&&(0,jt.jsxs)(Sc,{value:c,onValueChange:x,children:[(0,jt.jsx)(bc,{className:"w-[120px]",children:(0,jt.jsx)(bp,{children:(0,jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jt.jsx)("span",{children:h.flag}),(0,jt.jsx)("span",{children:h.code})]})})}),(0,jt.jsx)(Rc,{children:i.map(g=>(0,jt.jsx)(Fr,{value:g.code,children:(0,jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jt.jsx)("span",{children:g.flag}),(0,jt.jsx)("span",{children:g.code}),(0,jt.jsx)("span",{className:"text-muted-foreground",children:g.name})]})},g.code))})]}),(0,jt.jsxs)("div",{className:"relative flex-1",children:[(0,jt.jsx)(pr,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:m,className:I(n&&"pl-10",e),...l}),n&&(0,jt.jsx)(zd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});LH.displayName="PhoneInput";var Go=b(E());var yo=b(M()),HY=J("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),IH=Go.createContext({}),PH=Go.forwardRef(({className:e,value:t,onValueChange:r,disabled:o,name:n,...a},i)=>(0,yo.jsx)(IH.Provider,{value:{value:t,onValueChange:r,disabled:o,name:n},children:(0,yo.jsx)("div",{ref:i,role:"radiogroup",className:I("moonui-theme","grid gap-2",e),...a})}));PH.displayName="RadioGroup";var PR=Go.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=Go.useContext(IH),c=Go.useId(),d=n||c,f=u.value===a,p=h=>{u.onValueChange&&u.onValueChange(h.target.value),s.onChange&&s.onChange(h)};return(0,yo.jsxs)("div",{className:"relative flex items-center",children:[(0,yo.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||u.disabled,name:u.name,onChange:p,className:"sr-only",...s}),(0,yo.jsx)("label",{htmlFor:d,className:I(HY({variant:t,size:r}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,yo.jsx)("span",{className:I("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,yo.jsx)(Ss,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});PR.displayName="RadioGroupItem";var TR=Go.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,yo.jsx)("label",{ref:a,htmlFor:t,className:I("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));TR.displayName="RadioLabel";var TH=Go.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=Go.useId(),i=e||a;return(0,yo.jsxs)("div",{className:"flex items-center",children:[(0,yo.jsx)(PR,{ref:n,id:i,...o}),(0,yo.jsx)(TR,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});TH.displayName="RadioItemWithLabel";var Wa=b(M());function UY({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,Wa.jsxs)("div",{className:I("border border-input rounded-md",o),children:[(0,Wa.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,Wa.jsxs)("div",{className:"flex gap-1",children:[(0,Wa.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Bold (Pro feature)",children:"B"}),(0,Wa.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Italic (Pro feature)",children:"I"}),(0,Wa.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Underline (Pro feature)",children:"U"})]})}),(0,Wa.jsx)("textarea",{value:e,onChange:a,placeholder:r,disabled:n,className:I("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}var NR=b(E());var oe=b(Pe(),1);var uy=b(Pe(),1),zY=b(vn(),1),WY=uy.createContext(void 0);function kH(e){let t=uy.useContext(WY);return e||t||"ltr"}function MH(e,[t,r]){return Math.min(r,Math.max(t,e))}var AH=b(Pe(),1),Ae=b(vn(),1);function GY(e,t){return AH.useReducer((r,o)=>t[r][o]??r,e)}var kR="ScrollArea",[DH,bke]=gv(kR),[jY,jo]=DH(kR),NH=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=oe.useState(null),[u,c]=oe.useState(null),[d,f]=oe.useState(null),[p,h]=oe.useState(null),[m,x]=oe.useState(null),[v,g]=oe.useState(0),[y,w]=oe.useState(0),[C,R]=oe.useState(!1),[S,L]=oe.useState(!1),T=Gt(t,N=>l(N)),P=kH(n);return(0,Ae.jsx)(jY,{scope:r,type:o,dir:P,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:C,onScrollbarXEnabledChange:R,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:L,onCornerWidthChange:g,onCornerHeightChange:w,children:(0,Ae.jsx)(_e.div,{dir:P,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});NH.displayName=kR;var _H="ScrollAreaViewport",OH=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=jo(_H,r),s=oe.useRef(null),l=Gt(t,s,i.onViewportChange);return(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,Ae.jsx)(_e.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Ae.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});OH.displayName=_H;var Zn="ScrollAreaScrollbar",fy=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=jo(Zn,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return oe.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,Ae.jsx)(qY,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,Ae.jsx)($Y,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,Ae.jsx)(FH,{...o,ref:t,forceMount:r}):n.type==="always"?(0,Ae.jsx)(MR,{...o,ref:t}):null});fy.displayName=Zn;var qY=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=jo(Zn,e.__scopeScrollArea),[a,i]=oe.useState(!1);return oe.useEffect(()=>{let s=n.scrollArea,l=0;if(s){let u=()=>{window.clearTimeout(l),i(!0)},c=()=>{l=window.setTimeout(()=>i(!1),n.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[n.scrollArea,n.scrollHideDelay]),(0,Ae.jsx)(Yn,{present:r||a,children:(0,Ae.jsx)(FH,{"data-state":a?"visible":"hidden",...o,ref:t})})}),$Y=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=jo(Zn,e.__scopeScrollArea),a=e.orientation==="horizontal",i=my(()=>l("SCROLL_END"),100),[s,l]=GY("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return oe.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),oe.useEffect(()=>{let u=n.viewport,c=a?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let p=u[c];d!==p&&(l("SCROLL"),i()),d=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[n.viewport,a,l,i]),(0,Ae.jsx)(Yn,{present:r||s!=="hidden",children:(0,Ae.jsx)(MR,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:Pt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Pt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),FH=oe.forwardRef((e,t)=>{let r=jo(Zn,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=oe.useState(!1),s=e.orientation==="horizontal",l=my(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return Lc(r.viewport,l),Lc(r.content,l),(0,Ae.jsx)(Yn,{present:o||a,children:(0,Ae.jsx)(MR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),MR=oe.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=jo(Zn,e.__scopeScrollArea),a=oe.useRef(null),i=oe.useRef(0),[s,l]=oe.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=UH(s.viewport,s.content),c={...o,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return JY(f,i.current,s,p)}return r==="horizontal"?(0,Ae.jsx)(KY,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=EH(f,s,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollLeft=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollLeft=d(f,n.dir))}}):r==="vertical"?(0,Ae.jsx)(XY,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=EH(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollTop=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollTop=d(f))}}):null}),KY=oe.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=jo(Zn,e.__scopeScrollArea),[i,s]=oe.useState(),l=oe.useRef(null),u=Gt(t,l,a.onScrollbarXChange);return oe.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Ae.jsx)(BH,{"data-orientation":"horizontal",...n,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":py(r)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),WH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:dy(i.paddingLeft),paddingEnd:dy(i.paddingRight)}})}})}),XY=oe.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=jo(Zn,e.__scopeScrollArea),[i,s]=oe.useState(),l=oe.useRef(null),u=Gt(t,l,a.onScrollbarYChange);return oe.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Ae.jsx)(BH,{"data-orientation":"vertical",...n,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":py(r)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),WH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:dy(i.paddingTop),paddingEnd:dy(i.paddingBottom)}})}})}),[YY,VH]=DH(Zn),BH=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=jo(Zn,r),[h,m]=oe.useState(null),x=Gt(t,T=>m(T)),v=oe.useRef(null),g=oe.useRef(""),y=p.viewport,w=o.content-o.viewport,C=gr(c),R=gr(l),S=my(d,10);function L(T){if(v.current){let P=T.clientX-v.current.left,N=T.clientY-v.current.top;u({x:P,y:N})}}return oe.useEffect(()=>{let T=P=>{let N=P.target;h?.contains(N)&&C(P,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[y,h,w,C]),oe.useEffect(R,[o,R]),Lc(h,S),Lc(p.content,S),(0,Ae.jsx)(YY,{scope:r,scrollbar:h,hasThumb:n,onThumbChange:gr(a),onThumbPointerUp:gr(i),onThumbPositionChange:R,onThumbPointerDown:gr(s),children:(0,Ae.jsx)(_e.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Pt(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=h.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),L(T))}),onPointerMove:Pt(e.onPointerMove,L),onPointerUp:Pt(e.onPointerUp,T=>{let P=T.target;P.hasPointerCapture(T.pointerId)&&P.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=g.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),cy="ScrollAreaThumb",ER=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=VH(cy,e.__scopeScrollArea);return(0,Ae.jsx)(Yn,{present:r||n.hasThumb,children:(0,Ae.jsx)(QY,{ref:t,...o})})}),QY=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=jo(cy,r),i=VH(cy,r),{onThumbPositionChange:s}=i,l=Gt(t,d=>i.onThumbChange(d)),u=oe.useRef(void 0),c=my(()=>{u.current&&(u.current(),u.current=void 0)},100);return oe.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=eQ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,Ae.jsx)(_e.div,{"data-state":i.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Pt(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:h,y:m})}),onPointerUp:Pt(e.onPointerUp,i.onThumbPointerUp)})});ER.displayName=cy;var AR="ScrollAreaCorner",HH=oe.forwardRef((e,t)=>{let r=jo(AR,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,Ae.jsx)(ZY,{...e,ref:t}):null});HH.displayName=AR;var ZY=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=jo(AR,r),[a,i]=oe.useState(0),[s,l]=oe.useState(0),u=!!(a&&s);return Lc(n.scrollbarX,()=>{let c=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(c),l(c)}),Lc(n.scrollbarY,()=>{let c=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(c),i(c)}),u?(0,Ae.jsx)(_e.div,{...o,ref:t,style:{width:a,height:s,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function dy(e){return e?parseInt(e,10):0}function UH(e,t){let r=e/t;return isNaN(r)?0:r}function py(e){let t=UH(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function JY(e,t,r,o="ltr"){let n=py(r),a=n/2,i=t||a,s=n-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,c=r.content-r.viewport,d=o==="ltr"?[0,c]:[c*-1,0];return zH([l,u],d)(e)}function EH(e,t,r="ltr"){let o=py(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-o,l=r==="ltr"?[0,i]:[i*-1,0],u=MH(e,l);return zH([0,i],[0,s])(u)}function zH(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function WH(e,t){return e>0&&e<t}var eQ=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function my(e,t){let r=gr(e),o=oe.useRef(0);return oe.useEffect(()=>()=>window.clearTimeout(o.current),[]),oe.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function Lc(e,t){let r=gr(t);yn(()=>{let o=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var DR=NH,GH=OH;var jH=HH;var es=b(M()),qH=NR.forwardRef(({className:e,children:t,...r},o)=>(0,es.jsxs)(DR,{ref:o,className:I("relative overflow-hidden",e),...r,children:[(0,es.jsx)(GH,{className:"h-full w-full rounded-[inherit]",children:t}),(0,es.jsx)(_R,{}),(0,es.jsx)(jH,{})]}));qH.displayName=DR.displayName;var _R=NR.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,es.jsx)(fy,{ref:o,orientation:t,className:I("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,es.jsx)(ER,{className:"relative flex-1 rounded-full bg-border"})}));_R.displayName=fy.displayName;var QH=b(E());var KH=b(E(),1);var XH=b(M(),1),rQ="Separator",$H="horizontal",oQ=["horizontal","vertical"],YH=KH.forwardRef((e,t)=>{let{decorative:r,orientation:o=$H,...n}=e,a=nQ(o)?o:$H,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,XH.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});YH.displayName=rQ;function nQ(e){return oQ.includes(e)}var OR=YH;var ZH=b(M()),iQ=J("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),qo=QH.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,ZH.jsx)(OR,{ref:i,decorative:n,orientation:t||void 0,className:I(iQ({orientation:t,variant:r,size:o}),e),...a}));qo.displayName=OR.displayName;var Ye=b(E());var o3=b(E());var JH=b(Pe(),1);var e3=b(vn(),1),t3="Toggle",r3=JH.forwardRef((e,t)=>{let{pressed:r,defaultPressed:o,onPressedChange:n,...a}=e,[i,s]=hv({prop:r,onChange:n,defaultProp:o??!1,caller:t3});return(0,e3.jsx)(_e.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Pt(e.onClick,()=>{e.disabled||s(!i)})})});r3.displayName=t3;var FR=r3;var a3=b(M()),n3=J("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),gy=o3.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,a3.jsx)(FR,{ref:n,className:I("moonui-theme",n3({variant:t,size:r,className:e})),...o}));gy.displayName=FR.displayName;var yy=b(E());var he=b(E(),1);var Tt=b(M(),1),[hy,$ke]=Te("Tooltip",[Vo]),vy=Vo(),i3="TooltipProvider",lQ=700,VR="tooltip.open",[uQ,HR]=hy(i3),s3=e=>{let{__scopeTooltip:t,delayDuration:r=lQ,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,i=he.useRef(!0),s=he.useRef(!1),l=he.useRef(0);return he.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,Tt.jsx)(uQ,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:he.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:he.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:he.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};s3.displayName=i3;var Lp="Tooltip",[cQ,Ip]=hy(Lp),l3=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=HR(Lp,e.__scopeTooltip),u=vy(t),[c,d]=he.useState(null),f=qe(),p=he.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,x=he.useRef(!1),[v,g]=Ue({prop:o,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(VR))):l.onClose(),a?.(S)},caller:Lp}),y=he.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),w=he.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,g(!0)},[g]),C=he.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),R=he.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,g(!0),p.current=0},m)},[m,g]);return he.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,Tt.jsx)(ka,{...u,children:(0,Tt.jsx)(cQ,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:he.useCallback(()=>{l.isOpenDelayedRef.current?R():w()},[l.isOpenDelayedRef,R,w]),onTriggerLeave:he.useCallback(()=>{h?C():(window.clearTimeout(p.current),p.current=0)},[C,h]),onOpen:w,onClose:C,disableHoverableContent:h,children:r})})};l3.displayName=Lp;var BR="TooltipTrigger",u3=he.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Ip(BR,r),a=HR(BR,r),i=vy(r),s=he.useRef(null),l=ne(t,s,n.onTriggerChange),u=he.useRef(!1),c=he.useRef(!1),d=he.useCallback(()=>u.current=!1,[]);return he.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,Tt.jsx)(Ma,{asChild:!0,...i,children:(0,Tt.jsx)($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:H(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:H(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:H(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:H(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:H(e.onBlur,n.onClose),onClick:H(e.onClick,n.onClose)})})});u3.displayName=BR;var UR="TooltipPortal",[dQ,fQ]=hy(UR,{forceMount:void 0}),pQ=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Ip(UR,t);return(0,Tt.jsx)(dQ,{scope:t,forceMount:r,children:(0,Tt.jsx)(it,{present:r||a.open,children:(0,Tt.jsx)(go,{asChild:!0,container:n,children:o})})})};pQ.displayName=UR;var Ic="TooltipContent",c3=he.forwardRef((e,t)=>{let r=fQ(Ic,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Ip(Ic,e.__scopeTooltip);return(0,Tt.jsx)(it,{present:o||i.open,children:i.disableHoverableContent?(0,Tt.jsx)(d3,{side:n,...a,ref:t}):(0,Tt.jsx)(mQ,{side:n,...a,ref:t})})}),mQ=he.forwardRef((e,t)=>{let r=Ip(Ic,e.__scopeTooltip),o=HR(Ic,e.__scopeTooltip),n=he.useRef(null),a=ne(t,n),[i,s]=he.useState(null),{trigger:l,onClose:u}=r,c=n.current,{onPointerInTransitChange:d}=o,f=he.useCallback(()=>{s(null),d(!1)},[d]),p=he.useCallback((h,m)=>{let x=h.currentTarget,v={x:h.clientX,y:h.clientY},g=yQ(v,x.getBoundingClientRect()),y=xQ(v,g),w=wQ(m.getBoundingClientRect()),C=SQ([...y,...w]);s(C),d(!0)},[d]);return he.useEffect(()=>()=>f(),[f]),he.useEffect(()=>{if(l&&c){let h=x=>p(x,c),m=x=>p(x,l);return l.addEventListener("pointerleave",h),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",h),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),he.useEffect(()=>{if(i){let h=m=>{let x=m.target,v={x:m.clientX,y:m.clientY},g=l?.contains(x)||c?.contains(x),y=!CQ(v,i);g?f():y&&(f(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,c,i,u,f]),(0,Tt.jsx)(d3,{...e,ref:a})}),[gQ,hQ]=hy(Lp,{isInside:!1}),vQ=NL("TooltipContent"),d3=he.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Ip(Ic,r),u=vy(r),{onClose:c}=l;return he.useEffect(()=>(document.addEventListener(VR,c),()=>document.removeEventListener(VR,c)),[c]),he.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,Tt.jsx)(No,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,Tt.jsxs)(Fi,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,Tt.jsx)(vQ,{children:o}),(0,Tt.jsx)(gQ,{scope:r,isInside:!0,children:(0,Tt.jsx)(VB,{id:l.contentId,role:"tooltip",children:n||o})})]})})});c3.displayName=Ic;var f3="TooltipArrow",p3=he.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=vy(r);return hQ(f3,r).isInside?null:(0,Tt.jsx)(Vi,{...n,...o,ref:t})});p3.displayName=f3;function yQ(e,t){let r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function xQ(e,t,r=5){let o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function wQ(e){let{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function CQ(e,t){let{x:r,y:o}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function SQ(e){let t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),bQ(t)}function bQ(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let n=e[o];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let o=e.length-1;o>=0;o--){let n=e[o];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var m3=s3,g3=l3,h3=u3;var zR=c3,WR=p3;var ts=b(M()),GR=m3,LQ=J("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500 text-white border-green-600",warning:"bg-yellow-500 text-white border-yellow-600",destructive:"bg-destructive text-destructive-foreground",info:"bg-blue-500 text-white border-blue-600"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),xy=g3,wy=h3,v3=yy.forwardRef(({className:e,...t},r)=>(0,ts.jsx)(WR,{ref:r,className:I("moonui-theme","fill-current",e),...t}));v3.displayName=WR.displayName;var Pp=yy.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,ts.jsxs)(zR,{ref:i,sideOffset:n,className:I("moonui-theme",LQ({variant:t,size:r}),e),...a,children:[a.children,o&&(0,ts.jsx)(v3,{})]}));Pp.displayName=zR.displayName;var IQ=yy.forwardRef(({children:e,content:t,variant:r="default",size:o="md",side:n="top",align:a="center",delayDuration:i=400,sideOffset:s=4,showArrow:l=!1,className:u,open:c,defaultOpen:d,onOpenChange:f,...p},h)=>(0,ts.jsxs)(xy,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,ts.jsx)(wy,{asChild:!0,children:e}),(0,ts.jsx)(Pp,{ref:h,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));IQ.displayName="SimpleTooltip";var V=b(M()),Vt=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,V.jsxs)(xy,{children:[(0,V.jsx)(wy,{asChild:!0,children:(0,V.jsx)(gy,{pressed:r,onPressedChange:()=>o(),disabled:n,className:"h-8 w-8 p-0",children:e})}),(0,V.jsx)(Pp,{children:(0,V.jsx)("p",{children:t})})]}),PQ=({onColorSelect:e})=>(0,V.jsx)("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(r=>(0,V.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:r},onClick:()=>e(r)},r))}),y3=Ye.default.forwardRef(({value:e="",onChange:t,placeholder:r="Start writing...",disabled:o=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,Ye.useState)(e),[p,h]=(0,Ye.useState)(!1),[m,x]=(0,Ye.useState)(e),[v,g]=(0,Ye.useState)(null),y=Ye.default.useRef(null),w=Ye.default.useRef(null),[C,R]=(0,Ye.useState)({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),S=(0,Ye.useCallback)(k=>{f(k),t?.(k)},[t]),L=(0,Ye.useCallback)(()=>{let k=window.getSelection();return k&&k.rangeCount>0?k.getRangeAt(0):null},[]),T=(0,Ye.useCallback)(k=>{if(!k)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(k))},[]),P=(0,Ye.useCallback)((k,te)=>{if(o)return;y.current&&y.current.focus();let ve=L();if(document.execCommand(k,!1,te)||console.warn(`Command '${k}' failed to execute`),y.current){let Z=y.current.innerHTML;S(Z)}R({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),y.current&&y.current.focus()},[o,L,S]),N=(0,Ye.useCallback)(k=>{let te=k.currentTarget.innerHTML;S(te)},[S]),F=(0,Ye.useCallback)(k=>{if(k.ctrlKey||k.metaKey)switch(k.key){case"b":k.preventDefault(),P("bold");break;case"i":k.preventDefault(),P("italic");break;case"u":k.preventDefault(),P("underline");break;case"z":k.preventDefault(),k.shiftKey?P("redo"):P("undo");break}k.key==="Tab"&&(k.preventDefault(),P("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[P]),q=(0,Ye.useCallback)(()=>{let k=prompt("Enter URL:");k&&P("createLink",k)},[P]),A=(0,Ye.useCallback)(()=>{let k=prompt("Enter image URL:");k&&P("insertImage",k)},[P]),G=(0,Ye.useCallback)(k=>{P("formatBlock",`<h${k}>`)},[P]),D=(0,Ye.useCallback)(k=>{let te=window.getSelection();if(te&&te.rangeCount>0){let ve=te.getRangeAt(0),_=document.createElement("span");_.style.color=k;try{ve.surroundContents(_)}catch{P("foreColor",k)}if(y.current){let Z=y.current.innerHTML;S(Z)}}},[P,S]),z=k=>{if(typeof window>"u")return k.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'");let te=document.createElement("div");return te.innerHTML=k,te.textContent||te.innerText||""};Ye.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),Ye.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,V.jsx)(GR,{children:(0,V.jsxs)(We.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!p&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("div",{className:"flex items-center gap-1",children:[(0,V.jsx)(Vt,{icon:(0,V.jsx)(Id,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>P("bold"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Od,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>P("italic"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(qd,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>P("underline"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(jd,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>P("strikeThrough"),disabled:o})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)(Sc,{onValueChange:k=>{k.startsWith("h")?G(k.substring(1)):k==="normal"?P("formatBlock","p"):P("fontSize",k)},disabled:o,children:[(0,V.jsx)(bc,{className:"w-24 h-8",children:(0,V.jsx)(bp,{placeholder:"Size"})}),(0,V.jsxs)(Rc,{children:[(0,V.jsx)(Fr,{value:"1",children:"Small"}),(0,V.jsx)(Fr,{value:"3",children:"Normal"}),(0,V.jsx)(Fr,{value:"5",children:"Large"}),(0,V.jsx)(Fr,{value:"7",children:"X-Large"}),(0,V.jsx)(qo,{className:"my-1"}),(0,V.jsx)(Fr,{value:"h1",children:"Heading 1"}),(0,V.jsx)(Fr,{value:"h2",children:"Heading 2"}),(0,V.jsx)(Fr,{value:"h3",children:"Heading 3"}),(0,V.jsx)(Fr,{value:"h4",children:"Heading 4"}),(0,V.jsx)(Fr,{value:"h5",children:"Heading 5"}),(0,V.jsx)(Fr,{value:"h6",children:"Heading 6"})]})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)("div",{className:"flex items-center gap-1",children:[(0,V.jsx)(Vt,{icon:(0,V.jsx)(Rd,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>P("justifyLeft"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Sd,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>P("justifyCenter"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Ld,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>P("justifyRight"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(bd,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>P("justifyFull"),disabled:o})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)("div",{className:"flex items-center gap-1",children:[(0,V.jsx)(Vt,{icon:(0,V.jsx)(Bd,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>P("insertUnorderedList"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Vd,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>P("insertOrderedList"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Wd,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>P("formatBlock","blockquote"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(kd,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>P("formatBlock","pre"),disabled:o})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)("div",{className:"flex items-center gap-1",children:[(0,V.jsx)(Vt,{icon:(0,V.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>P("outdent"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>P("indent"),disabled:o})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)("div",{className:"flex items-center gap-1",children:[(0,V.jsx)(Vt,{icon:(0,V.jsx)(Fd,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:q,disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Rs,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:A,disabled:o})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)(Aa,{children:[(0,V.jsx)(Da,{asChild:!0,children:(0,V.jsx)(Fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,V.jsx)(au,{className:"h-3 w-3"})})}),(0,V.jsx)(Kn,{className:"w-auto p-0",children:(0,V.jsx)(PQ,{onColorSelect:D})})]}),(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsxs)("div",{className:"flex items-center gap-1",children:[(0,V.jsx)(Vt,{icon:(0,V.jsx)($d,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>P("undo"),disabled:o}),(0,V.jsx)(Vt,{icon:(0,V.jsx)(Gd,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>P("redo"),disabled:o})]})]}),l&&(0,V.jsxs)(V.Fragment,{children:[!p&&(0,V.jsx)(qo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,V.jsx)(Vt,{icon:p?(0,V.jsx)(jr,{className:"h-3 w-3"}):(0,V.jsx)(bs,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),h(!p)},disabled:o})]})]})});return(0,V.jsxs)("div",{ref:c,className:I("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",o&&"opacity-50 cursor-not-allowed",n),...u,children:[B,(0,V.jsxs)("div",{className:"relative",children:[p?(0,V.jsx)(We.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:a,maxHeight:i,overflow:"auto"},children:(0,V.jsx)("textarea",{ref:w,value:m,onChange:k=>x(k.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:a-32},disabled:o,placeholder:"HTML source code..."})}):(0,V.jsx)(We.div,{ref:y,contentEditable:!o,suppressContentEditableWarning:!0,className:I("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-slate-50 dark:bg-zinc-900/95","text-gray-900 dark:text-gray-100","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:a,maxHeight:i},onInput:N,onKeyDown:F,"data-placeholder":r,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,V.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:r})]}),(0,V.jsx)("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:(0,V.jsx)(TQ,{content:d})})]})});y3.displayName="SimpleEditor";var TQ=({content:e})=>{let[t,r]=(0,Ye.useState)(0);return(0,Ye.useEffect)(()=>{r((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,V.jsxs)(V.Fragment,{children:[t," characters"]})};var Tp=b(E());var qt=b(M()),x3=J("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{default:"",sm:"scale-90",lg:"scale-110"},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"default",shape:"rect",animation:"pulse"}}),rs=Tp.forwardRef(({className:e,variant:t,size:r,shape:o,animation:n,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},p)=>{let{onDrag:h,onDragEnd:m,onDragStart:x,onAnimationStart:v,onAnimationEnd:g,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,qt.jsx)(We.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:I("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,qt.jsx)("div",{ref:p,className:I("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?We.div:"div";return(0,qt.jsx)(C,{ref:p,className:I("moonui-theme",x3({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?HA:{},...w})});rs.displayName="Skeleton";var jR=Tp.forwardRef(({className:e,lines:t=3,lineHeight:r="0.85rem",spacing:o="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,qt.jsx)("div",{ref:u,className:I("moonui-theme","flex flex-col",e),style:{gap:o},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?n:a?85+d%3*5:100;return(0,qt.jsx)(rs,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));jR.displayName="SkeletonText";var qR=Tp.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,qt.jsx)(rs,{ref:a,variant:r,animation:o,shape:"circle",className:I("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));qR.displayName="SkeletonAvatar";var w3=Tp.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,qt.jsxs)("div",{ref:s,className:I("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,qt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,qt.jsx)(qR,{size:"2.5rem",variant:n,animation:a}),(0,qt.jsxs)("div",{className:"flex-1",children:[(0,qt.jsx)(rs,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,qt.jsx)(rs,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,qt.jsx)(jR,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,qt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,qt.jsx)(rs,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,qt.jsx)(rs,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));w3.displayName="SkeletonCard";var Pc=b(E());var S3=b(M()),C3=Pc.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=Pc.useState(0),[c,d]=Pc.useState(0),[f,p]=Pc.useState(!1),h=v=>{a||(u(v.touches[0].clientX),p(!0))},m=v=>{a||!f||d(v.touches[0].clientX)},x=()=>{if(a||!f)return;let v=c-l;Math.abs(v)>n&&(v>0&&o?o():v<0&&r&&r()),p(!1),d(0),u(0)};return(0,S3.jsx)("div",{ref:s,className:I("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:h,onTouchMove:m,onTouchEnd:x,...i,children:t})});C3.displayName="SwipeableCard";var k3=b(E());var In=b(E(),1);var yl=b(M(),1),Cy="Switch",[kQ,SMe]=Te(Cy),[MQ,EQ]=kQ(Cy),b3=In.forwardRef((e,t)=>{let{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=In.useState(null),h=ne(t,y=>p(y)),m=In.useRef(!1),x=f?c||!!f.closest("form"):!0,[v,g]=Ue({prop:n,defaultProp:a??!1,onChange:u,caller:Cy});return(0,yl.jsxs)(MQ,{scope:r,checked:v,disabled:s,children:[(0,yl.jsx)($.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":P3(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:H(e.onClick,y=>{g(w=>!w),x&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),x&&(0,yl.jsx)(I3,{control:f,bubbles:!m.current,name:o,value:l,checked:v,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});b3.displayName=Cy;var R3="SwitchThumb",L3=In.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=EQ(R3,r);return(0,yl.jsx)($.span,{"data-state":P3(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});L3.displayName=R3;var AQ="SwitchBubbleInput",I3=In.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=In.useRef(null),s=ne(i,a),l=qu(r),u=$u(t);return In.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let h=new Event("click",{bubbles:o});p.call(c,r),c.dispatchEvent(h)}},[l,r,o]),(0,yl.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});I3.displayName=AQ;function P3(e){return e?"checked":"unchecked"}var $R=b3,T3=L3;var Jn=b(M()),M3=k3.forwardRef(({className:e,size:t="md",variant:r="primary",loading:o,leftIcon:n,rightIcon:a,description:i,...s},l)=>(0,Jn.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,Jn.jsx)("span",{className:"text-muted-foreground",children:n}),(0,Jn.jsxs)($R,{className:I("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",r==="primary"&&"data-[state=checked]:bg-primary",r==="success"&&"data-[state=checked]:bg-success",r==="warning"&&"data-[state=checked]:bg-warning",r==="danger"&&"data-[state=checked]:bg-error",r==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",o&&"opacity-80 cursor-wait",e),disabled:o||s.disabled,...s,ref:l,children:[o?(0,Jn.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Jn.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Jn.jsx)(T3,{className:I("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),a&&(0,Jn.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Jn.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));M3.displayName=$R.displayName;var kp=b(E());var ea=b(M()),E3=kp.forwardRef(({value:e=[],onChange:t,maxTags:r,variant:o="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=kp.useState(""),[p,h]=kp.useState(""),m=g=>{g.key==="Enter"||g.key===a?(g.preventDefault(),x()):g.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},x=()=>{let g=d.trim();if(g){if(!n&&e.includes(g)){h("This tag already exists"),setTimeout(()=>h(""),2e3);return}if(r&&e.length>=r){h(`Maximum ${r} tags allowed`),setTimeout(()=>h(""),2e3);return}t([...e,g]),f(""),h("")}},v=g=>{l||t(e.filter((y,w)=>w!==g))};return(0,ea.jsxs)("div",{className:"relative",children:[(0,ea.jsxs)("div",{className:I("flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","dark:bg-zinc-950/50 dark:border-zinc-800","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",s),children:[e.map((g,y)=>(0,ea.jsxs)(co,{variant:o,className:"gap-1 pr-1.5",children:[(0,ea.jsx)("span",{className:"text-xs",children:g}),!l&&(0,ea.jsx)("button",{type:"button",onClick:()=>v(y),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,ea.jsx)(uo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},y)),(0,ea.jsx)("input",{ref:c,type:"text",value:d,onChange:g=>f(g.target.value),onKeyDown:m,onBlur:x,disabled:l,placeholder:e.length===0?i:"",className:I("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","dark:placeholder:text-zinc-500","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),p&&(0,ea.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});E3.displayName="TagsInput";var A3=b(E());var N3=b(M()),D3=A3.forwardRef(({className:e,variant:t,size:r,error:o,success:n,loading:a,autoResize:i,maxHeight:s,characterCount:l,...u},c)=>(0,N3.jsx)("textarea",{className:I("moonui-theme","flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:c,...u}));D3.displayName="Textarea";var Pn=b(E());var ge=b(E(),1),O3=b(Yl(),1);var De=b(M(),1),ZR="ToastProvider",[JR,NQ,_Q]=Tn("Toast"),[F3,zMe]=Te("Toast",[_Q]),[OQ,by]=F3(ZR),V3=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=ge.useState(null),[u,c]=ge.useState(0),d=ge.useRef(!1),f=ge.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${ZR}\`. Expected non-empty \`string\`.`),(0,De.jsx)(JR.Provider,{scope:t,children:(0,De.jsx)(OQ,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:ge.useCallback(()=>c(p=>p+1),[]),onToastRemove:ge.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};V3.displayName=ZR;var B3="ToastViewport",FQ=["F8"],XR="toast.viewportPause",YR="toast.viewportResume",H3=ge.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=FQ,label:n="Notifications ({hotkey})",...a}=e,i=by(B3,r),s=NQ(r),l=ge.useRef(null),u=ge.useRef(null),c=ge.useRef(null),d=ge.useRef(null),f=ne(t,d,i.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=i.toastCount>0;ge.useEffect(()=>{let x=v=>{o.length!==0&&o.every(y=>v[y]||v.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),ge.useEffect(()=>{let x=l.current,v=d.current;if(h&&x&&v){let g=()=>{if(!i.isClosePausedRef.current){let R=new CustomEvent(XR);v.dispatchEvent(R),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let R=new CustomEvent(YR);v.dispatchEvent(R),i.isClosePausedRef.current=!1}},w=R=>{!x.contains(R.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",g),x.addEventListener("focusout",w),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",C),window.addEventListener("blur",g),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",w),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",g),window.removeEventListener("focus",y)}}},[h,i.isClosePausedRef]);let m=ge.useCallback(({tabbingDirection:x})=>{let g=s().map(y=>{let w=y.ref.current,C=[w,...YQ(w)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?g.reverse():g).flat()},[s]);return ge.useEffect(()=>{let x=d.current;if(x){let v=g=>{let y=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!y){let C=document.activeElement,R=g.shiftKey;if(g.target===x&&R){u.current?.focus();return}let T=m({tabbingDirection:R?"backwards":"forwards"}),P=T.findIndex(N=>N===C);KR(T.slice(P+1))?g.preventDefault():R?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[s,m]),(0,De.jsxs)(LD,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,De.jsx)(QR,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});KR(x)}}),(0,De.jsx)(JR.Slot,{scope:r,children:(0,De.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),h&&(0,De.jsx)(QR,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});KR(x)}})]})});H3.displayName=B3;var U3="ToastFocusProxy",QR=ge.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=by(U3,r);return(0,De.jsx)(Cp,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});QR.displayName=U3;var Mp="Toast",VQ="toast.swipeStart",BQ="toast.swipeMove",HQ="toast.swipeCancel",UQ="toast.swipeEnd",z3=ge.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=Ue({prop:o,defaultProp:n??!0,onChange:a,caller:Mp});return(0,De.jsx)(it,{present:r||s,children:(0,De.jsx)(GQ,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:et(e.onPause),onResume:et(e.onResume),onSwipeStart:H(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:H(e.onSwipeMove,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:H(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:H(e.onSwipeEnd,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});z3.displayName=Mp;var[zQ,WQ]=F3(Mp,{onClose(){}}),GQ=ge.forwardRef((e,t)=>{let{__scopeToast:r,type:o="foreground",duration:n,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=by(Mp,r),[x,v]=ge.useState(null),g=ne(t,A=>v(A)),y=ge.useRef(null),w=ge.useRef(null),C=n||m.duration,R=ge.useRef(0),S=ge.useRef(C),L=ge.useRef(0),{onToastAdd:T,onToastRemove:P}=m,N=et(()=>{x?.contains(document.activeElement)&&m.viewport?.focus(),i()}),F=ge.useCallback(A=>{!A||A===1/0||(window.clearTimeout(L.current),R.current=new Date().getTime(),L.current=window.setTimeout(N,A))},[N]);ge.useEffect(()=>{let A=m.viewport;if(A){let G=()=>{F(S.current),u?.()},D=()=>{let z=new Date().getTime()-R.current;S.current=S.current-z,window.clearTimeout(L.current),l?.()};return A.addEventListener(XR,D),A.addEventListener(YR,G),()=>{A.removeEventListener(XR,D),A.removeEventListener(YR,G)}}},[m.viewport,C,l,u,F]),ge.useEffect(()=>{a&&!m.isClosePausedRef.current&&F(C)},[a,C,m.isClosePausedRef,F]),ge.useEffect(()=>(T(),()=>P()),[T,P]);let q=ge.useMemo(()=>x?X3(x):null,[x]);return m.viewport?(0,De.jsxs)(De.Fragment,{children:[q&&(0,De.jsx)(jQ,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:q}),(0,De.jsx)(zQ,{scope:r,onClose:N,children:O3.createPortal((0,De.jsx)(JR.ItemSlot,{scope:r,children:(0,De.jsx)(RD,{asChild:!0,onEscapeKeyDown:H(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,De.jsx)($.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:H(e.onKeyDown,A=>{A.key==="Escape"&&(s?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:H(e.onPointerDown,A=>{A.button===0&&(y.current={x:A.clientX,y:A.clientY})}),onPointerMove:H(e.onPointerMove,A=>{if(!y.current)return;let G=A.clientX-y.current.x,D=A.clientY-y.current.y,z=!!w.current,B=["left","right"].includes(m.swipeDirection),k=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,te=B?k(0,G):0,ve=B?0:k(0,D),_=A.pointerType==="touch"?10:2,Z={x:te,y:ve},ae={originalEvent:A,delta:Z};z?(w.current=Z,Sy(BQ,d,ae,{discrete:!1})):_3(Z,m.swipeDirection,_)?(w.current=Z,Sy(VQ,c,ae,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(G)>_||Math.abs(D)>_)&&(y.current=null)}),onPointerUp:H(e.onPointerUp,A=>{let G=w.current,D=A.target;if(D.hasPointerCapture(A.pointerId)&&D.releasePointerCapture(A.pointerId),w.current=null,y.current=null,G){let z=A.currentTarget,B={originalEvent:A,delta:G};_3(G,m.swipeDirection,m.swipeThreshold)?Sy(UQ,p,B,{discrete:!0}):Sy(HQ,f,B,{discrete:!0}),z.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),jQ=e=>{let{__scopeToast:t,children:r,...o}=e,n=by(Mp,t),[a,i]=ge.useState(!1),[s,l]=ge.useState(!1);return KQ(()=>i(!0)),ge.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,De.jsx)(go,{asChild:!0,children:(0,De.jsx)(Cp,{...o,children:a&&(0,De.jsxs)(De.Fragment,{children:[n.label," ",r]})})})},qQ="ToastTitle",W3=ge.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,De.jsx)($.div,{...o,ref:t})});W3.displayName=qQ;var $Q="ToastDescription",G3=ge.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,De.jsx)($.div,{...o,ref:t})});G3.displayName=$Q;var j3="ToastAction",q3=ge.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,De.jsx)(K3,{altText:r,asChild:!0,children:(0,De.jsx)(eL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${j3}\`. Expected non-empty \`string\`.`),null)});q3.displayName=j3;var $3="ToastClose",eL=ge.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=WQ($3,r);return(0,De.jsx)(K3,{asChild:!0,children:(0,De.jsx)($.button,{type:"button",...o,ref:t,onClick:H(e.onClick,n.onClose)})})});eL.displayName=$3;var K3=ge.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,De.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function X3(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),XQ(o)){let n=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...X3(o))}}),t}function Sy(e,t,r,{discrete:o}){let n=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?Ql(n,a):n.dispatchEvent(a)}var _3=(e,t,r=0)=>{let o=Math.abs(e.x),n=Math.abs(e.y),a=o>n;return t==="left"||t==="right"?a&&o>r:!a&&n>r};function KQ(e=()=>{}){let t=et(e);ke(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function XQ(e){return e.nodeType===e.ELEMENT_NODE}function YQ(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function KR(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Y3=V3,tL=H3,rL=z3,oL=W3,nL=G3,aL=q3,iL=eL;var Sr=b(M()),Z3=Y3,lL=Pn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(tL,{ref:r,className:I("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));lL.displayName=tL.displayName;var ZQ=J("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),uL=Pn.forwardRef(({className:e,variant:t,...r},o)=>(0,Sr.jsx)(rL,{ref:o,className:I("moonui-theme",ZQ({variant:t}),e),...r}));uL.displayName=rL.displayName;var J3=Pn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(aL,{ref:r,className:I("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));J3.displayName=aL.displayName;var cL=Pn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(iL,{ref:r,className:I("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Sr.jsx)(uo,{className:"h-4 w-4"})}));cL.displayName=iL.displayName;var dL=Pn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(oL,{ref:r,className:I("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));dL.displayName=oL.displayName;var fL=Pn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(nL,{ref:r,className:I("moonui-theme","text-sm opacity-90",e),...t}));fL.displayName=nL.displayName;var JQ=5,eZ=1e6,sL=new Map,Q3=e=>{if(sL.has(e))return;let t=setTimeout(()=>{sL.delete(e),Ep({type:"REMOVE_TOAST",toastId:e})},eZ);sL.set(e,t)},tZ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,JQ)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?Q3(r):e.toasts.forEach(o=>{Q3(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};default:return e}},Ry=[],Ly={toasts:[]},rZ=0;function Ep(e){Ly=tZ(Ly,e),Ry.forEach(t=>{t(Ly)})}function eU({...e}){let t=`toast-${Date.now()}-${++rZ}`,r=n=>Ep({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>Ep({type:"DISMISS_TOAST",toastId:t});return Ep({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function tU(){let[e,t]=Pn.useState(Ly);return Pn.useEffect(()=>(Ry.push(t),()=>{let r=Ry.indexOf(t);r>-1&&Ry.splice(r,1)}),[e]),{...e,toast:eU,dismiss:r=>Ep({type:"DISMISS_TOAST",toastId:r})}}function oZ(){let{toasts:e}=tU();return(0,Sr.jsxs)(Z3,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,Sr.jsxs)(uL,{variant:a,open:i,onOpenChange:s,...l,children:[(0,Sr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,Sr.jsx)(dL,{children:r}),o&&(0,Sr.jsx)(fL,{children:o})]}),n,(0,Sr.jsx)(cL,{})]},t)}),(0,Sr.jsx)(lL,{})]})}export{UW as Accordion,VT as AccordionContent,OT as AccordionItem,FT as AccordionTrigger,UT as Alert,WT as AlertDescription,zT as AlertTitle,jT as AspectRatio,gw as Avatar,hw as AvatarFallback,ik as AvatarGroup,ak as AvatarImage,co as Badge,lk as Breadcrumb,vw as BreadcrumbEllipsis,ck as BreadcrumbItem,fk as BreadcrumbLink,uk as BreadcrumbList,pk as BreadcrumbPage,dk as BreadcrumbSeparator,Fe as Button,zA as Card,QA as CardCVCInput,qA as CardContent,jA as CardDescription,YA as CardExpiryInput,$A as CardFooter,WA as CardHeader,XA as CardNumberInput,GA as CardTitle,ZA as CardZipInput,TC as Checkbox,iD as CheckboxGroup,Bh as CheckboxLabel,sD as CheckboxWithLabel,Bq as Collapsible,cD as CollapsibleContent,uD as CollapsibleTrigger,hS as ColorPicker,gb as Command,C7 as CommandDialog,rF as CommandEmpty,oF as CommandGroup,eF as CommandInput,aF as CommandItem,tF as CommandList,nF as CommandSeparator,iF as CommandShortcut,nV as DatePicker,aX as DateRangePicker,iX as DateTimePicker,fb as Dialog,h7 as DialogClose,Ov as DialogContent,mb as DialogDescription,JO as DialogFooter,x7 as DialogForm,pb as DialogHeader,cp as DialogTitle,m7 as DialogTrigger,lX as DraggableList,eY as DropdownMenu,xB as DropdownMenuCheckboxItem,vB as DropdownMenuContent,rY as DropdownMenuGroup,yB as DropdownMenuItem,CB as DropdownMenuLabel,oY as DropdownMenuPortal,aY as DropdownMenuRadioGroup,wB as DropdownMenuRadioItem,SB as DropdownMenuSeparator,bB as DropdownMenuShortcut,nY as DropdownMenuSub,hB as DropdownMenuSubContent,gB as DropdownMenuSubTrigger,tY as DropdownMenuTrigger,LB as FileUpload,pY as FreeBadge,PB as GestureDrawer,cTe as GitHubStarButton,cY as GitHubStars,e8 as GradientPicker,pr as Input,Yr as Label,TB as LockedComponent,sX as MonthPicker,sR as MoonLogo,CTe as MoonLogoAnimated,wTe as MoonLogoIcon,UW as MoonUIAccordion,VT as MoonUIAccordionContent,OT as MoonUIAccordionItem,FT as MoonUIAccordionTrigger,UT as MoonUIAlert,WT as MoonUIAlertDescription,zT as MoonUIAlertTitle,jT as MoonUIAspectRatio,gw as MoonUIAvatar,hw as MoonUIAvatarFallback,ik as MoonUIAvatarGroup,ak as MoonUIAvatarImage,co as MoonUIBadge,lk as MoonUIBreadcrumb,vw as MoonUIBreadcrumbEllipsis,ck as MoonUIBreadcrumbItem,fk as MoonUIBreadcrumbLink,uk as MoonUIBreadcrumbList,pk as MoonUIBreadcrumbPage,dk as MoonUIBreadcrumbSeparator,Fe as MoonUIButton,zA as MoonUICard,QA as MoonUICardCVCInput,qA as MoonUICardContent,jA as MoonUICardDescription,YA as MoonUICardExpiryInput,$A as MoonUICardFooter,WA as MoonUICardHeader,XA as MoonUICardNumberInput,GA as MoonUICardTitle,ZA as MoonUICardZipInput,TC as MoonUICheckbox,iD as MoonUICheckboxGroup,Bh as MoonUICheckboxLabel,sD as MoonUICheckboxWithLabel,Bq as MoonUICollapsible,cD as MoonUICollapsibleContent,uD as MoonUICollapsibleTrigger,hS as MoonUIColorPicker,gb as MoonUICommand,C7 as MoonUICommandDialog,rF as MoonUICommandEmpty,oF as MoonUICommandGroup,eF as MoonUICommandInput,aF as MoonUICommandItem,tF as MoonUICommandList,nF as MoonUICommandSeparator,iF as MoonUICommandShortcut,mK as MoonUIDataTableBasic,nV as MoonUIDatePicker,aX as MoonUIDateRangePicker,iX as MoonUIDateTimePicker,fb as MoonUIDialog,h7 as MoonUIDialogClose,Ov as MoonUIDialogContent,mb as MoonUIDialogDescription,JO as MoonUIDialogFooter,pb as MoonUIDialogHeader,cp as MoonUIDialogTitle,m7 as MoonUIDialogTrigger,lX as MoonUIDraggableList,eY as MoonUIDropdownMenu,xB as MoonUIDropdownMenuCheckboxItem,vB as MoonUIDropdownMenuContent,rY as MoonUIDropdownMenuGroup,yB as MoonUIDropdownMenuItem,CB as MoonUIDropdownMenuLabel,oY as MoonUIDropdownMenuPortal,aY as MoonUIDropdownMenuRadioGroup,wB as MoonUIDropdownMenuRadioItem,SB as MoonUIDropdownMenuSeparator,bB as MoonUIDropdownMenuShortcut,nY as MoonUIDropdownMenuSub,hB as MoonUIDropdownMenuSubContent,gB as MoonUIDropdownMenuSubTrigger,tY as MoonUIDropdownMenuTrigger,LB as MoonUIFileUpload,pY as MoonUIFreeBadge,PB as MoonUIGestureDrawer,cY as MoonUIGitHubStars,e8 as MoonUIGradientPicker,pr as MoonUIInput,Yr as MoonUILabel,TB as MoonUILockedComponent,sX as MoonUIMonthPicker,sR as MoonUIMoonLogo,MB as MoonUIPagination,EB as MoonUIPaginationContent,_B as MoonUIPaginationEllipsis,AB as MoonUIPaginationItem,ny as MoonUIPaginationLink,NB as MoonUIPaginationNext,DB as MoonUIPaginationPrevious,LH as MoonUIPhoneInput,Aa as MoonUIPopover,Kn as MoonUIPopoverContent,Da as MoonUIPopoverTrigger,fY as MoonUIProBadge,dY as MoonUIProComponentWrapper,oy as MoonUIProgress,PH as MoonUIRadioGroup,PR as MoonUIRadioGroupItem,TH as MoonUIRadioItemWithLabel,TR as MoonUIRadioLabel,UY as MoonUIRichTextEditor,qH as MoonUIScrollArea,_R as MoonUIScrollBar,Sc as MoonUISelect,Rc as MoonUISelectContent,FY as MoonUISelectGroup,Fr as MoonUISelectItem,SH as MoonUISelectLabel,IR as MoonUISelectScrollDownButton,LR as MoonUISelectScrollUpButton,bH as MoonUISelectSeparator,bc as MoonUISelectTrigger,bp as MoonUISelectValue,qo as MoonUISeparator,J$ as MoonUISimpleColorPicker,y3 as MoonUISimpleEditor,rs as MoonUISkeleton,qR as MoonUISkeletonAvatar,w3 as MoonUISkeletonCard,jR as MoonUISkeletonText,Fa as MoonUISlider,C3 as MoonUISwipeableCard,M3 as MoonUISwitch,Uv as MoonUITable,Wv as MoonUITableBody,LF as MoonUITableCaption,mp as MoonUITableCell,RF as MoonUITableFooter,Gv as MoonUITableHead,zv as MoonUITableHeader,gc as MoonUITableRow,dv as MoonUITabs,nc as MoonUITabsContent,fv as MoonUITabsList,oc as MoonUITabsTrigger,E3 as MoonUITagsInput,D3 as MoonUITextarea,uL as MoonUIToast,J3 as MoonUIToastAction,cL as MoonUIToastClose,fL as MoonUIToastDescription,Z3 as MoonUIToastProvider,dL as MoonUIToastTitle,lL as MoonUIToastViewport,oZ as MoonUIToaster,gy as MoonUIToggle,xy as MoonUITooltip,Pp as MoonUITooltipContent,GR as MoonUITooltipProvider,wy as MoonUITooltipTrigger,MB as Pagination,EB as PaginationContent,_B as PaginationEllipsis,AB as PaginationItem,ny as PaginationLink,NB as PaginationNext,DB as PaginationPrevious,au as Palette,LH as PhoneInput,fg as Pipette,Aa as Popover,UCe as PopoverAnchor,zCe as PopoverClose,Kn as PopoverContent,E$ as PopoverFooter,M$ as PopoverHeader,k$ as PopoverSeparator,Da as PopoverTrigger,fY as ProBadge,dY as ProComponentWrapper,oy as Progress,PH as RadioGroup,PR as RadioGroupItem,TH as RadioItemWithLabel,TR as RadioLabel,UY as RichTextEditor,qH as ScrollArea,_R as ScrollBar,Sc as Select,Rc as SelectContent,FY as SelectGroup,Fr as SelectItem,SH as SelectLabel,IR as SelectScrollDownButton,LR as SelectScrollUpButton,bH as SelectSeparator,bc as SelectTrigger,bp as SelectValue,qo as Separator,J$ as SimpleColorPicker,y3 as SimpleEditor,IQ as SimpleTooltip,rs as Skeleton,qR as SkeletonAvatar,w3 as SkeletonCard,jR as SkeletonText,Fa as Slider,C3 as SwipeableCard,M3 as Switch,Uv as Table,Wv as TableBody,LF as TableCaption,mp as TableCell,RF as TableFooter,Gv as TableHead,zv as TableHeader,gc as TableRow,dv as Tabs,nc as TabsContent,fv as TabsList,oc as TabsTrigger,E3 as TagsInput,D3 as Textarea,uL as Toast,J3 as ToastAction,cL as ToastClose,fL as ToastDescription,Z3 as ToastProvider,dL as ToastTitle,lL as ToastViewport,oZ as Toaster,gy as Toggle,xy as Tooltip,v3 as TooltipArrow,Pp as TooltipContent,GR as TooltipProvider,wy as TooltipTrigger,WW as aspectRatioVariants,sk as badgeVariants,gg as buttonVariants,I as cn,Hq as collapsibleContentVariants,lD as collapsibleTriggerVariants,Rn as format,sk as moonUIBadgeVariants,gg as moonUIButtonVariants,gK as moonUICreateSortableHeader,x3 as moonUISkeletonVariants,n3 as moonUIToggleVariants,T$ as popoverContentVariants,iY as progressVariants,iQ as separatorVariants,x3 as skeletonVariants,eU as toast,n3 as toggleVariants,LQ as tooltipVariants,tU as useToast};
57
+ color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,o?.key)}return a}}function le(e,t,o,r){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function z_(e,t,o,r){let a=()=>{var s;return(s=n.getValue())!=null?s:e.options.renderFallbackValue},n={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(r),renderValue:a,getContext:ie(()=>[e,o,t,n],(s,i,l,u)=>({table:s,column:i,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),le(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(n,o,t,e)},{}),n}function q_(e,t,o,r){var a,n;let i={...e._getDefaultColumnDef(),...t},l=i.accessorKey,u=(a=(n=i.id)!=null?n:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?a:typeof i.header=="string"?i.header:void 0,c;if(i.accessorFn?c=i.accessorFn:l&&(l.includes(".")?c=f=>{let m=f;for(let g of l.split(".")){var p;m=(p=m)==null?void 0:p[g]}return m}:c=f=>f[i.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:i,columns:[],getFlatColumns:ie(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(m=>m.getFlatColumns())]},le(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ie(()=>[e._getOrderColumnsFn()],f=>{var m;if((m=d.columns)!=null&&m.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},le(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var Nt="debugHeaders";function aL(e,t,o){var r;let n={id:(r=o.id)!=null?r:t.id,column:t,index:o.index,isPlaceholder:!!o.isPlaceholder,placeholderId:o.placeholderId,depth:o.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let s=[],i=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(i),s.push(l)};return i(n),s},getContext:()=>({table:e,header:n,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(n,e)}),n}var W_={createTable:e=>{e.getHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,a)=>{var n,s;let i=(n=r?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?n:[],l=(s=a?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?s:[],u=o.filter(d=>!(r!=null&&r.includes(d.id))&&!(a!=null&&a.includes(d.id)));return uf(t,[...i,...u,...l],e)},le(e.options,Nt,"getHeaderGroups")),e.getCenterHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,a)=>(o=o.filter(n=>!(r!=null&&r.includes(n.id))&&!(a!=null&&a.includes(n.id))),uf(t,o,e,"center")),le(e.options,Nt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,o,r)=>{var a;let n=(a=r?.map(s=>o.find(i=>i.id===s)).filter(Boolean))!=null?a:[];return uf(t,n,e,"left")},le(e.options,Nt,"getLeftHeaderGroups")),e.getRightHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,o,r)=>{var a;let n=(a=r?.map(s=>o.find(i=>i.id===s)).filter(Boolean))!=null?a:[];return uf(t,n,e,"right")},le(e.options,Nt,"getRightHeaderGroups")),e.getFooterGroups=ie(()=>[e.getHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getFooterGroups")),e.getLeftFooterGroups=ie(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getLeftFooterGroups")),e.getCenterFooterGroups=ie(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getCenterFooterGroups")),e.getRightFooterGroups=ie(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getRightFooterGroups")),e.getFlatHeaders=ie(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getFlatHeaders")),e.getLeftFlatHeaders=ie(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ie(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getCenterFlatHeaders")),e.getRightFlatHeaders=ie(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getRightFlatHeaders")),e.getCenterLeafHeaders=ie(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),le(e.options,Nt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ie(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),le(e.options,Nt,"getLeftLeafHeaders")),e.getRightLeafHeaders=ie(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),le(e.options,Nt,"getRightLeafHeaders")),e.getLeafHeaders=ie(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,o,r)=>{var a,n,s,i,l,u;return[...(a=(n=t[0])==null?void 0:n.headers)!=null?a:[],...(s=(i=o[0])==null?void 0:i.headers)!=null?s:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},le(e.options,Nt,"getLeafHeaders"))}};function uf(e,t,o,r){var a,n;let s=0,i=function(f,m){m===void 0&&(m=1),s=Math.max(s,m),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&i(p.columns,m+1)},0)};i(e);let l=[],u=(f,m)=>{let p={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(h=>{let v=[...g].reverse()[0],x=h.column.depth===p.depth,y,R=!1;if(x&&h.column.parent?y=h.column.parent:(y=h.column,R=!0),v&&v?.column===y)v.subHeaders.push(h);else{let C=aL(o,y,{id:[r,m,y.id,h?.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${g.filter(w=>w.column===y).length}`:void 0,depth:m,index:g.length});C.subHeaders.push(h),g.push(C)}p.headers.push(h),h.headerGroup=p}),l.push(p),m>0&&u(g,m-1)},c=t.map((f,m)=>aL(o,f,{depth:s,index:m}));u(c,s-1),l.reverse();let d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,h=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],d(p.subHeaders).forEach(y=>{let{colSpan:R,rowSpan:C}=y;g+=R,v.push(C)})):g=1;let x=Math.min(...v);return h=h+x,p.colSpan=g,p.rowSpan=h,{colSpan:g,rowSpan:h}});return d((a=(n=l[0])==null?void 0:n.headers)!=null?a:[]),l}var sh=(e,t,o,r,a,n,s)=>{let i={id:t,index:r,original:o,depth:a,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(i._valuesCache.hasOwnProperty(l))return i._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return i._valuesCache[l]=u.accessorFn(i.original,r),i._valuesCache[l]},getUniqueValues:l=>{if(i._uniqueValuesCache.hasOwnProperty(l))return i._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(i._uniqueValuesCache[l]=u.columnDef.getUniqueValues(i.original,r),i._uniqueValuesCache[l]):(i._uniqueValuesCache[l]=[i.getValue(l)],i._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=i.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:n??[],getLeafRows:()=>G_(i.subRows,l=>l.subRows),getParentRow:()=>i.parentId?e.getRow(i.parentId,!0):void 0,getParentRows:()=>{let l=[],u=i;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:ie(()=>[e.getAllLeafColumns()],l=>l.map(u=>z_(e,i,u,u.id)),le(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ie(()=>[i.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),le(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(i,e)}return i},$_={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},sL=(e,t,o)=>{var r,a;let n=o==null||(r=o.toString())==null?void 0:r.toLowerCase();return!!(!((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(n))};sL.autoRemove=e=>or(e);var iL=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};iL.autoRemove=e=>or(e);var lL=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};lL.autoRemove=e=>or(e);var uL=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};uL.autoRemove=e=>or(e);var cL=(e,t,o)=>!o.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});cL.autoRemove=e=>or(e)||!(e!=null&&e.length);var dL=(e,t,o)=>o.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});dL.autoRemove=e=>or(e)||!(e!=null&&e.length);var fL=(e,t,o)=>e.getValue(t)===o;fL.autoRemove=e=>or(e);var mL=(e,t,o)=>e.getValue(t)==o;mL.autoRemove=e=>or(e);var ih=(e,t,o)=>{let[r,a]=o,n=e.getValue(t);return n>=r&&n<=a};ih.resolveFilterValue=e=>{let[t,o]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof o!="number"?parseFloat(o):o,n=t===null||Number.isNaN(r)?-1/0:r,s=o===null||Number.isNaN(a)?1/0:a;if(n>s){let i=n;n=s,s=i}return[n,s]};ih.autoRemove=e=>or(e)||or(e[0])&&or(e[1]);var Jr={includesString:sL,includesStringSensitive:iL,equalsString:lL,arrIncludes:uL,arrIncludesAll:cL,arrIncludesSome:dL,equals:fL,weakEquals:mL,inNumberRange:ih};function or(e){return e==null||e===""}var j_={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);return typeof r=="string"?Jr.includesString:typeof r=="number"?Jr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Jr.equals:Array.isArray(r)?Jr.arrIncludes:Jr.weakEquals},e.getFilterFn=()=>{var o,r;return ff(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(o=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?o:Jr[e.columnDef.filterFn]},e.getCanFilter=()=>{var o,r,a;return((o=e.columnDef.enableColumnFilter)!=null?o:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var o;return(o=t.getState().columnFilters)==null||(o=o.find(r=>r.id===e.id))==null?void 0:o.value},e.getFilterIndex=()=>{var o,r;return(o=(r=t.getState().columnFilters)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?o:-1},e.setFilterValue=o=>{t.setColumnFilters(r=>{let a=e.getFilterFn(),n=r?.find(c=>c.id===e.id),s=Ha(o,n?n.value:void 0);if(nL(a,s,e)){var i;return(i=r?.filter(c=>c.id!==e.id))!=null?i:[]}let l={id:e.id,value:s};if(n){var u;return(u=r?.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let o=e.getAllLeafColumns(),r=a=>{var n;return(n=Ha(t,a))==null?void 0:n.filter(s=>{let i=o.find(l=>l.id===s.id);if(i){let l=i.getFilterFn();if(nL(l,s.value,i))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var o,r;e.setColumnFilters(t?[]:(o=(r=e.initialState)==null?void 0:r.columnFilters)!=null?o:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function nL(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var K_=(e,t,o)=>o.reduce((r,a)=>{let n=a.getValue(e);return r+(typeof n=="number"?n:0)},0),X_=(e,t,o)=>{let r;return o.forEach(a=>{let n=a.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},Y_=(e,t,o)=>{let r;return o.forEach(a=>{let n=a.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},Z_=(e,t,o)=>{let r,a;return o.forEach(n=>{let s=n.getValue(e);s!=null&&(r===void 0?s>=s&&(r=a=s):(r>s&&(r=s),a<s&&(a=s)))}),[r,a]},Q_=(e,t)=>{let o=0,r=0;if(t.forEach(a=>{let n=a.getValue(e);n!=null&&(n=+n)>=n&&(++o,r+=n)}),o)return r/o},J_=(e,t)=>{if(!t.length)return;let o=t.map(n=>n.getValue(e));if(!U_(o))return;if(o.length===1)return o[0];let r=Math.floor(o.length/2),a=o.sort((n,s)=>n-s);return o.length%2!==0?a[r]:(a[r-1]+a[r])/2},eV=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),tV=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,oV=(e,t)=>t.length,Kg={sum:K_,min:X_,max:Y_,extent:Z_,mean:Q_,median:J_,unique:eV,uniqueCount:tV,count:oV},rV={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,o;return(t=(o=e.getValue())==null||o.toString==null?void 0:o.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(o=>o!=null&&o.includes(e.id)?o.filter(r=>r!==e.id):[...o??[],e.id])},e.getCanGroup=()=>{var o,r;return((o=e.columnDef.enableGrouping)!=null?o:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.includes(e.id)},e.getGroupedIndex=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let o=e.getCanGroup();return()=>{o&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);if(typeof r=="number")return Kg.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kg.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return ff(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(o=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?o:Kg[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var o,r;e.setGrouping(t?[]:(o=(r=e.initialState)==null?void 0:r.grouping)!=null?o:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=o=>{if(e._groupingValuesCache.hasOwnProperty(o))return e._groupingValuesCache[o];let r=t.getColumn(o);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[o]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[o]):e.getValue(o)},e._groupingValuesCache={}},createCell:(e,t,o,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===o.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=o.subRows)!=null&&a.length)}}};function aV(e,t,o){if(!(t!=null&&t.length)||!o)return e;let r=e.filter(n=>!t.includes(n.id));return o==="remove"?r:[...t.map(n=>e.find(s=>s.id===n)).filter(Boolean),...r]}var nV={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ie(o=>[mu(t,o)],o=>o.findIndex(r=>r.id===e.id),le(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=mu(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let a=mu(t,o);return((r=a[a.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var o;e.setColumnOrder(t?[]:(o=e.initialState.columnOrder)!=null?o:[])},e._getOrderColumnsFn=ie(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,o,r)=>a=>{let n=[];if(!(t!=null&&t.length))n=a;else{let s=[...t],i=[...a];for(;i.length&&s.length;){let l=s.shift(),u=i.findIndex(c=>c.id===l);u>-1&&n.push(i.splice(u,1)[0])}n=[...n,...i]}return aV(n,o,r)},le(e.options,"debugTable","_getOrderColumnsFn"))}},Xg=()=>({left:[],right:[]}),sV={getInitialState:e=>({columnPinning:Xg(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=o=>{let r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var n,s;if(o==="right"){var i,l;return{left:((i=a?.left)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=a?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(o==="left"){var u,c;return{left:[...((u=a?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=a?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((n=a?.left)!=null?n:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=a?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,n,s;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((n=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?n:!0)}),e.getIsPinned=()=>{let o=e.getLeafColumns().map(i=>i.id),{left:r,right:a}=t.getState().columnPinning,n=o.some(i=>r?.includes(i)),s=o.some(i=>a?.includes(i));return n?"left":s?"right":!1},e.getPinnedIndex=()=>{var o,r;let a=e.getIsPinned();return a?(o=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?o:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ie(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(o,r,a)=>{let n=[...r??[],...a??[]];return o.filter(s=>!n.includes(s.column.id))},le(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ie(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(o,r)=>(r??[]).map(n=>o.find(s=>s.column.id===n)).filter(Boolean).map(n=>({...n,position:"left"})),le(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ie(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(o,r)=>(r??[]).map(n=>o.find(s=>s.column.id===n)).filter(Boolean).map(n=>({...n,position:"right"})),le(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var o,r;return e.setColumnPinning(t?Xg():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:Xg())},e.getIsSomeColumnsPinned=t=>{var o;let r=e.getState().columnPinning;if(!t){var a,n;return!!((a=r.left)!=null&&a.length||(n=r.right)!=null&&n.length)}return!!((o=r[t])!=null&&o.length)},e.getLeftLeafColumns=ie(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),le(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ie(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),le(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ie(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r)=>{let a=[...o??[],...r??[]];return t.filter(n=>!a.includes(n.id))},le(e.options,"debugColumns","getCenterLeafColumns"))}};function iV(e){return e||(typeof document<"u"?document:null)}var cf={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Yg=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),lV={getDefaultColumnDef:()=>cf,getInitialState:e=>({columnSizing:{},columnSizingInfo:Yg(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xo("columnSizing",e),onColumnSizingInfoChange:xo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var o,r,a;let n=t.getState().columnSizing[e.id];return Math.min(Math.max((o=e.columnDef.minSize)!=null?o:cf.minSize,(r=n??e.columnDef.size)!=null?r:cf.size),(a=e.columnDef.maxSize)!=null?a:cf.maxSize)},e.getStart=ie(o=>[o,mu(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((a,n)=>a+n.getSize(),0),le(t.options,"debugColumns","getStart")),e.getAfter=ie(o=>[o,mu(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((a,n)=>a+n.getSize(),0),le(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(o=>{let{[e.id]:r,...a}=o;return a})},e.getCanResize=()=>{var o,r;return((o=e.columnDef.enableResizing)!=null?o:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let o=0,r=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var n;o+=(n=a.column.getSize())!=null?n:0}};return r(e),o},e.getStart=()=>{if(e.index>0){let o=e.headerGroup.headers[e.index-1];return o.getStart()+o.getSize()}return 0},e.getResizeHandler=o=>{let r=t.getColumn(e.column.id),a=r?.getCanResize();return n=>{if(!r||!a||(n.persist==null||n.persist(),Zg(n)&&n.touches&&n.touches.length>1))return;let s=e.getSize(),i=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=Zg(n)?Math.round(n.touches[0].clientX):n.clientX,u={},c=(v,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(y=>{var R,C;let w=t.options.columnResizeDirection==="rtl"?-1:1,I=(x-((R=y?.startOffset)!=null?R:0))*w,L=Math.max(I/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(P=>{let[T,O]=P;u[T]=Math.round(Math.max(O+O*L,0)*100)/100}),{...y,deltaOffset:I,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=iV(o),p={moveHandler:v=>d(v.clientX),upHandler:v=>{m?.removeEventListener("mousemove",p.moveHandler),m?.removeEventListener("mouseup",p.upHandler),f(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var x;m?.removeEventListener("touchmove",g.moveHandler),m?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((x=v.touches[0])==null?void 0:x.clientX)}},h=uV()?{passive:!1}:!1;Zg(n)?(m?.addEventListener("touchmove",g.moveHandler,h),m?.addEventListener("touchend",g.upHandler,h)):(m?.addEventListener("mousemove",p.moveHandler,h),m?.addEventListener("mouseup",p.upHandler,h)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var o;e.setColumnSizing(t?{}:(o=e.initialState.columnSizing)!=null?o:{})},e.resetHeaderSizeInfo=t=>{var o;e.setColumnSizingInfo(t?Yg():(o=e.initialState.columnSizingInfo)!=null?o:Yg())},e.getTotalSize=()=>{var t,o;return(t=(o=e.getHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,o;return(t=(o=e.getLeftHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,o;return(t=(o=e.getCenterHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,o;return(t=(o=e.getRightHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}},df=null;function uV(){if(typeof df=="boolean")return df;let e=!1;try{let t={get passive(){return e=!0,!1}},o=()=>{};window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch{e=!1}return df=e,df}function Zg(e){return e.type==="touchstart"}var cV={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=o=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:o??!e.getIsVisible()}))},e.getIsVisible=()=>{var o,r;let a=e.columns;return(o=a.length?a.some(n=>n.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?o:!0},e.getCanHide=()=>{var o,r;return((o=e.columnDef.enableHiding)!=null?o:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>o=>{e.toggleVisibility==null||e.toggleVisibility(o.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ie(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),le(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ie(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,a)=>[...o,...r,...a],le(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>ie(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(n=>n.getIsVisible==null?void 0:n.getIsVisible()),le(e.options,"debugColumns",o));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=o=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(o),e.resetColumnVisibility=o=>{var r;e.setColumnVisibility(o?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=o=>{var r;o=(r=o)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,n)=>({...a,[n.id]:o||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(o=>!(o.getIsVisible!=null&&o.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(o=>o.getIsVisible==null?void 0:o.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>o=>{var r;e.toggleAllColumnsVisible((r=o.target)==null?void 0:r.checked)}}};function mu(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var dV={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},fV={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var o;let r=(o=e.getCoreRowModel().flatRows[0])==null||(o=o._getAllCellsByColumnId()[t.id])==null?void 0:o.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var o,r,a,n;return((o=e.columnDef.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((n=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?n:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Jr.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return ff(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:Jr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},mV={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(o)return;o=!0,e._queue(()=>{e.resetExpanded(),o=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var a,n;e.setExpanded(r?{}:(a=(n=e.initialState)==null?void 0:n.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{let r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(n=>{let s=n.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=o=>{t.setExpanded(r=>{var a;let n=r===!0?!0:!!(r!=null&&r[e.id]),s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(i=>{s[i]=!0}):s=r,o=(a=o)!=null?a:!n,!n&&o)return{...s,[e.id]:!0};if(n&&!o){let{[e.id]:i,...l}=s;return l}return r})},e.getIsExpanded=()=>{var o;let r=t.getState().expanded;return!!((o=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?o:r===!0||r?.[e.id])},e.getCanExpand=()=>{var o,r,a;return(o=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?o:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let o=!0,r=e;for(;o&&r.parentId;)r=t.getRow(r.parentId,!0),o=r.getIsExpanded();return o},e.getToggleExpandedHandler=()=>{let o=e.getCanExpand();return()=>{o&&e.toggleExpanded()}}}},th=0,oh=10,Qg=()=>({pageIndex:th,pageSize:oh}),pV={getInitialState:e=>({...e,pagination:{...Qg(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:xo("pagination",e)}),createTable:e=>{let t=!1,o=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(o)return;o=!0,e._queue(()=>{e.resetPageIndex(),o=!1})}},e.setPagination=r=>{let a=n=>Ha(r,n);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?Qg():(a=e.initialState.pagination)!=null?a:Qg())},e.setPageIndex=r=>{e.setPagination(a=>{let n=Ha(r,a.pageIndex),s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return n=Math.max(0,Math.min(n,s)),{...a,pageIndex:n}})},e.resetPageIndex=r=>{var a,n;e.setPageIndex(r?th:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)!=null?a:th)},e.resetPageSize=r=>{var a,n;e.setPageSize(r?oh:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)!=null?a:oh)},e.setPageSize=r=>{e.setPagination(a=>{let n=Math.max(1,Ha(r,a.pageSize)),s=a.pageSize*a.pageIndex,i=Math.floor(s/n);return{...a,pageIndex:i,pageSize:n}})},e.setPageCount=r=>e.setPagination(a=>{var n;let s=Ha(r,(n=e.options.pageCount)!=null?n:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=ie(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((n,s)=>s)),a},le(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:r<a-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Jg=()=>({top:[],bottom:[]}),gV={getInitialState:e=>({rowPinning:Jg(),...e}),getDefaultOptions:e=>({onRowPinningChange:xo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(o,r,a)=>{let n=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],s=a?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],i=new Set([...s,e.id,...n]);t.setRowPinning(l=>{var u,c;if(o==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(i!=null&&i.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(i!=null&&i.has(g))),...Array.from(i)]}}if(o==="top"){var m,p;return{top:[...((m=l?.top)!=null?m:[]).filter(g=>!(i!=null&&i.has(g))),...Array.from(i)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(i!=null&&i.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(i!=null&&i.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(i!=null&&i.has(g)))}})},e.getCanPin=()=>{var o;let{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(o=r??a)!=null?o:!0},e.getIsPinned=()=>{let o=[e.id],{top:r,bottom:a}=t.getState().rowPinning,n=o.some(i=>r?.includes(i)),s=o.some(i=>a?.includes(i));return n?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var o,r;let a=e.getIsPinned();if(!a)return-1;let n=(o=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:o.map(s=>{let{id:i}=s;return i});return(r=n?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var o,r;return e.setRowPinning(t?Jg():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:Jg())},e.getIsSomeRowsPinned=t=>{var o;let r=e.getState().rowPinning;if(!t){var a,n;return!!((a=r.top)!=null&&a.length||(n=r.bottom)!=null&&n.length)}return!!((o=r[t])!=null&&o.length)},e._getPinnedRows=(t,o,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(o??[]).map(s=>{let i=e.getRow(s,!0);return i.getIsAllParentsExpanded()?i:null}):(o??[]).map(s=>t.find(i=>i.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=ie(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),le(e.options,"debugRows","getTopRows")),e.getBottomRows=ie(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),le(e.options,"debugRows","getBottomRows")),e.getCenterRows=ie(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,o,r)=>{let a=new Set([...o??[],...r??[]]);return t.filter(n=>!a.has(n.id))},le(e.options,"debugRows","getCenterRows"))}},hV={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var o;return e.setRowSelection(t?{}:(o=e.initialState.rowSelection)!=null?o:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(o=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let r={...o},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(n=>{n.getCanSelect()&&(r[n.id]=!0)}):a.forEach(n=>{delete r[n.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(o=>{let r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...o};return e.getRowModel().rows.forEach(n=>{rh(a,n.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ie(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?eh(e,o):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ie(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?eh(e,o):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ie(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?eh(e,o):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:o}=e.getState(),r=!!(t.length&&Object.keys(o).length);return r&&t.some(a=>a.getCanSelect()&&!o[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:o}=e.getState(),r=!!t.length;return r&&t.some(a=>!o[a.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let o=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return o>0&&o<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(o=>o.getCanSelect()).some(o=>o.getIsSelected()||o.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(o,r)=>{let a=e.getIsSelected();t.setRowSelection(n=>{var s;if(o=typeof o<"u"?o:!a,e.getCanSelect()&&a===o)return n;let i={...n};return rh(i,e.id,o,(s=r?.selectChildren)!=null?s:!0,t),i})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return lh(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return ah(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return ah(e,o)==="all"},e.getCanSelect=()=>{var o;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(o=t.options.enableRowSelection)!=null?o:!0},e.getCanSelectSubRows=()=>{var o;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(o=t.options.enableSubRowSelection)!=null?o:!0},e.getCanMultiSelect=()=>{var o;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(o=t.options.enableMultiRowSelection)!=null?o:!0},e.getToggleSelectedHandler=()=>{let o=e.getCanSelect();return r=>{var a;o&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},rh=(e,t,o,r,a)=>{var n;let s=a.getRow(t,!0);o?(s.getCanMultiSelect()||Object.keys(e).forEach(i=>delete e[i]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(n=s.subRows)!=null&&n.length&&s.getCanSelectSubRows()&&s.subRows.forEach(i=>rh(e,i.id,o,r,a))};function eh(e,t){let o=e.getState().rowSelection,r=[],a={},n=function(s,i){return s.map(l=>{var u;let c=lh(l,o);if(c&&(r.push(l),a[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:n(l.subRows)}),c)return l}).filter(Boolean)};return{rows:n(t.rows),flatRows:r,rowsById:a}}function lh(e,t){var o;return(o=t[e.id])!=null?o:!1}function ah(e,t,o){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,n=!1;return e.subRows.forEach(s=>{if(!(n&&!a)&&(s.getCanSelect()&&(lh(s,t)?n=!0:a=!1),s.subRows&&s.subRows.length)){let i=ah(s,t);i==="all"?n=!0:(i==="some"&&(n=!0),a=!1)}}),a?"all":n?"some":!1}var nh=/([0-9]+)/gm,xV=(e,t,o)=>pL(Ua(e.getValue(o)).toLowerCase(),Ua(t.getValue(o)).toLowerCase()),vV=(e,t,o)=>pL(Ua(e.getValue(o)),Ua(t.getValue(o))),yV=(e,t,o)=>uh(Ua(e.getValue(o)).toLowerCase(),Ua(t.getValue(o)).toLowerCase()),bV=(e,t,o)=>uh(Ua(e.getValue(o)),Ua(t.getValue(o))),CV=(e,t,o)=>{let r=e.getValue(o),a=t.getValue(o);return r>a?1:r<a?-1:0},wV=(e,t,o)=>uh(e.getValue(o),t.getValue(o));function uh(e,t){return e===t?0:e>t?1:-1}function Ua(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pL(e,t){let o=e.split(nh).filter(Boolean),r=t.split(nh).filter(Boolean);for(;o.length&&r.length;){let a=o.shift(),n=r.shift(),s=parseInt(a,10),i=parseInt(n,10),l=[s,i].sort();if(isNaN(l[0])){if(a>n)return 1;if(n>a)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>i)return 1;if(i>s)return-1}return o.length-r.length}var fu={alphanumeric:xV,alphanumericCaseSensitive:vV,text:yV,textCaseSensitive:bV,datetime:CV,basic:wV},SV={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let o=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let a of o){let n=a?.getValue(e.id);if(Object.prototype.toString.call(n)==="[object Date]")return fu.datetime;if(typeof n=="string"&&(r=!0,n.split(nh).length>1))return fu.alphanumeric}return r?fu.text:fu.basic},e.getAutoSortDir=()=>{let o=t.getFilteredRowModel().flatRows[0];return typeof o?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var o,r;if(!e)throw new Error;return ff(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(o=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?o:fu[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let a=e.getNextSortingOrder(),n=typeof o<"u"&&o!==null;t.setSorting(s=>{let i=s?.find(m=>m.id===e.id),l=s?.findIndex(m=>m.id===e.id),u=[],c,d=n?o:a==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?i?c="toggle":c="add":s!=null&&s.length&&l!==s.length-1?c="replace":i?c="toggle":c="replace",c==="toggle"&&(n||a||(c="remove")),c==="add"){var f;u=[...s,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=s.map(m=>m.id===e.id?{...m,desc:d}:m):c==="remove"?u=s.filter(m=>m.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var o,r;return((o=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?o:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=o=>{var r,a;let n=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==n&&((r=t.options.enableSortingRemoval)==null||r)&&(!(o&&(a=t.options.enableMultiRemove)!=null)||a)?!1:s==="desc"?"asc":"desc":n},e.getCanSort=()=>{var o,r;return((o=e.columnDef.enableSorting)!=null?o:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var o,r;return(o=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?o:!!e.accessorFn},e.getIsSorted=()=>{var o;let r=(o=t.getState().sorting)==null?void 0:o.find(a=>a.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var o,r;return(o=(r=t.getState().sorting)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?o:-1},e.clearSorting=()=>{t.setSorting(o=>o!=null&&o.length?o.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{let o=e.getCanSort();return r=>{o&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var o,r;e.setSorting(t?[]:(o=(r=e.initialState)==null?void 0:r.sorting)!=null?o:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},RV=[W_,cV,nV,sV,$_,j_,dV,fV,SV,rV,mV,pV,gV,hV,lV];function gL(e){var t,o;let r=[...RV,...(t=e._features)!=null?t:[]],a={_features:r},n=a._features.reduce((f,m)=>Object.assign(f,m.getDefaultOptions==null?void 0:m.getDefaultOptions(a)),{}),s=f=>a.options.mergeOptions?a.options.mergeOptions(n,f):{...n,...f},l={...{},...(o=e.initialState)!=null?o:{}};a._features.forEach(f=>{var m;l=(m=f.getInitialState==null?void 0:f.getInitialState(l))!=null?m:l});let u=[],c=!1,d={_features:r,options:{...n,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{a.setState(a.initialState)},setOptions:f=>{let m=Ha(f,a.options);a.options=s(m)},getState:()=>a.options.state,setState:f=>{a.options.onStateChange==null||a.options.onStateChange(f)},_getRowId:(f,m,p)=>{var g;return(g=a.options.getRowId==null?void 0:a.options.getRowId(f,m,p))!=null?g:`${p?[p.id,m].join("."):m}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(f,m)=>{let p=(m?a.getPrePaginationRowModel():a.getRowModel()).rowsById[f];if(!p&&(p=a.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:ie(()=>[a.options.defaultColumn],f=>{var m;return f=(m=f)!=null?m:{},{header:p=>{let g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,h;return(g=(h=p.renderValue())==null||h.toString==null?void 0:h.toString())!=null?g:null},...a._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},le(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>a.options.columns,getAllColumns:ie(()=>[a._getColumnDefs()],f=>{let m=function(p,g,h){return h===void 0&&(h=0),p.map(v=>{let x=q_(a,v,h,g),y=v;return x.columns=y.columns?m(y.columns,x,h+1):[],x})};return m(f)},le(e,"debugColumns","getAllColumns")),getAllFlatColumns:ie(()=>[a.getAllColumns()],f=>f.flatMap(m=>m.getFlatColumns()),le(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ie(()=>[a.getAllFlatColumns()],f=>f.reduce((m,p)=>(m[p.id]=p,m),{}),le(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ie(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(f,m)=>{let p=f.flatMap(g=>g.getLeafColumns());return m(p)},le(e,"debugColumns","getAllLeafColumns")),getColumn:f=>a._getAllFlatColumnsById()[f]};Object.assign(a,d);for(let f=0;f<a._features.length;f++){let m=a._features[f];m==null||m.createTable==null||m.createTable(a)}return a}function hL(){return e=>ie(()=>[e.options.data],t=>{let o={rows:[],flatRows:[],rowsById:{}},r=function(a,n,s){n===void 0&&(n=0);let i=[];for(let u=0;u<a.length;u++){let c=sh(e,e._getRowId(a[u],u,s),a[u],u,n,void 0,s?.id);if(o.flatRows.push(c),o.rowsById[c.id]=c,i.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(a[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,n+1,c))}}return i};return o.rows=r(t),o},le(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function IV(e){let t=[],o=r=>{var a;t.push(r),(a=r.subRows)!=null&&a.length&&r.getIsExpanded()&&r.subRows.forEach(o)};return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function LV(e,t,o){return o.options.filterFromLeafRows?PV(e,t,o):TV(e,t,o)}function PV(e,t,o){var r;let a=[],n={},s=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,i=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){var d;let m=l[f],p=sh(o,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(p.columnFilters=m.columnFilters,(d=m.subRows)!=null&&d.length&&u<s){if(p.subRows=i(m.subRows,u+1),m=p,t(m)&&!p.subRows.length){c.push(m),n[m.id]=m,a.push(m);continue}if(t(m)||p.subRows.length){c.push(m),n[m.id]=m,a.push(m);continue}}else m=p,t(m)&&(c.push(m),n[m.id]=m,a.push(m))}return c};return{rows:i(e),flatRows:a,rowsById:n}}function TV(e,t,o){var r;let a=[],n={},s=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,i=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){let m=l[f];if(t(m)){var d;if((d=m.subRows)!=null&&d.length&&u<s){let g=sh(o,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=i(m.subRows,u+1),m=g}c.push(m),a.push(m),n[m.id]=m}}return c};return{rows:i(e),flatRows:a,rowsById:n}}function xL(){return e=>ie(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,o,r)=>{if(!t.rows.length||!(o!=null&&o.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let a=[],n=[];(o??[]).forEach(f=>{var m;let p=e.getColumn(f.id);if(!p)return;let g=p.getFilterFn();g&&a.push({id:f.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(f.value))!=null?m:f.value})});let s=(o??[]).map(f=>f.id),i=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&i&&l.length&&(s.push("__global__"),l.forEach(f=>{var m;n.push({id:f.id,filterFn:i,resolvedValue:(m=i.resolveFilterValue==null?void 0:i.resolveFilterValue(r))!=null?m:r})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let m=t.flatRows[f];if(m.columnFilters={},a.length)for(let p=0;p<a.length;p++){u=a[p];let g=u.id;m.columnFilters[g]=u.filterFn(m,g,u.resolvedValue,h=>{m.columnFiltersMeta[g]=h})}if(n.length){for(let p=0;p<n.length;p++){c=n[p];let g=c.id;if(c.filterFn(m,g,c.resolvedValue,h=>{m.columnFiltersMeta[g]=h})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}let d=f=>{for(let m=0;m<s.length;m++)if(f.columnFilters[s[m]]===!1)return!1;return!0};return LV(t.rows,d,e)},le(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function vL(e){return t=>ie(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(o,r)=>{if(!r.rows.length)return r;let{pageSize:a,pageIndex:n}=o,{rows:s,flatRows:i,rowsById:l}=r,u=a*n,c=u+a;s=s.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:s,flatRows:i,rowsById:l}:d=IV({rows:s,flatRows:i,rowsById:l}),d.flatRows=[];let f=m=>{d.flatRows.push(m),m.subRows.length&&m.subRows.forEach(f)};return d.rows.forEach(f),d},le(t.options,"debugTable","getPaginationRowModel"))}function yL(){return e=>ie(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,o)=>{if(!o.rows.length||!(t!=null&&t.length))return o;let r=e.getState().sorting,a=[],n=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),s={};n.forEach(l=>{let u=e.getColumn(l.id);u&&(s[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let i=l=>{let u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let m=0;m<n.length;m+=1){var f;let p=n[m],g=s[p.id],h=g.sortUndefined,v=(f=p?.desc)!=null?f:!1,x=0;if(h){let y=c.getValue(p.id),R=d.getValue(p.id),C=y===void 0,w=R===void 0;if(C||w){if(h==="first")return C?-1:1;if(h==="last")return C?1:-1;x=C&&w?0:C?h:-h}}if(x===0&&(x=g.sortingFn(c,d,p.id)),x!==0)return v&&(x*=-1),g.invertSorting&&(x*=-1),x}return c.index-d.index}),u.forEach(c=>{var d;a.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=i(c.subRows))}),u};return{rows:i(o.rows),flatRows:a,rowsById:o.rowsById}},le(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function ch(e,t){return e?MV(e)?pu.createElement(e,t):e:null}function MV(e){return kV(e)||typeof e=="function"||AV(e)}function kV(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function AV(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function bL(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=pu.useState(()=>({current:gL(t)})),[r,a]=pu.useState(()=>o.current.initialState);return o.current.setOptions(n=>({...n,...e,state:{...r,...e.state},onStateChange:s=>{a(s),e.onStateChange==null||e.onStateChange(s)}})),o.current}var Ft=b(A());var Ze=b(D()),DV=te("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),mf=Ft.forwardRef(({className:e,variant:t,size:o,loading:r,emptyContent:a,...n},s)=>{let i=t==="striped",l=Ft.Children.map(n.children,u=>{if(Ft.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Ft.cloneElement(u,{className:S(c.className,i&&"even:[&>tr]:bg-muted/50")})}return u});return(0,Ze.jsxs)("div",{className:"relative w-full overflow-auto",children:[r&&(0,Ze.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,Ze.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,Ze.jsx)("table",{ref:s,className:S(DV({variant:t,size:o}),r&&"opacity-70",e),...n,children:l})]})});mf.displayName="Table";var pf=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("thead",{ref:o,className:S("moonui-theme","[&_tr]:border-b",e),...t}));pf.displayName="TableHeader";var gf=Ft.forwardRef(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...a},n)=>{let s=Ft.Children.count(r)>0;return(0,Ze.jsx)("tbody",{ref:n,className:S("moonui-theme","[&_tr:last-child]:border-0",e),...a,children:s?r:(0,Ze.jsx)("tr",{children:(0,Ze.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,Ze.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,Ze.jsx)("div",{className:"text-sm",children:o})})})})})});gf.displayName="TableBody";var CL=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("tfoot",{ref:o,className:S("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));CL.displayName="TableFooter";var di=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("tr",{ref:o,className:S("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));di.displayName="TableRow";var hf=Ft.forwardRef(({className:e,sortable:t,sorted:o,onSort:r,align:a="left",children:n,...s},i)=>{let l=()=>t?o==="asc"?(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ze.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):o==="desc"?(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ze.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ze.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,Ze.jsx)("th",{ref:i,className:S("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[a].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?r:void 0,...s,children:t||a!=="left"?(0,Ze.jsxs)("div",{className:S("flex items-center",u[a].split(" ")[1]),children:[n,t&&l()]}):n})});hf.displayName="TableHead";var gu=Ft.forwardRef(({className:e,align:t="left",...o},r)=>{let a={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,Ze.jsx)("td",{ref:r,className:S("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",a,e),...o})});gu.displayName="TableCell";var wL=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("caption",{ref:o,className:S("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));wL.displayName="TableCaption";var Ie=b(D());function EV({columns:e,data:t,enableSorting:o=!0,enablePagination:r=!0,enableSearch:a=!0,pageSize:n=10,searchPlaceholder:s="Search...",emptyMessage:i="No results found.",className:l}){let[u,c]=dh.useState([]),[d,f]=dh.useState(""),m=bL({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:a?f:void 0,getCoreRowModel:hL(),getPaginationRowModel:r?vL():void 0,getSortedRowModel:o?yL():void 0,getFilteredRowModel:a?xL():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:n}}});return(0,Ie.jsxs)("div",{className:S("space-y-4",l),children:[a&&(0,Ie.jsx)("div",{className:"flex items-center",children:(0,Ie.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ie.jsx)(rn,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ie.jsx)(At,{placeholder:s,value:d,onChange:p=>f(p.target.value),className:"pl-8"})]})}),(0,Ie.jsx)("div",{className:"rounded-md border",children:(0,Ie.jsxs)(mf,{children:[(0,Ie.jsx)(pf,{children:m.getHeaderGroups().map(p=>(0,Ie.jsx)(di,{children:p.headers.map(g=>(0,Ie.jsx)(hf,{children:g.isPlaceholder?null:(0,Ie.jsxs)("div",{className:S("flex items-center gap-2",g.column.getCanSort()&&"cursor-pointer select-none"),onClick:g.column.getToggleSortingHandler(),children:[ch(g.column.columnDef.header,g.getContext()),o&&g.column.getCanSort()&&(0,Ie.jsx)("div",{className:"ml-auto",children:g.column.getIsSorted()==="desc"?(0,Ie.jsx)(os,{className:"h-4 w-4"}):g.column.getIsSorted()==="asc"?(0,Ie.jsx)(as,{className:"h-4 w-4"}):(0,Ie.jsx)(rs,{className:"h-4 w-4 opacity-50"})})]})},g.id))},p.id))}),(0,Ie.jsx)(gf,{children:m.getRowModel().rows?.length?m.getRowModel().rows.map(p=>(0,Ie.jsx)(di,{"data-state":p.getIsSelected()&&"selected",children:p.getVisibleCells().map(g=>(0,Ie.jsx)(gu,{children:ch(g.column.columnDef.cell,g.getContext())},g.id))},p.id)):(0,Ie.jsx)(di,{children:(0,Ie.jsx)(gu,{colSpan:e.length,className:"h-24 text-center",children:i})})})]})}),r&&(0,Ie.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ie.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[m.getFilteredRowModel().rows.length," row(s)"]}),(0,Ie.jsxs)("div",{className:"space-x-2",children:[(0,Ie.jsxs)(Ve,{variant:"outline",size:"sm",onClick:()=>m.previousPage(),disabled:!m.getCanPreviousPage(),children:[(0,Ie.jsx)(Uo,{className:"h-4 w-4"}),"Previous"]}),(0,Ie.jsxs)("span",{className:"text-sm",children:["Page ",m.getState().pagination.pageIndex+1," of"," ",m.getPageCount()]}),(0,Ie.jsxs)(Ve,{variant:"outline",size:"sm",onClick:()=>m.nextPage(),disabled:!m.getCanNextPage(),children:["Next",(0,Ie.jsx)(Ut,{className:"h-4 w-4"})]})]})]})]})}function NV(e){return({column:t})=>(0,Ie.jsxs)(Ve,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Ie.jsx)(os,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ie.jsx)(as,{className:"ml-2 h-4 w-4"}):(0,Ie.jsx)(rs,{className:"ml-2 h-4 w-4"})]})}var jt=b(A());var FV=Math.pow(10,8)*24*60*60*1e3,Zie=-FV,xf=6048e5,SL=864e5;var OV=3600;var RL=OV*24,Qie=RL*7,_V=RL*365.2425,VV=_V/12,Jie=VV*3,fh=Symbol.for("constructDateFrom");function et(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&fh in e?e[fh](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return et(t||e,e)}function vf(e,t,o){let r=Me(e,o?.in);if(isNaN(t))return et(o?.in||e,NaN);if(!t)return r;let a=r.getDate(),n=et(o?.in||e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let s=n.getDate();return a>=s?n:(r.setFullYear(n.getFullYear(),n.getMonth(),a),r)}var BV={};function wr(){return BV}function rr(e,t){let o=wr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Me(e,t?.in),n=a.getDay(),s=(n<r?7:0)+n-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Gn(e,t){return rr(e,{...t,weekStartsOn:1})}function yf(e,t){let o=Me(e,t?.in),r=o.getFullYear(),a=et(o,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let n=Gn(a),s=et(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let i=Gn(s);return o.getTime()>=n.getTime()?r+1:o.getTime()>=i.getTime()?r:r-1}function mh(e){let t=Me(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function Ga(e,...t){let o=et.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function fi(e,t){let o=Me(e,t?.in);return o.setHours(0,0,0,0),o}function IL(e,t,o){let[r,a]=Ga(o?.in,e,t),n=fi(r),s=fi(a),i=+n-mh(n),l=+s-mh(s);return Math.round((i-l)/SL)}function LL(e,t){let o=yf(e,t),r=et(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Gn(r)}function PL(e){return et(e,Date.now())}function zn(e,t,o){let[r,a]=Ga(o?.in,e,t);return+fi(r)==+fi(a)}function TL(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function bf(e){return!(!TL(e)&&typeof e!="number"||isNaN(+Me(e)))}function ML(e,t){let o=Me(e,t?.in),r=o.getMonth();return o.setFullYear(o.getFullYear(),r+1,0),o.setHours(23,59,59,999),o}function kL(e,t){let[o,r]=Ga(e,t.start,t.end);return{start:o,end:r}}function Cf(e,t){let{start:o,end:r}=kL(t?.in,e),a=+o>+r,n=a?+o:+r,s=a?r:o;s.setHours(0,0,0,0);let i=t?.step??1;if(!i)return[];i<0&&(i=-i,a=!a);let l=[];for(;+s<=n;)l.push(et(o,s)),s.setDate(s.getDate()+i),s.setHours(0,0,0,0);return a?l.reverse():l}function AL(e,t){let o=Me(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function DL(e,t){let o=Me(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function EL(e,t){let o=wr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Me(e,t?.in),n=a.getDay(),s=(n<r?-7:0)+6-(n-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}var HV={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"}},NL=(e,t,o)=>{let r,a=HV[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function wf(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var UV={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},GV={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zV={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},FL={date:wf({formats:UV,defaultWidth:"full"}),time:wf({formats:GV,defaultWidth:"full"}),dateTime:wf({formats:zV,defaultWidth:"full"})};var qV={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},OL=(e,t,o,r)=>qV[e];function mi(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",a;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,i=o?.width?String(o.width):s;a=e.formattingValues[i]||e.formattingValues[s]}else{let s=e.defaultWidth,i=o?.width?String(o.width):e.defaultWidth;a=e.values[i]||e.values[s]}let n=e.argumentCallback?e.argumentCallback(t):t;return a[n]}}var WV={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$V={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jV={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"]},KV={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"]},XV={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"}},YV={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"}},ZV=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},_L={ordinalNumber:ZV,era:mi({values:WV,defaultWidth:"wide"}),quarter:mi({values:$V,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mi({values:jV,defaultWidth:"wide"}),day:mi({values:KV,defaultWidth:"wide"}),dayPeriod:mi({values:XV,defaultWidth:"wide",formattingValues:YV,defaultFormattingWidth:"wide"})};function pi(e){return(t,o={})=>{let r=o.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],n=t.match(a);if(!n)return null;let s=n[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?JV(i,d=>d.test(s)):QV(i,d=>d.test(s)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let c=t.slice(s.length);return{value:u,rest:c}}}function QV(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function JV(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function VL(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let a=r[0],n=t.match(e.parsePattern);if(!n)return null;let s=e.valueCallback?e.valueCallback(n[0]):n[0];s=o.valueCallback?o.valueCallback(s):s;let i=t.slice(a.length);return{value:s,rest:i}}}var eB=/^(\d+)(th|st|nd|rd)?/i,tB=/\d+/i,oB={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},rB={any:[/^b/i,/^(a|c)/i]},aB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nB={any:[/1/i,/2/i,/3/i,/4/i]},sB={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},iB={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]},lB={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},uB={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]},cB={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},dB={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}},BL={ordinalNumber:VL({matchPattern:eB,parsePattern:tB,valueCallback:e=>parseInt(e,10)}),era:pi({matchPatterns:oB,defaultMatchWidth:"wide",parsePatterns:rB,defaultParseWidth:"any"}),quarter:pi({matchPatterns:aB,defaultMatchWidth:"wide",parsePatterns:nB,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pi({matchPatterns:sB,defaultMatchWidth:"wide",parsePatterns:iB,defaultParseWidth:"any"}),day:pi({matchPatterns:lB,defaultMatchWidth:"wide",parsePatterns:uB,defaultParseWidth:"any"}),dayPeriod:pi({matchPatterns:cB,defaultMatchWidth:"any",parsePatterns:dB,defaultParseWidth:"any"})};var ph={code:"en-US",formatDistance:NL,formatLong:FL,formatRelative:OL,localize:_L,match:BL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HL(e,t){let o=Me(e,t?.in);return IL(o,DL(o))+1}function UL(e,t){let o=Me(e,t?.in),r=+Gn(o)-+LL(o);return Math.round(r/xf)+1}function Sf(e,t){let o=Me(e,t?.in),r=o.getFullYear(),a=wr(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=et(t?.in||e,0);s.setFullYear(r+1,0,n),s.setHours(0,0,0,0);let i=rr(s,t),l=et(t?.in||e,0);l.setFullYear(r,0,n),l.setHours(0,0,0,0);let u=rr(l,t);return+o>=+i?r+1:+o>=+u?r:r-1}function GL(e,t){let o=wr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Sf(e,t),n=et(t?.in||e,0);return n.setFullYear(a,0,r),n.setHours(0,0,0,0),rr(n,t)}function zL(e,t){let o=Me(e,t?.in),r=+rr(o,t)-+GL(o,t);return Math.round(r/xf)+1}function De(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var ea={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return De(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):De(o+1,2)},d(e,t){return De(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,t){return De(e.getHours()%12||12,t.length)},H(e,t){return De(e.getHours(),t.length)},m(e,t){return De(e.getMinutes(),t.length)},s(e,t){return De(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,o-3));return De(a,t.length)}};var gi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gh={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),a=r>0?r:1-r;return o.ordinalNumber(a,{unit:"year"})}return ea.y(e,t)},Y:function(e,t,o,r){let a=Sf(e,r),n=a>0?a:1-a;if(t==="YY"){let s=n%100;return De(s,2)}return t==="Yo"?o.ordinalNumber(n,{unit:"year"}):De(n,t.length)},R:function(e,t){let o=yf(e);return De(o,t.length)},u:function(e,t){let o=e.getFullYear();return De(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return De(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return De(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return ea.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return De(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let a=zL(e,r);return t==="wo"?o.ordinalNumber(a,{unit:"week"}):De(a,t.length)},I:function(e,t,o){let r=UL(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):De(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):ea.d(e,t)},D:function(e,t,o){let r=HL(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):De(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let a=e.getDay(),n=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return De(n,2);case"eo":return o.ordinalNumber(n,{unit:"day"});case"eee":return o.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(a,{width:"short",context:"formatting"});case"eeee":default:return o.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let a=e.getDay(),n=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return De(n,t.length);case"co":return o.ordinalNumber(n,{unit:"day"});case"ccc":return o.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(a,{width:"narrow",context:"standalone"});case"cccccc":return o.day(a,{width:"short",context:"standalone"});case"cccc":default:return o.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return De(a,t.length);case"io":return o.ordinalNumber(a,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});case"iiii":default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),a;switch(r===12?a=gi.noon:r===0?a=gi.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),a;switch(r>=17?a=gi.evening:r>=12?a=gi.afternoon:r>=4?a=gi.morning:a=gi.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return ea.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):ea.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):ea.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):ea.s(e,t)},S:function(e,t){return ea.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return WL(r);case"XXXX":case"XX":return qn(r);case"XXXXX":case"XXX":default:return qn(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return WL(r);case"xxxx":case"xx":return qn(r);case"xxxxx":case"xxx":default:return qn(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qL(r,":");case"OOOO":default:return"GMT"+qn(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qL(r,":");case"zzzz":default:return"GMT"+qn(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return De(r,t.length)},T:function(e,t,o){return De(+e,t.length)}};function qL(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),n=r%60;return n===0?o+String(a):o+String(a)+t+De(n,2)}function WL(e,t){return e%60===0?(e>0?"-":"+")+De(Math.abs(e)/60,2):qn(e,t)}function qn(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=De(Math.trunc(r/60),2),n=De(r%60,2);return o+a+t+n}var $L=(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"});case"PPPP":default:return t.date({width:"full"})}},jL=(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"});case"pppp":default:return t.time({width:"full"})}},fB=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],a=o[2];if(!a)return $L(e,t);let n;switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",$L(r,t)).replace("{{time}}",jL(a,t))},KL={p:jL,P:fB};var mB=/^D+$/,pB=/^Y+$/,gB=["D","DD","YY","YYYY"];function XL(e){return mB.test(e)}function YL(e){return pB.test(e)}function ZL(e,t,o){let r=hB(e,t,o);if(console.warn(r),gB.includes(e))throw new RangeError(r)}function hB(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var xB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yB=/^'([^]*?)'?$/,bB=/''/g,CB=/[a-zA-Z]/;function ar(e,t,o){let r=wr(),a=o?.locale??r.locale??ph,n=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Me(e,o?.in);if(!bf(i))throw new RangeError("Invalid time value");let l=t.match(vB).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=KL[d];return f(c,a.formatLong)}return c}).join("").match(xB).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:wB(c)};if(gh[d])return{isToken:!0,value:c};if(d.match(CB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});a.localize.preprocessor&&(l=a.localize.preprocessor(i,l));let u={firstWeekContainsDate:n,weekStartsOn:s,locale:a};return l.map(c=>{if(!c.isToken)return c.value;let d=c.value;(!o?.useAdditionalWeekYearTokens&&YL(d)||!o?.useAdditionalDayOfYearTokens&&XL(d))&&ZL(d,t,String(e));let f=gh[d[0]];return f(i,d,a.localize,u)}).join("")}function wB(e){let t=e.match(yB);return t?t[1].replace(bB,"'"):e}function hh(e,t){return Me(e,t?.in).getDay()}function QL(e,t,o){let[r,a]=Ga(o?.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function JL(e,t){return zn(et(t?.in||e,e),PL(t?.in||e))}function eP(e,t,o){return vf(e,-t,o)}var tP=b(A());var $t=b(D());function Rf({mode:e="single",selected:t,onSelect:o,disabled:r,showOutsideDays:a=!1,className:n,classNames:s,numberOfMonths:i=1,defaultMonth:l,...u}){let[c,d]=tP.useState(l||t&&t||new Date),f=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],m=()=>{d(eP(c,1))},p=()=>{d(vf(c,1))},g=w=>{if(!r?.(w)){if(e==="single")o?.(w);else if(e==="range"){let I=t;!I?.from||I.from&&I.to?o?.({from:w,to:void 0}):w<I.from?o?.({from:w,to:I.from}):o?.({from:I.from,to:w})}}},h=w=>{if(!t)return!1;if(e==="single")return zn(w,t);if(e==="range"){let I=t;return I.from&&I.to?w>=I.from&&w<=I.to:I.from?zn(w,I.from):!1}return!1},v=w=>{if(e!=="range"||!t)return!1;let I=t;return I.from?zn(w,I.from):!1},x=w=>{if(e!=="range"||!t)return!1;let I=t;return I.to?zn(w,I.to):!1},y=w=>{if(e!=="range"||!t)return!1;let I=t;return!I.from||!I.to?!1:w>I.from&&w<I.to},C=(()=>{let w=AL(c),I=ML(c),L=Cf({start:w,end:I}),P=hh(w),T=[];if(P>0&&a){let N=rr(w),q=new Date(w);q.setDate(q.getDate()-1),T.push(...Cf({start:N,end:q}))}let O=hh(I),$=[];if(O<6&&a){let N=new Date(I);N.setDate(N.getDate()+1);let q=EL(I);$.push(...Cf({start:N,end:q}))}let W=[];if(!a&&P>0)for(let N=0;N<P;N++)W.push(null);return[...T,...W,...L,...$]})();return(0,$t.jsxs)("div",{className:S("moonui-theme","p-0",n),children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,$t.jsx)("button",{onClick:m,className:S("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,$t.jsx)(Uo,{className:"h-5 w-5"})}),(0,$t.jsx)("h2",{className:"text-base font-medium",children:ar(c,"MMMM yyyy")}),(0,$t.jsx)("button",{onClick:p,className:S("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,$t.jsx)(Ut,{className:"h-5 w-5"})})]}),(0,$t.jsxs)("div",{className:"px-6 pb-4",children:[(0,$t.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((w,I)=>(0,$t.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:w.full,children:w.short},`weekday-${I}`))}),(0,$t.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((w,I)=>{if(!w)return(0,$t.jsx)("div",{className:"h-10 w-10"},`empty-${I}`);let L=!QL(w,c),P=r?.(w)||!1,T=h(w),O=JL(w),$=v(w),W=x(w),N=y(w);return(0,$t.jsx)("button",{onClick:()=>g(w),disabled:P,className:S("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",L&&"text-muted-foreground/50",P&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!N&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",O&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",N&&"bg-accent/30 text-accent-foreground rounded-none",$&&"rounded-r-none",W&&"rounded-l-none"),type:"button",children:ar(w,"d")},w.toISOString())})})]})]})}Rf.displayName="Calendar";var fe=b(D()),SB={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},xh=te("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"default",state:"default"}});function oP({className:e,variant:t,size:o,state:r,value:a,onChange:n,placeholder:s="Pick a date",formatString:i="PPP",minDate:l,maxDate:u,disabledDates:c,disabledDaysOfWeek:d,showWeekNumbers:f,iconPosition:m="left",icon:p,allowClear:g=!0,readOnly:h=!1,showTodayButton:v=!0,calendarProps:x,disabled:y,...R}){let[C,w]=jt.useState(!1),[I,L]=jt.useState(a);jt.useEffect(()=>{L(a)},[a]);let P=q=>{let E=Array.isArray(q)?q[0]:q&&typeof q=="object"&&"from"in q?q.from:q;L(E),n?.(E),E&&w(!1)},T=q=>{q.stopPropagation(),P(void 0)},O=()=>{P(new Date)},$=q=>!!(l&&q<l||u&&q>u||c?.some(E=>E.toDateString()===q.toDateString())||d?.includes(q.getDay())),W=I&&bf(I)?ar(I,i):null,N=p||(0,fe.jsx)(Ja,{className:"h-4 w-4"});return(0,fe.jsx)("div",{className:"moonui-theme",children:(0,fe.jsxs)(jr,{open:C,onOpenChange:w,children:[(0,fe.jsx)(Kr,{asChild:!0,children:(0,fe.jsxs)(Ve,{variant:t==="ghost"?"ghost":"outline",className:S(xh({variant:t,size:o,state:r}),!W&&"text-muted-foreground",e),disabled:y||h,...R,children:[(0,fe.jsx)(Fr,{mode:"wait",children:(0,fe.jsxs)(Ae.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[m==="left"&&N,(0,fe.jsx)("span",{className:"flex-1 truncate",children:W||s}),m==="right"&&N]},W||"placeholder")}),g&&W&&!h&&!y&&(0,fe.jsxs)(Ae.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer",onClick:T,role:"button",tabIndex:0,onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),T(q))},children:[(0,fe.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,fe.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,fe.jsx)("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:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})]})]})}),(0,fe.jsx)(br,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,fe.jsxs)(Ae.div,{...SB,className:"rounded-2xl bg-background overflow-hidden",children:[(0,fe.jsx)(Rf,{mode:"single",selected:I,onSelect:P,disabled:$,showOutsideDays:!1,className:S("rounded-2xl",x?.className),...x}),v&&(0,fe.jsx)("div",{className:"border-t px-4 py-3",children:(0,fe.jsx)(Ve,{variant:"ghost",size:"sm",onClick:O,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})}function RB({className:e,value:t,onChange:o,placeholder:r="Pick a date range",formatString:a="LLL dd, y",separator:n=" - ",...s}){let[i,l]=jt.useState(!1),[u,c]=jt.useState(t);jt.useEffect(()=>{c(t)},[t]);let d=m=>{c(m),o?.(m),m?.from&&m?.to&&l(!1)},f=jt.useMemo(()=>u?.from?u?.to?`${ar(u.from,a)}${n}${ar(u.to,a)}`:ar(u.from,a):null,[u,a,n]);return(0,fe.jsxs)(jr,{open:i,onOpenChange:l,children:[(0,fe.jsx)(Kr,{asChild:!0,children:(0,fe.jsxs)(Ve,{variant:s.variant==="ghost"?"ghost":"outline",className:S(xh({variant:s.variant,size:s.size,state:s.state}),!f&&"text-muted-foreground",e),disabled:s.disabled||s.readOnly,children:[(0,fe.jsx)(Ja,{className:"mr-2 h-4 w-4"}),(0,fe.jsx)("span",{className:"flex-1 truncate text-left",children:f||r})]})}),(0,fe.jsx)(br,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,fe.jsx)(Rf,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})}function IB({value:e,onChange:t,formatString:o="PPP p",showTimePicker:r=!0,timeFormat:a="24",timeInterval:n=15,...s}){let[i,l]=jt.useState(e),[u,c]=jt.useState(e?ar(e,a==="24"?"HH:mm":"hh:mm a"):"00:00"),d=p=>{if(!p){l(void 0),t?.(void 0);return}let[g,h]=u.split(":").map(Number);p.setHours(g,h),l(p),t?.(p)},f=p=>{let g=p.target.value;if(c(g),i){let[h,v]=g.split(":").map(Number),x=new Date(i);x.setHours(h,v),l(x),t?.(x)}},m=jt.useMemo(()=>{let p=[];for(let g=0;g<24;g++)for(let h=0;h<60;h+=n){let v=g.toString().padStart(2,"0"),x=h.toString().padStart(2,"0"),y=`${v}:${x}`;if(a==="12"){let R=g===0?12:g>12?g-12:g,C=g<12?"AM":"PM",w=`${R}:${x} ${C}`;p.push({value:y,label:w})}else p.push({value:y,label:y})}return p},[a,n]);return(0,fe.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,fe.jsx)(oP,{...s,value:i,onChange:d,formatString:"PPP",showTodayButton:!1}),r&&i&&(0,fe.jsxs)(Ae.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,fe.jsx)(Ei,{className:"h-4 w-4 text-muted-foreground"}),(0,fe.jsx)("select",{value:u,onChange:f,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:m.map(p=>(0,fe.jsx)("option",{value:p.value,children:p.label},p.value))})]})]})}function LB({value:e,onChange:t,placeholder:o="Pick a month",formatString:r="MMMM yyyy",...a}){let[n,s]=jt.useState(!1),[i,l]=jt.useState(e||new Date),u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=m=>{let p=new Date(i);p.setMonth(m),t?.(p),s(!1)},d=m=>{let p=new Date(i);p.setFullYear(p.getFullYear()+m),l(p)},f=e?ar(e,r):null;return(0,fe.jsxs)(jr,{open:n,onOpenChange:s,children:[(0,fe.jsx)(Kr,{asChild:!0,children:(0,fe.jsxs)(Ve,{variant:a.variant==="default"?"outline":a.variant||"outline",className:S(xh({variant:a.variant,size:a.size,state:a.state}),!f&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,fe.jsx)(Ja,{className:"mr-2 h-4 w-4"}),f||o]})}),(0,fe.jsx)(br,{className:"w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]",align:"start",children:(0,fe.jsxs)("div",{className:"p-3",children:[(0,fe.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,fe.jsx)(Ve,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,fe.jsx)(Uo,{className:"h-4 w-4"})}),(0,fe.jsx)("span",{className:"font-semibold",children:i.getFullYear()}),(0,fe.jsx)(Ve,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,fe.jsx)(Ut,{className:"h-4 w-4"})})]}),(0,fe.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((m,p)=>(0,fe.jsx)(Ve,{variant:e&&e.getMonth()===p?"primary":"outline",size:"sm",onClick:()=>c(p),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})}var rP=b(A());var vh=b(D());function PB({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:a,disabled:n=!1}){let[s,i]=rP.useState(null),l=(f,m)=>{n||(i(m),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,m)=>{if(f.preventDefault(),n||s===null||s===m){i(null);return}let p=[...e],g=p[s];p.splice(s,1),p.splice(m,0,g),t(p),i(null)},d=()=>{i(null)};return(0,vh.jsx)("div",{className:S("moonui-theme","space-y-2",a),children:e.map((f,m)=>(0,vh.jsx)("div",{draggable:!n,onDragStart:p=>l(p,m),onDragOver:u,onDrop:p=>c(p,m),onDragEnd:d,className:S("transition-opacity duration-200",!n&&"cursor-move hover:opacity-80",s===m&&"opacity-50",n&&"cursor-not-allowed"),children:o(f,m)},r(f)))})}var ta=b(A());var pt=b(A(),1);var oe=b(A(),1);var me=b(D(),1),yh=["Enter"," "],TB=["ArrowDown","PageUp","Home"],nP=["ArrowUp","PageDown","End"],MB=[...TB,...nP],kB={ltr:[...yh,"ArrowRight"],rtl:[...yh,"ArrowLeft"]},AB={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yu="Menu",[xu,DB,EB]=lr(yu),[Wn,bh]=Re(yu,[EB,No,ni]),bu=No(),sP=ni(),[iP,za]=Wn(yu),[NB,Cu]=Wn(yu),lP=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:a,onOpenChange:n,modal:s=!0}=e,i=bu(t),[l,u]=oe.useState(null),c=oe.useRef(!1),d=Te(n),f=So(a);return oe.useEffect(()=>{let m=()=>{c.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>c.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),(0,me.jsx)(qr,{...i,children:(0,me.jsx)(iP,{scope:t,open:o,onOpenChange:d,content:l,onContentChange:u,children:(0,me.jsx)(NB,{scope:t,onClose:oe.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:s,children:r})})})};lP.displayName=yu;var FB="MenuAnchor",Ch=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,a=bu(o);return(0,me.jsx)(Wr,{...a,...r,ref:t})});Ch.displayName=FB;var wh="MenuPortal",[OB,uP]=Wn(wh,{forceMount:void 0}),cP=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:a}=e,n=za(wh,t);return(0,me.jsx)(OB,{scope:t,forceMount:o,children:(0,me.jsx)(Oe,{present:o||n.open,children:(0,me.jsx)(ho,{asChild:!0,container:a,children:r})})})};cP.displayName=wh;var Oo="MenuContent",[_B,Sh]=Wn(Oo),dP=oe.forwardRef((e,t)=>{let o=uP(Oo,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=za(Oo,e.__scopeMenu),s=Cu(Oo,e.__scopeMenu);return(0,me.jsx)(xu.Provider,{scope:e.__scopeMenu,children:(0,me.jsx)(Oe,{present:r||n.open,children:(0,me.jsx)(xu.Slot,{scope:e.__scopeMenu,children:s.modal?(0,me.jsx)(VB,{...a,ref:t}):(0,me.jsx)(BB,{...a,ref:t})})})})}),VB=oe.forwardRef((e,t)=>{let o=za(Oo,e.__scopeMenu),r=oe.useRef(null),a=ee(t,r);return oe.useEffect(()=>{let n=r.current;if(n)return Na(n)},[]),(0,me.jsx)(Rh,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),BB=oe.forwardRef((e,t)=>{let o=za(Oo,e.__scopeMenu);return(0,me.jsx)(Rh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),HB=uo("MenuContent.ScrollLock"),Rh=oe.forwardRef((e,t)=>{let{__scopeMenu:o,loop:r=!1,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,disableOutsideScroll:p,...g}=e,h=za(Oo,o),v=Cu(Oo,o),x=bu(o),y=sP(o),R=DB(o),[C,w]=oe.useState(null),I=oe.useRef(null),L=ee(t,I,h.onContentChange),P=oe.useRef(0),T=oe.useRef(""),O=oe.useRef(0),$=oe.useRef(null),W=oe.useRef("right"),N=oe.useRef(0),q=p?$r:oe.Fragment,E=p?{as:HB,allowPinchZoom:!0}:void 0,G=k=>{let re=T.current+k,Se=R().filter(_=>!_.disabled),F=document.activeElement,j=Se.find(_=>_.ref.current===F)?.textValue,Z=Se.map(_=>_.textValue),X=QB(Z,re,j),ue=Se.find(_=>_.textValue===X)?.ref.current;(function _(ce){T.current=ce,window.clearTimeout(P.current),ce!==""&&(P.current=window.setTimeout(()=>_(""),1e3))})(re),ue&&setTimeout(()=>ue.focus())};oe.useEffect(()=>()=>window.clearTimeout(P.current),[]),Ma();let M=oe.useCallback(k=>W.current===$.current?.side&&eH(k,$.current?.area),[]);return(0,me.jsx)(_B,{scope:o,searchRef:T,onItemEnter:oe.useCallback(k=>{M(k)&&k.preventDefault()},[M]),onItemLeave:oe.useCallback(k=>{M(k)||(I.current?.focus(),w(null))},[M]),onTriggerLeave:oe.useCallback(k=>{M(k)&&k.preventDefault()},[M]),pointerGraceTimerRef:O,onPointerGraceIntentChange:oe.useCallback(k=>{$.current=k},[]),children:(0,me.jsx)(q,{...E,children:(0,me.jsx)(Gr,{asChild:!0,trapped:a,onMountAutoFocus:V(n,k=>{k.preventDefault(),I.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,me.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,children:(0,me.jsx)(Zd,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:V(l,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,me.jsx)(Da,{role:"menu","aria-orientation":"vertical","data-state":TP(h.open),"data-radix-menu-content":"",dir:v.dir,...x,...g,ref:L,style:{outline:"none",...g.style},onKeyDown:V(g.onKeyDown,k=>{let Se=k.target.closest("[data-radix-menu-content]")===k.currentTarget,F=k.ctrlKey||k.altKey||k.metaKey,j=k.key.length===1;Se&&(k.key==="Tab"&&k.preventDefault(),!F&&j&&G(k.key));let Z=I.current;if(k.target!==Z||!MB.includes(k.key))return;k.preventDefault();let ue=R().filter(_=>!_.disabled).map(_=>_.ref.current);nP.includes(k.key)&&ue.reverse(),YB(ue)}),onBlur:V(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(P.current),T.current="")}),onPointerMove:V(e.onPointerMove,vu(k=>{let re=k.target,Se=N.current!==k.clientX;if(k.currentTarget.contains(re)&&Se){let F=k.clientX>N.current?"right":"left";W.current=F,N.current=k.clientX}}))})})})})})})});dP.displayName=Oo;var UB="MenuGroup",Ih=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,me.jsx)(H.div,{role:"group",...r,ref:t})});Ih.displayName=UB;var GB="MenuLabel",fP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,me.jsx)(H.div,{...r,ref:t})});fP.displayName=GB;var If="MenuItem",aP="menu.itemSelect",Pf=oe.forwardRef((e,t)=>{let{disabled:o=!1,onSelect:r,...a}=e,n=oe.useRef(null),s=Cu(If,e.__scopeMenu),i=Sh(If,e.__scopeMenu),l=ee(t,n),u=oe.useRef(!1),c=()=>{let d=n.current;if(!o&&d){let f=new CustomEvent(aP,{bubbles:!0,cancelable:!0});d.addEventListener(aP,m=>r?.(m),{once:!0}),es(d,f),f.defaultPrevented?u.current=!1:s.onClose()}};return(0,me.jsx)(mP,{...a,ref:l,disabled:o,onClick:V(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:V(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:V(e.onKeyDown,d=>{let f=i.searchRef.current!=="";o||f&&d.key===" "||yh.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Pf.displayName=If;var mP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:a,...n}=e,s=Sh(If,o),i=sP(o),l=oe.useRef(null),u=ee(t,l),[c,d]=oe.useState(!1),[f,m]=oe.useState("");return oe.useEffect(()=>{let p=l.current;p&&m((p.textContent??"").trim())},[n.children]),(0,me.jsx)(xu.ItemSlot,{scope:o,disabled:r,textValue:a??f,children:(0,me.jsx)(Qd,{asChild:!0,...i,focusable:!r,children:(0,me.jsx)(H.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...n,ref:u,onPointerMove:V(e.onPointerMove,vu(p=>{r?s.onItemLeave(p):(s.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,vu(p=>s.onItemLeave(p))),onFocus:V(e.onFocus,()=>d(!0)),onBlur:V(e.onBlur,()=>d(!1))})})})}),zB="MenuCheckboxItem",pP=oe.forwardRef((e,t)=>{let{checked:o=!1,onCheckedChange:r,...a}=e;return(0,me.jsx)(yP,{scope:e.__scopeMenu,checked:o,children:(0,me.jsx)(Pf,{role:"menuitemcheckbox","aria-checked":Lf(o)?"mixed":o,...a,ref:t,"data-state":Th(o),onSelect:V(a.onSelect,()=>r?.(Lf(o)?!0:!o),{checkForDefaultPrevented:!1})})})});pP.displayName=zB;var gP="MenuRadioGroup",[qB,WB]=Wn(gP,{value:void 0,onValueChange:()=>{}}),hP=oe.forwardRef((e,t)=>{let{value:o,onValueChange:r,...a}=e,n=Te(r);return(0,me.jsx)(qB,{scope:e.__scopeMenu,value:o,onValueChange:n,children:(0,me.jsx)(Ih,{...a,ref:t})})});hP.displayName=gP;var xP="MenuRadioItem",vP=oe.forwardRef((e,t)=>{let{value:o,...r}=e,a=WB(xP,e.__scopeMenu),n=o===a.value;return(0,me.jsx)(yP,{scope:e.__scopeMenu,checked:n,children:(0,me.jsx)(Pf,{role:"menuitemradio","aria-checked":n,...r,ref:t,"data-state":Th(n),onSelect:V(r.onSelect,()=>a.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});vP.displayName=xP;var Lh="MenuItemIndicator",[yP,$B]=Wn(Lh,{checked:!1}),bP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,forceMount:r,...a}=e,n=$B(Lh,o);return(0,me.jsx)(Oe,{present:r||Lf(n.checked)||n.checked===!0,children:(0,me.jsx)(H.span,{...a,ref:t,"data-state":Th(n.checked)})})});bP.displayName=Lh;var jB="MenuSeparator",CP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,me.jsx)(H.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});CP.displayName=jB;var KB="MenuArrow",wP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,a=bu(o);return(0,me.jsx)(Ea,{...a,...r,ref:t})});wP.displayName=KB;var Ph="MenuSub",[XB,SP]=Wn(Ph),RP=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:a}=e,n=za(Ph,t),s=bu(t),[i,l]=oe.useState(null),[u,c]=oe.useState(null),d=Te(a);return oe.useEffect(()=>(n.open===!1&&d(!1),()=>d(!1)),[n.open,d]),(0,me.jsx)(qr,{...s,children:(0,me.jsx)(iP,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:(0,me.jsx)(XB,{scope:t,contentId:Pe(),triggerId:Pe(),trigger:i,onTriggerChange:l,children:o})})})};RP.displayName=Ph;var hu="MenuSubTrigger",IP=oe.forwardRef((e,t)=>{let o=za(hu,e.__scopeMenu),r=Cu(hu,e.__scopeMenu),a=SP(hu,e.__scopeMenu),n=Sh(hu,e.__scopeMenu),s=oe.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=n,u={__scopeMenu:e.__scopeMenu},c=oe.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return oe.useEffect(()=>c,[c]),oe.useEffect(()=>{let d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),(0,me.jsx)(Ch,{asChild:!0,...u,children:(0,me.jsx)(mP,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":TP(o.open),...e,ref:lo(t,a.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,vu(d=>{n.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!o.open&&!s.current&&(n.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{o.onOpenChange(!0),c()},100))})),onPointerLeave:V(e.onPointerLeave,vu(d=>{c();let f=o.content?.getBoundingClientRect();if(f){let m=o.content?.dataset.side,p=m==="right",g=p?-5:5,h=f[p?"left":"right"],v=f[p?"right":"left"];n.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:h,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x:h,y:f.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>n.onPointerGraceIntentChange(null),300)}else{if(n.onTriggerLeave(d),d.defaultPrevented)return;n.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,d=>{let f=n.searchRef.current!=="";e.disabled||f&&d.key===" "||kB[r.dir].includes(d.key)&&(o.onOpenChange(!0),o.content?.focus(),d.preventDefault())})})})});IP.displayName=hu;var LP="MenuSubContent",PP=oe.forwardRef((e,t)=>{let o=uP(Oo,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=za(Oo,e.__scopeMenu),s=Cu(Oo,e.__scopeMenu),i=SP(LP,e.__scopeMenu),l=oe.useRef(null),u=ee(t,l);return(0,me.jsx)(xu.Provider,{scope:e.__scopeMenu,children:(0,me.jsx)(Oe,{present:r||n.open,children:(0,me.jsx)(xu.Slot,{scope:e.__scopeMenu,children:(0,me.jsx)(Rh,{id:i.contentId,"aria-labelledby":i.triggerId,...a,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{s.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:V(e.onFocusOutside,c=>{c.target!==i.trigger&&n.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,c=>{s.onClose(),c.preventDefault()}),onKeyDown:V(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=AB[s.dir].includes(c.key);d&&f&&(n.onOpenChange(!1),i.trigger?.focus(),c.preventDefault())})})})})})});PP.displayName=LP;function TP(e){return e?"open":"closed"}function Lf(e){return e==="indeterminate"}function Th(e){return Lf(e)?"indeterminate":e?"checked":"unchecked"}function YB(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function ZB(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function QB(e,t,o){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=o?e.indexOf(o):-1,s=ZB(e,Math.max(n,0));a.length===1&&(s=s.filter(u=>u!==o));let l=s.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return l!==o?l:void 0}function JB(e,t){let{x:o,y:r}=e,a=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let i=t[n],l=t[s],u=i.x,c=i.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(a=!a)}return a}function eH(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return JB(o,t)}function vu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var MP=lP,kP=Ch,AP=cP,DP=dP,EP=Ih,NP=fP,FP=Pf,OP=pP,_P=hP,VP=vP,BP=bP,HP=CP,UP=wP,GP=RP,zP=IP,qP=PP;var mt=b(D(),1),Tf="DropdownMenu",[oH,fde]=Re(Tf,[bh]),Ot=bh(),[rH,WP]=oH(Tf),$P=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:a,defaultOpen:n,onOpenChange:s,modal:i=!0}=e,l=Ot(t),u=pt.useRef(null),[c,d]=Fe({prop:a,defaultProp:n??!1,onChange:s,caller:Tf});return(0,mt.jsx)(rH,{scope:t,triggerId:Pe(),triggerRef:u,contentId:Pe(),open:c,onOpenChange:d,onOpenToggle:pt.useCallback(()=>d(f=>!f),[d]),modal:i,children:(0,mt.jsx)(MP,{...l,open:c,onOpenChange:d,dir:r,modal:i,children:o})})};$P.displayName=Tf;var jP="DropdownMenuTrigger",KP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...a}=e,n=WP(jP,o),s=Ot(o);return(0,mt.jsx)(kP,{asChild:!0,...s,children:(0,mt.jsx)(H.button,{type:"button",id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":n.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:lo(t,n.triggerRef),onPointerDown:V(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(n.onOpenToggle(),n.open||i.preventDefault())}),onKeyDown:V(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&n.onOpenToggle(),i.key==="ArrowDown"&&n.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});KP.displayName=jP;var aH="DropdownMenuPortal",XP=e=>{let{__scopeDropdownMenu:t,...o}=e,r=Ot(t);return(0,mt.jsx)(AP,{...r,...o})};XP.displayName=aH;var YP="DropdownMenuContent",ZP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=WP(YP,o),n=Ot(o),s=pt.useRef(!1);return(0,mt.jsx)(DP,{id:a.contentId,"aria-labelledby":a.triggerId,...n,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,i=>{s.current||a.triggerRef.current?.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:V(e.onInteractOutside,i=>{let l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!a.modal||c)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ZP.displayName=YP;var nH="DropdownMenuGroup",QP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(EP,{...a,...r,ref:t})});QP.displayName=nH;var sH="DropdownMenuLabel",JP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(NP,{...a,...r,ref:t})});JP.displayName=sH;var iH="DropdownMenuItem",eT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(FP,{...a,...r,ref:t})});eT.displayName=iH;var lH="DropdownMenuCheckboxItem",tT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(OP,{...a,...r,ref:t})});tT.displayName=lH;var uH="DropdownMenuRadioGroup",oT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(_P,{...a,...r,ref:t})});oT.displayName=uH;var cH="DropdownMenuRadioItem",rT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(VP,{...a,...r,ref:t})});rT.displayName=cH;var dH="DropdownMenuItemIndicator",aT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(BP,{...a,...r,ref:t})});aT.displayName=dH;var fH="DropdownMenuSeparator",nT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(HP,{...a,...r,ref:t})});nT.displayName=fH;var mH="DropdownMenuArrow",pH=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(UP,{...a,...r,ref:t})});pH.displayName=mH;var gH=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:a,defaultOpen:n}=e,s=Ot(t),[i,l]=Fe({prop:r,defaultProp:n??!1,onChange:a,caller:"DropdownMenuSub"});return(0,mt.jsx)(GP,{...s,open:i,onOpenChange:l,children:o})},hH="DropdownMenuSubTrigger",sT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(zP,{...a,...r,ref:t})});sT.displayName=hH;var xH="DropdownMenuSubContent",iT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(qP,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iT.displayName=xH;var lT=$P,uT=KP,Mh=XP,kh=ZP,cT=QP,Ah=JP,Dh=eT,Eh=tT,dT=oT,Nh=rT,Fh=aT,Oh=nT;var fT=gH,_h=sT,Vh=iT;var gt=b(D()),yH=lT,bH=uT,CH=cT,wH=Mh,SH=fT,RH=dT,mT=ta.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,gt.jsxs)(_h,{ref:a,className:S("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[o,(0,gt.jsx)(Ut,{className:"ml-auto h-4 w-4"})]}));mT.displayName=_h.displayName;var pT=ta.forwardRef(({className:e,...t},o)=>(0,gt.jsx)(Vh,{ref:o,className:S("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));pT.displayName=Vh.displayName;var gT=ta.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,gt.jsx)(Mh,{children:(0,gt.jsx)(kh,{ref:r,sideOffset:t,className:S("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...o})}));gT.displayName=kh.displayName;var hT=ta.forwardRef(({className:e,inset:t,...o},r)=>(0,gt.jsx)(Dh,{ref:r,className:S("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));hT.displayName=Dh.displayName;var xT=ta.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,gt.jsxs)(Eh,{ref:a,className:S("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,gt.jsx)(Fh,{children:(0,gt.jsx)(It,{className:"h-4 w-4"})})}),t]}));xT.displayName=Eh.displayName;var vT=ta.forwardRef(({className:e,children:t,...o},r)=>(0,gt.jsxs)(Nh,{ref:r,className:S("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,gt.jsx)(Fh,{children:(0,gt.jsx)(en,{className:"h-2 w-2 fill-current"})})}),t]}));vT.displayName=Nh.displayName;var yT=ta.forwardRef(({className:e,inset:t,...o},r)=>(0,gt.jsx)(Ah,{ref:r,className:S("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));yT.displayName=Ah.displayName;var bT=ta.forwardRef(({className:e,...t},o)=>(0,gt.jsx)(Oh,{ref:o,className:S("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));bT.displayName=Oh.displayName;var CT=({className:e,...t})=>(0,gt.jsx)("span",{className:S("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});CT.displayName="DropdownMenuShortcut";var vo=b(A());var wT=b(A());var oa=b(D()),IH=te("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",default:"h-2",md:"h-2.5",lg:"h-3",xl:"h-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"default",radius:"full",animation:"default"}}),LH=te("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",error:"bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),Mf=wT.forwardRef(({className:e,value:t=0,variant:o,size:r,radius:a,animation:n,indicatorVariant:s,showValueLabel:i=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},m)=>{let p=Math.max(0,Math.min(t,d)),g=d>0?p/d*100:0,h=l||`${Math.round(g)}%`;return(0,oa.jsxs)(oa.Fragment,{children:[i&&(0,oa.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,oa.jsx)("span",{className:S("text-sm font-medium text-muted-foreground",u),children:h})}),(0,oa.jsx)("div",{ref:m,className:S("moonui-theme",IH({variant:o,size:r,radius:a,animation:n}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:p,...f,children:(0,oa.jsx)("div",{className:S(LH({variant:s||"primary",animation:n}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});Mf.displayName="Progress";var de=b(D()),PH=e=>e.startsWith("image/")?(0,de.jsx)(on,{className:"h-4 w-4"}):e.startsWith("video/")?(0,de.jsx)(el,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,de.jsx)($i,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,de.jsx)(Vi,{className:"h-4 w-4"}):(0,de.jsx)(Bi,{className:"h-4 w-4"}),Bh=e=>{if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+o[r]},TH=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:a,status:n,preview:s}=e;return(0,de.jsxs)(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[(0,de.jsx)("div",{className:"flex-shrink-0",children:s?(0,de.jsx)("img",{src:s,alt:r.name,className:"h-10 w-10 object-cover rounded"}):(0,de.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:PH(r.type)})}),(0,de.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,de.jsxs)("div",{className:"flex items-center justify-between",children:[(0,de.jsx)("p",{className:"text-sm font-medium truncate",children:r.name}),(0,de.jsx)(Ve,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),children:(0,de.jsx)(co,{className:"h-3 w-3"})})]}),(0,de.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,de.jsx)("p",{className:"text-xs text-muted-foreground",children:Bh(r.size)}),n==="uploading"&&(0,de.jsxs)(fo,{variant:"secondary",className:"h-5",children:[(0,de.jsx)(St,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),n==="success"&&(0,de.jsxs)(fo,{variant:"success",className:"h-5",children:[(0,de.jsx)(ia,{className:"h-3 w-3 mr-1"}),"Done"]}),n==="error"&&(0,de.jsxs)(fo,{variant:"destructive",className:"h-5",children:[(0,de.jsx)(Go,{className:"h-3 w-3 mr-1"}),"Error"]})]}),n==="uploading"&&(0,de.jsx)("div",{className:"mt-2",children:(0,de.jsx)(Mf,{value:a,className:"h-1"})})]})]})},ST=vo.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:o=10*1024*1024,maxFiles:r=5,disabled:a=!1,className:n,onUpload:s,onRemove:i,children:l,...u},c)=>{let[d,f]=(0,vo.useState)([]),[m,p]=(0,vo.useState)(!1),[g,h]=(0,vo.useState)(null),v=L=>L.size>o?`File size exceeds ${Bh(o)}`:e!=="*"&&!e.split(",").some(P=>{let T=P.trim();return T.includes("*")?L.type.startsWith(T.replace("*","")):L.type===T})?"File type not supported":null,x=(0,vo.useCallback)(async L=>{let P=Array.from(L);if(h(null),d.length+P.length>r){h(`Maximum ${r} files allowed`);return}let T=[],O=[];if(P.forEach(W=>{let N=v(W);N?O.push(`${W.name}: ${N}`):T.push(W)}),O.length>0){h(O.join(", "));return}let $=T.map((W,N)=>({id:`${Date.now()}-${N}-${W.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:W,progress:0,status:"uploading",preview:W.type.startsWith("image/")?URL.createObjectURL(W):void 0}));f(W=>[...W,...$]);for(let W of $){let N=0,q=setInterval(()=>{N+=15+W.file.size%10,N>=100?(N=100,clearInterval(q),f(E=>E.map(G=>G.id===W.id?{...G,progress:100,status:"success"}:G))):f(E=>E.map(G=>G.id===W.id?{...G,progress:N}:G))},200)}if(s)try{await s(T)}catch(W){console.error("Upload failed:",W),f(N=>N.map(q=>$.some(E=>E.id===q.id)?{...q,status:"error"}:q))}},[d.length,r,o,e,s]),y=(0,vo.useCallback)(L=>{if(L.preventDefault(),p(!1),a)return;let P=L.dataTransfer.files;P.length>0&&x(P)},[x,a]),R=(0,vo.useCallback)(L=>{L.preventDefault(),a||p(!0)},[a]),C=(0,vo.useCallback)(L=>{L.preventDefault(),p(!1)},[]),w=(0,vo.useCallback)(L=>{let P=L.target.files;P&&P.length>0&&x(P),L.target.value=""},[x]),I=(0,vo.useCallback)(L=>{f(P=>{let T=P.find(O=>O.id===L);return T?.preview&&URL.revokeObjectURL(T.preview),P.filter(O=>O.id!==L)}),i&&i(L)},[i]);return(0,de.jsxs)("div",{ref:c,className:S("moonui-theme","space-y-4",n),...u,children:[(0,de.jsxs)(Ae.div,{className:S("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",m&&"border-primary bg-primary/5",a&&"opacity-50 cursor-not-allowed",!a&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:R,onDragLeave:C,animate:{scale:m?1.02:1,borderColor:m?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,de.jsx)("input",{type:"file",accept:e,multiple:t,disabled:a,onChange:w,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,de.jsxs)("div",{className:"space-y-4",children:[(0,de.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,de.jsx)(Ji,{className:"h-full w-full"})}),(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{className:"text-lg font-medium",children:m?"Drop files here":"Upload files"}),(0,de.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,de.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",Bh(o)," each"]})]}),(0,de.jsx)(Ve,{variant:"outline",disabled:a,children:"Select Files"})]})]}),(0,de.jsx)(Fr,{children:g&&(0,de.jsxs)(Ae.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[(0,de.jsx)(Go,{className:"h-4 w-4"}),(0,de.jsx)("span",{children:g})]})}),(0,de.jsx)(Fr,{children:d.length>0&&(0,de.jsxs)(Ae.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,de.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,de.jsx)("div",{className:"space-y-2",children:(0,de.jsx)(Fr,{children:d.map(L=>(0,de.jsx)(TH,{uploadedFile:L,onRemove:I},L.id))})})]})})]})});ST.displayName="FileUpload";var RT=b(A());var $n=b(D()),IT=RT.default.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:a=50,className:n,overlayClassName:s,enableSwipeToClose:i=!0,...l},u)=>{let c=Ks(0),d=Ks(0),f=r==="up"||r==="down",m=f?c:d,p=_p(m,[0,a],[1,.5]),g=(x,y)=>{if(!i)return;let R=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,w=!1;switch(r){case"up":w=R>a||C>500;break;case"down":w=R<-a||C<-500;break;case"left":w=R>a||C>500;break;case"right":w=R<-a||C<-500;break}w?o(!1):Hp(m,0,{type:"spring",stiffness:300,damping:20})},h=()=>{switch(r){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},v=()=>f?{y:0}:{x:0};return t?(0,$n.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,$n.jsx)(Ae.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:S("absolute inset-0 bg-black/50",s)}),(0,$n.jsxs)(Ae.div,{ref:u,drag:i?f?"y":"x":!1,dragConstraints:{top:r==="up"?0:void 0,bottom:r==="down"?0:void 0,left:r==="left"?0:void 0,right:r==="right"?0:void 0},dragElastic:.2,onDragEnd:g,style:{[f?"y":"x"]:m,opacity:p},initial:h(),animate:v(),exit:h(),transition:{type:"spring",damping:30,stiffness:300},className:S("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":r==="up","top-0 left-0 right-0 rounded-b-lg":r==="down","top-0 bottom-0 right-0 rounded-l-lg":r==="left","top-0 bottom-0 left-0 rounded-r-lg":r==="right"},n),...l,children:[(r==="up"||r==="down")&&(0,$n.jsx)("div",{className:"flex justify-center p-2",children:(0,$n.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});IT.displayName="GestureDrawer";var qa=b(A());var ze=b(D());function MH({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:a="https://github.com/moonui/moonui"}){let[n,s]=(0,qa.useState)(null),[i,l]=(0,qa.useState)(!0);(0,qa.useEffect)(()=>{(async()=>{try{let p=await(await fetch("/api/github-stars")).json();s(p)}catch(m){console.error("Failed to fetch GitHub stats:",m),s({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=f=>f>=1e3?(f/1e3).toFixed(1)+"k":f.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},d={sm:14,md:16,lg:20};return i?(0,ze.jsxs)("div",{className:S("flex items-center animate-pulse",c[t],e),children:[(0,ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,ze.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),o&&(0,ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,ze.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):n?(0,ze.jsxs)("div",{className:S("flex items-center",c[t],e),children:[(0,ze.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,ze.jsx)(us,{className:"fill-current text-yellow-500",size:d[t]}),(0,ze.jsx)("span",{className:"font-medium",children:u(n.stars)})]}),o&&(0,ze.jsxs)("a",{href:`${a}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,ze.jsx)(Hi,{size:d[t]}),(0,ze.jsx)("span",{className:"font-medium",children:u(n.forks)})]}),r&&(0,ze.jsxs)("a",{href:`${a}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,ze.jsx)(tn,{size:d[t]}),(0,ze.jsx)("span",{className:"font-medium",children:u(n.watchers)})]}),!n.isLive&&(0,ze.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function _de({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,a]=(0,qa.useState)(null),[n,s]=(0,qa.useState)(!0);(0,qa.useEffect)(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();a(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),a(1240)}finally{s(!1)}})()},[]);let i=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return(0,ze.jsx)(Ve,{variant:"outline",size:t,className:S("moonui-theme","group",e),asChild:!0,children:(0,ze.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,ze.jsx)(us,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,ze.jsx)("span",{children:"Star on GitHub"}),!n&&r&&(0,ze.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:i(r)}),(0,ze.jsx)(_i,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var hi=b(A());var pe=b(D());function LT({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:a=2e3}){let[n,s]=(0,hi.useState)(!1),[i,l]=(0,hi.useState)(null),u=()=>{if(!r)return;s(!0),i&&clearTimeout(i);let d=setTimeout(()=>{s(!1)},a);l(d)},c=()=>{i&&(clearTimeout(i),l(null)),s(!1)};return(0,pe.jsxs)("div",{className:S("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[(0,pe.jsx)("div",{className:S("transition-all duration-300",!n&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,pe.jsx)("div",{className:S("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",n?"opacity-0":"opacity-100"),children:(0,pe.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,pe.jsx)("div",{className:"flex justify-center",children:(0,pe.jsxs)(fo,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,pe.jsx)(ns,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,pe.jsx)("div",{className:"flex justify-center",children:(0,pe.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,pe.jsx)(is,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,pe.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,pe.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),(0,pe.jsxs)(Ve,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[(0,pe.jsx)(cs,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!n&&(0,pe.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,pe.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function kH({children:e,componentId:t,componentName:o,className:r,fallback:a,requireCLI:n=!0}){let[s,i]=(0,hi.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,hi.useEffect)(()=>{if(!(()=>{let d={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:d.nodeEnv&&d.localhost&&!d.vercelEnv&&!d.ciEnv})()||!n){i({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let d=localStorage.getItem("moonui_cli_token"),f=localStorage.getItem("moonui_device_id");if(!d||!f){i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let m=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${d}`,"X-Device-ID":f,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(m.ok){let p=await m.json();i({isAuthenticated:!0,deviceValid:p.valid,hasProAccess:p.hasProAccess,loading:!1})}else i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[n]),s.loading)return(0,pe.jsx)("div",{className:S("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:(0,pe.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,pe.jsx)("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&n){if(!s.isAuthenticated)return(0,pe.jsxs)("div",{className:S("relative",r),children:[(0,pe.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),(0,pe.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:(0,pe.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,pe.jsxs)(fo,{variant:"destructive",className:"mb-2",children:[(0,pe.jsx)(is,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,pe.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,pe.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,pe.jsx)("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!s.deviceValid)return(0,pe.jsxs)("div",{className:S("relative",r),children:[(0,pe.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),(0,pe.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:(0,pe.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,pe.jsxs)(fo,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,pe.jsx)(cs,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,pe.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,pe.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),(0,pe.jsx)(Ve,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!s.hasProAccess)return(0,pe.jsx)(LT,{componentName:o||t,className:r,children:a||e})}return(0,pe.jsx)("div",{className:r,children:e})}function AH({className:e}){return(0,pe.jsxs)(fo,{variant:"secondary",className:S("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,pe.jsx)(ns,{className:"w-3 h-3 mr-1"}),"PRO"]})}function DH({className:e}){return(0,pe.jsx)(fo,{variant:"outline",className:S("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var PT=b(A());var _t=b(D());function Hh({className:e,variant:t="default",showText:o=!0,...r}){let n=`moon-gradient-${PT.useId()}`;return(0,_t.jsxs)("div",{className:S("moonui-theme","flex items-center gap-2",e),children:[(0,_t.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...r,children:[t==="gradient"&&(0,_t.jsx)("defs",{children:(0,_t.jsxs)("linearGradient",{id:n,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,_t.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,_t.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,_t.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]})}),(0,_t.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${n})`:"currentColor",className:t==="default"?"fill-primary":""}),(0,_t.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"white",className:"dark:fill-background"})]}),o&&(0,_t.jsxs)("span",{className:"text-xl font-bold",children:[(0,_t.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,_t.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function jde({className:e,variant:t="default",...o}){return(0,_t.jsx)(Hh,{showText:!1,className:e,variant:t,...o})}function Kde({className:e,variant:t="default",showText:o=!0,...r}){return(0,_t.jsx)(Hh,{className:S("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}var Uh=b(A());var Kt=b(D()),TT=({className:e,...t})=>(0,Kt.jsx)("nav",{role:"navigation","aria-label":"pagination",className:S("moonui-theme","mx-auto flex w-full justify-center",e),...t});TT.displayName="Pagination";var MT=Uh.forwardRef(({className:e,...t},o)=>(0,Kt.jsx)("ul",{ref:o,className:S("moonui-theme","flex flex-row items-center gap-1",e),...t}));MT.displayName="PaginationContent";var kT=Uh.forwardRef(({className:e,...t},o)=>(0,Kt.jsx)("li",{ref:o,className:S("moonui-theme","",e),...t}));kT.displayName="PaginationItem";var kf=({className:e,isActive:t,size:o="icon",...r})=>(0,Kt.jsx)("a",{"aria-current":t?"page":void 0,className:S(ec({variant:t?"outline":"ghost",size:o}),e),...r});kf.displayName="PaginationLink";var AT=({className:e,...t})=>(0,Kt.jsxs)(kf,{"aria-label":"Go to previous page",size:"md",className:S("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Kt.jsx)(Uo,{className:"h-4 w-4"}),(0,Kt.jsx)("span",{children:"Previous"})]});AT.displayName="PaginationPrevious";var DT=({className:e,...t})=>(0,Kt.jsxs)(kf,{"aria-label":"Go to next page",size:"md",className:S("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Kt.jsx)("span",{children:"Next"}),(0,Kt.jsx)(Ut,{className:"h-4 w-4"})]});DT.displayName="PaginationNext";var ET=({className:e,...t})=>(0,Kt.jsxs)("span",{"aria-hidden":!0,className:S("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Kt.jsx)(cr,{className:"h-4 w-4"}),(0,Kt.jsx)("span",{className:"sr-only",children:"More pages"})]});ET.displayName="PaginationEllipsis";var Lu=b(A());var ja=b(A());var K=b(A(),1),Kh=b(Jn(),1);function wu(e,[t,o]){return Math.min(o,Math.max(t,e))}var NT=b(A(),1);var FT=b(D(),1),Gh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),EH="VisuallyHidden",Su=NT.forwardRef((e,t)=>(0,FT.jsx)(H.span,{...e,ref:t,style:{...Gh,...e.style}}));Su.displayName=EH;var OT=Su;var se=b(D(),1),FH=[" ","Enter","ArrowUp","ArrowDown"],OH=[" ","Enter"],jn="Select",[Df,Ef,_H]=lr(jn),[xi,Rfe]=Re(jn,[_H,No]),Nf=No(),[VH,Wa]=xi(jn),[BH,HH]=xi(jn),_T=e=>{let{__scopeSelect:t,children:o,open:r,defaultOpen:a,onOpenChange:n,value:s,defaultValue:i,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:m,form:p}=e,g=Nf(t),[h,v]=K.useState(null),[x,y]=K.useState(null),[R,C]=K.useState(!1),w=So(u),[I,L]=Fe({prop:r,defaultProp:a??!1,onChange:n,caller:jn}),[P,T]=Fe({prop:s,defaultProp:i,onChange:l,caller:jn}),O=K.useRef(null),$=h?p||!!h.closest("form"):!0,[W,N]=K.useState(new Set),q=Array.from(W).map(E=>E.props.value).join(";");return(0,se.jsx)(qr,{...g,children:(0,se.jsxs)(VH,{required:m,scope:t,trigger:h,onTriggerChange:v,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:R,onValueNodeHasChildrenChange:C,contentId:Pe(),value:P,onValueChange:T,open:I,onOpenChange:L,dir:w,triggerPointerDownPosRef:O,disabled:f,children:[(0,se.jsx)(Df.Provider,{scope:t,children:(0,se.jsx)(BH,{scope:e.__scopeSelect,onNativeOptionAdd:K.useCallback(E=>{N(G=>new Set(G).add(E))},[]),onNativeOptionRemove:K.useCallback(E=>{N(G=>{let M=new Set(G);return M.delete(E),M})},[]),children:o})}),$?(0,se.jsxs)(lM,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:E=>T(E.target.value),disabled:f,form:p,children:[P===void 0?(0,se.jsx)("option",{value:""}):null,Array.from(W)]},q):null]})})};_T.displayName=jn;var VT="SelectTrigger",BT=K.forwardRef((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Nf(o),s=Wa(VT,o),i=s.disabled||r,l=ee(t,s.onTriggerChange),u=Ef(o),c=K.useRef("touch"),[d,f,m]=cM(g=>{let h=u().filter(y=>!y.disabled),v=h.find(y=>y.value===s.value),x=dM(h,g,v);x!==void 0&&s.onValueChange(x.value)}),p=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return(0,se.jsx)(Wr,{asChild:!0,...n,children:(0,se.jsx)(H.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":uM(s.value)?"":void 0,...a,ref:l,onClick:V(a.onClick,g=>{g.currentTarget.focus(),c.current!=="mouse"&&p(g)}),onPointerDown:V(a.onPointerDown,g=>{c.current=g.pointerType;let h=g.target;h.hasPointerCapture(g.pointerId)&&h.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(p(g),g.preventDefault())}),onKeyDown:V(a.onKeyDown,g=>{let h=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(h&&g.key===" ")&&FH.includes(g.key)&&(p(),g.preventDefault())})})})});BT.displayName=VT;var HT="SelectValue",UT=K.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=Wa(HT,o),{onValueNodeHasChildrenChange:u}=l,c=n!==void 0,d=ee(t,l.onValueNodeChange);return Le(()=>{u(c)},[u,c]),(0,se.jsx)(H.span,{...i,ref:d,style:{pointerEvents:"none"},children:uM(l.value)?(0,se.jsx)(se.Fragment,{children:s}):n})});UT.displayName=HT;var UH="SelectIcon",GT=K.forwardRef((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return(0,se.jsx)(H.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});GT.displayName=UH;var GH="SelectPortal",zT=e=>(0,se.jsx)(ho,{asChild:!0,...e});zT.displayName=GH;var Kn="SelectContent",qT=K.forwardRef((e,t)=>{let o=Wa(Kn,e.__scopeSelect),[r,a]=K.useState();if(Le(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?Kh.createPortal((0,se.jsx)(WT,{scope:e.__scopeSelect,children:(0,se.jsx)(Df.Slot,{scope:e.__scopeSelect,children:(0,se.jsx)("div",{children:e.children})})}),n):null}return(0,se.jsx)($T,{...e,ref:t})});qT.displayName=Kn;var nr=10,[WT,$a]=xi(Kn),zH="SelectContentImpl",qH=uo("SelectContent.RemoveScroll"),$T=K.forwardRef((e,t)=>{let{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:n,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:h,...v}=e,x=Wa(Kn,o),[y,R]=K.useState(null),[C,w]=K.useState(null),I=ee(t,_=>R(_)),[L,P]=K.useState(null),[T,O]=K.useState(null),$=Ef(o),[W,N]=K.useState(!1),q=K.useRef(!1);K.useEffect(()=>{if(y)return Na(y)},[y]),Ma();let E=K.useCallback(_=>{let[ce,...he]=$().map(We=>We.ref.current),[we]=he.slice(-1),_e=document.activeElement;for(let We of _)if(We===_e||(We?.scrollIntoView({block:"nearest"}),We===ce&&C&&(C.scrollTop=0),We===we&&C&&(C.scrollTop=C.scrollHeight),We?.focus(),document.activeElement!==_e))return},[$,C]),G=K.useCallback(()=>E([L,y]),[E,L,y]);K.useEffect(()=>{W&&G()},[W,G]);let{onOpenChange:M,triggerPointerDownPosRef:k}=x;K.useEffect(()=>{if(y){let _={x:0,y:0},ce=we=>{_={x:Math.abs(Math.round(we.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(we.pageY)-(k.current?.y??0))}},he=we=>{_.x<=10&&_.y<=10?we.preventDefault():y.contains(we.target)||M(!1),document.removeEventListener("pointermove",ce),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",he,{capture:!0})}}},[y,M,k]),K.useEffect(()=>{let _=()=>M(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[M]);let[re,Se]=cM(_=>{let ce=$().filter(_e=>!_e.disabled),he=ce.find(_e=>_e.ref.current===document.activeElement),we=dM(ce,_,he);we&&setTimeout(()=>we.ref.current.focus())}),F=K.useCallback((_,ce,he)=>{let we=!q.current&&!he;(x.value!==void 0&&x.value===ce||we)&&(P(_),we&&(q.current=!0))},[x.value]),j=K.useCallback(()=>y?.focus(),[y]),Z=K.useCallback((_,ce,he)=>{let we=!q.current&&!he;(x.value!==void 0&&x.value===ce||we)&&O(_)},[x.value]),X=r==="popper"?zh:jT,ue=X===zh?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:h}:{};return(0,se.jsx)(WT,{scope:o,content:y,viewport:C,onViewportChange:w,itemRefCallback:F,selectedItem:L,onItemLeave:j,itemTextRefCallback:Z,focusSelectedItem:G,selectedItemText:T,position:r,isPositioned:W,searchRef:re,children:(0,se.jsx)($r,{as:qH,allowPinchZoom:!0,children:(0,se.jsx)(Gr,{asChild:!0,trapped:x.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:V(a,_=>{x.trigger?.focus({preventScroll:!0}),_.preventDefault()}),children:(0,se.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,se.jsx)(X,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:_=>_.preventDefault(),...v,...ue,onPlaced:()=>N(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:V(v.onKeyDown,_=>{let ce=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!ce&&_.key.length===1&&Se(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let we=$().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(_.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){let _e=_.target,We=we.indexOf(_e);we=we.slice(We+1)}setTimeout(()=>E(we)),_.preventDefault()}})})})})})})});$T.displayName=zH;var WH="SelectItemAlignedPosition",jT=K.forwardRef((e,t)=>{let{__scopeSelect:o,onPlaced:r,...a}=e,n=Wa(Kn,o),s=$a(Kn,o),[i,l]=K.useState(null),[u,c]=K.useState(null),d=ee(t,I=>c(I)),f=Ef(o),m=K.useRef(!1),p=K.useRef(!0),{viewport:g,selectedItem:h,selectedItemText:v,focusSelectedItem:x}=s,y=K.useCallback(()=>{if(n.trigger&&n.valueNode&&i&&u&&g&&h&&v){let I=n.trigger.getBoundingClientRect(),L=u.getBoundingClientRect(),P=n.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(n.dir!=="rtl"){let _e=T.left-L.left,We=P.left-_e,bo=I.left-We,Za=I.width+bo,Qf=Math.max(Za,L.width),Jf=window.innerWidth-nr,em=wu(We,[nr,Math.max(nr,Jf-Qf)]);i.style.minWidth=Za+"px",i.style.left=em+"px"}else{let _e=L.right-T.right,We=window.innerWidth-P.right-_e,bo=window.innerWidth-I.right-We,Za=I.width+bo,Qf=Math.max(Za,L.width),Jf=window.innerWidth-nr,em=wu(We,[nr,Math.max(nr,Jf-Qf)]);i.style.minWidth=Za+"px",i.style.right=em+"px"}let O=f(),$=window.innerHeight-nr*2,W=g.scrollHeight,N=window.getComputedStyle(u),q=parseInt(N.borderTopWidth,10),E=parseInt(N.paddingTop,10),G=parseInt(N.borderBottomWidth,10),M=parseInt(N.paddingBottom,10),k=q+E+W+M+G,re=Math.min(h.offsetHeight*5,k),Se=window.getComputedStyle(g),F=parseInt(Se.paddingTop,10),j=parseInt(Se.paddingBottom,10),Z=I.top+I.height/2-nr,X=$-Z,ue=h.offsetHeight/2,_=h.offsetTop+ue,ce=q+E+_,he=k-ce;if(ce<=Z){let _e=O.length>0&&h===O[O.length-1].ref.current;i.style.bottom="0px";let We=u.clientHeight-g.offsetTop-g.offsetHeight,bo=Math.max(X,ue+(_e?j:0)+We+G),Za=ce+bo;i.style.height=Za+"px"}else{let _e=O.length>0&&h===O[0].ref.current;i.style.top="0px";let bo=Math.max(Z,q+g.offsetTop+(_e?F:0)+ue)+he;i.style.height=bo+"px",g.scrollTop=ce-Z+g.offsetTop}i.style.margin=`${nr}px 0`,i.style.minHeight=re+"px",i.style.maxHeight=$+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[f,n.trigger,n.valueNode,i,u,g,h,v,n.dir,r]);Le(()=>y(),[y]);let[R,C]=K.useState();Le(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let w=K.useCallback(I=>{I&&p.current===!0&&(y(),x?.(),p.current=!1)},[y,x]);return(0,se.jsx)(jH,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:w,children:(0,se.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,se.jsx)(H.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});jT.displayName=WH;var $H="SelectPopperPosition",zh=K.forwardRef((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=nr,...n}=e,s=Nf(o);return(0,se.jsx)(Da,{...s,...n,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...n.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zh.displayName=$H;var[jH,Xh]=xi(Kn,{}),qh="SelectViewport",KT=K.forwardRef((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=$a(qh,o),s=Xh(qh,o),i=ee(t,n.onViewportChange),l=K.useRef(0);return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,se.jsx)(Df.Slot,{scope:o,children:(0,se.jsx)(H.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:V(a.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f?.current&&d){let m=Math.abs(l.current-c.scrollTop);if(m>0){let p=window.innerHeight-nr*2,g=parseFloat(d.style.minHeight),h=parseFloat(d.style.height),v=Math.max(g,h);if(v<p){let x=v+m,y=Math.min(p,x),R=x-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=R>0?R:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});KT.displayName=qh;var XT="SelectGroup",[KH,XH]=xi(XT),YT=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=Pe();return(0,se.jsx)(KH,{scope:o,id:a,children:(0,se.jsx)(H.div,{role:"group","aria-labelledby":a,...r,ref:t})})});YT.displayName=XT;var ZT="SelectLabel",QT=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=XH(ZT,o);return(0,se.jsx)(H.div,{id:a.id,...r,ref:t})});QT.displayName=ZT;var Af="SelectItem",[YH,JT]=xi(Af),eM=K.forwardRef((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=Wa(Af,o),l=$a(Af,o),u=i.value===r,[c,d]=K.useState(n??""),[f,m]=K.useState(!1),p=ee(t,x=>l.itemRefCallback?.(x,r,a)),g=Pe(),h=K.useRef("touch"),v=()=>{a||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,se.jsx)(YH,{scope:o,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:K.useCallback(x=>{d(y=>y||(x?.textContent??"").trim())},[]),children:(0,se.jsx)(Df.ItemSlot,{scope:o,value:r,disabled:a,textValue:c,children:(0,se.jsx)(H.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:p,onFocus:V(s.onFocus,()=>m(!0)),onBlur:V(s.onBlur,()=>m(!1)),onClick:V(s.onClick,()=>{h.current!=="mouse"&&v()}),onPointerUp:V(s.onPointerUp,()=>{h.current==="mouse"&&v()}),onPointerDown:V(s.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:V(s.onPointerMove,x=>{h.current=x.pointerType,a?l.onItemLeave?.():h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(s.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:V(s.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(OH.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});eM.displayName=Af;var Ru="SelectItemText",tM=K.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=Wa(Ru,o),i=$a(Ru,o),l=JT(Ru,o),u=HH(Ru,o),[c,d]=K.useState(null),f=ee(t,v=>d(v),l.onItemTextChange,v=>i.itemTextRefCallback?.(v,l.value,l.disabled)),m=c?.textContent,p=K.useMemo(()=>(0,se.jsx)("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:h}=u;return Le(()=>(g(p),()=>h(p)),[g,h,p]),(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(H.span,{id:l.textId,...n,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kh.createPortal(n.children,s.valueNode):null]})});tM.displayName=Ru;var oM="SelectItemIndicator",rM=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return JT(oM,o).isSelected?(0,se.jsx)(H.span,{"aria-hidden":!0,...r,ref:t}):null});rM.displayName=oM;var Wh="SelectScrollUpButton",aM=K.forwardRef((e,t)=>{let o=$a(Wh,e.__scopeSelect),r=Xh(Wh,e.__scopeSelect),[a,n]=K.useState(!1),s=ee(t,r.onScrollButtonChange);return Le(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollTop>0;n(c)};var i=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),a?(0,se.jsx)(sM,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});aM.displayName=Wh;var $h="SelectScrollDownButton",nM=K.forwardRef((e,t)=>{let o=$a($h,e.__scopeSelect),r=Xh($h,e.__scopeSelect),[a,n]=K.useState(!1),s=ee(t,r.onScrollButtonChange);return Le(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;n(d)};var i=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),a?(0,se.jsx)(sM,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});nM.displayName=$h;var sM=K.forwardRef((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=$a("SelectScrollButton",o),s=K.useRef(null),i=Ef(o),l=K.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return K.useEffect(()=>()=>l(),[l]),Le(()=>{i().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),(0,se.jsx)(H.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:V(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:V(a.onPointerMove,()=>{n.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:V(a.onPointerLeave,()=>{l()})})}),ZH="SelectSeparator",iM=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return(0,se.jsx)(H.div,{"aria-hidden":!0,...r,ref:t})});iM.displayName=ZH;var jh="SelectArrow",QH=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=Nf(o),n=Wa(jh,o),s=$a(jh,o);return n.open&&s.position==="popper"?(0,se.jsx)(Ea,{...a,...r,ref:t}):null});QH.displayName=jh;var JH="SelectBubbleInput",lM=K.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{let a=K.useRef(null),n=ee(r,a),s=Xs(t);return K.useEffect(()=>{let i=a.current;if(!i)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&c){let d=new Event("change",{bubbles:!0});c.call(i,t),i.dispatchEvent(d)}},[s,t]),(0,se.jsx)(H.select,{...o,style:{...Gh,...o.style},ref:n,defaultValue:t})});lM.displayName=JH;function uM(e){return e===""||e===void 0}function cM(e){let t=Te(e),o=K.useRef(""),r=K.useRef(0),a=K.useCallback(s=>{let i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),n=K.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return K.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,a,n]}function dM(e,t,o){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=o?e.indexOf(o):-1,s=eU(e,Math.max(n,0));a.length===1&&(s=s.filter(u=>u!==o));let l=s.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==o?l:void 0}function eU(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var fM=_T,Yh=BT,mM=UT,pM=GT,gM=zT,Zh=qT,hM=KT,xM=YT,Qh=QT,Jh=eM,vM=tM,yM=rM,ex=aM,tx=nM,ox=iM;var He=b(D()),vi=fM;vi.displayName="Select";var oU=xM,Iu=mM,yi=ja.forwardRef(({className:e,children:t,variant:o="standard",size:r="md",error:a,success:n,loading:s,leftIcon:i,rightIcon:l,...u},c)=>(0,He.jsxs)(Yh,{ref:c,className:S("flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none",a&&"border-error focus-visible:ring-error/30 focus-visible:border-error",n&&"border-success focus-visible:ring-success/30 focus-visible:border-success",r==="sm"&&"h-8 text-xs px-2",r==="md"&&"h-10 text-sm px-3",r==="lg"&&"h-12 text-base px-4",o==="standard"&&"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",o==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",o==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",o==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",e),...u,disabled:u.disabled||s,"data-error":a?!0:void 0,"data-success":n?!0:void 0,"data-loading":s?!0:void 0,children:[(0,He.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[i&&(0,He.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:i}),s?(0,He.jsxs)("div",{className:"flex items-center gap-2",children:[(0,He.jsx)(St,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,He.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!s&&(0,He.jsx)(pM,{asChild:!0,children:l?(0,He.jsx)("span",{className:"opacity-60",children:l}):(0,He.jsx)(ur,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));yi.displayName=Yh.displayName;var rx=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(ex,{ref:o,className:S("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,He.jsx)(Di,{className:"h-4 w-4"})}));rx.displayName=ex.displayName;var ax=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(tx,{ref:o,className:S("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,He.jsx)(ur,{className:"h-4 w-4"})}));ax.displayName=tx.displayName;var bi=ja.forwardRef(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>(0,He.jsx)(gM,{children:(0,He.jsxs)(Zh,{ref:i,side:r,sideOffset:a,align:n,avoidCollisions:!1,className:S(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900 text-foreground","shadow-lg dark:shadow-gray-900/20","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=open]:duration-150"],o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...s,children:[(0,He.jsx)(rx,{}),(0,He.jsx)(hM,{className:S("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,He.jsx)(ax,{})]})}));bi.displayName=Zh.displayName;var bM=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(Qh,{ref:o,className:S("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));bM.displayName=Qh.displayName;var Xt=ja.forwardRef(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>(0,He.jsxs)(Jh,{ref:i,className:S("relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r==="sm"&&"py-1 pl-7 pr-2 text-xs",r==="md"&&"py-1.5 pl-8 pr-2 text-sm",r==="lg"&&"py-2 pl-9 pr-3 text-base",o==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",o==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",o==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",o==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",o==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...s,children:[(0,He.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,He.jsx)(yM,{children:n||(0,He.jsx)(It,{className:"h-4 w-4"})})}),(0,He.jsx)(vM,{children:t}),a&&(0,He.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));Xt.displayName=Jh.displayName;var CM=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(ox,{ref:o,className:S("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));CM.displayName=ox.displayName;var bt=b(D()),rU=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],wM=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let a=0;a<o.length;a++)a>0&&a%3===0&&(r+=" "),r+=o[a];return r}},aU=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},SM=Lu.forwardRef(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=rU,size:i,...l},u)=>{let[c,d]=Lu.useState(r),[f,m]=Lu.useState(t),p=s.find(x=>x.code===c)||s[0],g=x=>{let y=x.target.value.replace(/\D/g,""),R=aU(c),C=y.slice(0,R),w=wM(C,c);m(C),o?.(C,c),x.target.value=w},h=x=>{d(x),o?.(f,x)},v=wM(f,c);return(0,bt.jsxs)("div",{className:S("relative flex gap-2",e),children:[n&&(0,bt.jsxs)(vi,{value:c,onValueChange:h,children:[(0,bt.jsx)(yi,{className:"w-[120px]",children:(0,bt.jsx)(Iu,{children:(0,bt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,bt.jsx)("span",{children:p.flag}),(0,bt.jsx)("span",{children:p.code})]})})}),(0,bt.jsx)(bi,{children:s.map(x=>(0,bt.jsx)(Xt,{value:x.code,children:(0,bt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,bt.jsx)("span",{children:x.flag}),(0,bt.jsx)("span",{children:x.code}),(0,bt.jsx)("span",{className:"text-muted-foreground",children:x.name})]})},x.code))})]}),(0,bt.jsxs)("div",{className:"relative flex-1",children:[(0,bt.jsx)(At,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:g,className:S(a&&"pl-10",e),...l}),a&&(0,bt.jsx)(ji,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});SM.displayName="PhoneInput";var _o=b(A());var yo=b(D()),nU=te("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),RM=_o.createContext({}),IM=_o.forwardRef(({className:e,value:t,onValueChange:o,disabled:r,name:a,...n},s)=>(0,yo.jsx)(RM.Provider,{value:{value:t,onValueChange:o,disabled:r,name:a},children:(0,yo.jsx)("div",{ref:s,role:"radiogroup",className:S("moonui-theme","grid gap-2",e),...n})}));IM.displayName="RadioGroup";var nx=_o.forwardRef(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=_o.useContext(RM),c=_o.useId(),d=a||c,f=u.value===n,m=p=>{u.onValueChange&&u.onValueChange(p.target.value),i.onChange&&i.onChange(p)};return(0,yo.jsxs)("div",{className:"relative flex items-center",children:[(0,yo.jsx)("input",{type:"radio",id:d,ref:l,value:n,checked:f,disabled:s||u.disabled,name:u.name,onChange:m,className:"sr-only",...i}),(0,yo.jsx)("label",{htmlFor:d,className:S(nU({variant:t,size:o}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",s&&"cursor-not-allowed opacity-50",e),children:(0,yo.jsx)("span",{className:S("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(r||(0,yo.jsx)(en,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});nx.displayName="RadioGroupItem";var sx=_o.forwardRef(({className:e,htmlFor:t,children:o,disabled:r=!1,...a},n)=>(0,yo.jsx)("label",{ref:n,htmlFor:t,className:S("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...a,children:o}));sx.displayName="RadioLabel";var LM=_o.forwardRef(({id:e,label:t,labelClassName:o,...r},a)=>{let n=_o.useId(),s=e||n;return(0,yo.jsxs)("div",{className:"flex items-center",children:[(0,yo.jsx)(nx,{ref:a,id:s,...r}),(0,yo.jsx)(sx,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});LM.displayName="RadioItemWithLabel";var ra=b(D());function sU({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:a=!1}){let n=s=>{!a&&t&&t(s.target.value)};return(0,ra.jsxs)("div",{className:S("border border-input rounded-md",r),children:[(0,ra.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,ra.jsxs)("div",{className:"flex gap-1",children:[(0,ra.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Bold (Pro feature)",children:"B"}),(0,ra.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Italic (Pro feature)",children:"I"}),(0,ra.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Underline (Pro feature)",children:"U"})]})}),(0,ra.jsx)("textarea",{value:e,onChange:n,placeholder:o,disabled:a,className:S("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}var fx=b(A());var ne=b(A(),1);var TM=b(A(),1),Ee=b(D(),1);function iU(e,t){return TM.useReducer((o,r)=>t[o][r]??o,e)}var ix="ScrollArea",[MM,Kfe]=Re(ix),[lU,Vo]=MM(ix),kM=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:a,scrollHideDelay:n=600,...s}=e,[i,l]=ne.useState(null),[u,c]=ne.useState(null),[d,f]=ne.useState(null),[m,p]=ne.useState(null),[g,h]=ne.useState(null),[v,x]=ne.useState(0),[y,R]=ne.useState(0),[C,w]=ne.useState(!1),[I,L]=ne.useState(!1),P=ee(t,O=>l(O)),T=So(a);return(0,Ee.jsx)(lU,{scope:o,type:r,dir:T,scrollHideDelay:n,scrollArea:i,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:C,onScrollbarXEnabledChange:w,scrollbarY:g,onScrollbarYChange:h,scrollbarYEnabled:I,onScrollbarYEnabledChange:L,onCornerWidthChange:x,onCornerHeightChange:R,children:(0,Ee.jsx)(H.div,{dir:T,...s,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});kM.displayName=ix;var AM="ScrollAreaViewport",DM=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=Vo(AM,o),i=ne.useRef(null),l=ee(t,i,s.onViewportChange);return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,Ee.jsx)(H.div,{"data-radix-scroll-area-viewport":"",...n,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Ee.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});DM.displayName=AM;var Sr="ScrollAreaScrollbar",_f=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=Vo(Sr,e.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=a,i=e.orientation==="horizontal";return ne.useEffect(()=>(i?n(!0):s(!0),()=>{i?n(!1):s(!1)}),[i,n,s]),a.type==="hover"?(0,Ee.jsx)(uU,{...r,ref:t,forceMount:o}):a.type==="scroll"?(0,Ee.jsx)(cU,{...r,ref:t,forceMount:o}):a.type==="auto"?(0,Ee.jsx)(EM,{...r,ref:t,forceMount:o}):a.type==="always"?(0,Ee.jsx)(lx,{...r,ref:t}):null});_f.displayName=Sr;var uU=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=Vo(Sr,e.__scopeScrollArea),[n,s]=ne.useState(!1);return ne.useEffect(()=>{let i=a.scrollArea,l=0;if(i){let u=()=>{window.clearTimeout(l),s(!0)},c=()=>{l=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",c)}}},[a.scrollArea,a.scrollHideDelay]),(0,Ee.jsx)(Oe,{present:o||n,children:(0,Ee.jsx)(EM,{"data-state":n?"visible":"hidden",...r,ref:t})})}),cU=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=Vo(Sr,e.__scopeScrollArea),n=e.orientation==="horizontal",s=Bf(()=>l("SCROLL_END"),100),[i,l]=iU("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return ne.useEffect(()=>{if(i==="idle"){let u=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,a.scrollHideDelay,l]),ne.useEffect(()=>{let u=a.viewport,c=n?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let m=u[c];d!==m&&(l("SCROLL"),s()),d=m};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[a.viewport,n,l,s]),(0,Ee.jsx)(Oe,{present:o||i!=="hidden",children:(0,Ee.jsx)(lx,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:V(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:V(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),EM=ne.forwardRef((e,t)=>{let o=Vo(Sr,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=ne.useState(!1),i=e.orientation==="horizontal",l=Bf(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return Ci(o.viewport,l),Ci(o.content,l),(0,Ee.jsx)(Oe,{present:r||n,children:(0,Ee.jsx)(lx,{"data-state":n?"visible":"hidden",...a,ref:t})})}),lx=ne.forwardRef((e,t)=>{let{orientation:o="vertical",...r}=e,a=Vo(Sr,e.__scopeScrollArea),n=ne.useRef(null),s=ne.useRef(0),[i,l]=ne.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=_M(i.viewport,i.content),c={...r,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,m){return hU(f,s.current,i,m)}return o==="horizontal"?(0,Ee.jsx)(dU,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let f=a.viewport.scrollLeft,m=PM(f,i,a.dir);n.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollLeft=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollLeft=d(f,a.dir))}}):o==="vertical"?(0,Ee.jsx)(fU,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let f=a.viewport.scrollTop,m=PM(f,i);n.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=d(f))}}):null}),dU=ne.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Vo(Sr,e.__scopeScrollArea),[s,i]=ne.useState(),l=ne.useRef(null),u=ee(t,l,n.onScrollbarXChange);return ne.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),(0,Ee.jsx)(FM,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Vf(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(n.viewport){let f=n.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),BM(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&n.viewport&&s&&r({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Of(s.paddingLeft),paddingEnd:Of(s.paddingRight)}})}})}),fU=ne.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Vo(Sr,e.__scopeScrollArea),[s,i]=ne.useState(),l=ne.useRef(null),u=ee(t,l,n.onScrollbarYChange);return ne.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),(0,Ee.jsx)(FM,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Vf(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(n.viewport){let f=n.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),BM(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&n.viewport&&s&&r({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Of(s.paddingTop),paddingEnd:Of(s.paddingBottom)}})}})}),[mU,NM]=MM(Sr),FM=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,sizes:r,hasThumb:a,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,m=Vo(Sr,o),[p,g]=ne.useState(null),h=ee(t,P=>g(P)),v=ne.useRef(null),x=ne.useRef(""),y=m.viewport,R=r.content-r.viewport,C=Te(c),w=Te(l),I=Bf(d,10);function L(P){if(v.current){let T=P.clientX-v.current.left,O=P.clientY-v.current.top;u({x:T,y:O})}}return ne.useEffect(()=>{let P=T=>{let O=T.target;p?.contains(O)&&C(T,R)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[y,p,R,C]),ne.useEffect(w,[r,w]),Ci(p,I),Ci(m.content,I),(0,Ee.jsx)(mU,{scope:o,scrollbar:p,hasThumb:a,onThumbChange:Te(n),onThumbPointerUp:Te(s),onThumbPositionChange:w,onThumbPointerDown:Te(i),children:(0,Ee.jsx)(H.div,{...f,ref:h,style:{position:"absolute",...f.style},onPointerDown:V(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),v.current=p.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),L(P))}),onPointerMove:V(e.onPointerMove,L),onPointerUp:V(e.onPointerUp,P=>{let T=P.target;T.hasPointerCapture(P.pointerId)&&T.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),v.current=null})})})}),Ff="ScrollAreaThumb",ux=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=NM(Ff,e.__scopeScrollArea);return(0,Ee.jsx)(Oe,{present:o||a.hasThumb,children:(0,Ee.jsx)(pU,{ref:t,...r})})}),pU=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=Vo(Ff,o),s=NM(Ff,o),{onThumbPositionChange:i}=s,l=ee(t,d=>s.onThumbChange(d)),u=ne.useRef(void 0),c=Bf(()=>{u.current&&(u.current(),u.current=void 0)},100);return ne.useEffect(()=>{let d=n.viewport;if(d){let f=()=>{if(c(),!u.current){let m=xU(d,i);u.current=m,i()}};return i(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[n.viewport,c,i]),(0,Ee.jsx)(H.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:V(e.onPointerDownCapture,d=>{let m=d.target.getBoundingClientRect(),p=d.clientX-m.left,g=d.clientY-m.top;s.onThumbPointerDown({x:p,y:g})}),onPointerUp:V(e.onPointerUp,s.onThumbPointerUp)})});ux.displayName=Ff;var cx="ScrollAreaCorner",OM=ne.forwardRef((e,t)=>{let o=Vo(cx,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?(0,Ee.jsx)(gU,{...e,ref:t}):null});OM.displayName=cx;var gU=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=Vo(cx,o),[n,s]=ne.useState(0),[i,l]=ne.useState(0),u=!!(n&&i);return Ci(a.scrollbarX,()=>{let c=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(c),l(c)}),Ci(a.scrollbarY,()=>{let c=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(c),s(c)}),u?(0,Ee.jsx)(H.div,{...r,ref:t,style:{width:n,height:i,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Of(e){return e?parseInt(e,10):0}function _M(e,t){let o=e/t;return isNaN(o)?0:o}function Vf(e){let t=_M(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function hU(e,t,o,r="ltr"){let a=Vf(o),n=a/2,s=t||n,i=a-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,c=o.content-o.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return VM([l,u],d)(e)}function PM(e,t,o="ltr"){let r=Vf(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=t.scrollbar.size-a,s=t.content-t.viewport,i=n-r,l=o==="ltr"?[0,s]:[s*-1,0],u=wu(e,l);return VM([0,s],[0,i])(u)}function VM(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function BM(e,t){return e>0&&e<t}var xU=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){let n={left:e.scrollLeft,top:e.scrollTop},s=o.left!==n.left,i=o.top!==n.top;(s||i)&&t(),o=n,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function Bf(e,t){let o=Te(e),r=ne.useRef(0);return ne.useEffect(()=>()=>window.clearTimeout(r.current),[]),ne.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function Ci(e,t){let o=Te(t);Le(()=>{let r=0;if(e){let a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,o])}var dx=kM,HM=DM;var UM=OM;var Ka=b(D()),GM=fx.forwardRef(({className:e,children:t,...o},r)=>(0,Ka.jsxs)(dx,{ref:r,className:S("relative overflow-hidden",e),...o,children:[(0,Ka.jsx)(HM,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ka.jsx)(mx,{}),(0,Ka.jsx)(UM,{})]}));GM.displayName=dx.displayName;var mx=fx.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Ka.jsx)(_f,{ref:r,orientation:t,className:S("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Ka.jsx)(ux,{className:"relative flex-1 rounded-full bg-border"})}));mx.displayName=_f.displayName;var Yt=b(A());var Pu=b(D()),Hf={up:{hidden:{opacity:0,y:50},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-50},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:50},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-50},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}},zM=Yt.forwardRef(({children:e,direction:t="up",delay:o=0,duration:r=.6,distance:a=50,threshold:n=.1,triggerOnce:s=!0,stagger:i=0,className:l,variants:u,animate:c=!0,style:d,id:f},m)=>{let p=Up(),g=Yt.useRef(null),h=wd(g,{amount:n,once:s}),v=Yt.useMemo(()=>{if(u)return u;let x=Hf[t]||Hf.up;return{hidden:{...x.hidden,...t==="up"&&{y:a},...t==="down"&&{y:-a},...t==="left"&&{x:a},...t==="right"&&{x:-a}},visible:x.visible}},[t,a,u]);return Yt.useEffect(()=>{c&&(h?p.start("visible"):s||p.start("hidden"))},[h,p,s,c]),Yt.useImperativeHandle(m,()=>g.current),c?(0,Pu.jsx)(Ae.div,{ref:g,variants:v,initial:"hidden",animate:p,transition:{duration:r,delay:o+i,ease:"easeOut"},className:S(l),style:d,id:f,children:e}):(0,Pu.jsx)("div",{ref:g,className:l,style:d,id:f,children:e})});zM.displayName="ScrollReveal";var qM=Yt.forwardRef(({children:e,stagger:t=.1,className:o,style:r,id:a},n)=>{let s=Yt.useRef(null),i=wd(s,{amount:.1,once:!0});return Yt.useImperativeHandle(n,()=>s.current),(0,Pu.jsx)(Ae.div,{ref:s,initial:"hidden",animate:i?"visible":"hidden",variants:{hidden:{},visible:{transition:{staggerChildren:t}}},className:S(o),style:r,id:a,children:e})});qM.displayName="ScrollRevealContainer";var WM=Yt.forwardRef(({children:e,direction:t="up",duration:o=.6,distance:r=50,className:a,variants:n,style:s,id:i},l)=>{let u=Yt.useMemo(()=>{if(n)return n;let c=Hf[t]||Hf.up;return{hidden:{...c.hidden,...t==="up"&&{y:r},...t==="down"&&{y:-r},...t==="left"&&{x:r},...t==="right"&&{x:-r}},visible:c.visible}},[t,r,n]);return(0,Pu.jsx)(Ae.div,{ref:l,variants:u,transition:{duration:o,ease:"easeOut"},className:S(a),style:s,id:i,children:e})});WM.displayName="ScrollRevealItem";var YM=b(A());var jM=b(A(),1);var KM=b(D(),1),yU="Separator",$M="horizontal",bU=["horizontal","vertical"],XM=jM.forwardRef((e,t)=>{let{decorative:o,orientation:r=$M,...a}=e,n=CU(r)?r:$M,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return(0,KM.jsx)(H.div,{"data-orientation":n,...i,...a,ref:t})});XM.displayName=yU;function CU(e){return bU.includes(e)}var px=XM;var ZM=b(D()),SU=te("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Bo=YM.forwardRef(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:a=!0,...n},s)=>(0,ZM.jsx)(px,{ref:s,decorative:a,orientation:t||void 0,className:S(SU({orientation:t,variant:o,size:r}),e),...n}));Bo.displayName=px.displayName;var qe=b(A());var ok=b(A());var QM=b(A(),1);var JM=b(D(),1),ek="Toggle",tk=QM.forwardRef((e,t)=>{let{pressed:o,defaultPressed:r,onPressedChange:a,...n}=e,[s,i]=Fe({prop:o,onChange:a,defaultProp:r??!1,caller:ek});return(0,JM.jsx)(H.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...n,ref:t,onClick:V(e.onClick,()=>{e.disabled||i(!s)})})});tk.displayName=ek;var gx=tk;var ak=b(D()),rk=te("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Uf=ok.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,ak.jsx)(gx,{ref:a,className:S("moonui-theme",rk({variant:t,size:o,className:e})),...r}));Uf.displayName=gx.displayName;var qf=b(A());var xe=b(A(),1);var lt=b(D(),1),[Gf,wme]=Re("Tooltip",[No]),zf=No(),nk="TooltipProvider",IU=700,hx="tooltip.open",[LU,vx]=Gf(nk),sk=e=>{let{__scopeTooltip:t,delayDuration:o=IU,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:n}=e,s=xe.useRef(!0),i=xe.useRef(!1),l=xe.useRef(0);return xe.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,lt.jsx)(LU,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:xe.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:xe.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:xe.useCallback(u=>{i.current=u},[]),disableHoverableContent:a,children:n})};sk.displayName=nk;var Tu="Tooltip",[PU,Mu]=Gf(Tu),ik=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=vx(Tu,e.__scopeTooltip),u=zf(t),[c,d]=xe.useState(null),f=Pe(),m=xe.useRef(0),p=s??l.disableHoverableContent,g=i??l.delayDuration,h=xe.useRef(!1),[v,x]=Fe({prop:r,defaultProp:a??!1,onChange:I=>{I?(l.onOpen(),document.dispatchEvent(new CustomEvent(hx))):l.onClose(),n?.(I)},caller:Tu}),y=xe.useMemo(()=>v?h.current?"delayed-open":"instant-open":"closed",[v]),R=xe.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),C=xe.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),w=xe.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},g)},[g,x]);return xe.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,lt.jsx)(qr,{...u,children:(0,lt.jsx)(PU,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:xe.useCallback(()=>{l.isOpenDelayedRef.current?w():R()},[l.isOpenDelayedRef,w,R]),onTriggerLeave:xe.useCallback(()=>{p?C():(window.clearTimeout(m.current),m.current=0)},[C,p]),onOpen:R,onClose:C,disableHoverableContent:p,children:o})})};ik.displayName=Tu;var xx="TooltipTrigger",lk=xe.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Mu(xx,o),n=vx(xx,o),s=zf(o),i=xe.useRef(null),l=ee(t,i,a.onTriggerChange),u=xe.useRef(!1),c=xe.useRef(!1),d=xe.useCallback(()=>u.current=!1,[]);return xe.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,lt.jsx)(Wr,{asChild:!0,...s,children:(0,lt.jsx)(H.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:V(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!n.isPointerInTransitRef.current&&(a.onTriggerEnter(),c.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{a.onTriggerLeave(),c.current=!1}),onPointerDown:V(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:V(e.onBlur,a.onClose),onClick:V(e.onClick,a.onClose)})})});lk.displayName=xx;var yx="TooltipPortal",[TU,MU]=Gf(yx,{forceMount:void 0}),kU=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=Mu(yx,t);return(0,lt.jsx)(TU,{scope:t,forceMount:o,children:(0,lt.jsx)(Oe,{present:o||n.open,children:(0,lt.jsx)(ho,{asChild:!0,container:a,children:r})})})};kU.displayName=yx;var wi="TooltipContent",uk=xe.forwardRef((e,t)=>{let o=MU(wi,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=Mu(wi,e.__scopeTooltip);return(0,lt.jsx)(Oe,{present:r||s.open,children:s.disableHoverableContent?(0,lt.jsx)(ck,{side:a,...n,ref:t}):(0,lt.jsx)(AU,{side:a,...n,ref:t})})}),AU=xe.forwardRef((e,t)=>{let o=Mu(wi,e.__scopeTooltip),r=vx(wi,e.__scopeTooltip),a=xe.useRef(null),n=ee(t,a),[s,i]=xe.useState(null),{trigger:l,onClose:u}=o,c=a.current,{onPointerInTransitChange:d}=r,f=xe.useCallback(()=>{i(null),d(!1)},[d]),m=xe.useCallback((p,g)=>{let h=p.currentTarget,v={x:p.clientX,y:p.clientY},x=FU(v,h.getBoundingClientRect()),y=OU(v,x),R=_U(g.getBoundingClientRect()),C=BU([...y,...R]);i(C),d(!0)},[d]);return xe.useEffect(()=>()=>f(),[f]),xe.useEffect(()=>{if(l&&c){let p=h=>m(h,c),g=h=>m(h,l);return l.addEventListener("pointerleave",p),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",p),c.removeEventListener("pointerleave",g)}}},[l,c,m,f]),xe.useEffect(()=>{if(s){let p=g=>{let h=g.target,v={x:g.clientX,y:g.clientY},x=l?.contains(h)||c?.contains(h),y=!VU(v,s);x?f():y&&(f(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,c,s,u,f]),(0,lt.jsx)(ck,{...e,ref:n})}),[DU,EU]=Gf(Tu,{isInside:!1}),NU=fv("TooltipContent"),ck=xe.forwardRef((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Mu(wi,o),u=zf(o),{onClose:c}=l;return xe.useEffect(()=>(document.addEventListener(hx,c),()=>document.removeEventListener(hx,c)),[c]),xe.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,lt.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,lt.jsxs)(Da,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,lt.jsx)(NU,{children:r}),(0,lt.jsx)(DU,{scope:o,isInside:!0,children:(0,lt.jsx)(OT,{id:l.contentId,role:"tooltip",children:a||r})})]})})});uk.displayName=wi;var dk="TooltipArrow",fk=xe.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,a=zf(o);return EU(dk,o).isInside?null:(0,lt.jsx)(Ea,{...a,...r,ref:t})});fk.displayName=dk;function FU(e,t){let o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),n=Math.abs(t.left-e.x);switch(Math.min(o,r,a,n)){case n:return"left";case a:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function OU(e,t,o=5){let r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function _U(e){let{top:t,right:o,bottom:r,left:a}=e;return[{x:a,y:t},{x:o,y:t},{x:o,y:r},{x:a,y:r}]}function VU(e,t){let{x:o,y:r}=e,a=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let i=t[n],l=t[s],u=i.x,c=i.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(a=!a)}return a}function BU(e){let t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),HU(t)}function HU(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let a=e[r];for(;t.length>=2;){let n=t[t.length-1],s=t[t.length-2];if((n.x-s.x)*(a.y-s.y)>=(n.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();let o=[];for(let r=e.length-1;r>=0;r--){let a=e[r];for(;o.length>=2;){let n=o[o.length-1],s=o[o.length-2];if((n.x-s.x)*(a.y-s.y)>=(n.y-s.y)*(a.x-s.x))o.pop();else break}o.push(a)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var mk=sk,pk=ik,gk=lk;var bx=uk,Cx=fk;var Xa=b(D()),wx=mk,GU=te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500 text-white border-green-600",warning:"bg-yellow-500 text-white border-yellow-600",destructive:"bg-destructive text-destructive-foreground",info:"bg-blue-500 text-white border-blue-600"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),Wf=pk,$f=gk,hk=qf.forwardRef(({className:e,...t},o)=>(0,Xa.jsx)(Cx,{ref:o,className:S("moonui-theme","fill-current",e),...t}));hk.displayName=Cx.displayName;var ku=qf.forwardRef(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>(0,Xa.jsxs)(bx,{ref:s,sideOffset:a,className:S("moonui-theme",GU({variant:t,size:o}),e),...n,children:[n.children,r&&(0,Xa.jsx)(hk,{})]}));ku.displayName=bx.displayName;var zU=qf.forwardRef(({children:e,content:t,variant:o="default",size:r="md",side:a="top",align:n="center",delayDuration:s=400,sideOffset:i=4,showArrow:l=!1,className:u,open:c,defaultOpen:d,onOpenChange:f,...m},p)=>(0,Xa.jsxs)(Wf,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:s,children:[(0,Xa.jsx)($f,{asChild:!0,children:e}),(0,Xa.jsx)(ku,{ref:p,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...m,children:t})]}));zU.displayName="SimpleTooltip";var U=b(D()),ht=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>(0,U.jsxs)(Wf,{children:[(0,U.jsx)($f,{asChild:!0,children:(0,U.jsx)(Uf,{pressed:o,onPressedChange:()=>r(),disabled:a,className:"h-8 w-8 p-0",children:e})}),(0,U.jsx)(ku,{children:(0,U.jsx)("p",{children:t})})]}),qU=({onColorSelect:e})=>(0,U.jsx)("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(o=>(0,U.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:o},onClick:()=>e(o)},o))}),xk=qe.default.forwardRef(({value:e="",onChange:t,placeholder:o="Start writing...",disabled:r=!1,className:a,minHeight:n=200,maxHeight:s=500,showToolbar:i=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,qe.useState)(e),[m,p]=(0,qe.useState)(!1),[g,h]=(0,qe.useState)(e),[v,x]=(0,qe.useState)(null),y=qe.default.useRef(null),R=qe.default.useRef(null),[C,w]=(0,qe.useState)({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),I=(0,qe.useCallback)(k=>{f(k),t?.(k)},[t]),L=(0,qe.useCallback)(()=>{let k=window.getSelection();return k&&k.rangeCount>0?k.getRangeAt(0):null},[]),P=(0,qe.useCallback)(k=>{if(!k)return;let re=window.getSelection();re&&(re.removeAllRanges(),re.addRange(k))},[]),T=(0,qe.useCallback)((k,re)=>{if(r)return;y.current&&y.current.focus();let Se=L();if(document.execCommand(k,!1,re)||console.warn(`Command '${k}' failed to execute`),y.current){let j=y.current.innerHTML;I(j)}w({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),y.current&&y.current.focus()},[r,L,I]),O=(0,qe.useCallback)(k=>{let re=k.currentTarget.innerHTML;I(re)},[I]),$=(0,qe.useCallback)(k=>{if(k.ctrlKey||k.metaKey)switch(k.key){case"b":k.preventDefault(),T("bold");break;case"i":k.preventDefault(),T("italic");break;case"u":k.preventDefault(),T("underline");break;case"z":k.preventDefault(),k.shiftKey?T("redo"):T("undo");break}k.key==="Tab"&&(k.preventDefault(),T("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[T]),W=(0,qe.useCallback)(()=>{let k=prompt("Enter URL:");k&&T("createLink",k)},[T]),N=(0,qe.useCallback)(()=>{let k=prompt("Enter image URL:");k&&T("insertImage",k)},[T]),q=(0,qe.useCallback)(k=>{T("formatBlock",`<h${k}>`)},[T]),E=(0,qe.useCallback)(k=>{let re=window.getSelection();if(re&&re.rangeCount>0){let Se=re.getRangeAt(0),F=document.createElement("span");F.style.color=k;try{Se.surroundContents(F)}catch{T("foreColor",k)}if(y.current){let j=y.current.innerHTML;I(j)}}},[T,I]),G=k=>{if(typeof window>"u")return k.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'");let re=document.createElement("div");return re.innerHTML=k,re.textContent||re.innerText||""};qe.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),qe.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),h(e))},[e,d]);let M=i&&(0,U.jsx)(wx,{children:(0,U.jsxs)(Ae.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!m&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Ai,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ui,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Zi,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Yi,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)(vi,{onValueChange:k=>{k.startsWith("h")?q(k.substring(1)):k==="normal"?T("formatBlock","p"):T("fontSize",k)},disabled:r,children:[(0,U.jsx)(yi,{className:"w-24 h-8",children:(0,U.jsx)(Iu,{placeholder:"Size"})}),(0,U.jsxs)(bi,{children:[(0,U.jsx)(Xt,{value:"1",children:"Small"}),(0,U.jsx)(Xt,{value:"3",children:"Normal"}),(0,U.jsx)(Xt,{value:"5",children:"Large"}),(0,U.jsx)(Xt,{value:"7",children:"X-Large"}),(0,U.jsx)(Bo,{className:"my-1"}),(0,U.jsx)(Xt,{value:"h1",children:"Heading 1"}),(0,U.jsx)(Xt,{value:"h2",children:"Heading 2"}),(0,U.jsx)(Xt,{value:"h3",children:"Heading 3"}),(0,U.jsx)(Xt,{value:"h4",children:"Heading 4"}),(0,U.jsx)(Xt,{value:"h5",children:"Heading 5"}),(0,U.jsx)(Xt,{value:"h6",children:"Heading 6"})]})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Mi,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Pi,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(ki,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ti,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(qi,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(zi,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ki,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ni,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Gi,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:W,disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(on,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)(jr,{children:[(0,U.jsx)(Kr,{asChild:!0,children:(0,U.jsx)(Ve,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:(0,U.jsx)(ls,{className:"h-3 w-3"})})}),(0,U.jsx)(br,{className:"w-auto p-0",children:(0,U.jsx)(qU,{onColorSelect:E})})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Qi,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Xi,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:r})]})]}),l&&(0,U.jsxs)(U.Fragment,{children:[!m&&(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsx)(ht,{icon:m?(0,U.jsx)(Jt,{className:"h-3 w-3"}):(0,U.jsx)(tn,{className:"h-3 w-3"}),tooltip:m?"Edit Mode":"View Source Code",active:m,onClick:()=>{m?I(g):h(d),p(!m)},disabled:r})]})]})});return(0,U.jsxs)("div",{ref:c,className:S("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",r&&"opacity-50 cursor-not-allowed",a),...u,children:[M,(0,U.jsxs)("div",{className:"relative",children:[m?(0,U.jsx)(Ae.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:n,maxHeight:s,overflow:"auto"},children:(0,U.jsx)("textarea",{ref:R,value:g,onChange:k=>h(k.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:n-32},disabled:r,placeholder:"HTML source code..."})}):(0,U.jsx)(Ae.div,{ref:y,contentEditable:!r,suppressContentEditableWarning:!0,className:S("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-slate-50 dark:bg-zinc-900/95","text-gray-900 dark:text-gray-100","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:n,maxHeight:s},onInput:O,onKeyDown:$,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!d&&!m&&(0,U.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),(0,U.jsx)("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:(0,U.jsx)(WU,{content:d})})]})});xk.displayName="SimpleEditor";var WU=({content:e})=>{let[t,o]=(0,qe.useState)(0);return(0,qe.useEffect)(()=>{o((a=>{let n=document.createElement("div");return n.innerHTML=a,n.textContent||n.innerText||""})(e).length)},[e]),(0,U.jsxs)(U.Fragment,{children:[t," characters"]})};var Au=b(A());var Ct=b(D()),vk=te("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{default:"",sm:"scale-90",lg:"scale-110"},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"default",shape:"rect",animation:"pulse"}}),Ya=Au.forwardRef(({className:e,variant:t,size:o,shape:r,animation:a,height:n,width:s,isLoaded:i=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},m)=>{let{onDrag:p,onDragEnd:g,onDragStart:h,onAnimationStart:v,onAnimationEnd:x,onAnimationIteration:y,...R}=f;if(i&&l)return c?(0,Ct.jsx)(Ae.div,{ref:m,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:S("moonui-theme",e),style:{height:n,width:s,...d},...R,children:l}):(0,Ct.jsx)("div",{ref:m,className:S("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:n,width:s,...d},...f,children:l});let C=c?Ae.div:"div";return(0,Ct.jsx)(C,{ref:m,className:S("moonui-theme",vk({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...d},...c?f0:{},...R})});Ya.displayName="Skeleton";var Sx=Au.forwardRef(({className:e,lines:t=3,lineHeight:o="0.85rem",spacing:r="0.5rem",lastLineWidth:a=80,randomWidths:n=!1,variant:s="default",animation:i="pulse",...l},u)=>(0,Ct.jsx)("div",{ref:u,className:S("moonui-theme","flex flex-col",e),style:{gap:r},...l,children:Array.from({length:t}).map((c,d)=>{let m=d===t-1?a:n?85+d%3*5:100;return(0,Ct.jsx)(Ya,{variant:s,animation:i,className:"w-full",style:{height:o,width:`${m}%`}},d)})}));Sx.displayName="SkeletonText";var Rx=Au.forwardRef(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...a},n)=>(0,Ct.jsx)(Ya,{ref:n,variant:o,animation:r,shape:"circle",className:S("moonui-theme","shrink-0",e),style:{height:t,width:t},...a}));Rx.displayName="SkeletonAvatar";var yk=Au.forwardRef(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:a="default",animation:n="pulse",...s},i)=>(0,Ct.jsxs)("div",{ref:i,className:S("overflow-hidden rounded-md border border-border bg-background p-4",e),...s,children:[t&&(0,Ct.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Ct.jsx)(Rx,{size:"2.5rem",variant:a,animation:n}),(0,Ct.jsxs)("div",{className:"flex-1",children:[(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"mb-2 h-4 w-1/3"}),(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"h-3 w-1/4"})]})]}),(0,Ct.jsx)(Sx,{lines:o,variant:a,animation:n,className:"mb-4"}),r&&(0,Ct.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"h-4 w-1/4"}),(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"h-4 w-1/5"})]})]}));yk.displayName="SkeletonCard";var Si=b(A());var Ck=b(D()),bk=Si.forwardRef(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:a=100,disabled:n=!1,...s},i)=>{let[l,u]=Si.useState(0),[c,d]=Si.useState(0),[f,m]=Si.useState(!1),p=v=>{n||(u(v.touches[0].clientX),m(!0))},g=v=>{n||!f||d(v.touches[0].clientX)},h=()=>{if(n||!f)return;let v=c-l;Math.abs(v)>a&&(v>0&&r?r():v<0&&o&&o()),m(!1),d(0),u(0)};return(0,Ck.jsx)("div",{ref:i,className:S("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:p,onTouchMove:g,onTouchEnd:h,...s,children:t})});bk.displayName="SwipeableCard";var Tk=b(A());var sr=b(A(),1);var Xn=b(D(),1),jf="Switch",[$U,Zme]=Re(jf),[jU,KU]=$U(jf),wk=sr.forwardRef((e,t)=>{let{__scopeSwitch:o,name:r,checked:a,defaultChecked:n,required:s,disabled:i,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,m]=sr.useState(null),p=ee(t,y=>m(y)),g=sr.useRef(!1),h=f?c||!!f.closest("form"):!0,[v,x]=Fe({prop:a,defaultProp:n??!1,onChange:u,caller:jf});return(0,Xn.jsxs)(jU,{scope:o,checked:v,disabled:i,children:[(0,Xn.jsx)(H.button,{type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":Lk(v),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:p,onClick:V(e.onClick,y=>{x(R=>!R),h&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),h&&(0,Xn.jsx)(Ik,{control:f,bubbles:!g.current,name:r,value:l,checked:v,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});wk.displayName=jf;var Sk="SwitchThumb",Rk=sr.forwardRef((e,t)=>{let{__scopeSwitch:o,...r}=e,a=KU(Sk,o);return(0,Xn.jsx)(H.span,{"data-state":Lk(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Rk.displayName=Sk;var XU="SwitchBubbleInput",Ik=sr.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=sr.useRef(null),i=ee(s,n),l=Xs(o),u=Ys(t);return sr.useEffect(()=>{let c=s.current;if(!c)return;let d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==o&&m){let p=new Event("click",{bubbles:r});m.call(c,o),c.dispatchEvent(p)}},[l,o,r]),(0,Xn.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:i,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ik.displayName=XU;function Lk(e){return e?"checked":"unchecked"}var Ix=wk,Pk=Rk;var Rr=b(D()),Mk=Tk.forwardRef(({className:e,size:t="md",variant:o="primary",loading:r,leftIcon:a,rightIcon:n,description:s,...i},l)=>(0,Rr.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[a&&(0,Rr.jsx)("span",{className:"text-muted-foreground",children:a}),(0,Rr.jsxs)(Ix,{className:S("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",o==="primary"&&"data-[state=checked]:bg-primary",o==="success"&&"data-[state=checked]:bg-success",o==="warning"&&"data-[state=checked]:bg-warning",o==="danger"&&"data-[state=checked]:bg-error",o==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",r&&"opacity-80 cursor-wait",e),disabled:r||i.disabled,...i,ref:l,children:[r?(0,Rr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Rr.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Rr.jsx)(Pk,{className:S("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),n&&(0,Rr.jsx)("span",{className:"text-muted-foreground",children:n}),s&&(0,Rr.jsx)("span",{className:"text-sm text-muted-foreground",children:s})]}));Mk.displayName=Ix.displayName;var Du=b(A());var Ir=b(D()),kk=Du.forwardRef(({value:e=[],onChange:t,maxTags:o,variant:r="primary",allowDuplicates:a=!1,delimiter:n=",",placeholder:s="Add tag and press Enter",className:i,disabled:l,...u},c)=>{let[d,f]=Du.useState(""),[m,p]=Du.useState(""),g=x=>{x.key==="Enter"||x.key===n?(x.preventDefault(),h()):x.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},h=()=>{let x=d.trim();if(x){if(!a&&e.includes(x)){p("This tag already exists"),setTimeout(()=>p(""),2e3);return}if(o&&e.length>=o){p(`Maximum ${o} tags allowed`),setTimeout(()=>p(""),2e3);return}t([...e,x]),f(""),p("")}},v=x=>{l||t(e.filter((y,R)=>R!==x))};return(0,Ir.jsxs)("div",{className:"relative",children:[(0,Ir.jsxs)("div",{className:S("flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","dark:bg-zinc-950/50 dark:border-zinc-800","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",i),children:[e.map((x,y)=>(0,Ir.jsxs)(fo,{variant:r,className:"gap-1 pr-1.5",children:[(0,Ir.jsx)("span",{className:"text-xs",children:x}),!l&&(0,Ir.jsx)("button",{type:"button",onClick:()=>v(y),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,Ir.jsx)(co,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},y)),(0,Ir.jsx)("input",{ref:c,type:"text",value:d,onChange:x=>f(x.target.value),onKeyDown:g,onBlur:h,disabled:l,placeholder:e.length===0?s:"",className:S("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","dark:placeholder:text-zinc-500","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),m&&(0,Ir.jsx)("p",{className:"mt-1 text-xs text-destructive",children:m})]})});kk.displayName="TagsInput";var Ak=b(A());var Ek=b(D()),Dk=Ak.forwardRef(({className:e,variant:t,size:o,error:r,success:a,loading:n,autoResize:s,maxHeight:i,characterCount:l,...u},c)=>(0,Ek.jsx)("textarea",{className:S("moonui-theme","flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:c,...u}));Dk.displayName="Textarea";var ir=b(A());var ge=b(A(),1),Fk=b(Jn(),1);var Ne=b(D(),1),kx="ToastProvider",[Ax,ZU,QU]=lr("Toast"),[Ok,xpe]=Re("Toast",[QU]),[JU,Xf]=Ok(kx),_k=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:n=50,children:s}=e,[i,l]=ge.useState(null),[u,c]=ge.useState(0),d=ge.useRef(!1),f=ge.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${kx}\`. Expected non-empty \`string\`.`),(0,Ne.jsx)(Ax.Provider,{scope:t,children:(0,Ne.jsx)(JU,{scope:t,label:o,duration:r,swipeDirection:a,swipeThreshold:n,toastCount:u,viewport:i,onViewportChange:l,onToastAdd:ge.useCallback(()=>c(m=>m+1),[]),onToastRemove:ge.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};_k.displayName=kx;var Vk="ToastViewport",e3=["F8"],Px="toast.viewportPause",Tx="toast.viewportResume",Bk=ge.forwardRef((e,t)=>{let{__scopeToast:o,hotkey:r=e3,label:a="Notifications ({hotkey})",...n}=e,s=Xf(Vk,o),i=ZU(o),l=ge.useRef(null),u=ge.useRef(null),c=ge.useRef(null),d=ge.useRef(null),f=ee(t,d,s.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s.toastCount>0;ge.useEffect(()=>{let h=v=>{r.length!==0&&r.every(y=>v[y]||v.code===y)&&d.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),ge.useEffect(()=>{let h=l.current,v=d.current;if(p&&h&&v){let x=()=>{if(!s.isClosePausedRef.current){let w=new CustomEvent(Px);v.dispatchEvent(w),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){let w=new CustomEvent(Tx);v.dispatchEvent(w),s.isClosePausedRef.current=!1}},R=w=>{!h.contains(w.relatedTarget)&&y()},C=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",x),h.addEventListener("focusout",R),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",C),window.addEventListener("blur",x),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",R),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",C),window.removeEventListener("blur",x),window.removeEventListener("focus",y)}}},[p,s.isClosePausedRef]);let g=ge.useCallback(({tabbingDirection:h})=>{let x=i().map(y=>{let R=y.ref.current,C=[R,...m3(R)];return h==="forwards"?C:C.reverse()});return(h==="forwards"?x.reverse():x).flat()},[i]);return ge.useEffect(()=>{let h=d.current;if(h){let v=x=>{let y=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!y){let C=document.activeElement,w=x.shiftKey;if(x.target===h&&w){u.current?.focus();return}let P=g({tabbingDirection:w?"backwards":"forwards"}),T=P.findIndex(O=>O===C);Lx(P.slice(T+1))?x.preventDefault():w?u.current?.focus():c.current?.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[i,g]),(0,Ne.jsxs)(Z0,{ref:l,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&(0,Ne.jsx)(Mx,{ref:u,onFocusFromOutsideViewport:()=>{let h=g({tabbingDirection:"forwards"});Lx(h)}}),(0,Ne.jsx)(Ax.Slot,{scope:o,children:(0,Ne.jsx)(H.ol,{tabIndex:-1,...n,ref:f})}),p&&(0,Ne.jsx)(Mx,{ref:c,onFocusFromOutsideViewport:()=>{let h=g({tabbingDirection:"backwards"});Lx(h)}})]})});Bk.displayName=Vk;var Hk="ToastFocusProxy",Mx=ge.forwardRef((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=Xf(Hk,o);return(0,Ne.jsx)(Su,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});Mx.displayName=Hk;var Eu="Toast",t3="toast.swipeStart",o3="toast.swipeMove",r3="toast.swipeCancel",a3="toast.swipeEnd",Uk=ge.forwardRef((e,t)=>{let{forceMount:o,open:r,defaultOpen:a,onOpenChange:n,...s}=e,[i,l]=Fe({prop:r,defaultProp:a??!0,onChange:n,caller:Eu});return(0,Ne.jsx)(Oe,{present:o||i,children:(0,Ne.jsx)(i3,{open:i,...s,ref:t,onClose:()=>l(!1),onPause:Te(e.onPause),onResume:Te(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(e.onSwipeMove,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:V(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:V(e.onSwipeEnd,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Uk.displayName=Eu;var[n3,s3]=Ok(Eu,{onClose(){}}),i3=ge.forwardRef((e,t)=>{let{__scopeToast:o,type:r="foreground",duration:a,open:n,onClose:s,onEscapeKeyDown:i,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,...p}=e,g=Xf(Eu,o),[h,v]=ge.useState(null),x=ee(t,N=>v(N)),y=ge.useRef(null),R=ge.useRef(null),C=a||g.duration,w=ge.useRef(0),I=ge.useRef(C),L=ge.useRef(0),{onToastAdd:P,onToastRemove:T}=g,O=Te(()=>{h?.contains(document.activeElement)&&g.viewport?.focus(),s()}),$=ge.useCallback(N=>{!N||N===1/0||(window.clearTimeout(L.current),w.current=new Date().getTime(),L.current=window.setTimeout(O,N))},[O]);ge.useEffect(()=>{let N=g.viewport;if(N){let q=()=>{$(I.current),u?.()},E=()=>{let G=new Date().getTime()-w.current;I.current=I.current-G,window.clearTimeout(L.current),l?.()};return N.addEventListener(Px,E),N.addEventListener(Tx,q),()=>{N.removeEventListener(Px,E),N.removeEventListener(Tx,q)}}},[g.viewport,C,l,u,$]),ge.useEffect(()=>{n&&!g.isClosePausedRef.current&&$(C)},[n,C,g.isClosePausedRef,$]),ge.useEffect(()=>(P(),()=>T()),[P,T]);let W=ge.useMemo(()=>h?Kk(h):null,[h]);return g.viewport?(0,Ne.jsxs)(Ne.Fragment,{children:[W&&(0,Ne.jsx)(l3,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:W}),(0,Ne.jsx)(n3,{scope:o,onClose:O,children:Fk.createPortal((0,Ne.jsx)(Ax.ItemSlot,{scope:o,children:(0,Ne.jsx)(Y0,{asChild:!0,onEscapeKeyDown:V(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ne.jsx)(H.li,{tabIndex:0,"data-state":n?"open":"closed","data-swipe-direction":g.swipeDirection,...p,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,N=>{N.key==="Escape"&&(i?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:V(e.onPointerDown,N=>{N.button===0&&(y.current={x:N.clientX,y:N.clientY})}),onPointerMove:V(e.onPointerMove,N=>{if(!y.current)return;let q=N.clientX-y.current.x,E=N.clientY-y.current.y,G=!!R.current,M=["left","right"].includes(g.swipeDirection),k=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,re=M?k(0,q):0,Se=M?0:k(0,E),F=N.pointerType==="touch"?10:2,j={x:re,y:Se},Z={originalEvent:N,delta:j};G?(R.current=j,Kf(o3,d,Z,{discrete:!1})):Nk(j,g.swipeDirection,F)?(R.current=j,Kf(t3,c,Z,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(q)>F||Math.abs(E)>F)&&(y.current=null)}),onPointerUp:V(e.onPointerUp,N=>{let q=R.current,E=N.target;if(E.hasPointerCapture(N.pointerId)&&E.releasePointerCapture(N.pointerId),R.current=null,y.current=null,q){let G=N.currentTarget,M={originalEvent:N,delta:q};Nk(q,g.swipeDirection,g.swipeThreshold)?Kf(a3,m,M,{discrete:!0}):Kf(r3,f,M,{discrete:!0}),G.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),l3=e=>{let{__scopeToast:t,children:o,...r}=e,a=Xf(Eu,t),[n,s]=ge.useState(!1),[i,l]=ge.useState(!1);return d3(()=>s(!0)),ge.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:(0,Ne.jsx)(ho,{asChild:!0,children:(0,Ne.jsx)(Su,{...r,children:n&&(0,Ne.jsxs)(Ne.Fragment,{children:[a.label," ",o]})})})},u3="ToastTitle",Gk=ge.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ne.jsx)(H.div,{...r,ref:t})});Gk.displayName=u3;var c3="ToastDescription",zk=ge.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ne.jsx)(H.div,{...r,ref:t})});zk.displayName=c3;var qk="ToastAction",Wk=ge.forwardRef((e,t)=>{let{altText:o,...r}=e;return o.trim()?(0,Ne.jsx)(jk,{altText:o,asChild:!0,children:(0,Ne.jsx)(Dx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${qk}\`. Expected non-empty \`string\`.`),null)});Wk.displayName=qk;var $k="ToastClose",Dx=ge.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e,a=s3($k,o);return(0,Ne.jsx)(jk,{asChild:!0,children:(0,Ne.jsx)(H.button,{type:"button",...r,ref:t,onClick:V(e.onClick,a.onClose)})})});Dx.displayName=$k;var jk=ge.forwardRef((e,t)=>{let{__scopeToast:o,altText:r,...a}=e;return(0,Ne.jsx)(H.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Kk(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),f3(r)){let a=r.ariaHidden||r.hidden||r.style.display==="none",n=r.dataset.radixToastAnnounceExclude==="";if(!a)if(n){let s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Kk(r))}}),t}function Kf(e,t,o,{discrete:r}){let a=o.originalEvent.currentTarget,n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),r?es(a,n):a.dispatchEvent(n)}var Nk=(e,t,o=0)=>{let r=Math.abs(e.x),a=Math.abs(e.y),n=r>a;return t==="left"||t==="right"?n&&r>o:!n&&a>o};function d3(e=()=>{}){let t=Te(e);Le(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function f3(e){return e.nodeType===e.ELEMENT_NODE}function m3(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function Lx(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var Xk=_k,Ex=Bk,Nx=Uk,Fx=Gk,Ox=zk,_x=Wk,Vx=Dx;var Vt=b(D()),Zk=Xk,Hx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Ex,{ref:o,className:S("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Hx.displayName=Ex.displayName;var g3=te("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),Ux=ir.forwardRef(({className:e,variant:t,...o},r)=>(0,Vt.jsx)(Nx,{ref:r,className:S("moonui-theme",g3({variant:t}),e),...o}));Ux.displayName=Nx.displayName;var Qk=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(_x,{ref:o,className:S("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Qk.displayName=_x.displayName;var Gx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Vx,{ref:o,className:S("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Vt.jsx)(co,{className:"h-4 w-4"})}));Gx.displayName=Vx.displayName;var zx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Fx,{ref:o,className:S("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));zx.displayName=Fx.displayName;var qx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Ox,{ref:o,className:S("moonui-theme","text-sm opacity-90",e),...t}));qx.displayName=Ox.displayName;var h3=5,x3=1e6,Bx=new Map,Yk=e=>{if(Bx.has(e))return;let t=setTimeout(()=>{Bx.delete(e),Nu({type:"REMOVE_TOAST",toastId:e})},x3);Bx.set(e,t)},v3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,h3)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{let{toastId:o}=t;return o?Yk(o):e.toasts.forEach(r=>{Yk(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};default:return e}},Yf=[],Zf={toasts:[]},y3=0;function Nu(e){Zf=v3(Zf,e),Yf.forEach(t=>{t(Zf)})}function Jk({...e}){let t=`toast-${Date.now()}-${++y3}`,o=a=>Nu({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Nu({type:"DISMISS_TOAST",toastId:t});return Nu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function eA(){let[e,t]=ir.useState(Zf);return ir.useEffect(()=>(Yf.push(t),()=>{let o=Yf.indexOf(t);o>-1&&Yf.splice(o,1)}),[e]),{...e,toast:Jk,dismiss:o=>Nu({type:"DISMISS_TOAST",toastId:o})}}function b3(){let{toasts:e}=eA();return(0,Vt.jsxs)(Zk,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return(0,Vt.jsxs)(Ux,{variant:n,open:s,onOpenChange:i,...l,children:[(0,Vt.jsxs)("div",{className:"grid gap-1",children:[o&&(0,Vt.jsx)(zx,{children:o}),r&&(0,Vt.jsx)(qx,{children:r})]}),a,(0,Vt.jsx)(Gx,{})]},t)}),(0,Vt.jsx)(Hx,{})]})}export{VE as Accordion,uy as AccordionContent,iy as AccordionItem,ly as AccordionTrigger,fy as Alert,py as AlertDescription,my as AlertTitle,hy as AspectRatio,Mm as Avatar,km as AvatarFallback,Ay as AvatarGroup,ky as AvatarImage,fo as Badge,Ey as Breadcrumb,Am as BreadcrumbEllipsis,Fy as BreadcrumbItem,_y as BreadcrumbLink,Ny as BreadcrumbList,Vy as BreadcrumbPage,Oy as BreadcrumbSeparator,Ve as Button,p0 as Card,S0 as CardCVCInput,v0 as CardContent,x0 as CardDescription,w0 as CardExpiryInput,y0 as CardFooter,g0 as CardHeader,C0 as CardNumberInput,h0 as CardTitle,R0 as CardZipInput,qp as Checkbox,D0 as CheckboxGroup,Pd as CheckboxLabel,E0 as CheckboxWithLabel,B2 as Collapsible,O0 as CollapsibleContent,F0 as CollapsibleTrigger,Ag as ColorPicker,jg as Command,H_ as CommandDialog,JI as CommandEmpty,eL as CommandGroup,ZI as CommandInput,oL as CommandItem,QI as CommandList,tL as CommandSeparator,rL as CommandShortcut,oP as DatePicker,RB as DateRangePicker,IB as DateTimePicker,qg as Dialog,F_ as DialogClose,lf as DialogContent,$g as DialogDescription,YI as DialogFooter,V_ as DialogForm,Wg as DialogHeader,du as DialogTitle,E_ as DialogTrigger,PB as DraggableList,yH as DropdownMenu,xT as DropdownMenuCheckboxItem,gT as DropdownMenuContent,CH as DropdownMenuGroup,hT as DropdownMenuItem,yT as DropdownMenuLabel,wH as DropdownMenuPortal,RH as DropdownMenuRadioGroup,vT as DropdownMenuRadioItem,bT as DropdownMenuSeparator,CT as DropdownMenuShortcut,SH as DropdownMenuSub,pT as DropdownMenuSubContent,mT as DropdownMenuSubTrigger,bH as DropdownMenuTrigger,ST as FileUpload,DH as FreeBadge,IT as GestureDrawer,_de as GitHubStarButton,MH as GitHubStars,e_ as GradientPicker,At as Input,ao as Label,LT as LockedComponent,LB as MonthPicker,Hh as MoonLogo,Kde as MoonLogoAnimated,jde as MoonLogoIcon,VE as MoonUIAccordion,uy as MoonUIAccordionContent,iy as MoonUIAccordionItem,ly as MoonUIAccordionTrigger,fy as MoonUIAlert,py as MoonUIAlertDescription,my as MoonUIAlertTitle,hy as MoonUIAspectRatio,Mm as MoonUIAvatar,km as MoonUIAvatarFallback,Ay as MoonUIAvatarGroup,ky as MoonUIAvatarImage,fo as MoonUIBadge,Ey as MoonUIBreadcrumb,Am as MoonUIBreadcrumbEllipsis,Fy as MoonUIBreadcrumbItem,_y as MoonUIBreadcrumbLink,Ny as MoonUIBreadcrumbList,Vy as MoonUIBreadcrumbPage,Oy as MoonUIBreadcrumbSeparator,Ve as MoonUIButton,p0 as MoonUICard,S0 as MoonUICardCVCInput,v0 as MoonUICardContent,x0 as MoonUICardDescription,w0 as MoonUICardExpiryInput,y0 as MoonUICardFooter,g0 as MoonUICardHeader,C0 as MoonUICardNumberInput,h0 as MoonUICardTitle,R0 as MoonUICardZipInput,qp as MoonUICheckbox,D0 as MoonUICheckboxGroup,Pd as MoonUICheckboxLabel,E0 as MoonUICheckboxWithLabel,B2 as MoonUICollapsible,O0 as MoonUICollapsibleContent,F0 as MoonUICollapsibleTrigger,Ag as MoonUIColorPicker,jg as MoonUICommand,H_ as MoonUICommandDialog,JI as MoonUICommandEmpty,eL as MoonUICommandGroup,ZI as MoonUICommandInput,oL as MoonUICommandItem,QI as MoonUICommandList,tL as MoonUICommandSeparator,rL as MoonUICommandShortcut,EV as MoonUIDataTableBasic,oP as MoonUIDatePicker,RB as MoonUIDateRangePicker,IB as MoonUIDateTimePicker,qg as MoonUIDialog,F_ as MoonUIDialogClose,lf as MoonUIDialogContent,$g as MoonUIDialogDescription,YI as MoonUIDialogFooter,Wg as MoonUIDialogHeader,du as MoonUIDialogTitle,E_ as MoonUIDialogTrigger,PB as MoonUIDraggableList,yH as MoonUIDropdownMenu,xT as MoonUIDropdownMenuCheckboxItem,gT as MoonUIDropdownMenuContent,CH as MoonUIDropdownMenuGroup,hT as MoonUIDropdownMenuItem,yT as MoonUIDropdownMenuLabel,wH as MoonUIDropdownMenuPortal,RH as MoonUIDropdownMenuRadioGroup,vT as MoonUIDropdownMenuRadioItem,bT as MoonUIDropdownMenuSeparator,CT as MoonUIDropdownMenuShortcut,SH as MoonUIDropdownMenuSub,pT as MoonUIDropdownMenuSubContent,mT as MoonUIDropdownMenuSubTrigger,bH as MoonUIDropdownMenuTrigger,ST as MoonUIFileUpload,DH as MoonUIFreeBadge,IT as MoonUIGestureDrawer,MH as MoonUIGitHubStars,e_ as MoonUIGradientPicker,At as MoonUIInput,ao as MoonUILabel,LT as MoonUILockedComponent,LB as MoonUIMonthPicker,Hh as MoonUIMoonLogo,TT as MoonUIPagination,MT as MoonUIPaginationContent,ET as MoonUIPaginationEllipsis,kT as MoonUIPaginationItem,kf as MoonUIPaginationLink,DT as MoonUIPaginationNext,AT as MoonUIPaginationPrevious,SM as MoonUIPhoneInput,jr as MoonUIPopover,br as MoonUIPopoverContent,Kr as MoonUIPopoverTrigger,AH as MoonUIProBadge,kH as MoonUIProComponentWrapper,Mf as MoonUIProgress,IM as MoonUIRadioGroup,nx as MoonUIRadioGroupItem,LM as MoonUIRadioItemWithLabel,sx as MoonUIRadioLabel,sU as MoonUIRichTextEditor,GM as MoonUIScrollArea,mx as MoonUIScrollBar,zM as MoonUIScrollReveal,qM as MoonUIScrollRevealContainer,WM as MoonUIScrollRevealItem,vi as MoonUISelect,bi as MoonUISelectContent,oU as MoonUISelectGroup,Xt as MoonUISelectItem,bM as MoonUISelectLabel,ax as MoonUISelectScrollDownButton,rx as MoonUISelectScrollUpButton,CM as MoonUISelectSeparator,yi as MoonUISelectTrigger,Iu as MoonUISelectValue,Bo as MoonUISeparator,JO as MoonUISimpleColorPicker,xk as MoonUISimpleEditor,Ya as MoonUISkeleton,Rx as MoonUISkeletonAvatar,yk as MoonUISkeletonCard,Sx as MoonUISkeletonText,Qr as MoonUISlider,bk as MoonUISwipeableCard,Mk as MoonUISwitch,mf as MoonUITable,gf as MoonUITableBody,wL as MoonUITableCaption,gu as MoonUITableCell,CL as MoonUITableFooter,hf as MoonUITableHead,pf as MoonUITableHeader,di as MoonUITableRow,ef as MoonUITabs,ii as MoonUITabsContent,tf as MoonUITabsList,si as MoonUITabsTrigger,kk as MoonUITagsInput,Dk as MoonUITextarea,Ux as MoonUIToast,Qk as MoonUIToastAction,Gx as MoonUIToastClose,qx as MoonUIToastDescription,Zk as MoonUIToastProvider,zx as MoonUIToastTitle,Hx as MoonUIToastViewport,b3 as MoonUIToaster,Uf as MoonUIToggle,Wf as MoonUITooltip,ku as MoonUITooltipContent,wx as MoonUITooltipProvider,$f as MoonUITooltipTrigger,TT as Pagination,MT as PaginationContent,ET as PaginationEllipsis,kT as PaginationItem,kf as PaginationLink,DT as PaginationNext,AT as PaginationPrevious,ls as Palette,SM as PhoneInput,Xu as Pipette,jr as Popover,hse as PopoverAnchor,xse as PopoverClose,br as PopoverContent,AO as PopoverFooter,kO as PopoverHeader,MO as PopoverSeparator,Kr as PopoverTrigger,AH as ProBadge,kH as ProComponentWrapper,Mf as Progress,IM as RadioGroup,nx as RadioGroupItem,LM as RadioItemWithLabel,sx as RadioLabel,sU as RichTextEditor,GM as ScrollArea,mx as ScrollBar,zM as ScrollReveal,qM as ScrollRevealContainer,WM as ScrollRevealItem,vi as Select,bi as SelectContent,oU as SelectGroup,Xt as SelectItem,bM as SelectLabel,ax as SelectScrollDownButton,rx as SelectScrollUpButton,CM as SelectSeparator,yi as SelectTrigger,Iu as SelectValue,Bo as Separator,JO as SimpleColorPicker,xk as SimpleEditor,zU as SimpleTooltip,Ya as Skeleton,Rx as SkeletonAvatar,yk as SkeletonCard,Sx as SkeletonText,Qr as Slider,bk as SwipeableCard,Mk as Switch,mf as Table,gf as TableBody,wL as TableCaption,gu as TableCell,CL as TableFooter,hf as TableHead,pf as TableHeader,di as TableRow,ef as Tabs,ii as TabsContent,tf as TabsList,si as TabsTrigger,kk as TagsInput,Dk as Textarea,Ux as Toast,Qk as ToastAction,Gx as ToastClose,qx as ToastDescription,Zk as ToastProvider,zx as ToastTitle,Hx as ToastViewport,b3 as Toaster,Uf as Toggle,Wf as Tooltip,hk as TooltipArrow,ku as TooltipContent,wx as TooltipProvider,$f as TooltipTrigger,HE as aspectRatioVariants,Dy as badgeVariants,ec as buttonVariants,S as cn,H2 as collapsibleContentVariants,N0 as collapsibleTriggerVariants,ar as format,Dy as moonUIBadgeVariants,ec as moonUIButtonVariants,NV as moonUICreateSortableHeader,vk as moonUISkeletonVariants,rk as moonUIToggleVariants,TO as popoverContentVariants,IH as progressVariants,SU as separatorVariants,vk as skeletonVariants,Jk as toast,rk as toggleVariants,GU as tooltipVariants,eA as useToast};
109
58
  /*! Bundled license information:
110
59
 
111
- react/cjs/react.production.min.js:
112
- (**
113
- * @license React
114
- * react.production.min.js
115
- *
116
- * Copyright (c) Facebook, Inc. and its affiliates.
117
- *
118
- * This source code is licensed under the MIT license found in the
119
- * LICENSE file in the root directory of this source tree.
120
- *)
121
-
122
- react/cjs/react-jsx-runtime.production.min.js:
123
- (**
124
- * @license React
125
- * react-jsx-runtime.production.min.js
126
- *
127
- * Copyright (c) Facebook, Inc. and its affiliates.
128
- *
129
- * This source code is licensed under the MIT license found in the
130
- * LICENSE file in the root directory of this source tree.
131
- *)
132
-
133
- scheduler/cjs/scheduler.production.min.js:
134
- (**
135
- * @license React
136
- * scheduler.production.min.js
137
- *
138
- * Copyright (c) Facebook, Inc. and its affiliates.
139
- *
140
- * This source code is licensed under the MIT license found in the
141
- * LICENSE file in the root directory of this source tree.
142
- *)
143
-
144
- react-dom/cjs/react-dom.production.min.js:
145
- (**
146
- * @license React
147
- * react-dom.production.min.js
148
- *
149
- * Copyright (c) Facebook, Inc. and its affiliates.
150
- *
151
- * This source code is licensed under the MIT license found in the
152
- * LICENSE file in the root directory of this source tree.
153
- *)
154
-
155
- use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
156
- (**
157
- * @license React
158
- * use-sync-external-store-shim.production.js
159
- *
160
- * Copyright (c) Meta Platforms, Inc. and affiliates.
161
- *
162
- * This source code is licensed under the MIT license found in the
163
- * LICENSE file in the root directory of this source tree.
164
- *)
165
-
166
60
  react/cjs/react.production.js:
167
61
  (**
168
62
  * @license React
@@ -196,470 +90,75 @@ react-dom/cjs/react-dom.production.js:
196
90
  * LICENSE file in the root directory of this source tree.
197
91
  *)
198
92
 
199
- lucide-react/dist/esm/shared/src/utils.js:
93
+ use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
200
94
  (**
201
- * @license lucide-react v0.525.0 - ISC
95
+ * @license React
96
+ * use-sync-external-store-shim.production.js
202
97
  *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- *)
206
-
207
- lucide-react/dist/esm/defaultAttributes.js:
208
- (**
209
- * @license lucide-react v0.525.0 - ISC
98
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
210
99
  *
211
- * This source code is licensed under the ISC license.
212
- * See the LICENSE file in the root directory of this source tree.
100
+ * This source code is licensed under the MIT license found in the
101
+ * LICENSE file in the root directory of this source tree.
213
102
  *)
214
103
 
104
+ lucide-react/dist/esm/shared/src/utils.js:
105
+ lucide-react/dist/esm/defaultAttributes.js:
215
106
  lucide-react/dist/esm/Icon.js:
216
- (**
217
- * @license lucide-react v0.525.0 - ISC
218
- *
219
- * This source code is licensed under the ISC license.
220
- * See the LICENSE file in the root directory of this source tree.
221
- *)
222
-
223
107
  lucide-react/dist/esm/createLucideIcon.js:
224
- (**
225
- * @license lucide-react v0.525.0 - ISC
226
- *
227
- * This source code is licensed under the ISC license.
228
- * See the LICENSE file in the root directory of this source tree.
229
- *)
230
-
231
108
  lucide-react/dist/esm/icons/align-center.js:
232
- (**
233
- * @license lucide-react v0.525.0 - ISC
234
- *
235
- * This source code is licensed under the ISC license.
236
- * See the LICENSE file in the root directory of this source tree.
237
- *)
238
-
239
109
  lucide-react/dist/esm/icons/align-justify.js:
240
- (**
241
- * @license lucide-react v0.525.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- *)
246
-
247
110
  lucide-react/dist/esm/icons/align-left.js:
248
- (**
249
- * @license lucide-react v0.525.0 - ISC
250
- *
251
- * This source code is licensed under the ISC license.
252
- * See the LICENSE file in the root directory of this source tree.
253
- *)
254
-
255
111
  lucide-react/dist/esm/icons/align-right.js:
256
- (**
257
- * @license lucide-react v0.525.0 - ISC
258
- *
259
- * This source code is licensed under the ISC license.
260
- * See the LICENSE file in the root directory of this source tree.
261
- *)
262
-
263
112
  lucide-react/dist/esm/icons/arrow-down.js:
264
- (**
265
- * @license lucide-react v0.525.0 - ISC
266
- *
267
- * This source code is licensed under the ISC license.
268
- * See the LICENSE file in the root directory of this source tree.
269
- *)
270
-
271
113
  lucide-react/dist/esm/icons/arrow-up-down.js:
272
- (**
273
- * @license lucide-react v0.525.0 - ISC
274
- *
275
- * This source code is licensed under the ISC license.
276
- * See the LICENSE file in the root directory of this source tree.
277
- *)
278
-
279
114
  lucide-react/dist/esm/icons/arrow-up.js:
280
- (**
281
- * @license lucide-react v0.525.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- *)
286
-
287
115
  lucide-react/dist/esm/icons/bold.js:
288
- (**
289
- * @license lucide-react v0.525.0 - ISC
290
- *
291
- * This source code is licensed under the ISC license.
292
- * See the LICENSE file in the root directory of this source tree.
293
- *)
294
-
295
116
  lucide-react/dist/esm/icons/calendar.js:
296
- (**
297
- * @license lucide-react v0.525.0 - ISC
298
- *
299
- * This source code is licensed under the ISC license.
300
- * See the LICENSE file in the root directory of this source tree.
301
- *)
302
-
303
117
  lucide-react/dist/esm/icons/check.js:
304
- (**
305
- * @license lucide-react v0.525.0 - ISC
306
- *
307
- * This source code is licensed under the ISC license.
308
- * See the LICENSE file in the root directory of this source tree.
309
- *)
310
-
311
118
  lucide-react/dist/esm/icons/chevron-down.js:
312
- (**
313
- * @license lucide-react v0.525.0 - ISC
314
- *
315
- * This source code is licensed under the ISC license.
316
- * See the LICENSE file in the root directory of this source tree.
317
- *)
318
-
319
119
  lucide-react/dist/esm/icons/chevron-left.js:
320
- (**
321
- * @license lucide-react v0.525.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- *)
326
-
327
120
  lucide-react/dist/esm/icons/chevron-right.js:
328
- (**
329
- * @license lucide-react v0.525.0 - ISC
330
- *
331
- * This source code is licensed under the ISC license.
332
- * See the LICENSE file in the root directory of this source tree.
333
- *)
334
-
335
121
  lucide-react/dist/esm/icons/chevron-up.js:
336
- (**
337
- * @license lucide-react v0.525.0 - ISC
338
- *
339
- * This source code is licensed under the ISC license.
340
- * See the LICENSE file in the root directory of this source tree.
341
- *)
342
-
343
122
  lucide-react/dist/esm/icons/circle-alert.js:
344
- (**
345
- * @license lucide-react v0.525.0 - ISC
346
- *
347
- * This source code is licensed under the ISC license.
348
- * See the LICENSE file in the root directory of this source tree.
349
- *)
350
-
351
123
  lucide-react/dist/esm/icons/circle-check-big.js:
352
- (**
353
- * @license lucide-react v0.525.0 - ISC
354
- *
355
- * This source code is licensed under the ISC license.
356
- * See the LICENSE file in the root directory of this source tree.
357
- *)
358
-
359
124
  lucide-react/dist/esm/icons/circle.js:
360
- (**
361
- * @license lucide-react v0.525.0 - ISC
362
- *
363
- * This source code is licensed under the ISC license.
364
- * See the LICENSE file in the root directory of this source tree.
365
- *)
366
-
367
125
  lucide-react/dist/esm/icons/clock.js:
368
- (**
369
- * @license lucide-react v0.525.0 - ISC
370
- *
371
- * This source code is licensed under the ISC license.
372
- * See the LICENSE file in the root directory of this source tree.
373
- *)
374
-
375
126
  lucide-react/dist/esm/icons/code.js:
376
- (**
377
- * @license lucide-react v0.525.0 - ISC
378
- *
379
- * This source code is licensed under the ISC license.
380
- * See the LICENSE file in the root directory of this source tree.
381
- *)
382
-
383
127
  lucide-react/dist/esm/icons/copy.js:
384
- (**
385
- * @license lucide-react v0.525.0 - ISC
386
- *
387
- * This source code is licensed under the ISC license.
388
- * See the LICENSE file in the root directory of this source tree.
389
- *)
390
-
391
128
  lucide-react/dist/esm/icons/credit-card.js:
392
- (**
393
- * @license lucide-react v0.525.0 - ISC
394
- *
395
- * This source code is licensed under the ISC license.
396
- * See the LICENSE file in the root directory of this source tree.
397
- *)
398
-
399
129
  lucide-react/dist/esm/icons/crown.js:
400
- (**
401
- * @license lucide-react v0.525.0 - ISC
402
- *
403
- * This source code is licensed under the ISC license.
404
- * See the LICENSE file in the root directory of this source tree.
405
- *)
406
-
407
130
  lucide-react/dist/esm/icons/ellipsis.js:
408
- (**
409
- * @license lucide-react v0.525.0 - ISC
410
- *
411
- * This source code is licensed under the ISC license.
412
- * See the LICENSE file in the root directory of this source tree.
413
- *)
414
-
415
131
  lucide-react/dist/esm/icons/external-link.js:
416
- (**
417
- * @license lucide-react v0.525.0 - ISC
418
- *
419
- * This source code is licensed under the ISC license.
420
- * See the LICENSE file in the root directory of this source tree.
421
- *)
422
-
423
132
  lucide-react/dist/esm/icons/eye.js:
424
- (**
425
- * @license lucide-react v0.525.0 - ISC
426
- *
427
- * This source code is licensed under the ISC license.
428
- * See the LICENSE file in the root directory of this source tree.
429
- *)
430
-
431
133
  lucide-react/dist/esm/icons/file-text.js:
432
- (**
433
- * @license lucide-react v0.525.0 - ISC
434
- *
435
- * This source code is licensed under the ISC license.
436
- * See the LICENSE file in the root directory of this source tree.
437
- *)
438
-
439
134
  lucide-react/dist/esm/icons/file.js:
440
- (**
441
- * @license lucide-react v0.525.0 - ISC
442
- *
443
- * This source code is licensed under the ISC license.
444
- * See the LICENSE file in the root directory of this source tree.
445
- *)
446
-
447
135
  lucide-react/dist/esm/icons/git-fork.js:
448
- (**
449
- * @license lucide-react v0.525.0 - ISC
450
- *
451
- * This source code is licensed under the ISC license.
452
- * See the LICENSE file in the root directory of this source tree.
453
- *)
454
-
455
136
  lucide-react/dist/esm/icons/image.js:
456
- (**
457
- * @license lucide-react v0.525.0 - ISC
458
- *
459
- * This source code is licensed under the ISC license.
460
- * See the LICENSE file in the root directory of this source tree.
461
- *)
462
-
463
137
  lucide-react/dist/esm/icons/info.js:
464
- (**
465
- * @license lucide-react v0.525.0 - ISC
466
- *
467
- * This source code is licensed under the ISC license.
468
- * See the LICENSE file in the root directory of this source tree.
469
- *)
470
-
471
138
  lucide-react/dist/esm/icons/italic.js:
472
- (**
473
- * @license lucide-react v0.525.0 - ISC
474
- *
475
- * This source code is licensed under the ISC license.
476
- * See the LICENSE file in the root directory of this source tree.
477
- *)
478
-
479
139
  lucide-react/dist/esm/icons/link.js:
480
- (**
481
- * @license lucide-react v0.525.0 - ISC
482
- *
483
- * This source code is licensed under the ISC license.
484
- * See the LICENSE file in the root directory of this source tree.
485
- *)
486
-
487
140
  lucide-react/dist/esm/icons/list-ordered.js:
488
- (**
489
- * @license lucide-react v0.525.0 - ISC
490
- *
491
- * This source code is licensed under the ISC license.
492
- * See the LICENSE file in the root directory of this source tree.
493
- *)
494
-
495
141
  lucide-react/dist/esm/icons/list.js:
496
- (**
497
- * @license lucide-react v0.525.0 - ISC
498
- *
499
- * This source code is licensed under the ISC license.
500
- * See the LICENSE file in the root directory of this source tree.
501
- *)
502
-
503
142
  lucide-react/dist/esm/icons/loader-circle.js:
504
- (**
505
- * @license lucide-react v0.525.0 - ISC
506
- *
507
- * This source code is licensed under the ISC license.
508
- * See the LICENSE file in the root directory of this source tree.
509
- *)
510
-
511
143
  lucide-react/dist/esm/icons/lock.js:
512
- (**
513
- * @license lucide-react v0.525.0 - ISC
514
- *
515
- * This source code is licensed under the ISC license.
516
- * See the LICENSE file in the root directory of this source tree.
517
- *)
518
-
519
144
  lucide-react/dist/esm/icons/minus.js:
520
- (**
521
- * @license lucide-react v0.525.0 - ISC
522
- *
523
- * This source code is licensed under the ISC license.
524
- * See the LICENSE file in the root directory of this source tree.
525
- *)
526
-
527
145
  lucide-react/dist/esm/icons/music.js:
528
- (**
529
- * @license lucide-react v0.525.0 - ISC
530
- *
531
- * This source code is licensed under the ISC license.
532
- * See the LICENSE file in the root directory of this source tree.
533
- *)
534
-
535
146
  lucide-react/dist/esm/icons/palette.js:
536
- (**
537
- * @license lucide-react v0.525.0 - ISC
538
- *
539
- * This source code is licensed under the ISC license.
540
- * See the LICENSE file in the root directory of this source tree.
541
- *)
542
-
543
147
  lucide-react/dist/esm/icons/phone.js:
544
- (**
545
- * @license lucide-react v0.525.0 - ISC
546
- *
547
- * This source code is licensed under the ISC license.
548
- * See the LICENSE file in the root directory of this source tree.
549
- *)
550
-
551
148
  lucide-react/dist/esm/icons/pipette.js:
552
- (**
553
- * @license lucide-react v0.525.0 - ISC
554
- *
555
- * This source code is licensed under the ISC license.
556
- * See the LICENSE file in the root directory of this source tree.
557
- *)
558
-
559
149
  lucide-react/dist/esm/icons/quote.js:
560
- (**
561
- * @license lucide-react v0.525.0 - ISC
562
- *
563
- * This source code is licensed under the ISC license.
564
- * See the LICENSE file in the root directory of this source tree.
565
- *)
566
-
567
150
  lucide-react/dist/esm/icons/redo.js:
568
- (**
569
- * @license lucide-react v0.525.0 - ISC
570
- *
571
- * This source code is licensed under the ISC license.
572
- * See the LICENSE file in the root directory of this source tree.
573
- *)
574
-
575
151
  lucide-react/dist/esm/icons/search.js:
576
- (**
577
- * @license lucide-react v0.525.0 - ISC
578
- *
579
- * This source code is licensed under the ISC license.
580
- * See the LICENSE file in the root directory of this source tree.
581
- *)
582
-
583
152
  lucide-react/dist/esm/icons/square-pen.js:
584
- (**
585
- * @license lucide-react v0.525.0 - ISC
586
- *
587
- * This source code is licensed under the ISC license.
588
- * See the LICENSE file in the root directory of this source tree.
589
- *)
590
-
591
153
  lucide-react/dist/esm/icons/star.js:
592
- (**
593
- * @license lucide-react v0.525.0 - ISC
594
- *
595
- * This source code is licensed under the ISC license.
596
- * See the LICENSE file in the root directory of this source tree.
597
- *)
598
-
599
154
  lucide-react/dist/esm/icons/strikethrough.js:
600
- (**
601
- * @license lucide-react v0.525.0 - ISC
602
- *
603
- * This source code is licensed under the ISC license.
604
- * See the LICENSE file in the root directory of this source tree.
605
- *)
606
-
607
155
  lucide-react/dist/esm/icons/triangle-alert.js:
608
- (**
609
- * @license lucide-react v0.525.0 - ISC
610
- *
611
- * This source code is licensed under the ISC license.
612
- * See the LICENSE file in the root directory of this source tree.
613
- *)
614
-
615
156
  lucide-react/dist/esm/icons/underline.js:
616
- (**
617
- * @license lucide-react v0.525.0 - ISC
618
- *
619
- * This source code is licensed under the ISC license.
620
- * See the LICENSE file in the root directory of this source tree.
621
- *)
622
-
623
157
  lucide-react/dist/esm/icons/undo.js:
624
- (**
625
- * @license lucide-react v0.525.0 - ISC
626
- *
627
- * This source code is licensed under the ISC license.
628
- * See the LICENSE file in the root directory of this source tree.
629
- *)
630
-
631
158
  lucide-react/dist/esm/icons/upload.js:
632
- (**
633
- * @license lucide-react v0.525.0 - ISC
634
- *
635
- * This source code is licensed under the ISC license.
636
- * See the LICENSE file in the root directory of this source tree.
637
- *)
638
-
639
159
  lucide-react/dist/esm/icons/video.js:
640
- (**
641
- * @license lucide-react v0.525.0 - ISC
642
- *
643
- * This source code is licensed under the ISC license.
644
- * See the LICENSE file in the root directory of this source tree.
645
- *)
646
-
647
160
  lucide-react/dist/esm/icons/x.js:
648
- (**
649
- * @license lucide-react v0.525.0 - ISC
650
- *
651
- * This source code is licensed under the ISC license.
652
- * See the LICENSE file in the root directory of this source tree.
653
- *)
654
-
655
161
  lucide-react/dist/esm/icons/zap.js:
656
- (**
657
- * @license lucide-react v0.525.0 - ISC
658
- *
659
- * This source code is licensed under the ISC license.
660
- * See the LICENSE file in the root directory of this source tree.
661
- *)
662
-
663
162
  lucide-react/dist/esm/lucide-react.js:
664
163
  (**
665
164
  * @license lucide-react v0.525.0 - ISC
@@ -696,7 +195,7 @@ lucide-react/dist/esm/lucide-react.js:
696
195
  if (typeof window !== 'undefined' && !window.React) {
697
196
  console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
698
197
  }
699
- //# sourceMappingURL=index.global.js.map @license MIT
198
+ //# sourceMappingURL=index.global.js.map * @license MIT
700
199
  *)
701
200
  */
702
201