@moontra/moonui 3.1.0 → 3.3.0

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,14 +1,14 @@
1
1
  'use client';
2
2
 
3
3
  /** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
4
- var nU=Object.create;var pm=Object.defineProperty;var aU=Object.getOwnPropertyDescriptor;var iU=Object.getOwnPropertyNames;var sU=Object.getPrototypeOf,lU=Object.prototype.hasOwnProperty;var Dn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uU=(e,t)=>{for(var r in t)pm(e,r,{get:t[r],enumerable:!0})},_L=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of iU(t))!lU.call(e,n)&&n!==r&&pm(e,n,{get:()=>t[n],enumerable:!(o=aU(t,n))||o.enumerable});return e};var R=(e,t,r)=>(r=e!=null?nU(sU(e)):{},_L(t||!e||!e.__esModule?pm(r,"default",{value:e,enumerable:!0}):r,e)),cU=e=>_L(pm({},"__esModule",{value:!0}),e);var XL=Dn(Me=>{"use strict";var Bc=Symbol.for("react.element"),dU=Symbol.for("react.portal"),fU=Symbol.for("react.fragment"),pU=Symbol.for("react.strict_mode"),mU=Symbol.for("react.profiler"),gU=Symbol.for("react.provider"),hU=Symbol.for("react.context"),vU=Symbol.for("react.forward_ref"),xU=Symbol.for("react.suspense"),yU=Symbol.for("react.memo"),wU=Symbol.for("react.lazy"),VL=Symbol.iterator;function CU(e){return e===null||typeof e!="object"?null:(e=VL&&e[VL]||e["@@iterator"],typeof e=="function"?e:null)}var UL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zL=Object.assign,GL={};function Dl(e,t,r){this.props=e,this.context=t,this.refs=GL,this.updater=r||UL}Dl.prototype.isReactComponent={};Dl.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")};Dl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function WL(){}WL.prototype=Dl.prototype;function ly(e,t,r){this.props=e,this.context=t,this.refs=GL,this.updater=r||UL}var uy=ly.prototype=new WL;uy.constructor=ly;zL(uy,Dl.prototype);uy.isPureReactComponent=!0;var BL=Array.isArray,qL=Object.prototype.hasOwnProperty,cy={current:null},jL={key:!0,ref:!0,__self:!0,__source:!0};function $L(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)qL.call(t,o)&&!jL.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:Bc,type:e,key:a,ref:i,props:n,_owner:cy.current}}function SU(e,t){return{$$typeof:Bc,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===Bc}function bU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var HL=/\/+/g;function sy(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bU(""+e.key):t.toString(36)}function gm(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 Bc:case dU:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+sy(i,0):o,BL(n)?(r="",e!=null&&(r=e.replace(HL,"$&/")+"/"),gm(n,t,r,"",function(u){return u})):n!=null&&(dy(n)&&(n=SU(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(HL,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",BL(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+sy(a,s);i+=gm(a,t,r,l,n)}else if(l=CU(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+sy(a,s++),i+=gm(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 mm(e,t,r){if(e==null)return e;var o=[],n=0;return gm(e,o,"","",function(a){return t.call(r,a,n++)}),o}function RU(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 Ir={current:null},hm={transition:null},IU={ReactCurrentDispatcher:Ir,ReactCurrentBatchConfig:hm,ReactCurrentOwner:cy};function KL(){throw Error("act(...) is not supported in production builds of React.")}Me.Children={map:mm,forEach:function(e,t,r){mm(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mm(e,function(){t++}),t},toArray:function(e){return mm(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}};Me.Component=Dl;Me.Fragment=fU;Me.Profiler=mU;Me.PureComponent=ly;Me.StrictMode=pU;Me.Suspense=xU;Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IU;Me.act=KL;Me.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=zL({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=cy.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)qL.call(t,l)&&!jL.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:Bc,type:e.type,key:n,ref:a,props:o,_owner:i}};Me.createContext=function(e){return e={$$typeof:hU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gU,_context:e},e.Consumer=e};Me.createElement=$L;Me.createFactory=function(e){var t=$L.bind(null,e);return t.type=e,t};Me.createRef=function(){return{current:null}};Me.forwardRef=function(e){return{$$typeof:vU,render:e}};Me.isValidElement=dy;Me.lazy=function(e){return{$$typeof:wU,_payload:{_status:-1,_result:e},_init:RU}};Me.memo=function(e,t){return{$$typeof:yU,type:e,compare:t===void 0?null:t}};Me.startTransition=function(e){var t=hm.transition;hm.transition={};try{e()}finally{hm.transition=t}};Me.unstable_act=KL;Me.useCallback=function(e,t){return Ir.current.useCallback(e,t)};Me.useContext=function(e){return Ir.current.useContext(e)};Me.useDebugValue=function(){};Me.useDeferredValue=function(e){return Ir.current.useDeferredValue(e)};Me.useEffect=function(e,t){return Ir.current.useEffect(e,t)};Me.useId=function(){return Ir.current.useId()};Me.useImperativeHandle=function(e,t,r){return Ir.current.useImperativeHandle(e,t,r)};Me.useInsertionEffect=function(e,t){return Ir.current.useInsertionEffect(e,t)};Me.useLayoutEffect=function(e,t){return Ir.current.useLayoutEffect(e,t)};Me.useMemo=function(e,t){return Ir.current.useMemo(e,t)};Me.useReducer=function(e,t,r){return Ir.current.useReducer(e,t,r)};Me.useRef=function(e){return Ir.current.useRef(e)};Me.useState=function(e){return Ir.current.useState(e)};Me.useSyncExternalStore=function(e,t,r){return Ir.current.useSyncExternalStore(e,t,r)};Me.useTransition=function(){return Ir.current.useTransition()};Me.version="18.3.1"});var E=Dn((IQ,YL)=>{"use strict";YL.exports=XL()});var ZL=Dn(vm=>{"use strict";var LU=E(),PU=Symbol.for("react.element"),TU=Symbol.for("react.fragment"),kU=Object.prototype.hasOwnProperty,MU=LU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,EU={key:!0,ref:!0,__self:!0,__source:!0};function QL(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)kU.call(t,o)&&!EU.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:PU,type:e,key:a,ref:i,props:n,_owner:MU.current}}vm.Fragment=TU;vm.jsx=QL;vm.jsxs=QL});var D=Dn((PQ,JL)=>{"use strict";JL.exports=ZL()});var gP=Dn(Ye=>{"use strict";function hy(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<wm(n,t))e[o]=t,e[r]=n,r=o;else break e}}function Yo(e){return e.length===0?null:e[0]}function Sm(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>wm(s,r))l<n&&0>wm(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>wm(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function wm(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(iP=performance,Ye.unstable_now=function(){return iP.now()}):(py=Date,sP=py.now(),Ye.unstable_now=function(){return py.now()-sP});var iP,py,sP,On=[],ei=[],zU=1,Io=null,ir=3,bm=!1,fs=!1,Uc=!1,cP=typeof setTimeout=="function"?setTimeout:null,dP=typeof clearTimeout=="function"?clearTimeout:null,lP=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function vy(e){for(var t=Yo(ei);t!==null;){if(t.callback===null)Sm(ei);else if(t.startTime<=e)Sm(ei),t.sortIndex=t.expirationTime,hy(On,t);else break;t=Yo(ei)}}function xy(e){if(Uc=!1,vy(e),!fs)if(Yo(On)!==null)fs=!0,wy(yy);else{var t=Yo(ei);t!==null&&Cy(xy,t.startTime-e)}}function yy(e,t){fs=!1,Uc&&(Uc=!1,dP(zc),zc=-1),bm=!0;var r=ir;try{for(vy(t),Io=Yo(On);Io!==null&&(!(Io.expirationTime>t)||e&&!mP());){var o=Io.callback;if(typeof o=="function"){Io.callback=null,ir=Io.priorityLevel;var n=o(Io.expirationTime<=t);t=Ye.unstable_now(),typeof n=="function"?Io.callback=n:Io===Yo(On)&&Sm(On),vy(t)}else Sm(On);Io=Yo(On)}if(Io!==null)var a=!0;else{var i=Yo(ei);i!==null&&Cy(xy,i.startTime-t),a=!1}return a}finally{Io=null,ir=r,bm=!1}}var Rm=!1,Cm=null,zc=-1,fP=5,pP=-1;function mP(){return!(Ye.unstable_now()-pP<fP)}function my(){if(Cm!==null){var e=Ye.unstable_now();pP=e;var t=!0;try{t=Cm(!0,e)}finally{t?Hc():(Rm=!1,Cm=null)}}else Rm=!1}var Hc;typeof lP=="function"?Hc=function(){lP(my)}:typeof MessageChannel<"u"?(gy=new MessageChannel,uP=gy.port2,gy.port1.onmessage=my,Hc=function(){uP.postMessage(null)}):Hc=function(){cP(my,0)};var gy,uP;function wy(e){Cm=e,Rm||(Rm=!0,Hc())}function Cy(e,t){zc=cP(function(){e(Ye.unstable_now())},t)}Ye.unstable_IdlePriority=5;Ye.unstable_ImmediatePriority=1;Ye.unstable_LowPriority=4;Ye.unstable_NormalPriority=3;Ye.unstable_Profiling=null;Ye.unstable_UserBlockingPriority=2;Ye.unstable_cancelCallback=function(e){e.callback=null};Ye.unstable_continueExecution=function(){fs||bm||(fs=!0,wy(yy))};Ye.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"):fP=0<e?Math.floor(1e3/e):5};Ye.unstable_getCurrentPriorityLevel=function(){return ir};Ye.unstable_getFirstCallbackNode=function(){return Yo(On)};Ye.unstable_next=function(e){switch(ir){case 1:case 2:case 3:var t=3;break;default:t=ir}var r=ir;ir=t;try{return e()}finally{ir=r}};Ye.unstable_pauseExecution=function(){};Ye.unstable_requestPaint=function(){};Ye.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ir;ir=e;try{return t()}finally{ir=r}};Ye.unstable_scheduleCallback=function(e,t,r){var o=Ye.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:zU++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,hy(ei,e),Yo(On)===null&&e===Yo(ei)&&(Uc?(dP(zc),zc=-1):Uc=!0,Cy(xy,r-o))):(e.sortIndex=n,hy(On,e),fs||bm||(fs=!0,wy(yy))),e};Ye.unstable_shouldYield=mP;Ye.unstable_wrapCallback=function(e){var t=ir;return function(){var r=ir;ir=t;try{return e.apply(this,arguments)}finally{ir=r}}}});var vP=Dn(($Q,hP)=>{"use strict";hP.exports=gP()});var Ck=Dn(so=>{"use strict";var GU=E(),ao=vP();function j(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 R1=new Set,cd={};function Is(e,t){tu(e,t),tu(e+"Capture",t)}function tu(e,t){for(cd[e]=t,e=0;e<t.length;e++)R1.add(t[e])}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wy=Object.prototype.hasOwnProperty,WU=/^[: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]*$/,xP={},yP={};function qU(e){return Wy.call(yP,e)?!0:Wy.call(xP,e)?!1:WU.test(e)?yP[e]=!0:(xP[e]=!0,!1)}function jU(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 $U(e,t,r,o){if(t===null||typeof t>"u"||jU(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 Tr(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 Zt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Zt[e]=new Tr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Zt[t]=new Tr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Zt[e]=new Tr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Zt[e]=new Tr(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){Zt[e]=new Tr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Zt[e]=new Tr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Zt[e]=new Tr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Zt[e]=new Tr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Zt[e]=new Tr(e,5,!1,e.toLowerCase(),null,!1,!1)});var F0=/[\-:]([a-z])/g;function _0(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(F0,_0);Zt[t]=new Tr(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(F0,_0);Zt[t]=new Tr(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(F0,_0);Zt[t]=new Tr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Zt[e]=new Tr(e,1,!1,e.toLowerCase(),null,!1,!1)});Zt.xlinkHref=new Tr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Zt[e]=new Tr(e,1,!1,e.toLowerCase(),null,!0,!0)});function V0(e,t,r,o){var n=Zt.hasOwnProperty(t)?Zt[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($U(t,r,n,o)&&(r=null),o||n===null?qU(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 xa=GU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Im=Symbol.for("react.element"),_l=Symbol.for("react.portal"),Vl=Symbol.for("react.fragment"),B0=Symbol.for("react.strict_mode"),qy=Symbol.for("react.profiler"),I1=Symbol.for("react.provider"),L1=Symbol.for("react.context"),H0=Symbol.for("react.forward_ref"),jy=Symbol.for("react.suspense"),$y=Symbol.for("react.suspense_list"),U0=Symbol.for("react.memo"),ri=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var P1=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var wP=Symbol.iterator;function Gc(e){return e===null||typeof e!="object"?null:(e=wP&&e[wP]||e["@@iterator"],typeof e=="function"?e:null)}var mt=Object.assign,Sy;function Qc(e){if(Sy===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Sy=t&&t[1]||""}return`
5
- `+Sy+e}var by=!1;function Ry(e,t){if(!e||by)return"";by=!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(`
6
- `),a=o.stack.split(`
4
+ import{a as Tz,b as tu,c as b,d as eo,e as ky,f as Bm,g as M,h as D}from"./chunk-VXDFZPDA.global.js";var LP=tu(Xe=>{"use strict";function Ny(e,t){var o=e.length;e.push(t);e:for(;0<o;){var r=o-1>>>1,n=e[r];if(0<zm(n,t))e[r]=t,e[o]=n,o=r;else break e}}function dn(e){return e.length===0?null:e[0]}function Wm(e){if(e.length===0)return null;var t=e[0],o=e.pop();if(o!==t){e[0]=o;e:for(var r=0,n=e.length,a=n>>>1;r<a;){var i=2*(r+1)-1,s=e[i],l=i+1,u=e[l];if(0>zm(s,o))l<n&&0>zm(u,s)?(e[r]=u,e[l]=o,r=l):(e[r]=s,e[i]=o,r=i);else if(l<n&&0>zm(u,o))e[r]=u,e[l]=o,r=l;else break e}}return t}function zm(e,t){var o=e.sortIndex-t.sortIndex;return o!==0?o:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(xP=performance,Xe.unstable_now=function(){return xP.now()}):(Ey=Date,yP=Ey.now(),Xe.unstable_now=function(){return Ey.now()-yP});var xP,Ey,yP,Qn=[],yi=[],Bz=1,Er=null,uo=3,jm=!1,_s=!1,xd=!1,SP=typeof setTimeout=="function"?setTimeout:null,bP=typeof clearTimeout=="function"?clearTimeout:null,wP=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Oy(e){for(var t=dn(yi);t!==null;){if(t.callback===null)Wm(yi);else if(t.startTime<=e)Wm(yi),t.sortIndex=t.expirationTime,Ny(Qn,t);else break;t=dn(yi)}}function Fy(e){if(xd=!1,Oy(e),!_s)if(dn(Qn)!==null)_s=!0,Vy(_y);else{var t=dn(yi);t!==null&&By(Fy,t.startTime-e)}}function _y(e,t){_s=!1,xd&&(xd=!1,bP(yd),yd=-1),jm=!0;var o=uo;try{for(Oy(t),Er=dn(Qn);Er!==null&&(!(Er.expirationTime>t)||e&&!PP());){var r=Er.callback;if(typeof r=="function"){Er.callback=null,uo=Er.priorityLevel;var n=r(Er.expirationTime<=t);t=Xe.unstable_now(),typeof n=="function"?Er.callback=n:Er===dn(Qn)&&Wm(Qn),Oy(t)}else Wm(Qn);Er=dn(Qn)}if(Er!==null)var a=!0;else{var i=dn(yi);i!==null&&By(Fy,i.startTime-t),a=!1}return a}finally{Er=null,uo=o,jm=!1}}var qm=!1,Gm=null,yd=-1,RP=5,IP=-1;function PP(){return!(Xe.unstable_now()-IP<RP)}function Ay(){if(Gm!==null){var e=Xe.unstable_now();IP=e;var t=!0;try{t=Gm(!0,e)}finally{t?vd():(qm=!1,Gm=null)}}else qm=!1}var vd;typeof wP=="function"?vd=function(){wP(Ay)}:typeof MessageChannel<"u"?(Dy=new MessageChannel,CP=Dy.port2,Dy.port1.onmessage=Ay,vd=function(){CP.postMessage(null)}):vd=function(){SP(Ay,0)};var Dy,CP;function Vy(e){Gm=e,qm||(qm=!0,vd())}function By(e,t){yd=SP(function(){e(Xe.unstable_now())},t)}Xe.unstable_IdlePriority=5;Xe.unstable_ImmediatePriority=1;Xe.unstable_LowPriority=4;Xe.unstable_NormalPriority=3;Xe.unstable_Profiling=null;Xe.unstable_UserBlockingPriority=2;Xe.unstable_cancelCallback=function(e){e.callback=null};Xe.unstable_continueExecution=function(){_s||jm||(_s=!0,Vy(_y))};Xe.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"):RP=0<e?Math.floor(1e3/e):5};Xe.unstable_getCurrentPriorityLevel=function(){return uo};Xe.unstable_getFirstCallbackNode=function(){return dn(Qn)};Xe.unstable_next=function(e){switch(uo){case 1:case 2:case 3:var t=3;break;default:t=uo}var o=uo;uo=t;try{return e()}finally{uo=o}};Xe.unstable_pauseExecution=function(){};Xe.unstable_requestPaint=function(){};Xe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var o=uo;uo=e;try{return t()}finally{uo=o}};Xe.unstable_scheduleCallback=function(e,t,o){var r=Xe.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?r+o:r):o=r,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=o+n,e={id:Bz++,callback:t,priorityLevel:e,startTime:o,expirationTime:n,sortIndex:-1},o>r?(e.sortIndex=o,Ny(yi,e),dn(Qn)===null&&e===dn(yi)&&(xd?(bP(yd),yd=-1):xd=!0,By(Fy,o-r))):(e.sortIndex=n,Ny(Qn,e),_s||jm||(_s=!0,Vy(_y))),e};Xe.unstable_shouldYield=PP;Xe.unstable_wrapCallback=function(e){var t=uo;return function(){var o=uo;uo=t;try{return e.apply(this,arguments)}finally{uo=o}}}});var kP=tu((Ree,TP)=>{"use strict";TP.exports=LP()});var DT=tu(pr=>{"use strict";var Hz=M(),dr=kP();function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;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."}var FL=new Set,Ud={};function Ys(e,t){bu(e,t),bu(e+"Capture",t)}function bu(e,t){for(Ud[e]=t,e=0;e<t.length;e++)FL.add(t[e])}var Ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l0=Object.prototype.hasOwnProperty,Uz=/^[: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]*$/,MP={},EP={};function zz(e){return l0.call(EP,e)?!0:l0.call(MP,e)?!1:Uz.test(e)?EP[e]=!0:(MP[e]=!0,!1)}function Gz(e,t,o,r){if(o!==null&&o.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Wz(e,t,o,r){if(t===null||typeof t>"u"||Gz(e,t,o,r))return!0;if(r)return!1;if(o!==null)switch(o.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 Eo(e,t,o,r,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var ro={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ro[e]=new Eo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ro[t]=new Eo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ro[e]=new Eo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ro[e]=new Eo(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){ro[e]=new Eo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ro[e]=new Eo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ro[e]=new Eo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ro[e]=new Eo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ro[e]=new Eo(e,5,!1,e.toLowerCase(),null,!1,!1)});var ew=/[\-:]([a-z])/g;function tw(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(ew,tw);ro[t]=new Eo(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(ew,tw);ro[t]=new Eo(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(ew,tw);ro[t]=new Eo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ro[e]=new Eo(e,1,!1,e.toLowerCase(),null,!1,!1)});ro.xlinkHref=new Eo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ro[e]=new Eo(e,1,!1,e.toLowerCase(),null,!0,!0)});function ow(e,t,o,r){var n=ro.hasOwnProperty(t)?ro[t]:null;(n!==null?n.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Wz(t,o,n,r)&&(o=null),r||n===null?zz(t)&&(o===null?e.removeAttribute(t):e.setAttribute(t,""+o)):n.mustUseProperty?e[n.propertyName]=o===null?n.type===3?!1:"":o:(t=n.attributeName,r=n.attributeNamespace,o===null?e.removeAttribute(t):(n=n.type,o=n===3||n===4&&o===!0?"":""+o,r?e.setAttributeNS(r,t,o):e.setAttribute(t,o))))}var Aa=Hz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$m=Symbol.for("react.element"),au=Symbol.for("react.portal"),iu=Symbol.for("react.fragment"),rw=Symbol.for("react.strict_mode"),u0=Symbol.for("react.profiler"),_L=Symbol.for("react.provider"),VL=Symbol.for("react.context"),nw=Symbol.for("react.forward_ref"),c0=Symbol.for("react.suspense"),d0=Symbol.for("react.suspense_list"),aw=Symbol.for("react.memo"),Ci=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var BL=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var AP=Symbol.iterator;function wd(e){return e===null||typeof e!="object"?null:(e=AP&&e[AP]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,Hy;function Td(e){if(Hy===void 0)try{throw Error()}catch(o){var t=o.stack.trim().match(/\n( *(at )?)/);Hy=t&&t[1]||""}return`
5
+ `+Hy+e}var Uy=!1;function zy(e,t){if(!e||Uy)return"";Uy=!0;var o=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 r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var n=u.stack.split(`
6
+ `),a=r.stack.split(`
7
7
  `),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=`
8
- `+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{by=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Qc(e):""}function KU(e){switch(e.tag){case 5:return Qc(e.type);case 16:return Qc("Lazy");case 13:return Qc("Suspense");case 19:return Qc("SuspenseList");case 0:case 2:case 15:return e=Ry(e.type,!1),e;case 11:return e=Ry(e.type.render,!1),e;case 1:return e=Ry(e.type,!0),e;default:return""}}function Ky(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 Vl:return"Fragment";case _l:return"Portal";case qy:return"Profiler";case B0:return"StrictMode";case jy:return"Suspense";case $y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L1:return(e.displayName||"Context")+".Consumer";case I1:return(e._context.displayName||"Context")+".Provider";case H0: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:Ky(e.type)||"Memo";case ri:t=e._payload,e=e._init;try{return Ky(e(t))}catch{}}return null}function XU(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 Ky(t);case 8:return t===B0?"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 hi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function T1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function YU(e){var t=T1(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 Lm(e){e._valueTracker||(e._valueTracker=YU(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=T1(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function eg(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 Xy(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function CP(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=hi(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 M1(e,t){t=t.checked,t!=null&&V0(e,"checked",t,!1)}function Yy(e,t){M1(e,t);var r=hi(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")?Qy(e,t.type,r):t.hasOwnProperty("defaultValue")&&Qy(e,t.type,hi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function SP(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 Qy(e,t,r){(t!=="number"||eg(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Zc=Array.isArray;function Xl(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=""+hi(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 Zy(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bP(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(j(92));if(Zc(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:hi(r)}}function E1(e,t){var r=hi(t.value),o=hi(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 RP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function A1(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 Jy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?A1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Pm,D1=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(Pm=Pm||document.createElement("div"),Pm.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Pm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var td={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},QU=["Webkit","ms","Moz","O"];Object.keys(td).forEach(function(e){QU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),td[t]=td[e]})});function N1(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||td.hasOwnProperty(e)&&td[e]?(""+t).trim():t+"px"}function O1(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=N1(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var ZU=mt({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 e0(e,t){if(t){if(ZU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function t0(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 r0=null;function z0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var o0=null,Yl=null,Ql=null;function IP(e){if(e=kd(e)){if(typeof o0!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Tg(t),o0(e.stateNode,e.type,t))}}function F1(e){Yl?Ql?Ql.push(e):Ql=[e]:Yl=e}function _1(){if(Yl){var e=Yl,t=Ql;if(Ql=Yl=null,IP(e),t)for(e=0;e<t.length;e++)IP(t[e])}}function V1(e,t){return e(t)}function B1(){}var Iy=!1;function H1(e,t,r){if(Iy)return e(t,r);Iy=!0;try{return V1(e,t,r)}finally{Iy=!1,(Yl!==null||Ql!==null)&&(B1(),_1())}}function fd(e,t){var r=e.stateNode;if(r===null)return null;var o=Tg(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(j(231,t,typeof r));return r}var n0=!1;if(ma)try{Ol={},Object.defineProperty(Ol,"passive",{get:function(){n0=!0}}),window.addEventListener("test",Ol,Ol),window.removeEventListener("test",Ol,Ol)}catch{n0=!1}var Ol;function JU(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 rd=!1,tg=null,rg=!1,a0=null,e4={onError:function(e){rd=!0,tg=e}};function t4(e,t,r,o,n,a,i,s,l){rd=!1,tg=null,JU.apply(e4,arguments)}function r4(e,t,r,o,n,a,i,s,l){if(t4.apply(this,arguments),rd){if(rd){var u=tg;rd=!1,tg=null}else throw Error(j(198));rg||(rg=!0,a0=u)}}function Ls(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 U1(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 LP(e){if(Ls(e)!==e)throw Error(j(188))}function o4(e){var t=e.alternate;if(!t){if(t=Ls(e),t===null)throw Error(j(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 LP(n),e;if(a===o)return LP(n),t;a=a.sibling}throw Error(j(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(j(189))}}if(r.alternate!==o)throw Error(j(190))}if(r.tag!==3)throw Error(j(188));return r.stateNode.current===r?e:t}function z1(e){return e=o4(e),e!==null?G1(e):null}function G1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=G1(e);if(t!==null)return t;e=e.sibling}return null}var W1=ao.unstable_scheduleCallback,PP=ao.unstable_cancelCallback,n4=ao.unstable_shouldYield,a4=ao.unstable_requestPaint,bt=ao.unstable_now,i4=ao.unstable_getCurrentPriorityLevel,G0=ao.unstable_ImmediatePriority,q1=ao.unstable_UserBlockingPriority,og=ao.unstable_NormalPriority,s4=ao.unstable_LowPriority,j1=ao.unstable_IdlePriority,Rg=null,Bn=null;function l4(e){if(Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(Rg,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:d4,u4=Math.log,c4=Math.LN2;function d4(e){return e>>>=0,e===0?32:31-(u4(e)/c4|0)|0}var Tm=64,km=4194304;function Jc(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 ng(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=Jc(s):(a&=i,a!==0&&(o=Jc(a)))}else i=r&~n,i!==0?o=Jc(i):a!==0&&(o=Jc(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-tn(t),n=1<<r,o|=e[r],t&=~n;return o}function f4(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 p4(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-tn(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=f4(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function i0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $1(){var e=Tm;return Tm<<=1,!(Tm&4194240)&&(Tm=64),e}function Ly(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Pd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=r}function m4(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-tn(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function W0(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-tn(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var We=0;function K1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var X1,q0,Y1,Q1,Z1,s0=!1,Mm=[],li=null,ui=null,ci=null,pd=new Map,md=new Map,ni=[],g4="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 TP(e,t){switch(e){case"focusin":case"focusout":li=null;break;case"dragenter":case"dragleave":ui=null;break;case"mouseover":case"mouseout":ci=null;break;case"pointerover":case"pointerout":pd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":md.delete(t.pointerId)}}function Wc(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=kd(t),t!==null&&q0(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function h4(e,t,r,o,n){switch(t){case"focusin":return li=Wc(li,e,t,r,o,n),!0;case"dragenter":return ui=Wc(ui,e,t,r,o,n),!0;case"mouseover":return ci=Wc(ci,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return pd.set(a,Wc(pd.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,md.set(a,Wc(md.get(a)||null,e,t,r,o,n)),!0}return!1}function J1(e){var t=gs(e.target);if(t!==null){var r=Ls(t);if(r!==null){if(t=r.tag,t===13){if(t=U1(r),t!==null){e.blockedOn=t,Z1(e.priority,function(){Y1(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 Wm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=l0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);r0=o,r.target.dispatchEvent(o),r0=null}else return t=kd(r),t!==null&&q0(t),e.blockedOn=r,!1;t.shift()}return!0}function kP(e,t,r){Wm(e)&&r.delete(t)}function v4(){s0=!1,li!==null&&Wm(li)&&(li=null),ui!==null&&Wm(ui)&&(ui=null),ci!==null&&Wm(ci)&&(ci=null),pd.forEach(kP),md.forEach(kP)}function qc(e,t){e.blockedOn===t&&(e.blockedOn=null,s0||(s0=!0,ao.unstable_scheduleCallback(ao.unstable_NormalPriority,v4)))}function gd(e){function t(n){return qc(n,e)}if(0<Mm.length){qc(Mm[0],e);for(var r=1;r<Mm.length;r++){var o=Mm[r];o.blockedOn===e&&(o.blockedOn=null)}}for(li!==null&&qc(li,e),ui!==null&&qc(ui,e),ci!==null&&qc(ci,e),pd.forEach(t),md.forEach(t),r=0;r<ni.length;r++)o=ni[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<ni.length&&(r=ni[0],r.blockedOn===null);)J1(r),r.blockedOn===null&&ni.shift()}var Zl=xa.ReactCurrentBatchConfig,ag=!0;function x4(e,t,r,o){var n=We,a=Zl.transition;Zl.transition=null;try{We=1,j0(e,t,r,o)}finally{We=n,Zl.transition=a}}function y4(e,t,r,o){var n=We,a=Zl.transition;Zl.transition=null;try{We=4,j0(e,t,r,o)}finally{We=n,Zl.transition=a}}function j0(e,t,r,o){if(ag){var n=l0(e,t,r,o);if(n===null)Dy(e,t,o,ig,r),TP(e,o);else if(h4(n,e,t,r,o))o.stopPropagation();else if(TP(e,o),t&4&&-1<g4.indexOf(e)){for(;n!==null;){var a=kd(n);if(a!==null&&X1(a),a=l0(e,t,r,o),a===null&&Dy(e,t,o,ig,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else Dy(e,t,o,null,r)}}var ig=null;function l0(e,t,r,o){if(ig=null,e=z0(o),e=gs(e),e!==null)if(t=Ls(e),t===null)e=null;else if(r=t.tag,r===13){if(e=U1(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 ig=e,null}function eT(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(i4()){case G0:return 1;case q1:return 4;case og:case s4:return 16;case j1:return 536870912;default:return 16}default:return 16}}var ii=null,$0=null,qm=null;function tT(){if(qm)return qm;var e,t=$0,r=t.length,o,n="value"in ii?ii.value:ii.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 qm=n.slice(e,1<o?1-o:void 0)}function jm(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 Em(){return!0}function MP(){return!1}function io(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)?Em:MP,this.isPropagationStopped=MP,this}return mt(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=Em)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Em)},persist:function(){},isPersistent:Em}),t}var lu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},K0=io(lu),Td=mt({},lu,{view:0,detail:0}),w4=io(Td),Py,Ty,jc,Ig=mt({},Td,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:X0,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!==jc&&(jc&&e.type==="mousemove"?(Py=e.screenX-jc.screenX,Ty=e.screenY-jc.screenY):Ty=Py=0,jc=e),Py)},movementY:function(e){return"movementY"in e?e.movementY:Ty}}),EP=io(Ig),C4=mt({},Ig,{dataTransfer:0}),S4=io(C4),b4=mt({},Td,{relatedTarget:0}),ky=io(b4),R4=mt({},lu,{animationName:0,elapsedTime:0,pseudoElement:0}),I4=io(R4),L4=mt({},lu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),P4=io(L4),T4=mt({},lu,{data:0}),AP=io(T4),k4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M4={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"},E4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function A4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=E4[e])?!!t[e]:!1}function X0(){return A4}var D4=mt({},Td,{key:function(e){if(e.key){var t=k4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=jm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?M4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:X0,charCode:function(e){return e.type==="keypress"?jm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?jm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),N4=io(D4),O4=mt({},Ig,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DP=io(O4),F4=mt({},Td,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:X0}),_4=io(F4),V4=mt({},lu,{propertyName:0,elapsedTime:0,pseudoElement:0}),B4=io(V4),H4=mt({},Ig,{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}),U4=io(H4),z4=[9,13,27,32],Y0=ma&&"CompositionEvent"in window,od=null;ma&&"documentMode"in document&&(od=document.documentMode);var G4=ma&&"TextEvent"in window&&!od,rT=ma&&(!Y0||od&&8<od&&11>=od),NP=String.fromCharCode(32),OP=!1;function oT(e,t){switch(e){case"keyup":return z4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bl=!1;function W4(e,t){switch(e){case"compositionend":return nT(t);case"keypress":return t.which!==32?null:(OP=!0,NP);case"textInput":return e=t.data,e===NP&&OP?null:e;default:return null}}function q4(e,t){if(Bl)return e==="compositionend"||!Y0&&oT(e,t)?(e=tT(),qm=$0=ii=null,Bl=!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 rT&&t.locale!=="ko"?null:t.data;default:return null}}var j4={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 FP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!j4[e.type]:t==="textarea"}function aT(e,t,r,o){F1(o),t=sg(t,"onChange"),0<t.length&&(r=new K0("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var nd=null,hd=null;function $4(e){hT(e,0)}function Lg(e){var t=zl(e);if(k1(t))return e}function K4(e,t){if(e==="change")return t}var iT=!1;ma&&(ma?(Dm="oninput"in document,Dm||(My=document.createElement("div"),My.setAttribute("oninput","return;"),Dm=typeof My.oninput=="function"),Am=Dm):Am=!1,iT=Am&&(!document.documentMode||9<document.documentMode));var Am,Dm,My;function _P(){nd&&(nd.detachEvent("onpropertychange",sT),hd=nd=null)}function sT(e){if(e.propertyName==="value"&&Lg(hd)){var t=[];aT(t,hd,e,z0(e)),H1($4,t)}}function X4(e,t,r){e==="focusin"?(_P(),nd=t,hd=r,nd.attachEvent("onpropertychange",sT)):e==="focusout"&&_P()}function Y4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lg(hd)}function Q4(e,t){if(e==="click")return Lg(t)}function Z4(e,t){if(e==="input"||e==="change")return Lg(t)}function J4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:J4;function vd(e,t){if(on(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(!Wy.call(t,n)||!on(e[n],t[n]))return!1}return!0}function VP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function BP(e,t){var r=VP(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=VP(r)}}function lT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uT(){for(var e=window,t=eg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=eg(e.document)}return t}function Q0(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 ez(e){var t=uT(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&lT(r.ownerDocument.documentElement,r)){if(o!==null&&Q0(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=BP(r,a);var i=BP(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 tz=ma&&"documentMode"in document&&11>=document.documentMode,Hl=null,u0=null,ad=null,c0=!1;function HP(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;c0||Hl==null||Hl!==eg(o)||(o=Hl,"selectionStart"in o&&Q0(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}),ad&&vd(ad,o)||(ad=o,o=sg(u0,"onSelect"),0<o.length&&(t=new K0("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Hl)))}function Nm(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ul={animationend:Nm("Animation","AnimationEnd"),animationiteration:Nm("Animation","AnimationIteration"),animationstart:Nm("Animation","AnimationStart"),transitionend:Nm("Transition","TransitionEnd")},Ey={},cT={};ma&&(cT=document.createElement("div").style,"AnimationEvent"in window||(delete Ul.animationend.animation,delete Ul.animationiteration.animation,delete Ul.animationstart.animation),"TransitionEvent"in window||delete Ul.transitionend.transition);function Pg(e){if(Ey[e])return Ey[e];if(!Ul[e])return e;var t=Ul[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in cT)return Ey[e]=t[r];return e}var dT=Pg("animationend"),fT=Pg("animationiteration"),pT=Pg("animationstart"),mT=Pg("transitionend"),gT=new Map,UP="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 xi(e,t){gT.set(e,t),Is(t,[e])}for(Om=0;Om<UP.length;Om++)Fm=UP[Om],zP=Fm.toLowerCase(),GP=Fm[0].toUpperCase()+Fm.slice(1),xi(zP,"on"+GP);var Fm,zP,GP,Om;xi(dT,"onAnimationEnd");xi(fT,"onAnimationIteration");xi(pT,"onAnimationStart");xi("dblclick","onDoubleClick");xi("focusin","onFocus");xi("focusout","onBlur");xi(mT,"onTransitionEnd");tu("onMouseEnter",["mouseout","mouseover"]);tu("onMouseLeave",["mouseout","mouseover"]);tu("onPointerEnter",["pointerout","pointerover"]);tu("onPointerLeave",["pointerout","pointerover"]);Is("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Is("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Is("onBeforeInput",["compositionend","keypress","textInput","paste"]);Is("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Is("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Is("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ed="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(" "),rz=new Set("cancel close invalid load scroll toggle".split(" ").concat(ed));function WP(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,r4(o,t,void 0,e),e.currentTarget=null}function hT(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;WP(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;WP(n,s,u),a=l}}}if(rg)throw e=a0,rg=!1,a0=null,e}function tt(e,t){var r=t[g0];r===void 0&&(r=t[g0]=new Set);var o=e+"__bubble";r.has(o)||(vT(t,e,2,!1),r.add(o))}function Ay(e,t,r){var o=0;t&&(o|=4),vT(r,e,o,t)}var _m="_reactListening"+Math.random().toString(36).slice(2);function xd(e){if(!e[_m]){e[_m]=!0,R1.forEach(function(r){r!=="selectionchange"&&(rz.has(r)||Ay(r,!1,e),Ay(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_m]||(t[_m]=!0,Ay("selectionchange",!1,t))}}function vT(e,t,r,o){switch(eT(t)){case 1:var n=x4;break;case 4:n=y4;break;default:n=j0}r=n.bind(null,t,r,e),n=void 0,!n0||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 Dy(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=gs(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}H1(function(){var u=a,c=z0(r),d=[];e:{var f=gT.get(e);if(f!==void 0){var p=K0,m=e;switch(e){case"keypress":if(jm(r)===0)break e;case"keydown":case"keyup":p=N4;break;case"focusin":m="focus",p=ky;break;case"focusout":m="blur",p=ky;break;case"beforeblur":case"afterblur":p=ky;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=EP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=S4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=_4;break;case dT:case fT:case pT:p=I4;break;case mT:p=B4;break;case"scroll":p=w4;break;case"wheel":p=U4;break;case"copy":case"cut":case"paste":p=P4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=DP}var g=(t&4)!==0,y=!g&&e==="scroll",h=g?f!==null?f+"Capture":null:f;g=[];for(var v=u,x;v!==null;){x=v;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,h!==null&&(w=fd(v,h),w!=null&&g.push(yd(v,w,x)))),y)break;v=v.return}0<g.length&&(f=new p(f,m,null,r,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==r0&&(m=r.relatedTarget||r.fromElement)&&(gs(m)||m[ga]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=u,m=m?gs(m):null,m!==null&&(y=Ls(m),m!==y||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=EP,w="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=DP,w="onPointerLeave",h="onPointerEnter",v="pointer"),y=p==null?f:zl(p),x=m==null?f:zl(m),f=new g(w,v+"leave",p,r,c),f.target=y,f.relatedTarget=x,w=null,gs(c)===u&&(g=new g(h,v+"enter",m,r,c),g.target=x,g.relatedTarget=y,w=g),y=w,p&&m)t:{for(g=p,h=m,v=0,x=g;x;x=Fl(x))v++;for(x=0,w=h;w;w=Fl(w))x++;for(;0<v-x;)g=Fl(g),v--;for(;0<x-v;)h=Fl(h),x--;for(;v--;){if(g===h||h!==null&&g===h.alternate)break t;g=Fl(g),h=Fl(h)}g=null}else g=null;p!==null&&qP(d,f,p,g,!1),m!==null&&y!==null&&qP(d,y,m,g,!0)}}e:{if(f=u?zl(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=K4;else if(FP(f))if(iT)C=Z4;else{C=Y4;var b=X4}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=Q4);if(C&&(C=C(e,u))){aT(d,C,r,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Qy(f,"number",f.value)}switch(b=u?zl(u):window,e){case"focusin":(FP(b)||b.contentEditable==="true")&&(Hl=b,u0=u,ad=null);break;case"focusout":ad=u0=Hl=null;break;case"mousedown":c0=!0;break;case"contextmenu":case"mouseup":case"dragend":c0=!1,HP(d,r,c);break;case"selectionchange":if(tz)break;case"keydown":case"keyup":HP(d,r,c)}var S;if(Y0)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else Bl?oT(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(rT&&r.locale!=="ko"&&(Bl||I!=="onCompositionStart"?I==="onCompositionEnd"&&Bl&&(S=tT()):(ii=c,$0="value"in ii?ii.value:ii.textContent,Bl=!0)),b=sg(u,I),0<b.length&&(I=new AP(I,e,null,r,c),d.push({event:I,listeners:b}),S?I.data=S:(S=nT(r),S!==null&&(I.data=S)))),(S=G4?W4(e,r):q4(e,r))&&(u=sg(u,"onBeforeInput"),0<u.length&&(c=new AP("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}hT(d,t)})}function yd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function sg(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=fd(e,r),a!=null&&o.unshift(yd(e,a,n)),a=fd(e,t),a!=null&&o.push(yd(e,a,n))),e=e.return}return o}function Fl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function qP(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=fd(r,a),l!=null&&i.unshift(yd(r,l,s))):n||(l=fd(r,a),l!=null&&i.push(yd(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var oz=/\r\n?/g,nz=/\u0000|\uFFFD/g;function jP(e){return(typeof e=="string"?e:""+e).replace(oz,`
9
- `).replace(nz,"")}function Vm(e,t,r){if(t=jP(t),jP(e)!==t&&r)throw Error(j(425))}function lg(){}var d0=null,f0=null;function p0(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 m0=typeof setTimeout=="function"?setTimeout:void 0,az=typeof clearTimeout=="function"?clearTimeout:void 0,$P=typeof Promise=="function"?Promise:void 0,iz=typeof queueMicrotask=="function"?queueMicrotask:typeof $P<"u"?function(e){return $P.resolve(null).then(e).catch(sz)}:m0;function sz(e){setTimeout(function(){throw e})}function Ny(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),gd(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);gd(t)}function di(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 KP(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 uu=Math.random().toString(36).slice(2),Vn="__reactFiber$"+uu,wd="__reactProps$"+uu,ga="__reactContainer$"+uu,g0="__reactEvents$"+uu,lz="__reactListeners$"+uu,uz="__reactHandles$"+uu;function gs(e){var t=e[Vn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ga]||r[Vn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=KP(e);e!==null;){if(r=e[Vn])return r;e=KP(e)}return t}e=r,r=e.parentNode}return null}function kd(e){return e=e[Vn]||e[ga],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Tg(e){return e[wd]||null}var h0=[],Gl=-1;function yi(e){return{current:e}}function rt(e){0>Gl||(e.current=h0[Gl],h0[Gl]=null,Gl--)}function Qe(e,t){Gl++,h0[Gl]=e.current,e.current=t}var vi={},cr=yi(vi),Hr=yi(!1),ws=vi;function ru(e,t){var r=e.type.contextTypes;if(!r)return vi;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 ug(){rt(Hr),rt(cr)}function XP(e,t,r){if(cr.current!==vi)throw Error(j(168));Qe(cr,t),Qe(Hr,r)}function xT(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(j(108,XU(e)||"Unknown",n));return mt({},r,o)}function cg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vi,ws=cr.current,Qe(cr,e),Qe(Hr,Hr.current),!0}function YP(e,t,r){var o=e.stateNode;if(!o)throw Error(j(169));r?(e=xT(e,t,ws),o.__reactInternalMemoizedMergedChildContext=e,rt(Hr),rt(cr),Qe(cr,e)):rt(Hr),Qe(Hr,r)}var ca=null,kg=!1,Oy=!1;function yT(e){ca===null?ca=[e]:ca.push(e)}function cz(e){kg=!0,yT(e)}function wi(){if(!Oy&&ca!==null){Oy=!0;var e=0,t=We;try{var r=ca;for(We=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}ca=null,kg=!1}catch(n){throw ca!==null&&(ca=ca.slice(e+1)),W1(G0,wi),n}finally{We=t,Oy=!1}}return null}var Wl=[],ql=0,dg=null,fg=0,Lo=[],Po=0,Cs=null,da=1,fa="";function ps(e,t){Wl[ql++]=fg,Wl[ql++]=dg,dg=e,fg=t}function wT(e,t,r){Lo[Po++]=da,Lo[Po++]=fa,Lo[Po++]=Cs,Cs=e;var o=da;e=fa;var n=32-tn(o)-1;o&=~(1<<n),r+=1;var a=32-tn(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,da=1<<32-tn(t)+n|r<<n|o,fa=a+e}else da=1<<a|r<<n|o,fa=e}function Z0(e){e.return!==null&&(ps(e,1),wT(e,1,0))}function J0(e){for(;e===dg;)dg=Wl[--ql],Wl[ql]=null,fg=Wl[--ql],Wl[ql]=null;for(;e===Cs;)Cs=Lo[--Po],Lo[Po]=null,fa=Lo[--Po],Lo[Po]=null,da=Lo[--Po],Lo[Po]=null}var no=null,oo=null,st=!1,en=null;function CT(e,t){var r=To(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 QP(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,no=e,oo=di(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,no=e,oo=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Cs!==null?{id:da,overflow:fa}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=To(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,no=e,oo=null,!0):!1;default:return!1}}function v0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function x0(e){if(st){var t=oo;if(t){var r=t;if(!QP(e,t)){if(v0(e))throw Error(j(418));t=di(r.nextSibling);var o=no;t&&QP(e,t)?CT(o,r):(e.flags=e.flags&-4097|2,st=!1,no=e)}}else{if(v0(e))throw Error(j(418));e.flags=e.flags&-4097|2,st=!1,no=e}}}function ZP(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;no=e}function Bm(e){if(e!==no)return!1;if(!st)return ZP(e),st=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!p0(e.type,e.memoizedProps)),t&&(t=oo)){if(v0(e))throw ST(),Error(j(418));for(;t;)CT(e,t),t=di(t.nextSibling)}if(ZP(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){oo=di(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}oo=null}}else oo=no?di(e.stateNode.nextSibling):null;return!0}function ST(){for(var e=oo;e;)e=di(e.nextSibling)}function ou(){oo=no=null,st=!1}function ew(e){en===null?en=[e]:en.push(e)}var dz=xa.ReactCurrentBatchConfig;function $c(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(j(309));var o=r.stateNode}if(!o)throw Error(j(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(j(284));if(!r._owner)throw Error(j(290,e))}return e}function Hm(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function JP(e){var t=e._init;return t(e._payload)}function bT(e){function t(h,v){if(e){var x=h.deletions;x===null?(h.deletions=[v],h.flags|=16):x.push(v)}}function r(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function o(h,v){for(h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function n(h,v){return h=gi(h,v),h.index=0,h.sibling=null,h}function a(h,v,x){return h.index=x,e?(x=h.alternate,x!==null?(x=x.index,x<v?(h.flags|=2,v):x):(h.flags|=2,v)):(h.flags|=1048576,v)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,v,x,w){return v===null||v.tag!==6?(v=zy(x,h.mode,w),v.return=h,v):(v=n(v,x),v.return=h,v)}function l(h,v,x,w){var C=x.type;return C===Vl?c(h,v,x.props.children,w,x.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ri&&JP(C)===v.type)?(w=n(v,x.props),w.ref=$c(h,v,x),w.return=h,w):(w=Jm(x.type,x.key,x.props,null,h.mode,w),w.ref=$c(h,v,x),w.return=h,w)}function u(h,v,x,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==x.containerInfo||v.stateNode.implementation!==x.implementation?(v=Gy(x,h.mode,w),v.return=h,v):(v=n(v,x.children||[]),v.return=h,v)}function c(h,v,x,w,C){return v===null||v.tag!==7?(v=ys(x,h.mode,w,C),v.return=h,v):(v=n(v,x),v.return=h,v)}function d(h,v,x){if(typeof v=="string"&&v!==""||typeof v=="number")return v=zy(""+v,h.mode,x),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Im:return x=Jm(v.type,v.key,v.props,null,h.mode,x),x.ref=$c(h,null,v),x.return=h,x;case _l:return v=Gy(v,h.mode,x),v.return=h,v;case ri:var w=v._init;return d(h,w(v._payload),x)}if(Zc(v)||Gc(v))return v=ys(v,h.mode,x,null),v.return=h,v;Hm(h,v)}return null}function f(h,v,x,w){var C=v!==null?v.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:s(h,v,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Im:return x.key===C?l(h,v,x,w):null;case _l:return x.key===C?u(h,v,x,w):null;case ri:return C=x._init,f(h,v,C(x._payload),w)}if(Zc(x)||Gc(x))return C!==null?null:c(h,v,x,w,null);Hm(h,x)}return null}function p(h,v,x,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return h=h.get(x)||null,s(v,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Im:return h=h.get(w.key===null?x:w.key)||null,l(v,h,w,C);case _l:return h=h.get(w.key===null?x:w.key)||null,u(v,h,w,C);case ri:var b=w._init;return p(h,v,x,b(w._payload),C)}if(Zc(w)||Gc(w))return h=h.get(x)||null,c(v,h,w,C,null);Hm(v,w)}return null}function m(h,v,x,w){for(var C=null,b=null,S=v,I=v=0,T=null;S!==null&&I<x.length;I++){S.index>I?(T=S,S=null):T=S.sibling;var P=f(h,S,x[I],w);if(P===null){S===null&&(S=T);break}e&&S&&P.alternate===null&&t(h,S),v=a(P,v,I),b===null?C=P:b.sibling=P,b=P,S=T}if(I===x.length)return r(h,S),st&&ps(h,I),C;if(S===null){for(;I<x.length;I++)S=d(h,x[I],w),S!==null&&(v=a(S,v,I),b===null?C=S:b.sibling=S,b=S);return st&&ps(h,I),C}for(S=o(h,S);I<x.length;I++)T=p(S,h,I,x[I],w),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?I:T.key),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return e&&S.forEach(function(M){return t(h,M)}),st&&ps(h,I),C}function g(h,v,x,w){var C=Gc(x);if(typeof C!="function")throw Error(j(150));if(x=C.call(x),x==null)throw Error(j(151));for(var b=C=null,S=v,I=v=0,T=null,P=x.next();S!==null&&!P.done;I++,P=x.next()){S.index>I?(T=S,S=null):T=S.sibling;var M=f(h,S,P.value,w);if(M===null){S===null&&(S=T);break}e&&S&&M.alternate===null&&t(h,S),v=a(M,v,I),b===null?C=M:b.sibling=M,b=M,S=T}if(P.done)return r(h,S),st&&ps(h,I),C;if(S===null){for(;!P.done;I++,P=x.next())P=d(h,P.value,w),P!==null&&(v=a(P,v,I),b===null?C=P:b.sibling=P,b=P);return st&&ps(h,I),C}for(S=o(h,S);!P.done;I++,P=x.next())P=p(S,h,I,P.value,w),P!==null&&(e&&P.alternate!==null&&S.delete(P.key===null?I:P.key),v=a(P,v,I),b===null?C=P:b.sibling=P,b=P);return e&&S.forEach(function(A){return t(h,A)}),st&&ps(h,I),C}function y(h,v,x,w){if(typeof x=="object"&&x!==null&&x.type===Vl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Im:e:{for(var C=x.key,b=v;b!==null;){if(b.key===C){if(C=x.type,C===Vl){if(b.tag===7){r(h,b.sibling),v=n(b,x.props.children),v.return=h,h=v;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ri&&JP(C)===b.type){r(h,b.sibling),v=n(b,x.props),v.ref=$c(h,b,x),v.return=h,h=v;break e}r(h,b);break}else t(h,b);b=b.sibling}x.type===Vl?(v=ys(x.props.children,h.mode,w,x.key),v.return=h,h=v):(w=Jm(x.type,x.key,x.props,null,h.mode,w),w.ref=$c(h,v,x),w.return=h,h=w)}return i(h);case _l:e:{for(b=x.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){r(h,v.sibling),v=n(v,x.children||[]),v.return=h,h=v;break e}else{r(h,v);break}else t(h,v);v=v.sibling}v=Gy(x,h.mode,w),v.return=h,h=v}return i(h);case ri:return b=x._init,y(h,v,b(x._payload),w)}if(Zc(x))return m(h,v,x,w);if(Gc(x))return g(h,v,x,w);Hm(h,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(r(h,v.sibling),v=n(v,x),v.return=h,h=v):(r(h,v),v=zy(x,h.mode,w),v.return=h,h=v),i(h)):r(h,v)}return y}var nu=bT(!0),RT=bT(!1),pg=yi(null),mg=null,jl=null,tw=null;function rw(){tw=jl=mg=null}function ow(e){var t=pg.current;rt(pg),e._currentValue=t}function y0(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 Jl(e,t){mg=e,tw=jl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Br=!0),e.firstContext=null)}function Mo(e){var t=e._currentValue;if(tw!==e)if(e={context:e,memoizedValue:t,next:null},jl===null){if(mg===null)throw Error(j(308));jl=e,mg.dependencies={lanes:0,firstContext:e}}else jl=jl.next=e;return t}var hs=null;function nw(e){hs===null?hs=[e]:hs.push(e)}function IT(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,nw(t)):(r.next=n.next,n.next=r),t.interleaved=r,ha(e,o)}function ha(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 oi=!1;function aw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function LT(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 pa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fi(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,Ae&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,ha(e,r)}return n=o.interleaved,n===null?(t.next=t,nw(o)):(t.next=n.next,n.next=t),o.interleaved=t,ha(e,r)}function $m(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,W0(e,r)}}function e1(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 gg(e,t,r,o){var n=e.updateQueue;oi=!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 m=e,g=s;switch(f=t,p=r,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=mt({},d,f);break e;case 2:oi=!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);bs|=i,e.lanes=i,e.memoizedState=d}}function t1(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(j(191,n));n.call(o)}}}var Md={},Hn=yi(Md),Cd=yi(Md),Sd=yi(Md);function vs(e){if(e===Md)throw Error(j(174));return e}function iw(e,t){switch(Qe(Sd,t),Qe(Cd,e),Qe(Hn,Md),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jy(t,e)}rt(Hn),Qe(Hn,t)}function au(){rt(Hn),rt(Cd),rt(Sd)}function PT(e){vs(Sd.current);var t=vs(Hn.current),r=Jy(t,e.type);t!==r&&(Qe(Cd,e),Qe(Hn,r))}function sw(e){Cd.current===e&&(rt(Hn),rt(Cd))}var ft=yi(0);function hg(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 Fy=[];function lw(){for(var e=0;e<Fy.length;e++)Fy[e]._workInProgressVersionPrimary=null;Fy.length=0}var Km=xa.ReactCurrentDispatcher,_y=xa.ReactCurrentBatchConfig,Ss=0,pt=null,At=null,zt=null,vg=!1,id=!1,bd=0,fz=0;function sr(){throw Error(j(321))}function uw(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!on(e[r],t[r]))return!1;return!0}function cw(e,t,r,o,n,a){if(Ss=a,pt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Km.current=e===null||e.memoizedState===null?hz:vz,e=r(o,n),id){a=0;do{if(id=!1,bd=0,25<=a)throw Error(j(301));a+=1,zt=At=null,t.updateQueue=null,Km.current=xz,e=r(o,n)}while(id)}if(Km.current=xg,t=At!==null&&At.next!==null,Ss=0,zt=At=pt=null,vg=!1,t)throw Error(j(300));return e}function dw(){var e=bd!==0;return bd=0,e}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?pt.memoizedState=zt=e:zt=zt.next=e,zt}function Eo(){if(At===null){var e=pt.alternate;e=e!==null?e.memoizedState:null}else e=At.next;var t=zt===null?pt.memoizedState:zt.next;if(t!==null)zt=t,At=e;else{if(e===null)throw Error(j(310));At=e,e={memoizedState:At.memoizedState,baseState:At.baseState,baseQueue:At.baseQueue,queue:At.queue,next:null},zt===null?pt.memoizedState=zt=e:zt=zt.next=e}return zt}function Rd(e,t){return typeof t=="function"?t(e):t}function Vy(e){var t=Eo(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var o=At,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((Ss&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,pt.lanes|=c,bs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,on(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,pt.lanes|=a,bs|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function By(e){var t=Eo(),r=t.queue;if(r===null)throw Error(j(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);on(a,t.memoizedState)||(Br=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function TT(){}function kT(e,t){var r=pt,o=Eo(),n=t(),a=!on(o.memoizedState,n);if(a&&(o.memoizedState=n,Br=!0),o=o.queue,fw(AT.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||zt!==null&&zt.memoizedState.tag&1){if(r.flags|=2048,Id(9,ET.bind(null,r,o,n,t),void 0,null),Gt===null)throw Error(j(349));Ss&30||MT(r,t,n)}return n}function MT(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=pt.updateQueue,t===null?(t={lastEffect:null,stores:null},pt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ET(e,t,r,o){t.value=r,t.getSnapshot=o,DT(t)&&NT(e)}function AT(e,t,r){return r(function(){DT(t)&&NT(e)})}function DT(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!on(e,r)}catch{return!0}}function NT(e){var t=ha(e,1);t!==null&&rn(t,e,1,-1)}function r1(e){var t=_n();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rd,lastRenderedState:e},t.queue=e,e=e.dispatch=gz.bind(null,pt,e),[t.memoizedState,e]}function Id(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=pt.updateQueue,t===null?(t={lastEffect:null,stores:null},pt.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 OT(){return Eo().memoizedState}function Xm(e,t,r,o){var n=_n();pt.flags|=e,n.memoizedState=Id(1|t,r,void 0,o===void 0?null:o)}function Mg(e,t,r,o){var n=Eo();o=o===void 0?null:o;var a=void 0;if(At!==null){var i=At.memoizedState;if(a=i.destroy,o!==null&&uw(o,i.deps)){n.memoizedState=Id(t,r,a,o);return}}pt.flags|=e,n.memoizedState=Id(1|t,r,a,o)}function o1(e,t){return Xm(8390656,8,e,t)}function fw(e,t){return Mg(2048,8,e,t)}function FT(e,t){return Mg(4,2,e,t)}function _T(e,t){return Mg(4,4,e,t)}function VT(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 BT(e,t,r){return r=r!=null?r.concat([e]):null,Mg(4,4,VT.bind(null,t,e),r)}function pw(){}function HT(e,t){var r=Eo();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&uw(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function UT(e,t){var r=Eo();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&uw(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function zT(e,t,r){return Ss&21?(on(r,t)||(r=$1(),pt.lanes|=r,bs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Br=!0),e.memoizedState=r)}function pz(e,t){var r=We;We=r!==0&&4>r?r:4,e(!0);var o=_y.transition;_y.transition={};try{e(!1),t()}finally{We=r,_y.transition=o}}function GT(){return Eo().memoizedState}function mz(e,t,r){var o=mi(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},WT(e))qT(t,r);else if(r=IT(e,t,r,o),r!==null){var n=Pr();rn(r,e,o,n),jT(r,t,o)}}function gz(e,t,r){var o=mi(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(WT(e))qT(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,on(s,i)){var l=t.interleaved;l===null?(n.next=n,nw(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=IT(e,t,n,o),r!==null&&(n=Pr(),rn(r,e,o,n),jT(r,t,o))}}function WT(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function qT(e,t){id=vg=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function jT(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,W0(e,r)}}var xg={readContext:Mo,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},hz={readContext:Mo,useCallback:function(e,t){return _n().memoizedState=[e,t===void 0?null:t],e},useContext:Mo,useEffect:o1,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Xm(4194308,4,VT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Xm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xm(4,2,e,t)},useMemo:function(e,t){var r=_n();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=_n();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=mz.bind(null,pt,e),[o.memoizedState,e]},useRef:function(e){var t=_n();return e={current:e},t.memoizedState=e},useState:r1,useDebugValue:pw,useDeferredValue:function(e){return _n().memoizedState=e},useTransition:function(){var e=r1(!1),t=e[0];return e=pz.bind(null,e[1]),_n().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=pt,n=_n();if(st){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),Gt===null)throw Error(j(349));Ss&30||MT(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,o1(AT.bind(null,o,a,e),[e]),o.flags|=2048,Id(9,ET.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=_n(),t=Gt.identifierPrefix;if(st){var r=fa,o=da;r=(o&~(1<<32-tn(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=bd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=fz++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vz={readContext:Mo,useCallback:HT,useContext:Mo,useEffect:fw,useImperativeHandle:BT,useInsertionEffect:FT,useLayoutEffect:_T,useMemo:UT,useReducer:Vy,useRef:OT,useState:function(){return Vy(Rd)},useDebugValue:pw,useDeferredValue:function(e){var t=Eo();return zT(t,At.memoizedState,e)},useTransition:function(){var e=Vy(Rd)[0],t=Eo().memoizedState;return[e,t]},useMutableSource:TT,useSyncExternalStore:kT,useId:GT,unstable_isNewReconciler:!1},xz={readContext:Mo,useCallback:HT,useContext:Mo,useEffect:fw,useImperativeHandle:BT,useInsertionEffect:FT,useLayoutEffect:_T,useMemo:UT,useReducer:By,useRef:OT,useState:function(){return By(Rd)},useDebugValue:pw,useDeferredValue:function(e){var t=Eo();return At===null?t.memoizedState=e:zT(t,At.memoizedState,e)},useTransition:function(){var e=By(Rd)[0],t=Eo().memoizedState;return[e,t]},useMutableSource:TT,useSyncExternalStore:kT,useId:GT,unstable_isNewReconciler:!1};function Zo(e,t){if(e&&e.defaultProps){t=mt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function w0(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:mt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Eg={isMounted:function(e){return(e=e._reactInternals)?Ls(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Pr(),n=mi(e),a=pa(o,n);a.payload=t,r!=null&&(a.callback=r),t=fi(e,a,n),t!==null&&(rn(t,e,n,o),$m(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Pr(),n=mi(e),a=pa(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=fi(e,a,n),t!==null&&(rn(t,e,n,o),$m(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Pr(),o=mi(e),n=pa(r,o);n.tag=2,t!=null&&(n.callback=t),t=fi(e,n,o),t!==null&&(rn(t,e,o,r),$m(t,e,o))}};function n1(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?!vd(r,o)||!vd(n,a):!0}function $T(e,t,r){var o=!1,n=vi,a=t.contextType;return typeof a=="object"&&a!==null?a=Mo(a):(n=Ur(t)?ws:cr.current,o=t.contextTypes,a=(o=o!=null)?ru(e,n):vi),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Eg,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function a1(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&&Eg.enqueueReplaceState(t,t.state,null)}function C0(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},aw(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Mo(a):(a=Ur(t)?ws:cr.current,n.context=ru(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(w0(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&&Eg.enqueueReplaceState(n,n.state,null),gg(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function iu(e,t){try{var r="",o=t;do r+=KU(o),o=o.return;while(o);var n=r}catch(a){n=`
8
+ `+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{Uy=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Td(e):""}function jz(e){switch(e.tag){case 5:return Td(e.type);case 16:return Td("Lazy");case 13:return Td("Suspense");case 19:return Td("SuspenseList");case 0:case 2:case 15:return e=zy(e.type,!1),e;case 11:return e=zy(e.type.render,!1),e;case 1:return e=zy(e.type,!0),e;default:return""}}function f0(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 iu:return"Fragment";case au:return"Portal";case u0:return"Profiler";case rw:return"StrictMode";case c0:return"Suspense";case d0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VL:return(e.displayName||"Context")+".Consumer";case _L:return(e._context.displayName||"Context")+".Provider";case nw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case aw:return t=e.displayName||null,t!==null?t:f0(e.type)||"Memo";case Ci:t=e._payload,e=e._init;try{return f0(e(t))}catch{}}return null}function qz(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 f0(t);case 8:return t===rw?"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 Oi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function HL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $z(e){var t=HL(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var n=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Km(e){e._valueTracker||(e._valueTracker=$z(e))}function UL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),r="";return e&&(r=HL(e)?e.checked?"true":"false":e.value),e=r,e!==o?(t.setValue(e),!0):!1}function Sg(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 p0(e,t){var o=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function DP(e,t){var o=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;o=Oi(t.value!=null?t.value:o),e._wrapperState={initialChecked:r,initialValue:o,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zL(e,t){t=t.checked,t!=null&&ow(e,"checked",t,!1)}function m0(e,t){zL(e,t);var o=Oi(t.value),r=t.type;if(o!=null)r==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?g0(e,t.type,o):t.hasOwnProperty("defaultValue")&&g0(e,t.type,Oi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function NP(e,t,o){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,o||t===e.value||(e.value=t),e.defaultValue=t}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function g0(e,t,o){(t!=="number"||Sg(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var kd=Array.isArray;function vu(e,t,o,r){if(e=e.options,t){t={};for(var n=0;n<o.length;n++)t["$"+o[n]]=!0;for(o=0;o<e.length;o++)n=t.hasOwnProperty("$"+e[o].value),e[o].selected!==n&&(e[o].selected=n),n&&r&&(e[o].defaultSelected=!0)}else{for(o=""+Oi(o),t=null,n=0;n<e.length;n++){if(e[n].value===o){e[n].selected=!0,r&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function h0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function OP(e,t){var o=t.value;if(o==null){if(o=t.children,t=t.defaultValue,o!=null){if(t!=null)throw Error(q(92));if(kd(o)){if(1<o.length)throw Error(q(93));o=o[0]}t=o}t==null&&(t=""),o=t}e._wrapperState={initialValue:Oi(o)}}function GL(e,t){var o=Oi(t.value),r=Oi(t.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),t.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),r!=null&&(e.defaultValue=""+r)}function FP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function WL(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 v0(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?WL(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xm,jL=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,o,r,n){MSApp.execUnsafeLocalFunction(function(){return e(t,o,r,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xm=Xm||document.createElement("div"),Xm.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zd(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var Ad={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},Kz=["Webkit","ms","Moz","O"];Object.keys(Ad).forEach(function(e){Kz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ad[t]=Ad[e]})});function qL(e,t,o){return t==null||typeof t=="boolean"||t===""?"":o||typeof t!="number"||t===0||Ad.hasOwnProperty(e)&&Ad[e]?(""+t).trim():t+"px"}function $L(e,t){e=e.style;for(var o in t)if(t.hasOwnProperty(o)){var r=o.indexOf("--")===0,n=qL(o,t[o],r);o==="float"&&(o="cssFloat"),r?e.setProperty(o,n):e[o]=n}}var Xz=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 x0(e,t){if(t){if(Xz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function y0(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 w0=null;function iw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var C0=null,xu=null,yu=null;function _P(e){if(e=sf(e)){if(typeof C0!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Yg(t),C0(e.stateNode,e.type,t))}}function KL(e){xu?yu?yu.push(e):yu=[e]:xu=e}function XL(){if(xu){var e=xu,t=yu;if(yu=xu=null,_P(e),t)for(e=0;e<t.length;e++)_P(t[e])}}function YL(e,t){return e(t)}function QL(){}var Gy=!1;function ZL(e,t,o){if(Gy)return e(t,o);Gy=!0;try{return YL(e,t,o)}finally{Gy=!1,(xu!==null||yu!==null)&&(QL(),XL())}}function Gd(e,t){var o=e.stateNode;if(o===null)return null;var r=Yg(o);if(r===null)return null;o=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(q(231,t,typeof o));return o}var S0=!1;if(Ta)try{ru={},Object.defineProperty(ru,"passive",{get:function(){S0=!0}}),window.addEventListener("test",ru,ru),window.removeEventListener("test",ru,ru)}catch{S0=!1}var ru;function Yz(e,t,o,r,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(o,u)}catch(c){this.onError(c)}}var Dd=!1,bg=null,Rg=!1,b0=null,Qz={onError:function(e){Dd=!0,bg=e}};function Zz(e,t,o,r,n,a,i,s,l){Dd=!1,bg=null,Yz.apply(Qz,arguments)}function Jz(e,t,o,r,n,a,i,s,l){if(Zz.apply(this,arguments),Dd){if(Dd){var u=bg;Dd=!1,bg=null}else throw Error(q(198));Rg||(Rg=!0,b0=u)}}function Qs(e){var t=e,o=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(o=t.return),e=t.return;while(e)}return t.tag===3?o:null}function JL(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 VP(e){if(Qs(e)!==e)throw Error(q(188))}function e4(e){var t=e.alternate;if(!t){if(t=Qs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var o=e,r=t;;){var n=o.return;if(n===null)break;var a=n.alternate;if(a===null){if(r=n.return,r!==null){o=r;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===o)return VP(n),e;if(a===r)return VP(n),t;a=a.sibling}throw Error(q(188))}if(o.return!==r.return)o=n,r=a;else{for(var i=!1,s=n.child;s;){if(s===o){i=!0,o=n,r=a;break}if(s===r){i=!0,r=n,o=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===o){i=!0,o=a,r=n;break}if(s===r){i=!0,r=a,o=n;break}s=s.sibling}if(!i)throw Error(q(189))}}if(o.alternate!==r)throw Error(q(190))}if(o.tag!==3)throw Error(q(188));return o.stateNode.current===o?e:t}function e1(e){return e=e4(e),e!==null?t1(e):null}function t1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=t1(e);if(t!==null)return t;e=e.sibling}return null}var o1=dr.unstable_scheduleCallback,BP=dr.unstable_cancelCallback,t4=dr.unstable_shouldYield,o4=dr.unstable_requestPaint,St=dr.unstable_now,r4=dr.unstable_getCurrentPriorityLevel,sw=dr.unstable_ImmediatePriority,r1=dr.unstable_UserBlockingPriority,Ig=dr.unstable_NormalPriority,n4=dr.unstable_LowPriority,n1=dr.unstable_IdlePriority,qg=null,ta=null;function a4(e){if(ta&&typeof ta.onCommitFiberRoot=="function")try{ta.onCommitFiberRoot(qg,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:l4,i4=Math.log,s4=Math.LN2;function l4(e){return e>>>=0,e===0?32:31-(i4(e)/s4|0)|0}var Ym=64,Qm=4194304;function Md(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 Pg(e,t){var o=e.pendingLanes;if(o===0)return 0;var r=0,n=e.suspendedLanes,a=e.pingedLanes,i=o&268435455;if(i!==0){var s=i&~n;s!==0?r=Md(s):(a&=i,a!==0&&(r=Md(a)))}else i=o&~n,i!==0?r=Md(i):a!==0&&(r=Md(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&n)&&(n=r&-r,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(r&4&&(r|=o&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)o=31-hn(t),n=1<<o,r|=e[o],t&=~n;return r}function u4(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 c4(e,t){for(var o=e.suspendedLanes,r=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-hn(a),s=1<<i,l=n[i];l===-1?(!(s&o)||s&r)&&(n[i]=u4(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function R0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function a1(){var e=Ym;return Ym<<=1,!(Ym&4194240)&&(Ym=64),e}function Wy(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function nf(e,t,o){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=o}function d4(e,t){var o=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 r=e.eventTimes;for(e=e.expirationTimes;0<o;){var n=31-hn(o),a=1<<n;t[n]=0,r[n]=-1,e[n]=-1,o&=~a}}function lw(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var r=31-hn(o),n=1<<r;n&t|e[r]&t&&(e[r]|=t),o&=~n}}var Ge=0;function i1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var s1,uw,l1,u1,c1,I0=!1,Zm=[],Li=null,Ti=null,ki=null,Wd=new Map,jd=new Map,bi=[],f4="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 HP(e,t){switch(e){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":Wd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jd.delete(t.pointerId)}}function Cd(e,t,o,r,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:o,eventSystemFlags:r,nativeEvent:a,targetContainers:[n]},t!==null&&(t=sf(t),t!==null&&uw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function p4(e,t,o,r,n){switch(t){case"focusin":return Li=Cd(Li,e,t,o,r,n),!0;case"dragenter":return Ti=Cd(Ti,e,t,o,r,n),!0;case"mouseover":return ki=Cd(ki,e,t,o,r,n),!0;case"pointerover":var a=n.pointerId;return Wd.set(a,Cd(Wd.get(a)||null,e,t,o,r,n)),!0;case"gotpointercapture":return a=n.pointerId,jd.set(a,Cd(jd.get(a)||null,e,t,o,r,n)),!0}return!1}function d1(e){var t=Hs(e.target);if(t!==null){var o=Qs(t);if(o!==null){if(t=o.tag,t===13){if(t=JL(o),t!==null){e.blockedOn=t,c1(e.priority,function(){l1(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=P0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var r=new o.constructor(o.type,o);w0=r,o.target.dispatchEvent(r),w0=null}else return t=sf(o),t!==null&&uw(t),e.blockedOn=o,!1;t.shift()}return!0}function UP(e,t,o){fg(e)&&o.delete(t)}function m4(){I0=!1,Li!==null&&fg(Li)&&(Li=null),Ti!==null&&fg(Ti)&&(Ti=null),ki!==null&&fg(ki)&&(ki=null),Wd.forEach(UP),jd.forEach(UP)}function Sd(e,t){e.blockedOn===t&&(e.blockedOn=null,I0||(I0=!0,dr.unstable_scheduleCallback(dr.unstable_NormalPriority,m4)))}function qd(e){function t(n){return Sd(n,e)}if(0<Zm.length){Sd(Zm[0],e);for(var o=1;o<Zm.length;o++){var r=Zm[o];r.blockedOn===e&&(r.blockedOn=null)}}for(Li!==null&&Sd(Li,e),Ti!==null&&Sd(Ti,e),ki!==null&&Sd(ki,e),Wd.forEach(t),jd.forEach(t),o=0;o<bi.length;o++)r=bi[o],r.blockedOn===e&&(r.blockedOn=null);for(;0<bi.length&&(o=bi[0],o.blockedOn===null);)d1(o),o.blockedOn===null&&bi.shift()}var wu=Aa.ReactCurrentBatchConfig,Lg=!0;function g4(e,t,o,r){var n=Ge,a=wu.transition;wu.transition=null;try{Ge=1,cw(e,t,o,r)}finally{Ge=n,wu.transition=a}}function h4(e,t,o,r){var n=Ge,a=wu.transition;wu.transition=null;try{Ge=4,cw(e,t,o,r)}finally{Ge=n,wu.transition=a}}function cw(e,t,o,r){if(Lg){var n=P0(e,t,o,r);if(n===null)Qy(e,t,r,Tg,o),HP(e,r);else if(p4(n,e,t,o,r))r.stopPropagation();else if(HP(e,r),t&4&&-1<f4.indexOf(e)){for(;n!==null;){var a=sf(n);if(a!==null&&s1(a),a=P0(e,t,o,r),a===null&&Qy(e,t,r,Tg,o),a===n)break;n=a}n!==null&&r.stopPropagation()}else Qy(e,t,r,null,o)}}var Tg=null;function P0(e,t,o,r){if(Tg=null,e=iw(r),e=Hs(e),e!==null)if(t=Qs(e),t===null)e=null;else if(o=t.tag,o===13){if(e=JL(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tg=e,null}function f1(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(r4()){case sw:return 1;case r1:return 4;case Ig:case n4:return 16;case n1:return 536870912;default:return 16}default:return 16}}var Ii=null,dw=null,pg=null;function p1(){if(pg)return pg;var e,t=dw,o=t.length,r,n="value"in Ii?Ii.value:Ii.textContent,a=n.length;for(e=0;e<o&&t[e]===n[e];e++);var i=o-e;for(r=1;r<=i&&t[o-r]===n[a-r];r++);return pg=n.slice(e,1<r?1-r:void 0)}function mg(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 Jm(){return!0}function zP(){return!1}function fr(e){function t(o,r,n,a,i){this._reactName=o,this._targetInst=n,this.type=r,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(o=e[s],this[s]=o?o(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Jm:zP,this.isPropagationStopped=zP,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Jm)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Jm)},persist:function(){},isPersistent:Jm}),t}var Mu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fw=fr(Mu),af=pt({},Mu,{view:0,detail:0}),v4=fr(af),jy,qy,bd,$g=pt({},af,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pw,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!==bd&&(bd&&e.type==="mousemove"?(jy=e.screenX-bd.screenX,qy=e.screenY-bd.screenY):qy=jy=0,bd=e),jy)},movementY:function(e){return"movementY"in e?e.movementY:qy}}),GP=fr($g),x4=pt({},$g,{dataTransfer:0}),y4=fr(x4),w4=pt({},af,{relatedTarget:0}),$y=fr(w4),C4=pt({},Mu,{animationName:0,elapsedTime:0,pseudoElement:0}),S4=fr(C4),b4=pt({},Mu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R4=fr(b4),I4=pt({},Mu,{data:0}),WP=fr(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"},L4={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"},T4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T4[e])?!!t[e]:!1}function pw(){return k4}var M4=pt({},af,{key:function(e){if(e.key){var t=P4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?L4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pw,charCode:function(e){return e.type==="keypress"?mg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),E4=fr(M4),A4=pt({},$g,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jP=fr(A4),D4=pt({},af,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pw}),N4=fr(D4),O4=pt({},Mu,{propertyName:0,elapsedTime:0,pseudoElement:0}),F4=fr(O4),_4=pt({},$g,{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}),V4=fr(_4),B4=[9,13,27,32],mw=Ta&&"CompositionEvent"in window,Nd=null;Ta&&"documentMode"in document&&(Nd=document.documentMode);var H4=Ta&&"TextEvent"in window&&!Nd,m1=Ta&&(!mw||Nd&&8<Nd&&11>=Nd),qP=String.fromCharCode(32),$P=!1;function g1(e,t){switch(e){case"keyup":return B4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var su=!1;function U4(e,t){switch(e){case"compositionend":return h1(t);case"keypress":return t.which!==32?null:($P=!0,qP);case"textInput":return e=t.data,e===qP&&$P?null:e;default:return null}}function z4(e,t){if(su)return e==="compositionend"||!mw&&g1(e,t)?(e=p1(),pg=dw=Ii=null,su=!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 m1&&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 KP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G4[e.type]:t==="textarea"}function v1(e,t,o,r){KL(r),t=kg(t,"onChange"),0<t.length&&(o=new fw("onChange","change",null,o,r),e.push({event:o,listeners:t}))}var Od=null,$d=null;function W4(e){T1(e,0)}function Kg(e){var t=cu(e);if(UL(t))return e}function j4(e,t){if(e==="change")return t}var x1=!1;Ta&&(Ta?(tg="oninput"in document,tg||(Ky=document.createElement("div"),Ky.setAttribute("oninput","return;"),tg=typeof Ky.oninput=="function"),eg=tg):eg=!1,x1=eg&&(!document.documentMode||9<document.documentMode));var eg,tg,Ky;function XP(){Od&&(Od.detachEvent("onpropertychange",y1),$d=Od=null)}function y1(e){if(e.propertyName==="value"&&Kg($d)){var t=[];v1(t,$d,e,iw(e)),ZL(W4,t)}}function q4(e,t,o){e==="focusin"?(XP(),Od=t,$d=o,Od.attachEvent("onpropertychange",y1)):e==="focusout"&&XP()}function $4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kg($d)}function K4(e,t){if(e==="click")return Kg(t)}function X4(e,t){if(e==="input"||e==="change")return Kg(t)}function Y4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:Y4;function Kd(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(r=0;r<o.length;r++){var n=o[r];if(!l0.call(t,n)||!xn(e[n],t[n]))return!1}return!0}function YP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function QP(e,t){var o=YP(e);e=0;for(var r;o;){if(o.nodeType===3){if(r=e+o.textContent.length,e<=t&&r>=t)return{node:o,offset:t-e};e=r}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=YP(o)}}function w1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?w1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function C1(){for(var e=window,t=Sg();t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=Sg(e.document)}return t}function gw(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 Q4(e){var t=C1(),o=e.focusedElem,r=e.selectionRange;if(t!==o&&o&&o.ownerDocument&&w1(o.ownerDocument.documentElement,o)){if(r!==null&&gw(o)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in o)o.selectionStart=t,o.selectionEnd=Math.min(e,o.value.length);else if(e=(t=o.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=o.textContent.length,a=Math.min(r.start,n);r=r.end===void 0?a:Math.min(r.end,n),!e.extend&&a>r&&(n=r,r=a,a=n),n=QP(o,a);var i=QP(o,r);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>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=o;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<t.length;o++)e=t[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Z4=Ta&&"documentMode"in document&&11>=document.documentMode,lu=null,L0=null,Fd=null,T0=!1;function ZP(e,t,o){var r=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;T0||lu==null||lu!==Sg(r)||(r=lu,"selectionStart"in r&&gw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fd&&Kd(Fd,r)||(Fd=r,r=kg(L0,"onSelect"),0<r.length&&(t=new fw("onSelect","select",null,t,o),e.push({event:t,listeners:r}),t.target=lu)))}function og(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var uu={animationend:og("Animation","AnimationEnd"),animationiteration:og("Animation","AnimationIteration"),animationstart:og("Animation","AnimationStart"),transitionend:og("Transition","TransitionEnd")},Xy={},S1={};Ta&&(S1=document.createElement("div").style,"AnimationEvent"in window||(delete uu.animationend.animation,delete uu.animationiteration.animation,delete uu.animationstart.animation),"TransitionEvent"in window||delete uu.transitionend.transition);function Xg(e){if(Xy[e])return Xy[e];if(!uu[e])return e;var t=uu[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in S1)return Xy[e]=t[o];return e}var b1=Xg("animationend"),R1=Xg("animationiteration"),I1=Xg("animationstart"),P1=Xg("transitionend"),L1=new Map,JP="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 _i(e,t){L1.set(e,t),Ys(t,[e])}for(rg=0;rg<JP.length;rg++)ng=JP[rg],eL=ng.toLowerCase(),tL=ng[0].toUpperCase()+ng.slice(1),_i(eL,"on"+tL);var ng,eL,tL,rg;_i(b1,"onAnimationEnd");_i(R1,"onAnimationIteration");_i(I1,"onAnimationStart");_i("dblclick","onDoubleClick");_i("focusin","onFocus");_i("focusout","onBlur");_i(P1,"onTransitionEnd");bu("onMouseEnter",["mouseout","mouseover"]);bu("onMouseLeave",["mouseout","mouseover"]);bu("onPointerEnter",["pointerout","pointerover"]);bu("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 Ed="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(" "),J4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ed));function oL(e,t,o){var r=e.type||"unknown-event";e.currentTarget=o,Jz(r,t,void 0,e),e.currentTarget=null}function T1(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var r=e[o],n=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;oL(n,s,u),a=l}else for(i=0;i<r.length;i++){if(s=r[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;oL(n,s,u),a=l}}}if(Rg)throw e=b0,Rg=!1,b0=null,e}function et(e,t){var o=t[D0];o===void 0&&(o=t[D0]=new Set);var r=e+"__bubble";o.has(r)||(k1(t,e,2,!1),o.add(r))}function Yy(e,t,o){var r=0;t&&(r|=4),k1(o,e,r,t)}var ag="_reactListening"+Math.random().toString(36).slice(2);function Xd(e){if(!e[ag]){e[ag]=!0,FL.forEach(function(o){o!=="selectionchange"&&(J4.has(o)||Yy(o,!1,e),Yy(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ag]||(t[ag]=!0,Yy("selectionchange",!1,t))}}function k1(e,t,o,r){switch(f1(t)){case 1:var n=g4;break;case 4:n=h4;break;default:n=cw}o=n.bind(null,t,o,e),n=void 0,!S0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),r?n!==void 0?e.addEventListener(t,o,{capture:!0,passive:n}):e.addEventListener(t,o,!0):n!==void 0?e.addEventListener(t,o,{passive:n}):e.addEventListener(t,o,!1)}function Qy(e,t,o,r,n){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=r.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=Hs(s),i===null)return;if(l=i.tag,l===5||l===6){r=a=i;continue e}s=s.parentNode}}r=r.return}ZL(function(){var u=a,c=iw(o),d=[];e:{var f=L1.get(e);if(f!==void 0){var p=fw,m=e;switch(e){case"keypress":if(mg(o)===0)break e;case"keydown":case"keyup":p=E4;break;case"focusin":m="focus",p=$y;break;case"focusout":m="blur",p=$y;break;case"beforeblur":case"afterblur":p=$y;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=GP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=y4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=N4;break;case b1:case R1:case I1:p=S4;break;case P1:p=F4;break;case"scroll":p=v4;break;case"wheel":p=V4;break;case"copy":case"cut":case"paste":p=R4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=jP}var g=(t&4)!==0,x=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var h=u,y;h!==null;){y=h;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,v!==null&&(w=Gd(h,v),w!=null&&g.push(Yd(h,w,y)))),x)break;h=h.return}0<g.length&&(f=new p(f,m,null,o,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&o!==w0&&(m=o.relatedTarget||o.fromElement)&&(Hs(m)||m[ka]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=o.relatedTarget||o.toElement,p=u,m=m?Hs(m):null,m!==null&&(x=Qs(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=GP,w="onMouseLeave",v="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(g=jP,w="onPointerLeave",v="onPointerEnter",h="pointer"),x=p==null?f:cu(p),y=m==null?f:cu(m),f=new g(w,h+"leave",p,o,c),f.target=x,f.relatedTarget=y,w=null,Hs(c)===u&&(g=new g(v,h+"enter",m,o,c),g.target=y,g.relatedTarget=x,w=g),x=w,p&&m)t:{for(g=p,v=m,h=0,y=g;y;y=nu(y))h++;for(y=0,w=v;w;w=nu(w))y++;for(;0<h-y;)g=nu(g),h--;for(;0<y-h;)v=nu(v),y--;for(;h--;){if(g===v||v!==null&&g===v.alternate)break t;g=nu(g),v=nu(v)}g=null}else g=null;p!==null&&rL(d,f,p,g,!1),m!==null&&x!==null&&rL(d,x,m,g,!0)}}e:{if(f=u?cu(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=j4;else if(KP(f))if(x1)C=X4;else{C=$4;var S=q4}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=K4);if(C&&(C=C(e,u))){v1(d,C,o,c);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&g0(f,"number",f.value)}switch(S=u?cu(u):window,e){case"focusin":(KP(S)||S.contentEditable==="true")&&(lu=S,L0=u,Fd=null);break;case"focusout":Fd=L0=lu=null;break;case"mousedown":T0=!0;break;case"contextmenu":case"mouseup":case"dragend":T0=!1,ZP(d,o,c);break;case"selectionchange":if(Z4)break;case"keydown":case"keyup":ZP(d,o,c)}var R;if(mw)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else su?g1(e,o)&&(I="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(I="onCompositionStart");I&&(m1&&o.locale!=="ko"&&(su||I!=="onCompositionStart"?I==="onCompositionEnd"&&su&&(R=p1()):(Ii=c,dw="value"in Ii?Ii.value:Ii.textContent,su=!0)),S=kg(u,I),0<S.length&&(I=new WP(I,e,null,o,c),d.push({event:I,listeners:S}),R?I.data=R:(R=h1(o),R!==null&&(I.data=R)))),(R=H4?U4(e,o):z4(e,o))&&(u=kg(u,"onBeforeInput"),0<u.length&&(c=new WP("onBeforeInput","beforeinput",null,o,c),d.push({event:c,listeners:u}),c.data=R))}T1(d,t)})}function Yd(e,t,o){return{instance:e,listener:t,currentTarget:o}}function kg(e,t){for(var o=t+"Capture",r=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=Gd(e,o),a!=null&&r.unshift(Yd(e,a,n)),a=Gd(e,t),a!=null&&r.push(Yd(e,a,n))),e=e.return}return r}function nu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rL(e,t,o,r,n){for(var a=t._reactName,i=[];o!==null&&o!==r;){var s=o,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,n?(l=Gd(o,a),l!=null&&i.unshift(Yd(o,l,s))):n||(l=Gd(o,a),l!=null&&i.push(Yd(o,l,s)))),o=o.return}i.length!==0&&e.push({event:t,listeners:i})}var e5=/\r\n?/g,t5=/\u0000|\uFFFD/g;function nL(e){return(typeof e=="string"?e:""+e).replace(e5,`
9
+ `).replace(t5,"")}function ig(e,t,o){if(t=nL(t),nL(e)!==t&&o)throw Error(q(425))}function Mg(){}var k0=null,M0=null;function E0(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 A0=typeof setTimeout=="function"?setTimeout:void 0,o5=typeof clearTimeout=="function"?clearTimeout:void 0,aL=typeof Promise=="function"?Promise:void 0,r5=typeof queueMicrotask=="function"?queueMicrotask:typeof aL<"u"?function(e){return aL.resolve(null).then(e).catch(n5)}:A0;function n5(e){setTimeout(function(){throw e})}function Zy(e,t){var o=t,r=0;do{var n=o.nextSibling;if(e.removeChild(o),n&&n.nodeType===8)if(o=n.data,o==="/$"){if(r===0){e.removeChild(n),qd(t);return}r--}else o!=="$"&&o!=="$?"&&o!=="$!"||r++;o=n}while(o);qd(t)}function Mi(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 iL(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(t===0)return e;t--}else o==="/$"&&t++}e=e.previousSibling}return null}var Eu=Math.random().toString(36).slice(2),ea="__reactFiber$"+Eu,Qd="__reactProps$"+Eu,ka="__reactContainer$"+Eu,D0="__reactEvents$"+Eu,a5="__reactListeners$"+Eu,i5="__reactHandles$"+Eu;function Hs(e){var t=e[ea];if(t)return t;for(var o=e.parentNode;o;){if(t=o[ka]||o[ea]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=iL(e);e!==null;){if(o=e[ea])return o;e=iL(e)}return t}e=o,o=e.parentNode}return null}function sf(e){return e=e[ea]||e[ka],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function cu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Yg(e){return e[Qd]||null}var N0=[],du=-1;function Vi(e){return{current:e}}function tt(e){0>du||(e.current=N0[du],N0[du]=null,du--)}function Ye(e,t){du++,N0[du]=e.current,e.current=t}var Fi={},mo=Vi(Fi),jo=Vi(!1),js=Fi;function Ru(e,t){var o=e.type.contextTypes;if(!o)return Fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in o)n[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function qo(e){return e=e.childContextTypes,e!=null}function Eg(){tt(jo),tt(mo)}function sL(e,t,o){if(mo.current!==Fi)throw Error(q(168));Ye(mo,t),Ye(jo,o)}function M1(e,t,o){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return o;r=r.getChildContext();for(var n in r)if(!(n in t))throw Error(q(108,qz(e)||"Unknown",n));return pt({},o,r)}function Ag(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fi,js=mo.current,Ye(mo,e),Ye(jo,jo.current),!0}function lL(e,t,o){var r=e.stateNode;if(!r)throw Error(q(169));o?(e=M1(e,t,js),r.__reactInternalMemoizedMergedChildContext=e,tt(jo),tt(mo),Ye(mo,e)):tt(jo),Ye(jo,o)}var Ra=null,Qg=!1,Jy=!1;function E1(e){Ra===null?Ra=[e]:Ra.push(e)}function s5(e){Qg=!0,E1(e)}function Bi(){if(!Jy&&Ra!==null){Jy=!0;var e=0,t=Ge;try{var o=Ra;for(Ge=1;e<o.length;e++){var r=o[e];do r=r(!0);while(r!==null)}Ra=null,Qg=!1}catch(n){throw Ra!==null&&(Ra=Ra.slice(e+1)),o1(sw,Bi),n}finally{Ge=t,Jy=!1}}return null}var fu=[],pu=0,Dg=null,Ng=0,Ar=[],Dr=0,qs=null,Ia=1,Pa="";function Vs(e,t){fu[pu++]=Ng,fu[pu++]=Dg,Dg=e,Ng=t}function A1(e,t,o){Ar[Dr++]=Ia,Ar[Dr++]=Pa,Ar[Dr++]=qs,qs=e;var r=Ia;e=Pa;var n=32-hn(r)-1;r&=~(1<<n),o+=1;var a=32-hn(t)+n;if(30<a){var i=n-n%5;a=(r&(1<<i)-1).toString(32),r>>=i,n-=i,Ia=1<<32-hn(t)+n|o<<n|r,Pa=a+e}else Ia=1<<a|o<<n|r,Pa=e}function hw(e){e.return!==null&&(Vs(e,1),A1(e,1,0))}function vw(e){for(;e===Dg;)Dg=fu[--pu],fu[pu]=null,Ng=fu[--pu],fu[pu]=null;for(;e===qs;)qs=Ar[--Dr],Ar[Dr]=null,Pa=Ar[--Dr],Ar[Dr]=null,Ia=Ar[--Dr],Ar[Dr]=null}var cr=null,ur=null,it=!1,gn=null;function D1(e,t){var o=Nr(5,null,null,0);o.elementType="DELETED",o.stateNode=t,o.return=e,t=e.deletions,t===null?(e.deletions=[o],e.flags|=16):t.push(o)}function uL(e,t){switch(e.tag){case 5:var o=e.type;return t=t.nodeType!==1||o.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,cr=e,ur=Mi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,cr=e,ur=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(o=qs!==null?{id:Ia,overflow:Pa}:null,e.memoizedState={dehydrated:t,treeContext:o,retryLane:1073741824},o=Nr(18,null,null,0),o.stateNode=t,o.return=e,e.child=o,cr=e,ur=null,!0):!1;default:return!1}}function O0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function F0(e){if(it){var t=ur;if(t){var o=t;if(!uL(e,t)){if(O0(e))throw Error(q(418));t=Mi(o.nextSibling);var r=cr;t&&uL(e,t)?D1(r,o):(e.flags=e.flags&-4097|2,it=!1,cr=e)}}else{if(O0(e))throw Error(q(418));e.flags=e.flags&-4097|2,it=!1,cr=e}}}function cL(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;cr=e}function sg(e){if(e!==cr)return!1;if(!it)return cL(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!E0(e.type,e.memoizedProps)),t&&(t=ur)){if(O0(e))throw N1(),Error(q(418));for(;t;)D1(e,t),t=Mi(t.nextSibling)}if(cL(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(t===0){ur=Mi(e.nextSibling);break e}t--}else o!=="$"&&o!=="$!"&&o!=="$?"||t++}e=e.nextSibling}ur=null}}else ur=cr?Mi(e.stateNode.nextSibling):null;return!0}function N1(){for(var e=ur;e;)e=Mi(e.nextSibling)}function Iu(){ur=cr=null,it=!1}function xw(e){gn===null?gn=[e]:gn.push(e)}var l5=Aa.ReactCurrentBatchConfig;function Rd(e,t,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(q(309));var r=o.stateNode}if(!r)throw Error(q(147,e));var n=r,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(q(284));if(!o._owner)throw Error(q(290,e))}return e}function lg(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function dL(e){var t=e._init;return t(e._payload)}function O1(e){function t(v,h){if(e){var y=v.deletions;y===null?(v.deletions=[h],v.flags|=16):y.push(h)}}function o(v,h){if(!e)return null;for(;h!==null;)t(v,h),h=h.sibling;return null}function r(v,h){for(v=new Map;h!==null;)h.key!==null?v.set(h.key,h):v.set(h.index,h),h=h.sibling;return v}function n(v,h){return v=Ni(v,h),v.index=0,v.sibling=null,v}function a(v,h,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<h?(v.flags|=2,h):y):(v.flags|=2,h)):(v.flags|=1048576,h)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,h,y,w){return h===null||h.tag!==6?(h=i0(y,v.mode,w),h.return=v,h):(h=n(h,y),h.return=v,h)}function l(v,h,y,w){var C=y.type;return C===iu?c(v,h,y.props.children,w,y.key):h!==null&&(h.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ci&&dL(C)===h.type)?(w=n(h,y.props),w.ref=Rd(v,h,y),w.return=v,w):(w=Cg(y.type,y.key,y.props,null,v.mode,w),w.ref=Rd(v,h,y),w.return=v,w)}function u(v,h,y,w){return h===null||h.tag!==4||h.stateNode.containerInfo!==y.containerInfo||h.stateNode.implementation!==y.implementation?(h=s0(y,v.mode,w),h.return=v,h):(h=n(h,y.children||[]),h.return=v,h)}function c(v,h,y,w,C){return h===null||h.tag!==7?(h=Ws(y,v.mode,w,C),h.return=v,h):(h=n(h,y),h.return=v,h)}function d(v,h,y){if(typeof h=="string"&&h!==""||typeof h=="number")return h=i0(""+h,v.mode,y),h.return=v,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case $m:return y=Cg(h.type,h.key,h.props,null,v.mode,y),y.ref=Rd(v,null,h),y.return=v,y;case au:return h=s0(h,v.mode,y),h.return=v,h;case Ci:var w=h._init;return d(v,w(h._payload),y)}if(kd(h)||wd(h))return h=Ws(h,v.mode,y,null),h.return=v,h;lg(v,h)}return null}function f(v,h,y,w){var C=h!==null?h.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:s(v,h,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $m:return y.key===C?l(v,h,y,w):null;case au:return y.key===C?u(v,h,y,w):null;case Ci:return C=y._init,f(v,h,C(y._payload),w)}if(kd(y)||wd(y))return C!==null?null:c(v,h,y,w,null);lg(v,y)}return null}function p(v,h,y,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(y)||null,s(h,v,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $m:return v=v.get(w.key===null?y:w.key)||null,l(h,v,w,C);case au:return v=v.get(w.key===null?y:w.key)||null,u(h,v,w,C);case Ci:var S=w._init;return p(v,h,y,S(w._payload),C)}if(kd(w)||wd(w))return v=v.get(y)||null,c(h,v,w,C,null);lg(h,w)}return null}function m(v,h,y,w){for(var C=null,S=null,R=h,I=h=0,T=null;R!==null&&I<y.length;I++){R.index>I?(T=R,R=null):T=R.sibling;var L=f(v,R,y[I],w);if(L===null){R===null&&(R=T);break}e&&R&&L.alternate===null&&t(v,R),h=a(L,h,I),S===null?C=L:S.sibling=L,S=L,R=T}if(I===y.length)return o(v,R),it&&Vs(v,I),C;if(R===null){for(;I<y.length;I++)R=d(v,y[I],w),R!==null&&(h=a(R,h,I),S===null?C=R:S.sibling=R,S=R);return it&&Vs(v,I),C}for(R=r(v,R);I<y.length;I++)T=p(R,v,I,y[I],w),T!==null&&(e&&T.alternate!==null&&R.delete(T.key===null?I:T.key),h=a(T,h,I),S===null?C=T:S.sibling=T,S=T);return e&&R.forEach(function(k){return t(v,k)}),it&&Vs(v,I),C}function g(v,h,y,w){var C=wd(y);if(typeof C!="function")throw Error(q(150));if(y=C.call(y),y==null)throw Error(q(151));for(var S=C=null,R=h,I=h=0,T=null,L=y.next();R!==null&&!L.done;I++,L=y.next()){R.index>I?(T=R,R=null):T=R.sibling;var k=f(v,R,L.value,w);if(k===null){R===null&&(R=T);break}e&&R&&k.alternate===null&&t(v,R),h=a(k,h,I),S===null?C=k:S.sibling=k,S=k,R=T}if(L.done)return o(v,R),it&&Vs(v,I),C;if(R===null){for(;!L.done;I++,L=y.next())L=d(v,L.value,w),L!==null&&(h=a(L,h,I),S===null?C=L:S.sibling=L,S=L);return it&&Vs(v,I),C}for(R=r(v,R);!L.done;I++,L=y.next())L=p(R,v,I,L.value,w),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?I:L.key),h=a(L,h,I),S===null?C=L:S.sibling=L,S=L);return e&&R.forEach(function(A){return t(v,A)}),it&&Vs(v,I),C}function x(v,h,y,w){if(typeof y=="object"&&y!==null&&y.type===iu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case $m:e:{for(var C=y.key,S=h;S!==null;){if(S.key===C){if(C=y.type,C===iu){if(S.tag===7){o(v,S.sibling),h=n(S,y.props.children),h.return=v,v=h;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ci&&dL(C)===S.type){o(v,S.sibling),h=n(S,y.props),h.ref=Rd(v,S,y),h.return=v,v=h;break e}o(v,S);break}else t(v,S);S=S.sibling}y.type===iu?(h=Ws(y.props.children,v.mode,w,y.key),h.return=v,v=h):(w=Cg(y.type,y.key,y.props,null,v.mode,w),w.ref=Rd(v,h,y),w.return=v,v=w)}return i(v);case au:e:{for(S=y.key;h!==null;){if(h.key===S)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){o(v,h.sibling),h=n(h,y.children||[]),h.return=v,v=h;break e}else{o(v,h);break}else t(v,h);h=h.sibling}h=s0(y,v.mode,w),h.return=v,v=h}return i(v);case Ci:return S=y._init,x(v,h,S(y._payload),w)}if(kd(y))return m(v,h,y,w);if(wd(y))return g(v,h,y,w);lg(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,h!==null&&h.tag===6?(o(v,h.sibling),h=n(h,y),h.return=v,v=h):(o(v,h),h=i0(y,v.mode,w),h.return=v,v=h),i(v)):o(v,h)}return x}var Pu=O1(!0),F1=O1(!1),Og=Vi(null),Fg=null,mu=null,yw=null;function ww(){yw=mu=Fg=null}function Cw(e){var t=Og.current;tt(Og),e._currentValue=t}function _0(e,t,o){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===o)break;e=e.return}}function Cu(e,t){Fg=e,yw=mu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Wo=!0),e.firstContext=null)}function Fr(e){var t=e._currentValue;if(yw!==e)if(e={context:e,memoizedValue:t,next:null},mu===null){if(Fg===null)throw Error(q(308));mu=e,Fg.dependencies={lanes:0,firstContext:e}}else mu=mu.next=e;return t}var Us=null;function Sw(e){Us===null?Us=[e]:Us.push(e)}function _1(e,t,o,r){var n=t.interleaved;return n===null?(o.next=o,Sw(t)):(o.next=n.next,n.next=o),t.interleaved=o,Ma(e,r)}function Ma(e,t){e.lanes|=t;var o=e.alternate;for(o!==null&&(o.lanes|=t),o=e,e=e.return;e!==null;)e.childLanes|=t,o=e.alternate,o!==null&&(o.childLanes|=t),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Si=!1;function bw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function V1(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 La(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ei(e,t,o){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ee&2){var n=r.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),r.pending=t,Ma(e,o)}return n=r.interleaved,n===null?(t.next=t,Sw(r)):(t.next=n.next,n.next=t),r.interleaved=t,Ma(e,o)}function gg(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,o|=r,t.lanes=o,lw(e,o)}}function fL(e,t){var o=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,o===r)){var n=null,a=null;if(o=o.firstBaseUpdate,o!==null){do{var i={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};a===null?n=a=i:a=a.next=i,o=o.next}while(o!==null);a===null?n=a=t:a=a.next=t}else n=a=t;o={baseState:r.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}function _g(e,t,o,r){var n=e.updateQueue;Si=!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((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,p=o,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=pt({},d,f);break e;case 2:Si=!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);Ks|=i,e.lanes=i,e.memoizedState=d}}function pL(e,t,o){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],n=r.callback;if(n!==null){if(r.callback=null,r=o,typeof n!="function")throw Error(q(191,n));n.call(r)}}}var lf={},oa=Vi(lf),Zd=Vi(lf),Jd=Vi(lf);function zs(e){if(e===lf)throw Error(q(174));return e}function Rw(e,t){switch(Ye(Jd,t),Ye(Zd,e),Ye(oa,lf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:v0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=v0(t,e)}tt(oa),Ye(oa,t)}function Lu(){tt(oa),tt(Zd),tt(Jd)}function B1(e){zs(Jd.current);var t=zs(oa.current),o=v0(t,e.type);t!==o&&(Ye(Zd,e),Ye(oa,o))}function Iw(e){Zd.current===e&&(tt(oa),tt(Zd))}var dt=Vi(0);function Vg(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.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 e0=[];function Pw(){for(var e=0;e<e0.length;e++)e0[e]._workInProgressVersionPrimary=null;e0.length=0}var hg=Aa.ReactCurrentDispatcher,t0=Aa.ReactCurrentBatchConfig,$s=0,ft=null,Nt=null,Wt=null,Bg=!1,_d=!1,ef=0,u5=0;function co(){throw Error(q(321))}function Lw(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!xn(e[o],t[o]))return!1;return!0}function Tw(e,t,o,r,n,a){if($s=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hg.current=e===null||e.memoizedState===null?p5:m5,e=o(r,n),_d){a=0;do{if(_d=!1,ef=0,25<=a)throw Error(q(301));a+=1,Wt=Nt=null,t.updateQueue=null,hg.current=g5,e=o(r,n)}while(_d)}if(hg.current=Hg,t=Nt!==null&&Nt.next!==null,$s=0,Wt=Nt=ft=null,Bg=!1,t)throw Error(q(300));return e}function kw(){var e=ef!==0;return ef=0,e}function Jn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?ft.memoizedState=Wt=e:Wt=Wt.next=e,Wt}function _r(){if(Nt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Nt.next;var t=Wt===null?ft.memoizedState:Wt.next;if(t!==null)Wt=t,Nt=e;else{if(e===null)throw Error(q(310));Nt=e,e={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},Wt===null?ft.memoizedState=Wt=e:Wt=Wt.next=e}return Wt}function tf(e,t){return typeof t=="function"?t(e):t}function o0(e){var t=_r(),o=t.queue;if(o===null)throw Error(q(311));o.lastRenderedReducer=e;var r=Nt,n=r.baseQueue,a=o.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}r.baseQueue=n=a,o.pending=null}if(n!==null){a=n.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if(($s&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=r):l=l.next=d,ft.lanes|=c,Ks|=c}u=u.next}while(u!==null&&u!==a);l===null?i=r:l.next=s,xn(r,t.memoizedState)||(Wo=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,o.lastRenderedState=r}if(e=o.interleaved,e!==null){n=e;do a=n.lane,ft.lanes|=a,Ks|=a,n=n.next;while(n!==e)}else n===null&&(o.lanes=0);return[t.memoizedState,o.dispatch]}function r0(e){var t=_r(),o=t.queue;if(o===null)throw Error(q(311));o.lastRenderedReducer=e;var r=o.dispatch,n=o.pending,a=t.memoizedState;if(n!==null){o.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);xn(a,t.memoizedState)||(Wo=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),o.lastRenderedState=a}return[a,r]}function H1(){}function U1(e,t){var o=ft,r=_r(),n=t(),a=!xn(r.memoizedState,n);if(a&&(r.memoizedState=n,Wo=!0),r=r.queue,Mw(W1.bind(null,o,r,e),[e]),r.getSnapshot!==t||a||Wt!==null&&Wt.memoizedState.tag&1){if(o.flags|=2048,of(9,G1.bind(null,o,r,n,t),void 0,null),jt===null)throw Error(q(349));$s&30||z1(o,t,n)}return n}function z1(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function G1(e,t,o,r){t.value=o,t.getSnapshot=r,j1(t)&&q1(e)}function W1(e,t,o){return o(function(){j1(t)&&q1(e)})}function j1(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!xn(e,o)}catch{return!0}}function q1(e){var t=Ma(e,1);t!==null&&vn(t,e,1,-1)}function mL(e){var t=Jn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tf,lastRenderedState:e},t.queue=e,e=e.dispatch=f5.bind(null,ft,e),[t.memoizedState,e]}function of(e,t,o,r){return e={tag:e,create:t,destroy:o,deps:r,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(o=t.lastEffect,o===null?t.lastEffect=e.next=e:(r=o.next,o.next=e,e.next=r,t.lastEffect=e)),e}function $1(){return _r().memoizedState}function vg(e,t,o,r){var n=Jn();ft.flags|=e,n.memoizedState=of(1|t,o,void 0,r===void 0?null:r)}function Zg(e,t,o,r){var n=_r();r=r===void 0?null:r;var a=void 0;if(Nt!==null){var i=Nt.memoizedState;if(a=i.destroy,r!==null&&Lw(r,i.deps)){n.memoizedState=of(t,o,a,r);return}}ft.flags|=e,n.memoizedState=of(1|t,o,a,r)}function gL(e,t){return vg(8390656,8,e,t)}function Mw(e,t){return Zg(2048,8,e,t)}function K1(e,t){return Zg(4,2,e,t)}function X1(e,t){return Zg(4,4,e,t)}function Y1(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 Q1(e,t,o){return o=o!=null?o.concat([e]):null,Zg(4,4,Y1.bind(null,t,e),o)}function Ew(){}function Z1(e,t){var o=_r();t=t===void 0?null:t;var r=o.memoizedState;return r!==null&&t!==null&&Lw(t,r[1])?r[0]:(o.memoizedState=[e,t],e)}function J1(e,t){var o=_r();t=t===void 0?null:t;var r=o.memoizedState;return r!==null&&t!==null&&Lw(t,r[1])?r[0]:(e=e(),o.memoizedState=[e,t],e)}function eT(e,t,o){return $s&21?(xn(o,t)||(o=a1(),ft.lanes|=o,Ks|=o,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Wo=!0),e.memoizedState=o)}function c5(e,t){var o=Ge;Ge=o!==0&&4>o?o:4,e(!0);var r=t0.transition;t0.transition={};try{e(!1),t()}finally{Ge=o,t0.transition=r}}function tT(){return _r().memoizedState}function d5(e,t,o){var r=Di(e);if(o={lane:r,action:o,hasEagerState:!1,eagerState:null,next:null},oT(e))rT(t,o);else if(o=_1(e,t,o,r),o!==null){var n=Mo();vn(o,e,r,n),nT(o,t,r)}}function f5(e,t,o){var r=Di(e),n={lane:r,action:o,hasEagerState:!1,eagerState:null,next:null};if(oT(e))rT(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,o);if(n.hasEagerState=!0,n.eagerState=s,xn(s,i)){var l=t.interleaved;l===null?(n.next=n,Sw(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}o=_1(e,t,n,r),o!==null&&(n=Mo(),vn(o,e,r,n),nT(o,t,r))}}function oT(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function rT(e,t){_d=Bg=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function nT(e,t,o){if(o&4194240){var r=t.lanes;r&=e.pendingLanes,o|=r,t.lanes=o,lw(e,o)}}var Hg={readContext:Fr,useCallback:co,useContext:co,useEffect:co,useImperativeHandle:co,useInsertionEffect:co,useLayoutEffect:co,useMemo:co,useReducer:co,useRef:co,useState:co,useDebugValue:co,useDeferredValue:co,useTransition:co,useMutableSource:co,useSyncExternalStore:co,useId:co,unstable_isNewReconciler:!1},p5={readContext:Fr,useCallback:function(e,t){return Jn().memoizedState=[e,t===void 0?null:t],e},useContext:Fr,useEffect:gL,useImperativeHandle:function(e,t,o){return o=o!=null?o.concat([e]):null,vg(4194308,4,Y1.bind(null,t,e),o)},useLayoutEffect:function(e,t){return vg(4194308,4,e,t)},useInsertionEffect:function(e,t){return vg(4,2,e,t)},useMemo:function(e,t){var o=Jn();return t=t===void 0?null:t,e=e(),o.memoizedState=[e,t],e},useReducer:function(e,t,o){var r=Jn();return t=o!==void 0?o(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=d5.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Jn();return e={current:e},t.memoizedState=e},useState:mL,useDebugValue:Ew,useDeferredValue:function(e){return Jn().memoizedState=e},useTransition:function(){var e=mL(!1),t=e[0];return e=c5.bind(null,e[1]),Jn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,o){var r=ft,n=Jn();if(it){if(o===void 0)throw Error(q(407));o=o()}else{if(o=t(),jt===null)throw Error(q(349));$s&30||z1(r,t,o)}n.memoizedState=o;var a={value:o,getSnapshot:t};return n.queue=a,gL(W1.bind(null,r,a,e),[e]),r.flags|=2048,of(9,G1.bind(null,r,a,o,t),void 0,null),o},useId:function(){var e=Jn(),t=jt.identifierPrefix;if(it){var o=Pa,r=Ia;o=(r&~(1<<32-hn(r)-1)).toString(32)+o,t=":"+t+"R"+o,o=ef++,0<o&&(t+="H"+o.toString(32)),t+=":"}else o=u5++,t=":"+t+"r"+o.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},m5={readContext:Fr,useCallback:Z1,useContext:Fr,useEffect:Mw,useImperativeHandle:Q1,useInsertionEffect:K1,useLayoutEffect:X1,useMemo:J1,useReducer:o0,useRef:$1,useState:function(){return o0(tf)},useDebugValue:Ew,useDeferredValue:function(e){var t=_r();return eT(t,Nt.memoizedState,e)},useTransition:function(){var e=o0(tf)[0],t=_r().memoizedState;return[e,t]},useMutableSource:H1,useSyncExternalStore:U1,useId:tT,unstable_isNewReconciler:!1},g5={readContext:Fr,useCallback:Z1,useContext:Fr,useEffect:Mw,useImperativeHandle:Q1,useInsertionEffect:K1,useLayoutEffect:X1,useMemo:J1,useReducer:r0,useRef:$1,useState:function(){return r0(tf)},useDebugValue:Ew,useDeferredValue:function(e){var t=_r();return Nt===null?t.memoizedState=e:eT(t,Nt.memoizedState,e)},useTransition:function(){var e=r0(tf)[0],t=_r().memoizedState;return[e,t]},useMutableSource:H1,useSyncExternalStore:U1,useId:tT,unstable_isNewReconciler:!1};function pn(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var o in e)t[o]===void 0&&(t[o]=e[o]);return t}return t}function V0(e,t,o,r){t=e.memoizedState,o=o(r,t),o=o==null?t:pt({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Jg={isMounted:function(e){return(e=e._reactInternals)?Qs(e)===e:!1},enqueueSetState:function(e,t,o){e=e._reactInternals;var r=Mo(),n=Di(e),a=La(r,n);a.payload=t,o!=null&&(a.callback=o),t=Ei(e,a,n),t!==null&&(vn(t,e,n,r),gg(t,e,n))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var r=Mo(),n=Di(e),a=La(r,n);a.tag=1,a.payload=t,o!=null&&(a.callback=o),t=Ei(e,a,n),t!==null&&(vn(t,e,n,r),gg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=Mo(),r=Di(e),n=La(o,r);n.tag=2,t!=null&&(n.callback=t),t=Ei(e,n,r),t!==null&&(vn(t,e,r,o),gg(t,e,r))}};function hL(e,t,o,r,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,i):t.prototype&&t.prototype.isPureReactComponent?!Kd(o,r)||!Kd(n,a):!0}function aT(e,t,o){var r=!1,n=Fi,a=t.contextType;return typeof a=="object"&&a!==null?a=Fr(a):(n=qo(t)?js:mo.current,r=t.contextTypes,a=(r=r!=null)?Ru(e,n):Fi),t=new t(o,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Jg,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function vL(e,t,o,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,r),t.state!==e&&Jg.enqueueReplaceState(t,t.state,null)}function B0(e,t,o,r){var n=e.stateNode;n.props=o,n.state=e.memoizedState,n.refs={},bw(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Fr(a):(a=qo(t)?js:mo.current,n.context=Ru(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(V0(e,t,a,o),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&&Jg.enqueueReplaceState(n,n.state,null),_g(e,o,n,r),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Tu(e,t){try{var o="",r=t;do o+=jz(r),r=r.return;while(r);var n=o}catch(a){n=`
10
10
  Error generating stack: `+a.message+`
11
- `+a.stack}return{value:e,source:t,stack:n,digest:null}}function Hy(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function S0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var yz=typeof WeakMap=="function"?WeakMap:Map;function KT(e,t,r){r=pa(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){wg||(wg=!0,A0=o),S0(e,t)},r}function XT(e,t,r){r=pa(-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(){S0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){S0(e,t),typeof o!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function i1(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new yz;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=Dz.bind(null,e,t,r),t.then(e,e))}function s1(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 l1(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=pa(-1,1),t.tag=2,fi(r,t,1))),r.lanes|=1),e)}var wz=xa.ReactCurrentOwner,Br=!1;function Lr(e,t,r,o){t.child=e===null?RT(t,null,r,o):nu(t,e.child,r,o)}function u1(e,t,r,o,n){r=r.render;var a=t.ref;return Jl(t,n),o=cw(e,t,r,o,a,n),r=dw(),e!==null&&!Br?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,va(e,t,n)):(st&&r&&Z0(t),t.flags|=1,Lr(e,t,o,n),t.child)}function c1(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!Cw(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,YT(e,t,a,o,n)):(e=Jm(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:vd,r(i,o)&&e.ref===t.ref)return va(e,t,n)}return t.flags|=1,e=gi(a,o),e.ref=t.ref,e.return=t,t.child=e}function YT(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(vd(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,va(e,t,n)}return b0(e,t,r,o,n)}function QT(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},Qe(Kl,ro),ro|=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,Qe(Kl,ro),ro|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Qe(Kl,ro),ro|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Qe(Kl,ro),ro|=o;return Lr(e,t,n,r),t.child}function ZT(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function b0(e,t,r,o,n){var a=Ur(r)?ws:cr.current;return a=ru(t,a),Jl(t,n),r=cw(e,t,r,o,a,n),o=dw(),e!==null&&!Br?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,va(e,t,n)):(st&&o&&Z0(t),t.flags|=1,Lr(e,t,r,n),t.child)}function d1(e,t,r,o,n){if(Ur(r)){var a=!0;cg(t)}else a=!1;if(Jl(t,n),t.stateNode===null)Ym(e,t),$T(t,r,o),C0(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=Mo(u):(u=Ur(r)?ws:cr.current,u=ru(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)&&a1(t,i,o,u),oi=!1;var f=t.memoizedState;i.state=f,gg(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Hr.current||oi?(typeof c=="function"&&(w0(t,r,c,o),l=t.memoizedState),(s=oi||n1(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,LT(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Zo(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Mo(l):(l=Ur(r)?ws:cr.current,l=ru(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)&&a1(t,i,o,l),oi=!1,f=t.memoizedState,i.state=f,gg(t,o,i,n);var m=t.memoizedState;s!==d||f!==m||Hr.current||oi?(typeof p=="function"&&(w0(t,r,p,o),m=t.memoizedState),(u=oi||n1(t,r,u,o,f,m,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,m,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,m,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=m),i.props=o,i.state=m,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 R0(e,t,r,o,a,n)}function R0(e,t,r,o,n,a){ZT(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&YP(t,r,!1),va(e,t,a);o=t.stateNode,wz.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=nu(t,e.child,null,a),t.child=nu(t,null,s,a)):Lr(e,t,s,a),t.memoizedState=o.state,n&&YP(t,r,!0),t.child}function JT(e){var t=e.stateNode;t.pendingContext?XP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&XP(e,t.context,!1),iw(e,t.containerInfo)}function f1(e,t,r,o,n){return ou(),ew(n),t.flags|=256,Lr(e,t,r,o),t.child}var I0={dehydrated:null,treeContext:null,retryLane:0};function L0(e){return{baseLanes:e,cachePool:null,transitions:null}}function ek(e,t,r){var o=t.pendingProps,n=ft.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),Qe(ft,n&1),e===null)return x0(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=Ng(i,o,0,null),e=ys(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=L0(r),t.memoizedState=I0,e):mw(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return Cz(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=gi(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=gi(s,a):(a=ys(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?L0(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=I0,o}return a=e.child,e=a.sibling,o=gi(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 mw(e,t){return t=Ng({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Um(e,t,r,o){return o!==null&&ew(o),nu(t,e.child,null,r),e=mw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cz(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=Hy(Error(j(422))),Um(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=Ng({mode:"visible",children:o.children},n,0,null),a=ys(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&nu(t,e.child,null,i),t.child.memoizedState=L0(i),t.memoizedState=I0,a);if(!(t.mode&1))return Um(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error(j(419)),o=Hy(a,o,void 0),Um(e,t,i,o)}if(s=(i&e.childLanes)!==0,Br||s){if(o=Gt,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,ha(e,n),rn(o,e,n,-1))}return ww(),o=Hy(Error(j(421))),Um(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=Nz.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,oo=di(n.nextSibling),no=t,st=!0,en=null,e!==null&&(Lo[Po++]=da,Lo[Po++]=fa,Lo[Po++]=Cs,da=e.id,fa=e.overflow,Cs=t),t=mw(t,o.children),t.flags|=4096,t)}function p1(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),y0(e.return,t,r)}function Uy(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 tk(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Lr(e,t,o.children,r),o=ft.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&&p1(e,r,t);else if(e.tag===19)p1(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(Qe(ft,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&&hg(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),Uy(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&&hg(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}Uy(t,!0,r,null,a);break;case"together":Uy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ym(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function va(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),bs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,r=gi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=gi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Sz(e,t,r){switch(t.tag){case 3:JT(t),ou();break;case 5:PT(t);break;case 1:Ur(t.type)&&cg(t);break;case 4:iw(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Qe(pg,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Qe(ft,ft.current&1),t.flags|=128,null):r&t.child.childLanes?ek(e,t,r):(Qe(ft,ft.current&1),e=va(e,t,r),e!==null?e.sibling:null);Qe(ft,ft.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return tk(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Qe(ft,ft.current),o)break;return null;case 22:case 23:return t.lanes=0,QT(e,t,r)}return va(e,t,r)}var rk,P0,ok,nk;rk=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}};P0=function(){};ok=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,vs(Hn.current);var a=null;switch(r){case"input":n=Xy(e,n),o=Xy(e,o),a=[];break;case"select":n=mt({},n,{value:void 0}),o=mt({},o,{value:void 0}),a=[];break;case"textarea":n=Zy(e,n),o=Zy(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=lg)}e0(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"&&(cd.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"&&(cd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&tt("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)}};nk=function(e,t,r,o){r!==o&&(t.flags|=4)};function Kc(e,t){if(!st)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 lr(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 bz(e,t,r){var o=t.pendingProps;switch(J0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lr(t),null;case 1:return Ur(t.type)&&ug(),lr(t),null;case 3:return o=t.stateNode,au(),rt(Hr),rt(cr),lw(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Bm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,en!==null&&(O0(en),en=null))),P0(e,t),lr(t),null;case 5:sw(t);var n=vs(Sd.current);if(r=t.type,e!==null&&t.stateNode!=null)ok(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(j(166));return lr(t),null}if(e=vs(Hn.current),Bm(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[Vn]=t,o[wd]=a,e=(t.mode&1)!==0,r){case"dialog":tt("cancel",o),tt("close",o);break;case"iframe":case"object":case"embed":tt("load",o);break;case"video":case"audio":for(n=0;n<ed.length;n++)tt(ed[n],o);break;case"source":tt("error",o);break;case"img":case"image":case"link":tt("error",o),tt("load",o);break;case"details":tt("toggle",o);break;case"input":CP(o,a),tt("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},tt("invalid",o);break;case"textarea":bP(o,a),tt("invalid",o)}e0(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&&Vm(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Vm(o.textContent,s,e),n=["children",""+s]):cd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&tt("scroll",o)}switch(r){case"input":Lm(o),SP(o,a,!0);break;case"textarea":Lm(o),RP(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=lg)}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=A1(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[Vn]=t,e[wd]=o,rk(e,t,!1,!1),t.stateNode=e;e:{switch(i=t0(r,o),r){case"dialog":tt("cancel",e),tt("close",e),n=o;break;case"iframe":case"object":case"embed":tt("load",e),n=o;break;case"video":case"audio":for(n=0;n<ed.length;n++)tt(ed[n],e);n=o;break;case"source":tt("error",e),n=o;break;case"img":case"image":case"link":tt("error",e),tt("load",e),n=o;break;case"details":tt("toggle",e),n=o;break;case"input":CP(e,o),n=Xy(e,o),tt("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=mt({},o,{value:void 0}),tt("invalid",e);break;case"textarea":bP(e,o),n=Zy(e,o),tt("invalid",e);break;default:n=o}e0(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?O1(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&D1(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&dd(e,l):typeof l=="number"&&dd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(cd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&tt("scroll",e):l!=null&&V0(e,a,l,i))}switch(r){case"input":Lm(e),SP(e,o,!1);break;case"textarea":Lm(e),RP(e);break;case"option":o.value!=null&&e.setAttribute("value",""+hi(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?Xl(e,!!o.multiple,a,!1):o.defaultValue!=null&&Xl(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=lg)}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 lr(t),null;case 6:if(e&&t.stateNode!=null)nk(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(j(166));if(r=vs(Sd.current),vs(Hn.current),Bm(t)){if(o=t.stateNode,r=t.memoizedProps,o[Vn]=t,(a=o.nodeValue!==r)&&(e=no,e!==null))switch(e.tag){case 3:Vm(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vm(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[Vn]=t,t.stateNode=o}return lr(t),null;case 13:if(rt(ft),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(st&&oo!==null&&t.mode&1&&!(t.flags&128))ST(),ou(),t.flags|=98560,a=!1;else if(a=Bm(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error(j(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(j(317));a[Vn]=t}else ou(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lr(t),a=!1}else en!==null&&(O0(en),en=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||ft.current&1?Dt===0&&(Dt=3):ww())),t.updateQueue!==null&&(t.flags|=4),lr(t),null);case 4:return au(),P0(e,t),e===null&&xd(t.stateNode.containerInfo),lr(t),null;case 10:return ow(t.type._context),lr(t),null;case 17:return Ur(t.type)&&ug(),lr(t),null;case 19:if(rt(ft),a=t.memoizedState,a===null)return lr(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)Kc(a,!1);else{if(Dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=hg(e),i!==null){for(t.flags|=128,Kc(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 Qe(ft,ft.current&1|2),t.child}e=e.sibling}a.tail!==null&&bt()>su&&(t.flags|=128,o=!0,Kc(a,!1),t.lanes=4194304)}else{if(!o)if(e=hg(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Kc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!st)return lr(t),null}else 2*bt()-a.renderingStartTime>su&&r!==1073741824&&(t.flags|=128,o=!0,Kc(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=bt(),t.sibling=null,r=ft.current,Qe(ft,o?r&1|2:r&1),t):(lr(t),null);case 22:case 23:return yw(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?ro&1073741824&&(lr(t),t.subtreeFlags&6&&(t.flags|=8192)):lr(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Rz(e,t){switch(J0(t),t.tag){case 1:return Ur(t.type)&&ug(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return au(),rt(Hr),rt(cr),lw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sw(t),null;case 13:if(rt(ft),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));ou()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(ft),null;case 4:return au(),null;case 10:return ow(t.type._context),null;case 22:case 23:return yw(),null;case 24:return null;default:return null}}var zm=!1,ur=!1,Iz=typeof WeakSet=="function"?WeakSet:Set,oe=null;function $l(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){xt(e,t,o)}else r.current=null}function T0(e,t,r){try{r()}catch(o){xt(e,t,o)}}var m1=!1;function Lz(e,t){if(d0=ag,e=uT(),Q0(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(f0={focusedElem:e,selectionRange:r},ag=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,y=m.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?g:Zo(t.type,g),y);h.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(w){xt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return m=m1,m1=!1,m}function sd(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&&T0(t,r,a)}n=n.next}while(n!==o)}}function Ag(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 k0(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 ak(e){var t=e.alternate;t!==null&&(e.alternate=null,ak(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vn],delete t[wd],delete t[g0],delete t[lz],delete t[uz])),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 ik(e){return e.tag===5||e.tag===3||e.tag===4}function g1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ik(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 M0(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=lg));else if(o!==4&&(e=e.child,e!==null))for(M0(e,t,r),e=e.sibling;e!==null;)M0(e,t,r),e=e.sibling}function E0(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(E0(e,t,r),e=e.sibling;e!==null;)E0(e,t,r),e=e.sibling}var Yt=null,Jo=!1;function ti(e,t,r){for(r=r.child;r!==null;)sk(e,t,r),r=r.sibling}function sk(e,t,r){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(Rg,r)}catch{}switch(r.tag){case 5:ur||$l(r,t);case 6:var o=Yt,n=Jo;Yt=null,ti(e,t,r),Yt=o,Jo=n,Yt!==null&&(Jo?(e=Yt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Yt.removeChild(r.stateNode));break;case 18:Yt!==null&&(Jo?(e=Yt,r=r.stateNode,e.nodeType===8?Ny(e.parentNode,r):e.nodeType===1&&Ny(e,r),gd(e)):Ny(Yt,r.stateNode));break;case 4:o=Yt,n=Jo,Yt=r.stateNode.containerInfo,Jo=!0,ti(e,t,r),Yt=o,Jo=n;break;case 0:case 11:case 14:case 15:if(!ur&&(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)&&T0(r,t,i),n=n.next}while(n!==o)}ti(e,t,r);break;case 1:if(!ur&&($l(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){xt(r,t,s)}ti(e,t,r);break;case 21:ti(e,t,r);break;case 22:r.mode&1?(ur=(o=ur)||r.memoizedState!==null,ti(e,t,r),ur=o):ti(e,t,r);break;default:ti(e,t,r)}}function h1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Iz),t.forEach(function(o){var n=Oz.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function Qo(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:Yt=s.stateNode,Jo=!1;break e;case 3:Yt=s.stateNode.containerInfo,Jo=!0;break e;case 4:Yt=s.stateNode.containerInfo,Jo=!0;break e}s=s.return}if(Yt===null)throw Error(j(160));sk(a,i,n),Yt=null,Jo=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){xt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lk(t,e),t=t.sibling}function lk(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qo(t,e),Fn(e),o&4){try{sd(3,e,e.return),Ag(3,e)}catch(g){xt(e,e.return,g)}try{sd(5,e,e.return)}catch(g){xt(e,e.return,g)}}break;case 1:Qo(t,e),Fn(e),o&512&&r!==null&&$l(r,r.return);break;case 5:if(Qo(t,e),Fn(e),o&512&&r!==null&&$l(r,r.return),e.flags&32){var n=e.stateNode;try{dd(n,"")}catch(g){xt(e,e.return,g)}}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&&M1(n,a),t0(s,i);var u=t0(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?O1(n,d):c==="dangerouslySetInnerHTML"?D1(n,d):c==="children"?dd(n,d):V0(n,c,d,u)}switch(s){case"input":Yy(n,a);break;case"textarea":E1(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Xl(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Xl(n,!!a.multiple,a.defaultValue,!0):Xl(n,!!a.multiple,a.multiple?[]:"",!1))}n[wd]=a}catch(g){xt(e,e.return,g)}}break;case 6:if(Qo(t,e),Fn(e),o&4){if(e.stateNode===null)throw Error(j(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(g){xt(e,e.return,g)}}break;case 3:if(Qo(t,e),Fn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{gd(t.containerInfo)}catch(g){xt(e,e.return,g)}break;case 4:Qo(t,e),Fn(e);break;case 13:Qo(t,e),Fn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(vw=bt())),o&4&&h1(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(ur=(u=ur)||c,Qo(t,e),ur=u):Qo(t,e),Fn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(oe=e,c=e.child;c!==null;){for(d=oe=c;oe!==null;){switch(f=oe,p=f.child,f.tag){case 0:case 11:case 14:case 15:sd(4,f,f.return);break;case 1:$l(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){xt(o,r,g)}}break;case 5:$l(f,f.return);break;case 22:if(f.memoizedState!==null){x1(d);continue}}p!==null?(p.return=f,oe=p):x1(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=N1("display",i))}catch(g){xt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){xt(e,e.return,g)}}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:Qo(t,e),Fn(e),o&4&&h1(e);break;case 21:break;default:Qo(t,e),Fn(e)}}function Fn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(ik(r)){var o=r;break e}r=r.return}throw Error(j(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(dd(n,""),o.flags&=-33);var a=g1(e);E0(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=g1(e);M0(e,s,i);break;default:throw Error(j(161))}}catch(l){xt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pz(e,t,r){oe=e,uk(e,t,r)}function uk(e,t,r){for(var o=(e.mode&1)!==0;oe!==null;){var n=oe,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||zm;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||ur;s=zm;var u=ur;if(zm=i,(ur=l)&&!u)for(oe=n;oe!==null;)i=oe,l=i.child,i.tag===22&&i.memoizedState!==null?y1(n):l!==null?(l.return=i,oe=l):y1(n);for(;a!==null;)oe=a,uk(a,t,r),a=a.sibling;oe=n,zm=s,ur=u}v1(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,oe=a):v1(e,t,r)}}function v1(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ur||Ag(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!ur)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Zo(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&t1(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}t1(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&&gd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}ur||t.flags&512&&k0(t)}catch(f){xt(t,t.return,f)}}if(t===e){oe=null;break}if(r=t.sibling,r!==null){r.return=t.return,oe=r;break}oe=t.return}}function x1(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,oe=r;break}oe=t.return}}function y1(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ag(4,t)}catch(l){xt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){xt(t,n,l)}}var a=t.return;try{k0(t)}catch(l){xt(t,a,l)}break;case 5:var i=t.return;try{k0(t)}catch(l){xt(t,i,l)}}}catch(l){xt(t,t.return,l)}if(t===e){oe=null;break}var s=t.sibling;if(s!==null){s.return=t.return,oe=s;break}oe=t.return}}var Tz=Math.ceil,yg=xa.ReactCurrentDispatcher,gw=xa.ReactCurrentOwner,ko=xa.ReactCurrentBatchConfig,Ae=0,Gt=null,Pt=null,Qt=0,ro=0,Kl=yi(0),Dt=0,Ld=null,bs=0,Dg=0,hw=0,ld=null,Vr=null,vw=0,su=1/0,ua=null,wg=!1,A0=null,pi=null,Gm=!1,si=null,Cg=0,ud=0,D0=null,Qm=-1,Zm=0;function Pr(){return Ae&6?bt():Qm!==-1?Qm:Qm=bt()}function mi(e){return e.mode&1?Ae&2&&Qt!==0?Qt&-Qt:dz.transition!==null?(Zm===0&&(Zm=$1()),Zm):(e=We,e!==0||(e=window.event,e=e===void 0?16:eT(e.type)),e):1}function rn(e,t,r,o){if(50<ud)throw ud=0,D0=null,Error(j(185));Pd(e,r,o),(!(Ae&2)||e!==Gt)&&(e===Gt&&(!(Ae&2)&&(Dg|=r),Dt===4&&ai(e,Qt)),zr(e,o),r===1&&Ae===0&&!(t.mode&1)&&(su=bt()+500,kg&&wi()))}function zr(e,t){var r=e.callbackNode;p4(e,t);var o=ng(e,e===Gt?Qt:0);if(o===0)r!==null&&PP(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&PP(r),t===1)e.tag===0?cz(w1.bind(null,e)):yT(w1.bind(null,e)),iz(function(){!(Ae&6)&&wi()}),r=null;else{switch(K1(o)){case 1:r=G0;break;case 4:r=q1;break;case 16:r=og;break;case 536870912:r=j1;break;default:r=og}r=vk(r,ck.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function ck(e,t){if(Qm=-1,Zm=0,Ae&6)throw Error(j(327));var r=e.callbackNode;if(eu()&&e.callbackNode!==r)return null;var o=ng(e,e===Gt?Qt:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=Sg(e,o);else{t=o;var n=Ae;Ae|=2;var a=fk();(Gt!==e||Qt!==t)&&(ua=null,su=bt()+500,xs(e,t));do try{Ez();break}catch(s){dk(e,s)}while(1);rw(),yg.current=a,Ae=n,Pt!==null?t=0:(Gt=null,Qt=0,t=Dt)}if(t!==0){if(t===2&&(n=i0(e),n!==0&&(o=n,t=N0(e,n))),t===1)throw r=Ld,xs(e,0),ai(e,o),zr(e,bt()),r;if(t===6)ai(e,o);else{if(n=e.current.alternate,!(o&30)&&!kz(n)&&(t=Sg(e,o),t===2&&(a=i0(e),a!==0&&(o=a,t=N0(e,a))),t===1))throw r=Ld,xs(e,0),ai(e,o),zr(e,bt()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error(j(345));case 2:ms(e,Vr,ua);break;case 3:if(ai(e,o),(o&130023424)===o&&(t=vw+500-bt(),10<t)){if(ng(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Pr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=m0(ms.bind(null,e,Vr,ua),t);break}ms(e,Vr,ua);break;case 4:if(ai(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-tn(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=bt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Tz(o/1960))-o,10<o){e.timeoutHandle=m0(ms.bind(null,e,Vr,ua),o);break}ms(e,Vr,ua);break;case 5:ms(e,Vr,ua);break;default:throw Error(j(329))}}}return zr(e,bt()),e.callbackNode===r?ck.bind(null,e):null}function N0(e,t){var r=ld;return e.current.memoizedState.isDehydrated&&(xs(e,t).flags|=256),e=Sg(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 kz(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(!on(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 ai(e,t){for(t&=~hw,t&=~Dg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-tn(t),o=1<<r;e[r]=-1,t&=~o}}function w1(e){if(Ae&6)throw Error(j(327));eu();var t=ng(e,0);if(!(t&1))return zr(e,bt()),null;var r=Sg(e,t);if(e.tag!==0&&r===2){var o=i0(e);o!==0&&(t=o,r=N0(e,o))}if(r===1)throw r=Ld,xs(e,0),ai(e,t),zr(e,bt()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ms(e,Vr,ua),zr(e,bt()),null}function xw(e,t){var r=Ae;Ae|=1;try{return e(t)}finally{Ae=r,Ae===0&&(su=bt()+500,kg&&wi())}}function Rs(e){si!==null&&si.tag===0&&!(Ae&6)&&eu();var t=Ae;Ae|=1;var r=ko.transition,o=We;try{if(ko.transition=null,We=1,e)return e()}finally{We=o,ko.transition=r,Ae=t,!(Ae&6)&&wi()}}function yw(){ro=Kl.current,rt(Kl)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,az(r)),Pt!==null)for(r=Pt.return;r!==null;){var o=r;switch(J0(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&ug();break;case 3:au(),rt(Hr),rt(cr),lw();break;case 5:sw(o);break;case 4:au();break;case 13:rt(ft);break;case 19:rt(ft);break;case 10:ow(o.type._context);break;case 22:case 23:yw()}r=r.return}if(Gt=e,Pt=e=gi(e.current,null),Qt=ro=t,Dt=0,Ld=null,hw=Dg=bs=0,Vr=ld=null,hs!==null){for(t=0;t<hs.length;t++)if(r=hs[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}hs=null}return e}function dk(e,t){do{var r=Pt;try{if(rw(),Km.current=xg,vg){for(var o=pt.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}vg=!1}if(Ss=0,zt=At=pt=null,id=!1,bd=0,gw.current=null,r===null||r.return===null){Dt=1,Ld=t,Pt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=Qt,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=s1(i);if(p!==null){p.flags&=-257,l1(p,i,s,a,t),p.mode&1&&i1(a,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if(!(t&1)){i1(a,u,t),ww();break e}l=Error(j(426))}}else if(st&&s.mode&1){var y=s1(i);if(y!==null){!(y.flags&65536)&&(y.flags|=256),l1(y,i,s,a,t),ew(iu(l,s));break e}}a=l=iu(l,s),Dt!==4&&(Dt=2),ld===null?ld=[a]:ld.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=KT(a,l,t);e1(a,h);break e;case 1:s=l;var v=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(pi===null||!pi.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=XT(a,s,t);e1(a,w);break e}}a=a.return}while(a!==null)}mk(r)}catch(C){t=C,Pt===r&&r!==null&&(Pt=r=r.return);continue}break}while(1)}function fk(){var e=yg.current;return yg.current=xg,e===null?xg:e}function ww(){(Dt===0||Dt===3||Dt===2)&&(Dt=4),Gt===null||!(bs&268435455)&&!(Dg&268435455)||ai(Gt,Qt)}function Sg(e,t){var r=Ae;Ae|=2;var o=fk();(Gt!==e||Qt!==t)&&(ua=null,xs(e,t));do try{Mz();break}catch(n){dk(e,n)}while(1);if(rw(),Ae=r,yg.current=o,Pt!==null)throw Error(j(261));return Gt=null,Qt=0,Dt}function Mz(){for(;Pt!==null;)pk(Pt)}function Ez(){for(;Pt!==null&&!n4();)pk(Pt)}function pk(e){var t=hk(e.alternate,e,ro);e.memoizedProps=e.pendingProps,t===null?mk(e):Pt=t,gw.current=null}function mk(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Rz(r,t),r!==null){r.flags&=32767,Pt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Dt=6,Pt=null;return}}else if(r=bz(r,t,ro),r!==null){Pt=r;return}if(t=t.sibling,t!==null){Pt=t;return}Pt=t=e}while(t!==null);Dt===0&&(Dt=5)}function ms(e,t,r){var o=We,n=ko.transition;try{ko.transition=null,We=1,Az(e,t,r,o)}finally{ko.transition=n,We=o}return null}function Az(e,t,r,o){do eu();while(si!==null);if(Ae&6)throw Error(j(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(j(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(m4(e,a),e===Gt&&(Pt=Gt=null,Qt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Gm||(Gm=!0,vk(og,function(){return eu(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=ko.transition,ko.transition=null;var i=We;We=1;var s=Ae;Ae|=4,gw.current=null,Lz(e,r),lk(r,e),ez(f0),ag=!!d0,f0=d0=null,e.current=r,Pz(r,e,n),a4(),Ae=s,We=i,ko.transition=a}else e.current=r;if(Gm&&(Gm=!1,si=e,Cg=n),a=e.pendingLanes,a===0&&(pi=null),l4(r.stateNode,o),zr(e,bt()),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(wg)throw wg=!1,e=A0,A0=null,e;return Cg&1&&e.tag!==0&&eu(),a=e.pendingLanes,a&1?e===D0?ud++:(ud=0,D0=e):ud=0,wi(),null}function eu(){if(si!==null){var e=K1(Cg),t=ko.transition,r=We;try{if(ko.transition=null,We=16>e?16:e,si===null)var o=!1;else{if(e=si,si=null,Cg=0,Ae&6)throw Error(j(331));var n=Ae;for(Ae|=4,oe=e.current;oe!==null;){var a=oe,i=a.child;if(oe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(oe=u;oe!==null;){var c=oe;switch(c.tag){case 0:case 11:case 15:sd(8,c,a)}var d=c.child;if(d!==null)d.return=c,oe=d;else for(;oe!==null;){c=oe;var f=c.sibling,p=c.return;if(ak(c),c===u){oe=null;break}if(f!==null){f.return=p,oe=f;break}oe=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}oe=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,oe=i;else e:for(;oe!==null;){if(a=oe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:sd(9,a,a.return)}var h=a.sibling;if(h!==null){h.return=a.return,oe=h;break e}oe=a.return}}var v=e.current;for(oe=v;oe!==null;){i=oe;var x=i.child;if(i.subtreeFlags&2064&&x!==null)x.return=i,oe=x;else e:for(i=v;oe!==null;){if(s=oe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ag(9,s)}}catch(C){xt(s,s.return,C)}if(s===i){oe=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,oe=w;break e}oe=s.return}}if(Ae=n,wi(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(Rg,e)}catch{}o=!0}return o}finally{We=r,ko.transition=t}}return!1}function C1(e,t,r){t=iu(r,t),t=KT(e,t,1),e=fi(e,t,1),t=Pr(),e!==null&&(Pd(e,1,t),zr(e,t))}function xt(e,t,r){if(e.tag===3)C1(e,e,r);else for(;t!==null;){if(t.tag===3){C1(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(pi===null||!pi.has(o))){e=iu(r,e),e=XT(t,e,1),t=fi(t,e,1),e=Pr(),t!==null&&(Pd(t,1,e),zr(t,e));break}}t=t.return}}function Dz(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Pr(),e.pingedLanes|=e.suspendedLanes&r,Gt===e&&(Qt&r)===r&&(Dt===4||Dt===3&&(Qt&130023424)===Qt&&500>bt()-vw?xs(e,0):hw|=r),zr(e,t)}function gk(e,t){t===0&&(e.mode&1?(t=km,km<<=1,!(km&130023424)&&(km=4194304)):t=1);var r=Pr();e=ha(e,t),e!==null&&(Pd(e,t,r),zr(e,r))}function Nz(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),gk(e,r)}function Oz(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(j(314))}o!==null&&o.delete(t),gk(e,r)}var hk;hk=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,Sz(e,t,r);Br=!!(e.flags&131072)}else Br=!1,st&&t.flags&1048576&&wT(t,fg,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Ym(e,t),e=t.pendingProps;var n=ru(t,cr.current);Jl(t,r),n=cw(null,t,o,e,n,r);var a=dw();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,cg(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,aw(t),n.updater=Eg,t.stateNode=n,n._reactInternals=t,C0(t,o,e,r),t=R0(null,t,o,!0,a,r)):(t.tag=0,st&&a&&Z0(t),Lr(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Ym(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=_z(o),e=Zo(o,e),n){case 0:t=b0(null,t,o,e,r);break e;case 1:t=d1(null,t,o,e,r);break e;case 11:t=u1(null,t,o,e,r);break e;case 14:t=c1(null,t,o,Zo(o.type,e),r);break e}throw Error(j(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),b0(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),d1(e,t,o,n,r);case 3:e:{if(JT(t),e===null)throw Error(j(387));o=t.pendingProps,a=t.memoizedState,n=a.element,LT(e,t),gg(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=iu(Error(j(423)),t),t=f1(e,t,o,r,n);break e}else if(o!==n){n=iu(Error(j(424)),t),t=f1(e,t,o,r,n);break e}else for(oo=di(t.stateNode.containerInfo.firstChild),no=t,st=!0,en=null,r=RT(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ou(),o===n){t=va(e,t,r);break e}Lr(e,t,o,r)}t=t.child}return t;case 5:return PT(t),e===null&&x0(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,p0(o,n)?i=null:a!==null&&p0(o,a)&&(t.flags|=32),ZT(e,t),Lr(e,t,i,r),t.child;case 6:return e===null&&x0(t),null;case 13:return ek(e,t,r);case 4:return iw(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=nu(t,null,o,r):Lr(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),u1(e,t,o,n,r);case 7:return Lr(e,t,t.pendingProps,r),t.child;case 8:return Lr(e,t,t.pendingProps.children,r),t.child;case 12:return Lr(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,Qe(pg,o._currentValue),o._currentValue=i,a!==null)if(on(a.value,i)){if(a.children===n.children&&!Hr.current){t=va(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=pa(-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),y0(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(j(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),y0(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}Lr(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Jl(t,r),n=Mo(n),o=o(n),t.flags|=1,Lr(e,t,o,r),t.child;case 14:return o=t.type,n=Zo(o,t.pendingProps),n=Zo(o.type,n),c1(e,t,o,n,r);case 15:return YT(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),Ym(e,t),t.tag=1,Ur(o)?(e=!0,cg(t)):e=!1,Jl(t,r),$T(t,o,n),C0(t,o,n,r),R0(null,t,o,!0,e,r);case 19:return tk(e,t,r);case 22:return QT(e,t,r)}throw Error(j(156,t.tag))};function vk(e,t){return W1(e,t)}function Fz(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 To(e,t,r,o){return new Fz(e,t,r,o)}function Cw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _z(e){if(typeof e=="function")return Cw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===H0)return 11;if(e===U0)return 14}return 2}function gi(e,t){var r=e.alternate;return r===null?(r=To(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 Jm(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")Cw(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Vl:return ys(r.children,n,a,t);case B0:i=8,n|=8;break;case qy:return e=To(12,r,t,n|2),e.elementType=qy,e.lanes=a,e;case jy:return e=To(13,r,t,n),e.elementType=jy,e.lanes=a,e;case $y:return e=To(19,r,t,n),e.elementType=$y,e.lanes=a,e;case P1:return Ng(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I1:i=10;break e;case L1:i=9;break e;case H0:i=11;break e;case U0:i=14;break e;case ri:i=16,o=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=To(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function ys(e,t,r,o){return e=To(7,e,o,t),e.lanes=r,e}function Ng(e,t,r,o){return e=To(22,e,o,t),e.elementType=P1,e.lanes=r,e.stateNode={isHidden:!1},e}function zy(e,t,r){return e=To(6,e,null,t),e.lanes=r,e}function Gy(e,t,r){return t=To(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vz(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=Ly(0),this.expirationTimes=Ly(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ly(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Sw(e,t,r,o,n,a,i,s,l){return e=new Vz(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=To(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},aw(a),e}function Bz(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_l,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function xk(e){if(!e)return vi;e=e._reactInternals;e:{if(Ls(e)!==e||e.tag!==1)throw Error(j(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(j(171))}if(e.tag===1){var r=e.type;if(Ur(r))return xT(e,r,t)}return t}function yk(e,t,r,o,n,a,i,s,l){return e=Sw(r,o,!0,e,n,a,i,s,l),e.context=xk(null),r=e.current,o=Pr(),n=mi(r),a=pa(o,n),a.callback=t??null,fi(r,a,n),e.current.lanes=n,Pd(e,n,o),zr(e,o),e}function Og(e,t,r,o){var n=t.current,a=Pr(),i=mi(n);return r=xk(r),t.context===null?t.context=r:t.pendingContext=r,t=pa(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=fi(n,t,i),e!==null&&(rn(e,n,i,a),$m(e,n,i)),i}function bg(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 S1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function bw(e,t){S1(e,t),(e=e.alternate)&&S1(e,t)}function Hz(){return null}var wk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rw(e){this._internalRoot=e}Fg.prototype.render=Rw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Og(e,t,null,null)};Fg.prototype.unmount=Rw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rs(function(){Og(null,e,null,null)}),t[ga]=null}};function Fg(e){this._internalRoot=e}Fg.prototype.unstable_scheduleHydration=function(e){if(e){var t=Q1();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ni.length&&t!==0&&t<ni[r].priority;r++);ni.splice(r,0,e),r===0&&J1(e)}};function Iw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _g(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function b1(){}function Uz(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=bg(i);a.call(u)}}var i=yk(t,o,e,0,null,!1,!1,"",b1);return e._reactRootContainer=i,e[ga]=i.current,xd(e.nodeType===8?e.parentNode:e),Rs(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=bg(l);s.call(u)}}var l=Sw(e,0,!1,null,null,!1,!1,"",b1);return e._reactRootContainer=l,e[ga]=l.current,xd(e.nodeType===8?e.parentNode:e),Rs(function(){Og(t,l,r,o)}),l}function Vg(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=bg(i);s.call(l)}}Og(t,i,e,n)}else i=Uz(r,t,e,n,o);return bg(i)}X1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Jc(t.pendingLanes);r!==0&&(W0(t,r|1),zr(t,bt()),!(Ae&6)&&(su=bt()+500,wi()))}break;case 13:Rs(function(){var o=ha(e,1);if(o!==null){var n=Pr();rn(o,e,1,n)}}),bw(e,1)}};q0=function(e){if(e.tag===13){var t=ha(e,134217728);if(t!==null){var r=Pr();rn(t,e,134217728,r)}bw(e,134217728)}};Y1=function(e){if(e.tag===13){var t=mi(e),r=ha(e,t);if(r!==null){var o=Pr();rn(r,e,t,o)}bw(e,t)}};Q1=function(){return We};Z1=function(e,t){var r=We;try{return We=e,t()}finally{We=r}};o0=function(e,t,r){switch(t){case"input":if(Yy(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=Tg(o);if(!n)throw Error(j(90));k1(o),Yy(o,n)}}}break;case"textarea":E1(e,r);break;case"select":t=r.value,t!=null&&Xl(e,!!r.multiple,t,!1)}};V1=xw;B1=Rs;var zz={usingClientEntryPoint:!1,Events:[kd,zl,Tg,F1,_1,xw]},Xc={findFiberByHostInstance:gs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Gz={bundleType:Xc.bundleType,version:Xc.version,rendererPackageName:Xc.rendererPackageName,rendererConfig:Xc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=z1(e),e===null?null:e.stateNode},findFiberByHostInstance:Xc.findFiberByHostInstance||Hz,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Yc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Yc.isDisabled&&Yc.supportsFiber))try{Rg=Yc.inject(Gz),Bn=Yc}catch{}var Yc;so.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zz;so.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Iw(t))throw Error(j(200));return Bz(e,t,null,r)};so.createRoot=function(e,t){if(!Iw(e))throw Error(j(299));var r=!1,o="",n=wk;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Sw(e,1,!1,null,null,r,!1,o,n),e[ga]=t.current,xd(e.nodeType===8?e.parentNode:e),new Rw(t)};so.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=z1(t),e=e===null?null:e.stateNode,e};so.flushSync=function(e){return Rs(e)};so.hydrate=function(e,t,r){if(!_g(t))throw Error(j(200));return Vg(null,e,t,!0,r)};so.hydrateRoot=function(e,t,r){if(!Iw(e))throw Error(j(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=wk;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=yk(t,null,e,1,r??null,n,!1,a,i),e[ga]=t.current,xd(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 Fg(t)};so.render=function(e,t,r){if(!_g(t))throw Error(j(200));return Vg(null,e,t,!1,r)};so.unmountComponentAtNode=function(e){if(!_g(e))throw Error(j(40));return e._reactRootContainer?(Rs(function(){Vg(null,null,e,!1,function(){e._reactRootContainer=null,e[ga]=null})}),!0):!1};so.unstable_batchedUpdates=xw;so.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!_g(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Vg(e,t,r,!1,o)};so.version="18.3.1-next-f1338f8080-20240426"});var Ci=Dn((XQ,bk)=>{"use strict";function Sk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Sk)}catch(e){console.error(e)}}Sk(),bk.exports=Ck()});var fM=Dn(dM=>{"use strict";var Ru=E();function $G(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KG=typeof Object.is=="function"?Object.is:$G,XG=Ru.useState,YG=Ru.useEffect,QG=Ru.useLayoutEffect,ZG=Ru.useDebugValue;function JG(e,t){var r=t(),o=XG({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return QG(function(){n.value=r,n.getSnapshot=t,Xw(n)&&a({inst:n})},[e,r,t]),YG(function(){return Xw(n)&&a({inst:n}),e(function(){Xw(n)&&a({inst:n})})},[e]),ZG(r),r}function Xw(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!KG(e,r)}catch{return!0}}function eW(e,t){return t()}var tW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eW:JG;dM.useSyncExternalStore=Ru.useSyncExternalStore!==void 0?Ru.useSyncExternalStore:tW});var mM=Dn((are,pM)=>{"use strict";pM.exports=fM()});var SQ={};uU(SQ,{Accordion:()=>iM,AccordionContent:()=>Gw,AccordionItem:()=>Uw,AccordionTrigger:()=>zw,Alert:()=>Ww,AlertDescription:()=>jw,AlertTitle:()=>qw,AspectRatio:()=>Kw,Avatar:()=>Yg,AvatarFallback:()=>Qg,AvatarGroup:()=>tC,AvatarImage:()=>eC,Badge:()=>jr,Breadcrumb:()=>oC,BreadcrumbEllipsis:()=>Zg,BreadcrumbItem:()=>aC,BreadcrumbLink:()=>sC,BreadcrumbList:()=>nC,BreadcrumbPage:()=>lC,BreadcrumbSeparator:()=>iC,Button:()=>Fe,Card:()=>vS,CardCVCInput:()=>kS,CardContent:()=>CS,CardDescription:()=>wS,CardExpiryInput:()=>TS,CardFooter:()=>SS,CardHeader:()=>xS,CardNumberInput:()=>PS,CardTitle:()=>yS,CardZipInput:()=>MS,Carousel:()=>FS,CarouselContent:()=>VS,CarouselItem:()=>HS,CarouselNext:()=>zS,CarouselPrevious:()=>US,Checkbox:()=>Av,CheckboxGroup:()=>qS,CheckboxLabel:()=>hp,CheckboxWithLabel:()=>jS,Collapsible:()=>ZN,CollapsibleContent:()=>YS,CollapsibleTrigger:()=>XS,ColorPicker:()=>ax,Command:()=>mx,CommandDialog:()=>C_,CommandEmpty:()=>Qb,CommandGroup:()=>Zb,CommandInput:()=>Xb,CommandItem:()=>eR,CommandList:()=>Yb,CommandSeparator:()=>Jb,CommandShortcut:()=>tR,DatePicker:()=>bR,DateRangePicker:()=>U_,DateTimePicker:()=>z_,Dialog:()=>dx,DialogClose:()=>x_,DialogContent:()=>Np,DialogDescription:()=>px,DialogFooter:()=>Kb,DialogForm:()=>w_,DialogHeader:()=>fx,DialogTitle:()=>Rc,DialogTrigger:()=>v_,DraggableList:()=>q_,DropdownMenu:()=>tB,DropdownMenuCheckboxItem:()=>XR,DropdownMenuContent:()=>$R,DropdownMenuGroup:()=>oB,DropdownMenuItem:()=>KR,DropdownMenuLabel:()=>QR,DropdownMenuPortal:()=>nB,DropdownMenuRadioGroup:()=>iB,DropdownMenuRadioItem:()=>YR,DropdownMenuSeparator:()=>ZR,DropdownMenuShortcut:()=>JR,DropdownMenuSub:()=>aB,DropdownMenuSubContent:()=>jR,DropdownMenuSubTrigger:()=>qR,DropdownMenuTrigger:()=>rB,FileUpload:()=>tI,FreeBadge:()=>wB,GestureDrawer:()=>rI,GitHubStarButton:()=>zK,GitHubStars:()=>cB,GradientPicker:()=>HF,Input:()=>rr,InputOTP:()=>aI,InputOTPGroup:()=>iI,InputOTPSeparator:()=>uI,InputOTPSlot:()=>lI,Label:()=>Dr,LockedComponent:()=>cI,MonthPicker:()=>G_,MoonLogo:()=>Ix,MoonLogoAnimated:()=>oX,MoonLogoIcon:()=>rX,MoonUIAccordion:()=>iM,MoonUIAccordionContent:()=>Gw,MoonUIAccordionItem:()=>Uw,MoonUIAccordionTrigger:()=>zw,MoonUIAlert:()=>Ww,MoonUIAlertDescription:()=>jw,MoonUIAlertTitle:()=>qw,MoonUIAspectRatio:()=>Kw,MoonUIAvatar:()=>Yg,MoonUIAvatarFallback:()=>Qg,MoonUIAvatarGroup:()=>tC,MoonUIAvatarImage:()=>eC,MoonUIBadge:()=>jr,MoonUIBreadcrumb:()=>oC,MoonUIBreadcrumbEllipsis:()=>Zg,MoonUIBreadcrumbItem:()=>aC,MoonUIBreadcrumbLink:()=>sC,MoonUIBreadcrumbList:()=>nC,MoonUIBreadcrumbPage:()=>lC,MoonUIBreadcrumbSeparator:()=>iC,MoonUIButton:()=>Fe,MoonUICalendar:()=>lc,MoonUICard:()=>vS,MoonUICardCVCInput:()=>kS,MoonUICardContent:()=>CS,MoonUICardDescription:()=>wS,MoonUICardExpiryInput:()=>TS,MoonUICardFooter:()=>SS,MoonUICardHeader:()=>xS,MoonUICardNumberInput:()=>PS,MoonUICardTitle:()=>yS,MoonUICardZipInput:()=>MS,MoonUICarousel:()=>FS,MoonUICarouselContent:()=>VS,MoonUICarouselItem:()=>HS,MoonUICarouselNext:()=>zS,MoonUICarouselPrevious:()=>US,MoonUICheckbox:()=>Av,MoonUICheckboxGroup:()=>qS,MoonUICheckboxLabel:()=>hp,MoonUICheckboxWithLabel:()=>jS,MoonUICollapsible:()=>ZN,MoonUICollapsibleContent:()=>YS,MoonUICollapsibleTrigger:()=>XS,MoonUIColorPicker:()=>ax,MoonUICommand:()=>mx,MoonUICommandDialog:()=>C_,MoonUICommandEmpty:()=>Qb,MoonUICommandGroup:()=>Zb,MoonUICommandInput:()=>Xb,MoonUICommandItem:()=>eR,MoonUICommandList:()=>Yb,MoonUICommandSeparator:()=>Jb,MoonUICommandShortcut:()=>tR,MoonUIDataTableBasic:()=>B_,MoonUIDatePicker:()=>bR,MoonUIDateRangePicker:()=>U_,MoonUIDateTimePicker:()=>z_,MoonUIDialog:()=>dx,MoonUIDialogClose:()=>x_,MoonUIDialogContent:()=>Np,MoonUIDialogDescription:()=>px,MoonUIDialogFooter:()=>Kb,MoonUIDialogHeader:()=>fx,MoonUIDialogTitle:()=>Rc,MoonUIDialogTrigger:()=>v_,MoonUIDraggableList:()=>q_,MoonUIDropdownMenu:()=>tB,MoonUIDropdownMenuCheckboxItem:()=>XR,MoonUIDropdownMenuContent:()=>$R,MoonUIDropdownMenuGroup:()=>oB,MoonUIDropdownMenuItem:()=>KR,MoonUIDropdownMenuLabel:()=>QR,MoonUIDropdownMenuPortal:()=>nB,MoonUIDropdownMenuRadioGroup:()=>iB,MoonUIDropdownMenuRadioItem:()=>YR,MoonUIDropdownMenuSeparator:()=>ZR,MoonUIDropdownMenuShortcut:()=>JR,MoonUIDropdownMenuSub:()=>aB,MoonUIDropdownMenuSubContent:()=>jR,MoonUIDropdownMenuSubTrigger:()=>qR,MoonUIDropdownMenuTrigger:()=>rB,MoonUIFileUpload:()=>tI,MoonUIFreeBadge:()=>wB,MoonUIGestureDrawer:()=>rI,MoonUIGitHubStars:()=>cB,MoonUIGradientPicker:()=>HF,MoonUIInput:()=>rr,MoonUIInputOTP:()=>aI,MoonUIInputOTPGroup:()=>iI,MoonUIInputOTPSeparator:()=>uI,MoonUIInputOTPSlot:()=>lI,MoonUILabel:()=>Dr,MoonUILockedComponent:()=>cI,MoonUIMonthPicker:()=>G_,MoonUIMoonLogo:()=>Ix,MoonUIPagination:()=>fI,MoonUIPaginationContent:()=>pI,MoonUIPaginationEllipsis:()=>vI,MoonUIPaginationItem:()=>mI,MoonUIPaginationLink:()=>Yp,MoonUIPaginationNext:()=>hI,MoonUIPaginationPrevious:()=>gI,MoonUIPhoneInput:()=>FI,MoonUIPopover:()=>ta,MoonUIPopoverContent:()=>Sn,MoonUIPopoverTrigger:()=>ra,MoonUIProBadge:()=>yB,MoonUIProComponentWrapper:()=>xB,MoonUIProgress:()=>Kp,MoonUIRadioGroup:()=>_I,MoonUIRadioGroupItem:()=>Ax,MoonUIRadioItemWithLabel:()=>VI,MoonUIRadioLabel:()=>Dx,MoonUIRichTextEditor:()=>dH,MoonUIScrollArea:()=>qI,MoonUIScrollBar:()=>Ux,MoonUIScrollReveal:()=>jI,MoonUIScrollRevealContainer:()=>$I,MoonUIScrollRevealItem:()=>KI,MoonUISelect:()=>Tl,MoonUISelectContent:()=>Ml,MoonUISelectGroup:()=>lH,MoonUISelectItem:()=>Sr,MoonUISelectLabel:()=>NI,MoonUISelectScrollDownButton:()=>Ex,MoonUISelectScrollUpButton:()=>Mx,MoonUISelectSeparator:()=>OI,MoonUISelectTrigger:()=>kl,MoonUISelectValue:()=>Tc,MoonUISeparator:()=>yo,MoonUISimpleColorPicker:()=>BF,MoonUISimpleEditor:()=>aL,MoonUISkeleton:()=>Qa,MoonUISkeletonAvatar:()=>Xx,MoonUISkeletonCard:()=>sL,MoonUISkeletonText:()=>Kx,MoonUISlider:()=>na,MoonUISwipeableCard:()=>lL,MoonUISwitch:()=>cL,MoonUITable:()=>Vp,MoonUITableBody:()=>Hp,MoonUITableCaption:()=>wR,MoonUITableCell:()=>Ic,MoonUITableFooter:()=>yR,MoonUITableHead:()=>Up,MoonUITableHeader:()=>Bp,MoonUITableRow:()=>Sl,MoonUITabs:()=>Tp,MoonUITabsContent:()=>yl,MoonUITabsList:()=>kp,MoonUITabsTrigger:()=>xl,MoonUITagsInput:()=>dL,MoonUITextarea:()=>fL,MoonUIToast:()=>ry,MoonUIToastAction:()=>TL,MoonUIToastClose:()=>oy,MoonUIToastDescription:()=>ay,MoonUIToastProvider:()=>PL,MoonUIToastTitle:()=>ny,MoonUIToastViewport:()=>ty,MoonUIToaster:()=>Q3,MoonUIToggle:()=>om,MoonUITooltip:()=>im,MoonUITooltipContent:()=>Nc,MoonUITooltipProvider:()=>$x,MoonUITooltipTrigger:()=>sm,Pagination:()=>fI,PaginationContent:()=>pI,PaginationEllipsis:()=>vI,PaginationItem:()=>mI,PaginationLink:()=>Yp,PaginationNext:()=>hI,PaginationPrevious:()=>gI,Palette:()=>As,PhoneInput:()=>FI,Pipette:()=>of,Popover:()=>ta,PopoverAnchor:()=>Y$,PopoverClose:()=>Q$,PopoverContent:()=>Sn,PopoverFooter:()=>xF,PopoverHeader:()=>vF,PopoverSeparator:()=>hF,PopoverTrigger:()=>ra,ProBadge:()=>yB,ProComponentWrapper:()=>xB,Progress:()=>Kp,REGEXP_ONLY_CHARS:()=>hB,REGEXP_ONLY_DIGITS:()=>gB,REGEXP_ONLY_DIGITS_AND_CHARS:()=>vB,RadioGroup:()=>_I,RadioGroupItem:()=>Ax,RadioItemWithLabel:()=>VI,RadioLabel:()=>Dx,RichTextEditor:()=>dH,ScrollArea:()=>qI,ScrollBar:()=>Ux,ScrollReveal:()=>jI,ScrollRevealContainer:()=>$I,ScrollRevealItem:()=>KI,Select:()=>Tl,SelectContent:()=>Ml,SelectGroup:()=>lH,SelectItem:()=>Sr,SelectLabel:()=>NI,SelectScrollDownButton:()=>Ex,SelectScrollUpButton:()=>Mx,SelectSeparator:()=>OI,SelectTrigger:()=>kl,SelectValue:()=>Tc,Separator:()=>yo,SimpleColorPicker:()=>BF,SimpleEditor:()=>aL,SimpleTooltip:()=>I3,Skeleton:()=>Qa,SkeletonAvatar:()=>Xx,SkeletonCard:()=>sL,SkeletonText:()=>Kx,Slider:()=>na,SwipeableCard:()=>lL,Switch:()=>cL,Table:()=>Vp,TableBody:()=>Hp,TableCaption:()=>wR,TableCell:()=>Ic,TableFooter:()=>yR,TableHead:()=>Up,TableHeader:()=>Bp,TableRow:()=>Sl,Tabs:()=>Tp,TabsContent:()=>yl,TabsList:()=>kp,TabsTrigger:()=>xl,TagsInput:()=>dL,Textarea:()=>fL,Toast:()=>ry,ToastAction:()=>TL,ToastClose:()=>oy,ToastDescription:()=>ay,ToastProvider:()=>PL,ToastTitle:()=>ny,ToastViewport:()=>ty,Toaster:()=>Q3,Toggle:()=>om,Tooltip:()=>im,TooltipArrow:()=>nL,TooltipContent:()=>Nc,TooltipProvider:()=>$x,TooltipTrigger:()=>sm,aspectRatioVariants:()=>cM,badgeVariants:()=>rC,buttonVariants:()=>hf,carouselContentVariants:()=>_S,carouselItemVariants:()=>BS,cn:()=>L,collapsibleContentVariants:()=>JN,collapsibleTriggerVariants:()=>$S,format:()=>Oo,inputOTPSlotVariants:()=>sI,moonUIBadgeVariants:()=>rC,moonUIButtonVariants:()=>hf,moonUICarouselContentVariants:()=>_S,moonUICarouselItemVariants:()=>BS,moonUICreateSortableHeader:()=>H_,moonUIInputOTPSlotVariants:()=>sI,moonUISkeletonVariants:()=>iL,moonUIToggleVariants:()=>QI,popoverContentVariants:()=>gF,progressVariants:()=>lB,separatorVariants:()=>$H,skeletonVariants:()=>iL,toast:()=>kL,toggleVariants:()=>QI,tooltipVariants:()=>R3,useCarousel:()=>uc,useToast:()=>ML});module.exports=cU(SQ);var Xg=R(E());var Wr=R(E(),1);var bo=R(E(),1),fy=R(D(),1);function eP(e,t){let r=bo.createContext(t),o=a=>{let{children:i,...s}=a,l=bo.useMemo(()=>s,Object.values(s));return(0,fy.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=bo.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 Oe(e,t=[]){let r=[];function o(a,i){let s=bo.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,y=bo.useMemo(()=>m,Object.values(m));return(0,fy.jsx)(g.Provider,{value:y,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,m=bo.useContext(p);if(m)return m;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=>bo.createContext(i));return function(s){let l=s?.[e]||a;return bo.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,AU(n,...t)]}function AU(...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 bo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Ja=R(E(),1);var rP=R(E(),1);function tP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eo(...e){return t=>{let r=!1,o=e.map(n=>{let a=tP(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():tP(e[n],null)}}}}function de(...e){return rP.useCallback(eo(...e),e)}var Et=R(E(),1);var Nl=R(D(),1);function to(e){let t=DU(e),r=Et.forwardRef((o,n)=>{let{children:a,...i}=o,s=Et.Children.toArray(a),l=s.find(NU);if(l){let u=l.props.children,c=s.map(d=>d===l?Et.Children.count(u)>1?Et.Children.only(null):Et.isValidElement(u)?u.props.children:null:d);return(0,Nl.jsx)(t,{...i,ref:n,children:Et.isValidElement(u)?Et.cloneElement(u,void 0,c):null})}return(0,Nl.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function DU(e){let t=Et.forwardRef((r,o)=>{let{children:n,...a}=r;if(Et.isValidElement(n)){let i=FU(n),s=OU(a,n.props);return n.type!==Et.Fragment&&(s.ref=o?eo(o,i):i),Et.cloneElement(n,s)}return Et.Children.count(n)>1?Et.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oP=Symbol("radix.slottable");function nP(e){let t=({children:r})=>(0,Nl.jsx)(Nl.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=oP,t}function NU(e){return Et.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oP}function OU(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 FU(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 xm=R(D(),1),_U=R(E(),1);var VU=R(D(),1);function Nn(e){let t=e+"CollectionProvider",[r,o]=Oe(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{let{scope:y,children:h}=g,v=Ja.default.useRef(null),x=Ja.default.useRef(new Map).current;return(0,xm.jsx)(n,{scope:y,itemMap:x,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=to(s),u=Ja.default.forwardRef((g,y)=>{let{scope:h,children:v}=g,x=a(s,h),w=de(y,x.collectionRef);return(0,xm.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=to(c),p=Ja.default.forwardRef((g,y)=>{let{scope:h,children:v,...x}=g,w=Ja.default.useRef(null),C=de(y,w),b=a(c,h);return Ja.default.useEffect(()=>(b.itemMap.set(w,{ref:w,...x}),()=>void b.itemMap.delete(w))),(0,xm.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function m(g){let y=a(e+"CollectionConsumer",g);return Ja.default.useCallback(()=>{let v=y.collectionRef.current;if(!v)return[];let x=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((b,S)=>x.indexOf(b.ref.current)-x.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},m,o]}var HQ=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Ro=R(E(),1);var aP=R(E(),1),Ve=globalThis?.document?aP.useLayoutEffect:()=>{};var ym=R(E(),1);var BU=Ro[" useInsertionEffect ".trim().toString()]||Ve;function $e({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=HU({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Ro.useRef(e!==void 0);Ro.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=Ro.useCallback(c=>{if(s){let d=UU(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function HU({defaultProp:e,onChange:t}){let[r,o]=Ro.useState(e),n=Ro.useRef(r),a=Ro.useRef(t);return BU(()=>{a.current=t},[t]),Ro.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function UU(e){return typeof e=="function"}var WQ=Symbol("RADIX:SYNC_STATE");var Rk=R(E(),1),Ik=R(Ci(),1);var Lk=R(D(),1),Wz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=Wz.reduce((e,t)=>{let r=to(`Primitive.${t}`),o=Rk.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,Lk.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function cu(e,t){e&&Ik.flushSync(()=>e.dispatchEvent(t))}var Jt=R(E(),1);var Gr=R(E(),1);var Pk=R(E(),1);function qz(e,t){return Pk.useReducer((r,o)=>t[r][o]??r,e)}var lt=e=>{let{present:t,children:r}=e,o=jz(t),n=typeof r=="function"?r({present:o.isPresent}):Gr.Children.only(r),a=de(o.ref,$z(n));return typeof r=="function"||o.isPresent?Gr.cloneElement(n,{ref:a}):null};lt.displayName="Presence";function jz(e){let[t,r]=Gr.useState(),o=Gr.useRef(null),n=Gr.useRef(e),a=Gr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=qz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Gr.useEffect(()=>{let u=Bg(o.current);a.current=s==="mounted"?u:"none"},[s]),Ve(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=Bg(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),Ve(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let g=Bg(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(l("ANIMATION_END"),!n.current)){let y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=p=>{p.target===t&&(a.current=Bg(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:Gr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Bg(e){return e?.animationName||"none"}function $z(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 Lw=R(E(),1);var Kz=Lw[" useId ".trim().toString()]||(()=>{}),Xz=0;function De(e){let[t,r]=Lw.useState(Kz());return Ve(()=>{e||r(o=>o??String(Xz++))},[e]),e||(t?`radix-${t}`:"")}var Ps=R(D(),1),Hg="Collapsible",[Yz,Pw]=Oe(Hg),[Qz,Tw]=Yz(Hg),Tk=Jt.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=$e({prop:o,defaultProp:n??!1,onChange:i,caller:Hg});return(0,Ps.jsx)(Qz,{scope:r,disabled:a,contentId:De(),open:l,onOpenToggle:Jt.useCallback(()=>u(c=>!c),[u]),children:(0,Ps.jsx)($.div,{"data-state":Mw(l),"data-disabled":a?"":void 0,...s,ref:t})})});Tk.displayName=Hg;var kk="CollapsibleTrigger",Mk=Jt.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=Tw(kk,r);return(0,Ps.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Mw(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});Mk.displayName=kk;var kw="CollapsibleContent",Ek=Jt.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Tw(kw,e.__scopeCollapsible);return(0,Ps.jsx)(lt,{present:r||n.open,children:({present:a})=>(0,Ps.jsx)(Zz,{...o,ref:t,present:a})})});Ek.displayName=kw;var Zz=Jt.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=Tw(kw,r),[s,l]=Jt.useState(o),u=Jt.useRef(null),c=de(t,u),d=Jt.useRef(0),f=d.current,p=Jt.useRef(0),m=p.current,g=i.open||s,y=Jt.useRef(g),h=Jt.useRef(void 0);return Jt.useEffect(()=>{let v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),Ve(()=>{let v=u.current;if(v){h.current=h.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";let x=v.getBoundingClientRect();d.current=x.height,p.current=x.width,y.current||(v.style.transitionDuration=h.current.transitionDuration,v.style.animationName=h.current.animationName),l(o)}},[i.open,o]),(0,Ps.jsx)($.div,{"data-state":Mw(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&n})});function Mw(e){return e?"open":"closed"}var Ug=Tk,du=Mk,Ed=Ek;var zg=R(E(),1),Jz=R(D(),1),e5=zg.createContext(void 0);function Un(e){let t=zg.useContext(e5);return e||t||"ltr"}var Nt=R(D(),1),nn="Accordion",t5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Aw,r5,o5]=Nn(nn),[Wg,CZ]=Oe(nn,[o5,Pw]),Dw=Pw(),Dk=Wr.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,Nt.jsx)(Aw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Nt.jsx)(s5,{...a,ref:t}):(0,Nt.jsx)(i5,{...n,ref:t})})});Dk.displayName=nn;var[Nk,n5]=Wg(nn),[Ok,a5]=Wg(nn,{collapsible:!1}),i5=Wr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=$e({prop:r,defaultProp:o??"",onChange:n,caller:nn});return(0,Nt.jsx)(Nk,{scope:e.__scopeAccordion,value:Wr.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Wr.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Nt.jsx)(Ok,{scope:e.__scopeAccordion,collapsible:a,children:(0,Nt.jsx)(Fk,{...i,ref:t})})})}),s5=Wr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=$e({prop:r,defaultProp:o??[],onChange:n,caller:nn}),l=Wr.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Wr.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,Nt.jsx)(Nk,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Nt.jsx)(Ok,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Nt.jsx)(Fk,{...a,ref:t})})})}),[l5,qg]=Wg(nn),Fk=Wr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=Wr.default.useRef(null),l=de(s,t),u=r5(r),d=Un(n)==="ltr",f=W(e.onKeyDown,p=>{if(!t5.includes(p.key))return;let m=p.target,g=u().filter(I=>!I.ref.current?.disabled),y=g.findIndex(I=>I.ref.current===m),h=g.length;if(y===-1)return;p.preventDefault();let v=y,x=0,w=h-1,C=()=>{v=y+1,v>w&&(v=x)},b=()=>{v=y-1,v<x&&(v=w)};switch(p.key){case"Home":v=x;break;case"End":v=w;break;case"ArrowRight":a==="horizontal"&&(d?C():b());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?b():C());break;case"ArrowUp":a==="vertical"&&b();break}let S=v%h;g[S].ref.current?.focus()});return(0,Nt.jsx)(l5,{scope:r,disabled:o,direction:n,orientation:a,children:(0,Nt.jsx)(Aw.Slot,{scope:r,children:(0,Nt.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),Gg="AccordionItem",[u5,Nw]=Wg(Gg),_k=Wr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=qg(Gg,r),i=n5(Gg,r),s=Dw(r),l=De(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,Nt.jsx)(u5,{scope:r,open:u,disabled:c,triggerId:l,children:(0,Nt.jsx)(Ug,{"data-orientation":a.orientation,"data-state":Gk(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});_k.displayName=Gg;var Vk="AccordionHeader",Bk=Wr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=qg(nn,r),a=Nw(Vk,r);return(0,Nt.jsx)($.h3,{"data-orientation":n.orientation,"data-state":Gk(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});Bk.displayName=Vk;var Ew="AccordionTrigger",Hk=Wr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=qg(nn,r),a=Nw(Ew,r),i=a5(Ew,r),s=Dw(r);return(0,Nt.jsx)(Aw.ItemSlot,{scope:r,children:(0,Nt.jsx)(du,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});Hk.displayName=Ew;var Uk="AccordionContent",zk=Wr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=qg(nn,r),a=Nw(Uk,r),i=Dw(r);return(0,Nt.jsx)(Ed,{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}})});zk.displayName=Uk;function Gk(e){return e?"open":"closed"}var Wk=Dk,qk=_k,jk=Bk,Ow=Hk,Fw=zk;var $g=R(E());var $k=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),d5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),_w=e=>{let t=d5(e);return t.charAt(0).toUpperCase()+t.slice(1)},jg=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),Kk=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ad=R(E());var Xk={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 Yk=(0,Ad.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Ad.createElement)("svg",{ref:l,...Xk,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:jg("lucide",n),...!a&&!Kk(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Ad.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var B=(e,t)=>{let r=(0,$g.forwardRef)(({className:o,...n},a)=>(0,$g.createElement)(Yk,{ref:a,iconNode:t,className:jg(`lucide-${$k(_w(e))}`,`lucide-${e}`,o),...n}));return r.displayName=_w(e),r};var f5=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Dd=B("align-center",f5);var p5=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Nd=B("align-justify",p5);var m5=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Od=B("align-left",m5);var g5=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Fd=B("align-right",g5);var h5=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],fu=B("arrow-down",h5);var v5=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_d=B("arrow-left",v5);var x5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Vd=B("arrow-right",x5);var y5=[["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"}]],pu=B("arrow-up-down",y5);var w5=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],mu=B("arrow-up",w5);var C5=[["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"}]],Bd=B("bold",C5);var S5=[["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"}]],Ts=B("calendar",S5);var b5=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],dr=B("check",b5);var R5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zn=B("chevron-down",R5);var I5=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],an=B("chevron-left",I5);var L5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],kr=B("chevron-right",L5);var P5=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Hd=B("chevron-up",P5);var T5=[["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"}]],sn=B("circle-alert",T5);var k5=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Si=B("circle-check-big",k5);var M5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ks=B("circle",M5);var E5=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ud=B("clock",E5);var A5=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],zd=B("code",A5);var D5=[["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"}]],Gd=B("copy",D5);var N5=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Wd=B("credit-card",N5);var O5=[["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"}]],gu=B("crown",O5);var F5=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],qd=B("dot",F5);var _5=[["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"}]],Gn=B("ellipsis",_5);var V5=[["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"}]],jd=B("external-link",V5);var B5=[["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"}]],Ms=B("eye",B5);var H5=[["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"}]],$d=B("file-text",H5);var U5=[["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"}]],Kd=B("file",U5);var z5=[["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"}]],Xd=B("git-fork",z5);var G5=[["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"}]],Es=B("image",G5);var W5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hu=B("info",W5);var q5=[["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"}]],Yd=B("italic",q5);var j5=[["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"}]],Qd=B("link",j5);var $5=[["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"}]],Zd=B("list-ordered",$5);var K5=[["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"}]],Jd=B("list",K5);var X5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ot=B("loader-circle",X5);var Y5=[["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"}]],vu=B("lock",Y5);var Q5=[["path",{d:"M5 12h14",key:"1ays0h"}]],ef=B("minus",Q5);var Z5=[["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"}]],tf=B("music",Z5);var J5=[["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"}]],As=B("palette",J5);var eG=[["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"}]],rf=B("phone",eG);var tG=[["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"}]],of=B("pipette",tG);var rG=[["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"}]],nf=B("quote",rG);var oG=[["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"}]],af=B("redo",oG);var nG=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ds=B("search",nG);var aG=[["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"}]],qr=B("square-pen",aG);var iG=[["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"}]],xu=B("star",iG);var sG=[["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"}]],sf=B("strikethrough",sG);var lG=[["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"}]],bi=B("triangle-alert",lG);var uG=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],lf=B("underline",uG);var cG=[["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"}]],uf=B("undo",cG);var dG=[["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"}]],cf=B("upload",dG);var fG=[["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"}]],df=B("video",fG);var pG=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lo=B("x",pG);var mG=[["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"}]],yu=B("zap",mG);function Qk(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=Qk(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Kg(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Qk(e))&&(o&&(o+=" "),o+=t);return o}var Hw="-",gG=e=>{let t=vG(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(Hw);return s[0]===""&&s.length!==1&&s.shift(),eM(s,t)||hG(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},eM=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?eM(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(Hw);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Zk=/^\[(.+)\]$/,hG=e=>{if(Zk.test(e)){let t=Zk.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},vG=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return yG(Object.entries(e.classGroups),r).forEach(([a,i])=>{Bw(i,o,a,t)}),o},Bw=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:Jk(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(xG(n)){Bw(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{Bw(i,Jk(t,a),r,o)})})},Jk=(e,t)=>{let r=e;return t.split(Hw).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},xG=e=>e.isThemeGetter,yG=(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,wG=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)}}},tM="!",CG=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 y=0;y<s.length;y++){let h=s[y];if(u===0){if(h===n&&(o||s.slice(y,y+a)===t)){l.push(s.slice(c,y)),c=y+a;continue}if(h==="/"){d=y;continue}}h==="["?u++:h==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(tM),m=p?f.substring(1):f,g=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:i}):i},SG=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},bG=e=>({cache:wG(e.cacheSize),parseClassName:CG(e),...gG(e)}),RG=/\s+/,IG=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(RG),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),m=!!p,g=o(m?f.substring(0,p):f);if(!g){if(!m){s=u+(s.length>0?" "+s:s);continue}if(g=o(f),!g){s=u+(s.length>0?" "+s:s);continue}m=!1}let y=SG(c).join(":"),h=d?y+tM:y,v=h+g;if(a.includes(v))continue;a.push(v);let x=n(g,m);for(let w=0;w<x.length;++w){let C=x[w];a.push(h+C)}s=u+(s.length>0?" "+s:s)}return s};function LG(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=rM(t))&&(o&&(o+=" "),o+=r);return o}var rM=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=rM(e[o]))&&(r&&(r+=" "),r+=t);return r};function PG(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=bG(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=IG(l,r);return n(l,c),c}return function(){return a(LG.apply(null,arguments))}}var ot=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},oM=/^\[(?:([a-z-]+):)?(.+)\]$/i,TG=/^\d+\/\d+$/,kG=new Set(["px","full","screen"]),MG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EG=/\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$/,AG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ya=e=>wu(e)||kG.has(e)||TG.test(e),Ri=e=>Cu(e,"length",zG),wu=e=>!!e&&!Number.isNaN(Number(e)),Vw=e=>Cu(e,"number",wu),ff=e=>!!e&&Number.isInteger(Number(e)),OG=e=>e.endsWith("%")&&wu(e.slice(0,-1)),Le=e=>oM.test(e),Ii=e=>MG.test(e),FG=new Set(["length","size","percentage"]),_G=e=>Cu(e,FG,nM),VG=e=>Cu(e,"position",nM),BG=new Set(["image","url"]),HG=e=>Cu(e,BG,WG),UG=e=>Cu(e,"",GG),pf=()=>!0,Cu=(e,t,r)=>{let o=oM.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},zG=e=>EG.test(e)&&!AG.test(e),nM=()=>!1,GG=e=>DG.test(e),WG=e=>NG.test(e);var qG=()=>{let e=ot("colors"),t=ot("spacing"),r=ot("blur"),o=ot("brightness"),n=ot("borderColor"),a=ot("borderRadius"),i=ot("borderSpacing"),s=ot("borderWidth"),l=ot("contrast"),u=ot("grayscale"),c=ot("hueRotate"),d=ot("invert"),f=ot("gap"),p=ot("gradientColorStops"),m=ot("gradientColorStopPositions"),g=ot("inset"),y=ot("margin"),h=ot("opacity"),v=ot("padding"),x=ot("saturate"),w=ot("scale"),C=ot("sepia"),b=ot("skew"),S=ot("space"),I=ot("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Le,t],A=()=>[Le,t],F=()=>["",ya,Ri],N=()=>["auto",wu,Le],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",Le],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[wu,Le];return{cacheSize:500,separator:":",theme:{colors:[pf],spacing:[ya,Ri],blur:["none","",Ii,Le],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Ii,Le],borderSpacing:A(),borderWidth:F(),contrast:ae(),grayscale:k(),hueRotate:ae(),invert:k(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[OG,Ri],inset:M(),margin:M(),opacity:ae(),padding:A(),saturate:ae(),scale:ae(),sepia:k(),skew:ae(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[Ii]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"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:[...H(),Le]}],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:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ff,Le]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",ff,Le]}],"grid-cols":[{"grid-cols":[pf]}],"col-start-end":[{col:["auto",{span:["full",ff,Le]},Le]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[pf]}],"row-start-end":[{row:["auto",{span:[ff,Le]},Le]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"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",Le,t]}],"min-w":[{"min-w":[Le,t,"min","max","fit"]}],"max-w":[{"max-w":[Le,t,"none","full","min","max","fit","prose",{screen:[Ii]},Ii]}],h:[{h:[Le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ii,Ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vw]}],"font-family":[{font:[pf]}],"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",Le]}],"line-clamp":[{"line-clamp":["none",wu,Vw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ya,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ya,Ri]}],"underline-offset":[{"underline-offset":["auto",ya,Le]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],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",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),VG]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_G]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HG]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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":[h]}],"border-style":[{border:[...O(),"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":[h]}],"divide-style":[{divide:O()}],"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:["",...O()]}],"outline-offset":[{"outline-offset":[ya,Le]}],"outline-w":[{outline:[ya,Ri]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[ya,Ri]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ii,UG]}],"shadow-color":[{shadow:[pf]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ii,Le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],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":[h]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"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",Le]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[ff,Le]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],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",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ya,Ri,Vw]}],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 aM=PG(qG);function L(...e){return aM(Kg(e))}var Li=R(D()),iM=Wk,Uw=Xg.forwardRef(({className:e,...t},r)=>(0,Li.jsx)(qk,{ref:r,className:L("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));Uw.displayName="AccordionItem";var zw=Xg.forwardRef(({className:e,children:t,...r},o)=>(0,Li.jsx)(jk,{className:"flex",children:(0,Li.jsxs)(Ow,{ref:o,className:L("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,Li.jsx)(zn,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));zw.displayName=Ow.displayName;var Gw=Xg.forwardRef(({className:e,children:t,...r},o)=>(0,Li.jsx)(Fw,{ref:o,className:L("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,Li.jsx)("div",{className:"pb-4 pt-0",children:t})}));Gw.displayName=Fw.displayName;var Su=R(E());var sM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lM=Kg,te=(e,t)=>r=>{var o;if(t?.variants==null)return lM(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=sM(c)||sM(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(m=>{let[g,y]=m;return Array.isArray(y)?y.includes({...a,...s}[g]):{...a,...s}[g]===y})?[...u,d,f]:u},[]);return lM(e,i,l,r?.class,r?.className)};var wa=R(D()),jG=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}}),Ww=Su.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=Su.useMemo(()=>{switch(t){case"success":return dr;case"warning":return bi;case"error":return sn;case"info":return hu;default:return hu}},[t]);return(0,wa.jsxs)("div",{ref:u,role:"alert",className:L("moonui-theme",jG({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,wa.jsx)(c,{className:"h-5 w-5"}),(0,wa.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,wa.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,wa.jsx)(lo,{className:"h-4 w-4"})})]})});Ww.displayName="Alert";var qw=Su.forwardRef(({className:e,...t},r)=>(0,wa.jsx)("h5",{ref:r,className:L("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));qw.displayName="AlertTitle";var jw=Su.forwardRef(({className:e,...t},r)=>(0,wa.jsx)("div",{ref:r,className:L("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));jw.displayName="AlertDescription";var uM=R(E());var $w=R(D()),cM=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"}}),Kw=uM.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,$w.jsx)("div",{ref:s,className:L("moonui-theme",cM({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,$w.jsx)("div",{className:"absolute inset-0",children:a})}));Kw.displayName="AspectRatio";var gf=R(E());var Ao=R(E(),1);var bu=R(E(),1);function nt(e){let t=bu.useRef(e);return bu.useEffect(()=>{t.current=e}),bu.useMemo(()=>(...r)=>t.current?.(...r),[])}var gM=R(mM(),1);function hM(){return(0,gM.useSyncExternalStore)(rW,()=>!0,()=>!1)}function rW(){return()=>{}}var mf=R(D(),1),Yw="Avatar",[oW,fre]=Oe(Yw),[nW,xM]=oW(Yw),yM=Ao.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=Ao.useState("idle");return(0,mf.jsx)(nW,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,mf.jsx)($.span,{...o,ref:t})})});yM.displayName=Yw;var wM="AvatarImage",CM=Ao.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=xM(wM,r),s=aW(o,a),l=nt(u=>{n(u),i.onImageLoadingStatusChange(u)});return Ve(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,mf.jsx)($.img,{...a,ref:t,src:o}):null});CM.displayName=wM;var SM="AvatarFallback",bM=Ao.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=xM(SM,r),[i,s]=Ao.useState(o===void 0);return Ao.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,mf.jsx)($.span,{...n,ref:t}):null});bM.displayName=SM;function vM(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function aW(e,{referrerPolicy:t,crossOrigin:r}){let o=hM(),n=Ao.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Ao.useState(()=>vM(a,e));return Ve(()=>{s(vM(a,e))},[a,e]),Ve(()=>{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 Qw=yM,Zw=CM,Jw=bM;var ln=R(D()),sW=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"}}),Yg=gf.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,ln.jsx)(Qw,{ref:a,className:L("moonui-theme",sW({size:t,radius:r,variant:o}),e),...n}));Yg.displayName=Qw.displayName;var eC=gf.forwardRef(({className:e,...t},r)=>(0,ln.jsx)(Zw,{ref:r,className:L("moonui-theme","aspect-square h-full w-full",e),...t}));eC.displayName=Zw.displayName;var Qg=gf.forwardRef(({className:e,...t},r)=>(0,ln.jsx)(Jw,{ref:r,className:L("flex h-full w-full items-center justify-center bg-muted",e),...t}));Qg.displayName=Jw.displayName;var tC=gf.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,ln.jsx)("div",{ref:a,className:L("moonui-theme","flex items-center",e),...n,children:(0,ln.jsxs)("div",{className:"flex",children:[i.map((l,u)=>(0,ln.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${o}px`,zIndex:i.length-u},children:l},u)),s>0&&(0,ln.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,ln.jsx)(Yg,{variant:"border",children:(0,ln.jsxs)(Qg,{children:["+",s]})})})]})})});tC.displayName="AvatarGroup";var fr=R(D()),rC=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 jr({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,m=d;return t==="pro"&&(p=l||(0,fr.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,fr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,fr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,fr.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),m=d||"Pro"),t==="admin"&&(p=l||(0,fr.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,fr.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"})}),m=d||"Admin Pro"),(0,fr.jsxs)("div",{className:L("moonui-theme",rC({variant:t,size:r,radius:o}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,fr.jsx)("span",{className:L("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,fr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,fr.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,fr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,fr.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(),s()},"aria-label":"Remove badge",children:(0,fr.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,fr.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 Wn=R(E());var Mr=R(D()),lW=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"}}),oC=Wn.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Mr.jsx)("nav",{ref:n,className:L("moonui-theme",lW({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));oC.displayName="Breadcrumb";var nC=Wn.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=Wn.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Mr.jsxs)("ol",{ref:n,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Mr.jsx)(Zg,{}),l]})}return(0,Mr.jsx)("ol",{ref:n,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});nC.displayName="BreadcrumbList";var aC=Wn.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?Wn.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Mr.jsx)("li",{ref:a,className:L("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Mr.jsx)(i,{className:L("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})})});aC.displayName="BreadcrumbItem";var iC=({children:e,className:t,...r})=>(0,Mr.jsx)("span",{role:"presentation","aria-hidden":"true",className:L("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Mr.jsx)(kr,{className:"h-3.5 w-3.5"})});iC.displayName="BreadcrumbSeparator";var Zg=({className:e,...t})=>(0,Mr.jsxs)("span",{role:"presentation","aria-hidden":"true",className:L("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Mr.jsx)(Gn,{className:"h-4 w-4"}),(0,Mr.jsx)("span",{className:"sr-only",children:"More pages"})]});Zg.displayName="BreadcrumbEllipsis";var sC=Wn.forwardRef(({className:e,href:t,...r},o)=>(0,Mr.jsx)("a",{ref:o,href:t,className:L("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...r}));sC.displayName="BreadcrumbLink";var lC=Wn.forwardRef(({className:e,...t},r)=>(0,Mr.jsx)("span",{ref:r,className:L("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));lC.displayName="BreadcrumbPage";var RM=R(E());var Jg=R(D()),hf=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}}),Fe=RM.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,Jg.jsxs)("button",{className:L("moonui-theme",hf({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"data-loading":i?"":void 0,...d,children:[i&&(0,Jg.jsx)(Ot,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Fe.displayName="Button";var tl=R(E());var ep=R(D(),1),Kn=R(E(),1);var IM=R(E(),1),Iu=(0,IM.createContext)({});var LM=R(E(),1);function qn(e){let t=(0,LM.useRef)(null);return t.current===null&&(t.current=e()),t.current}var eh=R(E(),1);var Lu=typeof window<"u";var Pu=Lu?eh.useLayoutEffect:eh.useEffect;var zC=R(D(),1),AE=R(E(),1),Zf=R(E(),1);var PM=R(E(),1),Pi=(0,PM.createContext)(null);var ME=R(D(),1);function Ns(e,t){e.indexOf(t)===-1&&e.push(t)}function un(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Wt=(e,t,r)=>r>t?t:r<e?e:r;var Ca=()=>{},er=()=>{};var pr={};var vf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xf(e){return typeof e=="object"&&e!==null}var yf=e=>/^0[^.\s]+$/u.test(e);function Os(e){let t;return()=>(t===void 0&&(t=e()),t)}var gt=e=>e;var uW=(e,t)=>r=>t(e(r)),cn=(...e)=>e.reduce(uW);var Do=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var Sa=class{constructor(){this.subscriptions=[]}add(t){return Ns(this.subscriptions,t),()=>un(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 Rt=e=>e*1e3,Ft=e=>e/1e3;function wf(e,t){return t?e*(1e3/t):0}var TM=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var kM=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,cW=1e-7,dW=12;function fW(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=kM(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>cW&&++s<dW);return i}function Ti(e,t,r,o){if(e===t&&r===o)return gt;let n=a=>fW(a,0,1,e,r);return a=>a===0||a===1?a:kM(n(a),t,o)}var th=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var rh=e=>t=>1-e(1-t);var oh=Ti(.33,1.53,.69,.99),Tu=rh(oh),Cf=th(Tu);var Sf=e=>(e*=2)<1?.5*Tu(e):.5*(2-Math.pow(2,-10*(e-1)));var bf=e=>1-Math.sin(Math.acos(e)),Rf=rh(bf),If=th(bf);var uC=Ti(.42,0,1,1),cC=Ti(0,0,.58,1),Lf=Ti(.42,0,.58,1);var Pf=e=>Array.isArray(e)&&typeof e[0]!="number";function Tf(e,t){return Pf(e)?e[TM(0,e.length,t)]:e}var kf=e=>Array.isArray(e)&&typeof e[0]=="number";var MM={linear:gt,easeIn:uC,easeInOut:Lf,easeOut:cC,circIn:bf,circInOut:If,circOut:Rf,backIn:Tu,backInOut:Cf,backOut:oh,anticipate:Sf},pW=e=>typeof e=="string",nh=e=>{if(kf(e)){er(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Ti(t,r,o,n)}else if(pW(e))return er(MM[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),MM[e];return e};var Mf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var $r={value:null,addProjectionMetrics:null};function EM(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 g=p&&n?r:o;return f&&i.add(d),g.has(d)||g.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&&$r.value&&$r.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var mW=40;function ah(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=Mf.reduce((x,w)=>(x[w]=EM(a,t?w:void 0),x),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:m}=i,g=()=>{let x=pr.useManualTiming?n.timestamp:performance.now();r=!1,pr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(x-n.timestamp,mW),1)),n.timestamp=x,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),c.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(o=!1,e(g))},y=()=>{r=!0,o=!0,n.isProcessing||e(g)};return{schedule:Mf.reduce((x,w)=>{let C=i[w];return x[w]=(b,S=!1,I=!1)=>(r||y(),C.schedule(b,S,I)),x},{}),cancel:x=>{for(let w=0;w<Mf.length;w++)i[Mf[w]].cancel(x)},state:n,steps:i}}var{schedule:Pe,cancel:mr,state:yt,steps:Ef}=ah(typeof requestAnimationFrame<"u"?requestAnimationFrame:gt,!0);var ih;function gW(){ih=void 0}var wt={now:()=>(ih===void 0&&wt.set(yt.isProcessing||pr.useManualTiming?yt.timestamp:performance.now()),ih),set:e=>{ih=e,queueMicrotask(gW)}};var dn={layout:0,mainThread:0,waapi:0};var AM=e=>t=>typeof t=="string"&&t.startsWith(e),Fs=AM("--"),hW=AM("var(--"),_s=e=>hW(e)?vW.test(e.split("/*")[0].trim()):!1,vW=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var jn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ba={...jn,transform:e=>Wt(0,1,e)},Af={...jn,default:1};var ki=e=>Math.round(e*1e5)/1e5;var ku=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DM(e){return e==null}var NM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Mu=(e,t)=>r=>!!(typeof r=="string"&&NM.test(r)&&r.startsWith(e)||t&&!DM(r)&&Object.prototype.hasOwnProperty.call(r,t)),sh=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(ku);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var xW=e=>Wt(0,255,e),dC={...jn,transform:e=>Math.round(xW(e))},$n={test:Mu("rgb","red"),parse:sh("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+dC.transform(e)+", "+dC.transform(t)+", "+dC.transform(r)+", "+ki(ba.transform(o))+")"};function yW(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 Df={test:Mu("#"),parse:yW,transform:$n.transform};var Nf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),fn=Nf("deg"),gr=Nf("%"),ue=Nf("px"),fC=Nf("vh"),pC=Nf("vw"),lh=(()=>({...gr,parse:e=>gr.parse(e)/100,transform:e=>gr.transform(e*100)}))();var Mi={test:Mu("hsl","hue"),parse:sh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+gr.transform(ki(t))+", "+gr.transform(ki(r))+", "+ki(ba.transform(o))+")"};var ut={test:e=>$n.test(e)||Df.test(e)||Mi.test(e),parse:e=>$n.test(e)?$n.parse(e):Mi.test(e)?Mi.parse(e):Df.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$n.transform(e):Mi.transform(e),getAnimatableNone:e=>{let t=ut.parse(e);return t.alpha=0,ut.transform(t)}};var OM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wW(e){return isNaN(e)&&typeof e=="string"&&(e.match(ku)?.length||0)+(e.match(OM)?.length||0)>0}var _M="number",VM="color",CW="var",SW="var(",FM="${}",bW=/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 Ei(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(bW,l=>(ut.test(l)?(o.color.push(a),n.push(VM),r.push(ut.parse(l))):l.startsWith(SW)?(o.var.push(a),n.push(CW),r.push(l)):(o.number.push(a),n.push(_M),r.push(parseFloat(l))),++a,FM)).split(FM);return{values:r,split:s,indexes:o,types:n}}function BM(e){return Ei(e).values}function HM(e){let{split:t,types:r}=Ei(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===_M?a+=ki(n[i]):s===VM?a+=ut.transform(n[i]):a+=n[i]}return a}}var RW=e=>typeof e=="number"?0:ut.test(e)?ut.getAnimatableNone(e):e;function IW(e){let t=BM(e);return HM(e)(t.map(RW))}var hr={test:wW,parse:BM,createTransformer:HM,getAnimatableNone:IW};function mC(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 UM({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=mC(l,s,e+1/3),a=mC(l,s,e),i=mC(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function Eu(e,t){return r=>r>0?t:e}var ke=(e,t,r)=>e+(t-e)*r;var gC=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},LW=[Df,$n,Mi],PW=e=>LW.find(t=>t.test(e));function zM(e){let t=PW(e);if(Ca(!!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===Mi&&(r=UM(r)),r}var hC=(e,t)=>{let r=zM(e),o=zM(t);if(!r||!o)return Eu(e,t);let n={...r};return a=>(n.red=gC(r.red,o.red,a),n.green=gC(r.green,o.green,a),n.blue=gC(r.blue,o.blue,a),n.alpha=ke(r.alpha,o.alpha,a),$n.transform(n))};var uh=new Set(["none","hidden"]);function GM(e,t){return uh.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function TW(e,t){return r=>ke(e,t,r)}function ch(e){return typeof e=="number"?TW:typeof e=="string"?_s(e)?Eu:ut.test(e)?hC:EW:Array.isArray(e)?WM:typeof e=="object"?ut.test(e)?hC:kW:Eu}function WM(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>ch(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function kW(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=ch(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function MW(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 EW=(e,t)=>{let r=hr.createTransformer(t),o=Ei(e),n=Ei(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?uh.has(e)&&!n.values.length||uh.has(t)&&!o.values.length?GM(e,t):cn(WM(MW(o,n),n.values),r):(Ca(!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"),Eu(e,t))};function dh(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ke(e,t,r):ch(e)(e,t)}var qM=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Pe.update(t,r),stop:()=>mr(t),now:()=>yt.isProcessing?yt.timestamp:wt.now()}};var fh=(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 Au(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 Of(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(Au(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Ft(n)}}var AW=5;function ph(e,t,r){let o=Math.max(t-AW,0);return wf(r-e(o),t-o)}var at={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 xC=.001;function jM({duration:e=at.duration,bounce:t=at.bounce,velocity:r=at.velocity,mass:o=at.mass}){let n,a;Ca(e<=Rt(at.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Wt(at.minDamping,at.maxDamping,i),e=Wt(at.minDuration,at.maxDuration,Ft(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=mh(u,i),m=Math.exp(-d);return xC-f/p*m},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,m=Math.exp(-d),g=mh(Math.pow(u,2),i);return(-n(u)+xC>0?-1:1)*((f-p)*m)/g}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-xC+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=NW(n,a,s);if(e=Rt(e),isNaN(l))return{stiffness:at.stiffness,damping:at.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var DW=12;function NW(e,t,r){let o=r;for(let n=1;n<DW;n++)o=o-e(o)/t(o);return o}function mh(e,t){return e*Math.sqrt(1-t*t)}var OW=["duration","bounce"],FW=["stiffness","damping","mass"];function $M(e,t){return t.some(r=>e[r]!==void 0)}function _W(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!$M(e,FW)&&$M(e,OW))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Wt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:at.mass,stiffness:n,damping:a}}else{let r=jM(e);t={...t,...r,mass:at.mass},t.isResolvedFromDuration=!0}return t}function Ra(e=at.visualDuration,t=at.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}=_W({...r,velocity:-Ft(r.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),y=i-a,h=Ft(Math.sqrt(l/c)),v=Math.abs(y)<5;o||(o=v?at.restSpeed.granular:at.restSpeed.default),n||(n=v?at.restDelta.granular:at.restDelta.default);let x;if(g<1){let C=mh(h,g);x=b=>{let S=Math.exp(-g*h*b);return i-S*((m+g*h*y)/C*Math.sin(C*b)+y*Math.cos(C*b))}}else if(g===1)x=C=>i-Math.exp(-h*C)*(y+(m+h*y)*C);else{let C=h*Math.sqrt(g*g-1);x=b=>{let S=Math.exp(-g*h*b),I=Math.min(C*b,300);return i-S*((m+g*h*y)*Math.sinh(I)+C*y*Math.cosh(I))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let b=x(C);if(p)s.done=C>=d;else{let S=C===0?m:0;g<1&&(S=C===0?Rt(m):ph(x,C,b));let I=Math.abs(S)<=o,T=Math.abs(i-b)<=n;s.done=I&&T}return s.value=s.done?i:b,s},toString:()=>{let C=Math.min(Au(w),2e4),b=fh(S=>w.next(C*S).value,C,30);return C+"ms "+b},toTransition:()=>{}};return w}Ra.applyToOptions=e=>{let t=Of(e,100,Ra);return e.ease=t.ease,e.duration=Rt(t.duration),e.type="keyframes",e};function Ff({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=I=>s!==void 0&&I<s||l!==void 0&&I>l,m=I=>s===void 0?l:l===void 0||Math.abs(s-I)<Math.abs(l-I)?s:l,g=r*t,y=d+g,h=i===void 0?y:i(y);h!==y&&(g=h-d);let v=I=>-g*Math.exp(-I/o),x=I=>h+v(I),w=I=>{let T=v(I),P=x(I);f.done=Math.abs(T)<=u,f.value=f.done?h:P},C,b,S=I=>{p(f.value)&&(C=I,b=Ra({keyframes:[f.value,m(f.value)],velocity:ph(x,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:I=>{let T=!1;return!b&&C===void 0&&(T=!0,w(I),S(I)),C!==void 0&&I>=C?b.next(I-C):(!T&&w(I),f)}}}function VW(e,t,r){let o=[],n=r||pr.mix||dh,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]||gt:t;s=cn(l,s)}o.push(s)}return o}function gh(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(er(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=VW(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=Do(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Wt(e[0],e[a-1],c)):u}function _f(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=Do(0,t,o);e.push(ke(r,1,n))}}function Vf(e){let t=[0];return _f(t,e.length-1),t}function KM(e,t){return e.map(r=>r*t)}function BW(e,t){return e.map(()=>t||Lf).splice(0,e.length-1)}function Vs({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=Pf(o)?o.map(nh):nh(o),a={done:!1,value:t[0]},i=KM(r&&r.length===t.length?r:Vf(t),e),s=gh(i,t,{ease:Array.isArray(n)?n:BW(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var HW=e=>e!==null;function Du(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(HW),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var UW={decay:Ff,inertia:Ff,tween:Vs,keyframes:Vs,spring:Ra};function hh(e){typeof e.type=="string"&&(e.type=UW[e.type])}var Ai=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 zW=e=>e/100,Ia=class extends Ai{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!==wt.now()&&this.tick(wt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},dn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;hh(t);let{type:r=Vs,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||Vs;l!==Vs&&typeof s[0]!="number"&&(this.mixKeyframes=cn(zW,dh(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=Au(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:m,onUpdate:g,finalKeyframe:y}=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 h=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?h<0:h>n;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let x=this.currentTime,w=o;if(d){let I=Math.min(this.currentTime,n)/s,T=Math.floor(I),P=I%1;!P&&I>=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)),x=Wt(0,1,P)*s}let C=v?{done:!1,value:c[0]}:w.next(x);a&&(C.value=a(C.value));let{done:b}=C;!v&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return S&&m!==Ff&&(C.value=Du(c,this.options,y,this.speed)),g&&g(C.value),S&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return Ft(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ft(t)}get time(){return Ft(this.currentTime)}set time(t){t=Rt(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(wt.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ft(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=qM,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(wt.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,dn.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 XM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Bs=e=>e*180/Math.PI,yC=e=>{let t=Bs(Math.atan2(e[1],e[0]));return wC(t)},GW={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:yC,rotateZ:yC,skewX:e=>Bs(Math.atan(e[1])),skewY:e=>Bs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wC=e=>(e=e%360,e<0&&(e+=360),e),YM=yC,QM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ZM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),WW={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:QM,scaleY:ZM,scale:e=>(QM(e)+ZM(e))/2,rotateX:e=>wC(Bs(Math.atan2(e[6],e[5]))),rotateY:e=>wC(Bs(Math.atan2(-e[2],e[0]))),rotateZ:YM,rotate:YM,skewX:e=>Bs(Math.atan(e[4])),skewY:e=>Bs(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 Hf(e,t){if(!e||e==="none")return Bf(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=WW,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=GW,n=s}if(!n)return Bf(t);let a=o[t],i=n[1].split(",").map(qW);return typeof a=="function"?a(i):i[a]}var CC=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Hf(r,t)};function qW(e){return parseFloat(e.trim())}var pn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],uo=(()=>new Set(pn))();var SC=e=>e===jn||e===ue,jW=new Set(["x","y","z"]),$W=pn.filter(e=>!jW.has(e));function JM(e){let t=[];return $W.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var Di={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})=>Hf(t,"x"),y:(e,{transform:t})=>Hf(t,"y")};Di.translateX=Di.x;Di.translateY=Di.y;var Hs=new Set,bC=!1,RC=!1,IC=!1;function eE(){if(RC){let e=Array.from(Hs).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=JM(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)})}RC=!1,bC=!1,Hs.forEach(e=>e.complete(IC)),Hs.clear()}function tE(){Hs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(RC=!0)})}function LC(){IC=!0,tE(),eE(),IC=!1}var La=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?(Hs.add(this),bC||(bC=!0,Pe.read(tE),Pe.resolveKeyframes(eE))):(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])}XM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Hs.delete(this)}cancel(){this.state==="scheduled"&&(Hs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var rE=e=>e.startsWith("--");function oE(e,t,r){rE(t)?e.style.setProperty(t,r):e.style[t]=r}var nE=Os(()=>window.ScrollTimeline!==void 0);var aE={};function iE(e,t){let r=Os(e);return()=>aE[t]??r()}var vh=iE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Us=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var PC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Us([0,.65,.55,1]),circOut:Us([.55,0,1,.45]),backIn:Us([.31,.01,.66,-.59]),backOut:Us([.33,1.53,.69,.99])};function TC(e,t){if(e)return typeof e=="function"?vh()?fh(e,t):"ease-out":kf(e)?Us(e):Array.isArray(e)?e.map(r=>TC(r,t)||PC.easeOut):PC[e]}function sE(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=TC(s,n);Array.isArray(d)&&(c.easing=d),$r.value&&dn.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 $r.value&&p.finished.finally(()=>{dn.waapi--}),p}function zs(e){return typeof e=="function"&&"applyToOptions"in e}function lE({type:e,...t}){return zs(e)&&vh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var xh=class extends Ai{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,er(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=lE(t);this.animation=sE(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=Du(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):oE(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 Ft(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ft(t)}get time(){return Ft(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Rt(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&&nE()?(this.animation.timeline=t,gt):r(this)}};var uE={anticipate:Sf,backInOut:Cf,circInOut:If};function KW(e){return e in uE}function cE(e){typeof e.ease=="string"&&KW(e.ease)&&(e.ease=uE[e.ease])}var dE=10,yh=class extends xh{constructor(t){cE(t),hh(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 Ia({...i,autoplay:!1}),l=Rt(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-dE).value,s.sample(l).value,dE),s.stop()}};var kC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hr.test(e)||e==="0")&&!e.startsWith("url("));function XW(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 fE(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=kC(n,t),s=kC(a,t);return Ca(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:XW(e)||(r==="spring"||zs(r))&&o}function Nu(e){e.duration=0,e.type="keyframes"}var YW=new Set(["opacity","clipPath","filter","transform"]),QW=Os(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pE(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 QW()&&r&&YW.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var ZW=40,Uf=class extends Ai{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=wt.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||La;this.keyframeResolver=new p(s,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),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=wt.now(),fE(t,a,i,s)||((pr.instantAnimations||!l)&&c?.(Du(t,o,r)),t[0]=t[t.length-1],Nu(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>ZW?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&pE(f)?new yh({...f,element:f.motionValue.owner.current}):new Ia(f);p.finished.then(()=>this.notifyFinished()).catch(gt),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(),LC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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 wh=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(){return mE(this.animations,"duration")}get iterationDuration(){return mE(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function mE(e,t){let r=0;for(let o=0;o<e.length;o++){let n=e[o][t];n!==null&&n>r&&(r=n)}return r}var zf=class extends wh{then(t,r){return this.finished.finally(t).then(()=>{})}};var JW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eq(e){let t=JW.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var tq=4;function MC(e,t,r=1){er(r<=tq,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=eq(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return vf(i)?parseFloat(i):i}return _s(n)?MC(n,t,r+1):n}function Gs(e,t){return e?.[t]??e?.default??e}var Gf=new Set(["width","height","top","left","right","bottom",...pn]);var gE={test:e=>e==="auto",parse:e=>e};var Ch=e=>t=>t.test(e);var EC=[jn,ue,gr,fn,pC,fC,gE],AC=e=>EC.find(Ch(e));function hE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yf(e):!0}var rq=new Set(["brightness","contrast","saturate","opacity"]);function oq(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(ku)||[];if(!o)return e;let n=r.replace(o,""),a=rq.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var nq=/\b([a-z-]*)\(.*?\)/gu,Wf={...hr,getAnimatableNone:e=>{let t=e.match(nq);return t?t.map(oq).join(" "):e}};var DC={...jn,transform:Math.round};var vE={rotate:fn,rotateX:fn,rotateY:fn,rotateZ:fn,scale:Af,scaleX:Af,scaleY:Af,scaleZ:Af,skew:fn,skewX:fn,skewY:fn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:ba,originX:lh,originY:lh,originZ:ue};var Ws={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...vE,zIndex:DC,fillOpacity:ba,strokeOpacity:ba,numOctaves:DC};var xE={...Ws,color:ut,backgroundColor:ut,outlineColor:ut,fill:ut,stroke:ut,borderColor:ut,borderTopColor:ut,borderRightColor:ut,borderBottomColor:ut,borderLeftColor:ut,filter:Wf,WebkitFilter:Wf},qf=e=>xE[e];function jf(e,t){let r=qf(e);return r!==Wf&&(r=hr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var aq=new Set(["auto","none","0"]);function yE(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!aq.has(a)&&Ei(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=jf(r,n)}var $f=class extends La{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(),_s(u))){let c=MC(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Gf.has(o)||t.length!==2)return;let[n,a]=t,i=AC(n),s=AC(a);if(i!==s)if(SC(i)&&SC(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Di[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||hE(t[n]))&&o.push(n);o.length&&yE(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=Di[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]=Di[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 Kf(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 Xf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Yf(e){return xf(e)&&"offsetHeight"in e}var wE=30,iq=e=>!isNaN(parseFloat(e)),qs={current:void 0},Sh=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=wt.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=wt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=iq(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 Sa);let o=this.events[t].add(r);return t==="change"?()=>{o(),Pe.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 qs.current&&qs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=wt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wE)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,wE);return wf(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 Kr(e,t){return new Sh(e,t)}var{schedule:js,cancel:sq}=ah(queueMicrotask,!1);var No={x:!1,y:!1};function bh(){return No.x||No.y}function NC(e){return e==="x"||e==="y"?No[e]?null:(No[e]=!0,()=>{No[e]=!1}):No.x||No.y?null:(No.x=No.y=!0,()=>{No.x=No.y=!1})}function Rh(e,t){let r=Kf(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function CE(e){return!(e.pointerType==="touch"||bh())}function OC(e,t,r={}){let[o,n,a]=Rh(e,r),i=s=>{if(!CE(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{CE(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var FC=(e,t)=>t?e===t?!0:FC(e,t.parentElement):!1;var $s=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var lq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function SE(e){return lq.has(e.tagName)||e.tabIndex!==-1}var Ou=new WeakSet;function bE(e){return t=>{t.key==="Enter"&&e(t)}}function _C(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var RE=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=bE(()=>{if(Ou.has(r))return;_C(r,"down");let n=bE(()=>{_C(r,"up")}),a=()=>_C(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 IE(e){return $s(e)&&!bh()}function VC(e,t,r={}){let[o,n,a]=Rh(e,r),i=s=>{let l=s.currentTarget;if(!IE(s))return;Ou.add(l);let u=t(l,s),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ou.has(l)&&Ou.delete(l),IE(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||FC(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),Yf(s)&&(s.addEventListener("focus",u=>RE(u,n)),!SE(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Ks(e){return xf(e)&&"ownerSVGElement"in e}function Qf(e){return Ks(e)&&e.tagName==="svg"}function BC(...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=gh(n,a,i);return t?s(o):s}var Be=e=>!!(e&&e.getVelocity);var uq=[...EC,ut,hr],HC=e=>uq.find(Ch(e));var Ih=R(E(),1),Pa=R(E(),1);var LE=R(E(),1),Ni=(0,LE.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var TE=R(E(),1);function PE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function cq(...e){return t=>{let r=!1,o=e.map(n=>{let a=PE(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():PE(e[n],null)}}}}function kE(...e){return TE.useCallback(cq(...e),e)}var UC=class extends Ih.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Yf(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 EE({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,Pa.useId)(),a=(0,Pa.useRef)(null),i=(0,Pa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Pa.useContext)(Ni),l=kE(a,e?.ref);return(0,Pa.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let m=r==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let g=document.createElement("style");s&&(g.nonce=s);let y=o??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
11
+ `+a.stack}return{value:e,source:t,stack:n,digest:null}}function n0(e,t,o){return{value:e,source:null,stack:o??null,digest:t??null}}function H0(e,t){try{console.error(t.value)}catch(o){setTimeout(function(){throw o})}}var h5=typeof WeakMap=="function"?WeakMap:Map;function iT(e,t,o){o=La(-1,o),o.tag=3,o.payload={element:null};var r=t.value;return o.callback=function(){zg||(zg=!0,Y0=r),H0(e,t)},o}function sT(e,t,o){o=La(-1,o),o.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var n=t.value;o.payload=function(){return r(n)},o.callback=function(){H0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(o.callback=function(){H0(e,t),typeof r!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),o}function xL(e,t,o){var r=e.pingCache;if(r===null){r=e.pingCache=new h5;var n=new Set;r.set(t,n)}else n=r.get(t),n===void 0&&(n=new Set,r.set(t,n));n.has(o)||(n.add(o),e=M5.bind(null,e,t,o),t.then(e,e))}function yL(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 wL(e,t,o,r,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(t=La(-1,1),t.tag=2,Ei(o,t,1))),o.lanes|=1),e)}var v5=Aa.ReactCurrentOwner,Wo=!1;function ko(e,t,o,r){t.child=e===null?F1(t,null,o,r):Pu(t,e.child,o,r)}function CL(e,t,o,r,n){o=o.render;var a=t.ref;return Cu(t,n),r=Tw(e,t,o,r,a,n),o=kw(),e!==null&&!Wo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ea(e,t,n)):(it&&o&&hw(t),t.flags|=1,ko(e,t,r,n),t.child)}function SL(e,t,o,r,n){if(e===null){var a=o.type;return typeof a=="function"&&!Bw(a)&&a.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(t.tag=15,t.type=a,lT(e,t,a,r,n)):(e=Cg(o.type,null,r,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(o=o.compare,o=o!==null?o:Kd,o(i,r)&&e.ref===t.ref)return Ea(e,t,n)}return t.flags|=1,e=Ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function lT(e,t,o,r,n){if(e!==null){var a=e.memoizedProps;if(Kd(a,r)&&e.ref===t.ref)if(Wo=!1,t.pendingProps=r=a,(e.lanes&n)!==0)e.flags&131072&&(Wo=!0);else return t.lanes=e.lanes,Ea(e,t,n)}return U0(e,t,o,r,n)}function uT(e,t,o){var r=t.pendingProps,n=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(hu,lr),lr|=o;else{if(!(o&1073741824))return e=a!==null?a.baseLanes|o:o,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ye(hu,lr),lr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:o,Ye(hu,lr),lr|=r}else a!==null?(r=a.baseLanes|o,t.memoizedState=null):r=o,Ye(hu,lr),lr|=r;return ko(e,t,n,o),t.child}function cT(e,t){var o=t.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(t.flags|=512,t.flags|=2097152)}function U0(e,t,o,r,n){var a=qo(o)?js:mo.current;return a=Ru(t,a),Cu(t,n),o=Tw(e,t,o,r,a,n),r=kw(),e!==null&&!Wo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ea(e,t,n)):(it&&r&&hw(t),t.flags|=1,ko(e,t,o,n),t.child)}function bL(e,t,o,r,n){if(qo(o)){var a=!0;Ag(t)}else a=!1;if(Cu(t,n),t.stateNode===null)xg(e,t),aT(t,o,r),B0(t,o,r,n),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=o.contextType;typeof u=="object"&&u!==null?u=Fr(u):(u=qo(o)?js:mo.current,u=Ru(t,u));var c=o.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||l!==u)&&vL(t,i,r,u),Si=!1;var f=t.memoizedState;i.state=f,_g(t,r,i,n),l=t.memoizedState,s!==r||f!==l||jo.current||Si?(typeof c=="function"&&(V0(t,o,c,r),l=t.memoizedState),(s=Si||hL(t,o,s,r,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=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,V1(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:pn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=o.contextType,typeof l=="object"&&l!==null?l=Fr(l):(l=qo(o)?js:mo.current,l=Ru(t,l));var p=o.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&vL(t,i,r,l),Si=!1,f=t.memoizedState,i.state=f,_g(t,r,i,n);var m=t.memoizedState;s!==d||f!==m||jo.current||Si?(typeof p=="function"&&(V0(t,o,p,r),m=t.memoizedState),(u=Si||hL(t,o,u,r,f,m,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,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=r,t.memoizedState=m),i.props=r,i.state=m,i.context=l,r=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),r=!1)}return z0(e,t,o,r,a,n)}function z0(e,t,o,r,n,a){cT(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return n&&lL(t,o,!1),Ea(e,t,a);r=t.stateNode,v5.current=t;var s=i&&typeof o.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Pu(t,e.child,null,a),t.child=Pu(t,null,s,a)):ko(e,t,s,a),t.memoizedState=r.state,n&&lL(t,o,!0),t.child}function dT(e){var t=e.stateNode;t.pendingContext?sL(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sL(e,t.context,!1),Rw(e,t.containerInfo)}function RL(e,t,o,r,n){return Iu(),xw(n),t.flags|=256,ko(e,t,o,r),t.child}var G0={dehydrated:null,treeContext:null,retryLane:0};function W0(e){return{baseLanes:e,cachePool:null,transitions:null}}function fT(e,t,o){var r=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),Ye(dt,n&1),e===null)return F0(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=r.children,e=r.fallback,a?(r=t.mode,a=t.child,i={mode:"hidden",children:i},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=oh(i,r,0,null),e=Ws(e,r,o,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=W0(o),t.memoizedState=G0,e):Aw(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return x5(e,t,i,r,s,n,o);if(a){a=r.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==n?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ni(n,l),r.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=Ni(s,a):(a=Ws(a,i,o,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,i=e.child.memoizedState,i=i===null?W0(o):{baseLanes:i.baseLanes|o,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~o,t.memoizedState=G0,r}return a=e.child,e=a.sibling,r=Ni(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=o),r.return=t,r.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=r,t.memoizedState=null,r}function Aw(e,t){return t=oh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ug(e,t,o,r){return r!==null&&xw(r),Pu(t,e.child,null,o),e=Aw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function x5(e,t,o,r,n,a,i){if(o)return t.flags&256?(t.flags&=-257,r=n0(Error(q(422))),ug(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,n=t.mode,r=oh({mode:"visible",children:r.children},n,0,null),a=Ws(a,n,i,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Pu(t,e.child,null,i),t.child.memoizedState=W0(i),t.memoizedState=G0,a);if(!(t.mode&1))return ug(e,t,i,null);if(n.data==="$!"){if(r=n.nextSibling&&n.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(q(419)),r=n0(a,r,void 0),ug(e,t,i,r)}if(s=(i&e.childLanes)!==0,Wo||s){if(r=jt,r!==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&(r.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,Ma(e,n),vn(r,e,n,-1))}return Vw(),r=n0(Error(q(421))),ug(e,t,i,r)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=E5.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,ur=Mi(n.nextSibling),cr=t,it=!0,gn=null,e!==null&&(Ar[Dr++]=Ia,Ar[Dr++]=Pa,Ar[Dr++]=qs,Ia=e.id,Pa=e.overflow,qs=t),t=Aw(t,r.children),t.flags|=4096,t)}function IL(e,t,o){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_0(e.return,t,o)}function a0(e,t,o,r,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:o,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=o,a.tailMode=n)}function pT(e,t,o){var r=t.pendingProps,n=r.revealOrder,a=r.tail;if(ko(e,t,r.children,o),r=dt.current,r&2)r=r&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&&IL(e,o,t);else if(e.tag===19)IL(e,o,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}r&=1}if(Ye(dt,r),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(o=t.child,n=null;o!==null;)e=o.alternate,e!==null&&Vg(e)===null&&(n=o),o=o.sibling;o=n,o===null?(n=t.child,t.child=null):(n=o.sibling,o.sibling=null),a0(t,!1,n,o,a);break;case"backwards":for(o=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Vg(e)===null){t.child=n;break}e=n.sibling,n.sibling=o,o=n,n=e}a0(t,!0,o,null,a);break;case"together":a0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ea(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),Ks|=t.lanes,!(o&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,o=Ni(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=Ni(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function y5(e,t,o){switch(t.tag){case 3:dT(t),Iu();break;case 5:B1(t);break;case 1:qo(t.type)&&Ag(t);break;case 4:Rw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,n=t.memoizedProps.value;Ye(Og,r._currentValue),r._currentValue=n;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ye(dt,dt.current&1),t.flags|=128,null):o&t.child.childLanes?fT(e,t,o):(Ye(dt,dt.current&1),e=Ea(e,t,o),e!==null?e.sibling:null);Ye(dt,dt.current&1);break;case 19:if(r=(o&t.childLanes)!==0,e.flags&128){if(r)return pT(e,t,o);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Ye(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,uT(e,t,o)}return Ea(e,t,o)}var mT,j0,gT,hT;mT=function(e,t){for(var o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break;for(;o.sibling===null;){if(o.return===null||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};j0=function(){};gT=function(e,t,o,r){var n=e.memoizedProps;if(n!==r){e=t.stateNode,zs(oa.current);var a=null;switch(o){case"input":n=p0(e,n),r=p0(e,r),a=[];break;case"select":n=pt({},n,{value:void 0}),r=pt({},r,{value:void 0}),a=[];break;case"textarea":n=h0(e,n),r=h0(e,r),a=[];break;default:typeof n.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Mg)}x0(o,r);var i;o=null;for(u in n)if(!r.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(o||(o={}),o[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ud.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=n?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(o||(o={}),o[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(o||(o={}),o[i]=l[i])}else o||(a||(a=[]),a.push(u,o)),o=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"&&(Ud.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&et("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}o&&(a=a||[]).push("style",o);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};hT=function(e,t,o,r){o!==r&&(t.flags|=4)};function Id(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var r=null;o!==null;)o.alternate!==null&&(r=o),o=o.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fo(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,r=0;if(t)for(var n=e.child;n!==null;)o|=n.lanes|n.childLanes,r|=n.subtreeFlags&14680064,r|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)o|=n.lanes|n.childLanes,r|=n.subtreeFlags,r|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=r,e.childLanes=o,t}function w5(e,t,o){var r=t.pendingProps;switch(vw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fo(t),null;case 1:return qo(t.type)&&Eg(),fo(t),null;case 3:return r=t.stateNode,Lu(),tt(jo),tt(mo),Pw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(sg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(J0(gn),gn=null))),j0(e,t),fo(t),null;case 5:Iw(t);var n=zs(Jd.current);if(o=t.type,e!==null&&t.stateNode!=null)gT(e,t,o,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return fo(t),null}if(e=zs(oa.current),sg(t)){r=t.stateNode,o=t.type;var a=t.memoizedProps;switch(r[ea]=t,r[Qd]=a,e=(t.mode&1)!==0,o){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(n=0;n<Ed.length;n++)et(Ed[n],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":DP(r,a),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},et("invalid",r);break;case"textarea":OP(r,a),et("invalid",r)}x0(o,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&ig(r.textContent,s,e),n=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&ig(r.textContent,s,e),n=["children",""+s]):Ud.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&et("scroll",r)}switch(o){case"input":Km(r),NP(r,a,!0);break;case"textarea":Km(r),FP(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Mg)}r=n,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=WL(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(o,{is:r.is}):(e=i.createElement(o),o==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,o),e[ea]=t,e[Qd]=r,mT(e,t,!1,!1),t.stateNode=e;e:{switch(i=y0(o,r),o){case"dialog":et("cancel",e),et("close",e),n=r;break;case"iframe":case"object":case"embed":et("load",e),n=r;break;case"video":case"audio":for(n=0;n<Ed.length;n++)et(Ed[n],e);n=r;break;case"source":et("error",e),n=r;break;case"img":case"image":case"link":et("error",e),et("load",e),n=r;break;case"details":et("toggle",e),n=r;break;case"input":DP(e,r),n=p0(e,r),et("invalid",e);break;case"option":n=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},n=pt({},r,{value:void 0}),et("invalid",e);break;case"textarea":OP(e,r),n=h0(e,r),et("invalid",e);break;default:n=r}x0(o,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?$L(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jL(e,l)):a==="children"?typeof l=="string"?(o!=="textarea"||l!=="")&&zd(e,l):typeof l=="number"&&zd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Ud.hasOwnProperty(a)?l!=null&&a==="onScroll"&&et("scroll",e):l!=null&&ow(e,a,l,i))}switch(o){case"input":Km(e),NP(e,r,!1);break;case"textarea":Km(e),FP(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Oi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?vu(e,!!r.multiple,a,!1):r.defaultValue!=null&&vu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Mg)}switch(o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return fo(t),null;case 6:if(e&&t.stateNode!=null)hT(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(o=zs(Jd.current),zs(oa.current),sg(t)){if(r=t.stateNode,o=t.memoizedProps,r[ea]=t,(a=r.nodeValue!==o)&&(e=cr,e!==null))switch(e.tag){case 3:ig(r.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ig(r.nodeValue,o,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(o.nodeType===9?o:o.ownerDocument).createTextNode(r),r[ea]=t,t.stateNode=r}return fo(t),null;case 13:if(tt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&ur!==null&&t.mode&1&&!(t.flags&128))N1(),Iu(),t.flags|=98560,a=!1;else if(a=sg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(q(317));a[ea]=t}else Iu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fo(t),a=!1}else gn!==null&&(J0(gn),gn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=o,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?Ot===0&&(Ot=3):Vw())),t.updateQueue!==null&&(t.flags|=4),fo(t),null);case 4:return Lu(),j0(e,t),e===null&&Xd(t.stateNode.containerInfo),fo(t),null;case 10:return Cw(t.type._context),fo(t),null;case 17:return qo(t.type)&&Eg(),fo(t),null;case 19:if(tt(dt),a=t.memoizedState,a===null)return fo(t),null;if(r=(t.flags&128)!==0,i=a.rendering,i===null)if(r)Id(a,!1);else{if(Ot!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Vg(e),i!==null){for(t.flags|=128,Id(a,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=o,o=t.child;o!==null;)a=o,e=r,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}),o=o.sibling;return Ye(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&St()>ku&&(t.flags|=128,r=!0,Id(a,!1),t.lanes=4194304)}else{if(!r)if(e=Vg(i),e!==null){if(t.flags|=128,r=!0,o=e.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),Id(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!it)return fo(t),null}else 2*St()-a.renderingStartTime>ku&&o!==1073741824&&(t.flags|=128,r=!0,Id(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(o=a.last,o!==null?o.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=St(),t.sibling=null,o=dt.current,Ye(dt,r?o&1|2:o&1),t):(fo(t),null);case 22:case 23:return _w(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?lr&1073741824&&(fo(t),t.subtreeFlags&6&&(t.flags|=8192)):fo(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function C5(e,t){switch(vw(t),t.tag){case 1:return qo(t.type)&&Eg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Lu(),tt(jo),tt(mo),Pw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Iw(t),null;case 13:if(tt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Iu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(dt),null;case 4:return Lu(),null;case 10:return Cw(t.type._context),null;case 22:case 23:return _w(),null;case 24:return null;default:return null}}var cg=!1,po=!1,S5=typeof WeakSet=="function"?WeakSet:Set,re=null;function gu(e,t){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(r){vt(e,t,r)}else o.current=null}function q0(e,t,o){try{o()}catch(r){vt(e,t,r)}}var PL=!1;function b5(e,t){if(k0=Lg,e=C1(),gw(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var r=o.getSelection&&o.getSelection();if(r&&r.rangeCount!==0){o=r.anchorNode;var n=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{o.nodeType,a.nodeType}catch{o=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==o||n!==0&&d.nodeType!==3||(s=i+n),d!==a||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===o&&++u===n&&(s=i),f===a&&++c===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}o=s===-1||l===-1?null:{start:s,end:l}}else o=null}o=o||{start:0,end:0}}else o=null;for(M0={focusedElem:e,selectionRange:o},Lg=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,x=m.memoizedState,v=t.stateNode,h=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:pn(t.type,g),x);v.__reactInternalSnapshotBeforeUpdate=h}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(q(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return m=PL,PL=!1,m}function Vd(e,t,o){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&q0(t,o,a)}n=n.next}while(n!==r)}}function eh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var o=t=t.next;do{if((o.tag&e)===e){var r=o.create;o.destroy=r()}o=o.next}while(o!==t)}}function $0(e){var t=e.ref;if(t!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof t=="function"?t(e):t.current=e}}function vT(e){var t=e.alternate;t!==null&&(e.alternate=null,vT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ea],delete t[Qd],delete t[D0],delete t[a5],delete t[i5])),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 xT(e){return e.tag===5||e.tag===3||e.tag===4}function LL(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xT(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 K0(e,t,o){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?o.nodeType===8?o.parentNode.insertBefore(e,t):o.insertBefore(e,t):(o.nodeType===8?(t=o.parentNode,t.insertBefore(e,o)):(t=o,t.appendChild(e)),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=Mg));else if(r!==4&&(e=e.child,e!==null))for(K0(e,t,o),e=e.sibling;e!==null;)K0(e,t,o),e=e.sibling}function X0(e,t,o){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(X0(e,t,o),e=e.sibling;e!==null;)X0(e,t,o),e=e.sibling}var to=null,mn=!1;function wi(e,t,o){for(o=o.child;o!==null;)yT(e,t,o),o=o.sibling}function yT(e,t,o){if(ta&&typeof ta.onCommitFiberUnmount=="function")try{ta.onCommitFiberUnmount(qg,o)}catch{}switch(o.tag){case 5:po||gu(o,t);case 6:var r=to,n=mn;to=null,wi(e,t,o),to=r,mn=n,to!==null&&(mn?(e=to,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):to.removeChild(o.stateNode));break;case 18:to!==null&&(mn?(e=to,o=o.stateNode,e.nodeType===8?Zy(e.parentNode,o):e.nodeType===1&&Zy(e,o),qd(e)):Zy(to,o.stateNode));break;case 4:r=to,n=mn,to=o.stateNode.containerInfo,mn=!0,wi(e,t,o),to=r,mn=n;break;case 0:case 11:case 14:case 15:if(!po&&(r=o.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&q0(o,t,i),n=n.next}while(n!==r)}wi(e,t,o);break;case 1:if(!po&&(gu(o,t),r=o.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=o.memoizedProps,r.state=o.memoizedState,r.componentWillUnmount()}catch(s){vt(o,t,s)}wi(e,t,o);break;case 21:wi(e,t,o);break;case 22:o.mode&1?(po=(r=po)||o.memoizedState!==null,wi(e,t,o),po=r):wi(e,t,o);break;default:wi(e,t,o)}}function TL(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new S5),t.forEach(function(r){var n=A5.bind(null,e,r);o.has(r)||(o.add(r),r.then(n,n))})}}function fn(e,t){var o=t.deletions;if(o!==null)for(var r=0;r<o.length;r++){var n=o[r];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:to=s.stateNode,mn=!1;break e;case 3:to=s.stateNode.containerInfo,mn=!0;break e;case 4:to=s.stateNode.containerInfo,mn=!0;break e}s=s.return}if(to===null)throw Error(q(160));yT(a,i,n),to=null,mn=!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;)wT(t,e),t=t.sibling}function wT(e,t){var o=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fn(t,e),Zn(e),r&4){try{Vd(3,e,e.return),eh(3,e)}catch(g){vt(e,e.return,g)}try{Vd(5,e,e.return)}catch(g){vt(e,e.return,g)}}break;case 1:fn(t,e),Zn(e),r&512&&o!==null&&gu(o,o.return);break;case 5:if(fn(t,e),Zn(e),r&512&&o!==null&&gu(o,o.return),e.flags&32){var n=e.stateNode;try{zd(n,"")}catch(g){vt(e,e.return,g)}}if(r&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=o!==null?o.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&zL(n,a),y0(s,i);var u=y0(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?$L(n,d):c==="dangerouslySetInnerHTML"?jL(n,d):c==="children"?zd(n,d):ow(n,c,d,u)}switch(s){case"input":m0(n,a);break;case"textarea":GL(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?vu(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?vu(n,!!a.multiple,a.defaultValue,!0):vu(n,!!a.multiple,a.multiple?[]:"",!1))}n[Qd]=a}catch(g){vt(e,e.return,g)}}break;case 6:if(fn(t,e),Zn(e),r&4){if(e.stateNode===null)throw Error(q(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(g){vt(e,e.return,g)}}break;case 3:if(fn(t,e),Zn(e),r&4&&o!==null&&o.memoizedState.isDehydrated)try{qd(t.containerInfo)}catch(g){vt(e,e.return,g)}break;case 4:fn(t,e),Zn(e);break;case 13:fn(t,e),Zn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(Ow=St())),r&4&&TL(e);break;case 22:if(c=o!==null&&o.memoizedState!==null,e.mode&1?(po=(u=po)||c,fn(t,e),po=u):fn(t,e),Zn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(re=e,c=e.child;c!==null;){for(d=re=c;re!==null;){switch(f=re,p=f.child,f.tag){case 0:case 11:case 14:case 15:Vd(4,f,f.return);break;case 1:gu(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,o=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){vt(r,o,g)}}break;case 5:gu(f,f.return);break;case 22:if(f.memoizedState!==null){ML(d);continue}}p!==null?(p.return=f,re=p):ML(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=qL("display",i))}catch(g){vt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){vt(e,e.return,g)}}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:fn(t,e),Zn(e),r&4&&TL(e);break;case 21:break;default:fn(t,e),Zn(e)}}function Zn(e){var t=e.flags;if(t&2){try{e:{for(var o=e.return;o!==null;){if(xT(o)){var r=o;break e}o=o.return}throw Error(q(160))}switch(r.tag){case 5:var n=r.stateNode;r.flags&32&&(zd(n,""),r.flags&=-33);var a=LL(e);X0(e,a,n);break;case 3:case 4:var i=r.stateNode.containerInfo,s=LL(e);K0(e,s,i);break;default:throw Error(q(161))}}catch(l){vt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function R5(e,t,o){re=e,CT(e,t,o)}function CT(e,t,o){for(var r=(e.mode&1)!==0;re!==null;){var n=re,a=n.child;if(n.tag===22&&r){var i=n.memoizedState!==null||cg;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||po;s=cg;var u=po;if(cg=i,(po=l)&&!u)for(re=n;re!==null;)i=re,l=i.child,i.tag===22&&i.memoizedState!==null?EL(n):l!==null?(l.return=i,re=l):EL(n);for(;a!==null;)re=a,CT(a,t,o),a=a.sibling;re=n,cg=s,po=u}kL(e,t,o)}else n.subtreeFlags&8772&&a!==null?(a.return=n,re=a):kL(e,t,o)}}function kL(e){for(;re!==null;){var t=re;if(t.flags&8772){var o=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:po||eh(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!po)if(o===null)r.componentDidMount();else{var n=t.elementType===t.type?o.memoizedProps:pn(t.type,o.memoizedProps);r.componentDidUpdate(n,o.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&pL(t,a,r);break;case 3:var i=t.updateQueue;if(i!==null){if(o=null,t.child!==null)switch(t.child.tag){case 5:o=t.child.stateNode;break;case 1:o=t.child.stateNode}pL(t,i,o)}break;case 5:var s=t.stateNode;if(o===null&&t.flags&4){o=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break;case"img":l.src&&(o.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&&qd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}po||t.flags&512&&$0(t)}catch(f){vt(t,t.return,f)}}if(t===e){re=null;break}if(o=t.sibling,o!==null){o.return=t.return,re=o;break}re=t.return}}function ML(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var o=t.sibling;if(o!==null){o.return=t.return,re=o;break}re=t.return}}function EL(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var o=t.return;try{eh(4,t)}catch(l){vt(t,o,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var n=t.return;try{r.componentDidMount()}catch(l){vt(t,n,l)}}var a=t.return;try{$0(t)}catch(l){vt(t,a,l)}break;case 5:var i=t.return;try{$0(t)}catch(l){vt(t,i,l)}}}catch(l){vt(t,t.return,l)}if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}var I5=Math.ceil,Ug=Aa.ReactCurrentDispatcher,Dw=Aa.ReactCurrentOwner,Or=Aa.ReactCurrentBatchConfig,Ee=0,jt=null,Tt=null,oo=0,lr=0,hu=Vi(0),Ot=0,rf=null,Ks=0,th=0,Nw=0,Bd=null,Go=null,Ow=0,ku=1/0,ba=null,zg=!1,Y0=null,Ai=null,dg=!1,Pi=null,Gg=0,Hd=0,Q0=null,yg=-1,wg=0;function Mo(){return Ee&6?St():yg!==-1?yg:yg=St()}function Di(e){return e.mode&1?Ee&2&&oo!==0?oo&-oo:l5.transition!==null?(wg===0&&(wg=a1()),wg):(e=Ge,e!==0||(e=window.event,e=e===void 0?16:f1(e.type)),e):1}function vn(e,t,o,r){if(50<Hd)throw Hd=0,Q0=null,Error(q(185));nf(e,o,r),(!(Ee&2)||e!==jt)&&(e===jt&&(!(Ee&2)&&(th|=o),Ot===4&&Ri(e,oo)),$o(e,r),o===1&&Ee===0&&!(t.mode&1)&&(ku=St()+500,Qg&&Bi()))}function $o(e,t){var o=e.callbackNode;c4(e,t);var r=Pg(e,e===jt?oo:0);if(r===0)o!==null&&BP(o),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(o!=null&&BP(o),t===1)e.tag===0?s5(AL.bind(null,e)):E1(AL.bind(null,e)),r5(function(){!(Ee&6)&&Bi()}),o=null;else{switch(i1(r)){case 1:o=sw;break;case 4:o=r1;break;case 16:o=Ig;break;case 536870912:o=n1;break;default:o=Ig}o=kT(o,ST.bind(null,e))}e.callbackPriority=t,e.callbackNode=o}}function ST(e,t){if(yg=-1,wg=0,Ee&6)throw Error(q(327));var o=e.callbackNode;if(Su()&&e.callbackNode!==o)return null;var r=Pg(e,e===jt?oo:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Wg(e,r);else{t=r;var n=Ee;Ee|=2;var a=RT();(jt!==e||oo!==t)&&(ba=null,ku=St()+500,Gs(e,t));do try{T5();break}catch(s){bT(e,s)}while(1);ww(),Ug.current=a,Ee=n,Tt!==null?t=0:(jt=null,oo=0,t=Ot)}if(t!==0){if(t===2&&(n=R0(e),n!==0&&(r=n,t=Z0(e,n))),t===1)throw o=rf,Gs(e,0),Ri(e,r),$o(e,St()),o;if(t===6)Ri(e,r);else{if(n=e.current.alternate,!(r&30)&&!P5(n)&&(t=Wg(e,r),t===2&&(a=R0(e),a!==0&&(r=a,t=Z0(e,a))),t===1))throw o=rf,Gs(e,0),Ri(e,r),$o(e,St()),o;switch(e.finishedWork=n,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Bs(e,Go,ba);break;case 3:if(Ri(e,r),(r&130023424)===r&&(t=Ow+500-St(),10<t)){if(Pg(e,0)!==0)break;if(n=e.suspendedLanes,(n&r)!==r){Mo(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=A0(Bs.bind(null,e,Go,ba),t);break}Bs(e,Go,ba);break;case 4:if(Ri(e,r),(r&4194240)===r)break;for(t=e.eventTimes,n=-1;0<r;){var i=31-hn(r);a=1<<i,i=t[i],i>n&&(n=i),r&=~a}if(r=n,r=St()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*I5(r/1960))-r,10<r){e.timeoutHandle=A0(Bs.bind(null,e,Go,ba),r);break}Bs(e,Go,ba);break;case 5:Bs(e,Go,ba);break;default:throw Error(q(329))}}}return $o(e,St()),e.callbackNode===o?ST.bind(null,e):null}function Z0(e,t){var o=Bd;return e.current.memoizedState.isDehydrated&&(Gs(e,t).flags|=256),e=Wg(e,t),e!==2&&(t=Go,Go=o,t!==null&&J0(t)),e}function J0(e){Go===null?Go=e:Go.push.apply(Go,e)}function P5(e){for(var t=e;;){if(t.flags&16384){var o=t.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var r=0;r<o.length;r++){var n=o[r],a=n.getSnapshot;n=n.value;try{if(!xn(a(),n))return!1}catch{return!1}}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;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 Ri(e,t){for(t&=~Nw,t&=~th,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var o=31-hn(t),r=1<<o;e[o]=-1,t&=~r}}function AL(e){if(Ee&6)throw Error(q(327));Su();var t=Pg(e,0);if(!(t&1))return $o(e,St()),null;var o=Wg(e,t);if(e.tag!==0&&o===2){var r=R0(e);r!==0&&(t=r,o=Z0(e,r))}if(o===1)throw o=rf,Gs(e,0),Ri(e,t),$o(e,St()),o;if(o===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bs(e,Go,ba),$o(e,St()),null}function Fw(e,t){var o=Ee;Ee|=1;try{return e(t)}finally{Ee=o,Ee===0&&(ku=St()+500,Qg&&Bi())}}function Xs(e){Pi!==null&&Pi.tag===0&&!(Ee&6)&&Su();var t=Ee;Ee|=1;var o=Or.transition,r=Ge;try{if(Or.transition=null,Ge=1,e)return e()}finally{Ge=r,Or.transition=o,Ee=t,!(Ee&6)&&Bi()}}function _w(){lr=hu.current,tt(hu)}function Gs(e,t){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,o5(o)),Tt!==null)for(o=Tt.return;o!==null;){var r=o;switch(vw(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Eg();break;case 3:Lu(),tt(jo),tt(mo),Pw();break;case 5:Iw(r);break;case 4:Lu();break;case 13:tt(dt);break;case 19:tt(dt);break;case 10:Cw(r.type._context);break;case 22:case 23:_w()}o=o.return}if(jt=e,Tt=e=Ni(e.current,null),oo=lr=t,Ot=0,rf=null,Nw=th=Ks=0,Go=Bd=null,Us!==null){for(t=0;t<Us.length;t++)if(o=Us[t],r=o.interleaved,r!==null){o.interleaved=null;var n=r.next,a=o.pending;if(a!==null){var i=a.next;a.next=n,r.next=i}o.pending=r}Us=null}return e}function bT(e,t){do{var o=Tt;try{if(ww(),hg.current=Hg,Bg){for(var r=ft.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}Bg=!1}if($s=0,Wt=Nt=ft=null,_d=!1,ef=0,Dw.current=null,o===null||o.return===null){Ot=1,rf=t,Tt=null;break}e:{var a=e,i=o.return,s=o,l=t;if(t=oo,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=yL(i);if(p!==null){p.flags&=-257,wL(p,i,s,a,t),p.mode&1&&xL(a,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if(!(t&1)){xL(a,u,t),Vw();break e}l=Error(q(426))}}else if(it&&s.mode&1){var x=yL(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),wL(x,i,s,a,t),xw(Tu(l,s));break e}}a=l=Tu(l,s),Ot!==4&&(Ot=2),Bd===null?Bd=[a]:Bd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=iT(a,l,t);fL(a,v);break e;case 1:s=l;var h=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof h.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ai===null||!Ai.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=sT(a,s,t);fL(a,w);break e}}a=a.return}while(a!==null)}PT(o)}catch(C){t=C,Tt===o&&o!==null&&(Tt=o=o.return);continue}break}while(1)}function RT(){var e=Ug.current;return Ug.current=Hg,e===null?Hg:e}function Vw(){(Ot===0||Ot===3||Ot===2)&&(Ot=4),jt===null||!(Ks&268435455)&&!(th&268435455)||Ri(jt,oo)}function Wg(e,t){var o=Ee;Ee|=2;var r=RT();(jt!==e||oo!==t)&&(ba=null,Gs(e,t));do try{L5();break}catch(n){bT(e,n)}while(1);if(ww(),Ee=o,Ug.current=r,Tt!==null)throw Error(q(261));return jt=null,oo=0,Ot}function L5(){for(;Tt!==null;)IT(Tt)}function T5(){for(;Tt!==null&&!t4();)IT(Tt)}function IT(e){var t=TT(e.alternate,e,lr);e.memoizedProps=e.pendingProps,t===null?PT(e):Tt=t,Dw.current=null}function PT(e){var t=e;do{var o=t.alternate;if(e=t.return,t.flags&32768){if(o=C5(o,t),o!==null){o.flags&=32767,Tt=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ot=6,Tt=null;return}}else if(o=w5(o,t,lr),o!==null){Tt=o;return}if(t=t.sibling,t!==null){Tt=t;return}Tt=t=e}while(t!==null);Ot===0&&(Ot=5)}function Bs(e,t,o){var r=Ge,n=Or.transition;try{Or.transition=null,Ge=1,k5(e,t,o,r)}finally{Or.transition=n,Ge=r}return null}function k5(e,t,o,r){do Su();while(Pi!==null);if(Ee&6)throw Error(q(327));o=e.finishedWork;var n=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var a=o.lanes|o.childLanes;if(d4(e,a),e===jt&&(Tt=jt=null,oo=0),!(o.subtreeFlags&2064)&&!(o.flags&2064)||dg||(dg=!0,kT(Ig,function(){return Su(),null})),a=(o.flags&15990)!==0,o.subtreeFlags&15990||a){a=Or.transition,Or.transition=null;var i=Ge;Ge=1;var s=Ee;Ee|=4,Dw.current=null,b5(e,o),wT(o,e),Q4(M0),Lg=!!k0,M0=k0=null,e.current=o,R5(o,e,n),o4(),Ee=s,Ge=i,Or.transition=a}else e.current=o;if(dg&&(dg=!1,Pi=e,Gg=n),a=e.pendingLanes,a===0&&(Ai=null),a4(o.stateNode,r),$o(e,St()),t!==null)for(r=e.onRecoverableError,o=0;o<t.length;o++)n=t[o],r(n.value,{componentStack:n.stack,digest:n.digest});if(zg)throw zg=!1,e=Y0,Y0=null,e;return Gg&1&&e.tag!==0&&Su(),a=e.pendingLanes,a&1?e===Q0?Hd++:(Hd=0,Q0=e):Hd=0,Bi(),null}function Su(){if(Pi!==null){var e=i1(Gg),t=Or.transition,o=Ge;try{if(Or.transition=null,Ge=16>e?16:e,Pi===null)var r=!1;else{if(e=Pi,Pi=null,Gg=0,Ee&6)throw Error(q(331));var n=Ee;for(Ee|=4,re=e.current;re!==null;){var a=re,i=a.child;if(re.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(re=u;re!==null;){var c=re;switch(c.tag){case 0:case 11:case 15:Vd(8,c,a)}var d=c.child;if(d!==null)d.return=c,re=d;else for(;re!==null;){c=re;var f=c.sibling,p=c.return;if(vT(c),c===u){re=null;break}if(f!==null){f.return=p,re=f;break}re=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}re=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,re=i;else e:for(;re!==null;){if(a=re,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Vd(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,re=v;break e}re=a.return}}var h=e.current;for(re=h;re!==null;){i=re;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,re=y;else e:for(i=h;re!==null;){if(s=re,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:eh(9,s)}}catch(C){vt(s,s.return,C)}if(s===i){re=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,re=w;break e}re=s.return}}if(Ee=n,Bi(),ta&&typeof ta.onPostCommitFiberRoot=="function")try{ta.onPostCommitFiberRoot(qg,e)}catch{}r=!0}return r}finally{Ge=o,Or.transition=t}}return!1}function DL(e,t,o){t=Tu(o,t),t=iT(e,t,1),e=Ei(e,t,1),t=Mo(),e!==null&&(nf(e,1,t),$o(e,t))}function vt(e,t,o){if(e.tag===3)DL(e,e,o);else for(;t!==null;){if(t.tag===3){DL(t,e,o);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ai===null||!Ai.has(r))){e=Tu(o,e),e=sT(t,e,1),t=Ei(t,e,1),e=Mo(),t!==null&&(nf(t,1,e),$o(t,e));break}}t=t.return}}function M5(e,t,o){var r=e.pingCache;r!==null&&r.delete(t),t=Mo(),e.pingedLanes|=e.suspendedLanes&o,jt===e&&(oo&o)===o&&(Ot===4||Ot===3&&(oo&130023424)===oo&&500>St()-Ow?Gs(e,0):Nw|=o),$o(e,t)}function LT(e,t){t===0&&(e.mode&1?(t=Qm,Qm<<=1,!(Qm&130023424)&&(Qm=4194304)):t=1);var o=Mo();e=Ma(e,t),e!==null&&(nf(e,t,o),$o(e,o))}function E5(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),LT(e,o)}function A5(e,t){var o=0;switch(e.tag){case 13:var r=e.stateNode,n=e.memoizedState;n!==null&&(o=n.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),LT(e,o)}var TT;TT=function(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps||jo.current)Wo=!0;else{if(!(e.lanes&o)&&!(t.flags&128))return Wo=!1,y5(e,t,o);Wo=!!(e.flags&131072)}else Wo=!1,it&&t.flags&1048576&&A1(t,Ng,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xg(e,t),e=t.pendingProps;var n=Ru(t,mo.current);Cu(t,o),n=Tw(null,t,r,e,n,o);var a=kw();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,qo(r)?(a=!0,Ag(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,bw(t),n.updater=Jg,t.stateNode=n,n._reactInternals=t,B0(t,r,e,o),t=z0(null,t,r,!0,a,o)):(t.tag=0,it&&a&&hw(t),ko(null,t,n,o),t=t.child),t;case 16:r=t.elementType;e:{switch(xg(e,t),e=t.pendingProps,n=r._init,r=n(r._payload),t.type=r,n=t.tag=N5(r),e=pn(r,e),n){case 0:t=U0(null,t,r,e,o);break e;case 1:t=bL(null,t,r,e,o);break e;case 11:t=CL(null,t,r,e,o);break e;case 14:t=SL(null,t,r,pn(r.type,e),o);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),U0(e,t,r,n,o);case 1:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),bL(e,t,r,n,o);case 3:e:{if(dT(t),e===null)throw Error(q(387));r=t.pendingProps,a=t.memoizedState,n=a.element,V1(e,t),_g(t,r,null,o);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Tu(Error(q(423)),t),t=RL(e,t,r,o,n);break e}else if(r!==n){n=Tu(Error(q(424)),t),t=RL(e,t,r,o,n);break e}else for(ur=Mi(t.stateNode.containerInfo.firstChild),cr=t,it=!0,gn=null,o=F1(t,null,r,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Iu(),r===n){t=Ea(e,t,o);break e}ko(e,t,r,o)}t=t.child}return t;case 5:return B1(t),e===null&&F0(t),r=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,E0(r,n)?i=null:a!==null&&E0(r,a)&&(t.flags|=32),cT(e,t),ko(e,t,i,o),t.child;case 6:return e===null&&F0(t),null;case 13:return fT(e,t,o);case 4:return Rw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pu(t,null,r,o):ko(e,t,r,o),t.child;case 11:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),CL(e,t,r,n,o);case 7:return ko(e,t,t.pendingProps,o),t.child;case 8:return ko(e,t,t.pendingProps.children,o),t.child;case 12:return ko(e,t,t.pendingProps.children,o),t.child;case 10:e:{if(r=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,Ye(Og,r._currentValue),r._currentValue=i,a!==null)if(xn(a.value,i)){if(a.children===n.children&&!jo.current){t=Ea(e,t,o);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===r){if(a.tag===1){l=La(-1,o&-o),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|=o,l=a.alternate,l!==null&&(l.lanes|=o),_0(a.return,o,t),s.lanes|=o;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(q(341));i.lanes|=o,s=i.alternate,s!==null&&(s.lanes|=o),_0(i,o,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}ko(e,t,n.children,o),t=t.child}return t;case 9:return n=t.type,r=t.pendingProps.children,Cu(t,o),n=Fr(n),r=r(n),t.flags|=1,ko(e,t,r,o),t.child;case 14:return r=t.type,n=pn(r,t.pendingProps),n=pn(r.type,n),SL(e,t,r,n,o);case 15:return lT(e,t,t.type,t.pendingProps,o);case 17:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),xg(e,t),t.tag=1,qo(r)?(e=!0,Ag(t)):e=!1,Cu(t,o),aT(t,r,n),B0(t,r,n,o),z0(null,t,r,!0,e,o);case 19:return pT(e,t,o);case 22:return uT(e,t,o)}throw Error(q(156,t.tag))};function kT(e,t){return o1(e,t)}function D5(e,t,o,r){this.tag=e,this.key=o,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(e,t,o,r){return new D5(e,t,o,r)}function Bw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function N5(e){if(typeof e=="function")return Bw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nw)return 11;if(e===aw)return 14}return 2}function Ni(e,t){var o=e.alternate;return o===null?(o=Nr(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Cg(e,t,o,r,n,a){var i=2;if(r=e,typeof e=="function")Bw(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case iu:return Ws(o.children,n,a,t);case rw:i=8,n|=8;break;case u0:return e=Nr(12,o,t,n|2),e.elementType=u0,e.lanes=a,e;case c0:return e=Nr(13,o,t,n),e.elementType=c0,e.lanes=a,e;case d0:return e=Nr(19,o,t,n),e.elementType=d0,e.lanes=a,e;case BL:return oh(o,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _L:i=10;break e;case VL:i=9;break e;case nw:i=11;break e;case aw:i=14;break e;case Ci:i=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=Nr(i,o,t,n),t.elementType=e,t.type=r,t.lanes=a,t}function Ws(e,t,o,r){return e=Nr(7,e,r,t),e.lanes=o,e}function oh(e,t,o,r){return e=Nr(22,e,r,t),e.elementType=BL,e.lanes=o,e.stateNode={isHidden:!1},e}function i0(e,t,o){return e=Nr(6,e,null,t),e.lanes=o,e}function s0(e,t,o){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function O5(e,t,o,r,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=Wy(0),this.expirationTimes=Wy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wy(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Hw(e,t,o,r,n,a,i,s,l){return e=new O5(e,t,o,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Nr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},bw(a),e}function F5(e,t,o){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:au,key:r==null?null:""+r,children:e,containerInfo:t,implementation:o}}function MT(e){if(!e)return Fi;e=e._reactInternals;e:{if(Qs(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var o=e.type;if(qo(o))return M1(e,o,t)}return t}function ET(e,t,o,r,n,a,i,s,l){return e=Hw(o,r,!0,e,n,a,i,s,l),e.context=MT(null),o=e.current,r=Mo(),n=Di(o),a=La(r,n),a.callback=t??null,Ei(o,a,n),e.current.lanes=n,nf(e,n,r),$o(e,r),e}function rh(e,t,o,r){var n=t.current,a=Mo(),i=Di(n);return o=MT(o),t.context===null?t.context=o:t.pendingContext=o,t=La(a,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ei(n,t,i),e!==null&&(vn(e,n,i,a),gg(e,n,i)),i}function jg(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 NL(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function Uw(e,t){NL(e,t),(e=e.alternate)&&NL(e,t)}function _5(){return null}var AT=typeof reportError=="function"?reportError:function(e){console.error(e)};function zw(e){this._internalRoot=e}nh.prototype.render=zw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));rh(e,t,null,null)};nh.prototype.unmount=zw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xs(function(){rh(null,e,null,null)}),t[ka]=null}};function nh(e){this._internalRoot=e}nh.prototype.unstable_scheduleHydration=function(e){if(e){var t=u1();e={blockedOn:null,target:e,priority:t};for(var o=0;o<bi.length&&t!==0&&t<bi[o].priority;o++);bi.splice(o,0,e),o===0&&d1(e)}};function Gw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ah(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function OL(){}function V5(e,t,o,r,n){if(n){if(typeof r=="function"){var a=r;r=function(){var u=jg(i);a.call(u)}}var i=ET(t,r,e,0,null,!1,!1,"",OL);return e._reactRootContainer=i,e[ka]=i.current,Xd(e.nodeType===8?e.parentNode:e),Xs(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof r=="function"){var s=r;r=function(){var u=jg(l);s.call(u)}}var l=Hw(e,0,!1,null,null,!1,!1,"",OL);return e._reactRootContainer=l,e[ka]=l.current,Xd(e.nodeType===8?e.parentNode:e),Xs(function(){rh(t,l,o,r)}),l}function ih(e,t,o,r,n){var a=o._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=jg(i);s.call(l)}}rh(t,i,e,n)}else i=V5(o,t,e,n,r);return jg(i)}s1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var o=Md(t.pendingLanes);o!==0&&(lw(t,o|1),$o(t,St()),!(Ee&6)&&(ku=St()+500,Bi()))}break;case 13:Xs(function(){var r=Ma(e,1);if(r!==null){var n=Mo();vn(r,e,1,n)}}),Uw(e,1)}};uw=function(e){if(e.tag===13){var t=Ma(e,134217728);if(t!==null){var o=Mo();vn(t,e,134217728,o)}Uw(e,134217728)}};l1=function(e){if(e.tag===13){var t=Di(e),o=Ma(e,t);if(o!==null){var r=Mo();vn(o,e,t,r)}Uw(e,t)}};u1=function(){return Ge};c1=function(e,t){var o=Ge;try{return Ge=e,t()}finally{Ge=o}};C0=function(e,t,o){switch(t){case"input":if(m0(e,o),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<o.length;t++){var r=o[t];if(r!==e&&r.form===e.form){var n=Yg(r);if(!n)throw Error(q(90));UL(r),m0(r,n)}}}break;case"textarea":GL(e,o);break;case"select":t=o.value,t!=null&&vu(e,!!o.multiple,t,!1)}};YL=Fw;QL=Xs;var B5={usingClientEntryPoint:!1,Events:[sf,cu,Yg,KL,XL,Fw]},Pd={findFiberByHostInstance:Hs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H5={bundleType:Pd.bundleType,version:Pd.version,rendererPackageName:Pd.rendererPackageName,rendererConfig:Pd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Aa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=e1(e),e===null?null:e.stateNode},findFiberByHostInstance:Pd.findFiberByHostInstance||_5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ld=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ld.isDisabled&&Ld.supportsFiber))try{qg=Ld.inject(H5),ta=Ld}catch{}var Ld;pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B5;pr.createPortal=function(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gw(t))throw Error(q(200));return F5(e,t,null,o)};pr.createRoot=function(e,t){if(!Gw(e))throw Error(q(299));var o=!1,r="",n=AT;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Hw(e,1,!1,null,null,o,!1,r,n),e[ka]=t.current,Xd(e.nodeType===8?e.parentNode:e),new zw(t)};pr.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(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=e1(t),e=e===null?null:e.stateNode,e};pr.flushSync=function(e){return Xs(e)};pr.hydrate=function(e,t,o){if(!ah(t))throw Error(q(200));return ih(null,e,t,!0,o)};pr.hydrateRoot=function(e,t,o){if(!Gw(e))throw Error(q(405));var r=o!=null&&o.hydratedSources||null,n=!1,a="",i=AT;if(o!=null&&(o.unstable_strictMode===!0&&(n=!0),o.identifierPrefix!==void 0&&(a=o.identifierPrefix),o.onRecoverableError!==void 0&&(i=o.onRecoverableError)),t=ET(t,null,e,1,o??null,n,!1,a,i),e[ka]=t.current,Xd(e),r)for(e=0;e<r.length;e++)o=r[e],n=o._getVersion,n=n(o._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[o,n]:t.mutableSourceEagerHydrationData.push(o,n);return new nh(t)};pr.render=function(e,t,o){if(!ah(t))throw Error(q(200));return ih(null,e,t,!1,o)};pr.unmountComponentAtNode=function(e){if(!ah(e))throw Error(q(40));return e._reactRootContainer?(Xs(function(){ih(null,null,e,!1,function(){e._reactRootContainer=null,e[ka]=null})}),!0):!1};pr.unstable_batchedUpdates=Fw;pr.unstable_renderSubtreeIntoContainer=function(e,t,o,r){if(!ah(o))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return ih(e,t,o,!1,r)};pr.version="18.3.1-next-f1338f8080-20240426"});var Da=tu((Pee,OT)=>{"use strict";function NT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(NT)}catch(e){console.error(e)}}NT(),OT.exports=DT()});var kk=tu(Tk=>{"use strict";var qu=M();function qW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $W=typeof Object.is=="function"?Object.is:qW,KW=qu.useState,XW=qu.useEffect,YW=qu.useLayoutEffect,QW=qu.useDebugValue;function ZW(e,t){var o=t(),r=KW({inst:{value:o,getSnapshot:t}}),n=r[0].inst,a=r[1];return YW(function(){n.value=o,n.getSnapshot=t,iC(n)&&a({inst:n})},[e,o,t]),XW(function(){return iC(n)&&a({inst:n}),e(function(){iC(n)&&a({inst:n})})},[e]),QW(o),o}function iC(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!$W(e,o)}catch{return!0}}function JW(e,t){return t()}var ej=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JW:ZW;Tk.useSyncExternalStore=qu.useSyncExternalStore!==void 0?qu.useSyncExternalStore:ej});var Ek=tu((Fne,Mk)=>{"use strict";Mk.exports=kk()});var xh=b(M());var Xo=b(M(),1);var kr=b(M(),1),My=b(D(),1);function fP(e,t){let o=kr.createContext(t),r=a=>{let{children:i,...s}=a,l=kr.useMemo(()=>s,Object.values(s));return(0,My.jsx)(o.Provider,{value:l,children:i})};r.displayName=e+"Provider";function n(a){let i=kr.useContext(o);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,n]}function Oe(e,t=[]){let o=[];function r(a,i){let s=kr.createContext(i),l=o.length;o=[...o,i];let u=d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,x=kr.useMemo(()=>m,Object.values(m));return(0,My.jsx)(g.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,m=kr.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=o.map(i=>kr.createContext(i));return function(s){let l=s?.[e]||a;return kr.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[r,kz(n,...t)]}function kz(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return kr.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}var xi=b(M(),1);var mP=b(M(),1);function pP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ir(...e){return t=>{let o=!1,r=e.map(n=>{let a=pP(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():pP(e[n],null)}}}}function de(...e){return mP.useCallback(ir(...e),e)}var Dt=b(M(),1);var ou=b(D(),1);function sr(e){let t=Mz(e),o=Dt.forwardRef((r,n)=>{let{children:a,...i}=r,s=Dt.Children.toArray(a),l=s.find(Ez);if(l){let u=l.props.children,c=s.map(d=>d===l?Dt.Children.count(u)>1?Dt.Children.only(null):Dt.isValidElement(u)?u.props.children:null:d);return(0,ou.jsx)(t,{...i,ref:n,children:Dt.isValidElement(u)?Dt.cloneElement(u,void 0,c):null})}return(0,ou.jsx)(t,{...i,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}function Mz(e){let t=Dt.forwardRef((o,r)=>{let{children:n,...a}=o;if(Dt.isValidElement(n)){let i=Dz(n),s=Az(a,n.props);return n.type!==Dt.Fragment&&(s.ref=r?ir(r,i):i),Dt.cloneElement(n,s)}return Dt.Children.count(n)>1?Dt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gP=Symbol("radix.slottable");function hP(e){let t=({children:o})=>(0,ou.jsx)(ou.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=gP,t}function Ez(e){return Dt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gP}function Az(e,t){let o={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function Dz(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 Hm=b(D(),1),Nz=b(M(),1);var Oz=b(D(),1);function Yn(e){let t=e+"CollectionProvider",[o,r]=Oe(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{let{scope:x,children:v}=g,h=xi.default.useRef(null),y=xi.default.useRef(new Map).current;return(0,Hm.jsx)(n,{scope:x,itemMap:y,collectionRef:h,children:v})};i.displayName=t;let s=e+"CollectionSlot",l=sr(s),u=xi.default.forwardRef((g,x)=>{let{scope:v,children:h}=g,y=a(s,v),w=de(x,y.collectionRef);return(0,Hm.jsx)(l,{ref:w,children:h})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=sr(c),p=xi.default.forwardRef((g,x)=>{let{scope:v,children:h,...y}=g,w=xi.default.useRef(null),C=de(x,w),S=a(c,v);return xi.default.useEffect(()=>(S.itemMap.set(w,{ref:w,...y}),()=>void S.itemMap.delete(w))),(0,Hm.jsx)(f,{[d]:"",ref:C,children:h})});p.displayName=c;function m(g){let x=a(e+"CollectionConsumer",g);return xi.default.useCallback(()=>{let h=x.collectionRef.current;if(!h)return[];let y=Array.from(h.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((S,R)=>y.indexOf(S.ref.current)-y.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},m,r]}var vee=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n.defaultPrevented)return t?.(n)}}var Mr=b(M(),1);var vP=b(M(),1),_e=globalThis?.document?vP.useLayoutEffect:()=>{};var Um=b(M(),1);var Fz=Mr[" useInsertionEffect ".trim().toString()]||_e;function qe({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[n,a,i]=_z({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;{let c=Mr.useRef(e!==void 0);Mr.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} 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,r])}let u=Mr.useCallback(c=>{if(s){let d=Vz(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function _z({defaultProp:e,onChange:t}){let[o,r]=Mr.useState(e),n=Mr.useRef(o),a=Mr.useRef(t);return Fz(()=>{a.current=t},[t]),Mr.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}function Vz(e){return typeof e=="function"}var Cee=Symbol("RADIX:SYNC_STATE");var FT=b(M(),1),_T=b(Da(),1);var VT=b(D(),1),U5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=U5.reduce((e,t)=>{let o=sr(`Primitive.${t}`),r=FT.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,VT.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Au(e,t){e&&_T.flushSync(()=>e.dispatchEvent(t))}var no=b(M(),1);var Ko=b(M(),1);var BT=b(M(),1);function z5(e,t){return BT.useReducer((o,r)=>t[o][r]??o,e)}var st=e=>{let{present:t,children:o}=e,r=G5(t),n=typeof o=="function"?o({present:r.isPresent}):Ko.Children.only(o),a=de(r.ref,W5(n));return typeof o=="function"||r.isPresent?Ko.cloneElement(n,{ref:a}):null};st.displayName="Presence";function G5(e){let[t,o]=Ko.useState(),r=Ko.useRef(null),n=Ko.useRef(e),a=Ko.useRef("none"),i=e?"mounted":"unmounted",[s,l]=z5(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ko.useEffect(()=>{let u=sh(r.current);a.current=s==="mounted"?u:"none"},[s]),_e(()=>{let u=r.current,c=n.current;if(c!==e){let f=a.current,p=sh(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),_e(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let g=sh(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(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=sh(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(s),ref:Ko.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function sh(e){return e?.animationName||"none"}function W5(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 Ww=b(M(),1);var j5=Ww[" useId ".trim().toString()]||(()=>{}),q5=0;function Ae(e){let[t,o]=Ww.useState(j5());return _e(()=>{e||o(r=>r??String(q5++))},[e]),e||(t?`radix-${t}`:"")}var Zs=b(D(),1),lh="Collapsible",[$5,jw]=Oe(lh),[K5,qw]=$5(lh),HT=no.forwardRef((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=qe({prop:r,defaultProp:n??!1,onChange:i,caller:lh});return(0,Zs.jsx)(K5,{scope:o,disabled:a,contentId:Ae(),open:l,onOpenToggle:no.useCallback(()=>u(c=>!c),[u]),children:(0,Zs.jsx)($.div,{"data-state":Kw(l),"data-disabled":a?"":void 0,...s,ref:t})})});HT.displayName=lh;var UT="CollapsibleTrigger",zT=no.forwardRef((e,t)=>{let{__scopeCollapsible:o,...r}=e,n=qw(UT,o);return(0,Zs.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Kw(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});zT.displayName=UT;var $w="CollapsibleContent",GT=no.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=qw($w,e.__scopeCollapsible);return(0,Zs.jsx)(st,{present:o||n.open,children:({present:a})=>(0,Zs.jsx)(X5,{...r,ref:t,present:a})})});GT.displayName=$w;var X5=no.forwardRef((e,t)=>{let{__scopeCollapsible:o,present:r,children:n,...a}=e,i=qw($w,o),[s,l]=no.useState(r),u=no.useRef(null),c=de(t,u),d=no.useRef(0),f=d.current,p=no.useRef(0),m=p.current,g=i.open||s,x=no.useRef(g),v=no.useRef(void 0);return no.useEffect(()=>{let h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),_e(()=>{let h=u.current;if(h){v.current=v.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";let y=h.getBoundingClientRect();d.current=y.height,p.current=y.width,x.current||(h.style.transitionDuration=v.current.transitionDuration,h.style.animationName=v.current.animationName),l(r)}},[i.open,r]),(0,Zs.jsx)($.div,{"data-state":Kw(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&n})});function Kw(e){return e?"open":"closed"}var uh=HT,Du=zT,uf=GT;var ch=b(M(),1),Y5=b(D(),1),Q5=ch.createContext(void 0);function ra(e){let t=ch.useContext(Q5);return e||t||"ltr"}var Ft=b(D(),1),yn="Accordion",Z5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Yw,J5,eG]=Yn(yn),[fh,Zee]=Oe(yn,[eG,jw]),Qw=jw(),jT=Xo.default.forwardRef((e,t)=>{let{type:o,...r}=e,n=r,a=r;return(0,Ft.jsx)(Yw.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?(0,Ft.jsx)(nG,{...a,ref:t}):(0,Ft.jsx)(rG,{...n,ref:t})})});jT.displayName=yn;var[qT,tG]=fh(yn),[$T,oG]=fh(yn,{collapsible:!1}),rG=Xo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=qe({prop:o,defaultProp:r??"",onChange:n,caller:yn});return(0,Ft.jsx)(qT,{scope:e.__scopeAccordion,value:Xo.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Xo.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Ft.jsx)($T,{scope:e.__scopeAccordion,collapsible:a,children:(0,Ft.jsx)(KT,{...i,ref:t})})})}),nG=Xo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:n=()=>{},...a}=e,[i,s]=qe({prop:o,defaultProp:r??[],onChange:n,caller:yn}),l=Xo.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Xo.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,Ft.jsx)(qT,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Ft.jsx)($T,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Ft.jsx)(KT,{...a,ref:t})})})}),[aG,ph]=fh(yn),KT=Xo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:n,orientation:a="vertical",...i}=e,s=Xo.default.useRef(null),l=de(s,t),u=J5(o),d=ra(n)==="ltr",f=W(e.onKeyDown,p=>{if(!Z5.includes(p.key))return;let m=p.target,g=u().filter(I=>!I.ref.current?.disabled),x=g.findIndex(I=>I.ref.current===m),v=g.length;if(x===-1)return;p.preventDefault();let h=x,y=0,w=v-1,C=()=>{h=x+1,h>w&&(h=y)},S=()=>{h=x-1,h<y&&(h=w)};switch(p.key){case"Home":h=y;break;case"End":h=w;break;case"ArrowRight":a==="horizontal"&&(d?C():S());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?S():C());break;case"ArrowUp":a==="vertical"&&S();break}let R=h%v;g[R].ref.current?.focus()});return(0,Ft.jsx)(aG,{scope:o,disabled:r,direction:n,orientation:a,children:(0,Ft.jsx)(Yw.Slot,{scope:o,children:(0,Ft.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:r?void 0:f})})})}),dh="AccordionItem",[iG,Zw]=fh(dh),XT=Xo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...n}=e,a=ph(dh,o),i=tG(dh,o),s=Qw(o),l=Ae(),u=r&&i.value.includes(r)||!1,c=a.disabled||e.disabled;return(0,Ft.jsx)(iG,{scope:o,open:u,disabled:c,triggerId:l,children:(0,Ft.jsx)(uh,{"data-orientation":a.orientation,"data-state":tk(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(r):i.onItemClose(r)}})})});XT.displayName=dh;var YT="AccordionHeader",QT=Xo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=ph(yn,o),a=Zw(YT,o);return(0,Ft.jsx)($.h3,{"data-orientation":n.orientation,"data-state":tk(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});QT.displayName=YT;var Xw="AccordionTrigger",ZT=Xo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=ph(yn,o),a=Zw(Xw,o),i=oG(Xw,o),s=Qw(o);return(0,Ft.jsx)(Yw.ItemSlot,{scope:o,children:(0,Ft.jsx)(Du,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...r,ref:t})})});ZT.displayName=Xw;var JT="AccordionContent",ek=Xo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=ph(yn,o),a=Zw(JT,o),i=Qw(o);return(0,Ft.jsx)(uf,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ek.displayName=JT;function tk(e){return e?"open":"closed"}var ok=jT,rk=XT,nk=QT,Jw=ZT,eC=ek;var gh=b(M());var ak=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lG=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),tC=e=>{let t=lG(e);return t.charAt(0).toUpperCase()+t.slice(1)},mh=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),ik=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var cf=b(M());var sk={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 lk=(0,cf.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:i,...s},l)=>(0,cf.createElement)("svg",{ref:l,...sk,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:mh("lucide",n),...!a&&!ik(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,cf.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var H=(e,t)=>{let o=(0,gh.forwardRef)(({className:r,...n},a)=>(0,gh.createElement)(lk,{ref:a,iconNode:t,className:mh(`lucide-${ak(tC(e))}`,`lucide-${e}`,r),...n}));return o.displayName=tC(e),o};var uG=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],df=H("align-center",uG);var cG=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],ff=H("align-justify",cG);var dG=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],pf=H("align-left",dG);var fG=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],mf=H("align-right",fG);var pG=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Nu=H("arrow-down",pG);var mG=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],gf=H("arrow-left",mG);var gG=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hf=H("arrow-right",gG);var hG=[["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"}]],Ou=H("arrow-up-down",hG);var vG=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Fu=H("arrow-up",vG);var xG=[["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"}]],vf=H("bold",xG);var yG=[["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"}]],Js=H("calendar",yG);var wG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],go=H("check",wG);var CG=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],na=H("chevron-down",CG);var SG=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],wn=H("chevron-left",SG);var bG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ao=H("chevron-right",bG);var RG=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xf=H("chevron-up",RG);var IG=[["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"}]],Cn=H("circle-alert",IG);var PG=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Hi=H("circle-check-big",PG);var LG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],el=H("circle",LG);var TG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yf=H("clock",TG);var kG=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],wf=H("code",kG);var MG=[["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"}]],Cf=H("copy",MG);var EG=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Sf=H("credit-card",EG);var AG=[["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"}]],_u=H("crown",AG);var DG=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],bf=H("dot",DG);var NG=[["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"}]],aa=H("ellipsis",NG);var OG=[["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"}]],Rf=H("external-link",OG);var FG=[["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"}]],tl=H("eye",FG);var _G=[["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"}]],If=H("file-text",_G);var VG=[["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"}]],Pf=H("file",VG);var BG=[["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"}]],Lf=H("git-fork",BG);var HG=[["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"}]],ol=H("image",HG);var UG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vu=H("info",UG);var zG=[["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"}]],Tf=H("italic",zG);var GG=[["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"}]],kf=H("link",GG);var WG=[["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"}]],Mf=H("list-ordered",WG);var jG=[["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"}]],Ef=H("list",jG);var qG=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_t=H("loader-circle",qG);var $G=[["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"}]],Bu=H("lock",$G);var KG=[["path",{d:"M5 12h14",key:"1ays0h"}]],Af=H("minus",KG);var XG=[["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"}]],Df=H("music",XG);var YG=[["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"}]],Hu=H("palette",YG);var QG=[["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"}]],Nf=H("phone",QG);var ZG=[["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"}]],hh=H("pipette",ZG);var JG=[["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"}]],Of=H("quote",JG);var eW=[["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"}]],Ff=H("redo",eW);var tW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],rl=H("search",tW);var oW=[["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"}]],Yo=H("square-pen",oW);var rW=[["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"}]],Ui=H("star",rW);var nW=[["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"}]],_f=H("strikethrough",nW);var aW=[["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"}]],zi=H("triangle-alert",aW);var iW=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Vf=H("underline",iW);var sW=[["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"}]],Bf=H("undo",sW);var lW=[["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"}]],Hf=H("upload",lW);var uW=[["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"}]],Uf=H("video",uW);var cW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mr=H("x",cW);var dW=[["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"}]],Uu=H("zap",dW);function uk(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=uk(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function vh(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=uk(e))&&(r&&(r+=" "),r+=t);return r}var nC="-",fW=e=>{let t=mW(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let s=i.split(nC);return s[0]===""&&s.length!==1&&s.shift(),fk(s,t)||pW(i)},getConflictingClassGroupIds:(i,s)=>{let l=o[i]||[];return s&&r[i]?[...l,...r[i]]:l}}},fk=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),n=r?fk(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(nC);return t.validators.find(({validator:i})=>i(a))?.classGroupId},ck=/^\[(.+)\]$/,pW=e=>{if(ck.test(e)){let t=ck.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},mW=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return hW(Object.entries(e.classGroups),o).forEach(([a,i])=>{rC(i,r,a,t)}),r},rC=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:dk(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(gW(n)){rC(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,i])=>{rC(i,dk(t,a),o,r)})})},dk=(e,t)=>{let o=e;return t.split(nC).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},gW=e=>e.isThemeGetter,hW=(e,t)=>t?e.map(([o,r])=>{let n=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[o,n]}):e,vW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,n=(a,i)=>{o.set(a,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let i=o.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return n(a,i),i},set(a,i){o.has(a)?o.set(a,i):n(a,i)}}},pk="!",xW=e=>{let{separator:t,experimentalParseClassName:o}=e,r=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&&(r||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(pk),m=p?f.substring(1):f,g=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return o?s=>o({className:s,parseClassName:i}):i},yW=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},wW=e=>({cache:vW(e.cacheSize),parseClassName:xW(e),...fW(e)}),CW=/\s+/,SW=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(CW),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=o(u),m=!!p,g=r(m?f.substring(0,p):f);if(!g){if(!m){s=u+(s.length>0?" "+s:s);continue}if(g=r(f),!g){s=u+(s.length>0?" "+s:s);continue}m=!1}let x=yW(c).join(":"),v=d?x+pk:x,h=v+g;if(a.includes(h))continue;a.push(h);let y=n(g,m);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 bW(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=mk(t))&&(r&&(r+=" "),r+=o);return r}var mk=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=mk(e[r]))&&(o&&(o+=" "),o+=t);return o};function RW(e,...t){let o,r,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return o=wW(u),r=o.cache.get,n=o.cache.set,a=s,s(l)}function s(l){let u=r(l);if(u)return u;let c=SW(l,o);return n(l,c),c}return function(){return a(bW.apply(null,arguments))}}var ot=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},gk=/^\[(?:([a-z-]+):)?(.+)\]$/i,IW=/^\d+\/\d+$/,PW=new Set(["px","full","screen"]),LW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TW=/\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$/,kW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,MW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,EW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Na=e=>zu(e)||PW.has(e)||IW.test(e),Gi=e=>Gu(e,"length",BW),zu=e=>!!e&&!Number.isNaN(Number(e)),oC=e=>Gu(e,"number",zu),zf=e=>!!e&&Number.isInteger(Number(e)),AW=e=>e.endsWith("%")&&zu(e.slice(0,-1)),Pe=e=>gk.test(e),Wi=e=>LW.test(e),DW=new Set(["length","size","percentage"]),NW=e=>Gu(e,DW,hk),OW=e=>Gu(e,"position",hk),FW=new Set(["image","url"]),_W=e=>Gu(e,FW,UW),VW=e=>Gu(e,"",HW),Gf=()=>!0,Gu=(e,t,o)=>{let r=gk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},BW=e=>TW.test(e)&&!kW.test(e),hk=()=>!1,HW=e=>MW.test(e),UW=e=>EW.test(e);var zW=()=>{let e=ot("colors"),t=ot("spacing"),o=ot("blur"),r=ot("brightness"),n=ot("borderColor"),a=ot("borderRadius"),i=ot("borderSpacing"),s=ot("borderWidth"),l=ot("contrast"),u=ot("grayscale"),c=ot("hueRotate"),d=ot("invert"),f=ot("gap"),p=ot("gradientColorStops"),m=ot("gradientColorStopPositions"),g=ot("inset"),x=ot("margin"),v=ot("opacity"),h=ot("padding"),y=ot("saturate"),w=ot("scale"),C=ot("sepia"),S=ot("skew"),R=ot("space"),I=ot("translate"),T=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Pe,t],A=()=>[Pe,t],F=()=>["",Na,Gi],N=()=>["auto",zu,Pe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],_=()=>["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"],E=()=>["","0",Pe],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[zu,Pe];return{cacheSize:500,separator:":",theme:{colors:[Gf],spacing:[Na,Gi],blur:["none","",Wi,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Wi,Pe],borderSpacing:A(),borderWidth:F(),contrast:ae(),grayscale:E(),hueRotate:ae(),invert:E(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[AW,Gi],inset:k(),margin:k(),opacity:ae(),padding:A(),saturate:ae(),scale:ae(),sepia:E(),skew:ae(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[Wi]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:[...U(),Pe]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zf,Pe]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pe]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",zf,Pe]}],"grid-cols":[{"grid-cols":[Gf]}],"col-start-end":[{col:["auto",{span:["full",zf,Pe]},Pe]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[Gf]}],"row-start-end":[{row:["auto",{span:[zf,Pe]},Pe]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pe]}],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:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],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":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Pe,t]}],"min-w":[{"min-w":[Pe,t,"min","max","fit"]}],"max-w":[{"max-w":[Pe,t,"none","full","min","max","fit","prose",{screen:[Wi]},Wi]}],h:[{h:[Pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wi,Gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",oC]}],"font-family":[{font:[Gf]}],"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",Pe]}],"line-clamp":[{"line-clamp":["none",zu,oC]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Na,Pe]}],"list-image":[{"list-image":["none",Pe]}],"list-style-type":[{list:["none","disc","decimal",Pe]}],"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:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Na,Gi]}],"underline-offset":[{"underline-offset":["auto",Na,Pe]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe]}],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",Pe]}],"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:[...U(),OW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_W]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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:[...O(),"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:O()}],"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:["",...O()]}],"outline-offset":[{"outline-offset":[Na,Pe]}],"outline-w":[{outline:[Na,Gi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Na,Gi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wi,VW]}],"shadow-color":[{shadow:[Gf]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wi,Pe]}],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":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"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",Pe]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",Pe]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[zf,Pe]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pe]}],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",Pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",Pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Na,Gi,oC]}],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 vk=RW(zW);function P(...e){return vk(vh(e))}var ji=b(D()),GW=ok,xk=xh.forwardRef(({className:e,...t},o)=>(0,ji.jsx)(rk,{ref:o,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));xk.displayName="AccordionItem";var yk=xh.forwardRef(({className:e,children:t,...o},r)=>(0,ji.jsx)(nk,{className:"flex",children:(0,ji.jsxs)(Jw,{ref:r,className:P("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,ji.jsx)(na,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));yk.displayName=Jw.displayName;var wk=xh.forwardRef(({className:e,children:t,...o},r)=>(0,ji.jsx)(eC,{ref:r,className:P("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,ji.jsx)("div",{className:"pb-4 pt-0",children:t})}));wk.displayName=eC.displayName;var Wu=b(M());var Ck=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sk=vh,Q=(e,t)=>o=>{var r;if(t?.variants==null)return Sk(e,o?.class,o?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=o?.[u],d=a?.[u];if(c===null)return null;let f=Ck(c)||Ck(d);return n[u][f]}),s=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,...p}=c;return Object.entries(p).every(m=>{let[g,x]=m;return Array.isArray(x)?x.includes({...a,...s}[g]):{...a,...s}[g]===x})?[...u,d,f]:u},[]);return Sk(e,i,l,o?.class,o?.className)};var Oa=b(D()),WW=Q("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}}),bk=Wu.forwardRef(({className:e,variant:t="default",size:o,radius:r,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=Wu.useMemo(()=>{switch(t){case"success":return go;case"warning":return zi;case"error":return Cn;case"info":return Vu;default:return Vu}},[t]);return(0,Oa.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",WW({variant:t,size:o,radius:r,withClose:a}),e),...l,children:[!n&&(0,Oa.jsx)(c,{className:"h-5 w-5"}),(0,Oa.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,Oa.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,Oa.jsx)(mr,{className:"h-4 w-4"})})]})});bk.displayName="Alert";var Rk=Wu.forwardRef(({className:e,...t},o)=>(0,Oa.jsx)("h5",{ref:o,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));Rk.displayName="AlertTitle";var Ik=Wu.forwardRef(({className:e,...t},o)=>(0,Oa.jsx)("div",{ref:o,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));Ik.displayName="AlertDescription";var Pk=b(M());var aC=b(D()),jW=Q("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"}}),Lk=Pk.forwardRef(({className:e,variant:t,radius:o,ratio:r=16/9,style:n,children:a,...i},s)=>(0,aC.jsx)("div",{ref:s,className:P("moonui-theme",jW({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...n},...i,children:(0,aC.jsx)("div",{className:"absolute inset-0",children:a})}));Lk.displayName="AspectRatio";var jf=b(M());var Vr=b(M(),1);var ju=b(M(),1);function rt(e){let t=ju.useRef(e);return ju.useEffect(()=>{t.current=e}),ju.useMemo(()=>(...o)=>t.current?.(...o),[])}var Ak=b(Ek(),1);function Dk(){return(0,Ak.useSyncExternalStore)(tj,()=>!0,()=>!1)}function tj(){return()=>{}}var Wf=b(D(),1),sC="Avatar",[oj,Gne]=Oe(sC),[rj,Ok]=oj(sC),Fk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,...r}=e,[n,a]=Vr.useState("idle");return(0,Wf.jsx)(rj,{scope:o,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,Wf.jsx)($.span,{...r,ref:t})})});Fk.displayName=sC;var _k="AvatarImage",Vk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:n=()=>{},...a}=e,i=Ok(_k,o),s=nj(r,a),l=rt(u=>{n(u),i.onImageLoadingStatusChange(u)});return _e(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,Wf.jsx)($.img,{...a,ref:t,src:r}):null});Vk.displayName=_k;var Bk="AvatarFallback",Hk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,delayMs:r,...n}=e,a=Ok(Bk,o),[i,s]=Vr.useState(r===void 0);return Vr.useEffect(()=>{if(r!==void 0){let l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&a.imageLoadingStatus!=="loaded"?(0,Wf.jsx)($.span,{...n,ref:t}):null});Hk.displayName=Bk;function Nk(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nj(e,{referrerPolicy:t,crossOrigin:o}){let r=Dk(),n=Vr.useRef(null),a=(()=>r?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Vr.useState(()=>Nk(a,e));return _e(()=>{s(Nk(a,e))},[a,e]),_e(()=>{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 o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,o,t]),i}var lC=Fk,uC=Vk,cC=Hk;var Sn=b(D()),ij=Q("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"}}),dC=jf.forwardRef(({className:e,size:t,radius:o,variant:r,...n},a)=>(0,Sn.jsx)(lC,{ref:a,className:P("moonui-theme",ij({size:t,radius:o,variant:r}),e),...n}));dC.displayName=lC.displayName;var Uk=jf.forwardRef(({className:e,...t},o)=>(0,Sn.jsx)(uC,{ref:o,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));Uk.displayName=uC.displayName;var fC=jf.forwardRef(({className:e,...t},o)=>(0,Sn.jsx)(cC,{ref:o,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));fC.displayName=cC.displayName;var zk=jf.forwardRef(({className:e,limit:t,avatars:o,overlapOffset:r=-8,...n},a)=>{let i=t?o.slice(0,t):o,s=t?Math.max(0,o.length-t):0;return(0,Sn.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,Sn.jsxs)("div",{className:"flex",children:[i.map((l,u)=>(0,Sn.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${r}px`,zIndex:i.length-u},children:l},u)),s>0&&(0,Sn.jsx)("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:(0,Sn.jsx)(dC,{variant:"border",children:(0,Sn.jsxs)(fC,{children:["+",s]})})})]})})});zk.displayName="AvatarGroup";var ho=b(D()),Gk=Q(["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 gr({className:e,variant:t,size:o,radius:r,withDot:n,dotColor:a,removable:i,onRemove:s,leftIcon:l,rightIcon:u,noAutoSpacing:c,children:d,...f}){let p=l,m=d;return t==="pro"&&(p=l||(0,ho.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,ho.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,ho.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,ho.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),m=d||"Pro"),t==="admin"&&(p=l||(0,ho.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,ho.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"})}),m=d||"Admin Pro"),(0,ho.jsxs)("div",{className:P("moonui-theme",Gk({variant:t,size:o,radius:r}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,ho.jsx)("span",{className:P("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,ho.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,ho.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,ho.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,ho.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(),s()},"aria-label":"Remove badge",children:(0,ho.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,ho.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 ia=b(M());var Do=b(D()),sj=Q("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"}}),Wk=ia.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,Do.jsx)("nav",{ref:n,className:P("moonui-theme",sj({variant:t,size:o}),e),"aria-label":"breadcrumb",...r}));Wk.displayName="Breadcrumb";var jk=ia.forwardRef(({className:e,collapsed:t,collapsedWidth:o=3,...r},n)=>{let a=ia.Children.toArray(r.children).filter(Boolean),i=a.length;if(t&&i>o){let s=a[0],l=a.slice(-2);return(0,Do.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[s,(0,Do.jsx)(pC,{}),l]})}return(0,Do.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});jk.displayName="BreadcrumbList";var qk=ia.forwardRef(({className:e,isCurrent:t,href:o,asChild:r=!1,...n},a)=>{let i=r?ia.Fragment:o?"a":"span",s=r?{}:o?{href:o}:{};return(0,Do.jsx)("li",{ref:a,className:P("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Do.jsx)(i,{className:P("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})})});qk.displayName="BreadcrumbItem";var $k=({children:e,className:t,...o})=>(0,Do.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||(0,Do.jsx)(Ao,{className:"h-3.5 w-3.5"})});$k.displayName="BreadcrumbSeparator";var pC=({className:e,...t})=>(0,Do.jsxs)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Do.jsx)(aa,{className:"h-4 w-4"}),(0,Do.jsx)("span",{className:"sr-only",children:"More pages"})]});pC.displayName="BreadcrumbEllipsis";var Kk=ia.forwardRef(({className:e,href:t,...o},r)=>(0,Do.jsx)("a",{ref:r,href:t,className:P("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));Kk.displayName="BreadcrumbLink";var Xk=ia.forwardRef(({className:e,...t},o)=>(0,Do.jsx)("span",{ref:o,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Xk.displayName="BreadcrumbPage";var Yk=b(M());var wh=b(D()),yh=Q(["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}}),De=Yk.forwardRef(({className:e,variant:t,size:o,rounded:r,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,wh.jsxs)("button",{className:P("moonui-theme",yh({variant:t,size:o,rounded:r,fullWidth:n,className:e})),ref:f,disabled:c||i,"data-loading":i?"":void 0,...d,children:[i&&(0,wh.jsx)(_t,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));De.displayName="Button";var Il=b(M());var kp=b(D(),1),ca=b(M(),1);var Qk=b(M(),1),$u=(0,Qk.createContext)({});var Zk=b(M(),1);function sa(e){let t=(0,Zk.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Ch=b(M(),1);var Ku=typeof window<"u";var Xu=Ku?Ch.useLayoutEffect:Ch.useEffect;var $C=b(D(),1),nE=b(M(),1),Lp=b(M(),1);var Jk=b(M(),1),qi=(0,Jk.createContext)(null);var oE=b(D(),1);function nl(e,t){e.indexOf(t)===-1&&e.push(t)}function bn(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var qt=(e,t,o)=>o>t?t:o<e?e:o;var Fa=()=>{},ao=()=>{};var vo={};var qf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function $f(e){return typeof e=="object"&&e!==null}var Kf=e=>/^0[^.\s]+$/u.test(e);function al(e){let t;return()=>(t===void 0&&(t=e()),t)}var mt=e=>e;var lj=(e,t)=>o=>t(e(o)),Rn=(...e)=>e.reduce(lj);var Br=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var _a=class{constructor(){this.subscriptions=[]}add(t){return nl(this.subscriptions,t),()=>bn(this.subscriptions,t)}notify(t,o,r){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,o,r);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var bt=e=>e*1e3,Vt=e=>e/1e3;function Xf(e,t){return t?e*(1e3/t):0}var eM=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var tM=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,uj=1e-7,cj=12;function dj(e,t,o,r,n){let a,i,s=0;do i=t+(o-t)/2,a=tM(i,r,n)-e,a>0?o=i:t=i;while(Math.abs(a)>uj&&++s<cj);return i}function $i(e,t,o,r){if(e===t&&o===r)return mt;let n=a=>dj(a,0,1,e,o);return a=>a===0||a===1?a:tM(n(a),t,r)}var Sh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var bh=e=>t=>1-e(1-t);var Rh=$i(.33,1.53,.69,.99),Yu=bh(Rh),Yf=Sh(Yu);var Qf=e=>(e*=2)<1?.5*Yu(e):.5*(2-Math.pow(2,-10*(e-1)));var Zf=e=>1-Math.sin(Math.acos(e)),Jf=bh(Zf),ep=Sh(Zf);var mC=$i(.42,0,1,1),gC=$i(0,0,.58,1),tp=$i(.42,0,.58,1);var op=e=>Array.isArray(e)&&typeof e[0]!="number";function rp(e,t){return op(e)?e[eM(0,e.length,t)]:e}var np=e=>Array.isArray(e)&&typeof e[0]=="number";var oM={linear:mt,easeIn:mC,easeInOut:tp,easeOut:gC,circIn:Zf,circInOut:ep,circOut:Jf,backIn:Yu,backInOut:Yf,backOut:Rh,anticipate:Qf},fj=e=>typeof e=="string",Ih=e=>{if(np(e)){ao(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,n]=e;return $i(t,o,r,n)}else if(fj(e))return ao(oM[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),oM[e];return e};var ap=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Qo={value:null,addProjectionMetrics:null};function rM(e,t){let o=new Set,r=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 g=p&&n?o:r;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[o,r]=[r,o],o.forEach(u),t&&Qo.value&&Qo.value.frameloop[t].push(l),l=0,o.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var pj=40;function Ph(e,t){let o=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>o=!0,i=ap.reduce((y,w)=>(y[w]=rM(a,t?w:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:m}=i,g=()=>{let y=vo.useManualTiming?n.timestamp:performance.now();o=!1,vo.useManualTiming||(n.delta=r?1e3/60:Math.max(Math.min(y-n.timestamp,pj),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),m.process(n),n.isProcessing=!1,o&&t&&(r=!1,e(g))},x=()=>{o=!0,r=!0,n.isProcessing||e(g)};return{schedule:ap.reduce((y,w)=>{let C=i[w];return y[w]=(S,R=!1,I=!1)=>(o||x(),C.schedule(S,R,I)),y},{}),cancel:y=>{for(let w=0;w<ap.length;w++)i[ap[w]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:xo,state:xt,steps:ip}=Ph(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);var Lh;function mj(){Lh=void 0}var yt={now:()=>(Lh===void 0&&yt.set(xt.isProcessing||vo.useManualTiming?xt.timestamp:performance.now()),Lh),set:e=>{Lh=e,queueMicrotask(mj)}};var In={layout:0,mainThread:0,waapi:0};var nM=e=>t=>typeof t=="string"&&t.startsWith(e),il=nM("--"),gj=nM("var(--"),sl=e=>gj(e)?hj.test(e.split("/*")[0].trim()):!1,hj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var la={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Va={...la,transform:e=>qt(0,1,e)},sp={...la,default:1};var Ki=e=>Math.round(e*1e5)/1e5;var Qu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aM(e){return e==null}var iM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Zu=(e,t)=>o=>!!(typeof o=="string"&&iM.test(o)&&o.startsWith(e)||t&&!aM(o)&&Object.prototype.hasOwnProperty.call(o,t)),Th=(e,t,o)=>r=>{if(typeof r!="string")return r;let[n,a,i,s]=r.match(Qu);return{[e]:parseFloat(n),[t]:parseFloat(a),[o]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var vj=e=>qt(0,255,e),hC={...la,transform:e=>Math.round(vj(e))},ua={test:Zu("rgb","red"),parse:Th("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+hC.transform(e)+", "+hC.transform(t)+", "+hC.transform(o)+", "+Ki(Va.transform(r))+")"};function xj(e){let t="",o="",r="",n="";return e.length>5?(t=e.substring(1,3),o=e.substring(3,5),r=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),o=e.substring(2,3),r=e.substring(3,4),n=e.substring(4,5),t+=t,o+=o,r+=r,n+=n),{red:parseInt(t,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}var lp={test:Zu("#"),parse:xj,transform:ua.transform};var up=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pn=up("deg"),yo=up("%"),ue=up("px"),vC=up("vh"),xC=up("vw"),kh=(()=>({...yo,parse:e=>yo.parse(e)/100,transform:e=>yo.transform(e*100)}))();var Xi={test:Zu("hsl","hue"),parse:Th("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+yo.transform(Ki(t))+", "+yo.transform(Ki(o))+", "+Ki(Va.transform(r))+")"};var lt={test:e=>ua.test(e)||lp.test(e)||Xi.test(e),parse:e=>ua.test(e)?ua.parse(e):Xi.test(e)?Xi.parse(e):lp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ua.transform(e):Xi.transform(e),getAnimatableNone:e=>{let t=lt.parse(e);return t.alpha=0,lt.transform(t)}};var sM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yj(e){return isNaN(e)&&typeof e=="string"&&(e.match(Qu)?.length||0)+(e.match(sM)?.length||0)>0}var uM="number",cM="color",wj="var",Cj="var(",lM="${}",Sj=/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 Yi(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},n=[],a=0,s=t.replace(Sj,l=>(lt.test(l)?(r.color.push(a),n.push(cM),o.push(lt.parse(l))):l.startsWith(Cj)?(r.var.push(a),n.push(wj),o.push(l)):(r.number.push(a),n.push(uM),o.push(parseFloat(l))),++a,lM)).split(lM);return{values:o,split:s,indexes:r,types:n}}function dM(e){return Yi(e).values}function fM(e){let{split:t,types:o}=Yi(e),r=t.length;return n=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],n[i]!==void 0){let s=o[i];s===uM?a+=Ki(n[i]):s===cM?a+=lt.transform(n[i]):a+=n[i]}return a}}var bj=e=>typeof e=="number"?0:lt.test(e)?lt.getAnimatableNone(e):e;function Rj(e){let t=dM(e);return fM(e)(t.map(bj))}var wo={test:yj,parse:dM,createTransformer:fM,getAnimatableNone:Rj};function yC(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 pM({hue:e,saturation:t,lightness:o,alpha:r}){e/=360,t/=100,o/=100;let n=0,a=0,i=0;if(!t)n=a=i=o;else{let s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;n=yC(l,s,e+1/3),a=yC(l,s,e),i=yC(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}function Ju(e,t){return o=>o>0?t:e}var ke=(e,t,o)=>e+(t-e)*o;var wC=(e,t,o)=>{let r=e*e,n=o*(t*t-r)+r;return n<0?0:Math.sqrt(n)},Ij=[lp,ua,Xi],Pj=e=>Ij.find(t=>t.test(e));function mM(e){let t=Pj(e);if(Fa(!!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===Xi&&(o=pM(o)),o}var CC=(e,t)=>{let o=mM(e),r=mM(t);if(!o||!r)return Ju(e,t);let n={...o};return a=>(n.red=wC(o.red,r.red,a),n.green=wC(o.green,r.green,a),n.blue=wC(o.blue,r.blue,a),n.alpha=ke(o.alpha,r.alpha,a),ua.transform(n))};var Mh=new Set(["none","hidden"]);function gM(e,t){return Mh.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function Lj(e,t){return o=>ke(e,t,o)}function Eh(e){return typeof e=="number"?Lj:typeof e=="string"?sl(e)?Ju:lt.test(e)?CC:Mj:Array.isArray(e)?hM:typeof e=="object"?lt.test(e)?CC:Tj:Ju}function hM(e,t){let o=[...e],r=o.length,n=e.map((a,i)=>Eh(a)(a,t[i]));return a=>{for(let i=0;i<r;i++)o[i]=n[i](a);return o}}function Tj(e,t){let o={...e,...t},r={};for(let n in o)e[n]!==void 0&&t[n]!==void 0&&(r[n]=Eh(e[n])(e[n],t[n]));return n=>{for(let a in r)o[a]=r[a](n);return o}}function kj(e,t){let o=[],r={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][r[a]],s=e.values[i]??0;o[n]=s,r[a]++}return o}var Mj=(e,t)=>{let o=wo.createTransformer(t),r=Yi(e),n=Yi(t);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?Mh.has(e)&&!n.values.length||Mh.has(t)&&!r.values.length?gM(e,t):Rn(hM(kj(r,n),n.values),o):(Fa(!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"),Ju(e,t))};function Ah(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?ke(e,t,o):Eh(e)(e,t)}var vM=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>Le.update(t,o),stop:()=>xo(t),now:()=>xt.isProcessing?xt.timestamp:yt.now()}};var Dh=(e,t,o=10)=>{let r="",n=Math.max(Math.round(t/o),2);for(let a=0;a<n;a++)r+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function ec(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 cp(e,t=100,o){let r=o({...e,keyframes:[0,t]}),n=Math.min(ec(r),2e4);return{type:"keyframes",ease:a=>r.next(n*a).value/t,duration:Vt(n)}}var Ej=5;function Nh(e,t,o){let r=Math.max(t-Ej,0);return Xf(o-e(r),t-r)}var nt={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 bC=.001;function xM({duration:e=nt.duration,bounce:t=nt.bounce,velocity:o=nt.velocity,mass:r=nt.mass}){let n,a;Fa(e<=bt(nt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=qt(nt.minDamping,nt.maxDamping,i),e=qt(nt.minDuration,nt.maxDuration,Vt(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-o,p=Oh(u,i),m=Math.exp(-d);return bC-f/p*m},a=u=>{let d=u*i*e,f=d*o+o,p=Math.pow(i,2)*Math.pow(u,2)*e,m=Math.exp(-d),g=Oh(Math.pow(u,2),i);return(-n(u)+bC>0?-1:1)*((f-p)*m)/g}):(n=u=>{let c=Math.exp(-u*e),d=(u-o)*e+1;return-bC+c*d},a=u=>{let c=Math.exp(-u*e),d=(o-u)*(e*e);return c*d});let s=5/e,l=Dj(n,a,s);if(e=bt(e),isNaN(l))return{stiffness:nt.stiffness,damping:nt.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}var Aj=12;function Dj(e,t,o){let r=o;for(let n=1;n<Aj;n++)r=r-e(r)/t(r);return r}function Oh(e,t){return e*Math.sqrt(1-t*t)}var Nj=["duration","bounce"],Oj=["stiffness","damping","mass"];function yM(e,t){return t.some(o=>e[o]!==void 0)}function Fj(e){let t={velocity:nt.velocity,stiffness:nt.stiffness,damping:nt.damping,mass:nt.mass,isResolvedFromDuration:!1,...e};if(!yM(e,Oj)&&yM(e,Nj))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),n=r*r,a=2*qt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:nt.mass,stiffness:n,damping:a}}else{let o=xM(e);t={...t,...o,mass:nt.mass},t.isResolvedFromDuration=!0}return t}function Ba(e=nt.visualDuration,t=nt.bounce){let o=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:n}=o,a=o.keyframes[0],i=o.keyframes[o.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Fj({...o,velocity:-Vt(o.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),x=i-a,v=Vt(Math.sqrt(l/c)),h=Math.abs(x)<5;r||(r=h?nt.restSpeed.granular:nt.restSpeed.default),n||(n=h?nt.restDelta.granular:nt.restDelta.default);let y;if(g<1){let C=Oh(v,g);y=S=>{let R=Math.exp(-g*v*S);return i-R*((m+g*v*x)/C*Math.sin(C*S)+x*Math.cos(C*S))}}else if(g===1)y=C=>i-Math.exp(-v*C)*(x+(m+v*x)*C);else{let C=v*Math.sqrt(g*g-1);y=S=>{let R=Math.exp(-g*v*S),I=Math.min(C*S,300);return i-R*((m+g*v*x)*Math.sinh(I)+C*x*Math.cosh(I))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let S=y(C);if(p)s.done=C>=d;else{let R=C===0?m:0;g<1&&(R=C===0?bt(m):Nh(y,C,S));let I=Math.abs(R)<=r,T=Math.abs(i-S)<=n;s.done=I&&T}return s.value=s.done?i:S,s},toString:()=>{let C=Math.min(ec(w),2e4),S=Dh(R=>w.next(C*R).value,C,30);return C+"ms "+S},toTransition:()=>{}};return w}Ba.applyToOptions=e=>{let t=cp(e,100,Ba);return e.ease=t.ease,e.duration=bt(t.duration),e.type="keyframes",e};function dp({keyframes:e,velocity:t=0,power:o=.8,timeConstant:r=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=I=>s!==void 0&&I<s||l!==void 0&&I>l,m=I=>s===void 0?l:l===void 0||Math.abs(s-I)<Math.abs(l-I)?s:l,g=o*t,x=d+g,v=i===void 0?x:i(x);v!==x&&(g=v-d);let h=I=>-g*Math.exp(-I/r),y=I=>v+h(I),w=I=>{let T=h(I),L=y(I);f.done=Math.abs(T)<=u,f.value=f.done?v:L},C,S,R=I=>{p(f.value)&&(C=I,S=Ba({keyframes:[f.value,m(f.value)],velocity:Nh(y,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:I=>{let T=!1;return!S&&C===void 0&&(T=!0,w(I),R(I)),C!==void 0&&I>=C?S.next(I-C):(!T&&w(I),f)}}}function _j(e,t,o){let r=[],n=o||vo.mix||Ah,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=Rn(l,s)}r.push(s)}return r}function Fh(e,t,{clamp:o=!0,ease:r,mixer:n}={}){let a=e.length;if(ao(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=_j(t,r,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=Br(e[d],e[d+1],c);return s[d](f)};return o?c=>u(qt(e[0],e[a-1],c)):u}function fp(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let n=Br(0,t,r);e.push(ke(o,1,n))}}function pp(e){let t=[0];return fp(t,e.length-1),t}function wM(e,t){return e.map(o=>o*t)}function Vj(e,t){return e.map(()=>t||tp).splice(0,e.length-1)}function ll({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let n=op(r)?r.map(Ih):Ih(r),a={done:!1,value:t[0]},i=wM(o&&o.length===t.length?o:pp(t),e),s=Fh(i,t,{ease:Array.isArray(n)?n:Vj(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Bj=e=>e!==null;function tc(e,{repeat:t,repeatType:o="loop"},r,n=1){let a=e.filter(Bj),s=n<0||t&&o!=="loop"&&t%2===1?0:a.length-1;return!s||r===void 0?a[s]:r}var Hj={decay:dp,inertia:dp,tween:ll,keyframes:ll,spring:Ba};function _h(e){typeof e.type=="string"&&(e.type=Hj[e.type])}var Qi=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 Uj=e=>e/100,Ha=class extends Qi{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!==yt.now()&&this.tick(yt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},In.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;_h(t);let{type:o=ll,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=o||ll;l!==ll&&typeof s[0]!="number"&&(this.mixKeyframes=Rn(Uj,Ah(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=ec(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,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:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:g,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)),o?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),h=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=r;if(d){let I=Math.min(this.currentTime,n)/s,T=Math.floor(I),L=I%1;!L&&I>=1&&(L=1),L===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(L=1-L,p&&(L-=p/s)):f==="mirror"&&(w=i)),y=qt(0,1,L)*s}let C=h?{done:!1,value:c[0]}:w.next(y);a&&(C.value=a(C.value));let{done:S}=C;!h&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return R&&m!==dp&&(C.value=tc(c,this.options,x,this.speed)),g&&g(C.value),R&&this.finish(),C}then(t,o){return this.finished.then(t,o)}get duration(){return Vt(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Vt(t)}get time(){return Vt(this.currentTime)}set time(t){t=bt(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(yt.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=Vt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=vM,startTime:o}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),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(yt.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,In.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 CM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ul=e=>e*180/Math.PI,RC=e=>{let t=ul(Math.atan2(e[1],e[0]));return IC(t)},zj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:RC,rotateZ:RC,skewX:e=>ul(Math.atan(e[1])),skewY:e=>ul(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},IC=e=>(e=e%360,e<0&&(e+=360),e),SM=RC,bM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),RM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Gj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bM,scaleY:RM,scale:e=>(bM(e)+RM(e))/2,rotateX:e=>IC(ul(Math.atan2(e[6],e[5]))),rotateY:e=>IC(ul(Math.atan2(-e[2],e[0]))),rotateZ:SM,rotate:SM,skewX:e=>ul(Math.atan(e[4])),skewY:e=>ul(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function mp(e){return e.includes("scale")?1:0}function gp(e,t){if(!e||e==="none")return mp(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,n;if(o)r=Gj,n=o;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=zj,n=s}if(!n)return mp(t);let a=r[t],i=n[1].split(",").map(Wj);return typeof a=="function"?a(i):i[a]}var PC=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return gp(o,t)};function Wj(e){return parseFloat(e.trim())}var Ln=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hr=(()=>new Set(Ln))();var LC=e=>e===la||e===ue,jj=new Set(["x","y","z"]),qj=Ln.filter(e=>!jj.has(e));function IM(e){let t=[];return qj.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var Zi={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})=>gp(t,"x"),y:(e,{transform:t})=>gp(t,"y")};Zi.translateX=Zi.x;Zi.translateY=Zi.y;var cl=new Set,TC=!1,kC=!1,MC=!1;function PM(){if(kC){let e=Array.from(cl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let n=IM(r);n.length&&(o.set(r,n),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();let n=o.get(r);n&&n.forEach(([a,i])=>{r.getValue(a)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kC=!1,TC=!1,cl.forEach(e=>e.complete(MC)),cl.clear()}function LM(){cl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kC=!0)})}function EC(){MC=!0,LM(),PM(),MC=!1}var Ua=class{constructor(t,o,r,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=o,this.name=r,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(cl.add(this),TC||(TC=!0,Le.read(LM),Le.resolveKeyframes(PM))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:o,element:r,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(r&&o){let s=r.readValue(o,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}CM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),cl.delete(this)}cancel(){this.state==="scheduled"&&(cl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var TM=e=>e.startsWith("--");function kM(e,t,o){TM(t)?e.style.setProperty(t,o):e.style[t]=o}var MM=al(()=>window.ScrollTimeline!==void 0);var EM={};function AM(e,t){let o=al(e);return()=>EM[t]??o()}var Vh=AM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var dl=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var AC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dl([0,.65,.55,1]),circOut:dl([.55,0,1,.45]),backIn:dl([.31,.01,.66,-.59]),backOut:dl([.33,1.53,.69,.99])};function DC(e,t){if(e)return typeof e=="function"?Vh()?Dh(e,t):"ease-out":np(e)?dl(e):Array.isArray(e)?e.map(o=>DC(o,t)||AC.easeOut):AC[e]}function DM(e,t,o,{delay:r=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:o};l&&(c.offset=l);let d=DC(s,n);Array.isArray(d)&&(c.easing=d),Qo.value&&In.waapi++;let f={delay:r,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 Qo.value&&p.finished.finally(()=>{In.waapi--}),p}function fl(e){return typeof e=="function"&&"applyToOptions"in e}function NM({type:e,...t}){return fl(e)&&Vh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Bh=class extends Qi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:o,name:r,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,ao(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=NM(t);this.animation=DM(o,r,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=tc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):kM(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 Vt(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Vt(t)}get time(){return Vt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=bt(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&&MM()?(this.animation.timeline=t,mt):o(this)}};var OM={anticipate:Qf,backInOut:Yf,circInOut:ep};function $j(e){return e in OM}function FM(e){typeof e.ease=="string"&&$j(e.ease)&&(e.ease=OM[e.ease])}var _M=10,Hh=class extends Bh{constructor(t){FM(t),_h(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:o,onUpdate:r,onComplete:n,element:a,...i}=this.options;if(!o)return;if(t!==void 0){o.set(t);return}let s=new Ha({...i,autoplay:!1}),l=bt(this.finishedTime??this.time);o.setWithVelocity(s.sample(l-_M).value,s.sample(l).value,_M),s.stop()}};var NC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(wo.test(e)||e==="0")&&!e.startsWith("url("));function Kj(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 VM(e,t,o,r){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=NC(n,t),s=NC(a,t);return Fa(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:Kj(e)||(o==="spring"||fl(o))&&r}function oc(e){e.duration=0,e.type="keyframes"}var Xj=new Set(["opacity","clipPath","filter","transform"]),Yj=al(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function BM(e){let{motionValue:t,name:o,repeatDelay:r,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Yj()&&o&&Xj.has(o)&&(o!=="transform"||!u)&&!l&&!r&&n!=="mirror"&&a!==0&&i!=="inertia"}var Qj=40,hp=class extends Qi{constructor({autoplay:t=!0,delay:o=0,type:r="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=yt.now();let f={autoplay:t,delay:o,type:r,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Ua;this.keyframeResolver=new p(s,(m,g,x)=>this.onKeyframesResolved(m,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,o,r,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=yt.now(),VM(t,a,i,s)||((vo.instantAnimations||!l)&&c?.(tc(t,r,o)),t[0]=t[t.length-1],oc(r),r.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Qj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},p=!u&&BM(f)?new Hh({...f,element:f.motionValue.owner.current}):new Ha(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,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),EC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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 Uh=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,n)=>{r&&r(),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(){return HM(this.animations,"duration")}get iterationDuration(){return HM(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(o=>o[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function HM(e,t){let o=0;for(let r=0;r<e.length;r++){let n=e[r][t];n!==null&&n>o&&(o=n)}return o}var vp=class extends Uh{then(t,o){return this.finished.finally(t).then(()=>{})}};var Zj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jj(e){let t=Zj.exec(e);if(!t)return[,];let[,o,r,n]=t;return[`--${o??r}`,n]}var e6=4;function OC(e,t,o=1){ao(o<=e6,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=Jj(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let i=a.trim();return qf(i)?parseFloat(i):i}return sl(n)?OC(n,t,o+1):n}function pl(e,t){return e?.[t]??e?.default??e}var xp=new Set(["width","height","top","left","right","bottom",...Ln]);var UM={test:e=>e==="auto",parse:e=>e};var zh=e=>t=>t.test(e);var FC=[la,ue,yo,Pn,xC,vC,UM],_C=e=>FC.find(zh(e));function zM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Kf(e):!0}var t6=new Set(["brightness","contrast","saturate","opacity"]);function o6(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(Qu)||[];if(!r)return e;let n=o.replace(r,""),a=t6.has(t)?1:0;return r!==o&&(a*=100),t+"("+a+n+")"}var r6=/\b([a-z-]*)\(.*?\)/gu,yp={...wo,getAnimatableNone:e=>{let t=e.match(r6);return t?t.map(o6).join(" "):e}};var VC={...la,transform:Math.round};var GM={rotate:Pn,rotateX:Pn,rotateY:Pn,rotateZ:Pn,scale:sp,scaleX:sp,scaleY:sp,scaleZ:sp,skew:Pn,skewX:Pn,skewY:Pn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:Va,originX:kh,originY:kh,originZ:ue};var ml={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...GM,zIndex:VC,fillOpacity:Va,strokeOpacity:Va,numOctaves:VC};var WM={...ml,color:lt,backgroundColor:lt,outlineColor:lt,fill:lt,stroke:lt,borderColor:lt,borderTopColor:lt,borderRightColor:lt,borderBottomColor:lt,borderLeftColor:lt,filter:yp,WebkitFilter:yp},wp=e=>WM[e];function Cp(e,t){let o=wp(e);return o!==yp&&(o=wo),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var n6=new Set(["auto","none","0"]);function jM(e,t,o){let r=0,n;for(;r<e.length&&!n;){let a=e[r];typeof a=="string"&&!n6.has(a)&&Yi(a).values.length&&(n=e[r]),r++}if(n&&o)for(let a of t)e[a]=Cp(o,n)}var Sp=class extends Ua{constructor(t,o,r,n,a){super(t,o,r,n,a,!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(),sl(u))){let c=OC(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!xp.has(r)||t.length!==2)return;let[n,a]=t,i=_C(n),s=_C(a);if(i!==s)if(LC(i)&&LC(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Zi[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let n=0;n<t.length;n++)(t[n]===null||zM(t[n]))&&r.push(n);r.length&&jM(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=Zi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o[0]=this.measuredOrigin;let n=o[o.length-1];n!==void 0&&t.getValue(r,n).jump(n,!1)}measureEndState(){let{element:t,name:o,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let n=t.getValue(o);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,i=r[a];r[a]=Zi[o](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 bp(e,t,o){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);let n=o?.[e]??r.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Rp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ip(e){return $f(e)&&"offsetHeight"in e}var qM=30,a6=e=>!isNaN(parseFloat(e)),gl={current:void 0},Gh=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let n=yt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),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=o.owner}setCurrent(t){this.current=t,this.updatedAt=yt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=a6(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 _a);let r=this.events[t].add(o);return t==="change"?()=>{r(),Le.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 gl.current&&gl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qM)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,qM);return Xf(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 Zo(e,t){return new Gh(e,t)}var{schedule:hl,cancel:i6}=Ph(queueMicrotask,!1);var Hr={x:!1,y:!1};function Wh(){return Hr.x||Hr.y}function BC(e){return e==="x"||e==="y"?Hr[e]?null:(Hr[e]=!0,()=>{Hr[e]=!1}):Hr.x||Hr.y?null:(Hr.x=Hr.y=!0,()=>{Hr.x=Hr.y=!1})}function jh(e,t){let o=bp(e),r=new AbortController,n={passive:!0,...t,signal:r.signal};return[o,n,()=>r.abort()]}function $M(e){return!(e.pointerType==="touch"||Wh())}function HC(e,t,o={}){let[r,n,a]=jh(e,o),i=s=>{if(!$M(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{$M(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return r.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var UC=(e,t)=>t?e===t?!0:UC(e,t.parentElement):!1;var vl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var s6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function KM(e){return s6.has(e.tagName)||e.tabIndex!==-1}var rc=new WeakSet;function XM(e){return t=>{t.key==="Enter"&&e(t)}}function zC(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var YM=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=XM(()=>{if(rc.has(o))return;zC(o,"down");let n=XM(()=>{zC(o,"up")}),a=()=>zC(o,"cancel");o.addEventListener("keyup",n,t),o.addEventListener("blur",a,t)});o.addEventListener("keydown",r,t),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),t)};function QM(e){return vl(e)&&!Wh()}function GC(e,t,o={}){let[r,n,a]=jh(e,o),i=s=>{let l=s.currentTarget;if(!QM(s))return;rc.add(l);let u=t(l,s),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),rc.has(l)&&rc.delete(l),QM(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||o.useGlobalTarget||UC(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return r.forEach(s=>{(o.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Ip(s)&&(s.addEventListener("focus",u=>YM(u,n)),!KM(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function xl(e){return $f(e)&&"ownerSVGElement"in e}function Pp(e){return xl(e)&&e.tagName==="svg"}function WC(...e){let t=!Array.isArray(e[0]),o=t?0:-1,r=e[0+o],n=e[1+o],a=e[2+o],i=e[3+o],s=Fh(n,a,i);return t?s(r):s}var Ve=e=>!!(e&&e.getVelocity);var l6=[...FC,lt,wo],jC=e=>l6.find(zh(e));var qh=b(M(),1),za=b(M(),1);var ZM=b(M(),1),Ji=(0,ZM.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var eE=b(M(),1);function JM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function u6(...e){return t=>{let o=!1,r=e.map(n=>{let a=JM(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():JM(e[n],null)}}}}function tE(...e){return eE.useCallback(u6(...e),e)}var qC=class extends qh.Component{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,n=Ip(r)&&r.offsetWidth||0,a=this.props.sizeRef.current;a.height=o.offsetHeight||0,a.width=o.offsetWidth||0,a.top=o.offsetTop,a.left=o.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function rE({children:e,isPresent:t,anchorX:o,root:r}){let n=(0,za.useId)(),a=(0,za.useRef)(null),i=(0,za.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,za.useContext)(Ji),l=tE(a,e?.ref);return(0,za.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let m=o==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let g=document.createElement("style");s&&(g.nonce=s);let x=r??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
12
12
  [data-motion-pop-id="${n}"] {
13
13
  position: absolute !important;
14
14
  width: ${u}px !important;
@@ -16,54 +16,54 @@ Error generating stack: `+a.message+`
16
16
  ${m}px !important;
17
17
  top: ${d}px !important;
18
18
  }
19
- `),()=>{y.contains(g)&&y.removeChild(g)}},[t]),(0,ME.jsx)(UC,{isPresent:t,childRef:a,sizeRef:i,children:Ih.cloneElement(e,{ref:l})})}var DE=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=qn(dq),c=(0,Zf.useId)(),d=!0,f=(0,Zf.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:p=>{u.set(p,!0);for(let m of u.values())if(!m)return;o&&o()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,o]);return a&&d&&(f={...f}),(0,Zf.useMemo)(()=>{u.forEach((p,m)=>u.set(m,!1))},[r]),AE.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,zC.jsx)(EE,{isPresent:r,anchorX:s,root:l,children:e})),(0,zC.jsx)(Pi.Provider,{value:f,children:e})};function dq(){return new Map}var Oi=R(E(),1);function Lh(e=!0){let t=(0,Oi.useContext)(Pi);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,Oi.useId)();(0,Oi.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,Oi.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var Ph=R(E(),1),Jf=e=>e.key||"";function GC(e){let t=[];return Ph.Children.forEach(e,r=>{(0,Ph.isValidElement)(r)&&t.push(r)}),t}var Ta=({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]=Lh(i),d=(0,Kn.useMemo)(()=>GC(e),[e]),f=i&&!u?[]:d.map(Jf),p=(0,Kn.useRef)(!0),m=(0,Kn.useRef)(d),g=qn(()=>new Map),[y,h]=(0,Kn.useState)(d),[v,x]=(0,Kn.useState)(d);Pu(()=>{p.current=!1,m.current=d;for(let b=0;b<v.length;b++){let S=Jf(v[b]);f.includes(S)?g.delete(S):g.get(S)!==!0&&g.set(S,!1)}},[v,f.length,f.join("-")]);let w=[];if(d!==y){let b=[...d];for(let S=0;S<v.length;S++){let I=v[S],T=Jf(I);f.includes(T)||(b.splice(S,0,I),w.push(I))}return a==="wait"&&w.length&&(b=w),x(GC(b)),h(d),null}let{forceRender:C}=(0,Kn.useContext)(Iu);return(0,ep.jsx)(ep.Fragment,{children:v.map(b=>{let S=Jf(b),I=i&&!u?!1:d===v||f.includes(S),T=()=>{if(g.has(S))g.set(S,!0);else return;let P=!0;g.forEach(M=>{M||(P=!1)}),P&&(C?.(),x(m.current),i&&c?.(),o&&o())};return(0,ep.jsx)(DE,{isPresent:I,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:T,anchorX:s,children:b},S)})})};var NE=R(E(),1),Th=(0,NE.createContext)({strict:!1});var OE={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"]},ka={};for(let e in OE)ka[e]={isEnabled:t=>OE[e].some(r=>!!t[r])};function FE(e){for(let t in e)ka[t]={...ka[t],...e[t]}}var fq=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 tp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fq.has(e)}var _E=e=>!tp(e);function pq(e){typeof e=="function"&&(_E=t=>t.startsWith("on")?!tp(t):e(t))}try{pq(require("@emotion/is-prop-valid").default)}catch{}function VE(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(_E(n)||r===!0&&tp(n)||!t&&!tp(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var Hh=R(D(),1);var Wu=R(E(),1);var BE=R(E(),1),Fi=(0,BE.createContext)({});var Eh=R(E(),1);function _i(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ma(e){return typeof e=="string"||Array.isArray(e)}var kh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rp=["initial",...kh];function Xs(e){return _i(e.animate)||rp.some(t=>Ma(e[t]))}function Mh(e){return!!(Xs(e)||e.variants)}function HE(e,t){if(Xs(e)){let{initial:r,animate:o}=e;return{initial:r===!1||Ma(r)?r:void 0,animate:Ma(o)?o:void 0}}return e.inherit!==!1?t:{}}function zE(e){let{initial:t,animate:r}=HE(e,(0,Eh.useContext)(Fi));return(0,Eh.useMemo)(()=>({initial:t,animate:r}),[UE(t),UE(r)])}function UE(e){return Array.isArray(e)?e.join(" "):e}var Bu=R(E(),1);var qE=R(E(),1);var Ys={};function GE(e){for(let t in e)Ys[t]=e[t],Fs(t)&&(Ys[t].isCSSVariable=!0)}function Ah(e,{layout:t,layoutId:r}){return uo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ys[e]||e==="opacity")}var mq={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gq=pn.length;function WE(e,t,r){let o="",n=!0;for(let a=0;a<gq;a++){let i=pn[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=Xf(s,Ws[i]);if(!l){n=!1;let c=mq[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function Fu(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(uo.has(l)){i=!0;continue}else if(Fs(l)){n[l]=u;continue}else{let c=Xf(u,Ws[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=WE(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 _u=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function WC(e,t,r){for(let o in t)!Be(t[o])&&!Ah(o,r)&&(e[o]=t[o])}function hq({transformTemplate:e},t){return(0,qE.useMemo)(()=>{let r=_u();return Fu(r,t,e),Object.assign({},r.vars,r.style)},[t])}function vq(e,t){let r=e.style||{},o={};return WC(o,r,e),Object.assign(o,hq(e,t)),o}function jE(e,t){let r={},o=vq(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 KE=R(E(),1);var xq={offset:"stroke-dashoffset",array:"stroke-dasharray"},yq={offset:"strokeDashoffset",array:"strokeDasharray"};function $E(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?xq:yq;e[a.offset]=ue.transform(-o);let i=ue.transform(t),s=ue.transform(r);e[a.array]=`${i} ${s}`}function Dh(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(Fu(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&&$E(d,n,a,i,!1)}var Nh=()=>({..._u(),attrs:{}});var Oh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function XE(e,t,r,o){let n=(0,KE.useMemo)(()=>{let a=Nh();return Dh(a,t,Oh(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};WC(a,e.style,e),n.style={...a,...n.style}}return n}var YE=["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 Vu(e){return typeof e!="string"||e.includes("-")?!1:!!(YE.indexOf(e)>-1||/[A-Z]/u.test(e))}function QE(e,t,r,{latestValues:o},n,a=!1){let s=(Vu(e)?XE:jE)(t,o,n,e),l=VE(t,typeof e=="string",a),u=e!==Bu.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,Bu.useMemo)(()=>Be(c)?c.get():c,[c]);return(0,Bu.createElement)(e,{...u,children:d})}var qC=R(E(),1);function ZE(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function Hu(e,t,r,o){if(typeof t=="function"){let[n,a]=ZE(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]=ZE(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function Uu(e){return Be(e)?e.get():e}function wq({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:Cq(r,o,n,e),renderState:t()}}function Cq(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=Uu(a[f]);let{initial:i,animate:s}=e,l=Xs(e),u=Mh(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"&&!_i(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=Hu(e,f[p]);if(m){let{transitionEnd:g,transition:y,...h}=m;for(let v in h){let x=h[v];if(Array.isArray(x)){let w=c?x.length-1:0;x=x[w]}x!==null&&(n[v]=x)}for(let v in g)n[v]=g[v]}}}return n}var Fh=e=>(t,r)=>{let o=(0,qC.useContext)(Fi),n=(0,qC.useContext)(Pi),a=()=>wq(e,t,o,n);return r?a():qn(a)};function zu(e,t,r){let{style:o}=e,n={};for(let a in o)(Be(o[a])||t.style&&Be(t.style[a])||Ah(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var JE=Fh({scrapeMotionValuesFromProps:zu,createRenderState:_u});function _h(e,t,r){let o=zu(e,t,r);for(let n in e)if(Be(e[n])||Be(t[n])){let a=pn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var eA=Fh({scrapeMotionValuesFromProps:_h,createRenderState:Nh});var tA=Symbol.for("motionComponentSymbol");var rA=R(E(),1);function Ea(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function oA(e,t,r){return(0,rA.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Ea(r)&&(r.current=o))},[t])}var Xr=R(E(),1);var Gu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Sq="framerAppearId",Vh="data-"+Gu(Sq);var nA=R(E(),1),Bh=(0,nA.createContext)({});function aA(e,t,r,o,n){let{visualElement:a}=(0,Xr.useContext)(Fi),i=(0,Xr.useContext)(Th),s=(0,Xr.useContext)(Pi),l=(0,Xr.useContext)(Ni).reducedMotion,u=(0,Xr.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,Xr.useContext)(Bh);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&bq(u.current,r,n,d);let f=(0,Xr.useRef)(!1);(0,Xr.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[Vh],m=(0,Xr.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Pu(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),(0,Xr.useEffect)(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),m.current=!1),c.enteringChildren=void 0)}),c}function bq(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:iA(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Ea(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function iA(e){if(e)return e.options.allowProjection!==!1?e.projection:iA(e.parent)}function Uh(e,{forwardMotionProps:t=!1}={},r,o){r&&FE(r);let n=Vu(e)?eA:JE;function a(s,l){let u,c={...(0,Wu.useContext)(Ni),...s,layoutId:Rq(s)},{isStatic:d}=c,f=zE(s),p=n(s,d);if(!d&&Lu){Iq(c,r);let m=Lq(c);u=m.MeasureLayout,f.visualElement=aA(e,p,c,o,m.ProjectionNode)}return(0,Hh.jsxs)(Fi.Provider,{value:f,children:[u&&f.visualElement?(0,Hh.jsx)(u,{visualElement:f.visualElement,...c}):null,QE(e,s,oA(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,Wu.forwardRef)(a);return i[tA]=e,i}function Rq({layoutId:e}){let t=(0,Wu.useContext)(Iu).id;return t&&e!==void 0?t+"-"+e:e}function Iq(e,t){let r=(0,Wu.useContext)(Th).strict}function Lq(e){let{drag:t,layout:r}=ka;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sA(e,t){if(typeof Proxy>"u")return Uh;let r=new Map,o=(a,i)=>Uh(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,Uh(i,void 0,e,t)),r.get(i))})}var bA=R(E(),1);function zh({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function lA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function uA(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 jC(e){return e===void 0||e===1}function Gh({scale:e,scaleX:t,scaleY:r}){return!jC(e)||!jC(t)||!jC(r)}function Aa(e){return Gh(e)||$C(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $C(e){return cA(e.x)||cA(e.y)}function cA(e){return e&&e!=="0%"}function op(e,t,r){let o=e-r,n=t*o;return r+n}function dA(e,t,r,o,n){return n!==void 0&&(e=op(e,n,o)),op(e,r,o)+t}function KC(e,t=0,r=1,o,n){e.min=dA(e.min,t,r,o,n),e.max=dA(e.max,t,r,o,n)}function XC(e,{x:t,y:r}){KC(e.x,t.translate,t.scale,t.originPoint),KC(e.y,r.translate,r.scale,r.originPoint)}var fA=.999999999999,pA=1.0000000000001;function gA(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&&Qs(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,XC(e,i)),o&&Aa(a.latestValues)&&Qs(e,a.latestValues))}t.x<pA&&t.x>fA&&(t.x=1),t.y<pA&&t.y>fA&&(t.y=1)}function Vi(e,t){e.min=e.min+t,e.max=e.max+t}function mA(e,t,r,o,n=.5){let a=ke(e.min,e.max,n);KC(e,t,r,a,o)}function Qs(e,t){mA(e.x,t.x,t.scaleX,t.scale,t.originX),mA(e.y,t.y,t.scaleY,t.scale,t.originY)}function YC(e,t){return zh(uA(e.getBoundingClientRect(),t))}function hA(e,t,r){let o=YC(e,r),{scroll:n}=t;return n&&(Vi(o.x,n.offset.x),Vi(o.y,n.offset.y)),o}var vA=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zs=()=>({x:vA(),y:vA()}),xA=()=>({min:0,max:0}),Ke=()=>({x:xA(),y:xA()});var np={current:null},Wh={current:!1};function yA(){if(Wh.current=!0,!!Lu)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>np.current=e.matches;e.addEventListener("change",t),t()}else np.current=!1}var Bi=new WeakMap;function wA(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Be(n))e.addValue(o,n);else if(Be(a))e.addValue(o,Kr(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,Kr(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var CA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],qu=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=La,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=wt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Pe.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=Xs(r),this.isVariantNode=Mh(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&&Be(p)&&p.set(l[f])}}mount(t){this.current=t,Bi.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)),Wh.current||yA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:np.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),mr(this.notifyUpdate),mr(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=uo.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Pe.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 ka){let r=ka[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):Ke()}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<CA.length;o++){let n=CA[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=wA(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=Kr(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"&&(vf(o)||yf(o))?o=parseFloat(o):!HC(o)&&hr.test(r)&&(o=jf(t,r)),this.setBaseTarget(t,Be(o)?o.get():o)),Be(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=Hu(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&&!Be(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 Sa),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){js.render(this.render)}};var ju=class extends qu{constructor(){super(...arguments),this.KeyframeResolver=$f}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;Be(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function qh(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 Pq(e){return window.getComputedStyle(e)}var $u=class extends ju{constructor(){super(...arguments),this.type="html",this.renderInstance=qh}readValueFromInstance(t,r){if(uo.has(r))return this.projection?.isProjecting?Bf(r):CC(t,r);{let o=Pq(t),n=(Fs(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return YC(t,r)}build(t,r,o){Fu(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return zu(t,r,o)}};var jh=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 SA(e,t,r,o){qh(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(jh.has(n)?n:Gu(n),t.attrs[n])}var Ku=class extends ju{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(uo.has(r)){let o=qf(r);return o&&o.default||0}return r=jh.has(r)?r:Gu(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return _h(t,r,o)}build(t,r,o){Dh(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){SA(t,r,o,n)}mount(t){this.isSVGTag=Oh(t.tagName),super.mount(t)}};var RA=(e,t)=>Vu(e)?new Ku(t):new $u(t,{allowProjection:e!==bA.Fragment});function Xn(e,t,r){let o=e.getProps();return Hu(o,t,r!==void 0?r:o.custom,e)}var ap=e=>Array.isArray(e);function Tq(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Kr(r))}function kq(e){return ap(e)?e[e.length-1]||0:e}function IA(e,t){let r=Xn(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=kq(a[i]);Tq(e,i,s)}}function LA(e){return!!(Be(e)&&e.add)}function ip(e,t){let r=e.getValue("willChange");if(LA(r))return r.add(t);if(!r&&pr.WillChange){let o=new pr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function $h(e){return e.props[Vh]}var Mq=e=>e!==null;function PA(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(Mq),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var Eq={type:"spring",stiffness:500,damping:25,restSpeed:10},Aq=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dq={type:"keyframes",duration:.8},Nq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TA=(e,{keyframes:t})=>t.length>2?Dq:uo.has(e)?e.startsWith("scale")?Aq(t[1]):Eq:Nq;function kA({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 Xu=(e,t,r,o={},n,a)=>i=>{let s=Gs(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-Rt(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};kA(s)||Object.assign(c,TA(e,c)),c.duration&&(c.duration=Rt(c.duration)),c.repeatDelay&&(c.repeatDelay=Rt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Nu(c),c.delay===0&&(d=!0)),(pr.instantAnimations||pr.skipAnimations)&&(d=!0,Nu(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=PA(c.keyframes,s);if(f!==void 0){Pe.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new Ia(c):new Uf(c)};function Oq({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function Yu(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&&Oq(u,c))continue;let p={delay:r,...Gs(a||{},c)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){let h=$h(e);if(h){let v=window.MotionHandoffAnimation(h,c,Pe);v!==null&&(p.startTime=v,g=!0)}}ip(e,c),d.start(Xu(c,d,f,e.shouldReduceMotion&&Gf.has(c)?{type:!1}:p,e,g));let y=d.animation;y&&l.push(y)}return i&&Promise.all(l).then(()=>{Pe.update(()=>{i&&IA(e,i)})}),l}function Kh(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 Xh(e,t,r={}){let o=Xn(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(Yu(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return Fq(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 Fq(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(Xh(l,t,{...i,delay:r+(typeof o=="function"?0:o)+Kh(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function MA(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>Xh(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=Xh(e,t,r);else{let n=typeof t=="function"?Xn(e,t,r.custom):t;o=Promise.all(Yu(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function QC(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 _q=rp.length;function ZC(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?ZC(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<_q;r++){let o=rp[r],n=e.props[o];(Ma(n)||n===!1)&&(t[o]=n)}return t}var Vq=[...kh].reverse(),Bq=kh.length;function Hq(e){return t=>Promise.all(t.map(({animation:r,options:o})=>MA(e,r,o)))}function AA(e){let t=Hq(e),r=EA(),o=!0,n=l=>(u,c)=>{let d=Xn(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=ZC(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let y=0;y<Bq;y++){let h=Vq[y],v=r[h],x=u[h]!==void 0?u[h]:c[h],w=Ma(x),C=h===l?v.isActive:null;C===!1&&(m=y);let b=x===c[h]&&x!==u[h]&&w;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...p},!v.isActive&&C===null||!x&&!v.prevProp||_i(x)||typeof x=="boolean")continue;let S=Uq(v.prevProp,x),I=S||h===l&&v.isActive&&!b&&w||y>m&&w,T=!1,P=Array.isArray(x)?x:[x],M=P.reduce(n(h),{});C===!1&&(M={});let{prevResolvedValues:A={}}=v,F={...A,...M},N=U=>{I=!0,f.has(U)&&(T=!0,f.delete(U)),v.needsAnimating[U]=!0;let V=e.getValue(U);V&&(V.liveStyle=!1)};for(let U in F){let V=M[U],k=A[U];if(p.hasOwnProperty(U))continue;let Z=!1;ap(V)&&ap(k)?Z=!QC(V,k):Z=V!==k,Z?V!=null?N(U):f.add(U):V!==void 0&&f.has(U)?N(U):v.protectedKeys[U]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(p={...p,...M}),o&&e.blockInitialAnimation&&(I=!1);let H=b&&S;I&&(!H||T)&&d.push(...P.map(U=>{let V={type:h};if(typeof U=="string"&&o&&!H&&e.manuallyAnimateOnMount&&e.parent){let{parent:k}=e,Z=Xn(k,U);if(k.enteringChildren&&Z){let{delayChildren:ae}=Z.transition||{};V.delay=Kh(k.enteringChildren,e,ae)}}return{animation:U,options:V}}))}if(f.size){let y={};if(typeof u.initial!="boolean"){let h=Xn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);h&&h.transition&&(y.transition=h.transition)}f.forEach(h=>{let v=e.getBaseTarget(h),x=e.getValue(h);x&&(x.liveStyle=!0),y[h]=v??null}),d.push({animation:y})}let g=!!d.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?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=EA()}}}function Uq(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!QC(t,e):!1}function Js(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function EA(){return{animate:Js(!0),whileInView:Js(),whileHover:Js(),whileTap:Js(),whileDrag:Js(),whileFocus:Js(),exit:Js()}}var qt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Yh=class extends qt{constructor(t){super(t),t.animationState||(t.animationState=AA(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();_i(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 zq=0,Qh=class extends qt{constructor(){super(...arguments),this.id=zq++}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 DA={animation:{Feature:Yh},exit:{Feature:Qh}};function Da(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function Na(e){return{point:{x:e.pageX,y:e.pageY}}}var NA=e=>t=>$s(t)&&e(t,Na(t));function Hi(e,t,r,o){return Da(e,t,NA(r),o)}var VA=1e-4,Gq=1-VA,Wq=1+VA,BA=.01,qq=0-BA,jq=0+BA;function _t(e){return e.max-e.min}function HA(e,t,r){return Math.abs(e-t)<=r}function OA(e,t,r,o=.5){e.origin=o,e.originPoint=ke(t.min,t.max,e.origin),e.scale=_t(r)/_t(t),e.translate=ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Gq&&e.scale<=Wq||isNaN(e.scale))&&(e.scale=1),(e.translate>=qq&&e.translate<=jq||isNaN(e.translate))&&(e.translate=0)}function Qu(e,t,r,o){OA(e.x,t.x,r.x,o?o.originX:void 0),OA(e.y,t.y,r.y,o?o.originY:void 0)}function FA(e,t,r){e.min=r.min+t.min,e.max=e.min+_t(t)}function UA(e,t,r){FA(e.x,t.x,r.x),FA(e.y,t.y,r.y)}function _A(e,t,r){e.min=t.min-r.min,e.max=e.min+_t(t)}function Zu(e,t,r){_A(e.x,t.x,r.x),_A(e.y,t.y,r.y)}function Yr(e){return[e("x"),e("y")]}var Zh=({current:e})=>e?e.ownerDocument.defaultView:null;var zA=(e,t)=>Math.abs(e-t);function GA(e,t){let r=zA(e.x,t.x),o=zA(e.y,t.y);return Math.sqrt(r**2+o**2)}var Ju=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=eS(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=GA(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;let{point:g}=f,{timestamp:y}=yt;this.history.push({...g,timestamp:y});let{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=JC(p,this.transformPagePoint),Pe.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let h=eS(f.type==="pointercancel"?this.lastMoveEventInfo:JC(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,h),g&&g(f,h)},!$s(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=Na(t),l=JC(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=yt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,eS(l,this.history)),this.removeListeners=cn(Hi(this.contextWindow,"pointermove",this.handlePointerMove),Hi(this.contextWindow,"pointerup",this.handlePointerUp),Hi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),mr(this.updatePoint)}};function JC(e,t){return t?{point:t(e.point)}:e}function WA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eS({point:e},t){return{point:e,delta:WA(e,qA(t)),offset:WA(e,$q(t)),velocity:Kq(t,.1)}}function $q(e){return e[0]}function qA(e){return e[e.length-1]}function Kq(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=qA(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>Rt(t)));)r--;if(!o)return{x:0,y:0};let a=Ft(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 YA(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?ke(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?ke(r,e,o.max):Math.min(e,r)),e}function jA(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 QA(e,{top:t,left:r,bottom:o,right:n}){return{x:jA(e.x,r,n),y:jA(e.y,t,o)}}function $A(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 ZA(e,t){return{x:$A(e.x,t.x),y:$A(e.y,t.y)}}function JA(e,t){let r=.5,o=_t(e),n=_t(t);return n>o?r=Do(t.min,t.max-o,e.min):o>n&&(r=Do(e.min,e.max-n,t.min)),Wt(0,1,r)}function eD(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 Jh=.35;function tD(e=Jh){return e===!1?e=0:e===!0&&(e=Jh),{x:KA(e,"left","right"),y:KA(e,"top","bottom")}}function KA(e,t,r){return{min:XA(e,t),max:XA(e,r)}}function XA(e,t){return typeof e=="number"?e:e[t]||0}var Xq=new WeakMap,tv=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=Ke(),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(Na(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=NC(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),Yr(h=>{let v=this.getAxisMotionValue(h).get()||0;if(gr.test(v)){let{projection:x}=this.visualElement;if(x&&x.layout){let w=x.layout.layoutBox[h];w&&(v=_t(w)*(parseFloat(v)/100))}}this.originPoint[h]=v}),g&&Pe.postRender(()=>g(d,f)),ip(this.visualElement,"transform");let{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:h}=f;if(m&&this.currentDirection===null){this.currentDirection=Yq(h),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,h),this.updateAxis("y",f.point,h),this.visualElement.render(),y&&y(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Yr(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ju(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:Zh(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&&Pe.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||!ev(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=YA(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&&Ea(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=QA(o.layoutBox,t):this.constraints=!1,this.elastic=tD(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Yr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=eD(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Ea(t))return!1;let o=t.current;er(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=hA(o,n.root,this.visualElement.getTransformPagePoint()),i=ZA(n.layout.layoutBox,a);if(r){let s=r(lA(i));this.hasMutatedConstraints=!!s,s&&(i=zh(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Yr(c=>{if(!ev(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,m={type:"inertia",velocity:o?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){let o=this.getAxisMotionValue(t);return ip(this.visualElement,t),o.start(Xu(t,o,0,r,this.visualElement,!1))}stopAnimation(){Yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yr(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){Yr(r=>{let{drag:o}=this.getProps();if(!ev(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]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Ea(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};Yr(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=JA({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(),Yr(i=>{if(!ev(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(ke(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;Xq.set(this.visualElement,this);let t=this.visualElement.current,r=Hi(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Ea(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()),Pe.read(o);let i=Da(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yr(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=Jh,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function ev(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Yq(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var rv=class extends qt{constructor(t){super(t),this.removeGroupControls=gt,this.removeListeners=gt,this.controls=new tv(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gt}unmount(){this.removeGroupControls(),this.removeListeners()}};var rD=e=>(t,r)=>{e&&Pe.postRender(()=>e(t,r))},ov=class extends qt{constructor(){super(...arguments),this.removePointerDownListener=gt}onPointerDown(t){this.session=new Ju(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zh(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:rD(t),onStart:rD(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&Pe.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=Hi(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 aD=R(D(),1);var sp=R(E(),1);var ec={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function oD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var tc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let r=oD(e,t.target.x),o=oD(e,t.target.y);return`${r}% ${o}%`}};var nD={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=hr.parse(e);if(n.length>5)return o;let a=hr.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=ke(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 tS=!1,rS=class extends sp.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;GE(Qq),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),tS&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),ec.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,tS=!0,n||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Pe.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),js.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;tS=!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 nv(e){let[t,r]=Lh(),o=(0,sp.useContext)(Iu);return(0,aD.jsx)(rS,{...e,layoutGroup:o,switchLayoutGroup:(0,sp.useContext)(Bh),isPresent:t,safeToRemove:r})}var Qq={borderRadius:{...tc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tc,borderTopRightRadius:tc,borderBottomLeftRadius:tc,borderBottomRightRadius:tc,boxShadow:nD};function av(e,t,r){let o=Be(e)?e:Kr(e);return o.start(Xu("",o,t,r)),o.animation}var iD=(e,t)=>e.depth-t.depth;var iv=class{constructor(){this.children=[],this.isDirty=!1}add(t){Ns(this.children,t),this.isDirty=!0}remove(t){un(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iD),this.isDirty=!1,this.children.forEach(t)}};function sD(e,t){let r=wt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(mr(o),e(a-t))};return Pe.setup(o,!0),()=>mr(o)}var dD=["TopLeft","TopRight","BottomLeft","BottomRight"],Zq=dD.length,lD=e=>typeof e=="string"?parseFloat(e):e,uD=e=>typeof e=="number"||ue.test(e);function fD(e,t,r,o,n,a){n?(e.opacity=ke(0,r.opacity??1,Jq(o)),e.opacityExit=ke(t.opacity??1,0,e6(o))):a&&(e.opacity=ke(t.opacity??1,r.opacity??1,o));for(let i=0;i<Zq;i++){let s=`border${dD[i]}Radius`,l=cD(t,s),u=cD(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||uD(l)===uD(u)?(e[s]=Math.max(ke(lD(l),lD(u),o),0),(gr.test(u)||gr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=ke(t.rotate||0,r.rotate||0,o))}function cD(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Jq=pD(0,.5,Rf),e6=pD(.5,.95,gt);function pD(e,t,r){return o=>o<e?0:o>t?1:r(Do(e,t,o))}function mD(e,t){e.min=t.min,e.max=t.max}function co(e,t){mD(e.x,t.x),mD(e.y,t.y)}function oS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function gD(e,t,r,o,n){return e-=t,e=op(e,1/r,o),n!==void 0&&(e=op(e,1/n,o)),e}function t6(e,t=0,r=1,o=.5,n,a=e,i=e){if(gr.test(t)&&(t=parseFloat(t),t=ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=ke(a.min,a.max,o);e===a&&(s-=t),e.min=gD(e.min,t,r,s,n),e.max=gD(e.max,t,r,s,n)}function hD(e,t,[r,o,n],a,i){t6(e,t[r],t[o],t[n],t.scale,a,i)}var r6=["x","scaleX","originX"],o6=["y","scaleY","originY"];function nS(e,t,r,o){hD(e.x,t,r6,r?r.x:void 0,o?o.x:void 0),hD(e.y,t,o6,r?r.y:void 0,o?o.y:void 0)}function vD(e){return e.translate===0&&e.scale===1}function aS(e){return vD(e.x)&&vD(e.y)}function xD(e,t){return e.min===t.min&&e.max===t.max}function wD(e,t){return xD(e.x,t.x)&&xD(e.y,t.y)}function yD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iS(e,t){return yD(e.x,t.x)&&yD(e.y,t.y)}function sS(e){return _t(e.x)/_t(e.y)}function lS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var sv=class{constructor(){this.members=[]}add(t){Ns(this.members,t),t.scheduleRender()}remove(t){if(un(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 CD(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:m}=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) `),m&&(o+=`skewY(${m}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 el={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},uS=["","X","Y","Z"],n6=1e3,a6=0;function cS(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function MD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=$h(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Pe,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&MD(o)}function lv({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=a6++,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,$r.value&&(el.nodes=el.calculatedTargetDeltas=el.calculatedProjections=0),this.nodes.forEach(l6),this.nodes.forEach(f6),this.nodes.forEach(p6),this.nodes.forEach(u6),$r.addProjectionMetrics&&$r.addProjectionMetrics(el)},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 iv)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Sa),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=Ks(i)&&!Qf(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;Pe.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=sD(f,250),ec.hasAnimatedSinceResize&&(ec.hasAnimatedSinceResize=!1,this.nodes.forEach(RD)))})}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 m=this.options.transition||u.getDefaultTransition()||x6,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),h=!this.targetLayout||!iS(this.targetLayout,p),v=!d&&f;if(this.options.layoutRoot||this.resumeFrom||v||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let x={...Gs(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,v)}else d||RD(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(),mr(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(m6),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&&MD(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(SD);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bD);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(d6),this.nodes.forEach(i6),this.nodes.forEach(s6)):this.nodes.forEach(bD),this.clearAllSnapshots();let s=wt.now();yt.delta=Wt(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,Ef.update.process(yt),Ef.preRender.process(yt),Ef.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,js.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(c6),this.sharedNodes.forEach(g6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_t(this.snapshot.measuredBox.x)&&!_t(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=Ke(),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&&!aS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Aa(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)),y6(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return Ke();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(w6))){let{scroll:u}=this.root;u&&(Vi(s.x,u.offset.x),Vi(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Ke();if(co(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&&co(s,i),Vi(s.x,c.offset.x),Vi(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=Ke();co(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&&Qs(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Aa(c.latestValues)&&Qs(l,c.latestValues)}return Aa(this.latestValues)&&Qs(l,this.latestValues),l}removeTransform(i){let s=Ke();co(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Aa(u.latestValues))continue;Gh(u.latestValues)&&u.updateSnapshot();let c=Ke(),d=u.measurePageBox();co(c,d),nS(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Aa(this.latestValues)&&nS(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=Ke(),this.relativeTargetOrigin=Ke(),Zu(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),co(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ke(),this.targetWithTransforms=Ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),UA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):co(this.target,this.layout.layoutBox),XC(this.target,this.targetDelta)):co(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=Ke(),this.relativeTargetOrigin=Ke(),Zu(this.relativeTargetOrigin,this.target,f.target),co(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}$r.value&&el.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Gh(this.parent.latestValues)||$C(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;co(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;gA(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=Ke());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(oS(this.prevProjectionDelta.x,this.projectionDelta.x),oS(this.prevProjectionDelta.y,this.projectionDelta.y)),Qu(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!lS(this.projectionDelta.x,this.prevProjectionDelta.x)||!lS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),$r.value&&el.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=Zs(),this.projectionDelta=Zs(),this.projectionDeltaWithTransform=Zs()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Zs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Ke(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,y=this.getStack(),h=!y||y.members.length<=1,v=!!(g&&!h&&this.options.crossfade===!0&&!this.path.some(v6));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let C=w/1e3;ID(d.x,i.x,C),ID(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h6(this.relativeTarget,this.relativeTargetOrigin,f,C),x&&wD(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Ke()),co(x,this.relativeTarget)),g&&(this.animationValues=c,fD(c,u,this.latestValues,C,v,h)),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&&(mr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{ec.hasAnimatedSinceResize=!0,dn.layout++,this.motionValue||(this.motionValue=Kr(0)),this.currentAnimation=av(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{dn.layout--},onComplete:()=>{dn.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(n6),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&&ED(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ke();let d=_t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=_t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}co(s,l),Qs(s,c),Qu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new sv),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&&cS("z",i,u,this.animationValues);for(let c=0;c<uS.length;c++)cS(`rotate${uS[c]}`,i,u,this.animationValues),cS(`skew${uS[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=Uu(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=Uu(s?.pointerEvents)||""),this.hasProjected&&!Aa(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=CD(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 m in Ys){if(c[m]===void 0)continue;let{correct:g,applyTo:y,isCSSVariable:h}=Ys[m],v=d==="none"?c[m]:g(c[m],u);if(y){let x=y.length;for(let w=0;w<x;w++)i[y[w]]=v}else h?this.options.visualElement.renderState.vars[m]=v:i[m]=v}this.options.layoutId&&(i.pointerEvents=u===this?Uu(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(SD),this.root.sharedNodes.clear()}}}function i6(e){e.updateLayout()}function s6(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"?Yr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=_t(d);d.min=r[c].min,d.max=d.min+f}):ED(n,t.layoutBox,r)&&Yr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=_t(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=Zs();Qu(i,r,t.layoutBox);let s=Zs();a?Qu(s,e.applyTransform(o,!0),t.measuredBox):Qu(s,r,t.layoutBox);let l=!aS(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=Ke();Zu(p,t.layoutBox,d.layoutBox);let m=Ke();Zu(m,r,f.layoutBox),iS(p,m)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=m,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 l6(e){$r.value&&el.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 u6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function c6(e){e.clearSnapshot()}function SD(e){e.clearMeasurements()}function bD(e){e.isLayoutDirty=!1}function d6(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function RD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function f6(e){e.resolveTargetDelta()}function p6(e){e.calcProjection()}function m6(e){e.resetSkewAndRotation()}function g6(e){e.removeLeadSnapshot()}function ID(e,t,r){e.translate=ke(t.translate,0,r),e.scale=ke(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function LD(e,t,r,o){e.min=ke(t.min,r.min,o),e.max=ke(t.max,r.max,o)}function h6(e,t,r,o){LD(e.x,t.x,r.x,o),LD(e.y,t.y,r.y,o)}function v6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var x6={duration:.45,ease:[.4,0,.1,1]},PD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),TD=PD("applewebkit/")&&!PD("chrome/")?Math.round:gt;function kD(e){e.min=TD(e.min),e.max=TD(e.max)}function y6(e){kD(e.x),kD(e.y)}function ED(e,t,r){return e==="position"||e==="preserve-aspect"&&!HA(sS(t),sS(r),.2)}function w6(e){return e!==e.root&&e.scroll?.wasRoot}var AD=lv({attachResizeListener:(e,t)=>Da(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var dS={current:void 0},uv=lv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!dS.current){let e=new AD({});e.mount(window),e.setOptions({layoutScroll:!0}),dS.current=e}return dS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var DD={pan:{Feature:ov},drag:{Feature:rv,ProjectionNode:uv,MeasureLayout:nv}};function ND(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&&Pe.postRender(()=>a(t,Na(t)))}var cv=class extends qt{mount(){let{current:t}=this.node;t&&(this.unmount=OC(t,(r,o)=>(ND(this.node,o,"Start"),n=>ND(this.node,n,"End"))))}unmount(){}};var dv=class extends qt{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=cn(Da(this.node.current,"focus",()=>this.onFocus()),Da(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function OD(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&&Pe.postRender(()=>a(t,Na(t)))}var fv=class extends qt{mount(){let{current:t}=this.node;t&&(this.unmount=VC(t,(r,o)=>(OD(this.node,o,"Start"),(n,{success:a})=>OD(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var pS=new WeakMap,fS=new WeakMap,C6=e=>{let t=pS.get(e.target);t&&t(e)},S6=e=>{e.forEach(C6)};function b6({root:e,...t}){let r=e||document;fS.has(r)||fS.set(r,{});let o=fS.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(S6,{root:e,...t})),o[n]}function FD(e,t,r){let o=b6(t);return pS.set(e,r),o.observe(e),()=>{pS.delete(e),o.unobserve(e)}}var R6={some:0,all:1},pv=class extends qt{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:R6[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 FD(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(I6(t,r))&&this.startObserver()}unmount(){}};function I6({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var _D={inView:{Feature:pv},tap:{Feature:fv},focus:{Feature:dv},hover:{Feature:cv}};var VD={layout:{ProjectionNode:uv,MeasureLayout:nv}};var BD={...DA,..._D,...DD,...VD};var He=sA(BD,RA);var rc=R(E(),1);function oc(e){let t=qn(()=>Kr(e)),{isStatic:r}=(0,rc.useContext)(Ni);if(r){let[,o]=(0,rc.useState)(e);(0,rc.useEffect)(()=>t.on("change",o),[])}return t}function mv(e,t){let r=oc(t()),o=()=>r.set(t());return o(),Pu(()=>{let n=()=>Pe.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),mr(o)}}),r}function HD(e){qs.current=[],e();let t=mv(qs.current,e);return qs.current=void 0,t}function mS(e,t,r,o){if(typeof e=="function")return HD(e);let n=typeof t=="function"?t:BC(t,r,o);return Array.isArray(e)?UD(e,n):UD([e],([a])=>n(a))}function UD(e,t){let r=qn(()=>[]);return mv(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function lp(e){return typeof e=="object"&&!Array.isArray(e)}function gv(e,t,r,o){return typeof e=="string"&&lp(t)?Kf(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function zD(e,t,r){return e*(t+1)}function gS(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 L6(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(un(e,n),o--)}}function GD(e,t,r,o,n,a){L6(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,o[i]),easing:Tf(r,i)})}function WD(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function qD(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var P6="easeInOut",T6=20;function KD(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 m=e[p];if(typeof m=="string"){u.set(m,d);continue}else if(!Array.isArray(m)){u.set(m.name,gS(d,m.at,c,u));continue}let[g,y,h={}]=m;h.at!==void 0&&(d=gS(d,h.at,c,u));let v=0,x=(w,C,b,S=0,I=0)=>{let T=k6(w),{delay:P=0,times:M=Vf(T),type:A="keyframes",repeat:F,repeatType:N,repeatDelay:H=0,...O}=C,{ease:U=t.ease||"easeOut",duration:V}=C,k=typeof P=="function"?P(S,I):P,Z=T.length,ae=zs(A)?A:n?.[A||"keyframes"];if(Z<=2&&ae){let X=100;if(Z===2&&A6(T)){let ne=T[1]-T[0];X=Math.abs(ne)}let ce={...O};V!==void 0&&(ce.duration=Rt(V));let z=Of(ce,X,ae);U=z.ease,V=z.duration}V??(V=a);let _=d+k;M.length===1&&M[0]===0&&(M[1]=1);let Y=M.length-T.length;if(Y>0&&_f(M,Y),T.length===1&&T.unshift(null),F){er(F<T6,"Repeat count too high, must be less than 20","repeat-count-high"),V=zD(V,F);let X=[...T],ce=[...M];U=Array.isArray(U)?[...U]:[U];let z=[...U];for(let ne=0;ne<F;ne++){T.push(...X);for(let he=0;he<X.length;he++)M.push(ce[he]+(ne+1)),U.push(he===0?"linear":Tf(z,he-1))}WD(M,F)}let re=_+V;GD(b,T,U,M,_,re),v=Math.max(k+V,v),f=Math.max(re,f)};if(Be(g)){let w=jD(g,s);x(y,h,$D("default",w))}else{let w=gv(g,y,o,l),C=w.length;for(let b=0;b<C;b++){y=y,h=h;let S=w[b],I=jD(S,s);for(let T in y)x(y[T],M6(h,T),$D(T,I),b,C)}}c=d,d+=v}return s.forEach((p,m)=>{for(let g in p){let y=p[g];y.sort(qD);let h=[],v=[],x=[];for(let C=0;C<y.length;C++){let{at:b,value:S,easing:I}=y[C];h.push(S),v.push(Do(0,f,b)),x.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),x.unshift(P6)),v[v.length-1]!==1&&(v.push(1),h.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});let w=i.get(m);w.keyframes[g]=h,w.transition[g]={...t,duration:f,ease:x,times:v,...r}}}),i}function jD(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function $D(e,t){return t[e]||(t[e]=[]),t[e]}function k6(e){return Array.isArray(e)?e:[e]}function M6(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var E6=e=>typeof e=="number",A6=e=>e.every(E6);function D6(e,t){return e in t}var hv=class extends qu{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(D6(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 Ke()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function XD(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Ks(e)&&!Qf(e)?new Ku(t):new $u(t);r.mount(e),Bi.set(e,r)}function YD(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new hv(t);r.mount(e),Bi.set(e,r)}function N6(e,t){return Be(e)||typeof e=="number"||typeof e=="string"&&!lp(t)}function vv(e,t,r,o){let n=[];if(N6(e,t))n.push(av(e,lp(t)&&t.default||t,r&&(r.default||r)));else{let a=gv(e,t,o),i=a.length;er(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];er(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?XD:YD;Bi.has(l)||u(l);let c=Bi.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...Yu(c,{...t,transition:d},{}))}}return n}function QD(e,t,r){let o=[];return KD(e,t,r,{spring:Ra}).forEach(({keyframes:a,transition:i},s)=>{o.push(...vv(s,a,i))}),o}function O6(e){return Array.isArray(e)&&e.some(Array.isArray)}function ZD(e){function t(r,o,n){let a=[],i;if(O6(r))a=QD(r,o,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=vv(r,o,u,e)}let s=new zf(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{un(e.animations,s)})),s}return t}var hS=ZD();var pye=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"}}),mn={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}},xv={lift:{y:-2,transition:mn.smooth},scale:{scale:1.05,transition:mn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:mn.smooth},rotate:{rotate:2,transition:mn.bouncy}},JD={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},mye={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:mn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:mn.smooth}},gye={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:mn.smooth}}},hye={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:mn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:mn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:mn.smooth}},eN={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var vye={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:mn.bouncy};var Ui=R(D()),tN=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"}}),vS=tl.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"?xv.scale:a==="glow"?xv.glow:xv.lift,whileTap:JD.scale};return(0,Ui.jsx)(He.div,{ref:s,className:L("moonui-theme",tN({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,Ui.jsx)("div",{ref:s,className:L("moonui-theme",tN({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});vS.displayName="Card";var xS=tl.forwardRef(({className:e,...t},r)=>(0,Ui.jsx)("div",{ref:r,className:L("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));xS.displayName="CardHeader";var yS=tl.forwardRef(({className:e,...t},r)=>(0,Ui.jsx)("h3",{ref:r,className:L("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));yS.displayName="CardTitle";var wS=tl.forwardRef(({className:e,...t},r)=>(0,Ui.jsx)("p",{ref:r,className:L("moonui-theme","text-sm text-muted-foreground",e),...t}));wS.displayName="CardDescription";var CS=tl.forwardRef(({className:e,...t},r)=>(0,Ui.jsx)("div",{ref:r,className:L("moonui-theme","p-6 pt-0",e),...t}));CS.displayName="CardContent";var SS=tl.forwardRef(({className:e,...t},r)=>(0,Ui.jsx)("div",{ref:r,className:L("moonui-theme","flex items-center p-6 pt-0",e),...t}));SS.displayName="CardFooter";var DN=R(E());function Te(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 tr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function yv(e,t){let r=Te(e);if(isNaN(t))return tr(e,NaN);if(!t)return r;let o=r.getDate(),n=tr(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 F6=Math.pow(10,8)*24*60*60*1e3,Mye=-F6,wv=6048e5,rN=864e5;var _6=3600;var oN=_6*24,Eye=oN*7,V6=oN*365.2425,B6=V6/12,Aye=B6*3;var H6={};function Yn(){return H6}function gn(e,t){let r=Yn(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(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 rl(e){return gn(e,{weekStartsOn:1})}function Cv(e){let t=Te(e),r=t.getFullYear(),o=tr(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=rl(o),a=tr(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=rl(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function nc(e){let t=Te(e);return t.setHours(0,0,0,0),t}function bS(e){let t=Te(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 nN(e,t){let r=nc(e),o=nc(t),n=+r-bS(r),a=+o-bS(o);return Math.round((n-a)/rN)}function aN(e){let t=Cv(e),r=tr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),rl(r)}function iN(e){return tr(e,Date.now())}function ol(e,t){let r=nc(e),o=nc(t);return+r==+o}function sN(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Sv(e){if(!sN(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function lN(e){let t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function bv(e,t){let r=Te(e.start),o=Te(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(Te(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function uN(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function cN(e){let t=Te(e),r=tr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function dN(e,t){let r=Yn(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(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 U6={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"}},fN=(e,t,r)=>{let o,n=U6[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 Rv(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var z6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},G6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},W6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pN={date:Rv({formats:z6,defaultWidth:"full"}),time:Rv({formats:G6,defaultWidth:"full"}),dateTime:Rv({formats:W6,defaultWidth:"full"})};var q6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mN=(e,t,r,o)=>q6[e];function ac(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 j6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},K6={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"]},X6={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"]},Y6={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"}},Q6={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"}},Z6=(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"},gN={ordinalNumber:Z6,era:ac({values:j6,defaultWidth:"wide"}),quarter:ac({values:$6,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ac({values:K6,defaultWidth:"wide"}),day:ac({values:X6,defaultWidth:"wide"}),dayPeriod:ac({values:Y6,defaultWidth:"wide",formattingValues:Q6,defaultFormattingWidth:"wide"})};function ic(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)?ej(s,d=>d.test(i)):J6(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 J6(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function ej(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function hN(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 tj=/^(\d+)(th|st|nd|rd)?/i,rj=/\d+/i,oj={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},nj={any:[/^b/i,/^(a|c)/i]},aj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ij={any:[/1/i,/2/i,/3/i,/4/i]},sj={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},lj={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]},uj={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},cj={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]},dj={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},fj={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}},vN={ordinalNumber:hN({matchPattern:tj,parsePattern:rj,valueCallback:e=>parseInt(e,10)}),era:ic({matchPatterns:oj,defaultMatchWidth:"wide",parsePatterns:nj,defaultParseWidth:"any"}),quarter:ic({matchPatterns:aj,defaultMatchWidth:"wide",parsePatterns:ij,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ic({matchPatterns:sj,defaultMatchWidth:"wide",parsePatterns:lj,defaultParseWidth:"any"}),day:ic({matchPatterns:uj,defaultMatchWidth:"wide",parsePatterns:cj,defaultParseWidth:"any"}),dayPeriod:ic({matchPatterns:dj,defaultMatchWidth:"any",parsePatterns:fj,defaultParseWidth:"any"})};var RS={code:"en-US",formatDistance:fN,formatLong:pN,formatRelative:mN,localize:gN,match:vN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function xN(e){let t=Te(e);return nN(t,cN(t))+1}function yN(e){let t=Te(e),r=+rl(t)-+aN(t);return Math.round(r/wv)+1}function Iv(e,t){let r=Te(e),o=r.getFullYear(),n=Yn(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=tr(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=gn(i,t),l=tr(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=gn(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function wN(e,t){let r=Yn(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=Iv(e,t),a=tr(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),gn(a,t)}function CN(e,t){let r=Te(e),o=+gn(r,t)-+wN(r,t);return Math.round(o/wv)+1}function Ue(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Oa={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Ue(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Ue(r+1,2)},d(e,t){return Ue(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 Ue(e.getHours()%12||12,t.length)},H(e,t){return Ue(e.getHours(),t.length)},m(e,t){return Ue(e.getMinutes(),t.length)},s(e,t){return Ue(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Ue(n,t.length)}};var sc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},IS={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 Oa.y(e,t)},Y:function(e,t,r,o){let n=Iv(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return Ue(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Ue(a,t.length)},R:function(e,t){let r=Cv(e);return Ue(r,t.length)},u:function(e,t){let r=e.getFullYear();return Ue(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 Ue(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 Ue(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 Oa.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 Ue(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=CN(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ue(n,t.length)},I:function(e,t,r){let o=yN(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Ue(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Oa.d(e,t)},D:function(e,t,r){let o=xN(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ue(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 Ue(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 Ue(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 Ue(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=sc.noon:o===0?n=sc.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=sc.evening:o>=12?n=sc.afternoon:o>=4?n=sc.morning:n=sc.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 Oa.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Oa.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Oa.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Oa.s(e,t)},S:function(e,t){return Oa.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return bN(o);case"XXXX":case"XX":return nl(o);case"XXXXX":case"XXX":default:return nl(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return bN(o);case"xxxx":case"xx":return nl(o);case"xxxxx":case"xxx":default:return nl(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+SN(o,":");case"OOOO":default:return"GMT"+nl(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+SN(o,":");case"zzzz":default:return"GMT"+nl(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return Ue(o,t.length)},T:function(e,t,r){let o=e.getTime();return Ue(o,t.length)}};function SN(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+Ue(a,2)}function bN(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):nl(e,t)}function nl(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Ue(Math.trunc(o/60),2),a=Ue(o%60,2);return r+n+t+a}var RN=(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"})}},IN=(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"})}},pj=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return RN(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}}",RN(o,t)).replace("{{time}}",IN(n,t))},LN={p:IN,P:pj};var mj=/^D+$/,gj=/^Y+$/,hj=["D","DD","YY","YYYY"];function PN(e){return mj.test(e)}function TN(e){return gj.test(e)}function kN(e,t,r){let o=vj(e,t,r);if(console.warn(o),hj.includes(e))throw new RangeError(o)}function vj(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 xj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wj=/^'([^]*?)'?$/,Cj=/''/g,Sj=/[a-zA-Z]/;function Oo(e,t,r){let o=Yn(),n=r?.locale??o.locale??RS,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=Te(e);if(!Sv(s))throw new RangeError("Invalid time value");let l=t.match(yj).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=LN[d];return f(c,n.formatLong)}return c}).join("").match(xj).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:bj(c)};if(IS[d])return{isToken:!0,value:c};if(d.match(Sj))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&&TN(d)||!r?.useAdditionalDayOfYearTokens&&PN(d))&&kN(d,t,String(e));let f=IS[d[0]];return f(s,d,n.localize,u)}).join("")}function bj(e){let t=e.match(wj);return t?t[1].replace(Cj,"'"):e}function LS(e){return Te(e).getDay()}function MN(e,t){let r=Te(e),o=Te(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function EN(e){return ol(e,iN(e))}function AN(e,t){return yv(e,-t)}var Er=R(D());function lc({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]=DN.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(AN(c,1))},m=()=>{d(yv(c,1))},g=b=>{if(!o?.(b)){if(e==="single")r?.(b);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:b,to:void 0}):b<S.from?r?.({from:b,to:S.from}):r?.({from:S.from,to:b})}}},y=b=>{if(!t)return!1;if(e==="single")return ol(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?ol(b,S.from):!1}return!1},h=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?ol(b,S.from):!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?ol(b,S.to):!1},x=b=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:b>S.from&&b<S.to},C=(()=>{let b=uN(c),S=lN(c),I=bv({start:b,end:S}),T=LS(b),P=[];if(T>0&&n){let N=gn(b),H=new Date(b);H.setDate(H.getDate()-1),P.push(...bv({start:N,end:H}))}let M=LS(S),A=[];if(M<6&&n){let N=new Date(S);N.setDate(N.getDate()+1);let H=dN(S);A.push(...bv({start:N,end:H}))}let F=[];if(!n&&T>0)for(let N=0;N<T;N++)F.push(null);return[...P,...F,...I,...A]})();return(0,Er.jsxs)("div",{className:L("moonui-theme","p-0",a),children:[(0,Er.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Er.jsx)("button",{onClick:p,className:L("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,Er.jsx)(an,{className:"h-5 w-5"})}),(0,Er.jsx)("h2",{className:"text-base font-medium",children:Oo(c,"MMMM yyyy")}),(0,Er.jsx)("button",{onClick:m,className:L("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,Er.jsx)(kr,{className:"h-5 w-5"})})]}),(0,Er.jsxs)("div",{className:"px-6 pb-4",children:[(0,Er.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,Er.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:b.full,children:b.short},`weekday-${S}`))}),(0,Er.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((b,S)=>{if(!b)return(0,Er.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let I=!MN(b,c),T=o?.(b)||!1,P=y(b),M=EN(b),A=h(b),F=v(b),N=x(b);return(0,Er.jsx)("button",{onClick:()=>g(b),disabled:T,className:L("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",I&&"text-muted-foreground/50",T&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",P&&!N&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",M&&"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",A&&"rounded-r-none",F&&"rounded-l-none"),type:"button",children:Oo(b,"d")},b.toISOString())})})]})]})}lc.displayName="Calendar";var al=R(E());var zi=R(D()),Rj=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"},NN=(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},PS=al.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=al.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=Rj(d);l(f);let p=f==="amex"?15:16,m=d.slice(0,p),g=NN(m,f);r?.(m,f),c.target.value=g};return(0,zi.jsxs)("div",{className:"relative",children:[(0,zi.jsx)(rr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:NN(t,s),onChange:u,className:L(o&&"pl-10",e),...a}),o&&(0,zi.jsx)(Wd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});PS.displayName="CardNumberInput";var TS=al.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,zi.jsx)(rr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});TS.displayName="CardExpiryInput";var kS=al.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,zi.jsx)(rr,{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})});kS.displayName="CardCVCInput";var MS=al.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,zi.jsx)(rr,{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})});MS.displayName="CardZipInput";var It=R(E());var Fo=R(E(),1);function Ij(e){return Object.prototype.toString.call(e)==="[object Object]"}function ON(e){return Ij(e)||Array.isArray(e)}function _N(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Lv(e,t){let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:r.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!ON(s)||!ON(l)?s===l:Lv(s,l)})}function FN(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function VN(e,t){if(e.length!==t.length)return!1;let r=FN(e),o=FN(t);return r.every((n,a)=>{let i=o[a];return Lv(n,i)})}function DS(e){return typeof e=="number"}function ES(e){return typeof e=="string"}function Pv(e){return typeof e=="boolean"}function BN(e){return Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return Math.abs(e)}function NS(e){return Math.sign(e)}function cp(e,t){return ht(e-t)}function Lj(e,t){if(e===0||t===0||ht(e)<=ht(t))return 0;let r=cp(ht(e),ht(t));return ht(r/e)}function Pj(e){return Math.round(e*100)/100}function dp(e){return fp(e).map(Number)}function hn(e){return e[mp(e)]}function mp(e){return Math.max(0,e.length-1)}function OS(e,t){return t===mp(e)}function HN(e,t=0){return Array.from(Array(e),(r,o)=>t+o)}function fp(e){return Object.keys(e)}function UN(e,t){return[e,t].reduce((r,o)=>(fp(o).forEach(n=>{let a=r[n],i=o[n],s=BN(a)&&BN(i);r[n]=s?UN(a,i):i}),r),{})}function AS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Tj(e,t){let r={start:o,center:n,end:a};function o(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return ES(e)?r[e](l):e(t,l,u)}return{measure:i}}function pp(){let e=[];function t(n,a,i,s={passive:!0}){let l;if("addEventListener"in n)n.addEventListener(a,i,s),l=()=>n.removeEventListener(a,i,s);else{let u=n;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function r(){e=e.filter(n=>n())}let o={add:t,clear:r};return o}function kj(e,t,r,o){let n=pp(),a=1e3/60,i=null,s=0,l=0;function u(){n.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){p(),n.clear()}function d(y){if(!l)return;i||(i=y,r(),r());let h=y-i;for(i=y,s+=h;s>=a;)r(),s-=a;let v=s/a;o(v),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),i=null,s=0,l=0}function m(){i=null,s=0}return{init:u,destroy:c,start:f,stop:p,update:r,render:o}}function Mj(e,t){let r=t==="rtl",o=e==="y",n=o?"y":"x",a=o?"x":"y",i=!o&&r?-1:1,s=c(),l=d();function u(m){let{height:g,width:y}=m;return o?g:y}function c(){return o?"top":r?"right":"left"}function d(){return o?"bottom":r?"left":"right"}function f(m){return m*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function il(e=0,t=0){let r=ht(e-t);function o(u){return u<e}function n(u){return u>t}function a(u){return o(u)||n(u)}function i(u){return a(u)?o(u)?e:t:u}function s(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:o,removeOffset:s}}function zN(e,t,r){let{constrain:o}=il(0,e),n=e+1,a=i(t);function i(f){return r?ht((n+f)%n):o(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return zN(e,s(),r)}let d={get:s,set:l,add:u,clone:c};return d}function Ej(e,t,r,o,n,a,i,s,l,u,c,d,f,p,m,g,y,h,v){let{cross:x,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],b={passive:!1},S=pp(),I=pp(),T=il(50,225).constrain(p.measure(20)),P={mouse:300,touch:400},M={mouse:500,touch:600},A=m?43:25,F=!1,N=0,H=0,O=!1,U=!1,V=!1,k=!1;function Z(K){if(!v)return;function Ie(ie){(Pv(v)||v(K,ie))&&ce(ie)}let J=t;S.add(J,"dragstart",ie=>ie.preventDefault(),b).add(J,"touchmove",()=>{},b).add(J,"touchend",()=>{}).add(J,"touchstart",Ie).add(J,"mousedown",Ie).add(J,"touchcancel",ne).add(J,"contextmenu",ne).add(J,"click",he,!0)}function ae(){S.clear(),I.clear()}function _(){let K=k?r:t;I.add(K,"touchmove",z,b).add(K,"touchend",ne).add(K,"mousemove",z,b).add(K,"mouseup",ne)}function Y(K){let Ie=K.nodeName||"";return C.includes(Ie)}function re(){return(m?M:P)[k?"mouse":"touch"]}function X(K,Ie){let J=d.add(NS(K)*-1),ie=c.byDistance(K,!m).distance;return m||ht(K)<T?ie:y&&Ie?ie*.5:c.byIndex(J.get(),0).distance}function ce(K){let Ie=AS(K,o);k=Ie,V=m&&Ie&&!K.buttons&&F,F=cp(n.get(),i.get())>=2,!(Ie&&K.button!==0)&&(Y(K.target)||(O=!0,a.pointerDown(K),u.useFriction(0).useDuration(0),n.set(i),_(),N=a.readPoint(K),H=a.readPoint(K,x),f.emit("pointerDown")))}function z(K){if(!AS(K,o)&&K.touches.length>=2)return ne(K);let J=a.readPoint(K),ie=a.readPoint(K,x),Ge=cp(J,N),Xe=cp(ie,H);if(!U&&!k&&(!K.cancelable||(U=Ge>Xe,!U)))return ne(K);let Lt=a.pointerMove(K);Ge>g&&(V=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(Lt)),K.preventDefault()}function ne(K){let J=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(K)*re(),Ge=X(w(ie),J),Xe=Lj(ie,Ge),Lt=A-10*Xe,Ne=h+Xe/50;U=!1,O=!1,I.clear(),u.useDuration(Lt).useFriction(Ne),l.distance(Ge,!m),k=!1,f.emit("pointerUp")}function he(K){V&&(K.stopPropagation(),K.preventDefault(),V=!1)}function xe(){return O}return{init:Z,destroy:ae,pointerDown:xe}}function Aj(e,t){let o,n;function a(d){return d.timeStamp}function i(d,f){let m=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(AS(d,t)?d:d.touches[0])[m]}function s(d){return o=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(o)>170;return n=d,p&&(o=d),f}function u(d){if(!o||!n)return 0;let f=i(n)-i(o),p=a(d)-a(o),m=a(d)-a(n)>170,g=f/p;return p&&!m&&ht(g)>.1?g:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function Dj(){function e(r){let{offsetTop:o,offsetLeft:n,offsetWidth:a,offsetHeight:i}=r;return{top:o,right:n+a,bottom:o+i,left:n,width:a,height:i}}return{measure:e}}function Nj(e){function t(o){return e*(o/100)}return{measure:t}}function Oj(e,t,r,o,n,a,i){let s=[e].concat(o),l,u,c=[],d=!1;function f(y){return n.measureSize(i.measure(y))}function p(y){if(!a)return;u=f(e),c=o.map(f);function h(v){for(let x of v){if(d)return;let w=x.target===e,C=o.indexOf(x.target),b=w?u:c[C],S=f(w?e:o[C]);if(ht(S-b)>=.5){y.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Pv(a)||a(y,v))&&h(v)}),r.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function m(){d=!0,l&&l.disconnect()}return{init:p,destroy:m}}function Fj(e,t,r,o,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let b=o.get()-e.get(),S=!l,I=0;return S?(i=0,r.set(o),e.set(o),I=b):(r.set(e),i+=b/l,i*=u,c+=i,e.add(i),I=c-d),s=NS(I),d=c,C}function p(){let b=o.get()-t.get();return ht(b)<.001}function m(){return l}function g(){return s}function y(){return i}function h(){return x(n)}function v(){return w(a)}function x(b){return l=b,C}function w(b){return u=b,C}let C={direction:g,duration:m,velocity:y,seek:f,settled:p,useBaseFriction:v,useBaseDuration:h,useFriction:w,useDuration:x};return C}function _j(e,t,r,o,n){let a=n.measure(10),i=n.measure(50),s=il(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let m=e.reachedMin(t.get())?"min":"max",g=ht(e[m]-t.get()),y=r.get()-t.get(),h=s.constrain(g/i);r.subtract(y*h),!p&&ht(y)<a&&(r.set(e.constrain(r.get())),o.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function Vj(e,t,r,o,n){let a=il(-t+e,0),i=d(),s=c(),l=f();function u(m,g){return cp(m,g)<=1}function c(){let m=i[0],g=hn(i),y=i.lastIndexOf(m),h=i.indexOf(g)+1;return il(y,h)}function d(){return r.map((m,g)=>{let{min:y,max:h}=a,v=a.constrain(m),x=!g,w=OS(r,g);return x?h:w||u(y,v)?y:u(h,v)?h:v}).map(m=>parseFloat(m.toFixed(3)))}function f(){if(t<=e+n)return[a.max];if(o==="keepSnaps")return i;let{min:m,max:g}=s;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:s}}function Bj(e,t,r){let o=t[0],n=r?o-e:hn(t);return{limit:il(n,o)}}function Hj(e,t,r,o){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=il(a,i);function u(f){return f===1?l(r.get()):f===-1?s(r.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);o.forEach(m=>m.add(p))}return{loop:c}}function Uj(e){let{max:t,length:r}=e;function o(a){let i=a-t;return r?i/-r:0}return{get:o}}function zj(e,t,r,o,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(o).map(g=>hn(g)[i]-g[0][a]).map(ht)}function f(){return o.map(g=>r[a]-g[a]).map(g=>-ht(g))}function p(){return s(u).map(g=>g[0]).map((g,y)=>g+l[y])}return{snaps:u,snapsAligned:c}}function Gj(e,t,r,o,n,a){let{groupSlides:i}=n,{min:s,max:l}=o,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return r.length===1?[a]:p?f:f.slice(s,l).map((m,g,y)=>{let h=!g,v=OS(y,g);if(h){let x=hn(y[0])+1;return HN(x)}if(v){let x=mp(a)-hn(y)[0]+1;return HN(x,hn(y)[0])}return m})}return{slideRegistry:u}}function Wj(e,t,r,o,n){let{reachedAny:a,removeOffset:i,constrain:s}=o;function l(m){return m.concat().sort((g,y)=>ht(g)-ht(y))[0]}function u(m){let g=e?i(m):s(m),y=t.map((v,x)=>({diff:c(v-g,0),index:x})).sort((v,x)=>ht(v.diff)-ht(x.diff)),{index:h}=y[0];return{index:h,distance:g}}function c(m,g){let y=[m,m+r,m-r];if(!e)return m;if(!g)return l(y);let h=y.filter(v=>NS(v)===g);return h.length?l(h):hn(y)-r}function d(m,g){let y=t[m]-n.get(),h=c(y,g);return{index:m,distance:h}}function f(m,g){let y=n.get()+m,{index:h,distance:v}=u(y),x=!e&&a(y);if(!g||x)return{index:h,distance:m};let w=t[h]-v,C=m+c(w,0);return{index:h,distance:C}}return{byDistance:f,byIndex:d,shortcut:c}}function qj(e,t,r,o,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(r.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,f){let p=n.byDistance(d,f);s(p)}function u(d,f){let p=t.clone().set(d),m=n.byIndex(p.get(),f);s(m)}return{distance:l,index:u}}function jj(e,t,r,o,n,a,i,s){let l={passive:!0,capture:!0},u=0;function c(p){if(!s)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;let v=r.findIndex(x=>x.includes(g));DS(v)&&(n.useDuration(0),o.index(v,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((g,y)=>{a.add(g,"focus",h=>{(Pv(s)||s(p,h))&&m(y)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function up(e){let t=e;function r(){return t}function o(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return DS(l)?l:l.get()}return{get:r,set:o,add:n,subtract:a}}function GN(e,t){let r=e.scroll==="x"?i:s,o=t.style,n=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function s(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(a)return;let p=Pj(e.direction(f));p!==n&&(o.transform=r(p),n=p)}function u(f){a=!f}function c(){a||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function $j(e,t,r,o,n,a,i,s,l){let c=dp(n),d=dp(n).reverse(),f=h().concat(v());function p(S,I){return S.reduce((T,P)=>T-n[P],I)}function m(S,I){return S.reduce((T,P)=>p(T,I)>0?T.concat([P]):T,[])}function g(S){return a.map((I,T)=>({start:I-o[T]+.5+S,end:I+t-.5+S}))}function y(S,I,T){let P=g(I);return S.map(M=>{let A=T?0:-r,F=T?r:0,N=T?"end":"start",H=P[M][N];return{index:M,loopPoint:H,slideLocation:up(-1),translate:GN(e,l[M]),target:()=>s.get()>H?A:F}})}function h(){let S=i[0],I=m(d,S);return y(I,r,!1)}function v(){let S=t-i[0]-1,I=m(c,S);return y(I,-r,!0)}function x(){return f.every(({index:S})=>{let I=c.filter(T=>T!==S);return p(I,t)<=.1})}function w(){f.forEach(S=>{let{target:I,translate:T,slideLocation:P}=S,M=I();M!==P.get()&&(T.to(M),P.set(M))})}function C(){f.forEach(S=>S.translate.clear())}return{canLoop:x,clear:C,loop:w,loopPoints:f}}function Kj(e,t,r){let o,n=!1;function a(l){if(!r)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{n||(Pv(r)||r(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),n=!0}return{init:a,destroy:i}}function Xj(e,t,r,o){let n={},a=null,i=null,s,l=!1;function u(){s=new IntersectionObserver(m=>{l||(m.forEach(g=>{let y=t.indexOf(g.target);n[y]=g}),a=null,i=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>s.observe(m))}function c(){s&&s.disconnect(),l=!0}function d(m){return fp(n).reduce((g,y)=>{let h=parseInt(y),{isIntersecting:v}=n[h];return(m&&v||!m&&!v)&&g.push(h),g},[])}function f(m=!0){if(m&&a)return a;if(!m&&i)return i;let g=d(m);return m&&(a=g),m||(i=g),g}return{init:u,destroy:c,get:f}}function Yj(e,t,r,o,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=r[0]&&n,c=m(),d=g(),f=r.map(i),p=y();function m(){if(!u)return 0;let v=r[0];return ht(t[s]-v[s])}function g(){if(!u)return 0;let v=a.getComputedStyle(hn(o));return parseFloat(v.getPropertyValue(`margin-${l}`))}function y(){return r.map((v,x,w)=>{let C=!x,b=OS(w,x);return C?f[x]+c:b?f[x]+d:w[x+1][s]-v[s]}).map(ht)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function Qj(e,t,r,o,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=DS(r);function p(h,v){return dp(h).filter(x=>x%v===0).map(x=>h.slice(x,x+v))}function m(h){return h.length?dp(h).reduce((v,x,w)=>{let C=hn(v)||0,b=C===0,S=x===mp(h),I=n[u]-a[C][u],T=n[u]-a[x][c],P=!o&&b?d(i):0,M=!o&&S?d(s):0,A=ht(T-M-(I+P));return w&&A>t+l&&v.push(x),S&&v.push(h.length),v},[]).map((v,x,w)=>{let C=Math.max(w[x-1]||0);return h.slice(C,v)}):[]}function g(h){return f?p(h,r):m(h)}return{groupSlides:g}}function Zj(e,t,r,o,n,a,i){let{align:s,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:g,slidesToScroll:y,skipSnaps:h,containScroll:v,watchResize:x,watchSlides:w,watchDrag:C,watchFocus:b}=a,S=2,I=Dj(),T=I.measure(t),P=r.map(I.measure),M=Mj(l,u),A=M.measureSize(T),F=Nj(A),N=Tj(s,A),H=!d&&!!v,O=d||!!v,{slideSizes:U,slideSizesWithGaps:V,startGap:k,endGap:Z}=Yj(M,T,P,r,O,n),ae=Qj(M,A,y,d,T,P,k,Z,S),{snaps:_,snapsAligned:Y}=zj(M,N,T,P,ae),re=-hn(_)+hn(V),{snapsContained:X,scrollContainLimit:ce}=Vj(A,re,Y,v,S),z=H?X:Y,{limit:ne}=Bj(re,z,d),he=zN(mp(z),c,d),xe=he.clone(),pe=dp(r),K=({dragHandler:Za,scrollBody:Fc,scrollBounds:_c,options:{loop:So}})=>{So||_c.constrain(Za.pointerDown()),Fc.seek()},Ie=({scrollBody:Za,translate:Fc,location:_c,offsetLocation:So,previousLocation:Vc,scrollLooper:iy,slideLooper:Z3,dragHandler:J3,animation:eU,eventHandler:EL,scrollBounds:tU,options:{loop:AL}},DL)=>{let NL=Za.settled(),rU=!tU.shouldConstrain(),OL=AL?NL:NL&&rU,FL=OL&&!J3.pointerDown();FL&&eU.stop();let oU=_c.get()*DL+Vc.get()*(1-DL);So.set(oU),AL&&(iy.loop(Za.direction()),Z3.loop()),Fc.to(So.get()),FL&&EL.emit("settle"),OL||EL.emit("scroll")},J=kj(o,n,()=>K(Al),Za=>Ie(Al,Za)),ie=.68,Ge=z[he.get()],Xe=up(Ge),Lt=up(Ge),Ne=up(Ge),St=up(Ge),Mn=Fj(Xe,Ne,Lt,St,f,ie),Rr=Wj(d,z,re,ne,St),Ko=qj(J,he,xe,Mn,Rr,St,i),Co=Uj(ne),Xo=pp(),En=Xj(t,r,i,g),{slideRegistry:An}=Gj(H,v,z,ce,ae,pe),fm=jj(e,r,An,Ko,Mn,Xo,i,b),Al={ownerDocument:o,ownerWindow:n,eventHandler:i,containerRect:T,slideRects:P,animation:J,axis:M,dragHandler:Ej(M,e,o,n,St,Aj(M,n),Xe,J,Ko,Mn,Rr,he,i,F,p,m,h,ie,C),eventStore:Xo,percentOfView:F,index:he,indexPrevious:xe,limit:ne,location:Xe,offsetLocation:Ne,previousLocation:Lt,options:a,resizeHandler:Oj(t,i,n,r,M,x,I),scrollBody:Mn,scrollBounds:_j(ne,Ne,St,Mn,F),scrollLooper:Hj(re,ne,Ne,[Xe,Ne,Lt,St]),scrollProgress:Co,scrollSnapList:z.map(Co.get),scrollSnaps:z,scrollTarget:Rr,scrollTo:Ko,slideLooper:$j(M,A,re,U,V,_,z,Ne,r),slideFocus:fm,slidesHandler:Kj(t,i,w),slidesInView:En,slideIndexes:pe,slideRegistry:An,slidesToScroll:ae,target:St,translate:GN(M,t)};return Al}function Jj(){let e={},t;function r(u){t=u}function o(u){return e[u]||[]}function n(u){return o(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function s(){e={}}let l={init:r,emit:n,off:i,on:a,clear:s};return l}var e8={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function t8(e){function t(a,i){return UN(a,i||{})}function r(a){let i=a.breakpoints||{},s=fp(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function o(a){return a.map(i=>fp(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:o}}function r8(e){let t=[];function r(a,i){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function o(){t=t.filter(a=>a.destroy())}return{init:r,destroy:o}}function gp(e,t,r){let o=e.ownerDocument,n=o.defaultView,a=t8(n),i=r8(a),s=pp(),l=Jj(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=l,g=M,y=!1,h,v=u(e8,gp.globalOptions),x=u(v),w=[],C,b,S;function I(){let{container:pe,slides:K}=x;b=(ES(pe)?e.querySelector(pe):pe)||e.children[0];let J=ES(K)?b.querySelectorAll(K):K;S=[].slice.call(J||b.children)}function T(pe){let K=Zj(e,b,S,o,n,pe,l);if(pe.loop&&!K.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return T(Ie)}return K}function P(pe,K){y||(v=u(v,pe),x=c(v),w=K||w,I(),h=T(x),d([v,...w.map(({options:Ie})=>Ie)]).forEach(Ie=>s.add(Ie,"change",M)),x.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(xe),h.eventHandler.init(xe),h.resizeHandler.init(xe),h.slidesHandler.init(xe),h.options.loop&&h.slideLooper.loop(),b.offsetParent&&S.length&&h.dragHandler.init(xe),C=i.init(xe,w)))}function M(pe,K){let Ie=ae();A(),P(u({startIndex:Ie},pe),K),l.emit("reInit")}function A(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),i.destroy(),s.clear()}function F(){y||(y=!0,s.clear(),A(),l.emit("destroy"),l.clear())}function N(pe,K,Ie){!x.active||y||(h.scrollBody.useBaseFriction().useDuration(K===!0?0:x.duration),h.scrollTo.index(pe,Ie||0))}function H(pe){let K=h.index.add(1).get();N(K,pe,-1)}function O(pe){let K=h.index.add(-1).get();N(K,pe,1)}function U(){return h.index.add(1).get()!==ae()}function V(){return h.index.add(-1).get()!==ae()}function k(){return h.scrollSnapList}function Z(){return h.scrollProgress.get(h.offsetLocation.get())}function ae(){return h.index.get()}function _(){return h.indexPrevious.get()}function Y(){return h.slidesInView.get()}function re(){return h.slidesInView.get(!1)}function X(){return C}function ce(){return h}function z(){return e}function ne(){return b}function he(){return S}let xe={canScrollNext:U,canScrollPrev:V,containerNode:ne,internalEngine:ce,destroy:F,off:p,on:f,emit:m,plugins:X,previousScrollSnap:_,reInit:g,rootNode:z,scrollNext:H,scrollPrev:O,scrollProgress:Z,scrollSnapList:k,scrollTo:N,selectedScrollSnap:ae,slideNodes:he,slidesInView:Y,slidesNotInView:re};return P(t,r),setTimeout(()=>l.emit("init"),0),xe}gp.globalOptions=void 0;function Tv(e={},t=[]){let r=(0,Fo.useRef)(e),o=(0,Fo.useRef)(t),[n,a]=(0,Fo.useState)(),[i,s]=(0,Fo.useState)(),l=(0,Fo.useCallback)(()=>{n&&n.reInit(r.current,o.current)},[n]);return(0,Fo.useEffect)(()=>{Lv(r.current,e)||(r.current=e,l())},[e,l]),(0,Fo.useEffect)(()=>{VN(o.current,t)||(o.current=t,l())},[t,l]),(0,Fo.useEffect)(()=>{if(_N()&&i){gp.globalOptions=Tv.globalOptions;let u=gp(i,r.current,o.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Tv.globalOptions=void 0;var fo=R(D()),WN=It.createContext(null);function uc(){let e=It.useContext(WN);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var FS=It.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,plugins:o,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Tv({...t,axis:l==="horizontal"?"x":"y"},o),[d,f]=It.useState(!1),[p,m]=It.useState(!1),g=It.useCallback(x=>{x&&(f(x.canScrollPrev()),m(x.canScrollNext()))},[]),y=It.useCallback(()=>{c?.scrollPrev()},[c]),h=It.useCallback(()=>{c?.scrollNext()},[c]),v=It.useCallback(x=>{let w=l==="horizontal"?"ArrowLeft":"ArrowUp",C=l==="horizontal"?"ArrowRight":"ArrowDown";x.key===w?(x.preventDefault(),y()):x.key===C&&(x.preventDefault(),h())},[l,y,h]);return It.useEffect(()=>{!c||!r||r(c)},[c,r]),It.useEffect(()=>{if(c)return g(c),c.on("reInit",g),c.on("select",g),()=>{c.off("reInit",g),c.off("select",g)}},[c,g]),(0,fo.jsx)(WN.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:y,scrollNext:h,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,fo.jsx)("div",{ref:s,onKeyDownCapture:v,className:L("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});FS.displayName="Carousel";var _S=te("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),VS=It.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=uc();return(0,fo.jsx)("div",{ref:o,className:"overflow-hidden",children:(0,fo.jsx)("div",{ref:r,className:L(_S({orientation:n}),e),...t})})});VS.displayName="CarouselContent";var BS=te("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),HS=It.forwardRef(({className:e,...t},r)=>{let{orientation:o}=uc();return(0,fo.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:L(BS({orientation:o}),e),...t})});HS.displayName="CarouselItem";var US=It.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=uc();return(0,fo.jsxs)(Fe,{ref:n,variant:t,size:r,rounded:"full",className:L("absolute",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...o,children:[(0,fo.jsx)(_d,{className:"h-4 w-4","aria-hidden":"true"}),(0,fo.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});US.displayName="CarouselPrevious";var zS=It.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=uc();return(0,fo.jsxs)(Fe,{ref:n,variant:t,size:r,rounded:"full",className:L("absolute",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...o,children:[(0,fo.jsx)(Vd,{className:"h-4 w-4","aria-hidden":"true"}),(0,fo.jsx)("span",{className:"sr-only",children:"Next slide"})]})});zS.displayName="CarouselNext";var vn=R(E());var Ar=R(E(),1);var kv=R(E(),1);function cc(e){let t=kv.useRef({value:e,previous:e});return kv.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var qN=R(E(),1);function dc(e){let[t,r]=qN.useState(void 0);return Ve(()=>{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 po=R(D(),1),Mv="Checkbox",[o8,yCe]=Oe(Mv),[n8,GS]=o8(Mv);function a8(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]=$e({prop:r,defaultProp:n??!1,onChange:l,caller:Mv}),[m,g]=Ar.useState(null),[y,h]=Ar.useState(null),v=Ar.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:m,setControl:g,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:Gi(n)?!1:n,isFormControl:x,bubbleInput:y,setBubbleInput:h};return(0,po.jsx)(n8,{scope:t,...w,children:i8(d)?d(w):o})}var jN="CheckboxTrigger",$N=Ar.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:m}=GS(jN,e),g=de(n,c),y=Ar.useRef(l);return Ar.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(y.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,po.jsx)($.button,{type:"button",role:"checkbox","aria-checked":Gi(l)?"mixed":l,"aria-required":u,"data-state":QN(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:g,onKeyDown:W(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:W(r,h=>{d(v=>Gi(v)?!0:!v),m&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});$N.displayName=jN;var Ev=Ar.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,po.jsx)(a8,{__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,po.jsxs)(po.Fragment,{children:[(0,po.jsx)($N,{...d,ref:t,__scopeCheckbox:r}),f&&(0,po.jsx)(YN,{__scopeCheckbox:r})]})})});Ev.displayName=Mv;var KN="CheckboxIndicator",WS=Ar.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=GS(KN,r);return(0,po.jsx)(lt,{present:o||Gi(a.checked)||a.checked===!0,children:(0,po.jsx)($.span,{"data-state":QN(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});WS.displayName=KN;var XN="CheckboxBubbleInput",YN=Ar.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}=GS(XN,e),m=de(r,p),g=cc(a),y=dc(o);Ar.useEffect(()=>{let v=f;if(!v)return;let x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,b=!n.current;if(g!==a&&C){let S=new Event("click",{bubbles:b});v.indeterminate=Gi(a),C.call(v,Gi(a)?!1:a),v.dispatchEvent(S)}},[f,g,a,n]);let h=Ar.useRef(Gi(a)?!1:a);return(0,po.jsx)($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??h.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});YN.displayName=XN;function i8(e){return typeof e=="function"}function Gi(e){return e==="indeterminate"}function QN(e){return Gi(e)?"indeterminate":e?"checked":"unchecked"}var _o=R(D()),l8=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"}}),Av=vn.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>{let[c,d]=vn.useState(a);return vn.useEffect(()=>{d(a)},[a]),(0,_o.jsx)(Ev,{ref:u,checked:c?!1:s,className:L("moonui-theme",l8({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,_o.jsx)(WS,{className:L("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,_o.jsx)(ef,{className:"h-[65%] w-[65%]"}):i||(0,_o.jsx)(dr,{className:"h-[65%] w-[65%]"})})})});Av.displayName=Ev.displayName;var qS=vn.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,_o.jsx)("div",{ref:a,className:L("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));qS.displayName="CheckboxGroup";var hp=vn.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,_o.jsx)("label",{ref:i,htmlFor:t,className:L("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}));hp.displayName="CheckboxLabel";var jS=vn.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=vn.useId(),s=e||i;return(0,_o.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,_o.jsx)(hp,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,_o.jsx)(Av,{ref:a,id:s,...n}),r==="end"&&(0,_o.jsx)(hp,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});jS.displayName="CheckboxWithLabel";var KS=R(E());var sl=R(D()),ZN=Ug,$S=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"}}),XS=KS.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,sl.jsx)(du,{ref:i,className:L("moonui-theme",$S({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,sl.jsxs)(du,{ref:i,className:L("moonui-theme",$S({variant:r,size:o}),e),...a,children:[t,(0,sl.jsx)(zn,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));XS.displayName=du.displayName;var JN=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"}}),YS=KS.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,sl.jsx)(Ed,{ref:a,className:L("moonui-theme",JN({variant:r,size:o}),e),...n,children:(0,sl.jsx)("div",{className:"p-4",children:t})}));YS.displayName=Ed.displayName;var Go=R(E());var ll=R(E());var mo=R(D()),u8=te("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),c8=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-800/80 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 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 dark:bg-transparent"},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}}),rr=ll.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,label:m,floatingLabel:g=!1,floatingLabelClassName:y,value:h,defaultValue:v,onChange:x,onFocus:w,onBlur:C,placeholder:b,...S},I)=>{let[T,P]=ll.useState(!1),[M,A]=ll.useState(h||v||""),N=T||M!==""&&M!==null&&M!==void 0,H=Z=>{P(!0),w?.(Z)},O=Z=>{P(!1),C?.(Z)},U=Z=>{A(Z.target.value),x?.(Z)};ll.useEffect(()=>{h!==void 0&&A(h)},[h]);let V=p||s||l,k=s?"error":l?"success":"normal";return(0,mo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,mo.jsxs)("div",{className:L("moonui-theme",u8({size:n}),t),children:[g&&m&&(0,mo.jsx)("label",{htmlFor:S.id,className:L("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",N?"top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1":"top-1/2 -translate-y-1/2 text-sm",T&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",y),children:m}),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)(Ot,{className:"h-4 w-4 animate-spin"}):c}),(0,mo.jsx)("input",{className:L(c8({variant:o,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:I,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?`${S.id||""}-error`:l?`${S.id||""}-success`:void 0,value:h,defaultValue:v,onChange:U,onFocus:H,onBlur:O,placeholder:g?N?b:"":b,...S}),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)(Ot,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),V&&(0,mo.jsx)("p",{className:L("text-xs transition-all",k==="error"&&"text-error",k==="success"&&"text-success",k==="normal"&&"text-muted-foreground",r),id:s?`${S.id||""}-error`:l?`${S.id||""}-success`:void 0,children:s||l||""})]})});rr.displayName="Input";var o2=R(E());var e2=R(E(),1);var t2=R(D(),1),d8="Label",r2=e2.forwardRef((e,t)=>(0,t2.jsx)($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));r2.displayName=d8;var QS=r2;var n2=R(D()),p8=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"),Dr=o2.forwardRef(({className:e,...t},r)=>(0,n2.jsx)(QS,{ref:r,className:L(p8(),e),...t}));Dr.displayName=QS.displayName;var mF=R(E());var ct=R(E(),1);var vt=R(E(),1);var a2=R(E(),1);function i2(e,t=globalThis?.document){let r=nt(e);a2.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 JS=R(D(),1),m8="DismissableLayer",ZS="dismissableLayer.update",g8="dismissableLayer.pointerDownOutside",h8="dismissableLayer.focusOutside",s2,u2=vt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vo=vt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=vt.useContext(u2),[c,d]=vt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=vt.useState({}),m=de(t,S=>d(S)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=g.indexOf(y),v=c?g.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=h,C=x8(S=>{let I=S.target,T=[...u.branches].some(P=>P.contains(I));!w||T||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=y8(S=>{let I=S.target;[...u.branches].some(P=>P.contains(I))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return i2(S=>{v===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),vt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(s2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),l2(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=s2)}},[c,f,r,u]),vt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),l2())},[c,u]),vt.useEffect(()=>{let S=()=>p({});return document.addEventListener(ZS,S),()=>document.removeEventListener(ZS,S)},[]),(0,JS.jsx)($.div,{...l,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,b.onFocusCapture),onBlurCapture:W(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,C.onPointerDownCapture)})});Vo.displayName=m8;var v8="DismissableLayerBranch",c2=vt.forwardRef((e,t)=>{let r=vt.useContext(u2),o=vt.useRef(null),n=de(t,o);return vt.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,JS.jsx)($.div,{...e,ref:n})});c2.displayName=v8;function x8(e,t=globalThis?.document){let r=nt(e),o=vt.useRef(!1),n=vt.useRef(()=>{});return vt.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){d2(g8,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 y8(e,t=globalThis?.document){let r=nt(e),o=vt.useRef(!1);return vt.useEffect(()=>{let n=a=>{a.target&&!o.current&&d2(h8,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 l2(){let e=new CustomEvent(ZS);document.dispatchEvent(e)}function d2(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?cu(n,a):n.dispatchEvent(a)}var f2=Vo,p2=c2;var g2=R(E(),1),eb=0;function Wi(){g2.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??m2()),document.body.insertAdjacentElement("beforeend",e[1]??m2()),eb++,()=>{eb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),eb--}},[])}function m2(){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 Bo=R(E(),1);var w2=R(D(),1),tb="focusScope.autoFocusOnMount",rb="focusScope.autoFocusOnUnmount",h2={bubbles:!1,cancelable:!0},C8="FocusScope",Fa=Bo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Bo.useState(null),u=nt(n),c=nt(a),d=Bo.useRef(null),f=de(t,g=>l(g)),p=Bo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Bo.useEffect(()=>{if(o){let v=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:qi(d.current,{select:!0})},x=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||qi(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let I of b)I.removedNodes.length>0&&qi(s)};var g=v,y=x,h=w;document.addEventListener("focusin",v),document.addEventListener("focusout",x);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),C.disconnect()}}},[o,s,p.paused]),Bo.useEffect(()=>{if(s){x2.add(p);let g=document.activeElement;if(!s.contains(g)){let h=new CustomEvent(tb,h2);s.addEventListener(tb,u),s.dispatchEvent(h),h.defaultPrevented||(S8(P8(C2(s)),{select:!0}),document.activeElement===g&&qi(s))}return()=>{s.removeEventListener(tb,u),setTimeout(()=>{let h=new CustomEvent(rb,h2);s.addEventListener(rb,c),s.dispatchEvent(h),h.defaultPrevented||qi(g??document.body,{select:!0}),s.removeEventListener(rb,c),x2.remove(p)},0)}}},[s,u,c,p]);let m=Bo.useCallback(g=>{if(!r&&!o||p.paused)return;let y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,h=document.activeElement;if(y&&h){let v=g.currentTarget,[x,w]=b8(v);x&&w?!g.shiftKey&&h===w?(g.preventDefault(),r&&qi(x,{select:!0})):g.shiftKey&&h===x&&(g.preventDefault(),r&&qi(w,{select:!0})):h===v&&g.preventDefault()}},[r,o,p.paused]);return(0,w2.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});Fa.displayName=C8;function S8(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(qi(o,{select:t}),document.activeElement!==r)return}function b8(e){let t=C2(e),r=v2(t,e),o=v2(t.reverse(),e);return[r,o]}function C2(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 v2(e,t){for(let r of e)if(!R8(r,{upTo:t}))return r}function R8(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 I8(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&I8(e)&&t&&e.select()}}var x2=L8();function L8(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=y2(e,t),e.unshift(t)},remove(t){e=y2(e,t),e[0]?.resume()}}}function y2(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function P8(e){return e.filter(t=>t.tagName!=="A")}var Zr=R(E(),1);var R2=["top","right","bottom","left"];var Qn=Math.min,Nr=Math.max,xp=Math.round,yp=Math.floor,xn=e=>({x:e,y:e}),T8={left:"right",right:"left",bottom:"top",top:"bottom"},k8={start:"end",end:"start"};function Nv(e,t,r){return Nr(e,Qn(t,r))}function Zn(e,t){return typeof e=="function"?e(t):e}function Jn(e){return e.split("-")[0]}function ul(e){return e.split("-")[1]}function Ov(e){return e==="x"?"y":"x"}function Fv(e){return e==="y"?"height":"width"}var M8=new Set(["top","bottom"]);function yn(e){return M8.has(Jn(e))?"y":"x"}function _v(e){return Ov(yn(e))}function I2(e,t,r){r===void 0&&(r=!1);let o=ul(e),n=_v(e),a=Fv(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=vp(i)),[i,vp(i)]}function L2(e){let t=vp(e);return[Dv(e),t,Dv(t)]}function Dv(e){return e.replace(/start|end/g,t=>k8[t])}var S2=["left","right"],b2=["right","left"],E8=["top","bottom"],A8=["bottom","top"];function D8(e,t,r){switch(e){case"top":case"bottom":return r?t?b2:S2:t?S2:b2;case"left":case"right":return t?E8:A8;default:return[]}}function P2(e,t,r,o){let n=ul(e),a=D8(Jn(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Dv)))),a}function vp(e){return e.replace(/left|right|bottom|top/g,t=>T8[t])}function N8(e){return{top:0,right:0,bottom:0,left:0,...e}}function ob(e){return typeof e!="number"?N8(e):{top:e,right:e,bottom:e,left:e}}function cl(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 T2(e,t,r){let{reference:o,floating:n}=e,a=yn(t),i=_v(t),s=Fv(i),l=Jn(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(ul(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var E2=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}=T2(u,o,l),f=o,p={},m=0;for(let g=0;g<s.length;g++){let{name:y,fn:h}=s[g],{x:v,y:x,data:w,reset:C}=await h({x:c,y:d,initialPlacement:o,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=v??c,d=x??d,p={...p,[y]:{...p[y],...w}},C&&m<=50&&(m++,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}=T2(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function fc(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}=Zn(t,e),m=ob(p),y=s[f?d==="floating"?"reference":"floating":d],h=cl(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},C=cl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:l}):v);return{top:(h.top-C.top+m.top)/w.y,bottom:(C.bottom-h.bottom+m.bottom)/w.y,left:(h.left-C.left+m.left)/w.x,right:(C.right-h.right+m.right)/w.x}}var A2=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}=Zn(e,t)||{};if(u==null)return{};let d=ob(c),f={x:r,y:o},p=_v(n),m=Fv(p),g=await i.getDimensions(u),y=p==="y",h=y?"top":"left",v=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],C=f[p]-a.reference[p],b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),S=b?b[x]:0;(!S||!await(i.isElement==null?void 0:i.isElement(b)))&&(S=s.floating[x]||a.floating[m]);let I=w/2-C/2,T=S/2-g[m]/2-1,P=Qn(d[h],T),M=Qn(d[v],T),A=P,F=S-g[m]-M,N=S/2-g[m]/2+I,H=Nv(A,N,F),O=!l.arrow&&ul(n)!=null&&N!==H&&a.reference[m]/2-(N<A?P:M)-g[m]/2<0,U=O?N<A?N-A:N-F:0;return{[p]:f[p]+U,data:{[p]:H,centerOffset:N-H-U,...O&&{alignmentOffset:U}},reset:O}}});var D2=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:m="none",flipAlignment:g=!0,...y}=Zn(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let h=Jn(n),v=yn(s),x=Jn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(x||!g?[vp(s)]:L2(s)),b=m!=="none";!f&&b&&C.push(...P2(s,g,m,w));let S=[s,...C],I=await fc(t,y),T=[],P=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&T.push(I[h]),d){let N=I2(n,i,w);T.push(I[N[0]],I[N[1]])}if(P=[...P,{placement:n,overflows:T}],!T.every(N=>N<=0)){var M,A;let N=(((M=a.flip)==null?void 0:M.index)||0)+1,H=S[N];if(H&&(!(d==="alignment"?v!==yn(H):!1)||P.every(V=>yn(V.placement)===v?V.overflows[0]>0:!0)))return{data:{index:N,overflows:P},reset:{placement:H}};let O=(A=P.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:A.placement;if(!O)switch(p){case"bestFit":{var F;let U=(F=P.filter(V=>{if(b){let k=yn(V.placement);return k===v||k==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(k=>k>0).reduce((k,Z)=>k+Z,0)]).sort((V,k)=>V[1]-k[1])[0])==null?void 0:F[0];U&&(O=U);break}case"initialPlacement":O=s;break}if(n!==O)return{reset:{placement:O}}}return{}}}};function k2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function M2(e){return R2.some(t=>e[t]>=0)}var N2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=Zn(e,t);switch(o){case"referenceHidden":{let a=await fc(t,{...n,elementContext:"reference"}),i=k2(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:M2(i)}}}case"escaped":{let a=await fc(t,{...n,altBoundary:!0}),i=k2(a,r.floating);return{data:{escapedOffsets:i,escaped:M2(i)}}}default:return{}}}}};var O2=new Set(["left","top"]);async function O8(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=Jn(r),s=ul(r),l=yn(r)==="y",u=O2.has(i)?-1:1,c=a&&l?-1:1,d=Zn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var F2=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 O8(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}}}}},_2=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:y=>{let{x:h,y:v}=y;return{x:h,y:v}}},...l}=Zn(e,t),u={x:r,y:o},c=await fc(t,l),d=yn(Jn(n)),f=Ov(d),p=u[f],m=u[d];if(a){let y=f==="y"?"top":"left",h=f==="y"?"bottom":"right",v=p+c[y],x=p-c[h];p=Nv(v,p,x)}if(i){let y=d==="y"?"top":"left",h=d==="y"?"bottom":"right",v=m+c[y],x=m-c[h];m=Nv(v,m,x)}let g=s.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-r,y:g.y-o,enabled:{[f]:a,[d]:i}}}}}},V2=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}=Zn(e,t),c={x:r,y:o},d=yn(n),f=Ov(d),p=c[f],m=c[d],g=Zn(s,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){let x=f==="y"?"height":"width",w=a.reference[f]-a.floating[x]+y.mainAxis,C=a.reference[f]+a.reference[x]-y.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var h,v;let x=f==="y"?"width":"height",w=O2.has(Jn(n)),C=a.reference[d]-a.floating[x]+(w&&((h=i.offset)==null?void 0:h[d])||0)+(w?0:y.crossAxis),b=a.reference[d]+a.reference[x]+(w?0:((v=i.offset)==null?void 0:v[d])||0)-(w?y.crossAxis:0);m<C?m=C:m>b&&(m=b)}return{[f]:p,[d]:m}}}},B2=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}=Zn(e,t),c=await fc(t,u),d=Jn(n),f=ul(n),p=yn(n)==="y",{width:m,height:g}=a.floating,y,h;d==="top"||d==="bottom"?(y=d,h=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=d,y=f==="end"?"top":"bottom");let v=g-c.top-c.bottom,x=m-c.left-c.right,w=Qn(g-c[y],v),C=Qn(m-c[h],x),b=!t.middlewareData.shift,S=w,I=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=v),b&&!f){let P=Nr(c.left,0),M=Nr(c.right,0),A=Nr(c.top,0),F=Nr(c.bottom,0);p?I=m-2*(P!==0||M!==0?P+M:Nr(c.left,c.right)):S=g-2*(A!==0||F!==0?A+F:Nr(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:S});let T=await i.getDimensions(s.floating);return m!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function Vv(){return typeof window<"u"}function fl(e){return U2(e)?(e.nodeName||"").toLowerCase():"#document"}function Qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wn(e){var t;return(t=(U2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function U2(e){return Vv()?e instanceof Node||e instanceof Qr(e).Node:!1}function Ho(e){return Vv()?e instanceof Element||e instanceof Qr(e).Element:!1}function Cn(e){return Vv()?e instanceof HTMLElement||e instanceof Qr(e).HTMLElement:!1}function H2(e){return!Vv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qr(e).ShadowRoot}var F8=new Set(["inline","contents"]);function pc(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!F8.has(n)}var _8=new Set(["table","td","th"]);function z2(e){return _8.has(fl(e))}var V8=[":popover-open",":modal"];function wp(e){return V8.some(t=>{try{return e.matches(t)}catch{return!1}})}var B8=["transform","translate","scale","rotate","perspective"],H8=["transform","translate","scale","rotate","perspective","filter"],U8=["paint","layout","strict","content"];function Bv(e){let t=Hv(),r=Ho(e)?Uo(e):e;return B8.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)||H8.some(o=>(r.willChange||"").includes(o))||U8.some(o=>(r.contain||"").includes(o))}function G2(e){let t=_a(e);for(;Cn(t)&&!pl(t);){if(Bv(t))return t;if(wp(t))return null;t=_a(t)}return null}function Hv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var z8=new Set(["html","body","#document"]);function pl(e){return z8.has(fl(e))}function Uo(e){return Qr(e).getComputedStyle(e)}function Cp(e){return Ho(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _a(e){if(fl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||H2(e)&&e.host||wn(e);return H2(t)?t.host:t}function W2(e){let t=_a(e);return pl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cn(t)&&pc(t)?t:W2(t)}function dl(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=W2(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=Qr(n);if(a){let s=Uv(i);return t.concat(i,i.visualViewport||[],pc(n)?n:[],s&&r?dl(s):[])}return t.concat(n,dl(n,[],r))}function Uv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K2(e){let t=Uo(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Cn(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=xp(r)!==a||xp(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function ab(e){return Ho(e)?e:e.contextElement}function mc(e){let t=ab(e);if(!Cn(t))return xn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=K2(t),i=(a?xp(r.width):r.width)/o,s=(a?xp(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var G8=xn(0);function X2(e){let t=Qr(e);return!Hv()||!t.visualViewport?G8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function W8(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Qr(e)?!1:t}function ml(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=ab(e),i=xn(1);t&&(o?Ho(o)&&(i=mc(o)):i=mc(e));let s=W8(a,r,o)?X2(a):xn(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&&Ho(o)?Qr(o):o,m=f,g=Uv(m);for(;g&&o&&p!==m;){let y=mc(g),h=g.getBoundingClientRect(),v=Uo(g),x=h.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,w=h.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=x,u+=w,m=Qr(g),g=Uv(m)}}return cl({width:c,height:d,x:l,y:u})}function zv(e,t){let r=Cp(e).scrollLeft;return t?t.left+r:ml(wn(e)).left+r}function Y2(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-zv(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function q8(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=wn(o),s=t?wp(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=xn(1),c=xn(0),d=Cn(o);if((d||!d&&!a)&&((fl(o)!=="body"||pc(i))&&(l=Cp(o)),Cn(o))){let p=ml(o);u=mc(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?Y2(i,l):xn(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 j8(e){return Array.from(e.getClientRects())}function $8(e){let t=wn(e),r=Cp(e),o=e.ownerDocument.body,n=Nr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Nr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+zv(e),s=-r.scrollTop;return Uo(o).direction==="rtl"&&(i+=Nr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var q2=25;function K8(e,t){let r=Qr(e),o=wn(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Hv();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=zv(o);if(u<=0){let c=o.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=q2&&(a-=m)}else u<=q2&&(a+=u);return{width:a,height:i,x:s,y:l}}var X8=new Set(["absolute","fixed"]);function Y8(e,t){let r=ml(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=Cn(e)?mc(e):xn(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 j2(e,t,r){let o;if(t==="viewport")o=K8(e,r);else if(t==="document")o=$8(wn(e));else if(Ho(t))o=Y8(t,r);else{let n=X2(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cl(o)}function Q2(e,t){let r=_a(e);return r===t||!Ho(r)||pl(r)?!1:Uo(r).position==="fixed"||Q2(r,t)}function Q8(e,t){let r=t.get(e);if(r)return r;let o=dl(e,[],!1).filter(s=>Ho(s)&&fl(s)!=="body"),n=null,a=Uo(e).position==="fixed",i=a?_a(e):e;for(;Ho(i)&&!pl(i);){let s=Uo(i),l=Bv(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&X8.has(n.position)||pc(i)&&!l&&Q2(e,i))?o=o.filter(c=>c!==i):n=s,i=_a(i)}return t.set(e,o),o}function Z8(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?wp(t)?[]:Q8(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=j2(t,c,n);return u.top=Nr(d.top,u.top),u.right=Qn(d.right,u.right),u.bottom=Qn(d.bottom,u.bottom),u.left=Nr(d.left,u.left),u},j2(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function J8(e){let{width:t,height:r}=K2(e);return{width:t,height:r}}function e$(e,t,r){let o=Cn(t),n=wn(t),a=r==="fixed",i=ml(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=xn(0);function u(){l.x=zv(n)}if(o||!o&&!a)if((fl(t)!=="body"||pc(n))&&(s=Cp(t)),o){let p=ml(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?Y2(n,s):xn(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 nb(e){return Uo(e).position==="static"}function $2(e,t){if(!Cn(e)||Uo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return wn(e)===r&&(r=r.ownerDocument.body),r}function Z2(e,t){let r=Qr(e);if(wp(e))return r;if(!Cn(e)){let n=_a(e);for(;n&&!pl(n);){if(Ho(n)&&!nb(n))return n;n=_a(n)}return r}let o=$2(e,t);for(;o&&z2(o)&&nb(o);)o=$2(o,t);return o&&pl(o)&&nb(o)&&!Bv(o)?r:o||G2(e)||r}var t$=async function(e){let t=this.getOffsetParent||Z2,r=this.getDimensions,o=await r(e.floating);return{reference:e$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function r$(e){return Uo(e).direction==="rtl"}var J2={convertOffsetParentRelativeRectToViewportRelativeRect:q8,getDocumentElement:wn,getClippingRect:Z8,getOffsetParent:Z2,getElementRects:t$,getClientRects:j8,getDimensions:J8,getScale:mc,isElement:Ho,isRTL:r$};function eO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o$(e,t){let r=null,o,n=wn(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 m=yp(d),g=yp(n.clientWidth-(c+f)),y=yp(n.clientHeight-(d+p)),h=yp(c),x={rootMargin:-m+"px "+-g+"px "+-y+"px "+-h+"px",threshold:Nr(0,Qn(1,l))||1},w=!0;function C(b){let S=b[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!eO(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(C,{...x,root:n.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return i(!0),a}function ib(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=ab(e),c=n||a?[...u?dl(u):[],...dl(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",r,{passive:!0}),a&&h.addEventListener("resize",r)});let d=u&&s?o$(u,r):null,f=-1,p=null;i&&(p=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let m,g=l?ml(e):null;l&&y();function y(){let h=ml(e);g&&!eO(g,h)&&r(),g=h,m=requestAnimationFrame(y)}return r(),()=>{var h;c.forEach(v=>{n&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),d?.(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var tO=F2;var rO=_2,oO=D2,nO=B2,aO=N2,sb=A2;var iO=V2,lb=(e,t,r)=>{let o=new Map,n={platform:J2,...r},a={...n.platform,_c:o};return E2(e,t,{...n,platform:a})};var Tt=R(E(),1),lO=R(E(),1),uO=R(Ci(),1),n$=typeof document<"u",a$=function(){},Gv=n$?lO.useLayoutEffect:a$;function Wv(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(!Wv(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)&&!Wv(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function cO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sO(e,t){let r=cO(e);return Math.round(t*r)/r}function ub(e){let t=Tt.useRef(e);return Gv(()=>{t.current=e}),t}function dO(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]=Tt.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Tt.useState(o);Wv(f,o)||p(o);let[m,g]=Tt.useState(null),[y,h]=Tt.useState(null),v=Tt.useCallback(V=>{V!==b.current&&(b.current=V,g(V))},[]),x=Tt.useCallback(V=>{V!==S.current&&(S.current=V,h(V))},[]),w=a||m,C=i||y,b=Tt.useRef(null),S=Tt.useRef(null),I=Tt.useRef(c),T=l!=null,P=ub(l),M=ub(n),A=ub(u),F=Tt.useCallback(()=>{if(!b.current||!S.current)return;let V={placement:t,strategy:r,middleware:f};M.current&&(V.platform=M.current),lb(b.current,S.current,V).then(k=>{let Z={...k,isPositioned:A.current!==!1};N.current&&!Wv(I.current,Z)&&(I.current=Z,uO.flushSync(()=>{d(Z)}))})},[f,t,r,M,A]);Gv(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[u]);let N=Tt.useRef(!1);Gv(()=>(N.current=!0,()=>{N.current=!1}),[]),Gv(()=>{if(w&&(b.current=w),C&&(S.current=C),w&&C){if(P.current)return P.current(w,C,F);F()}},[w,C,F,P,T]);let H=Tt.useMemo(()=>({reference:b,floating:S,setReference:v,setFloating:x}),[v,x]),O=Tt.useMemo(()=>({reference:w,floating:C}),[w,C]),U=Tt.useMemo(()=>{let V={position:r,left:0,top:0};if(!O.floating)return V;let k=sO(O.floating,c.x),Z=sO(O.floating,c.y);return s?{...V,transform:"translate("+k+"px, "+Z+"px)",...cO(O.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:Z}},[r,s,O.floating,c.x,c.y]);return Tt.useMemo(()=>({...c,update:F,refs:H,elements:O,floatingStyles:U}),[c,F,H,O,U])}var i$=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?sb({element:o.current,padding:n}).fn(r):{}:o?sb({element:o,padding:n}).fn(r):{}}}},fO=(e,t)=>({...tO(e),options:[e,t]}),pO=(e,t)=>({...rO(e),options:[e,t]}),mO=(e,t)=>({...iO(e),options:[e,t]}),gO=(e,t)=>({...oO(e),options:[e,t]}),hO=(e,t)=>({...nO(e),options:[e,t]});var vO=(e,t)=>({...aO(e),options:[e,t]});var xO=(e,t)=>({...i$(e),options:[e,t]});var yO=R(E(),1);var cb=R(D(),1),s$="Arrow",wO=yO.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,cb.jsx)($.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,cb.jsx)("polygon",{points:"0,0 30,0 15,10"})})});wO.displayName=s$;var CO=wO;var ji=R(D(),1);var db="Popper",[SO,zo]=Oe(db),[u$,bO]=SO(db),RO=e=>{let{__scopePopper:t,children:r}=e,[o,n]=Zr.useState(null);return(0,ji.jsx)(u$,{scope:t,anchor:o,onAnchorChange:n,children:r})};RO.displayName=db;var IO="PopperAnchor",LO=Zr.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=bO(IO,r),i=Zr.useRef(null),s=de(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,ji.jsx)($.div,{...n,ref:s})});LO.displayName=IO;var fb="PopperContent",[c$,d$]=SO(fb),PO=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:m,...g}=e,y=bO(fb,r),[h,v]=Zr.useState(null),x=de(t,z=>v(z)),[w,C]=Zr.useState(null),b=dc(w),S=b?.width??0,I=b?.height??0,T=o+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},M=Array.isArray(u)?u:[u],A=M.length>0,F={padding:P,boundary:M.filter(p$),altBoundary:A},{refs:N,floatingStyles:H,placement:O,isPositioned:U,middlewareData:V}=dO({strategy:"fixed",placement:T,whileElementsMounted:(...z)=>ib(...z,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[fO({mainAxis:n+I,alignmentAxis:i}),l&&pO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?mO():void 0,...F}),l&&gO({...F}),hO({...F,apply:({elements:z,rects:ne,availableWidth:he,availableHeight:xe})=>{let{width:pe,height:K}=ne.reference,Ie=z.floating.style;Ie.setProperty("--radix-popper-available-width",`${he}px`),Ie.setProperty("--radix-popper-available-height",`${xe}px`),Ie.setProperty("--radix-popper-anchor-width",`${pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${K}px`)}}),w&&xO({element:w,padding:s}),m$({arrowWidth:S,arrowHeight:I}),f&&vO({strategy:"referenceHidden",...F})]}),[k,Z]=MO(O),ae=nt(m);Ve(()=>{U&&ae?.()},[U,ae]);let _=V.arrow?.x,Y=V.arrow?.y,re=V.arrow?.centerOffset!==0,[X,ce]=Zr.useState();return Ve(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,ji.jsx)("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:U?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ji.jsx)(c$,{scope:r,placedSide:k,onArrowChange:C,arrowX:_,arrowY:Y,shouldHideArrow:re,children:(0,ji.jsx)($.div,{"data-side":k,"data-align":Z,...g,ref:x,style:{...g.style,animation:U?void 0:"none"}})})})});PO.displayName=fb;var TO="PopperArrow",f$={top:"bottom",right:"left",bottom:"top",left:"right"},kO=Zr.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=d$(TO,o),i=f$[a.placedSide];return(0,ji.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,ji.jsx)(CO,{...n,ref:r,style:{...n.style,display:"block"}})})});kO.displayName=TO;function p$(e){return e!==null}var m$=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]=MO(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,m="",g="";return u==="bottom"?(m=i?d:`${f}px`,g=`${-l}px`):u==="top"?(m=i?d:`${f}px`,g=`${o.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=i?d:`${p}px`):u==="left"&&(m=`${o.floating.width+l}px`,g=i?d:`${p}px`),{data:{x:m,y:g}}}});function MO(e){let[t,r="center"]=e.split("-");return[t,r]}var Va=RO,Ba=LO,$i=PO,Ki=kO;var jv=R(E(),1),EO=R(Ci(),1);var AO=R(D(),1),g$="Portal",go=jv.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=jv.useState(!1);Ve(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?EO.default.createPortal((0,AO.jsx)($.div,{...o,ref:t}),i):null});go.displayName=g$;var h$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gc=new WeakMap,$v=new WeakMap,Kv={},pb=0,DO=function(e){return e&&(e.host||DO(e.parentNode))},v$=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=DO(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})},x$=function(e,t,r,o){var n=v$(t,Array.isArray(e)?e:[e]);Kv[r]||(Kv[r]=new WeakMap);var a=Kv[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),m=p!==null&&p!=="false",g=(gc.get(f)||0)+1,y=(a.get(f)||0)+1;gc.set(f,g),a.set(f,y),i.push(f),g===1&&m&&$v.set(f,!0),y===1&&f.setAttribute(r,"true"),m||f.setAttribute(o,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(t),s.clear(),pb++,function(){i.forEach(function(d){var f=gc.get(d)-1,p=a.get(d)-1;gc.set(d,f),a.set(d,p),f||($v.has(d)||d.removeAttribute(o),$v.delete(d)),p||d.removeAttribute(r)}),pb--,pb||(gc=new WeakMap,gc=new WeakMap,$v=new WeakMap,Kv={})}},Xi=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||h$(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),x$(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 Xv(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 NO(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 ex=R(E());var vr=R(E());var gl="right-scroll-bar-position",hl="width-before-scroll-bar",mb="with-scroll-bars-hidden",gb="--removed-body-scroll-bar-size";function Yv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var OO=R(E());function FO(e,t){var r=(0,OO.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 Qv=R(E());var y$=typeof window<"u"?Qv.useLayoutEffect:Qv.useEffect,_O=new WeakMap;function hb(e,t){var r=FO(t||null,function(o){return e.forEach(function(n){return Yv(n,o)})});return y$(function(){var o=_O.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Yv(s,null)}),a.forEach(function(s){n.has(s)||Yv(s,i)})}_O.set(r,e)},[e]),r}function w$(e){return e}function C$(e,t){t===void 0&&(t=w$);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 vb(e){e===void 0&&(e={});var t=C$(null);return t.options=Jr({async:!0,ssr:!1},e),t}var VO=R(E()),BO=function(e){var t=e.sideCar,r=Xv(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 VO.createElement(o,Jr({},r))};BO.isSideCarExport=!0;function xb(e,t){return e.useMedium(t),BO}var Zv=vb();var yb=function(){},Sp=vr.forwardRef(function(e,t){var r=vr.useRef(null),o=vr.useState({onScrollCapture:yb,onWheelCapture:yb,onTouchMoveCapture:yb}),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,m=e.noIsolation,g=e.inert,y=e.allowPinchZoom,h=e.as,v=h===void 0?"div":h,x=e.gapMode,w=Xv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=hb([r,t]),S=Jr(Jr({},w),n);return vr.createElement(vr.Fragment,null,c&&vr.createElement(C,{sideCar:Zv,removeScrollBar:u,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!y,lockRef:r,gapMode:x}),i?vr.cloneElement(vr.Children.only(s),Jr(Jr({},S),{ref:b})):vr.createElement(v,Jr({},S,{className:l,ref:b}),s))});Sp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sp.classNames={fullWidth:hl,zeroRight:gl};var it=R(E());var vc=R(E());var zO=R(E());var HO;var UO=function(){if(HO)return HO;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=UO();return t&&e.setAttribute("nonce",t),e}function b$(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 wb=function(){var e=0,t=null;return{add:function(r){e==0&&(t=S$())&&(b$(t,r),R$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Cb=function(){var e=wb();return function(t,r){zO.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var bp=function(){var e=Cb(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var I$={left:0,top:0,right:0,gap:0},Sb=function(e){return parseInt(e||"",10)||0},L$=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[Sb(r),Sb(o),Sb(n)]},bb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return I$;var t=L$(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 P$=bp(),hc="data-scroll-locked",T$=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
20
- .`.concat(mb,` {
21
- overflow: hidden `).concat(o,`;
22
- padding-right: `).concat(s,"px ").concat(o,`;
19
+ `),()=>{x.contains(g)&&x.removeChild(g)}},[t]),(0,oE.jsx)(qC,{isPresent:t,childRef:a,sizeRef:i,children:qh.cloneElement(e,{ref:l})})}var aE=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=sa(c6),c=(0,Lp.useId)(),d=!0,f=(0,Lp.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:o,custom:n,onExitComplete:p=>{u.set(p,!0);for(let m of u.values())if(!m)return;r&&r()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[o,u,r]);return a&&d&&(f={...f}),(0,Lp.useMemo)(()=>{u.forEach((p,m)=>u.set(m,!1))},[o]),nE.useEffect(()=>{!o&&!u.size&&r&&r()},[o]),i==="popLayout"&&(e=(0,$C.jsx)(rE,{isPresent:o,anchorX:s,root:l,children:e})),(0,$C.jsx)(qi.Provider,{value:f,children:e})};function c6(){return new Map}var es=b(M(),1);function $h(e=!0){let t=(0,es.useContext)(qi);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:n}=t,a=(0,es.useId)();(0,es.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,es.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!o&&r?[!1,i]:[!0]}var Kh=b(M(),1),Tp=e=>e.key||"";function KC(e){let t=[];return Kh.Children.forEach(e,o=>{(0,Kh.isValidElement)(o)&&t.push(o)}),t}var Ga=({children:e,custom:t,initial:o=!0,onExitComplete:r,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=$h(i),d=(0,ca.useMemo)(()=>KC(e),[e]),f=i&&!u?[]:d.map(Tp),p=(0,ca.useRef)(!0),m=(0,ca.useRef)(d),g=sa(()=>new Map),[x,v]=(0,ca.useState)(d),[h,y]=(0,ca.useState)(d);Xu(()=>{p.current=!1,m.current=d;for(let S=0;S<h.length;S++){let R=Tp(h[S]);f.includes(R)?g.delete(R):g.get(R)!==!0&&g.set(R,!1)}},[h,f.length,f.join("-")]);let w=[];if(d!==x){let S=[...d];for(let R=0;R<h.length;R++){let I=h[R],T=Tp(I);f.includes(T)||(S.splice(R,0,I),w.push(I))}return a==="wait"&&w.length&&(S=w),y(KC(S)),v(d),null}let{forceRender:C}=(0,ca.useContext)($u);return(0,kp.jsx)(kp.Fragment,{children:h.map(S=>{let R=Tp(S),I=i&&!u?!1:d===h||f.includes(R),T=()=>{if(g.has(R))g.set(R,!0);else return;let L=!0;g.forEach(k=>{k||(L=!1)}),L&&(C?.(),y(m.current),i&&c?.(),r&&r())};return(0,kp.jsx)(aE,{isPresent:I,initial:!p.current||o?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:T,anchorX:s,children:S},R)})})};var iE=b(M(),1),Xh=(0,iE.createContext)({strict:!1});var sE={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"]},Wa={};for(let e in sE)Wa[e]={isEnabled:t=>sE[e].some(o=>!!t[o])};function lE(e){for(let t in e)Wa[t]={...Wa[t],...e[t]}}var d6=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 Mp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||d6.has(e)}var uE=e=>!Mp(e);function f6(e){typeof e=="function"&&(uE=t=>t.startsWith("on")?!Mp(t):e(t))}try{f6(Tz("@emotion/is-prop-valid").default)}catch{}function cE(e,t,o){let r={};for(let n in e)n==="values"&&typeof e.values=="object"||(uE(n)||o===!0&&Mp(n)||!t&&!Mp(n)||e.draggable&&n.startsWith("onDrag"))&&(r[n]=e[n]);return r}var sv=b(D(),1);var fc=b(M(),1);var dE=b(M(),1),ts=(0,dE.createContext)({});var Zh=b(M(),1);function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ja(e){return typeof e=="string"||Array.isArray(e)}var Yh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ep=["initial",...Yh];function yl(e){return os(e.animate)||Ep.some(t=>ja(e[t]))}function Qh(e){return!!(yl(e)||e.variants)}function fE(e,t){if(yl(e)){let{initial:o,animate:r}=e;return{initial:o===!1||ja(o)?o:void 0,animate:ja(r)?r:void 0}}return e.inherit!==!1?t:{}}function mE(e){let{initial:t,animate:o}=fE(e,(0,Zh.useContext)(ts));return(0,Zh.useMemo)(()=>({initial:t,animate:o}),[pE(t),pE(o)])}function pE(e){return Array.isArray(e)?e.join(" "):e}var sc=b(M(),1);var vE=b(M(),1);var wl={};function gE(e){for(let t in e)wl[t]=e[t],il(t)&&(wl[t].isCSSVariable=!0)}function Jh(e,{layout:t,layoutId:o}){return hr.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!wl[e]||e==="opacity")}var p6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},m6=Ln.length;function hE(e,t,o){let r="",n=!0;for(let a=0;a<m6;a++){let i=Ln[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||o){let u=Rp(s,ml[i]);if(!l){n=!1;let c=p6[i]||i;r+=`${c}(${u}) `}o&&(t[i]=u)}}return r=r.trim(),o?r=o(t,n?"":r):n&&(r="none"),r}function nc(e,t,o){let{style:r,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(hr.has(l)){i=!0;continue}else if(il(l)){n[l]=u;continue}else{let c=Rp(u,ml[l]);l.startsWith("origin")?(s=!0,a[l]=c):r[l]=c}}if(t.transform||(i||o?r.transform=hE(t,e.transform,o):r.transform&&(r.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;r.transformOrigin=`${l} ${u} ${c}`}}var ac=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function XC(e,t,o){for(let r in t)!Ve(t[r])&&!Jh(r,o)&&(e[r]=t[r])}function g6({transformTemplate:e},t){return(0,vE.useMemo)(()=>{let o=ac();return nc(o,t,e),Object.assign({},o.vars,o.style)},[t])}function h6(e,t){let o=e.style||{},r={};return XC(r,o,e),Object.assign(r,g6(e,t)),r}function xE(e,t){let o={},r=h6(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 wE=b(M(),1);var v6={offset:"stroke-dashoffset",array:"stroke-dasharray"},x6={offset:"strokeDashoffset",array:"strokeDasharray"};function yE(e,t,o=1,r=0,n=!0){e.pathLength=1;let a=n?v6:x6;e[a.offset]=ue.transform(-r);let i=ue.transform(t),s=ue.transform(o);e[a.array]=`${i} ${s}`}function ev(e,{attrX:t,attrY:o,attrScale:r,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(nc(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),o!==void 0&&(d.y=o),r!==void 0&&(d.scale=r),n!==void 0&&yE(d,n,a,i,!1)}var tv=()=>({...ac(),attrs:{}});var ov=e=>typeof e=="string"&&e.toLowerCase()==="svg";function CE(e,t,o,r){let n=(0,wE.useMemo)(()=>{let a=tv();return ev(a,t,ov(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};XC(a,e.style,e),n.style={...a,...n.style}}return n}var SE=["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 ic(e){return typeof e!="string"||e.includes("-")?!1:!!(SE.indexOf(e)>-1||/[A-Z]/u.test(e))}function bE(e,t,o,{latestValues:r},n,a=!1){let s=(ic(e)?CE:xE)(t,r,n,e),l=cE(t,typeof e=="string",a),u=e!==sc.Fragment?{...l,...s,ref:o}:{},{children:c}=t,d=(0,sc.useMemo)(()=>Ve(c)?c.get():c,[c]);return(0,sc.createElement)(e,{...u,children:d})}var YC=b(M(),1);function RE(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function lc(e,t,o,r){if(typeof t=="function"){let[n,a]=RE(r);t=t(o!==void 0?o:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=RE(r);t=t(o!==void 0?o:e.custom,n,a)}return t}function uc(e){return Ve(e)?e.get():e}function y6({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,n){return{latestValues:w6(o,r,n,e),renderState:t()}}function w6(e,t,o,r){let n={},a=r(e,{});for(let f in a)n[f]=uc(a[f]);let{initial:i,animate:s}=e,l=yl(e),u=Qh(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=o?o.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!os(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=lc(e,f[p]);if(m){let{transitionEnd:g,transition:x,...v}=m;for(let h in v){let y=v[h];if(Array.isArray(y)){let w=c?y.length-1:0;y=y[w]}y!==null&&(n[h]=y)}for(let h in g)n[h]=g[h]}}}return n}var rv=e=>(t,o)=>{let r=(0,YC.useContext)(ts),n=(0,YC.useContext)(qi),a=()=>y6(e,t,r,n);return o?a():sa(a)};function cc(e,t,o){let{style:r}=e,n={};for(let a in r)(Ve(r[a])||t.style&&Ve(t.style[a])||Jh(a,e)||o?.getValue(a)?.liveStyle!==void 0)&&(n[a]=r[a]);return n}var IE=rv({scrapeMotionValuesFromProps:cc,createRenderState:ac});function nv(e,t,o){let r=cc(e,t,o);for(let n in e)if(Ve(e[n])||Ve(t[n])){let a=Ln.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[a]=e[n]}return r}var PE=rv({scrapeMotionValuesFromProps:nv,createRenderState:tv});var LE=Symbol.for("motionComponentSymbol");var TE=b(M(),1);function qa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kE(e,t,o){return(0,TE.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):qa(o)&&(o.current=r))},[t])}var Jo=b(M(),1);var dc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var C6="framerAppearId",av="data-"+dc(C6);var ME=b(M(),1),iv=(0,ME.createContext)({});function EE(e,t,o,r,n){let{visualElement:a}=(0,Jo.useContext)(ts),i=(0,Jo.useContext)(Xh),s=(0,Jo.useContext)(qi),l=(0,Jo.useContext)(Ji).reducedMotion,u=(0,Jo.useRef)(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:o,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,Jo.useContext)(iv);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&S6(u.current,o,n,d);let f=(0,Jo.useRef)(!1);(0,Jo.useInsertionEffect)(()=>{c&&f.current&&c.update(o,s)});let p=o[av],m=(0,Jo.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Xu(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),(0,Jo.useEffect)(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),m.current=!1),c.enteringChildren=void 0)}),c}function S6(e,t,o,r){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:AE(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&qa(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function AE(e){if(e)return e.options.allowProjection!==!1?e.projection:AE(e.parent)}function lv(e,{forwardMotionProps:t=!1}={},o,r){o&&lE(o);let n=ic(e)?PE:IE;function a(s,l){let u,c={...(0,fc.useContext)(Ji),...s,layoutId:b6(s)},{isStatic:d}=c,f=mE(s),p=n(s,d);if(!d&&Ku){R6(c,o);let m=I6(c);u=m.MeasureLayout,f.visualElement=EE(e,p,c,r,m.ProjectionNode)}return(0,sv.jsxs)(ts.Provider,{value:f,children:[u&&f.visualElement?(0,sv.jsx)(u,{visualElement:f.visualElement,...c}):null,bE(e,s,kE(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,fc.forwardRef)(a);return i[LE]=e,i}function b6({layoutId:e}){let t=(0,fc.useContext)($u).id;return t&&e!==void 0?t+"-"+e:e}function R6(e,t){let o=(0,fc.useContext)(Xh).strict}function I6(e){let{drag:t,layout:o}=Wa;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function DE(e,t){if(typeof Proxy>"u")return lv;let o=new Map,r=(a,i)=>lv(a,i,e,t),n=(a,i)=>r(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?r:(o.has(i)||o.set(i,lv(i,void 0,e,t)),o.get(i))})}var XE=b(M(),1);function uv({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function NE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function OE(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 QC(e){return e===void 0||e===1}function cv({scale:e,scaleX:t,scaleY:o}){return!QC(e)||!QC(t)||!QC(o)}function $a(e){return cv(e)||ZC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ZC(e){return FE(e.x)||FE(e.y)}function FE(e){return e&&e!=="0%"}function Ap(e,t,o){let r=e-o,n=t*r;return o+n}function _E(e,t,o,r,n){return n!==void 0&&(e=Ap(e,n,r)),Ap(e,o,r)+t}function JC(e,t=0,o=1,r,n){e.min=_E(e.min,t,o,r,n),e.max=_E(e.max,t,o,r,n)}function eS(e,{x:t,y:o}){JC(e.x,t.translate,t.scale,t.originPoint),JC(e.y,o.translate,o.scale,o.originPoint)}var VE=.999999999999,BE=1.0000000000001;function UE(e,t,o,r=!1){let n=o.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=o[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Cl(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,eS(e,i)),r&&$a(a.latestValues)&&Cl(e,a.latestValues))}t.x<BE&&t.x>VE&&(t.x=1),t.y<BE&&t.y>VE&&(t.y=1)}function rs(e,t){e.min=e.min+t,e.max=e.max+t}function HE(e,t,o,r,n=.5){let a=ke(e.min,e.max,n);JC(e,t,o,a,r)}function Cl(e,t){HE(e.x,t.x,t.scaleX,t.scale,t.originX),HE(e.y,t.y,t.scaleY,t.scale,t.originY)}function tS(e,t){return uv(OE(e.getBoundingClientRect(),t))}function zE(e,t,o){let r=tS(e,o),{scroll:n}=t;return n&&(rs(r.x,n.offset.x),rs(r.y,n.offset.y)),r}var GE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sl=()=>({x:GE(),y:GE()}),WE=()=>({min:0,max:0}),$e=()=>({x:WE(),y:WE()});var Dp={current:null},dv={current:!1};function jE(){if(dv.current=!0,!!Ku)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dp.current=e.matches;e.addEventListener("change",t),t()}else Dp.current=!1}var ns=new WeakMap;function qE(e,t,o){for(let r in t){let n=t[r],a=o[r];if(Ve(n))e.addValue(r,n);else if(Ve(a))e.addValue(r,Zo(n,{owner:e}));else if(a!==n)if(e.hasValue(r)){let i=e.getValue(r);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(r);e.addValue(r,Zo(i!==void 0?i:n,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var $E=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pc=class{scrapeMotionValuesFromProps(t,o,r){return{}}constructor({parent:t,props:o,presenceContext:r,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=Ua,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=yt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Le.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=i;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=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=yl(o),this.isVariantNode=Qh(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 p=d[f];l[f]!==void 0&&Ve(p)&&p.set(l[f])}}mount(t){this.current=t,ns.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)),dv.current||jE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dp.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xo(this.notifyUpdate),xo(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=hr.has(t);r&&this.onBindTransform&&this.onBindTransform();let n=o.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),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 Wa){let o=Wa[t];if(!o)continue;let{isEnabled:r,Feature:n}=o;if(!this.features[t]&&n&&r(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):$e()}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<$E.length;r++){let n=$E[r];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=qE(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=Zo(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"&&(qf(r)||Kf(r))?r=parseFloat(r):!jC(r)&&wo.test(o)&&(r=Cp(t,o)),this.setBaseTarget(t,Ve(r)?r.get():r)),Ve(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 a=lc(this.props,o,this.presenceContext?.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Ve(n)?n:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new _a),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){hl.render(this.render)}};var mc=class extends pc{constructor(){super(...arguments),this.KeyframeResolver=Sp}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;Ve(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function fv(e,{style:t,vars:o},r,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,r);for(i in o)a.setProperty(i,o[i])}function P6(e){return window.getComputedStyle(e)}var gc=class extends mc{constructor(){super(...arguments),this.type="html",this.renderInstance=fv}readValueFromInstance(t,o){if(hr.has(o))return this.projection?.isProjecting?mp(o):PC(t,o);{let r=P6(t),n=(il(o)?r.getPropertyValue(o):r[o])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:o}){return tS(t,o)}build(t,o,r){nc(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return cc(t,o,r)}};var pv=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 KE(e,t,o,r){fv(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(pv.has(n)?n:dc(n),t.attrs[n])}var hc=class extends mc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(hr.has(o)){let r=wp(o);return r&&r.default||0}return o=pv.has(o)?o:dc(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return nv(t,o,r)}build(t,o,r){ev(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,n){KE(t,o,r,n)}mount(t){this.isSVGTag=ov(t.tagName),super.mount(t)}};var YE=(e,t)=>ic(e)?new hc(t):new gc(t,{allowProjection:e!==XE.Fragment});function da(e,t,o){let r=e.getProps();return lc(r,t,o!==void 0?o:r.custom,e)}var Np=e=>Array.isArray(e);function L6(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,Zo(o))}function T6(e){return Np(e)?e[e.length-1]||0:e}function QE(e,t){let o=da(e,t),{transitionEnd:r={},transition:n={},...a}=o||{};a={...a,...r};for(let i in a){let s=T6(a[i]);L6(e,i,s)}}function ZE(e){return!!(Ve(e)&&e.add)}function Op(e,t){let o=e.getValue("willChange");if(ZE(o))return o.add(t);if(!o&&vo.WillChange){let r=new vo.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function mv(e){return e.props[av]}var k6=e=>e!==null;function JE(e,{repeat:t,repeatType:o="loop"},r){let n=e.filter(k6),a=t&&o!=="loop"&&t%2===1?0:n.length-1;return!a||r===void 0?n[a]:r}var M6={type:"spring",stiffness:500,damping:25,restSpeed:10},E6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),A6={type:"keyframes",duration:.8},D6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eA=(e,{keyframes:t})=>t.length>2?A6:hr.has(e)?e.startsWith("scale")?E6(t[1]):M6:D6;function tA({when:e,delay:t,delayChildren:o,staggerChildren:r,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var vc=(e,t,o,r={},n,a)=>i=>{let s=pl(r,e)||{},l=s.delay||r.delay||0,{elapsed:u=0}=r;u=u-bt(l);let c={keyframes:Array.isArray(o)?o:[null,o],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};tA(s)||Object.assign(c,eA(e,c)),c.duration&&(c.duration=bt(c.duration)),c.repeatDelay&&(c.repeatDelay=bt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(oc(c),c.delay===0&&(d=!0)),(vo.instantAnimations||vo.skipAnimations)&&(d=!0,oc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=JE(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new Ha(c):new hp(c)};function N6({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function xc(e,t,{delay:o=0,transitionOverride:r,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;r&&(a=r);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&&N6(u,c))continue;let p={delay:o,...pl(a||{},c)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){let v=mv(e);if(v){let h=window.MotionHandoffAnimation(v,c,Le);h!==null&&(p.startTime=h,g=!0)}}Op(e,c),d.start(vc(c,d,f,e.shouldReduceMotion&&xp.has(c)?{type:!1}:p,e,g));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&QE(e,i)})}),l}function gv(e,t,o,r=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*r;return typeof o=="function"?o(a,i):n===1?a*r:s-a*r}function hv(e,t,o={}){let r=da(e,t,o.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(n=o.transitionOverride);let a=r?()=>Promise.all(xc(e,r,o)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return O6(e,t,l,u,c,d,o)}:()=>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(o.delay)])}function O6(e,t,o=0,r=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(hv(l,t,{...i,delay:o+(typeof r=="function"?0:r)+gv(e.variantChildren,l,r,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function oA(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let n=t.map(a=>hv(e,a,o));r=Promise.all(n)}else if(typeof t=="string")r=hv(e,t,o);else{let n=typeof t=="function"?da(e,t,o.custom):t;r=Promise.all(xc(e,n,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function oS(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 F6=Ep.length;function rS(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?rS(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<F6;o++){let r=Ep[o],n=e.props[r];(ja(n)||n===!1)&&(t[r]=n)}return t}var _6=[...Yh].reverse(),V6=Yh.length;function B6(e){return t=>Promise.all(t.map(({animation:o,options:r})=>oA(e,o,r)))}function nA(e){let t=B6(e),o=rA(),r=!0,n=l=>(u,c)=>{let d=da(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=rS(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let x=0;x<V6;x++){let v=_6[x],h=o[v],y=u[v]!==void 0?u[v]:c[v],w=ja(y),C=v===l?h.isActive:null;C===!1&&(m=x);let S=y===c[v]&&y!==u[v]&&w;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),h.protectedKeys={...p},!h.isActive&&C===null||!y&&!h.prevProp||os(y)||typeof y=="boolean")continue;let R=H6(h.prevProp,y),I=R||v===l&&h.isActive&&!S&&w||x>m&&w,T=!1,L=Array.isArray(y)?y:[y],k=L.reduce(n(v),{});C===!1&&(k={});let{prevResolvedValues:A={}}=h,F={...A,...k},N=_=>{I=!0,f.has(_)&&(T=!0,f.delete(_)),h.needsAnimating[_]=!0;let B=e.getValue(_);B&&(B.liveStyle=!1)};for(let _ in F){let B=k[_],E=A[_];if(p.hasOwnProperty(_))continue;let J=!1;Np(B)&&Np(E)?J=!oS(B,E):J=B!==E,J?B!=null?N(_):f.add(_):B!==void 0&&f.has(_)?N(_):h.protectedKeys[_]=!0}h.prevProp=y,h.prevResolvedValues=k,h.isActive&&(p={...p,...k}),r&&e.blockInitialAnimation&&(I=!1);let U=S&&R;I&&(!U||T)&&d.push(...L.map(_=>{let B={type:v};if(typeof _=="string"&&r&&!U&&e.manuallyAnimateOnMount&&e.parent){let{parent:E}=e,J=da(E,_);if(E.enteringChildren&&J){let{delayChildren:ae}=J.transition||{};B.delay=gv(E.enteringChildren,e,ae)}}return{animation:_,options:B}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let v=da(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{let h=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),x[v]=h??null}),d.push({animation:x})}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 s(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=i(l);for(let d in o)o[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>o,reset:()=>{o=rA()}}}function H6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oS(t,e):!1}function bl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rA(){return{animate:bl(!0),whileInView:bl(),whileHover:bl(),whileTap:bl(),whileDrag:bl(),whileFocus:bl(),exit:bl()}}var $t=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var vv=class extends $t{constructor(t){super(t),t.animationState||(t.animationState=nA(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();os(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 U6=0,xv=class extends $t{constructor(){super(...arguments),this.id=U6++}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 n=this.node.animationState.setActive("exit",!t);o&&!t&&n.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 aA={animation:{Feature:vv},exit:{Feature:xv}};function Ka(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function Xa(e){return{point:{x:e.pageX,y:e.pageY}}}var iA=e=>t=>vl(t)&&e(t,Xa(t));function as(e,t,o,r){return Ka(e,t,iA(o),r)}var cA=1e-4,z6=1-cA,G6=1+cA,dA=.01,W6=0-dA,j6=0+dA;function Bt(e){return e.max-e.min}function fA(e,t,o){return Math.abs(e-t)<=o}function sA(e,t,o,r=.5){e.origin=r,e.originPoint=ke(t.min,t.max,e.origin),e.scale=Bt(o)/Bt(t),e.translate=ke(o.min,o.max,e.origin)-e.originPoint,(e.scale>=z6&&e.scale<=G6||isNaN(e.scale))&&(e.scale=1),(e.translate>=W6&&e.translate<=j6||isNaN(e.translate))&&(e.translate=0)}function yc(e,t,o,r){sA(e.x,t.x,o.x,r?r.originX:void 0),sA(e.y,t.y,o.y,r?r.originY:void 0)}function lA(e,t,o){e.min=o.min+t.min,e.max=e.min+Bt(t)}function pA(e,t,o){lA(e.x,t.x,o.x),lA(e.y,t.y,o.y)}function uA(e,t,o){e.min=t.min-o.min,e.max=e.min+Bt(t)}function wc(e,t,o){uA(e.x,t.x,o.x),uA(e.y,t.y,o.y)}function er(e){return[e("x"),e("y")]}var yv=({current:e})=>e?e.ownerDocument.defaultView:null;var mA=(e,t)=>Math.abs(e-t);function gA(e,t){let o=mA(e.x,t.x),r=mA(e.y,t.y);return Math.sqrt(o**2+r**2)}var Cc=class{constructor(t,o,{transformPagePoint:r,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=aS(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=gA(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;let{point:g}=f,{timestamp:x}=xt;this.history.push({...g,timestamp:x});let{onStart:v,onMove:h}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=nS(p,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:m,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=aS(f.type==="pointercancel"?this.lastMoveEventInfo:nS(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),g&&g(f,v)},!vl(t))return;this.dragSnapToOrigin=a,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=n||window;let s=Xa(t),l=nS(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=xt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=o;d&&d(t,aS(l,this.history)),this.removeListeners=Rn(as(this.contextWindow,"pointermove",this.handlePointerMove),as(this.contextWindow,"pointerup",this.handlePointerUp),as(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),xo(this.updatePoint)}};function nS(e,t){return t?{point:t(e.point)}:e}function hA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function aS({point:e},t){return{point:e,delta:hA(e,vA(t)),offset:hA(e,q6(t)),velocity:$6(t,.1)}}function q6(e){return e[0]}function vA(e){return e[e.length-1]}function $6(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,n=vA(e);for(;o>=0&&(r=e[o],!(n.timestamp-r.timestamp>bt(t)));)o--;if(!r)return{x:0,y:0};let a=Vt(n.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-r.x)/a,y:(n.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function SA(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?ke(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?ke(o,e,r.max):Math.min(e,o)),e}function xA(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 bA(e,{top:t,left:o,bottom:r,right:n}){return{x:xA(e.x,o,n),y:xA(e.y,t,r)}}function yA(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 RA(e,t){return{x:yA(e.x,t.x),y:yA(e.y,t.y)}}function IA(e,t){let o=.5,r=Bt(e),n=Bt(t);return n>r?o=Br(t.min,t.max-r,e.min):r>n&&(o=Br(e.min,e.max-n,t.min)),qt(0,1,o)}function PA(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 wv=.35;function LA(e=wv){return e===!1?e=0:e===!0&&(e=wv),{x:wA(e,"left","right"),y:wA(e,"top","bottom")}}function wA(e,t,o){return{min:CA(e,t),max:CA(e,o)}}function CA(e,t){return typeof e=="number"?e:e[t]||0}var K6=new WeakMap,Sv=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=$e(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Xa(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=BC(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),er(v=>{let h=this.getAxisMotionValue(v).get()||0;if(yo.test(h)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[v];w&&(h=Bt(w)*(parseFloat(h)/100))}}this.originPoint[v]=h}),g&&Le.postRender(()=>g(d,f)),Op(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:m,onDirectionLock:g,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=X6(v),this.currentDirection!==null&&g&&g(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=()=>er(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Cc(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:yv(this.visualElement)})}stop(t,o){let r=t||this.latestPointerEvent,n=o||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&Le.postRender(()=>s(r,n))}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:n}=this.getProps();if(!r||!Cv(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=SA(i,this.constraints[t],this.elastic[t])),a.set(i)}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,n=this.constraints;t&&qa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=bA(r.layoutBox,t):this.constraints=!1,this.elastic=LA(o),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&er(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=PA(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!qa(t))return!1;let r=t.current;ao(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:n}=this.visualElement;if(!n||!n.layout)return!1;let a=zE(r,n.root,this.visualElement.getTransformPagePoint()),i=RA(n.layout.layoutBox,a);if(o){let s=o(NE(i));this.hasMutatedConstraints=!!s,s&&(i=uv(s))}return i}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=er(c=>{if(!Cv(c,o,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});let f=n?200:1e6,p=n?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return Op(this.visualElement,t),r.start(vc(t,r,0,o,this.visualElement,!1))}stopAnimation(){er(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){er(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(),n=r[o];return n||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){er(o=>{let{drag:r}=this.getProps();if(!Cv(o,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(o);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[o];a.set(t[o]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!qa(o)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};er(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=IA({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),er(i=>{if(!Cv(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(ke(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;K6.set(this.visualElement,this);let t=this.visualElement.current,o=as(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();qa(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",r);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Le.read(r);let i=Ka(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(er(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(),o(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=wv,dragMomentum:s=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Cv(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function X6(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var bv=class extends $t{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new Sv(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 TA=e=>(t,o)=>{e&&Le.postRender(()=>e(t,o))},Rv=class extends $t{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new Cc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yv(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:TA(t),onStart:TA(o),onMove:r,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=as(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 EA=b(D(),1);var Fp=b(M(),1);var Sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function kA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var bc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let o=kA(e,t.target.x),r=kA(e,t.target.y);return`${o}% ${r}%`}};var MA={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,n=wo.parse(e);if(n.length>5)return r;let a=wo.createTransformer(e),i=typeof n[0]!="number"?1:0,s=o.x.scale*t.x,l=o.y.scale*t.y;n[0+i]/=s,n[1+i]/=l;let u=ke(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 iS=!1,sS=class extends Fp.Component{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=t;gE(Y6),a&&(o.group&&o.group.add(a),r&&r.register&&n&&r.register(a),iS&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:n,isPresent:a}=this.props,{projection:i}=r;return i&&(i.isPresent=a,iS=!0,n||t.layoutDependency!==o||o===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Le.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:n}=t;iS=!0,n&&(n.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Iv(e){let[t,o]=$h(),r=(0,Fp.useContext)($u);return(0,EA.jsx)(sS,{...e,layoutGroup:r,switchLayoutGroup:(0,Fp.useContext)(iv),isPresent:t,safeToRemove:o})}var Y6={borderRadius:{...bc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bc,borderTopRightRadius:bc,borderBottomLeftRadius:bc,borderBottomRightRadius:bc,boxShadow:MA};function Pv(e,t,o){let r=Ve(e)?e:Zo(e);return r.start(vc("",r,t,o)),r.animation}var AA=(e,t)=>e.depth-t.depth;var Lv=class{constructor(){this.children=[],this.isDirty=!1}add(t){nl(this.children,t),this.isDirty=!0}remove(t){bn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AA),this.isDirty=!1,this.children.forEach(t)}};function DA(e,t){let o=yt.now(),r=({timestamp:n})=>{let a=n-o;a>=t&&(xo(r),e(a-t))};return Le.setup(r,!0),()=>xo(r)}var _A=["TopLeft","TopRight","BottomLeft","BottomRight"],Q6=_A.length,NA=e=>typeof e=="string"?parseFloat(e):e,OA=e=>typeof e=="number"||ue.test(e);function VA(e,t,o,r,n,a){n?(e.opacity=ke(0,o.opacity??1,Z6(r)),e.opacityExit=ke(t.opacity??1,0,J6(r))):a&&(e.opacity=ke(t.opacity??1,o.opacity??1,r));for(let i=0;i<Q6;i++){let s=`border${_A[i]}Radius`,l=FA(t,s),u=FA(o,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||OA(l)===OA(u)?(e[s]=Math.max(ke(NA(l),NA(u),r),0),(yo.test(u)||yo.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||o.rotate)&&(e.rotate=ke(t.rotate||0,o.rotate||0,r))}function FA(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Z6=BA(0,.5,Jf),J6=BA(.5,.95,mt);function BA(e,t,o){return r=>r<e?0:r>t?1:o(Br(e,t,r))}function HA(e,t){e.min=t.min,e.max=t.max}function vr(e,t){HA(e.x,t.x),HA(e.y,t.y)}function lS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function UA(e,t,o,r,n){return e-=t,e=Ap(e,1/o,r),n!==void 0&&(e=Ap(e,1/n,r)),e}function eq(e,t=0,o=1,r=.5,n,a=e,i=e){if(yo.test(t)&&(t=parseFloat(t),t=ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=ke(a.min,a.max,r);e===a&&(s-=t),e.min=UA(e.min,t,o,s,n),e.max=UA(e.max,t,o,s,n)}function zA(e,t,[o,r,n],a,i){eq(e,t[o],t[r],t[n],t.scale,a,i)}var tq=["x","scaleX","originX"],oq=["y","scaleY","originY"];function uS(e,t,o,r){zA(e.x,t,tq,o?o.x:void 0,r?r.x:void 0),zA(e.y,t,oq,o?o.y:void 0,r?r.y:void 0)}function GA(e){return e.translate===0&&e.scale===1}function cS(e){return GA(e.x)&&GA(e.y)}function WA(e,t){return e.min===t.min&&e.max===t.max}function qA(e,t){return WA(e.x,t.x)&&WA(e.y,t.y)}function jA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dS(e,t){return jA(e.x,t.x)&&jA(e.y,t.y)}function fS(e){return Bt(e.x)/Bt(e.y)}function pS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Tv=class{constructor(){this.members=[]}add(t){nl(this.members,t),t.scheduleRender()}remove(t){if(bn(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(n=>t===n);if(o===0)return!1;let r;for(let n=o;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){r=a;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:n}=t.options;n===!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 $A(e,t,o){let r="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=o?.z||0;if((n||a||i)&&(r=`translate3d(${n}px, ${a}px, ${i}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:p,skewY:m}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}var Rl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},mS=["","X","Y","Z"],rq=1e3,nq=0;function gS(e,t,o,r){let{latestValues:n}=t;n[e]&&(o[e]=n[e],t.setStaticValue(e,0),r&&(r[e]=0))}function oD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=mv(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",Le,!(n||a))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&oD(r)}function kv({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=nq++,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,Qo.value&&(Rl.nodes=Rl.calculatedTargetDeltas=Rl.calculatedProjections=0),this.nodes.forEach(sq),this.nodes.forEach(dq),this.nodes.forEach(fq),this.nodes.forEach(lq),Qo.addProjectionMetrics&&Qo.addProjectionMetrics(Rl)},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 Lv)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new _a),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=xl(i)&&!Pp(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;Le.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=DA(f,250),Sc.hasAnimatedSinceResize&&(Sc.hasAnimatedSinceResize=!1,this.nodes.forEach(YA)))})}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 m=this.options.transition||u.getDefaultTransition()||vq,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!dS(this.targetLayout,p),h=!d&&f;if(this.options.layoutRoot||this.resumeFrom||h||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...pl(m,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,h)}else d||YA(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(),xo(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(pq),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&&oD(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(KA);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(XA);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cq),this.nodes.forEach(aq),this.nodes.forEach(iq)):this.nodes.forEach(XA),this.clearAllSnapshots();let s=yt.now();xt.delta=qt(0,1e3/60,s-xt.timestamp),xt.timestamp=s,xt.isProcessing=!0,ip.update.process(xt),ip.preRender.process(xt),ip.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(uq),this.sharedNodes.forEach(mq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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=$e(),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=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:o(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&&!cS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||$a(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)),xq(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return $e();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(yq))){let{scroll:u}=this.root;u&&(rs(s.x,u.offset.x),rs(s.y,u.offset.y))}return s}removeElementScroll(i){let s=$e();if(vr(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&&vr(s,i),rs(s.x,c.offset.x),rs(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=$e();vr(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&&Cl(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),$a(c.latestValues)&&Cl(l,c.latestValues)}return $a(this.latestValues)&&Cl(l,this.latestValues),l}removeTransform(i){let s=$e();vr(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!$a(u.latestValues))continue;cv(u.latestValues)&&u.updateSnapshot();let c=$e(),d=u.measurePageBox();vr(c,d),uS(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return $a(this.latestValues)&&uS(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!==xt.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=xt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),wc(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=$e(),this.targetWithTransforms=$e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vr(this.target,this.layout.layoutBox),eS(this.target,this.targetDelta)):vr(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=$e(),this.relativeTargetOrigin=$e(),wc(this.relativeTargetOrigin,this.target,f.target),vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Qo.value&&Rl.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||cv(this.parent.latestValues)||ZC(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===xt.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;vr(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;UE(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=$e());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(lS(this.prevProjectionDelta.x,this.projectionDelta.x),lS(this.prevProjectionDelta.y,this.projectionDelta.y)),yc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!pS(this.projectionDelta.x,this.prevProjectionDelta.x)||!pS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Qo.value&&Rl.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=Sl(),this.projectionDelta=Sl(),this.projectionDeltaWithTransform=Sl()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Sl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=$e(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),v=!x||x.members.length<=1,h=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(hq));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;QA(d.x,i.x,C),QA(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gq(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&qA(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=$e()),vr(y,this.relativeTarget)),g&&(this.animationValues=c,VA(c,u,this.latestValues,C,h,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&&(xo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Sc.hasAnimatedSinceResize=!0,In.layout++,this.motionValue||(this.motionValue=Zo(0)),this.currentAnimation=Pv(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{In.layout--},onComplete:()=>{In.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(rq),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&&rD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$e();let d=Bt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Bt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}vr(s,l),Cl(s,c),yc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Tv),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&&gS("z",i,u,this.animationValues);for(let c=0;c<mS.length;c++)gS(`rotate${mS[c]}`,i,u,this.animationValues),gS(`skew${mS[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=uc(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=uc(s?.pointerEvents)||""),this.hasProjected&&!$a(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=$A(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 m in wl){if(c[m]===void 0)continue;let{correct:g,applyTo:x,isCSSVariable:v}=wl[m],h=d==="none"?c[m]:g(c[m],u);if(x){let y=x.length;for(let w=0;w<y;w++)i[x[w]]=h}else v?this.options.visualElement.renderState.vars[m]=h:i[m]=h}this.options.layoutId&&(i.pointerEvents=u===this?uc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(KA),this.root.sharedNodes.clear()}}}function aq(e){e.updateLayout()}function iq(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:n}=e.options,a=t.source!==e.layout.source;n==="size"?er(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Bt(d);d.min=o[c].min,d.max=d.min+f}):rD(n,t.layoutBox,o)&&er(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Bt(o[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Sl();yc(i,o,t.layoutBox);let s=Sl();a?yc(s,e.applyTransform(r,!0),t.measuredBox):yc(s,o,t.layoutBox);let l=!cS(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=$e();wc(p,t.layoutBox,d.layoutBox);let m=$e();wc(m,o,f.layoutBox),dS(p,m)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function sq(e){Qo.value&&Rl.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 lq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function uq(e){e.clearSnapshot()}function KA(e){e.clearMeasurements()}function XA(e){e.isLayoutDirty=!1}function cq(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function YA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dq(e){e.resolveTargetDelta()}function fq(e){e.calcProjection()}function pq(e){e.resetSkewAndRotation()}function mq(e){e.removeLeadSnapshot()}function QA(e,t,o){e.translate=ke(t.translate,0,o),e.scale=ke(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function ZA(e,t,o,r){e.min=ke(t.min,o.min,r),e.max=ke(t.max,o.max,r)}function gq(e,t,o,r){ZA(e.x,t.x,o.x,r),ZA(e.y,t.y,o.y,r)}function hq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var vq={duration:.45,ease:[.4,0,.1,1]},JA=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eD=JA("applewebkit/")&&!JA("chrome/")?Math.round:mt;function tD(e){e.min=eD(e.min),e.max=eD(e.max)}function xq(e){tD(e.x),tD(e.y)}function rD(e,t,o){return e==="position"||e==="preserve-aspect"&&!fA(fS(t),fS(o),.2)}function yq(e){return e!==e.root&&e.scroll?.wasRoot}var nD=kv({attachResizeListener:(e,t)=>Ka(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var hS={current:void 0},Mv=kv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hS.current){let e=new nD({});e.mount(window),e.setOptions({layoutScroll:!0}),hS.current=e}return hS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var aD={pan:{Feature:Rv},drag:{Feature:bv,ProjectionNode:Mv,MeasureLayout:Iv}};function iD(e,t,o){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",o==="Start");let n="onHover"+o,a=r[n];a&&Le.postRender(()=>a(t,Xa(t)))}var Ev=class extends $t{mount(){let{current:t}=this.node;t&&(this.unmount=HC(t,(o,r)=>(iD(this.node,r,"Start"),n=>iD(this.node,n,"End"))))}unmount(){}};var Av=class extends $t{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=Rn(Ka(this.node.current,"focus",()=>this.onFocus()),Ka(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function sD(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 n="onTap"+(o==="End"?"":o),a=r[n];a&&Le.postRender(()=>a(t,Xa(t)))}var Dv=class extends $t{mount(){let{current:t}=this.node;t&&(this.unmount=GC(t,(o,r)=>(sD(this.node,r,"Start"),(n,{success:a})=>sD(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var xS=new WeakMap,vS=new WeakMap,wq=e=>{let t=xS.get(e.target);t&&t(e)},Cq=e=>{e.forEach(wq)};function Sq({root:e,...t}){let o=e||document;vS.has(o)||vS.set(o,{});let r=vS.get(o),n=JSON.stringify(t);return r[n]||(r[n]=new IntersectionObserver(Cq,{root:e,...t})),r[n]}function lD(e,t,o){let r=Sq(t);return xS.set(e,o),r.observe(e),()=>{xS.delete(e),r.unobserve(e)}}var bq={some:0,all:1},Nv=class extends $t{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:o,margin:r,amount:n="some",once:a}=t,i={root:o?o.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:bq[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 lD(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:o}=this.node;["amount","margin","root"].some(Rq(t,o))&&this.startObserver()}unmount(){}};function Rq({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var uD={inView:{Feature:Nv},tap:{Feature:Dv},focus:{Feature:Av},hover:{Feature:Ev}};var cD={layout:{ProjectionNode:Mv,MeasureLayout:Iv}};var dD={...aA,...uD,...aD,...cD};var Be=DE(dD,YE);var Rc=b(M(),1);function Ic(e){let t=sa(()=>Zo(e)),{isStatic:o}=(0,Rc.useContext)(Ji);if(o){let[,r]=(0,Rc.useState)(e);(0,Rc.useEffect)(()=>t.on("change",r),[])}return t}function Ov(e,t){let o=Ic(t()),r=()=>o.set(t());return r(),Xu(()=>{let n=()=>Le.preRender(r,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),xo(r)}}),o}function fD(e){gl.current=[],e();let t=Ov(gl.current,e);return gl.current=void 0,t}function yS(e,t,o,r){if(typeof e=="function")return fD(e);let n=typeof t=="function"?t:WC(t,o,r);return Array.isArray(e)?pD(e,n):pD([e],([a])=>n(a))}function pD(e,t){let o=sa(()=>[]);return Ov(e,()=>{o.length=0;let r=e.length;for(let n=0;n<r;n++)o[n]=e[n].get();return t(o)})}function _p(e){return typeof e=="object"&&!Array.isArray(e)}function Fv(e,t,o,r){return typeof e=="string"&&_p(t)?bp(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function mD(e,t,o){return e*(t+1)}function wS(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 Iq(e,t,o){for(let r=0;r<e.length;r++){let n=e[r];n.at>t&&n.at<o&&(bn(e,n),r--)}}function gD(e,t,o,r,n,a){Iq(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,r[i]),easing:rp(o,i)})}function hD(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function vD(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Pq="easeInOut",Lq=20;function wD(e,{defaultTransition:t={},...o}={},r,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 m=e[p];if(typeof m=="string"){u.set(m,d);continue}else if(!Array.isArray(m)){u.set(m.name,wS(d,m.at,c,u));continue}let[g,x,v={}]=m;v.at!==void 0&&(d=wS(d,v.at,c,u));let h=0,y=(w,C,S,R=0,I=0)=>{let T=Tq(w),{delay:L=0,times:k=pp(T),type:A="keyframes",repeat:F,repeatType:N,repeatDelay:U=0,...O}=C,{ease:_=t.ease||"easeOut",duration:B}=C,E=typeof L=="function"?L(R,I):L,J=T.length,ae=fl(A)?A:n?.[A||"keyframes"];if(J<=2&&ae){let X=100;if(J===2&&Eq(T)){let ne=T[1]-T[0];X=Math.abs(ne)}let ce={...O};B!==void 0&&(ce.duration=bt(B));let z=cp(ce,X,ae);_=z.ease,B=z.duration}B??(B=a);let V=d+E;k.length===1&&k[0]===0&&(k[1]=1);let Y=k.length-T.length;if(Y>0&&fp(k,Y),T.length===1&&T.unshift(null),F){ao(F<Lq,"Repeat count too high, must be less than 20","repeat-count-high"),B=mD(B,F);let X=[...T],ce=[...k];_=Array.isArray(_)?[..._]:[_];let z=[..._];for(let ne=0;ne<F;ne++){T.push(...X);for(let he=0;he<X.length;he++)k.push(ce[he]+(ne+1)),_.push(he===0?"linear":rp(z,he-1))}hD(k,F)}let oe=V+B;gD(S,T,_,k,V,oe),h=Math.max(E+B,h),f=Math.max(oe,f)};if(Ve(g)){let w=xD(g,s);y(x,v,yD("default",w))}else{let w=Fv(g,x,r,l),C=w.length;for(let S=0;S<C;S++){x=x,v=v;let R=w[S],I=xD(R,s);for(let T in x)y(x[T],kq(v,T),yD(T,I),S,C)}}c=d,d+=h}return s.forEach((p,m)=>{for(let g in p){let x=p[g];x.sort(vD);let v=[],h=[],y=[];for(let C=0;C<x.length;C++){let{at:S,value:R,easing:I}=x[C];v.push(R),h.push(Br(0,f,S)),y.push(I||"easeOut")}h[0]!==0&&(h.unshift(0),v.unshift(v[0]),y.unshift(Pq)),h[h.length-1]!==1&&(h.push(1),v.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});let w=i.get(m);w.keyframes[g]=v,w.transition[g]={...t,duration:f,ease:y,times:h,...o}}}),i}function xD(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function yD(e,t){return t[e]||(t[e]=[]),t[e]}function Tq(e){return Array.isArray(e)?e:[e]}function kq(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Mq=e=>typeof e=="number",Eq=e=>e.every(Mq);function Aq(e,t){return e in t}var _v=class extends pc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(Aq(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 $e()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function CD(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=xl(e)&&!Pp(e)?new hc(t):new gc(t);o.mount(e),ns.set(e,o)}function SD(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new _v(t);o.mount(e),ns.set(e,o)}function Dq(e,t){return Ve(e)||typeof e=="number"||typeof e=="string"&&!_p(t)}function Vv(e,t,o,r){let n=[];if(Dq(e,t))n.push(Pv(e,_p(t)&&t.default||t,o&&(o.default||o)));else{let a=Fv(e,t,r),i=a.length;ao(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];ao(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?CD:SD;ns.has(l)||u(l);let c=ns.get(l),d={...o};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...xc(c,{...t,transition:d},{}))}}return n}function bD(e,t,o){let r=[];return wD(e,t,o,{spring:Ba}).forEach(({keyframes:a,transition:i},s)=>{r.push(...Vv(s,a,i))}),r}function Nq(e){return Array.isArray(e)&&e.some(Array.isArray)}function RD(e){function t(o,r,n){let a=[],i;if(Nq(o))a=bD(o,r,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=Vv(o,r,u,e)}let s=new vp(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{bn(e.animations,s)})),s}return t}var CS=RD();var Wwe=Q("",{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"}}),Tn={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}},Bv={lift:{y:-2,transition:Tn.smooth},scale:{scale:1.05,transition:Tn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Tn.smooth},rotate:{rotate:2,transition:Tn.bouncy}},ID={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},jwe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Tn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Tn.smooth}},qwe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Tn.smooth}}},$we={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:Tn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Tn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Tn.smooth}},PD={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var Kwe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Tn.bouncy};var is=b(D()),LD=Q("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"}}),TD=Il.forwardRef(({className:e,variant:t,size:o,radius:r,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?Bv.scale:a==="glow"?Bv.glow:Bv.lift,whileTap:ID.scale};return(0,is.jsx)(Be.div,{ref:s,className:P("moonui-theme",LD({variant:t,size:o,radius:r,interactive:n,className:e})),...l,...i})}return(0,is.jsx)("div",{ref:s,className:P("moonui-theme",LD({variant:t,size:o,radius:r,interactive:n,className:e})),...i})});TD.displayName="Card";var kD=Il.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));kD.displayName="CardHeader";var MD=Il.forwardRef(({className:e,...t},o)=>(0,is.jsx)("h3",{ref:o,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));MD.displayName="CardTitle";var ED=Il.forwardRef(({className:e,...t},o)=>(0,is.jsx)("p",{ref:o,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));ED.displayName="CardDescription";var AD=Il.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","p-6 pt-0",e),...t}));AD.displayName="CardContent";var DD=Il.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));DD.displayName="CardFooter";var dN=b(M());function Te(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 io(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Hv(e,t){let o=Te(e);if(isNaN(t))return io(e,NaN);if(!t)return o;let r=o.getDate(),n=io(e,o.getTime());n.setMonth(o.getMonth()+t+1,0);let a=n.getDate();return r>=a?n:(o.setFullYear(n.getFullYear(),n.getMonth(),r),o)}var Oq=Math.pow(10,8)*24*60*60*1e3,sCe=-Oq,Uv=6048e5,ND=864e5;var Fq=3600;var OD=Fq*24,lCe=OD*7,_q=OD*365.2425,Vq=_q/12,uCe=Vq*3;var Bq={};function fa(){return Bq}function kn(e,t){let o=fa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<r?7:0)+a-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function Pl(e){return kn(e,{weekStartsOn:1})}function zv(e){let t=Te(e),o=t.getFullYear(),r=io(e,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);let n=Pl(r),a=io(e,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let i=Pl(a);return t.getTime()>=n.getTime()?o+1:t.getTime()>=i.getTime()?o:o-1}function Pc(e){let t=Te(e);return t.setHours(0,0,0,0),t}function SS(e){let t=Te(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 FD(e,t){let o=Pc(e),r=Pc(t),n=+o-SS(o),a=+r-SS(r);return Math.round((n-a)/ND)}function _D(e){let t=zv(e),o=io(e,0);return o.setFullYear(t,0,4),o.setHours(0,0,0,0),Pl(o)}function VD(e){return io(e,Date.now())}function Ll(e,t){let o=Pc(e),r=Pc(t);return+o==+r}function BD(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Gv(e){if(!BD(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function HD(e){let t=Te(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function Wv(e,t){let o=Te(e.start),r=Te(e.end),n=+o>+r,a=n?+o:+r,i=n?r:o;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(Te(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function UD(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zD(e){let t=Te(e),o=io(e,0);return o.setFullYear(t.getFullYear(),0,1),o.setHours(0,0,0,0),o}function GD(e,t){let o=fa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<r?-7:0)+6-(a-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var Hq={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"}},WD=(e,t,o)=>{let r,n=Hq[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function jv(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var Uq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jD={date:jv({formats:Uq,defaultWidth:"full"}),time:jv({formats:zq,defaultWidth:"full"}),dateTime:jv({formats:Gq,defaultWidth:"full"})};var Wq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qD=(e,t,o,r)=>Wq[e];function Lc(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=o?.width?String(o.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=o?.width?String(o.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var jq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$q={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"]},Kq={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"]},Xq={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"}},Yq={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"}},Qq=(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"},$D={ordinalNumber:Qq,era:Lc({values:jq,defaultWidth:"wide"}),quarter:Lc({values:qq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lc({values:$q,defaultWidth:"wide"}),day:Lc({values:Kq,defaultWidth:"wide"}),dayPeriod:Lc({values:Xq,defaultWidth:"wide",formattingValues:Yq,defaultFormattingWidth:"wide"})};function Tc(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Jq(s,d=>d.test(i)):Zq(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function Zq(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function Jq(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function KD(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=o.valueCallback?o.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var e8=/^(\d+)(th|st|nd|rd)?/i,t8=/\d+/i,o8={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},r8={any:[/^b/i,/^(a|c)/i]},n8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},a8={any:[/1/i,/2/i,/3/i,/4/i]},i8={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},s8={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]},l8={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},u8={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]},c8={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},d8={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}},XD={ordinalNumber:KD({matchPattern:e8,parsePattern:t8,valueCallback:e=>parseInt(e,10)}),era:Tc({matchPatterns:o8,defaultMatchWidth:"wide",parsePatterns:r8,defaultParseWidth:"any"}),quarter:Tc({matchPatterns:n8,defaultMatchWidth:"wide",parsePatterns:a8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Tc({matchPatterns:i8,defaultMatchWidth:"wide",parsePatterns:s8,defaultParseWidth:"any"}),day:Tc({matchPatterns:l8,defaultMatchWidth:"wide",parsePatterns:u8,defaultParseWidth:"any"}),dayPeriod:Tc({matchPatterns:c8,defaultMatchWidth:"any",parsePatterns:d8,defaultParseWidth:"any"})};var bS={code:"en-US",formatDistance:WD,formatLong:jD,formatRelative:qD,localize:$D,match:XD,options:{weekStartsOn:0,firstWeekContainsDate:1}};function YD(e){let t=Te(e);return FD(t,zD(t))+1}function QD(e){let t=Te(e),o=+Pl(t)-+_D(t);return Math.round(o/Uv)+1}function qv(e,t){let o=Te(e),r=o.getFullYear(),n=fa(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=io(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);let s=kn(i,t),l=io(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);let u=kn(l,t);return o.getTime()>=s.getTime()?r+1:o.getTime()>=u.getTime()?r:r-1}function ZD(e,t){let o=fa(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=qv(e,t),a=io(e,0);return a.setFullYear(n,0,r),a.setHours(0,0,0,0),kn(a,t)}function JD(e,t){let o=Te(e),r=+kn(o,t)-+ZD(o,t);return Math.round(r/Uv)+1}function He(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Ya={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return He(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):He(o+1,2)},d(e,t){return He(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 He(e.getHours()%12||12,t.length)},H(e,t){return He(e.getHours(),t.length)},m(e,t){return He(e.getMinutes(),t.length)},s(e,t){return He(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return He(n,t.length)}};var kc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},RS={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(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return Ya.y(e,t)},Y:function(e,t,o,r){let n=qv(e,r),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return He(i,2)}return t==="Yo"?o.ordinalNumber(a,{unit:"year"}):He(a,t.length)},R:function(e,t){let o=zv(e);return He(o,t.length)},u:function(e,t){let o=e.getFullYear();return He(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 He(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 He(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 Ya.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 He(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 n=JD(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):He(n,t.length)},I:function(e,t,o){let r=QD(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):He(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Ya.d(e,t)},D:function(e,t,o){let r=YD(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):He(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 n=e.getDay(),a=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return He(a,2);case"eo":return o.ordinalNumber(a,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),a=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return He(a,t.length);case"co":return o.ordinalNumber(a,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return He(n,t.length);case"io":return o.ordinalNumber(n,{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 n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=kc.noon:r===0?n=kc.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=kc.evening:r>=12?n=kc.afternoon:r>=4?n=kc.morning:n=kc.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{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 Ya.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Ya.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):He(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):He(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ya.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Ya.s(e,t)},S:function(e,t){return Ya.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tN(r);case"XXXX":case"XX":return Tl(r);case"XXXXX":case"XXX":default:return Tl(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return tN(r);case"xxxx":case"xx":return Tl(r);case"xxxxx":case"xxx":default:return Tl(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eN(r,":");case"OOOO":default:return"GMT"+Tl(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eN(r,":");case"zzzz":default:return"GMT"+Tl(r,":")}},t:function(e,t,o){let r=Math.trunc(e.getTime()/1e3);return He(r,t.length)},T:function(e,t,o){let r=e.getTime();return He(r,t.length)}};function eN(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),a=r%60;return a===0?o+String(n):o+String(n)+t+He(a,2)}function tN(e,t){return e%60===0?(e>0?"-":"+")+He(Math.abs(e)/60,2):Tl(e,t)}function Tl(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=He(Math.trunc(r/60),2),a=He(r%60,2);return o+n+t+a}var oN=(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"})}},rN=(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"})}},f8=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return oN(e,t);let a;switch(r){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}}",oN(r,t)).replace("{{time}}",rN(n,t))},nN={p:rN,P:f8};var p8=/^D+$/,m8=/^Y+$/,g8=["D","DD","YY","YYYY"];function aN(e){return p8.test(e)}function iN(e){return m8.test(e)}function sN(e,t,o){let r=h8(e,t,o);if(console.warn(r),g8.includes(e))throw new RangeError(r)}function h8(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 v8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,y8=/^'([^]*?)'?$/,w8=/''/g,C8=/[a-zA-Z]/;function Mn(e,t,o){let r=fa(),n=o?.locale??r.locale??bS,a=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Te(e);if(!Gv(s))throw new RangeError("Invalid time value");let l=t.match(x8).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=nN[d];return f(c,n.formatLong)}return c}).join("").match(v8).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:S8(c)};if(RS[d])return{isToken:!0,value:c};if(d.match(C8))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;(!o?.useAdditionalWeekYearTokens&&iN(d)||!o?.useAdditionalDayOfYearTokens&&aN(d))&&sN(d,t,String(e));let f=RS[d[0]];return f(s,d,n.localize,u)}).join("")}function S8(e){let t=e.match(y8);return t?t[1].replace(w8,"'"):e}function IS(e){return Te(e).getDay()}function lN(e,t){let o=Te(e),r=Te(t);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function uN(e){return Ll(e,VD(e))}function cN(e,t){return Hv(e,-t)}var No=b(D());function Vp({mode:e="single",selected:t,onSelect:o,disabled:r,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=dN.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(cN(c,1))},m=()=>{d(Hv(c,1))},g=S=>{if(!r?.(S)){if(e==="single")o?.(S);else if(e==="range"){let R=t;!R?.from||R.from&&R.to?o?.({from:S,to:void 0}):S<R.from?o?.({from:S,to:R.from}):o?.({from:R.from,to:S})}}},x=S=>{if(!t)return!1;if(e==="single")return Ll(S,t);if(e==="range"){let R=t;return R.from&&R.to?S>=R.from&&S<=R.to:R.from?Ll(S,R.from):!1}return!1},v=S=>{if(e!=="range"||!t)return!1;let R=t;return R.from?Ll(S,R.from):!1},h=S=>{if(e!=="range"||!t)return!1;let R=t;return R.to?Ll(S,R.to):!1},y=S=>{if(e!=="range"||!t)return!1;let R=t;return!R.from||!R.to?!1:S>R.from&&S<R.to},C=(()=>{let S=UD(c),R=HD(c),I=Wv({start:S,end:R}),T=IS(S),L=[];if(T>0&&n){let N=kn(S),U=new Date(S);U.setDate(U.getDate()-1),L.push(...Wv({start:N,end:U}))}let k=IS(R),A=[];if(k<6&&n){let N=new Date(R);N.setDate(N.getDate()+1);let U=GD(R);A.push(...Wv({start:N,end:U}))}let F=[];if(!n&&T>0)for(let N=0;N<T;N++)F.push(null);return[...L,...F,...I,...A]})();return(0,No.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,No.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,No.jsx)("button",{onClick:p,className:P("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,No.jsx)(wn,{className:"h-5 w-5"})}),(0,No.jsx)("h2",{className:"text-base font-medium",children:Mn(c,"MMMM yyyy")}),(0,No.jsx)("button",{onClick:m,className:P("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,No.jsx)(Ao,{className:"h-5 w-5"})})]}),(0,No.jsxs)("div",{className:"px-6 pb-4",children:[(0,No.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((S,R)=>(0,No.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:S.full,children:S.short},`weekday-${R}`))}),(0,No.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((S,R)=>{if(!S)return(0,No.jsx)("div",{className:"h-10 w-10"},`empty-${R}`);let I=!lN(S,c),T=r?.(S)||!1,L=x(S),k=uN(S),A=v(S),F=h(S),N=y(S);return(0,No.jsx)("button",{onClick:()=>g(S),disabled:T,className:P("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",I&&"text-muted-foreground/50",T&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",L&&!N&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",k&&"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",A&&"rounded-r-none",F&&"rounded-l-none"),type:"button",children:Mn(S,"d")},S.toISOString())})})]})]})}Vp.displayName="Calendar";var kl=b(M());var ss=b(D()),b8=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"},fN=(e,t)=>{let o=e.replace(/\s+/g,""),r=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of r){if(a>=o.length)break;n&&(n+=" "),n+=o.slice(a,a+i),a+=i}return n},pN=kl.forwardRef(({className:e,value:t="",onChange:o,showIcon:r=!0,size:n,...a},i)=>{let[s,l]=kl.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=b8(d);l(f);let p=f==="amex"?15:16,m=d.slice(0,p),g=fN(m,f);o?.(m,f),c.target.value=g};return(0,ss.jsxs)("div",{className:"relative",children:[(0,ss.jsx)(Co,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:fN(t,s),onChange:u,className:P(r&&"pl-10",e),...a}),r&&(0,ss.jsx)(Sf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});pN.displayName="CardNumberInput";var mN=kl.forwardRef(({className:e,value:t="",onChange:o,size:r,...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)),o?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,ss.jsx)(Co,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});mN.displayName="CardExpiryInput";var gN=kl.forwardRef(({className:e,value:t="",onChange:o,cardType:r="unknown",size:n,...a},i)=>{let s=r==="amex"?4:3;return(0,ss.jsx)(Co,{ref:i,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,s);o?.(c)},maxLength:s,className:e,...a})});gN.displayName="CardCVCInput";var hN=kl.forwardRef(({className:e,value:t="",onChange:o,format:r="US",size:n,...a},i)=>{let s=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,ss.jsx)(Co,{ref:i,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:s,className:e,...a})});hN.displayName="CardZipInput";var Rt=b(M());var Ur=b(M(),1);function R8(e){return Object.prototype.toString.call(e)==="[object Object]"}function vN(e){return R8(e)||Array.isArray(e)}function yN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function $v(e,t){let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:o.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!vN(s)||!vN(l)?s===l:$v(s,l)})}function xN(e){return e.concat().sort((t,o)=>t.name>o.name?1:-1).map(t=>t.options)}function wN(e,t){if(e.length!==t.length)return!1;let o=xN(e),r=xN(t);return o.every((n,a)=>{let i=r[a];return $v(n,i)})}function TS(e){return typeof e=="number"}function PS(e){return typeof e=="string"}function Kv(e){return typeof e=="boolean"}function CN(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return Math.abs(e)}function kS(e){return Math.sign(e)}function Hp(e,t){return gt(e-t)}function I8(e,t){if(e===0||t===0||gt(e)<=gt(t))return 0;let o=Hp(gt(e),gt(t));return gt(o/e)}function P8(e){return Math.round(e*100)/100}function Up(e){return zp(e).map(Number)}function En(e){return e[Wp(e)]}function Wp(e){return Math.max(0,e.length-1)}function MS(e,t){return t===Wp(e)}function SN(e,t=0){return Array.from(Array(e),(o,r)=>t+r)}function zp(e){return Object.keys(e)}function bN(e,t){return[e,t].reduce((o,r)=>(zp(r).forEach(n=>{let a=o[n],i=r[n],s=CN(a)&&CN(i);o[n]=s?bN(a,i):i}),o),{})}function LS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function L8(e,t){let o={start:r,center:n,end:a};function r(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return PS(e)?o[e](l):e(t,l,u)}return{measure:i}}function Gp(){let e=[];function t(n,a,i,s={passive:!0}){let l;if("addEventListener"in n)n.addEventListener(a,i,s),l=()=>n.removeEventListener(a,i,s);else{let u=n;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),r}function o(){e=e.filter(n=>n())}let r={add:t,clear:o};return r}function T8(e,t,o,r){let n=Gp(),a=1e3/60,i=null,s=0,l=0;function u(){n.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){p(),n.clear()}function d(x){if(!l)return;i||(i=x,o(),o());let v=x-i;for(i=x,s+=v;s>=a;)o(),s-=a;let h=s/a;r(h),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),i=null,s=0,l=0}function m(){i=null,s=0}return{init:u,destroy:c,start:f,stop:p,update:o,render:r}}function k8(e,t){let o=t==="rtl",r=e==="y",n=r?"y":"x",a=r?"x":"y",i=!r&&o?-1:1,s=c(),l=d();function u(m){let{height:g,width:x}=m;return r?g:x}function c(){return r?"top":o?"right":"left"}function d(){return r?"bottom":o?"left":"right"}function f(m){return m*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function Ml(e=0,t=0){let o=gt(e-t);function r(u){return u<e}function n(u){return u>t}function a(u){return r(u)||n(u)}function i(u){return a(u)?r(u)?e:t:u}function s(u){return o?u-o*Math.ceil((u-t)/o):u}return{length:o,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:r,removeOffset:s}}function RN(e,t,o){let{constrain:r}=Ml(0,e),n=e+1,a=i(t);function i(f){return o?gt((n+f)%n):r(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return RN(e,s(),o)}let d={get:s,set:l,add:u,clone:c};return d}function M8(e,t,o,r,n,a,i,s,l,u,c,d,f,p,m,g,x,v,h){let{cross:y,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],S={passive:!1},R=Gp(),I=Gp(),T=Ml(50,225).constrain(p.measure(20)),L={mouse:300,touch:400},k={mouse:500,touch:600},A=m?43:25,F=!1,N=0,U=0,O=!1,_=!1,B=!1,E=!1;function J(K){if(!h)return;function Ie(ie){(Kv(h)||h(K,ie))&&ce(ie)}let ee=t;R.add(ee,"dragstart",ie=>ie.preventDefault(),S).add(ee,"touchmove",()=>{},S).add(ee,"touchend",()=>{}).add(ee,"touchstart",Ie).add(ee,"mousedown",Ie).add(ee,"touchcancel",ne).add(ee,"contextmenu",ne).add(ee,"click",he,!0)}function ae(){R.clear(),I.clear()}function V(){let K=E?o:t;I.add(K,"touchmove",z,S).add(K,"touchend",ne).add(K,"mousemove",z,S).add(K,"mouseup",ne)}function Y(K){let Ie=K.nodeName||"";return C.includes(Ie)}function oe(){return(m?k:L)[E?"mouse":"touch"]}function X(K,Ie){let ee=d.add(kS(K)*-1),ie=c.byDistance(K,!m).distance;return m||gt(K)<T?ie:x&&Ie?ie*.5:c.byIndex(ee.get(),0).distance}function ce(K){let Ie=LS(K,r);E=Ie,B=m&&Ie&&!K.buttons&&F,F=Hp(n.get(),i.get())>=2,!(Ie&&K.button!==0)&&(Y(K.target)||(O=!0,a.pointerDown(K),u.useFriction(0).useDuration(0),n.set(i),V(),N=a.readPoint(K),U=a.readPoint(K,y),f.emit("pointerDown")))}function z(K){if(!LS(K,r)&&K.touches.length>=2)return ne(K);let ee=a.readPoint(K),ie=a.readPoint(K,y),ze=Hp(ee,N),Ke=Hp(ie,U);if(!_&&!E&&(!K.cancelable||(_=ze>Ke,!_)))return ne(K);let Lt=a.pointerMove(K);ze>g&&(B=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(Lt)),K.preventDefault()}function ne(K){let ee=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(K)*oe(),ze=X(w(ie),ee),Ke=I8(ie,ze),Lt=A-10*Ke,Ne=v+Ke/50;_=!1,O=!1,I.clear(),u.useDuration(Lt).useFriction(Ne),l.distance(ze,!m),E=!1,f.emit("pointerUp")}function he(K){B&&(K.stopPropagation(),K.preventDefault(),B=!1)}function xe(){return O}return{init:J,destroy:ae,pointerDown:xe}}function E8(e,t){let r,n;function a(d){return d.timeStamp}function i(d,f){let m=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(LS(d,t)?d:d.touches[0])[m]}function s(d){return r=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(r)>170;return n=d,p&&(r=d),f}function u(d){if(!r||!n)return 0;let f=i(n)-i(r),p=a(d)-a(r),m=a(d)-a(n)>170,g=f/p;return p&&!m&&gt(g)>.1?g:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function A8(){function e(o){let{offsetTop:r,offsetLeft:n,offsetWidth:a,offsetHeight:i}=o;return{top:r,right:n+a,bottom:r+i,left:n,width:a,height:i}}return{measure:e}}function D8(e){function t(r){return e*(r/100)}return{measure:t}}function N8(e,t,o,r,n,a,i){let s=[e].concat(r),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=r.map(f);function v(h){for(let y of h){if(d)return;let w=y.target===e,C=r.indexOf(y.target),S=w?u:c[C],R=f(w?e:r[C]);if(gt(R-S)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(h=>{(Kv(a)||a(x,h))&&v(h)}),o.requestAnimationFrame(()=>{s.forEach(h=>l.observe(h))})}function m(){d=!0,l&&l.disconnect()}return{init:p,destroy:m}}function O8(e,t,o,r,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let S=r.get()-e.get(),R=!l,I=0;return R?(i=0,o.set(r),e.set(r),I=S):(o.set(e),i+=S/l,i*=u,c+=i,e.add(i),I=c-d),s=kS(I),d=c,C}function p(){let S=r.get()-t.get();return gt(S)<.001}function m(){return l}function g(){return s}function x(){return i}function v(){return y(n)}function h(){return w(a)}function y(S){return l=S,C}function w(S){return u=S,C}let C={direction:g,duration:m,velocity:x,seek:f,settled:p,useBaseFriction:h,useBaseDuration:v,useFriction:w,useDuration:y};return C}function F8(e,t,o,r,n){let a=n.measure(10),i=n.measure(50),s=Ml(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(o.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let m=e.reachedMin(t.get())?"min":"max",g=gt(e[m]-t.get()),x=o.get()-t.get(),v=s.constrain(g/i);o.subtract(x*v),!p&&gt(x)<a&&(o.set(e.constrain(o.get())),r.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function _8(e,t,o,r,n){let a=Ml(-t+e,0),i=d(),s=c(),l=f();function u(m,g){return Hp(m,g)<=1}function c(){let m=i[0],g=En(i),x=i.lastIndexOf(m),v=i.indexOf(g)+1;return Ml(x,v)}function d(){return o.map((m,g)=>{let{min:x,max:v}=a,h=a.constrain(m),y=!g,w=MS(o,g);return y?v:w||u(x,h)?x:u(v,h)?v:h}).map(m=>parseFloat(m.toFixed(3)))}function f(){if(t<=e+n)return[a.max];if(r==="keepSnaps")return i;let{min:m,max:g}=s;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:s}}function V8(e,t,o){let r=t[0],n=o?r-e:En(t);return{limit:Ml(n,r)}}function B8(e,t,o,r){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Ml(a,i);function u(f){return f===1?l(o.get()):f===-1?s(o.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);r.forEach(m=>m.add(p))}return{loop:c}}function H8(e){let{max:t,length:o}=e;function r(a){let i=a-t;return o?i/-o:0}return{get:r}}function U8(e,t,o,r,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(r).map(g=>En(g)[i]-g[0][a]).map(gt)}function f(){return r.map(g=>o[a]-g[a]).map(g=>-gt(g))}function p(){return s(u).map(g=>g[0]).map((g,x)=>g+l[x])}return{snaps:u,snapsAligned:c}}function z8(e,t,o,r,n,a){let{groupSlides:i}=n,{min:s,max:l}=r,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return o.length===1?[a]:p?f:f.slice(s,l).map((m,g,x)=>{let v=!g,h=MS(x,g);if(v){let y=En(x[0])+1;return SN(y)}if(h){let y=Wp(a)-En(x)[0]+1;return SN(y,En(x)[0])}return m})}return{slideRegistry:u}}function G8(e,t,o,r,n){let{reachedAny:a,removeOffset:i,constrain:s}=r;function l(m){return m.concat().sort((g,x)=>gt(g)-gt(x))[0]}function u(m){let g=e?i(m):s(m),x=t.map((h,y)=>({diff:c(h-g,0),index:y})).sort((h,y)=>gt(h.diff)-gt(y.diff)),{index:v}=x[0];return{index:v,distance:g}}function c(m,g){let x=[m,m+o,m-o];if(!e)return m;if(!g)return l(x);let v=x.filter(h=>kS(h)===g);return v.length?l(v):En(x)-o}function d(m,g){let x=t[m]-n.get(),v=c(x,g);return{index:m,distance:v}}function f(m,g){let x=n.get()+m,{index:v,distance:h}=u(x),y=!e&&a(x);if(!g||y)return{index:v,distance:m};let w=t[v]-h,C=m+c(w,0);return{index:v,distance:C}}return{byDistance:f,byIndex:d,shortcut:c}}function W8(e,t,o,r,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(o.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,f){let p=n.byDistance(d,f);s(p)}function u(d,f){let p=t.clone().set(d),m=n.byIndex(p.get(),f);s(m)}return{distance:l,index:u}}function j8(e,t,o,r,n,a,i,s){let l={passive:!0,capture:!0},u=0;function c(p){if(!s)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;let h=o.findIndex(y=>y.includes(g));TS(h)&&(n.useDuration(0),r.index(h,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((g,x)=>{a.add(g,"focus",v=>{(Kv(s)||s(p,v))&&m(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Bp(e){let t=e;function o(){return t}function r(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return TS(l)?l:l.get()}return{get:o,set:r,add:n,subtract:a}}function IN(e,t){let o=e.scroll==="x"?i:s,r=t.style,n=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function s(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(a)return;let p=P8(e.direction(f));p!==n&&(r.transform=o(p),n=p)}function u(f){a=!f}function c(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function q8(e,t,o,r,n,a,i,s,l){let c=Up(n),d=Up(n).reverse(),f=v().concat(h());function p(R,I){return R.reduce((T,L)=>T-n[L],I)}function m(R,I){return R.reduce((T,L)=>p(T,I)>0?T.concat([L]):T,[])}function g(R){return a.map((I,T)=>({start:I-r[T]+.5+R,end:I+t-.5+R}))}function x(R,I,T){let L=g(I);return R.map(k=>{let A=T?0:-o,F=T?o:0,N=T?"end":"start",U=L[k][N];return{index:k,loopPoint:U,slideLocation:Bp(-1),translate:IN(e,l[k]),target:()=>s.get()>U?A:F}})}function v(){let R=i[0],I=m(d,R);return x(I,o,!1)}function h(){let R=t-i[0]-1,I=m(c,R);return x(I,-o,!0)}function y(){return f.every(({index:R})=>{let I=c.filter(T=>T!==R);return p(I,t)<=.1})}function w(){f.forEach(R=>{let{target:I,translate:T,slideLocation:L}=R,k=I();k!==L.get()&&(T.to(k),L.set(k))})}function C(){f.forEach(R=>R.translate.clear())}return{canLoop:y,clear:C,loop:w,loopPoints:f}}function $8(e,t,o){let r,n=!1;function a(l){if(!o)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(c=>{n||(Kv(o)||o(l,c))&&u(c)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:a,destroy:i}}function K8(e,t,o,r){let n={},a=null,i=null,s,l=!1;function u(){s=new IntersectionObserver(m=>{l||(m.forEach(g=>{let x=t.indexOf(g.target);n[x]=g}),a=null,i=null,o.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(m=>s.observe(m))}function c(){s&&s.disconnect(),l=!0}function d(m){return zp(n).reduce((g,x)=>{let v=parseInt(x),{isIntersecting:h}=n[v];return(m&&h||!m&&!h)&&g.push(v),g},[])}function f(m=!0){if(m&&a)return a;if(!m&&i)return i;let g=d(m);return m&&(a=g),m||(i=g),g}return{init:u,destroy:c,get:f}}function X8(e,t,o,r,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=o[0]&&n,c=m(),d=g(),f=o.map(i),p=x();function m(){if(!u)return 0;let h=o[0];return gt(t[s]-h[s])}function g(){if(!u)return 0;let h=a.getComputedStyle(En(r));return parseFloat(h.getPropertyValue(`margin-${l}`))}function x(){return o.map((h,y,w)=>{let C=!y,S=MS(w,y);return C?f[y]+c:S?f[y]+d:w[y+1][s]-h[s]}).map(gt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function Y8(e,t,o,r,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=TS(o);function p(v,h){return Up(v).filter(y=>y%h===0).map(y=>v.slice(y,y+h))}function m(v){return v.length?Up(v).reduce((h,y,w)=>{let C=En(h)||0,S=C===0,R=y===Wp(v),I=n[u]-a[C][u],T=n[u]-a[y][c],L=!r&&S?d(i):0,k=!r&&R?d(s):0,A=gt(T-k-(I+L));return w&&A>t+l&&h.push(y),R&&h.push(v.length),h},[]).map((h,y,w)=>{let C=Math.max(w[y-1]||0);return v.slice(C,h)}):[]}function g(v){return f?p(v,o):m(v)}return{groupSlides:g}}function Q8(e,t,o,r,n,a,i){let{align:s,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:g,slidesToScroll:x,skipSnaps:v,containScroll:h,watchResize:y,watchSlides:w,watchDrag:C,watchFocus:S}=a,R=2,I=A8(),T=I.measure(t),L=o.map(I.measure),k=k8(l,u),A=k.measureSize(T),F=D8(A),N=L8(s,A),U=!d&&!!h,O=d||!!h,{slideSizes:_,slideSizesWithGaps:B,startGap:E,endGap:J}=X8(k,T,L,o,O,n),ae=Y8(k,A,x,d,T,L,E,J,R),{snaps:V,snapsAligned:Y}=U8(k,N,T,L,ae),oe=-En(V)+En(B),{snapsContained:X,scrollContainLimit:ce}=_8(A,oe,Y,h,R),z=U?X:Y,{limit:ne}=V8(oe,z,d),he=RN(Wp(z),c,d),xe=he.clone(),pe=Up(o),K=({dragHandler:vi,scrollBody:md,scrollBounds:gd,options:{loop:Tr}})=>{Tr||gd.constrain(vi.pointerDown()),md.seek()},Ie=({scrollBody:vi,translate:md,location:gd,offsetLocation:Tr,previousLocation:hd,scrollLooper:Ty,slideLooper:Sz,dragHandler:bz,animation:Rz,eventHandler:iP,scrollBounds:Iz,options:{loop:sP}},lP)=>{let uP=vi.settled(),Pz=!Iz.shouldConstrain(),cP=sP?uP:uP&&Pz,dP=cP&&!bz.pointerDown();dP&&Rz.stop();let Lz=gd.get()*lP+hd.get()*(1-lP);Tr.set(Lz),sP&&(Ty.loop(vi.direction()),Sz.loop()),md.to(Tr.get()),dP&&iP.emit("settle"),cP||iP.emit("scroll")},ee=T8(r,n,()=>K(eu),vi=>Ie(eu,vi)),ie=.68,ze=z[he.get()],Ke=Bp(ze),Lt=Bp(ze),Ne=Bp(ze),Ct=Bp(ze),$n=O8(Ke,Ne,Lt,Ct,f,ie),To=G8(d,z,oe,ne,Ct),un=W8(ee,he,xe,$n,To,Ct,i),Lr=H8(ne),cn=Gp(),Kn=K8(t,o,i,g),{slideRegistry:Xn}=z8(U,h,z,ce,ae,pe),Vm=j8(e,o,Xn,un,$n,cn,i,S),eu={ownerDocument:r,ownerWindow:n,eventHandler:i,containerRect:T,slideRects:L,animation:ee,axis:k,dragHandler:M8(k,e,r,n,Ct,E8(k,n),Ke,ee,un,$n,To,he,i,F,p,m,v,ie,C),eventStore:cn,percentOfView:F,index:he,indexPrevious:xe,limit:ne,location:Ke,offsetLocation:Ne,previousLocation:Lt,options:a,resizeHandler:N8(t,i,n,o,k,y,I),scrollBody:$n,scrollBounds:F8(ne,Ne,Ct,$n,F),scrollLooper:B8(oe,ne,Ne,[Ke,Ne,Lt,Ct]),scrollProgress:Lr,scrollSnapList:z.map(Lr.get),scrollSnaps:z,scrollTarget:To,scrollTo:un,slideLooper:q8(k,A,oe,_,B,V,z,Ne,o),slideFocus:Vm,slidesHandler:$8(t,i,w),slidesInView:Kn,slideIndexes:pe,slideRegistry:Xn,slidesToScroll:ae,target:Ct,translate:IN(k,t)};return eu}function Z8(){let e={},t;function o(u){t=u}function r(u){return e[u]||[]}function n(u){return r(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=r(u).concat([c]),l}function i(u,c){return e[u]=r(u).filter(d=>d!==c),l}function s(){e={}}let l={init:o,emit:n,off:i,on:a,clear:s};return l}var J8={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function e$(e){function t(a,i){return bN(a,i||{})}function o(a){let i=a.breakpoints||{},s=zp(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function r(a){return a.map(i=>zp(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:o,optionsMediaQueries:r}}function t$(e){let t=[];function o(a,i){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:o,destroy:r}}function jp(e,t,o){let r=e.ownerDocument,n=r.defaultView,a=e$(n),i=t$(a),s=Gp(),l=Z8(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=l,g=k,x=!1,v,h=u(J8,jp.globalOptions),y=u(h),w=[],C,S,R;function I(){let{container:pe,slides:K}=y;S=(PS(pe)?e.querySelector(pe):pe)||e.children[0];let ee=PS(K)?S.querySelectorAll(K):K;R=[].slice.call(ee||S.children)}function T(pe){let K=Q8(e,S,R,r,n,pe,l);if(pe.loop&&!K.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return T(Ie)}return K}function L(pe,K){x||(h=u(h,pe),y=c(h),w=K||w,I(),v=T(y),d([h,...w.map(({options:Ie})=>Ie)]).forEach(Ie=>s.add(Ie,"change",k)),y.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(xe),v.eventHandler.init(xe),v.resizeHandler.init(xe),v.slidesHandler.init(xe),v.options.loop&&v.slideLooper.loop(),S.offsetParent&&R.length&&v.dragHandler.init(xe),C=i.init(xe,w)))}function k(pe,K){let Ie=ae();A(),L(u({startIndex:Ie},pe),K),l.emit("reInit")}function A(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),i.destroy(),s.clear()}function F(){x||(x=!0,s.clear(),A(),l.emit("destroy"),l.clear())}function N(pe,K,Ie){!y.active||x||(v.scrollBody.useBaseFriction().useDuration(K===!0?0:y.duration),v.scrollTo.index(pe,Ie||0))}function U(pe){let K=v.index.add(1).get();N(K,pe,-1)}function O(pe){let K=v.index.add(-1).get();N(K,pe,1)}function _(){return v.index.add(1).get()!==ae()}function B(){return v.index.add(-1).get()!==ae()}function E(){return v.scrollSnapList}function J(){return v.scrollProgress.get(v.offsetLocation.get())}function ae(){return v.index.get()}function V(){return v.indexPrevious.get()}function Y(){return v.slidesInView.get()}function oe(){return v.slidesInView.get(!1)}function X(){return C}function ce(){return v}function z(){return e}function ne(){return S}function he(){return R}let xe={canScrollNext:_,canScrollPrev:B,containerNode:ne,internalEngine:ce,destroy:F,off:p,on:f,emit:m,plugins:X,previousScrollSnap:V,reInit:g,rootNode:z,scrollNext:U,scrollPrev:O,scrollProgress:J,scrollSnapList:E,scrollTo:N,selectedScrollSnap:ae,slideNodes:he,slidesInView:Y,slidesNotInView:oe};return L(t,o),setTimeout(()=>l.emit("init"),0),xe}jp.globalOptions=void 0;function Xv(e={},t=[]){let o=(0,Ur.useRef)(e),r=(0,Ur.useRef)(t),[n,a]=(0,Ur.useState)(),[i,s]=(0,Ur.useState)(),l=(0,Ur.useCallback)(()=>{n&&n.reInit(o.current,r.current)},[n]);return(0,Ur.useEffect)(()=>{$v(o.current,e)||(o.current=e,l())},[e,l]),(0,Ur.useEffect)(()=>{wN(r.current,t)||(r.current=t,l())},[t,l]),(0,Ur.useEffect)(()=>{if(yN()&&i){jp.globalOptions=Xv.globalOptions;let u=jp(i,o.current,r.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Xv.globalOptions=void 0;var xr=b(D()),PN=Rt.createContext(null);function qp(){let e=Rt.useContext(PN);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var LN=Rt.forwardRef(({orientation:e="horizontal",opts:t,setApi:o,plugins:r,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Xv({...t,axis:l==="horizontal"?"x":"y"},r),[d,f]=Rt.useState(!1),[p,m]=Rt.useState(!1),g=Rt.useCallback(y=>{y&&(f(y.canScrollPrev()),m(y.canScrollNext()))},[]),x=Rt.useCallback(()=>{c?.scrollPrev()},[c]),v=Rt.useCallback(()=>{c?.scrollNext()},[c]),h=Rt.useCallback(y=>{let w=l==="horizontal"?"ArrowLeft":"ArrowUp",C=l==="horizontal"?"ArrowRight":"ArrowDown";y.key===w?(y.preventDefault(),x()):y.key===C&&(y.preventDefault(),v())},[l,x,v]);return Rt.useEffect(()=>{!c||!o||o(c)},[c,o]),Rt.useEffect(()=>{if(c)return g(c),c.on("reInit",g),c.on("select",g),()=>{c.off("reInit",g),c.off("select",g)}},[c,g]),(0,xr.jsx)(PN.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:x,scrollNext:v,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,xr.jsx)("div",{ref:s,onKeyDownCapture:h,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});LN.displayName="Carousel";var TN=Q("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),kN=Rt.forwardRef(({className:e,...t},o)=>{let{carouselRef:r,orientation:n}=qp();return(0,xr.jsx)("div",{ref:r,className:"overflow-hidden",children:(0,xr.jsx)("div",{ref:o,className:P(TN({orientation:n}),e),...t})})});kN.displayName="CarouselContent";var MN=Q("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),EN=Rt.forwardRef(({className:e,...t},o)=>{let{orientation:r}=qp();return(0,xr.jsx)("div",{ref:o,role:"group","aria-roledescription":"slide",className:P(MN({orientation:r}),e),...t})});EN.displayName="CarouselItem";var AN=Rt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=qp();return(0,xr.jsxs)(De,{ref:n,variant:t,size:o,rounded:"full",className:P("absolute",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...r,children:[(0,xr.jsx)(gf,{className:"h-4 w-4","aria-hidden":"true"}),(0,xr.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});AN.displayName="CarouselPrevious";var DN=Rt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=qp();return(0,xr.jsxs)(De,{ref:n,variant:t,size:o,rounded:"full",className:P("absolute",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...r,children:[(0,xr.jsx)(hf,{className:"h-4 w-4","aria-hidden":"true"}),(0,xr.jsx)("span",{className:"sr-only",children:"Next slide"})]})});DN.displayName="CarouselNext";var An=b(M());var Oo=b(M(),1);var Yv=b(M(),1);function Mc(e){let t=Yv.useRef({value:e,previous:e});return Yv.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var NN=b(M(),1);function Ec(e){let[t,o]=NN.useState(void 0);return _e(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=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;o({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var yr=b(D(),1),Qv="Checkbox",[o$,Ybe]=Oe(Qv),[r$,ES]=o$(Qv);function n$(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=qe({prop:o,defaultProp:n??!1,onChange:l,caller:Qv}),[m,g]=Oo.useState(null),[x,v]=Oo.useState(null),h=Oo.useRef(!1),y=m?!!i||!!m.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:m,setControl:g,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:h,required:u,defaultChecked:ls(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:v};return(0,yr.jsx)(r$,{scope:t,...w,children:a$(d)?d(w):r})}var ON="CheckboxTrigger",FN=Oo.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=ES(ON,e),g=de(n,c),x=Oo.useRef(l);return Oo.useEffect(()=>{let v=a?.form;if(v){let h=()=>d(x.current);return v.addEventListener("reset",h),()=>v.removeEventListener("reset",h)}},[a,d]),(0,yr.jsx)($.button,{type:"button",role:"checkbox","aria-checked":ls(l)?"mixed":l,"aria-required":u,"data-state":HN(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:W(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:W(o,v=>{d(h=>ls(h)?!0:!h),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});FN.displayName=ON;var Zv=Oo.forwardRef((e,t)=>{let{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,yr.jsx)(n$,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(FN,{...d,ref:t,__scopeCheckbox:o}),f&&(0,yr.jsx)(BN,{__scopeCheckbox:o})]})})});Zv.displayName=Qv;var _N="CheckboxIndicator",AS=Oo.forwardRef((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...n}=e,a=ES(_N,o);return(0,yr.jsx)(st,{present:r||ls(a.checked)||a.checked===!0,children:(0,yr.jsx)($.span,{"data-state":HN(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});AS.displayName=_N;var VN="CheckboxBubbleInput",BN=Oo.forwardRef(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=ES(VN,e),m=de(o,p),g=Mc(a),x=Ec(r);Oo.useEffect(()=>{let h=f;if(!h)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,S=!n.current;if(g!==a&&C){let R=new Event("click",{bubbles:S});h.indeterminate=ls(a),C.call(h,ls(a)?!1:a),h.dispatchEvent(R)}},[f,g,a,n]);let v=Oo.useRef(ls(a)?!1:a);return(0,yr.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:m,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});BN.displayName=VN;function a$(e){return typeof e=="function"}function ls(e){return e==="indeterminate"}function HN(e){return ls(e)?"indeterminate":e?"checked":"unchecked"}var zr=b(D()),s$=Q("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"}}),DS=An.forwardRef(({className:e,variant:t,size:o,radius:r,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>{let[c,d]=An.useState(a);return An.useEffect(()=>{d(a)},[a]),(0,zr.jsx)(Zv,{ref:u,checked:c?!1:s,className:P("moonui-theme",s$({variant:t,size:o,radius:r,animation:n}),e),...l,children:(0,zr.jsx)(AS,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,zr.jsx)(Af,{className:"h-[65%] w-[65%]"}):i||(0,zr.jsx)(go,{className:"h-[65%] w-[65%]"})})})});DS.displayName=Zv.displayName;var UN=An.forwardRef(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...n},a)=>(0,zr.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...n,children:r}));UN.displayName="CheckboxGroup";var Jv=An.forwardRef(({className:e,htmlFor:t,children:o,position:r="end",disabled:n=!1,...a},i)=>(0,zr.jsx)("label",{ref:i,htmlFor:t,className:P("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:o}));Jv.displayName="CheckboxLabel";var zN=An.forwardRef(({id:e,label:t,labelPosition:o="end",labelClassName:r,...n},a)=>{let i=An.useId(),s=e||i;return(0,zr.jsxs)("div",{className:"flex items-center",children:[o==="start"&&(0,zr.jsx)(Jv,{htmlFor:s,position:"start",disabled:n.disabled,className:r,children:t}),(0,zr.jsx)(DS,{ref:a,id:s,...n}),o==="end"&&(0,zr.jsx)(Jv,{htmlFor:s,position:"end",disabled:n.disabled,className:r,children:t})]})});zN.displayName="CheckboxWithLabel";var NS=b(M());var El=b(D()),l$=uh,GN=Q("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"}}),WN=NS.forwardRef(({className:e,children:t,variant:o,size:r,asChild:n,...a},i)=>n?(0,El.jsx)(Du,{ref:i,className:P("moonui-theme",GN({variant:o,size:r}),e),asChild:n,...a,children:t}):(0,El.jsxs)(Du,{ref:i,className:P("moonui-theme",GN({variant:o,size:r}),e),...a,children:[t,(0,El.jsx)(na,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));WN.displayName=Du.displayName;var u$=Q("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"}}),jN=NS.forwardRef(({className:e,children:t,variant:o,size:r,...n},a)=>(0,El.jsx)(uf,{ref:a,className:P("moonui-theme",u$({variant:o,size:r}),e),...n,children:(0,El.jsx)("div",{className:"p-4",children:t})}));jN.displayName=uf.displayName;var Kr=b(M());var Al=b(M());var wr=b(D()),c$=Q("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),d$=Q(["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-800/80 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 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 dark:bg-transparent"},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}}),Co=Al.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:n,isError:a,disabled:i,error:s,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,label:m,floatingLabel:g=!1,floatingLabelClassName:x,value:v,defaultValue:h,onChange:y,onFocus:w,onBlur:C,placeholder:S,...R},I)=>{let[T,L]=Al.useState(!1),[k,A]=Al.useState(v||h||""),N=T||k!==""&&k!==null&&k!==void 0,U=J=>{L(!0),w?.(J)},O=J=>{L(!1),C?.(J)},_=J=>{A(J.target.value),y?.(J)};Al.useEffect(()=>{v!==void 0&&A(v)},[v]);let B=p||s||l,E=s?"error":l?"success":"normal";return(0,wr.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,wr.jsxs)("div",{className:P("moonui-theme",c$({size:n}),t),children:[g&&m&&(0,wr.jsx)("label",{htmlFor:R.id,className:P("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",N?"top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1":"top-1/2 -translate-y-1/2 text-sm",T&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",x),children:m}),c&&(0,wr.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,wr.jsx)(_t,{className:"h-4 w-4 animate-spin"}):c}),(0,wr.jsx)("input",{className:P(d$({variant:r,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:I,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?`${R.id||""}-error`:l?`${R.id||""}-success`:void 0,value:v,defaultValue:h,onChange:_,onFocus:U,onBlur:O,placeholder:g?N?S:"":S,...R}),d&&!u&&(0,wr.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,wr.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,wr.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,wr.jsx)(_t,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),B&&(0,wr.jsx)("p",{className:P("text-xs transition-all",E==="error"&&"text-error",E==="success"&&"text-success",E==="normal"&&"text-muted-foreground",o),id:s?`${R.id||""}-error`:l?`${R.id||""}-success`:void 0,children:s||l||""})]})});Co.displayName="Input";var XN=b(M());var qN=b(M(),1);var $N=b(D(),1),f$="Label",KN=qN.forwardRef((e,t)=>(0,$N.jsx)($.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));KN.displayName=f$;var OS=KN;var YN=b(D()),m$=Q("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"),tr=XN.forwardRef(({className:e,...t},o)=>(0,YN.jsx)(OS,{ref:o,className:P(m$(),e),...t}));tr.displayName=OS.displayName;var iF=b(M());var ut=b(M(),1);var ht=b(M(),1);var QN=b(M(),1);function ZN(e,t=globalThis?.document){let o=rt(e);QN.useEffect(()=>{let r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var _S=b(D(),1),g$="DismissableLayer",FS="dismissableLayer.update",h$="dismissableLayer.pointerDownOutside",v$="dismissableLayer.focusOutside",JN,t2=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gr=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(t2),[c,d]=ht.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),m=de(t,R=>d(R)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),h=c?g.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=h>=v,C=y$(R=>{let I=R.target,T=[...u.branches].some(L=>L.contains(I));!w||T||(n?.(R),i?.(R),R.defaultPrevented||s?.())},f),S=w$(R=>{let I=R.target;[...u.branches].some(L=>L.contains(I))||(a?.(R),i?.(R),R.defaultPrevented||s?.())},f);return ZN(R=>{h===u.layers.size-1&&(r?.(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},f),ht.useEffect(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(JN=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),e2(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=JN)}},[c,f,o,u]),ht.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),e2())},[c,u]),ht.useEffect(()=>{let R=()=>p({});return document.addEventListener(FS,R),()=>document.removeEventListener(FS,R)},[]),(0,_S.jsx)($.div,{...l,ref:m,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,C.onPointerDownCapture)})});Gr.displayName=g$;var x$="DismissableLayerBranch",o2=ht.forwardRef((e,t)=>{let o=ht.useContext(t2),r=ht.useRef(null),n=de(t,r);return ht.useEffect(()=>{let a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),(0,_S.jsx)($.div,{...e,ref:n})});o2.displayName=x$;function y$(e,t=globalThis?.document){let o=rt(e),r=ht.useRef(!1),n=ht.useRef(()=>{});return ht.useEffect(()=>{let a=s=>{if(s.target&&!r.current){let u=function(){r2(h$,o,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);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function w$(e,t=globalThis?.document){let o=rt(e),r=ht.useRef(!1);return ht.useEffect(()=>{let n=a=>{a.target&&!r.current&&r2(v$,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function e2(){let e=new CustomEvent(FS);document.dispatchEvent(e)}function r2(e,t,o,{discrete:r}){let n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Au(n,a):n.dispatchEvent(a)}var n2=Gr,a2=o2;var s2=b(M(),1),VS=0;function us(){s2.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i2()),document.body.insertAdjacentElement("beforeend",e[1]??i2()),VS++,()=>{VS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),VS--}},[])}function i2(){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 Wr=b(M(),1);var f2=b(D(),1),BS="focusScope.autoFocusOnMount",HS="focusScope.autoFocusOnUnmount",l2={bubbles:!1,cancelable:!0},S$="FocusScope",Qa=Wr.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Wr.useState(null),u=rt(n),c=rt(a),d=Wr.useRef(null),f=de(t,g=>l(g)),p=Wr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Wr.useEffect(()=>{if(r){let h=function(S){if(p.paused||!s)return;let R=S.target;s.contains(R)?d.current=R:cs(d.current,{select:!0})},y=function(S){if(p.paused||!s)return;let R=S.relatedTarget;R!==null&&(s.contains(R)||cs(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(let I of S)I.removedNodes.length>0&&cs(s)};var g=h,x=y,v=w;document.addEventListener("focusin",h),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),C.disconnect()}}},[r,s,p.paused]),Wr.useEffect(()=>{if(s){c2.add(p);let g=document.activeElement;if(!s.contains(g)){let v=new CustomEvent(BS,l2);s.addEventListener(BS,u),s.dispatchEvent(v),v.defaultPrevented||(b$(T$(p2(s)),{select:!0}),document.activeElement===g&&cs(s))}return()=>{s.removeEventListener(BS,u),setTimeout(()=>{let v=new CustomEvent(HS,l2);s.addEventListener(HS,c),s.dispatchEvent(v),v.defaultPrevented||cs(g??document.body,{select:!0}),s.removeEventListener(HS,c),c2.remove(p)},0)}}},[s,u,c,p]);let m=Wr.useCallback(g=>{if(!o&&!r||p.paused)return;let x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(x&&v){let h=g.currentTarget,[y,w]=R$(h);y&&w?!g.shiftKey&&v===w?(g.preventDefault(),o&&cs(y,{select:!0})):g.shiftKey&&v===y&&(g.preventDefault(),o&&cs(w,{select:!0})):v===h&&g.preventDefault()}},[o,r,p.paused]);return(0,f2.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});Qa.displayName=S$;function b$(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(cs(r,{select:t}),document.activeElement!==o)return}function R$(e){let t=p2(e),o=u2(t,e),r=u2(t.reverse(),e);return[o,r]}function p2(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function u2(e,t){for(let o of e)if(!I$(o,{upTo:t}))return o}function I$(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 P$(e){return e instanceof HTMLInputElement&&"select"in e}function cs(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&P$(e)&&t&&e.select()}}var c2=L$();function L$(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=d2(e,t),e.unshift(t)},remove(t){e=d2(e,t),e[0]?.resume()}}}function d2(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function T$(e){return e.filter(t=>t.tagName!=="A")}var rr=b(M(),1);var h2=["top","right","bottom","left"];var pa=Math.min,Fo=Math.max,Kp=Math.round,Xp=Math.floor,Dn=e=>({x:e,y:e}),k$={left:"right",right:"left",bottom:"top",top:"bottom"},M$={start:"end",end:"start"};function tx(e,t,o){return Fo(e,pa(t,o))}function ma(e,t){return typeof e=="function"?e(t):e}function ga(e){return e.split("-")[0]}function Dl(e){return e.split("-")[1]}function ox(e){return e==="x"?"y":"x"}function rx(e){return e==="y"?"height":"width"}var E$=new Set(["top","bottom"]);function Nn(e){return E$.has(ga(e))?"y":"x"}function nx(e){return ox(Nn(e))}function v2(e,t,o){o===void 0&&(o=!1);let r=Dl(e),n=nx(e),a=rx(n),i=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=$p(i)),[i,$p(i)]}function x2(e){let t=$p(e);return[ex(e),t,ex(t)]}function ex(e){return e.replace(/start|end/g,t=>M$[t])}var m2=["left","right"],g2=["right","left"],A$=["top","bottom"],D$=["bottom","top"];function N$(e,t,o){switch(e){case"top":case"bottom":return o?t?g2:m2:t?m2:g2;case"left":case"right":return t?A$:D$;default:return[]}}function y2(e,t,o,r){let n=Dl(e),a=N$(ga(e),o==="start",r);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(ex)))),a}function $p(e){return e.replace(/left|right|bottom|top/g,t=>k$[t])}function O$(e){return{top:0,right:0,bottom:0,left:0,...e}}function US(e){return typeof e!="number"?O$(e):{top:e,right:e,bottom:e,left:e}}function Nl(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function w2(e,t,o){let{reference:r,floating:n}=e,a=Nn(t),i=nx(t),s=rx(i),l=ga(t),u=a==="y",c=r.x+r.width/2-n.width/2,d=r.y+r.height/2-n.height/2,f=r[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:r.y-n.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-n.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Dl(t)){case"start":p[i]-=f*(o&&u?-1:1);break;case"end":p[i]+=f*(o&&u?-1:1);break}return p}var b2=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:i}=o,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}=w2(u,r,l),f=r,p={},m=0;for(let g=0;g<s.length;g++){let{name:x,fn:v}=s[g],{x:h,y,data:w,reset:C}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=h??c,d=y??d,p={...p,[x]:{...p[x],...w}},C&&m<=50&&(m++,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}=w2(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function Ac(e,t){var o;t===void 0&&(t={});let{x:r,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}=ma(t,e),m=US(p),x=s[f?d==="floating"?"reference":"floating":d],v=Nl(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(x)))==null||o?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),h=d==="floating"?{x:r,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=Nl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:h,offsetParent:y,strategy:l}):h);return{top:(v.top-C.top+m.top)/w.y,bottom:(C.bottom-v.bottom+m.bottom)/w.y,left:(v.left-C.left+m.left)/w.x,right:(C.right-v.right+m.right)/w.x}}var R2=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=ma(e,t)||{};if(u==null)return{};let d=US(c),f={x:o,y:r},p=nx(n),m=rx(p),g=await i.getDimensions(u),x=p==="y",v=x?"top":"left",h=x?"bottom":"right",y=x?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],C=f[p]-a.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),R=S?S[y]:0;(!R||!await(i.isElement==null?void 0:i.isElement(S)))&&(R=s.floating[y]||a.floating[m]);let I=w/2-C/2,T=R/2-g[m]/2-1,L=pa(d[v],T),k=pa(d[h],T),A=L,F=R-g[m]-k,N=R/2-g[m]/2+I,U=tx(A,N,F),O=!l.arrow&&Dl(n)!=null&&N!==U&&a.reference[m]/2-(N<A?L:k)-g[m]/2<0,_=O?N<A?N-A:N-F:0;return{[p]:f[p]+_,data:{[p]:U,centerOffset:N-U-_,...O&&{alignmentOffset:_}},reset:O}}});var I2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;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:m="none",flipAlignment:g=!0,...x}=ma(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};let v=ga(n),h=Nn(s),y=ga(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!g?[$p(s)]:x2(s)),S=m!=="none";!f&&S&&C.push(...y2(s,g,m,w));let R=[s,...C],I=await Ac(t,x),T=[],L=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&T.push(I[v]),d){let N=v2(n,i,w);T.push(I[N[0]],I[N[1]])}if(L=[...L,{placement:n,overflows:T}],!T.every(N=>N<=0)){var k,A;let N=(((k=a.flip)==null?void 0:k.index)||0)+1,U=R[N];if(U&&(!(d==="alignment"?h!==Nn(U):!1)||L.every(B=>Nn(B.placement)===h?B.overflows[0]>0:!0)))return{data:{index:N,overflows:L},reset:{placement:U}};let O=(A=L.filter(_=>_.overflows[0]<=0).sort((_,B)=>_.overflows[1]-B.overflows[1])[0])==null?void 0:A.placement;if(!O)switch(p){case"bestFit":{var F;let _=(F=L.filter(B=>{if(S){let E=Nn(B.placement);return E===h||E==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(E=>E>0).reduce((E,J)=>E+J,0)]).sort((B,E)=>B[1]-E[1])[0])==null?void 0:F[0];_&&(O=_);break}case"initialPlacement":O=s;break}if(n!==O)return{reset:{placement:O}}}return{}}}};function C2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function S2(e){return h2.some(t=>e[t]>=0)}var P2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...n}=ma(e,t);switch(r){case"referenceHidden":{let a=await Ac(t,{...n,elementContext:"reference"}),i=C2(a,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:S2(i)}}}case"escaped":{let a=await Ac(t,{...n,altBoundary:!0}),i=C2(a,o.floating);return{data:{escapedOffsets:i,escaped:S2(i)}}}default:return{}}}}};var L2=new Set(["left","top"]);async function F$(e,t){let{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=ga(o),s=Dl(o),l=Nn(o)==="y",u=L2.has(i)?-1:1,c=a&&l?-1:1,d=ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var T2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await F$(t,e);return i===((o=s.offset)==null?void 0:o.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},k2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:v,y:h}=x;return{x:v,y:h}}},...l}=ma(e,t),u={x:o,y:r},c=await Ac(t,l),d=Nn(ga(n)),f=ox(d),p=u[f],m=u[d];if(a){let x=f==="y"?"top":"left",v=f==="y"?"bottom":"right",h=p+c[x],y=p-c[v];p=tx(h,p,y)}if(i){let x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",h=m+c[x],y=m-c[v];m=tx(h,m,y)}let g=s.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-o,y:g.y-r,enabled:{[f]:a,[d]:i}}}}}},M2=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=ma(e,t),c={x:o,y:r},d=Nn(n),f=ox(d),p=c[f],m=c[d],g=ma(s,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};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,h;let y=f==="y"?"width":"height",w=L2.has(ga(n)),C=a.reference[d]-a.floating[y]+(w&&((v=i.offset)==null?void 0:v[d])||0)+(w?0:x.crossAxis),S=a.reference[d]+a.reference[y]+(w?0:((h=i.offset)==null?void 0:h[d])||0)-(w?x.crossAxis:0);m<C?m=C:m>S&&(m=S)}return{[f]:p,[d]:m}}}},E2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=ma(e,t),c=await Ac(t,u),d=ga(n),f=Dl(n),p=Nn(n)==="y",{width:m,height:g}=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 h=g-c.top-c.bottom,y=m-c.left-c.right,w=pa(g-c[x],h),C=pa(m-c[v],y),S=!t.middlewareData.shift,R=w,I=C;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(I=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=h),S&&!f){let L=Fo(c.left,0),k=Fo(c.right,0),A=Fo(c.top,0),F=Fo(c.bottom,0);p?I=m-2*(L!==0||k!==0?L+k:Fo(c.left,c.right)):R=g-2*(A!==0||F!==0?A+F:Fo(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:R});let T=await i.getDimensions(s.floating);return m!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function ax(){return typeof window<"u"}function Fl(e){return D2(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function On(e){var t;return(t=(D2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function D2(e){return ax()?e instanceof Node||e instanceof or(e).Node:!1}function jr(e){return ax()?e instanceof Element||e instanceof or(e).Element:!1}function Fn(e){return ax()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function A2(e){return!ax()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}var _$=new Set(["inline","contents"]);function Dc(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!_$.has(n)}var V$=new Set(["table","td","th"]);function N2(e){return V$.has(Fl(e))}var B$=[":popover-open",":modal"];function Yp(e){return B$.some(t=>{try{return e.matches(t)}catch{return!1}})}var H$=["transform","translate","scale","rotate","perspective"],U$=["transform","translate","scale","rotate","perspective","filter"],z$=["paint","layout","strict","content"];function ix(e){let t=sx(),o=jr(e)?qr(e):e;return H$.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)||U$.some(r=>(o.willChange||"").includes(r))||z$.some(r=>(o.contain||"").includes(r))}function O2(e){let t=Za(e);for(;Fn(t)&&!_l(t);){if(ix(t))return t;if(Yp(t))return null;t=Za(t)}return null}function sx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var G$=new Set(["html","body","#document"]);function _l(e){return G$.has(Fl(e))}function qr(e){return or(e).getComputedStyle(e)}function Qp(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Za(e){if(Fl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||A2(e)&&e.host||On(e);return A2(t)?t.host:t}function F2(e){let t=Za(e);return _l(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fn(t)&&Dc(t)?t:F2(t)}function Ol(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=F2(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=or(n);if(a){let s=lx(i);return t.concat(i,i.visualViewport||[],Dc(n)?n:[],s&&o?Ol(s):[])}return t.concat(n,Ol(n,[],o))}function lx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function H2(e){let t=qr(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=Fn(e),a=n?e.offsetWidth:o,i=n?e.offsetHeight:r,s=Kp(o)!==a||Kp(r)!==i;return s&&(o=a,r=i),{width:o,height:r,$:s}}function GS(e){return jr(e)?e:e.contextElement}function Nc(e){let t=GS(e);if(!Fn(t))return Dn(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:a}=H2(t),i=(a?Kp(o.width):o.width)/r,s=(a?Kp(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var W$=Dn(0);function U2(e){let t=or(e);return!sx()||!t.visualViewport?W$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function j$(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==or(e)?!1:t}function Vl(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),a=GS(e),i=Dn(1);t&&(r?jr(r)&&(i=Nc(r)):i=Nc(e));let s=j$(a,o,r)?U2(a):Dn(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=or(a),p=r&&jr(r)?or(r):r,m=f,g=lx(m);for(;g&&r&&p!==m;){let x=Nc(g),v=g.getBoundingClientRect(),h=qr(g),y=v.left+(g.clientLeft+parseFloat(h.paddingLeft))*x.x,w=v.top+(g.clientTop+parseFloat(h.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=w,m=or(g),g=lx(m)}}return Nl({width:c,height:d,x:l,y:u})}function ux(e,t){let o=Qp(e).scrollLeft;return t?t.left+o:Vl(On(e)).left+o}function z2(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-ux(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function q$(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,a=n==="fixed",i=On(r),s=t?Yp(t.floating):!1;if(r===i||s&&a)return o;let l={scrollLeft:0,scrollTop:0},u=Dn(1),c=Dn(0),d=Fn(r);if((d||!d&&!a)&&((Fl(r)!=="body"||Dc(i))&&(l=Qp(r)),Fn(r))){let p=Vl(r);u=Nc(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=i&&!d&&!a?z2(i,l):Dn(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 $$(e){return Array.from(e.getClientRects())}function K$(e){let t=On(e),o=Qp(e),r=e.ownerDocument.body,n=Fo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Fo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-o.scrollLeft+ux(e),s=-o.scrollTop;return qr(r).direction==="rtl"&&(i+=Fo(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:i,y:s}}var _2=25;function X$(e,t){let o=or(e),r=On(e),n=o.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=sx();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=ux(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-p);m<=_2&&(a-=m)}else u<=_2&&(a+=u);return{width:a,height:i,x:s,y:l}}var Y$=new Set(["absolute","fixed"]);function Q$(e,t){let o=Vl(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=Fn(e)?Nc(e):Dn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function V2(e,t,o){let r;if(t==="viewport")r=X$(e,o);else if(t==="document")r=K$(On(e));else if(jr(t))r=Q$(t,o);else{let n=U2(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Nl(r)}function G2(e,t){let o=Za(e);return o===t||!jr(o)||_l(o)?!1:qr(o).position==="fixed"||G2(o,t)}function Z$(e,t){let o=t.get(e);if(o)return o;let r=Ol(e,[],!1).filter(s=>jr(s)&&Fl(s)!=="body"),n=null,a=qr(e).position==="fixed",i=a?Za(e):e;for(;jr(i)&&!_l(i);){let s=qr(i),l=ix(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&Y$.has(n.position)||Dc(i)&&!l&&G2(e,i))?r=r.filter(c=>c!==i):n=s,i=Za(i)}return t.set(e,r),r}function J$(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?Yp(t)?[]:Z$(t,this._c):[].concat(o),r],s=i[0],l=i.reduce((u,c)=>{let d=V2(t,c,n);return u.top=Fo(d.top,u.top),u.right=pa(d.right,u.right),u.bottom=pa(d.bottom,u.bottom),u.left=Fo(d.left,u.left),u},V2(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function e9(e){let{width:t,height:o}=H2(e);return{width:t,height:o}}function t9(e,t,o){let r=Fn(t),n=On(t),a=o==="fixed",i=Vl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Dn(0);function u(){l.x=ux(n)}if(r||!r&&!a)if((Fl(t)!=="body"||Dc(n))&&(s=Qp(t)),r){let p=Vl(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!r&&n&&u();let c=n&&!r&&!a?z2(n,s):Dn(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 zS(e){return qr(e).position==="static"}function B2(e,t){if(!Fn(e)||qr(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return On(e)===o&&(o=o.ownerDocument.body),o}function W2(e,t){let o=or(e);if(Yp(e))return o;if(!Fn(e)){let n=Za(e);for(;n&&!_l(n);){if(jr(n)&&!zS(n))return n;n=Za(n)}return o}let r=B2(e,t);for(;r&&N2(r)&&zS(r);)r=B2(r,t);return r&&_l(r)&&zS(r)&&!ix(r)?o:r||O2(e)||o}var o9=async function(e){let t=this.getOffsetParent||W2,o=this.getDimensions,r=await o(e.floating);return{reference:t9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function r9(e){return qr(e).direction==="rtl"}var j2={convertOffsetParentRelativeRectToViewportRelativeRect:q$,getDocumentElement:On,getClippingRect:J$,getOffsetParent:W2,getElementRects:o9,getClientRects:$$,getDimensions:e9,getScale:Nc,isElement:jr,isRTL:r9};function q2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function n9(e,t){let o=null,r,n=On(e);function a(){var s;clearTimeout(r),(s=o)==null||s.disconnect(),o=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 m=Xp(d),g=Xp(n.clientWidth-(c+f)),x=Xp(n.clientHeight-(d+p)),v=Xp(c),y={rootMargin:-m+"px "+-g+"px "+-x+"px "+-v+"px",threshold:Fo(0,pa(1,l))||1},w=!0;function C(S){let R=S[0].intersectionRatio;if(R!==l){if(!w)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!q2(u,e.getBoundingClientRect())&&i(),w=!1}try{o=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{o=new IntersectionObserver(C,y)}o.observe(e)}return i(!0),a}function WS(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=GS(e),c=n||a?[...u?Ol(u):[],...Ol(t)]:[];c.forEach(v=>{n&&v.addEventListener("scroll",o,{passive:!0}),a&&v.addEventListener("resize",o)});let d=u&&s?n9(u,o):null,f=-1,p=null;i&&(p=new ResizeObserver(v=>{let[h]=v;h&&h.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),o()}),u&&!l&&p.observe(u),p.observe(t));let m,g=l?Vl(e):null;l&&x();function x(){let v=Vl(e);g&&!q2(g,v)&&o(),g=v,m=requestAnimationFrame(x)}return o(),()=>{var v;c.forEach(h=>{n&&h.removeEventListener("scroll",o),a&&h.removeEventListener("resize",o)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var $2=T2;var K2=k2,X2=I2,Y2=E2,Q2=P2,jS=R2;var Z2=M2,qS=(e,t,o)=>{let r=new Map,n={platform:j2,...o},a={...n.platform,_c:r};return b2(e,t,{...n,platform:a})};var kt=b(M(),1),eO=b(M(),1),tO=b(Da(),1),a9=typeof document<"u",i9=function(){},cx=a9?eO.useLayoutEffect:i9;function dx(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,n;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(!dx(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!dx(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function oO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function J2(e,t){let o=oO(e);return Math.round(t*o)/o}function $S(e){let t=kt.useRef(e);return cx(()=>{t.current=e}),t}function rO(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=kt.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=kt.useState(r);dx(f,r)||p(r);let[m,g]=kt.useState(null),[x,v]=kt.useState(null),h=kt.useCallback(B=>{B!==S.current&&(S.current=B,g(B))},[]),y=kt.useCallback(B=>{B!==R.current&&(R.current=B,v(B))},[]),w=a||m,C=i||x,S=kt.useRef(null),R=kt.useRef(null),I=kt.useRef(c),T=l!=null,L=$S(l),k=$S(n),A=$S(u),F=kt.useCallback(()=>{if(!S.current||!R.current)return;let B={placement:t,strategy:o,middleware:f};k.current&&(B.platform=k.current),qS(S.current,R.current,B).then(E=>{let J={...E,isPositioned:A.current!==!1};N.current&&!dx(I.current,J)&&(I.current=J,tO.flushSync(()=>{d(J)}))})},[f,t,o,k,A]);cx(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let N=kt.useRef(!1);cx(()=>(N.current=!0,()=>{N.current=!1}),[]),cx(()=>{if(w&&(S.current=w),C&&(R.current=C),w&&C){if(L.current)return L.current(w,C,F);F()}},[w,C,F,L,T]);let U=kt.useMemo(()=>({reference:S,floating:R,setReference:h,setFloating:y}),[h,y]),O=kt.useMemo(()=>({reference:w,floating:C}),[w,C]),_=kt.useMemo(()=>{let B={position:o,left:0,top:0};if(!O.floating)return B;let E=J2(O.floating,c.x),J=J2(O.floating,c.y);return s?{...B,transform:"translate("+E+"px, "+J+"px)",...oO(O.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:E,top:J}},[o,s,O.floating,c.x,c.y]);return kt.useMemo(()=>({...c,update:F,refs:U,elements:O,floatingStyles:_}),[c,F,U,O,_])}var s9=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){let{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?jS({element:r.current,padding:n}).fn(o):{}:r?jS({element:r,padding:n}).fn(o):{}}}},nO=(e,t)=>({...$2(e),options:[e,t]}),aO=(e,t)=>({...K2(e),options:[e,t]}),iO=(e,t)=>({...Z2(e),options:[e,t]}),sO=(e,t)=>({...X2(e),options:[e,t]}),lO=(e,t)=>({...Y2(e),options:[e,t]});var uO=(e,t)=>({...Q2(e),options:[e,t]});var cO=(e,t)=>({...s9(e),options:[e,t]});var dO=b(M(),1);var KS=b(D(),1),l9="Arrow",fO=dO.forwardRef((e,t)=>{let{children:o,width:r=10,height:n=5,...a}=e;return(0,KS.jsx)($.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,KS.jsx)("polygon",{points:"0,0 30,0 15,10"})})});fO.displayName=l9;var pO=fO;var ds=b(D(),1);var XS="Popper",[mO,$r]=Oe(XS),[c9,gO]=mO(XS),hO=e=>{let{__scopePopper:t,children:o}=e,[r,n]=rr.useState(null);return(0,ds.jsx)(c9,{scope:t,anchor:r,onAnchorChange:n,children:o})};hO.displayName=XS;var vO="PopperAnchor",xO=rr.forwardRef((e,t)=>{let{__scopePopper:o,virtualRef:r,...n}=e,a=gO(vO,o),i=rr.useRef(null),s=de(t,i),l=rr.useRef(null);return rr.useEffect(()=>{let u=l.current;l.current=r?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,ds.jsx)($.div,{...n,ref:s})});xO.displayName=vO;var YS="PopperContent",[d9,f9]=mO(YS),yO=rr.forwardRef((e,t)=>{let{__scopePopper:o,side:r="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:m,...g}=e,x=gO(YS,o),[v,h]=rr.useState(null),y=de(t,z=>h(z)),[w,C]=rr.useState(null),S=Ec(w),R=S?.width??0,I=S?.height??0,T=r+(a!=="center"?"-"+a:""),L=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],A=k.length>0,F={padding:L,boundary:k.filter(m9),altBoundary:A},{refs:N,floatingStyles:U,placement:O,isPositioned:_,middlewareData:B}=rO({strategy:"fixed",placement:T,whileElementsMounted:(...z)=>WS(...z,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[nO({mainAxis:n+I,alignmentAxis:i}),l&&aO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?iO():void 0,...F}),l&&sO({...F}),lO({...F,apply:({elements:z,rects:ne,availableWidth:he,availableHeight:xe})=>{let{width:pe,height:K}=ne.reference,Ie=z.floating.style;Ie.setProperty("--radix-popper-available-width",`${he}px`),Ie.setProperty("--radix-popper-available-height",`${xe}px`),Ie.setProperty("--radix-popper-anchor-width",`${pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${K}px`)}}),w&&cO({element:w,padding:s}),g9({arrowWidth:R,arrowHeight:I}),f&&uO({strategy:"referenceHidden",...F})]}),[E,J]=SO(O),ae=rt(m);_e(()=>{_&&ae?.()},[_,ae]);let V=B.arrow?.x,Y=B.arrow?.y,oe=B.arrow?.centerOffset!==0,[X,ce]=rr.useState();return _e(()=>{v&&ce(window.getComputedStyle(v).zIndex)},[v]),(0,ds.jsx)("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:_?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ds.jsx)(d9,{scope:o,placedSide:E,onArrowChange:C,arrowX:V,arrowY:Y,shouldHideArrow:oe,children:(0,ds.jsx)($.div,{"data-side":E,"data-align":J,...g,ref:y,style:{...g.style,animation:_?void 0:"none"}})})})});yO.displayName=YS;var wO="PopperArrow",p9={top:"bottom",right:"left",bottom:"top",left:"right"},CO=rr.forwardRef(function(t,o){let{__scopePopper:r,...n}=t,a=f9(wO,r),i=p9[a.placedSide];return(0,ds.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,ds.jsx)(pO,{...n,ref:o,style:{...n.style,display:"block"}})})});CO.displayName=wO;function m9(e){return e!==null}var g9=e=>({name:"transformOrigin",options:e,fn(t){let{placement:o,rects:r,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=SO(o),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,m="",g="";return u==="bottom"?(m=i?d:`${f}px`,g=`${-l}px`):u==="top"?(m=i?d:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=i?d:`${p}px`):u==="left"&&(m=`${r.floating.width+l}px`,g=i?d:`${p}px`),{data:{x:m,y:g}}}});function SO(e){let[t,o="center"]=e.split("-");return[t,o]}var Ja=hO,ei=xO,fs=yO,ps=CO;var px=b(M(),1),bO=b(Da(),1);var RO=b(D(),1),h9="Portal",Cr=px.forwardRef((e,t)=>{let{container:o,...r}=e,[n,a]=px.useState(!1);_e(()=>a(!0),[]);let i=o||n&&globalThis?.document?.body;return i?bO.default.createPortal((0,RO.jsx)($.div,{...r,ref:t}),i):null});Cr.displayName=h9;var v9=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oc=new WeakMap,mx=new WeakMap,gx={},QS=0,IO=function(e){return e&&(e.host||IO(e.parentNode))},x9=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=IO(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})},y9=function(e,t,o,r){var n=x9(t,Array.isArray(e)?e:[e]);gx[o]||(gx[o]=new WeakMap);var a=gx[o],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(r),m=p!==null&&p!=="false",g=(Oc.get(f)||0)+1,x=(a.get(f)||0)+1;Oc.set(f,g),a.set(f,x),i.push(f),g===1&&m&&mx.set(f,!0),x===1&&f.setAttribute(o,"true"),m||f.setAttribute(r,"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=Oc.get(d)-1,p=a.get(d)-1;Oc.set(d,f),a.set(d,p),f||(mx.has(d)||d.removeAttribute(r),mx.delete(d)),p||d.removeAttribute(o)}),QS--,QS||(Oc=new WeakMap,Oc=new WeakMap,mx=new WeakMap,gx={})}},ms=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=t||v9(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),y9(r,n,o,"aria-hidden")):function(){return null}};var nr=function(){return nr=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},nr.apply(this,arguments)};function hx(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 n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function PO(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Cx=b(M());var So=b(M());var Bl="right-scroll-bar-position",Hl="width-before-scroll-bar",ZS="with-scroll-bars-hidden",JS="--removed-body-scroll-bar-size";function vx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var LO=b(M());function TO(e,t){var o=(0,LO.useState)(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var xx=b(M());var w9=typeof window<"u"?xx.useLayoutEffect:xx.useEffect,kO=new WeakMap;function eb(e,t){var o=TO(t||null,function(r){return e.forEach(function(n){return vx(n,r)})});return w9(function(){var r=kO.get(o);if(r){var n=new Set(r),a=new Set(e),i=o.current;n.forEach(function(s){a.has(s)||vx(s,null)}),a.forEach(function(s){n.has(s)||vx(s,i)})}kO.set(o,e)},[e]),o}function C9(e){return e}function S9(e,t){t===void 0&&(t=C9);var o=[],r=!1,n={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(a){var i=t(a,r);return o.push(i),function(){o=o.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;o.length;){var i=o;o=[],i.forEach(a)}o={push:function(s){return a(s)},filter:function(){return o}}},assignMedium:function(a){r=!0;var i=[];if(o.length){var s=o;o=[],s.forEach(a),i=o}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),o}}}};return n}function tb(e){e===void 0&&(e={});var t=S9(null);return t.options=nr({async:!0,ssr:!1},e),t}var MO=b(M()),EO=function(e){var t=e.sideCar,o=hx(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 MO.createElement(r,nr({},o))};EO.isSideCarExport=!0;function ob(e,t){return e.useMedium(t),EO}var yx=tb();var rb=function(){},Zp=So.forwardRef(function(e,t){var o=So.useRef(null),r=So.useState({onScrollCapture:rb,onWheelCapture:rb,onTouchMoveCapture:rb}),n=r[0],a=r[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,m=e.noIsolation,g=e.inert,x=e.allowPinchZoom,v=e.as,h=v===void 0?"div":v,y=e.gapMode,w=hx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,S=eb([o,t]),R=nr(nr({},w),n);return So.createElement(So.Fragment,null,c&&So.createElement(C,{sideCar:yx,removeScrollBar:u,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!x,lockRef:o,gapMode:y}),i?So.cloneElement(So.Children.only(s),nr(nr({},R),{ref:S})):So.createElement(h,nr({},R,{className:l,ref:S}),s))});Zp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zp.classNames={fullWidth:Hl,zeroRight:Bl};var at=b(M());var _c=b(M());var NO=b(M());var AO;var DO=function(){if(AO)return AO;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=DO();return t&&e.setAttribute("nonce",t),e}function R9(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function I9(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nb=function(){var e=0,t=null;return{add:function(o){e==0&&(t=b9())&&(R9(t,o),I9(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var ab=function(){var e=nb();return function(t,o){NO.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var Jp=function(){var e=ab(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t};var P9={left:0,top:0,right:0,gap:0},ib=function(e){return parseInt(e||"",10)||0},L9=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[ib(o),ib(r),ib(n)]},sb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return P9;var t=L9(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 T9=Jp(),Fc="data-scroll-locked",k9=function(e,t,o,r){var n=e.left,a=e.top,i=e.right,s=e.gap;return o===void 0&&(o="margin"),`
20
+ .`.concat(ZS,` {
21
+ overflow: hidden `).concat(r,`;
22
+ padding-right: `).concat(s,"px ").concat(r,`;
23
23
  }
24
- body[`).concat(hc,`] {
25
- overflow: hidden `).concat(o,`;
24
+ body[`).concat(Fc,`] {
25
+ overflow: hidden `).concat(r,`;
26
26
  overscroll-behavior: contain;
27
- `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
27
+ `).concat([t&&"position: relative ".concat(r,";"),o==="margin"&&`
28
28
  padding-left: `.concat(n,`px;
29
29
  padding-top: `).concat(a,`px;
30
30
  padding-right: `).concat(i,`px;
31
31
  margin-left:0;
32
32
  margin-top:0;
33
- margin-right: `).concat(s,"px ").concat(o,`;
34
- `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
33
+ margin-right: `).concat(s,"px ").concat(r,`;
34
+ `),o==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
35
35
  }
36
36
 
37
- .`).concat(gl,` {
38
- right: `).concat(s,"px ").concat(o,`;
37
+ .`).concat(Bl,` {
38
+ right: `).concat(s,"px ").concat(r,`;
39
39
  }
40
40
 
41
- .`).concat(hl,` {
42
- margin-right: `).concat(s,"px ").concat(o,`;
41
+ .`).concat(Hl,` {
42
+ margin-right: `).concat(s,"px ").concat(r,`;
43
43
  }
44
44
 
45
- .`).concat(gl," .").concat(gl,` {
46
- right: 0 `).concat(o,`;
45
+ .`).concat(Bl," .").concat(Bl,` {
46
+ right: 0 `).concat(r,`;
47
47
  }
48
48
 
49
- .`).concat(hl," .").concat(hl,` {
50
- margin-right: 0 `).concat(o,`;
49
+ .`).concat(Hl," .").concat(Hl,` {
50
+ margin-right: 0 `).concat(r,`;
51
51
  }
52
52
 
53
- body[`).concat(hc,`] {
54
- `).concat(gb,": ").concat(s,`px;
53
+ body[`).concat(Fc,`] {
54
+ `).concat(JS,": ").concat(s,`px;
55
55
  }
56
- `)},GO=function(){var e=parseInt(document.body.getAttribute(hc)||"0",10);return isFinite(e)?e:0},k$=function(){vc.useEffect(function(){return document.body.setAttribute(hc,(GO()+1).toString()),function(){var e=GO()-1;e<=0?document.body.removeAttribute(hc):document.body.setAttribute(hc,e.toString())}},[])},Rb=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;k$();var a=vc.useMemo(function(){return bb(n)},[n]);return vc.createElement(P$,{styles:T$(a,!t,n,r?"":"!important")})};var Ib=!1;if(typeof window<"u")try{Rp=Object.defineProperty({},"passive",{get:function(){return Ib=!0,!0}}),window.addEventListener("test",Rp,Rp),window.removeEventListener("test",Rp,Rp)}catch{Ib=!1}var Rp,vl=Ib?{passive:!1}:!1;var M$=function(e){return e.tagName==="TEXTAREA"},WO=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!M$(e)&&r[t]==="visible")},E$=function(e){return WO(e,"overflowY")},A$=function(e){return WO(e,"overflowX")},Lb=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=qO(e,o);if(n){var a=jO(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]},N$=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},qO=function(e,t){return e==="v"?E$(t):A$(t)},jO=function(e,t){return e==="v"?D$(t):N$(t)},O$=function(e,t){return e==="h"&&t==="rtl"?-1:1},$O=function(e,t,r,o,n){var a=O$(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=jO(e,s),m=p[0],g=p[1],y=p[2],h=g-y-a*m;(m||h)&&qO(e,s)&&(d+=h,f+=m);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}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 Jv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},KO=function(e){return[e.deltaX,e.deltaY]},XO=function(e){return e&&"current"in e?e.current:e},F$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_$=function(e){return`
56
+ `)},OO=function(){var e=parseInt(document.body.getAttribute(Fc)||"0",10);return isFinite(e)?e:0},M9=function(){_c.useEffect(function(){return document.body.setAttribute(Fc,(OO()+1).toString()),function(){var e=OO()-1;e<=0?document.body.removeAttribute(Fc):document.body.setAttribute(Fc,e.toString())}},[])},lb=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,n=r===void 0?"margin":r;M9();var a=_c.useMemo(function(){return sb(n)},[n]);return _c.createElement(T9,{styles:k9(a,!t,n,o?"":"!important")})};var ub=!1;if(typeof window<"u")try{em=Object.defineProperty({},"passive",{get:function(){return ub=!0,!0}}),window.addEventListener("test",em,em),window.removeEventListener("test",em,em)}catch{ub=!1}var em,Ul=ub?{passive:!1}:!1;var E9=function(e){return e.tagName==="TEXTAREA"},FO=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!E9(e)&&o[t]==="visible")},A9=function(e){return FO(e,"overflowY")},D9=function(e){return FO(e,"overflowX")},cb=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=_O(e,r);if(n){var a=VO(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},N9=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},O9=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},_O=function(e,t){return e==="v"?A9(t):D9(t)},VO=function(e,t){return e==="v"?N9(t):O9(t)},F9=function(e,t){return e==="h"&&t==="rtl"?-1:1},BO=function(e,t,o,r,n){var a=F9(e,window.getComputedStyle(t).direction),i=a*r,s=o.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=VO(e,s),m=p[0],g=p[1],x=p[2],v=g-x-a*m;(m||v)&&_O(e,s)&&(d+=v,f+=m);var h=s.parentNode;s=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}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 wx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},HO=function(e){return[e.deltaX,e.deltaY]},UO=function(e){return e&&"current"in e?e.current:e},_9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},V9=function(e){return`
57
57
  .block-interactivity-`.concat(e,` {pointer-events: none;}
58
58
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
59
- `)},V$=0,xc=[];function YO(e){var t=it.useRef([]),r=it.useRef([0,0]),o=it.useRef(),n=it.useState(V$++)[0],a=it.useState(bp)[0],i=it.useRef(e);it.useEffect(function(){i.current=e},[e]),it.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=NO([e.lockRef.current],(e.shards||[]).map(XO),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=it.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var h=Jv(g),v=r.current,x="deltaX"in g?g.deltaX:v[0]-h[0],w="deltaY"in g?g.deltaY:v[1]-h[1],C,b=g.target,S=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&S==="h"&&b.type==="range")return!1;var I=Lb(S,b);if(!I)return!0;if(I?C=S:(C=S==="v"?"h":"v",I=Lb(S,b)),!I)return!1;if(!o.current&&"changedTouches"in g&&(x||w)&&(o.current=C),!C)return!0;var T=o.current||C;return $O(T,y,g,T==="h"?x:w,!0)},[]),l=it.useCallback(function(g){var y=g;if(!(!xc.length||xc[xc.length-1]!==a)){var h="deltaY"in y?KO(y):Jv(y),v=t.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&F$(C.delta,h)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var x=(i.current.shards||[]).map(XO).filter(Boolean).filter(function(C){return C.contains(y.target)}),w=x.length>0?s(y,x[0]):!i.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),u=it.useCallback(function(g,y,h,v){var x={name:g,delta:y,target:h,should:v,shadowParent:B$(h)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),c=it.useCallback(function(g){r.current=Jv(g),o.current=void 0},[]),d=it.useCallback(function(g){u(g.type,KO(g),g.target,s(g,e.lockRef.current))},[]),f=it.useCallback(function(g){u(g.type,Jv(g),g.target,s(g,e.lockRef.current))},[]);it.useEffect(function(){return xc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,vl),document.addEventListener("touchmove",l,vl),document.addEventListener("touchstart",c,vl),function(){xc=xc.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,vl),document.removeEventListener("touchmove",l,vl),document.removeEventListener("touchstart",c,vl)}},[]);var p=e.removeScrollBar,m=e.inert;return it.createElement(it.Fragment,null,m?it.createElement(a,{styles:_$(n)}):null,p?it.createElement(Rb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function B$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var QO=xb(Zv,YO);var ZO=ex.forwardRef(function(e,t){return ex.createElement(Sp,Jr({},e,{ref:t,sideCar:QO}))});ZO.classNames=Sp.classNames;var Ha=ZO;var kt=R(D(),1),tx="Popover",[JO,$be]=Oe(tx,[zo]),Ip=zo(),[H$,Yi]=JO(tx),eF=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=Ip(t),l=ct.useRef(null),[u,c]=ct.useState(!1),[d,f]=$e({prop:o,defaultProp:n??!1,onChange:a,caller:tx});return(0,kt.jsx)(Va,{...s,children:(0,kt.jsx)(H$,{scope:t,contentId:De(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:ct.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:ct.useCallback(()=>c(!0),[]),onCustomAnchorRemove:ct.useCallback(()=>c(!1),[]),modal:i,children:r})})};eF.displayName=tx;var tF="PopoverAnchor",rF=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Yi(tF,r),a=Ip(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ct.useEffect(()=>(i(),()=>s()),[i,s]),(0,kt.jsx)(Ba,{...a,...o,ref:t})});rF.displayName=tF;var oF="PopoverTrigger",nF=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Yi(oF,r),a=Ip(r),i=de(t,n.triggerRef),s=(0,kt.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":uF(n.open),...o,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,kt.jsx)(Ba,{asChild:!0,...a,children:s})});nF.displayName=oF;var Pb="PopoverPortal",[U$,z$]=JO(Pb,{forceMount:void 0}),G$=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=Yi(Pb,t);return(0,kt.jsx)(U$,{scope:t,forceMount:r,children:(0,kt.jsx)(lt,{present:r||a.open,children:(0,kt.jsx)(go,{asChild:!0,container:n,children:o})})})};G$.displayName=Pb;var yc="PopoverContent",aF=ct.forwardRef((e,t)=>{let r=z$(yc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=Yi(yc,e.__scopePopover);return(0,kt.jsx)(lt,{present:o||a.open,children:a.modal?(0,kt.jsx)(q$,{...n,ref:t}):(0,kt.jsx)(j$,{...n,ref:t})})});aF.displayName=yc;var W$=to("PopoverContent.RemoveScroll"),q$=ct.forwardRef((e,t)=>{let r=Yi(yc,e.__scopePopover),o=ct.useRef(null),n=de(t,o),a=ct.useRef(!1);return ct.useEffect(()=>{let i=o.current;if(i)return Xi(i)},[]),(0,kt.jsx)(Ha,{as:W$,allowPinchZoom:!0,children:(0,kt.jsx)(iF,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:W(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:W(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),j$=ct.forwardRef((e,t)=>{let r=Yi(yc,e.__scopePopover),o=ct.useRef(!1),n=ct.useRef(!1);return(0,kt.jsx)(iF,{...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()}})}),iF=ct.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=Yi(yc,r),p=Ip(r);return Wi(),(0,kt.jsx)(Fa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,kt.jsx)(Vo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,kt.jsx)($i,{"data-state":uF(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)"}})})})}),sF="PopoverClose",lF=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Yi(sF,r);return(0,kt.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});lF.displayName=sF;var $$="PopoverArrow",K$=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Ip(r);return(0,kt.jsx)(Ki,{...n,...o,ref:t})});K$.displayName=$$;function uF(e){return e?"open":"closed"}var cF=eF,dF=rF,fF=nF;var Tb=aF,pF=lF;var ea=R(D()),gF=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"}}),ta=cF,ra=fF,Y$=dF,Sn=mF.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,ea.jsxs)(ea.Fragment,{children:[u&&(0,ea.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ea.jsx)(Tb,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:L(gF({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Sn.displayName=Tb.displayName;var Q$=pF,hF=({className:e,...t})=>(0,ea.jsx)("div",{className:L("moonui-theme","my-2 h-px bg-border",e),...t});hF.displayName="PopoverSeparator";var vF=({className:e,...t})=>(0,ea.jsx)("div",{className:L("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});vF.displayName="PopoverHeader";var xF=({className:e,...t})=>(0,ea.jsx)("div",{className:L("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});xF.displayName="PopoverFooter";var Pp=R(E());var za=R(E(),1);var jt=R(E(),1);var Qi=R(D(),1),kb="rovingFocusGroup.onEntryFocus",Z$={bubbles:!1,cancelable:!0},Lp="RovingFocusGroup",[Mb,yF,J$]=Nn(Lp),[e9,wc]=Oe(Lp,[J$]),[t9,r9]=e9(Lp),wF=jt.forwardRef((e,t)=>(0,Qi.jsx)(Mb.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Qi.jsx)(Mb.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Qi.jsx)(o9,{...e,ref:t})})}));wF.displayName=Lp;var o9=jt.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=jt.useRef(null),p=de(t,f),m=Un(a),[g,y]=$e({prop:i,defaultProp:s??null,onChange:l,caller:Lp}),[h,v]=jt.useState(!1),x=nt(u),w=yF(r),C=jt.useRef(!1),[b,S]=jt.useState(0);return jt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(kb,x),()=>I.removeEventListener(kb,x)},[x]),(0,Qi.jsx)(t9,{scope:r,orientation:o,dir:m,loop:n,currentTabStopId:g,onItemFocus:jt.useCallback(I=>y(I),[y]),onItemShiftTab:jt.useCallback(()=>v(!0),[]),onFocusableItemAdd:jt.useCallback(()=>S(I=>I+1),[]),onFocusableItemRemove:jt.useCallback(()=>S(I=>I-1),[]),children:(0,Qi.jsx)($.div,{tabIndex:h||b===0?-1:0,"data-orientation":o,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{C.current=!0}),onFocus:W(e.onFocus,I=>{let T=!C.current;if(I.target===I.currentTarget&&T&&!h){let P=new CustomEvent(kb,Z$);if(I.currentTarget.dispatchEvent(P),!P.defaultPrevented){let M=w().filter(O=>O.focusable),A=M.find(O=>O.active),F=M.find(O=>O.id===g),H=[A,F,...M].filter(Boolean).map(O=>O.ref.current);bF(H,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),CF="RovingFocusGroupItem",SF=jt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=De(),u=a||l,c=r9(CF,r),d=c.currentTabStopId===u,f=yF(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:g}=c;return jt.useEffect(()=>{if(o)return p(),()=>m()},[o,p,m]),(0,Qi.jsx)(Mb.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,Qi.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,y=>{o?c.onItemFocus(u):y.preventDefault()}),onFocus:W(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:W(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;let h=i9(y,c.orientation,c.dir);if(h!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=f().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();let w=x.indexOf(y.currentTarget);x=c.loop?s9(x,w+1):x.slice(w+1)}setTimeout(()=>bF(x))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:g!=null}):i})})});SF.displayName=CF;var n9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function a9(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function i9(e,t,r){let o=a9(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return n9[o]}function bF(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function s9(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var rx=wF,ox=SF;var Ua=R(D(),1),nx="Tabs",[l9,mRe]=Oe(nx,[wc]),IF=wc(),[u9,Eb]=l9(nx),LF=za.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=Un(s),[d,f]=$e({prop:o,onChange:n,defaultProp:a??"",caller:nx});return(0,Ua.jsx)(u9,{scope:r,baseId:De(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,Ua.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});LF.displayName=nx;var PF="TabsList",TF=za.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=Eb(PF,r),i=IF(r);return(0,Ua.jsx)(rx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,Ua.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});TF.displayName=PF;var kF="TabsTrigger",MF=za.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=Eb(kF,r),s=IF(r),l=DF(i.baseId,o),u=NF(i.baseId,o),c=o===i.value;return(0,Ua.jsx)(ox,{asChild:!0,...s,focusable:!n,active:c,children:(0,Ua.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:W(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(o):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(o)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(o)})})})});MF.displayName=kF;var EF="TabsContent",AF=za.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=Eb(EF,r),l=DF(s.baseId,o),u=NF(s.baseId,o),c=o===s.value,d=za.useRef(c);return za.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Ua.jsx)(lt,{present:n||c,children:({present:f})=>(0,Ua.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})})});AF.displayName=EF;function DF(e,t){return`${e}-trigger-${t}`}function NF(e,t){return`${e}-content-${t}`}var Ab=LF,Db=TF,Nb=MF,Ob=AF;var Ga=R(D()),Tp=Pp.forwardRef(({vertical:e=!1,...t},r)=>(0,Ga.jsx)(Ab,{ref:r,className:L("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));Tp.displayName=Ab.displayName;var d9=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-3 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"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),kp=Pp.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,scrollable:n,...a},i)=>(0,Ga.jsx)(Db,{ref:i,className:L("moonui-theme",d9({variant:t,orientation:r,fullWidth:o,scrollable:n,className:e})),...a}));kp.displayName=Db.displayName;var f9=te("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 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-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",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}}),xl=Pp.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,Ga.jsxs)(Nb,{ref:d,className:L("moonui-theme",f9({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,Ga.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,Ga.jsx)("span",{className:"ml-2",children:o}),a&&(0,Ga.jsx)("span",{className:"ml-2",children:a})]}));xl.displayName=Nb.displayName;var yl=Pp.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,Ga.jsx)(Ob,{ref:o,className:L("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}));yl.displayName=Ob.displayName;var Zi=R(E());var oa=R(D()),p9=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"}}),m9=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"}}),g9=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"}}),h9=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"}}),na=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},m)=>{let[g,y]=Zi.useState(u||c||[0]);Zi.useEffect(()=>{u!==void 0&&y(u)},[u]);let h=P=>s?s(P):`${Math.round(P*100)/100}`,v=(P,M,A)=>(P-M)/(A-M)*100,x=Zi.useRef(null),w=p.min||0,C=p.max||100,b=p.step||1,S=P=>{let M=P.map(A=>{if(b<1){let F=b.toString().split(".")[1]?.length||0;return Math.round(A*Math.pow(10,F))/Math.pow(10,F)}return Math.round(A)});y(M),d&&d(M)},I=P=>{if(f)return;let M=x.current;if(!M)return;let A=M.getBoundingClientRect(),F=(P.clientX-A.left)/A.width,N=w+F*(C-w),H=Math.round(N/b)*b,O=Math.max(w,Math.min(C,H)),U=[...g];U[0]=O,S(U)},T=P=>M=>{if(f)return;M.preventDefault();let A=N=>{let H=x.current;if(!H)return;let O=H.getBoundingClientRect(),U=(N.clientX-O.left)/O.width,V=w+U*(C-w),k=Math.round(V/b)*b,Z=Math.max(w,Math.min(C,k)),ae=[...g];ae[P]=Z,S(ae)},F=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",F)};document.addEventListener("mousemove",A),document.addEventListener("mouseup",F)};return(0,oa.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,oa.jsx)("div",{className:L("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?(0,oa.jsx)("span",{children:h(g[0])}):(0,oa.jsxs)("span",{children:[h(g[0])," - ",h(g[g.length-1])]})}),(0,oa.jsxs)("div",{className:L("moonui-theme",p9({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,oa.jsx)("div",{ref:x,className:L(m9({variant:r||n||"default"})),onClick:I,children:(0,oa.jsx)("div",{className:L(g9({variant:o||n||"primary"})),style:{left:"0%",width:`${v(g[0],w,C)}%`}})}),g.map((P,M)=>(0,oa.jsx)("div",{className:L(h9({variant:n||"primary",size:a})),style:{left:`${v(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(M),"aria-label":`Thumb ${M+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":P,"aria-disabled":f},M))]})]})});na.displayName="Slider";var q=R(D()),OF=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 FF(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 _F(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function v9(e){let t=FF(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 x9(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 _F(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var VF=["#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 ax({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=VF,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[m,g]=Go.useState(!1),[y,h]=Go.useState(o),[v,x]=Go.useState(100),[w,C]=Go.useState(!1),[b,S]=Go.useState(o),I=Go.useMemo(()=>v9(y)||{h:0,s:0,l:0},[y]),T=Go.useMemo(()=>FF(y)||{r:0,g:0,b:0},[y]);Go.useEffect(()=>{h(o),S(o)},[o]);let P=O=>{h(O),S(O),n?.(O)},M=(O,U)=>{let V={...I,[O]:U},k=x9(V.h,V.s,V.l);P(k)},A=(O,U)=>{let V={...T,[O]:U},k=_F(V.r,V.g,V.b);P(k)},F=O=>{let U=O.target.value;S(U),/^#[0-9A-F]{6}$/i.test(U)&&P(U)},N=async()=>{try{let O=y;u==="rgb"?O=`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"&&(O=`hsl(${I.h}, ${I.s}%, ${I.l}%)`),await navigator.clipboard.writeText(O),C(!0),setTimeout(()=>C(!1),2e3)}catch(O){console.error("Failed to copy:",O)}},H=()=>u==="rgb"?`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:y;return(0,q.jsxs)(ta,{open:m,onOpenChange:g,children:[(0,q.jsx)(ra,{asChild:!0,children:(0,q.jsx)(Fe,{variant:"outline",className:L(OF({size:t,shape:r}),"p-0 border-2",e),style:{backgroundColor:y},disabled:f,...p,children:(0,q.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,q.jsxs)(Sn,{className:"w-80",align:"start",sideOffset:8,children:[(0,q.jsxs)(Tp,{defaultValue:"picker",className:"w-full",children:[(0,q.jsxs)(kp,{className:"grid w-full grid-cols-3",children:[(0,q.jsx)(xl,{value:"picker",children:"Picker"}),(0,q.jsx)(xl,{value:"sliders",children:"Sliders"}),(0,q.jsx)(xl,{value:"input",children:"Input"})]}),(0,q.jsxs)(yl,{value:"picker",className:"space-y-4",children:[(0,q.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,q.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${I.h}, 100%, 50%))`}}),(0,q.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,q.jsx)(He.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:y,left:`${I.s/100*280-8}px`,top:`${(1-I.l/100)*192-8}px`}})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)(Dr,{children:"Hue"}),(0,q.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,q.jsx)(na,{value:[I.h],onValueChange:([O])=>M("h",O),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)(Dr,{children:"Opacity"}),(0,q.jsxs)("div",{className:"flex items-center gap-3",children:[(0,q.jsx)(na,{value:[v],onValueChange:([O])=>x(O),max:100,step:1,className:"flex-1"}),(0,q.jsxs)("span",{className:"text-sm w-10 text-right",children:[v,"%"]})]})]})]}),(0,q.jsxs)(yl,{value:"sliders",className:"space-y-4",children:[(0,q.jsxs)("div",{className:"space-y-3",children:[(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsxs)("div",{className:"flex items-center justify-between",children:[(0,q.jsx)(Dr,{children:"Red"}),(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:T.r})]}),(0,q.jsx)(na,{value:[T.r],onValueChange:([O])=>A("r",O),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsxs)("div",{className:"flex items-center justify-between",children:[(0,q.jsx)(Dr,{children:"Green"}),(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:T.g})]}),(0,q.jsx)(na,{value:[T.g],onValueChange:([O])=>A("g",O),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsxs)("div",{className:"flex items-center justify-between",children:[(0,q.jsx)(Dr,{children:"Blue"}),(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:T.b})]}),(0,q.jsx)(na,{value:[T.b],onValueChange:([O])=>A("b",O),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,q.jsx)("div",{className:"pt-2 border-t",children:(0,q.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,q.jsxs)("p",{className:"font-medium",children:[I.h,"\xB0"]})]}),(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,q.jsxs)("p",{className:"font-medium",children:[I.s,"%"]})]}),(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,q.jsxs)("p",{className:"font-medium",children:[I.l,"%"]})]})]})})]}),(0,q.jsxs)(yl,{value:"input",className:"space-y-4",children:[(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)(Dr,{children:"Hex Color"}),(0,q.jsxs)("div",{className:"flex gap-2",children:[(0,q.jsx)(rr,{value:b,onChange:F,placeholder:"#000000",className:"font-mono"}),(0,q.jsx)(Fe,{size:"icon",variant:"outline",onClick:()=>P(b),children:(0,q.jsx)(dr,{className:"h-4 w-4"})})]})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)(Dr,{children:"RGB Values"}),(0,q.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,q.jsx)(rr,{type:"number",value:T.r,onChange:O=>A("r",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,q.jsx)(rr,{type:"number",value:T.g,onChange:O=>A("g",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,q.jsx)(rr,{type:"number",value:T.b,onChange:O=>A("b",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,q.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,q.jsxs)("div",{className:"flex items-center gap-3",children:[(0,q.jsx)("div",{className:L("h-10 w-10 rounded border-2",OF({shape:r})),style:{backgroundColor:y}}),(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{className:"text-sm font-medium",children:H()}),(0,q.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,q.jsx)(Fe,{size:"icon",variant:"ghost",onClick:N,className:"h-8 w-8",children:(0,q.jsx)(Ta,{mode:"wait",children:w?(0,q.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,q.jsx)(dr,{className:"h-4 w-4 text-green-600"})},"check"):(0,q.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,q.jsx)(Gd,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,q.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,q.jsx)(Dr,{children:"Preset Colors"}),(0,q.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(O=>(0,q.jsx)("button",{className:L("h-7 w-7 rounded border-2 transition-all hover:scale-110",y===O?"border-primary":"border-transparent"),style:{backgroundColor:O},onClick:()=>P(O)},O))})]})]})]})}function BF({value:e="#000000",onChange:t,colors:r=VF.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,q.jsx)("div",{className:L("moonui-theme","flex flex-wrap gap-2",o),children:r.map(i=>(0,q.jsx)("button",{className:L("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 HF({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=Go.useState(e),a=(i,s)=>{let l={...o,[i]:s};n(l),t?.(l)};return(0,q.jsxs)("div",{className:L("moonui-theme","space-y-4",r),children:[(0,q.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.end})`}}),(0,q.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)(Dr,{children:"Start Color"}),(0,q.jsx)(ax,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)(Dr,{children:"End Color"}),(0,q.jsx)(ax,{value:o.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsxs)("div",{className:"flex items-center justify-between",children:[(0,q.jsx)(Dr,{children:"Angle"}),(0,q.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,q.jsx)(na,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var es=R(E());var UF=1,y9=.9,w9=.8,C9=.17,Fb=.1,_b=.999,S9=.9999,b9=.99,R9=/[\\\/_+.#"@\[\(\{&]/,I9=/[\\\/_+.#"@\[\(\{&]/g,L9=/[\s-]/,GF=/[\s-]/g;function Vb(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?UF:b9;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,m;u>=0;)d=Vb(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=UF:R9.test(e.charAt(u-1))?(d*=w9,p=e.slice(n,u-1).match(I9),p&&n>0&&(d*=Math.pow(_b,p.length))):L9.test(e.charAt(u-1))?(d*=y9,m=e.slice(n,u-1).match(GF),m&&n>0&&(d*=Math.pow(_b,m.length))):(d*=C9,n>0&&(d*=Math.pow(_b,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=S9)),(d<Fb&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=Vb(e,t,r,o,u+1,a+2,i),f*Fb>d&&(d=f*Fb)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function zF(e){return e.toLowerCase().replace(GF," ")}function WF(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Vb(e,t,zF(e),zF(t),0,0,{})}var Ze=R(E(),1);var qe=R(D(),1),sx="Dialog",[qF,YRe]=Oe(sx),[P9,bn]=qF(sx),jF=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Ze.useRef(null),l=Ze.useRef(null),[u,c]=$e({prop:o,defaultProp:n??!1,onChange:a,caller:sx});return(0,qe.jsx)(P9,{scope:t,triggerRef:s,contentRef:l,contentId:De(),titleId:De(),descriptionId:De(),open:u,onOpenChange:c,onOpenToggle:Ze.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};jF.displayName=sx;var $F="DialogTrigger",KF=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=bn($F,r),a=de(t,n.triggerRef);return(0,qe.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Ub(n.open),...o,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});KF.displayName=$F;var Bb="DialogPortal",[T9,XF]=qF(Bb,{forceMount:void 0}),YF=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=bn(Bb,t);return(0,qe.jsx)(T9,{scope:t,forceMount:r,children:Ze.Children.map(o,i=>(0,qe.jsx)(lt,{present:r||a.open,children:(0,qe.jsx)(go,{asChild:!0,container:n,children:i})}))})};YF.displayName=Bb;var ix="DialogOverlay",QF=Ze.forwardRef((e,t)=>{let r=XF(ix,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=bn(ix,e.__scopeDialog);return a.modal?(0,qe.jsx)(lt,{present:o||a.open,children:(0,qe.jsx)(M9,{...n,ref:t})}):null});QF.displayName=ix;var k9=to("DialogOverlay.RemoveScroll"),M9=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=bn(ix,r);return(0,qe.jsx)(Ha,{as:k9,allowPinchZoom:!0,shards:[n.contentRef],children:(0,qe.jsx)($.div,{"data-state":Ub(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),wl="DialogContent",ZF=Ze.forwardRef((e,t)=>{let r=XF(wl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=bn(wl,e.__scopeDialog);return(0,qe.jsx)(lt,{present:o||a.open,children:a.modal?(0,qe.jsx)(E9,{...n,ref:t}):(0,qe.jsx)(A9,{...n,ref:t})})});ZF.displayName=wl;var E9=Ze.forwardRef((e,t)=>{let r=bn(wl,e.__scopeDialog),o=Ze.useRef(null),n=de(t,r.contentRef,o);return Ze.useEffect(()=>{let a=o.current;if(a)return Xi(a)},[]),(0,qe.jsx)(JF,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault())})}),A9=Ze.forwardRef((e,t)=>{let r=bn(wl,e.__scopeDialog),o=Ze.useRef(!1),n=Ze.useRef(!1);return(0,qe.jsx)(JF,{...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()}})}),JF=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=bn(wl,r),l=Ze.useRef(null),u=de(t,l);return Wi(),(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Fa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,qe.jsx)(Vo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ub(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(D9,{titleId:s.titleId}),(0,qe.jsx)(O9,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Hb="DialogTitle",e_=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=bn(Hb,r);return(0,qe.jsx)($.h2,{id:n.titleId,...o,ref:t})});e_.displayName=Hb;var t_="DialogDescription",r_=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=bn(t_,r);return(0,qe.jsx)($.p,{id:n.descriptionId,...o,ref:t})});r_.displayName=t_;var o_="DialogClose",n_=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=bn(o_,r);return(0,qe.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});n_.displayName=o_;function Ub(e){return e?"open":"closed"}var a_="DialogTitleWarning",[QRe,i_]=eP(a_,{contentName:wl,titleName:Hb,docsSlug:"dialog"}),D9=({titleId:e})=>{let t=i_(a_),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
59
+ `)},B9=0,Vc=[];function zO(e){var t=at.useRef([]),o=at.useRef([0,0]),r=at.useRef(),n=at.useState(B9++)[0],a=at.useState(Jp)[0],i=at.useRef(e);at.useEffect(function(){i.current=e},[e]),at.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=PO([e.lockRef.current],(e.shards||[]).map(UO),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=at.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=wx(g),h=o.current,y="deltaX"in g?g.deltaX:h[0]-v[0],w="deltaY"in g?g.deltaY:h[1]-v[1],C,S=g.target,R=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in g&&R==="h"&&S.type==="range")return!1;var I=cb(R,S);if(!I)return!0;if(I?C=R:(C=R==="v"?"h":"v",I=cb(R,S)),!I)return!1;if(!r.current&&"changedTouches"in g&&(y||w)&&(r.current=C),!C)return!0;var T=r.current||C;return BO(T,x,g,T==="h"?y:w,!0)},[]),l=at.useCallback(function(g){var x=g;if(!(!Vc.length||Vc[Vc.length-1]!==a)){var v="deltaY"in x?HO(x):wx(x),h=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&_9(C.delta,v)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var y=(i.current.shards||[]).map(UO).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=at.useCallback(function(g,x,v,h){var y={name:g,delta:x,target:v,should:h,shadowParent:H9(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=at.useCallback(function(g){o.current=wx(g),r.current=void 0},[]),d=at.useCallback(function(g){u(g.type,HO(g),g.target,s(g,e.lockRef.current))},[]),f=at.useCallback(function(g){u(g.type,wx(g),g.target,s(g,e.lockRef.current))},[]);at.useEffect(function(){return Vc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ul),document.addEventListener("touchmove",l,Ul),document.addEventListener("touchstart",c,Ul),function(){Vc=Vc.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,Ul),document.removeEventListener("touchmove",l,Ul),document.removeEventListener("touchstart",c,Ul)}},[]);var p=e.removeScrollBar,m=e.inert;return at.createElement(at.Fragment,null,m?at.createElement(a,{styles:V9(n)}):null,p?at.createElement(lb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var GO=ob(yx,zO);var WO=Cx.forwardRef(function(e,t){return Cx.createElement(Zp,nr({},e,{ref:t,sideCar:GO}))});WO.classNames=Zp.classNames;var ti=WO;var Mt=b(D(),1),Sx="Popover",[jO,RPe]=Oe(Sx,[$r]),tm=$r(),[U9,gs]=jO(Sx),qO=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=tm(t),l=ut.useRef(null),[u,c]=ut.useState(!1),[d,f]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:Sx});return(0,Mt.jsx)(Ja,{...s,children:(0,Mt.jsx)(U9,{scope:t,contentId:Ae(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:ut.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:ut.useCallback(()=>c(!0),[]),onCustomAnchorRemove:ut.useCallback(()=>c(!1),[]),modal:i,children:o})})};qO.displayName=Sx;var $O="PopoverAnchor",KO=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs($O,o),a=tm(o),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ut.useEffect(()=>(i(),()=>s()),[i,s]),(0,Mt.jsx)(ei,{...a,...r,ref:t})});KO.displayName=$O;var XO="PopoverTrigger",YO=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(XO,o),a=tm(o),i=de(t,n.triggerRef),s=(0,Mt.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":tF(n.open),...r,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Mt.jsx)(ei,{asChild:!0,...a,children:s})});YO.displayName=XO;var db="PopoverPortal",[z9,G9]=jO(db,{forceMount:void 0}),W9=e=>{let{__scopePopover:t,forceMount:o,children:r,container:n}=e,a=gs(db,t);return(0,Mt.jsx)(z9,{scope:t,forceMount:o,children:(0,Mt.jsx)(st,{present:o||a.open,children:(0,Mt.jsx)(Cr,{asChild:!0,container:n,children:r})})})};W9.displayName=db;var Bc="PopoverContent",QO=ut.forwardRef((e,t)=>{let o=G9(Bc,e.__scopePopover),{forceMount:r=o.forceMount,...n}=e,a=gs(Bc,e.__scopePopover);return(0,Mt.jsx)(st,{present:r||a.open,children:a.modal?(0,Mt.jsx)(q9,{...n,ref:t}):(0,Mt.jsx)($9,{...n,ref:t})})});QO.displayName=Bc;var j9=sr("PopoverContent.RemoveScroll"),q9=ut.forwardRef((e,t)=>{let o=gs(Bc,e.__scopePopover),r=ut.useRef(null),n=de(t,r),a=ut.useRef(!1);return ut.useEffect(()=>{let i=r.current;if(i)return ms(i)},[]),(0,Mt.jsx)(ti,{as:j9,allowPinchZoom:!0,children:(0,Mt.jsx)(ZO,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:W(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:W(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),$9=ut.forwardRef((e,t)=>{let o=gs(Bc,e.__scopePopover),r=ut.useRef(!1),n=ut.useRef(!1);return(0,Mt.jsx)(ZO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;o.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),ZO=ut.forwardRef((e,t)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=gs(Bc,o),p=tm(o);return us(),(0,Mt.jsx)(Qa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Mt.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Mt.jsx)(fs,{"data-state":tF(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)"}})})})}),JO="PopoverClose",eF=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(JO,o);return(0,Mt.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});eF.displayName=JO;var K9="PopoverArrow",X9=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=tm(o);return(0,Mt.jsx)(ps,{...n,...r,ref:t})});X9.displayName=K9;function tF(e){return e?"open":"closed"}var oF=qO,rF=KO,nF=YO;var fb=QO,aF=eF;var ha=b(D()),Q9=Q("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"}}),oi=oF,ri=nF,LPe=rF,va=iF.forwardRef(({className:e,variant:t,size:o,side:r,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,ha.jsxs)(ha.Fragment,{children:[u&&(0,ha.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ha.jsx)(fb,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(Q9({variant:t,size:o,side:r,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));va.displayName=fb.displayName;var TPe=aF,Z9=({className:e,...t})=>(0,ha.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});Z9.displayName="PopoverSeparator";var J9=({className:e,...t})=>(0,ha.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});J9.displayName="PopoverHeader";var e7=({className:e,...t})=>(0,ha.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});e7.displayName="PopoverFooter";var rm=b(M());var ai=b(M(),1);var Kt=b(M(),1);var hs=b(D(),1),pb="rovingFocusGroup.onEntryFocus",t7={bubbles:!1,cancelable:!0},om="RovingFocusGroup",[mb,sF,o7]=Yn(om),[r7,Hc]=Oe(om,[o7]),[n7,a7]=r7(om),lF=Kt.forwardRef((e,t)=>(0,hs.jsx)(mb.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,hs.jsx)(mb.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,hs.jsx)(i7,{...e,ref:t})})}));lF.displayName=om;var i7=Kt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=Kt.useRef(null),p=de(t,f),m=ra(a),[g,x]=qe({prop:i,defaultProp:s??null,onChange:l,caller:om}),[v,h]=Kt.useState(!1),y=rt(u),w=sF(o),C=Kt.useRef(!1),[S,R]=Kt.useState(0);return Kt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(pb,y),()=>I.removeEventListener(pb,y)},[y]),(0,hs.jsx)(n7,{scope:o,orientation:r,dir:m,loop:n,currentTabStopId:g,onItemFocus:Kt.useCallback(I=>x(I),[x]),onItemShiftTab:Kt.useCallback(()=>h(!0),[]),onFocusableItemAdd:Kt.useCallback(()=>R(I=>I+1),[]),onFocusableItemRemove:Kt.useCallback(()=>R(I=>I-1),[]),children:(0,hs.jsx)($.div,{tabIndex:v||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{C.current=!0}),onFocus:W(e.onFocus,I=>{let T=!C.current;if(I.target===I.currentTarget&&T&&!v){let L=new CustomEvent(pb,t7);if(I.currentTarget.dispatchEvent(L),!L.defaultPrevented){let k=w().filter(O=>O.focusable),A=k.find(O=>O.active),F=k.find(O=>O.id===g),U=[A,F,...k].filter(Boolean).map(O=>O.ref.current);dF(U,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>h(!1))})})}),uF="RovingFocusGroupItem",cF=Kt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ae(),u=a||l,c=a7(uF,o),d=c.currentTabStopId===u,f=sF(o),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:g}=c;return Kt.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,hs.jsx)(mb.ItemSlot,{scope:o,id:u,focusable:r,active:n,children:(0,hs.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{r?c.onItemFocus(u):x.preventDefault()}),onFocus:W(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:W(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let v=u7(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?c7(y,w+1):y.slice(w+1)}setTimeout(()=>dF(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:g!=null}):i})})});cF.displayName=uF;var s7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function l7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function u7(e,t,o){let r=l7(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return s7[r]}function dF(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function c7(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var bx=lF,Rx=cF;var ni=b(D(),1),Ix="Tabs",[d7,$Pe]=Oe(Ix,[Hc]),pF=Hc(),[f7,gb]=d7(Ix),mF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=ra(s),[d,f]=qe({prop:r,onChange:n,defaultProp:a??"",caller:Ix});return(0,ni.jsx)(f7,{scope:o,baseId:Ae(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,ni.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});mF.displayName=Ix;var gF="TabsList",hF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,loop:r=!0,...n}=e,a=gb(gF,o),i=pF(o);return(0,ni.jsx)(bx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,ni.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});hF.displayName=gF;var vF="TabsTrigger",xF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,disabled:n=!1,...a}=e,i=gb(vF,o),s=pF(o),l=CF(i.baseId,r),u=SF(i.baseId,r),c=r===i.value;return(0,ni.jsx)(Rx,{asChild:!0,...s,focusable:!n,active:c,children:(0,ni.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:W(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(r)})})})});xF.displayName=vF;var yF="TabsContent",wF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,forceMount:n,children:a,...i}=e,s=gb(yF,o),l=CF(s.baseId,r),u=SF(s.baseId,r),c=r===s.value,d=ai.useRef(c);return ai.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,ni.jsx)(st,{present:n||c,children:({present:f})=>(0,ni.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})})});wF.displayName=yF;function CF(e,t){return`${e}-trigger-${t}`}function SF(e,t){return`${e}-content-${t}`}var hb=mF,vb=hF,xb=xF,yb=wF;var ii=b(D()),Px=rm.forwardRef(({vertical:e=!1,...t},o)=>(0,ii.jsx)(hb,{ref:o,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));Px.displayName=hb.displayName;var m7=Q("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-3 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"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),Lx=rm.forwardRef(({className:e,variant:t,orientation:o,fullWidth:r,scrollable:n,...a},i)=>(0,ii.jsx)(vb,{ref:i,className:P("moonui-theme",m7({variant:t,orientation:o,fullWidth:r,scrollable:n,className:e})),...a}));Lx.displayName=vb.displayName;var g7=Q("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 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-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",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}}),Uc=rm.forwardRef(({className:e,variant:t,size:o,icon:r,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>(0,ii.jsxs)(xb,{ref:d,className:P("moonui-theme",g7({variant:t,size:o,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&n==="left"&&(0,ii.jsx)("span",{className:"mr-2",children:r}),u,r&&n==="right"&&(0,ii.jsx)("span",{className:"ml-2",children:r}),a&&(0,ii.jsx)("span",{className:"ml-2",children:a})]}));Uc.displayName=xb.displayName;var zc=rm.forwardRef(({className:e,animated:t=!1,...o},r)=>(0,ii.jsx)(yb,{ref:r,className:P("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}));zc.displayName=yb.displayName;var vs=b(M());var xa=b(D()),h7=Q("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"}}),v7=Q("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"}}),x7=Q("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"}}),y7=Q("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"}}),si=vs.forwardRef(({className:e,size:t,trackVariant:o,rangeVariant:r,thumbVariant:n,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...p},m)=>{let[g,x]=vs.useState(u||c||[0]);vs.useEffect(()=>{u!==void 0&&x(u)},[u]);let v=L=>s?s(L):`${Math.round(L*100)/100}`,h=(L,k,A)=>(L-k)/(A-k)*100,y=vs.useRef(null),w=p.min||0,C=p.max||100,S=p.step||1,R=L=>{let k=L.map(A=>{if(S<1){let F=S.toString().split(".")[1]?.length||0;return Math.round(A*Math.pow(10,F))/Math.pow(10,F)}return Math.round(A)});x(k),d&&d(k)},I=L=>{if(f)return;let k=y.current;if(!k)return;let A=k.getBoundingClientRect(),F=(L.clientX-A.left)/A.width,N=w+F*(C-w),U=Math.round(N/S)*S,O=Math.max(w,Math.min(C,U)),_=[...g];_[0]=O,R(_)},T=L=>k=>{if(f)return;k.preventDefault();let A=N=>{let U=y.current;if(!U)return;let O=U.getBoundingClientRect(),_=(N.clientX-O.left)/O.width,B=w+_*(C-w),E=Math.round(B/S)*S,J=Math.max(w,Math.min(C,E)),ae=[...g];ae[L]=J,R(ae)},F=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",F)};document.addEventListener("mousemove",A),document.addEventListener("mouseup",F)};return(0,xa.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,xa.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?(0,xa.jsx)("span",{children:v(g[0])}):(0,xa.jsxs)("span",{children:[v(g[0])," - ",v(g[g.length-1])]})}),(0,xa.jsxs)("div",{className:P("moonui-theme",h7({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,xa.jsx)("div",{ref:y,className:P(v7({variant:o||n||"default"})),onClick:I,children:(0,xa.jsx)("div",{className:P(x7({variant:r||n||"primary"})),style:{left:"0%",width:`${h(g[0],w,C)}%`}})}),g.map((L,k)=>(0,xa.jsx)("div",{className:P(y7({variant:n||"primary",size:a})),style:{left:`${h(L,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:T(k),"aria-label":`Thumb ${k+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":L,"aria-disabled":f},k))]})]})});si.displayName="Slider";var j=b(D()),bF=Q("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 RF(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 IF(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function w7(e){let t=RF(e);if(!t)return null;let o=t.r/255,r=t.g/255,n=t.b/255,a=Math.max(o,r,n),i=Math.min(o,r,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 o:s=((r-n)/c+(r<n?6:0))/6;break;case r:s=((n-o)/c+2)/6;break;case n:s=((o-r)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function C7(e,t,o){e=e/360,t=t/100,o=o/100;let r,n,a;if(t===0)r=n=a=o;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=o<.5?o*(1+t):o+t-o*t,l=2*o-s;r=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return IF(Math.round(r*255),Math.round(n*255),Math.round(a*255))}var PF=["#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 wb({className:e,size:t,shape:o,value:r="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=PF,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[m,g]=Kr.useState(!1),[x,v]=Kr.useState(r),[h,y]=Kr.useState(100),[w,C]=Kr.useState(!1),[S,R]=Kr.useState(r),I=Kr.useMemo(()=>w7(x)||{h:0,s:0,l:0},[x]),T=Kr.useMemo(()=>RF(x)||{r:0,g:0,b:0},[x]);Kr.useEffect(()=>{v(r),R(r)},[r]);let L=O=>{v(O),R(O),n?.(O)},k=(O,_)=>{let B={...I,[O]:_},E=C7(B.h,B.s,B.l);L(E)},A=(O,_)=>{let B={...T,[O]:_},E=IF(B.r,B.g,B.b);L(E)},F=O=>{let _=O.target.value;R(_),/^#[0-9A-F]{6}$/i.test(_)&&L(_)},N=async()=>{try{let O=x;u==="rgb"?O=`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"&&(O=`hsl(${I.h}, ${I.s}%, ${I.l}%)`),await navigator.clipboard.writeText(O),C(!0),setTimeout(()=>C(!1),2e3)}catch(O){console.error("Failed to copy:",O)}},U=()=>u==="rgb"?`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:x;return(0,j.jsxs)(oi,{open:m,onOpenChange:g,children:[(0,j.jsx)(ri,{asChild:!0,children:(0,j.jsx)(De,{variant:"outline",className:P(bF({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:x},disabled:f,...p,children:(0,j.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,j.jsxs)(va,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(Px,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(Lx,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(Uc,{value:"picker",children:"Picker"}),(0,j.jsx)(Uc,{value:"sliders",children:"Sliders"}),(0,j.jsx)(Uc,{value:"input",children:"Input"})]}),(0,j.jsxs)(zc,{value:"picker",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,j.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${I.h}, 100%, 50%))`}}),(0,j.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,j.jsx)(Be.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:`${I.s/100*280-8}px`,top:`${(1-I.l/100)*192-8}px`}})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(tr,{children:"Hue"}),(0,j.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,j.jsx)(si,{value:[I.h],onValueChange:([O])=>k("h",O),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(tr,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(si,{value:[h],onValueChange:([O])=>y(O),max:100,step:1,className:"flex-1"}),(0,j.jsxs)("span",{className:"text-sm w-10 text-right",children:[h,"%"]})]})]})]}),(0,j.jsxs)(zc,{value:"sliders",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-3",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(tr,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:T.r})]}),(0,j.jsx)(si,{value:[T.r],onValueChange:([O])=>A("r",O),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(tr,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:T.g})]}),(0,j.jsx)(si,{value:[T.g],onValueChange:([O])=>A("g",O),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(tr,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:T.b})]}),(0,j.jsx)(si,{value:[T.b],onValueChange:([O])=>A("b",O),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,j.jsx)("div",{className:"pt-2 border-t",children:(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.h,"\xB0"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.s,"%"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.l,"%"]})]})]})})]}),(0,j.jsxs)(zc,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(tr,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(Co,{value:S,onChange:F,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(De,{size:"icon",variant:"outline",onClick:()=>L(S),children:(0,j.jsx)(go,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(tr,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(Co,{type:"number",value:T.r,onChange:O=>A("r",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(Co,{type:"number",value:T.g,onChange:O=>A("g",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(Co,{type:"number",value:T.b,onChange:O=>A("b",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,j.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)("div",{className:P("h-10 w-10 rounded border-2",bF({shape:o})),style:{backgroundColor:x}}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:U()}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,j.jsx)(De,{size:"icon",variant:"ghost",onClick:N,className:"h-8 w-8",children:(0,j.jsx)(Ga,{mode:"wait",children:w?(0,j.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(go,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(Cf,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(tr,{children:"Preset Colors"}),(0,j.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(O=>(0,j.jsx)("button",{className:P("h-7 w-7 rounded border-2 transition-all hover:scale-110",x===O?"border-primary":"border-transparent"),style:{backgroundColor:O},onClick:()=>L(O)},O))})]})]})]})}function S7({value:e="#000000",onChange:t,colors:o=PF.slice(0,10),className:r,size:n="default"}){let a={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,j.jsx)("div",{className:P("moonui-theme","flex flex-wrap gap-2",r),children:o.map(i=>(0,j.jsx)("button",{className:P("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 b7({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,n]=Kr.useState(e),a=(i,s)=>{let l={...r,[i]:s};n(l),t?.(l)};return(0,j.jsxs)("div",{className:P("moonui-theme","space-y-4",o),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),(0,j.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(tr,{children:"Start Color"}),(0,j.jsx)(wb,{value:r.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(tr,{children:"End Color"}),(0,j.jsx)(wb,{value:r.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(tr,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),(0,j.jsx)(si,{value:[r.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var ys=b(M());var LF=1,R7=.9,I7=.8,P7=.17,Cb=.1,Sb=.999,L7=.9999,T7=.99,k7=/[\\\/_+.#"@\[\(\{&]/,M7=/[\\\/_+.#"@\[\(\{&]/g,E7=/[\s-]/,kF=/[\s-]/g;function bb(e,t,o,r,n,a,i){if(a===t.length)return n===e.length?LF:T7;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=r.charAt(a),u=o.indexOf(l,n),c=0,d,f,p,m;u>=0;)d=bb(e,t,o,r,u+1,a+1,i),d>c&&(u===n?d*=LF:k7.test(e.charAt(u-1))?(d*=I7,p=e.slice(n,u-1).match(M7),p&&n>0&&(d*=Math.pow(Sb,p.length))):E7.test(e.charAt(u-1))?(d*=R7,m=e.slice(n,u-1).match(kF),m&&n>0&&(d*=Math.pow(Sb,m.length))):(d*=P7,n>0&&(d*=Math.pow(Sb,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=L7)),(d<Cb&&o.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&o.charAt(u-1)!==r.charAt(a))&&(f=bb(e,t,o,r,u+1,a+2,i),f*Cb>d&&(d=f*Cb)),d>c&&(c=d),u=o.indexOf(l,u+1);return i[s]=c,c}function TF(e){return e.toLowerCase().replace(kF," ")}function MF(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,bb(e,t,TF(e),TF(t),0,0,{})}var Qe=b(M(),1);var We=b(D(),1),kx="Dialog",[EF,kLe]=Oe(kx),[A7,_n]=EF(kx),AF=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Qe.useRef(null),l=Qe.useRef(null),[u,c]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:kx});return(0,We.jsx)(A7,{scope:t,triggerRef:s,contentRef:l,contentId:Ae(),titleId:Ae(),descriptionId:Ae(),open:u,onOpenChange:c,onOpenToggle:Qe.useCallback(()=>c(d=>!d),[c]),modal:i,children:o})};AF.displayName=kx;var DF="DialogTrigger",NF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=_n(DF,o),a=de(t,n.triggerRef);return(0,We.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Pb(n.open),...r,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});NF.displayName=DF;var Rb="DialogPortal",[D7,OF]=EF(Rb,{forceMount:void 0}),FF=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:n}=e,a=_n(Rb,t);return(0,We.jsx)(D7,{scope:t,forceMount:o,children:Qe.Children.map(r,i=>(0,We.jsx)(st,{present:o||a.open,children:(0,We.jsx)(Cr,{asChild:!0,container:n,children:i})}))})};FF.displayName=Rb;var Tx="DialogOverlay",_F=Qe.forwardRef((e,t)=>{let o=OF(Tx,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=_n(Tx,e.__scopeDialog);return a.modal?(0,We.jsx)(st,{present:r||a.open,children:(0,We.jsx)(O7,{...n,ref:t})}):null});_F.displayName=Tx;var N7=sr("DialogOverlay.RemoveScroll"),O7=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=_n(Tx,o);return(0,We.jsx)(ti,{as:N7,allowPinchZoom:!0,shards:[n.contentRef],children:(0,We.jsx)($.div,{"data-state":Pb(n.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),zl="DialogContent",VF=Qe.forwardRef((e,t)=>{let o=OF(zl,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=_n(zl,e.__scopeDialog);return(0,We.jsx)(st,{present:r||a.open,children:a.modal?(0,We.jsx)(F7,{...n,ref:t}):(0,We.jsx)(_7,{...n,ref:t})})});VF.displayName=zl;var F7=Qe.forwardRef((e,t)=>{let o=_n(zl,e.__scopeDialog),r=Qe.useRef(null),n=de(t,o.contentRef,r);return Qe.useEffect(()=>{let a=r.current;if(a)return ms(a)},[]),(0,We.jsx)(BF,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault())})}),_7=Qe.forwardRef((e,t)=>{let o=_n(zl,e.__scopeDialog),r=Qe.useRef(!1),n=Qe.useRef(!1);return(0,We.jsx)(BF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;o.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),BF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=_n(zl,o),l=Qe.useRef(null),u=de(t,l);return us(),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Qa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,We.jsx)(Gr,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Pb(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(V7,{titleId:s.titleId}),(0,We.jsx)(H7,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ib="DialogTitle",HF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=_n(Ib,o);return(0,We.jsx)($.h2,{id:n.titleId,...r,ref:t})});HF.displayName=Ib;var UF="DialogDescription",zF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=_n(UF,o);return(0,We.jsx)($.p,{id:n.descriptionId,...r,ref:t})});zF.displayName=UF;var GF="DialogClose",WF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=_n(GF,o);return(0,We.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});WF.displayName=GF;function Pb(e){return e?"open":"closed"}var jF="DialogTitleWarning",[MLe,qF]=fP(jF,{contentName:zl,titleName:Ib,docsSlug:"dialog"}),V7=({titleId:e})=>{let t=qF(jF),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
60
60
 
61
61
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
62
62
 
63
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ze.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},N9="DialogDescriptionWarning",O9=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${i_(N9).contentName}}.`;return Ze.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},lx=jF,s_=KF,ux=YF,Mp=QF,Ep=ZF,zb=e_,Gb=r_,Wb=n_;var ee=R(E(),1);var Ap='[cmdk-group=""]',qb='[cmdk-group-items=""]',F9='[cmdk-group-heading=""]',c_='[cmdk-item=""]',u_=`${c_}:not([aria-disabled="true"])`,jb="cmdk-item-select",Cc="data-value",_9=(e,t,r)=>WF(e,t,r),d_=ee.createContext(void 0),Dp=()=>ee.useContext(d_),f_=ee.createContext(void 0),$b=()=>ee.useContext(f_),p_=ee.createContext(void 0),m_=ee.forwardRef((e,t)=>{let r=Sc(()=>{var _,Y;return{search:"",value:(Y=(_=e.value)!=null?_:e.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Sc(()=>new Set),n=Sc(()=>new Map),a=Sc(()=>new Map),i=Sc(()=>new Set),s=g_(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:g=!1,vimBindings:y=!0,...h}=e,v=De(),x=De(),w=De(),C=ee.useRef(null),b=K9();Cl(()=>{if(c!==void 0){let _=c.trim();r.current.value=_,S.emit()}},[c]),Cl(()=>{b(6,F)},[]);let S=ee.useMemo(()=>({subscribe:_=>(i.current.add(_),()=>i.current.delete(_)),snapshot:()=>r.current,setState:(_,Y,re)=>{var X,ce,z,ne;if(!Object.is(r.current[_],Y)){if(r.current[_]=Y,_==="search")A(),P(),b(1,M);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(w);he?he.focus():(X=document.getElementById(v))==null||X.focus()}if(b(7,()=>{var he;r.current.selectedItemId=(he=N())==null?void 0:he.id,S.emit()}),re||b(5,F),((ce=s.current)==null?void 0:ce.value)!==void 0){let he=Y??"";(ne=(z=s.current).onValueChange)==null||ne.call(z,he);return}}S.emit()}},emit:()=>{i.current.forEach(_=>_())}}),[]),I=ee.useMemo(()=>({value:(_,Y,re)=>{var X;Y!==((X=a.current.get(_))==null?void 0:X.value)&&(a.current.set(_,{value:Y,keywords:re}),r.current.filtered.items.set(_,T(Y,re)),b(2,()=>{P(),S.emit()}))},item:(_,Y)=>(o.current.add(_),Y&&(n.current.has(Y)?n.current.get(Y).add(_):n.current.set(Y,new Set([_]))),b(3,()=>{A(),P(),r.current.value||M(),S.emit()}),()=>{a.current.delete(_),o.current.delete(_),r.current.filtered.items.delete(_);let re=N();b(4,()=>{A(),re?.getAttribute("id")===_&&M(),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:v,inputId:w,labelId:x,listInnerRef:C}),[]);function T(_,Y){var re,X;let ce=(X=(re=s.current)==null?void 0:re.filter)!=null?X:_9;return _?ce(_,r.current.search,Y):0}function P(){if(!r.current.search||s.current.shouldFilter===!1)return;let _=r.current.filtered.items,Y=[];r.current.filtered.groups.forEach(X=>{let ce=n.current.get(X),z=0;ce.forEach(ne=>{let he=_.get(ne);z=Math.max(he,z)}),Y.push([X,z])});let re=C.current;H().sort((X,ce)=>{var z,ne;let he=X.getAttribute("id"),xe=ce.getAttribute("id");return((z=_.get(xe))!=null?z:0)-((ne=_.get(he))!=null?ne:0)}).forEach(X=>{let ce=X.closest(qb);ce?ce.appendChild(X.parentElement===ce?X:X.closest(`${qb} > *`)):re.appendChild(X.parentElement===re?X:X.closest(`${qb} > *`))}),Y.sort((X,ce)=>ce[1]-X[1]).forEach(X=>{var ce;let z=(ce=C.current)==null?void 0:ce.querySelector(`${Ap}[${Cc}="${encodeURIComponent(X[0])}"]`);z?.parentElement.appendChild(z)})}function M(){let _=H().find(re=>re.getAttribute("aria-disabled")!=="true"),Y=_?.getAttribute(Cc);S.setState("value",Y||void 0)}function A(){var _,Y,re,X;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 z of o.current){let ne=(Y=(_=a.current.get(z))==null?void 0:_.value)!=null?Y:"",he=(X=(re=a.current.get(z))==null?void 0:re.keywords)!=null?X:[],xe=T(ne,he);r.current.filtered.items.set(z,xe),xe>0&&ce++}for(let[z,ne]of n.current)for(let he of ne)if(r.current.filtered.items.get(he)>0){r.current.filtered.groups.add(z);break}r.current.filtered.count=ce}function F(){var _,Y,re;let X=N();X&&(((_=X.parentElement)==null?void 0:_.firstChild)===X&&((re=(Y=X.closest(Ap))==null?void 0:Y.querySelector(F9))==null||re.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function N(){var _;return(_=C.current)==null?void 0:_.querySelector(`${c_}[aria-selected="true"]`)}function H(){var _;return Array.from(((_=C.current)==null?void 0:_.querySelectorAll(u_))||[])}function O(_){let Y=H()[_];Y&&S.setState("value",Y.getAttribute(Cc))}function U(_){var Y;let re=N(),X=H(),ce=X.findIndex(ne=>ne===re),z=X[ce+_];(Y=s.current)!=null&&Y.loop&&(z=ce+_<0?X[X.length-1]:ce+_===X.length?X[0]:X[ce+_]),z&&S.setState("value",z.getAttribute(Cc))}function V(_){let Y=N(),re=Y?.closest(Ap),X;for(;re&&!X;)re=_>0?j9(re,Ap):$9(re,Ap),X=re?.querySelector(u_);X?S.setState("value",X.getAttribute(Cc)):U(_)}let k=()=>O(H().length-1),Z=_=>{_.preventDefault(),_.metaKey?k():_.altKey?V(1):U(1)},ae=_=>{_.preventDefault(),_.metaKey?O(0):_.altKey?V(-1):U(-1)};return ee.createElement($.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:_=>{var Y;(Y=h.onKeyDown)==null||Y.call(h,_);let re=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||re))switch(_.key){case"n":case"j":{y&&_.ctrlKey&&Z(_);break}case"ArrowDown":{Z(_);break}case"p":case"k":{y&&_.ctrlKey&&ae(_);break}case"ArrowUp":{ae(_);break}case"Home":{_.preventDefault(),O(0);break}case"End":{_.preventDefault(),k();break}case"Enter":{_.preventDefault();let X=N();if(X){let ce=new Event(jb);X.dispatchEvent(ce)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:Y9},l),cx(e,_=>ee.createElement(f_.Provider,{value:S},ee.createElement(d_.Provider,{value:I},_))))}),V9=ee.forwardRef((e,t)=>{var r,o;let n=De(),a=ee.useRef(null),i=ee.useContext(p_),s=Dp(),l=g_(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;Cl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=h_(n,a,[e.value,e.children,a],e.keywords),d=$b(),f=Ji(b=>b.value&&b.value===c.current),p=Ji(b=>u||s.filter()===!1?!0:b.search?b.filtered.items.get(n)>0:!0);ee.useEffect(()=>{let b=a.current;if(!(!b||e.disabled))return b.addEventListener(jb,m),()=>b.removeEventListener(jb,m)},[p,e.onSelect,e.disabled]);function m(){var b,S;g(),(S=(b=l.current).onSelect)==null||S.call(b,c.current)}function g(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:y,value:h,onSelect:v,forceMount:x,keywords:w,...C}=e;return ee.createElement($.div,{ref:eo(a,t),...C,id:n,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||s.getDisablePointerSelection()?void 0:g,onClick:y?void 0:m},e.children)}),B9=ee.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=De(),s=ee.useRef(null),l=ee.useRef(null),u=De(),c=Dp(),d=Ji(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);Cl(()=>c.group(i),[]),h_(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:n}),[n]);return ee.createElement($.div,{ref:eo(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),cx(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},ee.createElement(p_.Provider,{value:f},p))))}),H9=ee.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=ee.useRef(null),a=Ji(i=>!i.search);return!r&&!a?null:ee.createElement($.div,{ref:eo(n,t),...o,"cmdk-separator":"",role:"separator"})}),U9=ee.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=$b(),i=Ji(u=>u.search),s=Ji(u=>u.selectedItemId),l=Dp();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement($.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)}})}),z9=ee.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=ee.useRef(null),i=ee.useRef(null),s=Ji(u=>u.selectedItemId),l=Dp();return ee.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)}}},[]),ee.createElement($.div,{ref:eo(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},cx(e,u=>ee.createElement("div",{ref:eo(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),G9=ee.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return ee.createElement(lx,{open:r,onOpenChange:o},ee.createElement(ux,{container:i},ee.createElement(Mp,{"cmdk-overlay":"",className:n}),ee.createElement(Ep,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(m_,{ref:t,...s}))))}),W9=ee.forwardRef((e,t)=>Ji(r=>r.filtered.count===0)?ee.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),q9=ee.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return ee.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},cx(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),Or=Object.assign(m_,{List:z9,Item:V9,Input:U9,Group:B9,Separator:H9,Dialog:G9,Empty:W9,Loading:q9});function j9(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function $9(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function g_(e){let t=ee.useRef(e);return Cl(()=>{t.current=e}),t}var Cl=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function Sc(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function Ji(e){let t=$b(),r=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,r,r)}function h_(e,t,r,o=[]){let n=ee.useRef(),a=Dp();return Cl(()=>{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(Cc,s),n.current=s}),n}var K9=()=>{let[e,t]=ee.useState(),r=Sc(()=>new Map);return Cl(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function X9(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function cx({asChild:e,children:t},r){return e&&ee.isValidElement(t)?ee.cloneElement(X9(t),{ref:t.ref},r(t.props.children)):r(t)}var Y9={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var bc=R(E());var Ct=R(D()),dx=lx,v_=s_,Q9=ux,x_=Wb,Z9=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"}}),y_=bc.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,Ct.jsx)(Mp,{ref:n,className:L("moonui-theme",Z9({variant:t,animation:r}),e),...o}));y_.displayName=Mp.displayName;var J9=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"}}),Np=bc.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:m=!1,onClose:g,...y},h)=>{let v=()=>{g&&g()};return(0,Ct.jsxs)(Q9,{children:[(0,Ct.jsx)(y_,{variant:s,animation:l,onClick:u?void 0:v}),(0,Ct.jsxs)(Ep,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:L(J9({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",m&&"border-success/40",e),...y,children:[(c||d||f)&&(0,Ct.jsxs)(fx,{className:"flex gap-4",children:[(f||p||m)&&(0,Ct.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,Ct.jsx)(Ot,{className:"h-5 w-5 animate-spin text-primary"}),m&&(0,Ct.jsx)(dr,{className:"h-5 w-5 text-success"}),!p&&!m&&f&&(0,Ct.jsx)("span",{className:"text-primary",children:f})]}),(0,Ct.jsxs)("div",{className:"flex-1",children:[c&&(0,Ct.jsx)(Rc,{children:c}),d&&(0,Ct.jsx)(px,{children:d})]})]}),t,!u&&(0,Ct.jsxs)(Wb,{onClick:v,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,Ct.jsx)(lo,{className:"h-4 w-4"}),(0,Ct.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Np.displayName=Ep.displayName;var fx=({className:e,...t})=>(0,Ct.jsx)("div",{className:L("flex flex-col space-y-2 text-center sm:text-left",e),...t});fx.displayName="DialogHeader";var Kb=({className:e,...t})=>(0,Ct.jsx)("div",{className:L("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});Kb.displayName="DialogFooter";var Rc=bc.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)(zb,{ref:r,className:L("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));Rc.displayName=zb.displayName;var px=bc.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)(Gb,{ref:r,className:L("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));px.displayName=Gb.displayName;var w_=bc.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)("form",{ref:r,className:L("moonui-theme","flex flex-col gap-4",e),...t}));w_.displayName="DialogForm";var xr=R(D()),e7=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"}}),mx=es.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,xr.jsx)(Or,{ref:n,className:L("moonui-theme",e7({variant:t,size:r}),e),...o}));mx.displayName=Or.displayName;var C_=({children:e,commandClassName:t,...r})=>(0,xr.jsx)(dx,{...r,children:(0,xr.jsxs)(Np,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,xr.jsx)(Rc,{className:"sr-only",children:"Command Menu"}),(0,xr.jsx)(mx,{className:L("[&_[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})]})}),Xb=es.forwardRef(({className:e,...t},r)=>(0,xr.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,xr.jsx)(Ds,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,xr.jsx)(Or.Input,{ref:r,className:L("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})]}));Xb.displayName=Or.Input.displayName;var Yb=es.forwardRef(({className:e,...t},r)=>(0,xr.jsx)(Or.List,{ref:r,className:L("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Yb.displayName=Or.List.displayName;var Qb=es.forwardRef(({className:e,...t},r)=>(0,xr.jsx)(Or.Empty,{ref:r,className:L("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));Qb.displayName=Or.Empty.displayName;var Zb=es.forwardRef(({className:e,...t},r)=>(0,xr.jsx)(Or.Group,{ref:r,className:L("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}));Zb.displayName=Or.Group.displayName;var Jb=es.forwardRef(({className:e,...t},r)=>(0,xr.jsx)(Or.Separator,{ref:r,className:L("moonui-theme","-mx-1 h-px bg-border",e),...t}));Jb.displayName=Or.Separator.displayName;var eR=es.forwardRef(({className:e,...t},r)=>(0,xr.jsx)(Or.Item,{ref:r,className:L("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}));eR.displayName=Or.Item.displayName;var tR=({className:e,...t})=>(0,xr.jsx)("span",{className:L("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});tR.displayName="CommandShortcut";var CR=R(E());var _p=R(E(),1);function ts(e,t){return typeof e=="function"?e(t):e}function ho(e,t){return r=>{t.setState(o=>({...o,[e]:ts(r,o[e])}))}}function xx(e){return e instanceof Function}function t7(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function r7(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 me(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=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
63
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Qe.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},B7="DialogDescriptionWarning",H7=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qF(B7).contentName}}.`;return Qe.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Mx=AF,$F=NF,Ex=FF,nm=_F,am=VF,Lb=HF,Tb=zF,kb=WF;var te=b(M(),1);var im='[cmdk-group=""]',Mb='[cmdk-group-items=""]',U7='[cmdk-group-heading=""]',YF='[cmdk-item=""]',XF=`${YF}:not([aria-disabled="true"])`,Eb="cmdk-item-select",Gc="data-value",z7=(e,t,o)=>MF(e,t,o),QF=te.createContext(void 0),sm=()=>te.useContext(QF),ZF=te.createContext(void 0),Ab=()=>te.useContext(ZF),JF=te.createContext(void 0),e_=te.forwardRef((e,t)=>{let o=Wc(()=>{var V,Y;return{search:"",value:(Y=(V=e.value)!=null?V:e.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Wc(()=>new Set),n=Wc(()=>new Map),a=Wc(()=>new Map),i=Wc(()=>new Set),s=t_(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:g=!1,vimBindings:x=!0,...v}=e,h=Ae(),y=Ae(),w=Ae(),C=te.useRef(null),S=J7();Gl(()=>{if(c!==void 0){let V=c.trim();o.current.value=V,R.emit()}},[c]),Gl(()=>{S(6,F)},[]);let R=te.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>o.current,setState:(V,Y,oe)=>{var X,ce,z,ne;if(!Object.is(o.current[V],Y)){if(o.current[V]=Y,V==="search")A(),L(),S(1,k);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(w);he?he.focus():(X=document.getElementById(h))==null||X.focus()}if(S(7,()=>{var he;o.current.selectedItemId=(he=N())==null?void 0:he.id,R.emit()}),oe||S(5,F),((ce=s.current)==null?void 0:ce.value)!==void 0){let he=Y??"";(ne=(z=s.current).onValueChange)==null||ne.call(z,he);return}}R.emit()}},emit:()=>{i.current.forEach(V=>V())}}),[]),I=te.useMemo(()=>({value:(V,Y,oe)=>{var X;Y!==((X=a.current.get(V))==null?void 0:X.value)&&(a.current.set(V,{value:Y,keywords:oe}),o.current.filtered.items.set(V,T(Y,oe)),S(2,()=>{L(),R.emit()}))},item:(V,Y)=>(r.current.add(V),Y&&(n.current.has(Y)?n.current.get(Y).add(V):n.current.set(Y,new Set([V]))),S(3,()=>{A(),L(),o.current.value||k(),R.emit()}),()=>{a.current.delete(V),r.current.delete(V),o.current.filtered.items.delete(V);let oe=N();S(4,()=>{A(),oe?.getAttribute("id")===V&&k(),R.emit()})}),group:V=>(n.current.has(V)||n.current.set(V,new Set),()=>{a.current.delete(V),n.current.delete(V)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:h,inputId:w,labelId:y,listInnerRef:C}),[]);function T(V,Y){var oe,X;let ce=(X=(oe=s.current)==null?void 0:oe.filter)!=null?X:z7;return V?ce(V,o.current.search,Y):0}function L(){if(!o.current.search||s.current.shouldFilter===!1)return;let V=o.current.filtered.items,Y=[];o.current.filtered.groups.forEach(X=>{let ce=n.current.get(X),z=0;ce.forEach(ne=>{let he=V.get(ne);z=Math.max(he,z)}),Y.push([X,z])});let oe=C.current;U().sort((X,ce)=>{var z,ne;let he=X.getAttribute("id"),xe=ce.getAttribute("id");return((z=V.get(xe))!=null?z:0)-((ne=V.get(he))!=null?ne:0)}).forEach(X=>{let ce=X.closest(Mb);ce?ce.appendChild(X.parentElement===ce?X:X.closest(`${Mb} > *`)):oe.appendChild(X.parentElement===oe?X:X.closest(`${Mb} > *`))}),Y.sort((X,ce)=>ce[1]-X[1]).forEach(X=>{var ce;let z=(ce=C.current)==null?void 0:ce.querySelector(`${im}[${Gc}="${encodeURIComponent(X[0])}"]`);z?.parentElement.appendChild(z)})}function k(){let V=U().find(oe=>oe.getAttribute("aria-disabled")!=="true"),Y=V?.getAttribute(Gc);R.setState("value",Y||void 0)}function A(){var V,Y,oe,X;if(!o.current.search||s.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let ce=0;for(let z of r.current){let ne=(Y=(V=a.current.get(z))==null?void 0:V.value)!=null?Y:"",he=(X=(oe=a.current.get(z))==null?void 0:oe.keywords)!=null?X:[],xe=T(ne,he);o.current.filtered.items.set(z,xe),xe>0&&ce++}for(let[z,ne]of n.current)for(let he of ne)if(o.current.filtered.items.get(he)>0){o.current.filtered.groups.add(z);break}o.current.filtered.count=ce}function F(){var V,Y,oe;let X=N();X&&(((V=X.parentElement)==null?void 0:V.firstChild)===X&&((oe=(Y=X.closest(im))==null?void 0:Y.querySelector(U7))==null||oe.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function N(){var V;return(V=C.current)==null?void 0:V.querySelector(`${YF}[aria-selected="true"]`)}function U(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(XF))||[])}function O(V){let Y=U()[V];Y&&R.setState("value",Y.getAttribute(Gc))}function _(V){var Y;let oe=N(),X=U(),ce=X.findIndex(ne=>ne===oe),z=X[ce+V];(Y=s.current)!=null&&Y.loop&&(z=ce+V<0?X[X.length-1]:ce+V===X.length?X[0]:X[ce+V]),z&&R.setState("value",z.getAttribute(Gc))}function B(V){let Y=N(),oe=Y?.closest(im),X;for(;oe&&!X;)oe=V>0?Q7(oe,im):Z7(oe,im),X=oe?.querySelector(XF);X?R.setState("value",X.getAttribute(Gc)):_(V)}let E=()=>O(U().length-1),J=V=>{V.preventDefault(),V.metaKey?E():V.altKey?B(1):_(1)},ae=V=>{V.preventDefault(),V.metaKey?O(0):V.altKey?B(-1):_(-1)};return te.createElement($.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:V=>{var Y;(Y=v.onKeyDown)==null||Y.call(v,V);let oe=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||oe))switch(V.key){case"n":case"j":{x&&V.ctrlKey&&J(V);break}case"ArrowDown":{J(V);break}case"p":case"k":{x&&V.ctrlKey&&ae(V);break}case"ArrowUp":{ae(V);break}case"Home":{V.preventDefault(),O(0);break}case"End":{V.preventDefault(),E();break}case"Enter":{V.preventDefault();let X=N();if(X){let ce=new Event(Eb);X.dispatchEvent(ce)}}}}},te.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:tK},l),Ax(e,V=>te.createElement(ZF.Provider,{value:R},te.createElement(QF.Provider,{value:I},V))))}),G7=te.forwardRef((e,t)=>{var o,r;let n=Ae(),a=te.useRef(null),i=te.useContext(JF),s=sm(),l=t_(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:i?.forceMount;Gl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=o_(n,a,[e.value,e.children,a],e.keywords),d=Ab(),f=xs(S=>S.value&&S.value===c.current),p=xs(S=>u||s.filter()===!1?!0:S.search?S.filtered.items.get(n)>0:!0);te.useEffect(()=>{let S=a.current;if(!(!S||e.disabled))return S.addEventListener(Eb,m),()=>S.removeEventListener(Eb,m)},[p,e.onSelect,e.disabled]);function m(){var S,R;g(),(R=(S=l.current).onSelect)==null||R.call(S,c.current)}function g(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:x,value:v,onSelect:h,forceMount:y,keywords:w,...C}=e;return te.createElement($.div,{ref:ir(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:g,onClick:x?void 0:m},e.children)}),W7=te.forwardRef((e,t)=>{let{heading:o,children:r,forceMount:n,...a}=e,i=Ae(),s=te.useRef(null),l=te.useRef(null),u=Ae(),c=sm(),d=xs(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);Gl(()=>c.group(i),[]),o_(i,s,[e.value,e.heading,l]);let f=te.useMemo(()=>({id:i,forceMount:n}),[n]);return te.createElement($.div,{ref:ir(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},o&&te.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),Ax(e,p=>te.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},te.createElement(JF.Provider,{value:f},p))))}),j7=te.forwardRef((e,t)=>{let{alwaysRender:o,...r}=e,n=te.useRef(null),a=xs(i=>!i.search);return!o&&!a?null:te.createElement($.div,{ref:ir(n,t),...r,"cmdk-separator":"",role:"separator"})}),q7=te.forwardRef((e,t)=>{let{onValueChange:o,...r}=e,n=e.value!=null,a=Ab(),i=xs(u=>u.search),s=xs(u=>u.selectedItemId),l=sm();return te.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),te.createElement($.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":s,id:l.inputId,type:"text",value:n?e.value:i,onChange:u=>{n||a.setState("search",u.target.value),o?.(u.target.value)}})}),$7=te.forwardRef((e,t)=>{let{children:o,label:r="Suggestions",...n}=e,a=te.useRef(null),i=te.useRef(null),s=xs(u=>u.selectedItemId),l=sm();return te.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)}}},[]),te.createElement($.div,{ref:ir(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},Ax(e,u=>te.createElement("div",{ref:ir(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),K7=te.forwardRef((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:n,contentClassName:a,container:i,...s}=e;return te.createElement(Mx,{open:o,onOpenChange:r},te.createElement(Ex,{container:i},te.createElement(nm,{"cmdk-overlay":"",className:n}),te.createElement(am,{"aria-label":e.label,"cmdk-dialog":"",className:a},te.createElement(e_,{ref:t,...s}))))}),X7=te.forwardRef((e,t)=>xs(o=>o.filtered.count===0)?te.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Y7=te.forwardRef((e,t)=>{let{progress:o,children:r,label:n="Loading...",...a}=e;return te.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},Ax(e,i=>te.createElement("div",{"aria-hidden":!0},i)))}),_o=Object.assign(e_,{List:$7,Item:G7,Input:q7,Group:W7,Separator:j7,Dialog:K7,Empty:X7,Loading:Y7});function Q7(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function Z7(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function t_(e){let t=te.useRef(e);return Gl(()=>{t.current=e}),t}var Gl=typeof window>"u"?te.useEffect:te.useLayoutEffect;function Wc(e){let t=te.useRef();return t.current===void 0&&(t.current=e()),t}function xs(e){let t=Ab(),o=()=>e(t.snapshot());return te.useSyncExternalStore(t.subscribe,o,o)}function o_(e,t,o,r=[]){let n=te.useRef(),a=sm();return Gl(()=>{var i;let s=(()=>{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():n.current}})(),l=r.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(Gc,s),n.current=s}),n}var J7=()=>{let[e,t]=te.useState(),o=Wc(()=>new Map);return Gl(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,n)=>{o.current.set(r,n),t({})}};function eK(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ax({asChild:e,children:t},o){return e&&te.isValidElement(t)?te.cloneElement(eK(t),{ref:t.ref},o(t.props.children)):o(t)}var tK={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var jc=b(M());var wt=b(D()),Db=Mx,oK=$F,rK=Ex,nK=kb,aK=Q("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"}}),r_=jc.forwardRef(({className:e,variant:t,animation:o,...r},n)=>(0,wt.jsx)(nm,{ref:n,className:P("moonui-theme",aK({variant:t,animation:o}),e),...r}));r_.displayName=nm.displayName;var iK=Q("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"}}),Dx=jc.forwardRef(({className:e,children:t,variant:o,size:r,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:m=!1,onClose:g,...x},v)=>{let h=()=>{g&&g()};return(0,wt.jsxs)(rK,{children:[(0,wt.jsx)(r_,{variant:s,animation:l,onClick:u?void 0:h}),(0,wt.jsxs)(am,{ref:v,onEscapeKeyDown:u?void 0:h,onInteractOutside:u?void 0:h,className:P(iK({variant:o,size:r,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",m&&"border-success/40",e),...x,children:[(c||d||f)&&(0,wt.jsxs)(Nb,{className:"flex gap-4",children:[(f||p||m)&&(0,wt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,wt.jsx)(_t,{className:"h-5 w-5 animate-spin text-primary"}),m&&(0,wt.jsx)(go,{className:"h-5 w-5 text-success"}),!p&&!m&&f&&(0,wt.jsx)("span",{className:"text-primary",children:f})]}),(0,wt.jsxs)("div",{className:"flex-1",children:[c&&(0,wt.jsx)(lm,{children:c}),d&&(0,wt.jsx)(Ob,{children:d})]})]}),t,!u&&(0,wt.jsxs)(kb,{onClick:h,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)(mr,{className:"h-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Dx.displayName=am.displayName;var Nb=({className:e,...t})=>(0,wt.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});Nb.displayName="DialogHeader";var n_=({className:e,...t})=>(0,wt.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});n_.displayName="DialogFooter";var lm=jc.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(Lb,{ref:o,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));lm.displayName=Lb.displayName;var Ob=jc.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(Tb,{ref:o,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));Ob.displayName=Tb.displayName;var sK=jc.forwardRef(({className:e,...t},o)=>(0,wt.jsx)("form",{ref:o,className:P("moonui-theme","flex flex-col gap-4",e),...t}));sK.displayName="DialogForm";var bo=b(D()),lK=Q("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"}}),Fb=ys.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,bo.jsx)(_o,{ref:n,className:P("moonui-theme",lK({variant:t,size:o}),e),...r}));Fb.displayName=_o.displayName;var uK=({children:e,commandClassName:t,...o})=>(0,bo.jsx)(Db,{...o,children:(0,bo.jsxs)(Dx,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,bo.jsx)(lm,{className:"sr-only",children:"Command Menu"}),(0,bo.jsx)(Fb,{className:P("[&_[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})]})}),a_=ys.forwardRef(({className:e,...t},o)=>(0,bo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,bo.jsx)(rl,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,bo.jsx)(_o.Input,{ref:o,className:P("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})]}));a_.displayName=_o.Input.displayName;var i_=ys.forwardRef(({className:e,...t},o)=>(0,bo.jsx)(_o.List,{ref:o,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));i_.displayName=_o.List.displayName;var s_=ys.forwardRef(({className:e,...t},o)=>(0,bo.jsx)(_o.Empty,{ref:o,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));s_.displayName=_o.Empty.displayName;var l_=ys.forwardRef(({className:e,...t},o)=>(0,bo.jsx)(_o.Group,{ref:o,className:P("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}));l_.displayName=_o.Group.displayName;var u_=ys.forwardRef(({className:e,...t},o)=>(0,bo.jsx)(_o.Separator,{ref:o,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));u_.displayName=_o.Separator.displayName;var c_=ys.forwardRef(({className:e,...t},o)=>(0,bo.jsx)(_o.Item,{ref:o,className:P("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}));c_.displayName=_o.Item.displayName;var d_=({className:e,...t})=>(0,bo.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});d_.displayName="CommandShortcut";var eR=b(M());var dm=b(M(),1);function ws(e,t){return typeof e=="function"?e(t):e}function Sr(e,t){return o=>{t.setState(r=>({...r,[e]:ws(o,r[e])}))}}function _x(e){return e instanceof Function}function cK(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function dK(e,t){let o=[],r=n=>{n.forEach(a=>{o.push(a);let i=t(a);i!=null&&i.length&&r(i)})};return r(e),o}function me(e,t,o){let r=[],n;return a=>{let i;o.key&&o.debug&&(i=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((c,d)=>r[d]!==c)))return n;r=s;let u;if(o.key&&o.debug&&(u=Date.now()),n=t(...s),o==null||o.onChange==null||o.onChange(n),o.key&&o.debug&&o!=null&&o.debug()){let c=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,p=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
64
64
  font-size: .6rem;
65
65
  font-weight: bold;
66
- color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,r?.key)}return n}}function ge(e,t,r,o){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:o}}function o7(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:me(()=>[e,r,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,r,t,e)},{}),a}function n7(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 g of l.split(".")){var m;p=(m=p)==null?void 0:m[g]}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:me(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:me(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let m=d.columns.flatMap(g=>g.getLeafColumns());return f(m)}return[d]},ge(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var yr="debugHeaders";function S_(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 a7={createTable:e=>{e.getHeaderGroups=me(()=>[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 gx(t,[...s,...u,...l],e)},ge(e.options,yr,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[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))),gx(t,r,e,"center")),ge(e.options,yr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[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 gx(t,a,e,"left")},ge(e.options,yr,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[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 gx(t,a,e,"right")},ge(e.options,yr,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,yr,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,yr,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,yr,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,yr,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,yr,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,yr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,yr,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,yr,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,yr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,yr,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,yr,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[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()},ge(e.options,yr,"getLeafHeaders"))}};function gx(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(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&s(m.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let m={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(y=>{let h=[...g].reverse()[0],v=y.column.depth===m.depth,x,w=!1;if(v&&y.column.parent?x=y.column.parent:(x=y.column,w=!0),h&&h?.column===x)h.subHeaders.push(y);else{let C=S_(r,x,{id:[o,p,x.id,y?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(b=>b.column===x).length}`:void 0,depth:p,index:g.length});C.subHeaders.push(y),g.push(C)}m.headers.push(y),y.headerGroup=m}),l.push(m),p>0&&u(g,p-1)},c=t.map((f,p)=>S_(r,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,h=[0];m.subHeaders&&m.subHeaders.length?(h=[],d(m.subHeaders).forEach(x=>{let{colSpan:w,rowSpan:C}=x;g+=w,h.push(C)})):g=1;let v=Math.min(...h);return y=y+v,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var mR=(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:()=>r7(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:me(()=>[e.getAllLeafColumns()],l=>l.map(u=>o7(e,s,u,u.id)),ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:me(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ge(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},i7={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()}}},R_=(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))};R_.autoRemove=e=>Rn(e);var I_=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};I_.autoRemove=e=>Rn(e);var L_=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};L_.autoRemove=e=>Rn(e);var P_=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};P_.autoRemove=e=>Rn(e);var T_=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});T_.autoRemove=e=>Rn(e)||!(e!=null&&e.length);var k_=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});k_.autoRemove=e=>Rn(e)||!(e!=null&&e.length);var M_=(e,t,r)=>e.getValue(t)===r;M_.autoRemove=e=>Rn(e);var E_=(e,t,r)=>e.getValue(t)==r;E_.autoRemove=e=>Rn(e);var gR=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};gR.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]};gR.autoRemove=e=>Rn(e)||Rn(e[0])&&Rn(e[1]);var Wa={includesString:R_,includesStringSensitive:I_,equalsString:L_,arrIncludes:P_,arrIncludesAll:T_,arrIncludesSome:k_,equals:M_,weakEquals:E_,inNumberRange:gR};function Rn(e){return e==null||e===""}var s7={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"?Wa.includesString:typeof o=="number"?Wa.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Wa.equals:Array.isArray(o)?Wa.arrIncludes:Wa.weakEquals},e.getFilterFn=()=>{var r,o;return xx(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:Wa[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=ts(r,a?a.value:void 0);if(b_(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=ts(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(b_(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 b_(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var l7=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),u7=(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},c7=(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},d7=(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]},f7=(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},p7=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!t7(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},m7=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),g7=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,h7=(e,t)=>t.length,rR={sum:l7,min:u7,max:c7,extent:d7,mean:f7,median:p7,unique:m7,uniqueCount:g7,count:h7},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 rR.sum;if(Object.prototype.toString.call(o)==="[object Date]")return rR.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return xx(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:rR[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 x7(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 y7={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ho("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(r=>[Fp(t,r)],r=>r.findIndex(o=>o.id===e.id),ge(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=me(()=>[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 x7(a,r,o)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},oR=()=>({left:[],right:[]}),w7={getInitialState:e=>({columnPinning:oR(),...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=me(()=>[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))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[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"})),ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=me(()=>[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"})),ge(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?oR():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:oR())},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=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[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))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function C7(e){return e||(typeof document<"u"?document:null)}var hx={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},nR=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),S7={getDefaultColumnDef:()=>hx,getInitialState:e=>({columnSizing:{},columnSizingInfo:nR(),...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:hx.minSize,(o=a??e.columnDef.size)!=null?o:hx.size),(n=e.columnDef.maxSize)!=null?n:hx.maxSize)},e.getStart=me(r=>[r,Fp(t,r),t.getState().columnSizing],(r,o)=>o.slice(0,e.getIndex(r)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(r=>[r,Fp(t,r),t.getState().columnSizing],(r,o)=>o.slice(e.getIndex(r)+1).reduce((n,a)=>n+a.getSize(),0),ge(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(),aR(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[o.id,o.getSize()]],l=aR(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(h,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(x=>{var w,C;let b=t.options.columnResizeDirection==="rtl"?-1:1,S=(v-((w=x?.startOffset)!=null?w:0))*b,I=Math.max(S/((C=x?.startSize)!=null?C:0),-.999999);return x.columnSizingStart.forEach(T=>{let[P,M]=T;u[P]=Math.round(Math.max(M+M*I,0)*100)/100}),{...x,deltaOffset:S,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||h==="end")&&t.setColumnSizing(x=>({...x,...u})))},d=h=>c("move",h),f=h=>{c("end",h),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=C7(r),m={moveHandler:h=>d(h.clientX),upHandler:h=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),f(h.clientX)}},g={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),d(h.touches[0].clientX),!1),upHandler:h=>{var v;p?.removeEventListener("touchmove",g.moveHandler),p?.removeEventListener("touchend",g.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),f((v=h.touches[0])==null?void 0:v.clientX)}},y=b7()?{passive:!1}:!1;aR(a)?(p?.addEventListener("touchmove",g.moveHandler,y),p?.addEventListener("touchend",g.upHandler,y)):(p?.addEventListener("mousemove",m.moveHandler,y),p?.addEventListener("mouseup",m.upHandler,y)),t.setColumnSizingInfo(h=>({...h,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?nR():(r=e.initialState.columnSizingInfo)!=null?r:nR())},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}}},vx=null;function b7(){if(typeof vx=="boolean")return vx;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 vx=e,vx}function aR(e){return e.type==="touchstart"}var R7={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=me(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(o=>o.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,o,n)=>[...r,...o,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,o)=>me(()=>[o(),o().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(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 I7={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()}}},L7={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=()=>Wa.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return xx(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:Wa[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},P7={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()}}}},uR=0,cR=10,iR=()=>({pageIndex:uR,pageSize:cR}),T7={getInitialState:e=>({...e,pagination:{...iR(),...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=>ts(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?iR():(n=e.initialState.pagination)!=null?n:iR())},e.setPageIndex=o=>{e.setPagination(n=>{let a=ts(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?uR:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:uR)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?cR:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:cR)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,ts(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=ts(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],o=>{let n=[];return o&&o>0&&(n=[...new Array(o)].fill(null).map((a,i)=>i)),n},ge(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}}},sR=()=>({top:[],bottom:[]}),k7={getInitialState:e=>({rowPinning:sR(),...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(g=>!(s!=null&&s.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(s!=null&&s.has(g))),...Array.from(s)]}}if(r==="top"){var p,m;return{top:[...((p=l?.top)!=null?p:[]).filter(g=>!(s!=null&&s.has(g))),...Array.from(s)],bottom:((m=l?.bottom)!=null?m:[]).filter(g=>!(s!=null&&s.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(s!=null&&s.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(s!=null&&s.has(g)))}})},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?sR():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:sR())},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=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[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))},ge(e.options,"debugRows","getCenterRows"))}},M7={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=>{dR(n,a.id,o,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?lR(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?lR(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?lR(e,r):{rows:[],flatRows:[],rowsById:{}},ge(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 dR(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return hR(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return fR(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return fR(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)}}}},dR=(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=>dR(e,s.id,r,o,n))};function lR(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=hR(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 hR(e,t){var r;return(r=t[e.id])!=null?r:!1}function fR(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()&&(hR(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=fR(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var pR=/([0-9]+)/gm,E7=(e,t,r)=>A_(rs(e.getValue(r)).toLowerCase(),rs(t.getValue(r)).toLowerCase()),A7=(e,t,r)=>A_(rs(e.getValue(r)),rs(t.getValue(r))),D7=(e,t,r)=>vR(rs(e.getValue(r)).toLowerCase(),rs(t.getValue(r)).toLowerCase()),N7=(e,t,r)=>vR(rs(e.getValue(r)),rs(t.getValue(r))),O7=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},F7=(e,t,r)=>vR(e.getValue(r),t.getValue(r));function vR(e,t){return e===t?0:e>t?1:-1}function rs(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function A_(e,t){let r=e.split(pR).filter(Boolean),o=t.split(pR).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 Op={alphanumeric:E7,alphanumericCaseSensitive:A7,text:D7,textCaseSensitive:N7,datetime:O7,basic:F7},_7={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 Op.datetime;if(typeof a=="string"&&(o=!0,a.split(pR).length>1))return Op.alphanumeric}return o?Op.text:Op.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 xx(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:Op[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())}},V7=[a7,R7,y7,w7,i7,s7,I7,L7,_7,v7,P7,T7,k7,M7,S7];function D_(e){var t,r;let o=[...V7,...(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=ts(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,m)=>{var g;return(g=n.options.getRowId==null?void 0:n.options.getRowId(f,p,m))!=null?g:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let m=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!m&&(m=n.getCoreRowModel().rowsById[f],!m))throw new Error;return m},_getDefaultColumnDef:me(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:m=>{let g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,y;return(g=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...n._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:me(()=>[n._getColumnDefs()],f=>{let p=function(m,g,y){return y===void 0&&(y=0),m.map(h=>{let v=n7(n,h,y,g),x=h;return v.columns=x.columns?p(x.columns,v,y+1):[],v})};return p(f)},ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:me(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:me(()=>[n.getAllFlatColumns()],f=>f.reduce((p,m)=>(p[m.id]=m,p),{}),ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:me(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let m=f.flatMap(g=>g.getLeafColumns());return p(m)},ge(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 N_(){return e=>me(()=>[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=mR(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},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function B7(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 H7(e,t,r){return r.options.filterFromLeafRows?U7(e,t,r):z7(e,t,r)}function U7(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],m=mR(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(m.subRows=s(p.subRows,u+1),p=m,t(p)&&!m.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||m.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=m,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function z7(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 g=mR(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=s(p.subRows,u+1),p=g}c.push(p),n.push(p),a[p.id]=p}}return c};return{rows:s(e),flatRows:n,rowsById:a}}function O_(){return e=>me(()=>[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 m=e.getColumn(f.id);if(!m)return;let g=m.getFilterFn();g&&n.push({id:f.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.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 m=0;m<n.length;m++){u=n[m];let g=u.id;p.columnFilters[g]=u.filterFn(p,g,u.resolvedValue,y=>{p.columnFiltersMeta[g]=y})}if(a.length){for(let m=0;m<a.length;m++){c=a[m];let g=c.id;if(c.filterFn(p,g,c.resolvedValue,y=>{p.columnFiltersMeta[g]=y})){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 H7(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function F_(e){return t=>me(()=>[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=B7({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},ge(t.options,"debugTable","getPaginationRowModel"))}function __(){return e=>me(()=>[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 m=a[p],g=i[m.id],y=g.sortUndefined,h=(f=m?.desc)!=null?f:!1,v=0;if(y){let x=c.getValue(m.id),w=d.getValue(m.id),C=x===void 0,b=w===void 0;if(C||b){if(y==="first")return C?-1:1;if(y==="last")return C?1:-1;v=C&&b?0:C?y:-y}}if(v===0&&(v=g.sortingFn(c,d,m.id)),v!==0)return h&&(v*=-1),g.invertSorting&&(v*=-1),v}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}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function xR(e,t){return e?G7(e)?_p.createElement(e,t):e:null}function G7(e){return W7(e)||typeof e=="function"||q7(e)}function W7(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function q7(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function V_(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=_p.useState(()=>({current:D_(t)})),[o,n]=_p.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 wr=R(E());var dt=R(D()),j7=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"}}),Vp=wr.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,...a},i)=>{let s=t==="striped",l=wr.Children.map(a.children,u=>{if(wr.isValidElement(u)&&u.type==="tbody"){let c=u.props;return wr.cloneElement(u,{className:L(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,dt.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,dt.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,dt.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,dt.jsx)("table",{ref:i,className:L(j7({variant:t,size:r}),o&&"opacity-70",e),...a,children:l})]})});Vp.displayName="Table";var Bp=wr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("thead",{ref:r,className:L("moonui-theme","[&_tr]:border-b",e),...t}));Bp.displayName="TableHeader";var Hp=wr.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=wr.Children.count(o)>0;return(0,dt.jsx)("tbody",{ref:a,className:L("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,dt.jsx)("tr",{children:(0,dt.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,dt.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,dt.jsx)("div",{className:"text-sm",children:r})})})})})});Hp.displayName="TableBody";var yR=wr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("tfoot",{ref:r,className:L("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));yR.displayName="TableFooter";var Sl=wr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("tr",{ref:r,className:L("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Sl.displayName="TableRow";var Up=wr.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,align:n="left",children:a,...i},s)=>{let l=()=>t?r==="asc"?(0,dt.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,dt.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,dt.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,dt.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,dt.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,dt.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,dt.jsx)("th",{ref:s,className:L("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[n].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?o:void 0,...i,children:t||n!=="left"?(0,dt.jsxs)("div",{className:L("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});Up.displayName="TableHead";var Ic=wr.forwardRef(({className:e,align:t="left",...r},o)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,dt.jsx)("td",{ref:o,className:L("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});Ic.displayName="TableCell";var wR=wr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("caption",{ref:r,className:L("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));wR.displayName="TableCaption";var Ee=R(D());function B_({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]=CR.useState([]),[d,f]=CR.useState(""),p=V_({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:N_(),getPaginationRowModel:o?F_():void 0,getSortedRowModel:r?__():void 0,getFilteredRowModel:n?O_():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Ee.jsxs)("div",{className:L("space-y-4",l),children:[n&&(0,Ee.jsx)("div",{className:"flex items-center",children:(0,Ee.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ee.jsx)(Ds,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ee.jsx)(rr,{placeholder:i,value:d,onChange:m=>f(m.target.value),className:"pl-8"})]})}),(0,Ee.jsx)("div",{className:"rounded-md border",children:(0,Ee.jsxs)(Vp,{children:[(0,Ee.jsx)(Bp,{children:p.getHeaderGroups().map(m=>(0,Ee.jsx)(Sl,{children:m.headers.map(g=>(0,Ee.jsx)(Up,{children:g.isPlaceholder?null:(0,Ee.jsxs)("div",{className:L("flex items-center gap-2",g.column.getCanSort()&&"cursor-pointer select-none"),onClick:g.column.getToggleSortingHandler(),children:[xR(g.column.columnDef.header,g.getContext()),r&&g.column.getCanSort()&&(0,Ee.jsx)("div",{className:"ml-auto",children:g.column.getIsSorted()==="desc"?(0,Ee.jsx)(fu,{className:"h-4 w-4"}):g.column.getIsSorted()==="asc"?(0,Ee.jsx)(mu,{className:"h-4 w-4"}):(0,Ee.jsx)(pu,{className:"h-4 w-4 opacity-50"})})]})},g.id))},m.id))}),(0,Ee.jsx)(Hp,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(m=>(0,Ee.jsx)(Sl,{"data-state":m.getIsSelected()&&"selected",children:m.getVisibleCells().map(g=>(0,Ee.jsx)(Ic,{children:xR(g.column.columnDef.cell,g.getContext())},g.id))},m.id)):(0,Ee.jsx)(Sl,{children:(0,Ee.jsx)(Ic,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Ee.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ee.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Ee.jsxs)("div",{className:"space-x-2",children:[(0,Ee.jsxs)(Fe,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Ee.jsx)(an,{className:"h-4 w-4"}),"Previous"]}),(0,Ee.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Ee.jsxs)(Fe,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Ee.jsx)(kr,{className:"h-4 w-4"})]})]})]})]})}function H_(e){return({column:t})=>(0,Ee.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,Ee.jsx)(fu,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ee.jsx)(mu,{className:"ml-2 h-4 w-4"}):(0,Ee.jsx)(pu,{className:"ml-2 h-4 w-4"})]})}var Fr=R(E());var ye=R(D()),$7={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},SR=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 bR({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:m,allowClear:g=!0,readOnly:y=!1,showTodayButton:h=!0,calendarProps:v,disabled:x,...w}){let[C,b]=Fr.useState(!1),[S,I]=Fr.useState(n);Fr.useEffect(()=>{I(n)},[n]);let T=H=>{let O=Array.isArray(H)?H[0]:H&&typeof H=="object"&&"from"in H?H.from:H;I(O),a?.(O),O&&b(!1)},P=H=>{H.stopPropagation(),T(void 0)},M=()=>{T(new Date)},A=H=>!!(l&&H<l||u&&H>u||c?.some(O=>O.toDateString()===H.toDateString())||d?.includes(H.getDay())),F=S&&Sv(S)?Oo(S,s):null,N=m||(0,ye.jsx)(Ts,{className:"h-4 w-4"});return(0,ye.jsx)("div",{className:"moonui-theme",children:(0,ye.jsxs)(ta,{open:C,onOpenChange:b,children:[(0,ye.jsx)(ra,{asChild:!0,children:(0,ye.jsxs)(Fe,{variant:t==="ghost"?"ghost":"outline",className:L(SR({variant:t,size:r,state:o}),!F&&"text-muted-foreground",e),disabled:x||y,...w,children:[(0,ye.jsx)(Ta,{mode:"wait",children:(0,ye.jsxs)(He.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"&&N,(0,ye.jsx)("span",{className:"flex-1 truncate",children:F||i}),p==="right"&&N]},F||"placeholder")}),g&&F&&!y&&!x&&(0,ye.jsxs)(He.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:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),P(H))},children:[(0,ye.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,ye.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ye.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,ye.jsx)(Sn,{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,ye.jsxs)(He.div,{...$7,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(lc,{mode:"single",selected:S,onSelect:T,disabled:A,showOutsideDays:!1,className:L("rounded-2xl",v?.className),...v}),h&&(0,ye.jsx)("div",{className:"border-t px-4 py-3",children:(0,ye.jsx)(Fe,{variant:"ghost",size:"sm",onClick:M,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})}function U_({className:e,value:t,onChange:r,placeholder:o="Pick a date range",formatString:n="LLL dd, y",separator:a=" - ",...i}){let[s,l]=Fr.useState(!1),[u,c]=Fr.useState(t);Fr.useEffect(()=>{c(t)},[t]);let d=p=>{c(p),r?.(p),p?.from&&p?.to&&l(!1)},f=Fr.useMemo(()=>u?.from?u?.to?`${Oo(u.from,n)}${a}${Oo(u.to,n)}`:Oo(u.from,n):null,[u,n,a]);return(0,ye.jsxs)(ta,{open:s,onOpenChange:l,children:[(0,ye.jsx)(ra,{asChild:!0,children:(0,ye.jsxs)(Fe,{variant:i.variant==="ghost"?"ghost":"outline",className:L(SR({variant:i.variant,size:i.size,state:i.state}),!f&&"text-muted-foreground",e),disabled:i.disabled||i.readOnly,children:[(0,ye.jsx)(Ts,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:f||o})]})}),(0,ye.jsx)(Sn,{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,ye.jsx)(lc,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})}function z_({value:e,onChange:t,formatString:r="PPP p",showTimePicker:o=!0,timeFormat:n="24",timeInterval:a=15,...i}){let[s,l]=Fr.useState(e),[u,c]=Fr.useState(e?Oo(e,n==="24"?"HH:mm":"hh:mm a"):"00:00"),d=m=>{if(!m){l(void 0),t?.(void 0);return}let[g,y]=u.split(":").map(Number);m.setHours(g,y),l(m),t?.(m)},f=m=>{let g=m.target.value;if(c(g),s){let[y,h]=g.split(":").map(Number),v=new Date(s);v.setHours(y,h),l(v),t?.(v)}},p=Fr.useMemo(()=>{let m=[];for(let g=0;g<24;g++)for(let y=0;y<60;y+=a){let h=g.toString().padStart(2,"0"),v=y.toString().padStart(2,"0"),x=`${h}:${v}`;if(n==="12"){let w=g===0?12:g>12?g-12:g,C=g<12?"AM":"PM",b=`${w}:${v} ${C}`;m.push({value:x,label:b})}else m.push({value:x,label:x})}return m},[n,a]);return(0,ye.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,ye.jsx)(bR,{...i,value:s,onChange:d,formatString:"PPP",showTodayButton:!1}),o&&s&&(0,ye.jsxs)(He.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,ye.jsx)(Ud,{className:"h-4 w-4 text-muted-foreground"}),(0,ye.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(m=>(0,ye.jsx)("option",{value:m.value,children:m.label},m.value))})]})]})}function G_({value:e,onChange:t,placeholder:r="Pick a month",formatString:o="MMMM yyyy",...n}){let[a,i]=Fr.useState(!1),[s,l]=Fr.useState(e||new Date),u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=p=>{let m=new Date(s);m.setMonth(p),t?.(m),i(!1)},d=p=>{let m=new Date(s);m.setFullYear(m.getFullYear()+p),l(m)},f=e?Oo(e,o):null;return(0,ye.jsxs)(ta,{open:a,onOpenChange:i,children:[(0,ye.jsx)(ra,{asChild:!0,children:(0,ye.jsxs)(Fe,{variant:n.variant==="default"?"outline":n.variant||"outline",className:L(SR({variant:n.variant,size:n.size,state:n.state}),!f&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[(0,ye.jsx)(Ts,{className:"mr-2 h-4 w-4"}),f||r]})}),(0,ye.jsx)(Sn,{className:"w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]",align:"start",children:(0,ye.jsxs)("div",{className:"p-3",children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsx)(Fe,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,ye.jsx)(an,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:s.getFullYear()}),(0,ye.jsx)(Fe,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,ye.jsx)(kr,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((p,m)=>(0,ye.jsx)(Fe,{variant:e&&e.getMonth()===m?"primary":"outline",size:"sm",onClick:()=>c(m),className:"h-8 text-xs",children:p.slice(0,3)},p))})]})})]})}var W_=R(E());var RR=R(D());function q_({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=W_.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 m=[...e],g=m[i];m.splice(i,1),m.splice(p,0,g),t(m),s(null)},d=()=>{s(null)};return(0,RR.jsx)("div",{className:L("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,RR.jsx)("div",{draggable:!a,onDragStart:m=>l(m,p),onDragOver:u,onDrop:m=>c(m,p),onDragEnd:d,className:L("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 qa=R(E());var Bt=R(E(),1);var le=R(E(),1);var we=R(D(),1),IR=["Enter"," "],K7=["ArrowDown","PageUp","Home"],$_=["ArrowUp","PageDown","End"],X7=[...K7,...$_],Y7={ltr:[...IR,"ArrowRight"],rtl:[...IR,"ArrowLeft"]},Q7={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qp="Menu",[Gp,Z7,J7]=Nn(qp),[bl,LR]=Oe(qp,[J7,zo,wc]),jp=zo(),K_=wc(),[X_,os]=bl(qp),[eK,$p]=bl(qp),Y_=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=jp(t),[l,u]=le.useState(null),c=le.useRef(!1),d=nt(a),f=Un(n);return le.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),(0,we.jsx)(Va,{...s,children:(0,we.jsx)(X_,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(eK,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};Y_.displayName=qp;var tK="MenuAnchor",PR=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=jp(r);return(0,we.jsx)(Ba,{...n,...o,ref:t})});PR.displayName=tK;var TR="MenuPortal",[rK,Q_]=bl(TR,{forceMount:void 0}),Z_=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=os(TR,t);return(0,we.jsx)(rK,{scope:t,forceMount:r,children:(0,we.jsx)(lt,{present:r||a.open,children:(0,we.jsx)(go,{asChild:!0,container:n,children:o})})})};Z_.displayName=TR;var Wo="MenuContent",[oK,kR]=bl(Wo),J_=le.forwardRef((e,t)=>{let r=Q_(Wo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=os(Wo,e.__scopeMenu),i=$p(Wo,e.__scopeMenu);return(0,we.jsx)(Gp.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(lt,{present:o||a.open,children:(0,we.jsx)(Gp.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(nK,{...n,ref:t}):(0,we.jsx)(aK,{...n,ref:t})})})})}),nK=le.forwardRef((e,t)=>{let r=os(Wo,e.__scopeMenu),o=le.useRef(null),n=de(t,o);return le.useEffect(()=>{let a=o.current;if(a)return Xi(a)},[]),(0,we.jsx)(MR,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),aK=le.forwardRef((e,t)=>{let r=os(Wo,e.__scopeMenu);return(0,we.jsx)(MR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),iK=to("MenuContent.ScrollLock"),MR=le.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:m,...g}=e,y=os(Wo,r),h=$p(Wo,r),v=jp(r),x=K_(r),w=Z7(r),[C,b]=le.useState(null),S=le.useRef(null),I=de(t,S,y.onContentChange),T=le.useRef(0),P=le.useRef(""),M=le.useRef(0),A=le.useRef(null),F=le.useRef("right"),N=le.useRef(0),H=m?Ha:le.Fragment,O=m?{as:iK,allowPinchZoom:!0}:void 0,U=k=>{let Z=P.current+k,ae=w().filter(z=>!z.disabled),_=document.activeElement,Y=ae.find(z=>z.ref.current===_)?.textValue,re=ae.map(z=>z.textValue),X=xK(re,Z,Y),ce=ae.find(z=>z.textValue===X)?.ref.current;(function z(ne){P.current=ne,window.clearTimeout(T.current),ne!==""&&(T.current=window.setTimeout(()=>z(""),1e3))})(Z),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(T.current),[]),Wi();let V=le.useCallback(k=>F.current===A.current?.side&&wK(k,A.current?.area),[]);return(0,we.jsx)(oK,{scope:r,searchRef:P,onItemEnter:le.useCallback(k=>{V(k)&&k.preventDefault()},[V]),onItemLeave:le.useCallback(k=>{V(k)||(S.current?.focus(),b(null))},[V]),onTriggerLeave:le.useCallback(k=>{V(k)&&k.preventDefault()},[V]),pointerGraceTimerRef:M,onPointerGraceIntentChange:le.useCallback(k=>{A.current=k},[]),children:(0,we.jsx)(H,{...O,children:(0,we.jsx)(Fa,{asChild:!0,trapped:n,onMountAutoFocus:W(a,k=>{k.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(Vo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(rx,{asChild:!0,...x,dir:h.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:W(l,k=>{h.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)($i,{role:"menu","aria-orientation":"vertical","data-state":hV(y.open),"data-radix-menu-content":"",dir:h.dir,...v,...g,ref:I,style:{outline:"none",...g.style},onKeyDown:W(g.onKeyDown,k=>{let ae=k.target.closest("[data-radix-menu-content]")===k.currentTarget,_=k.ctrlKey||k.altKey||k.metaKey,Y=k.key.length===1;ae&&(k.key==="Tab"&&k.preventDefault(),!_&&Y&&U(k.key));let re=S.current;if(k.target!==re||!X7.includes(k.key))return;k.preventDefault();let ce=w().filter(z=>!z.disabled).map(z=>z.ref.current);$_.includes(k.key)&&ce.reverse(),hK(ce)}),onBlur:W(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(T.current),P.current="")}),onPointerMove:W(e.onPointerMove,Wp(k=>{let Z=k.target,ae=N.current!==k.clientX;if(k.currentTarget.contains(Z)&&ae){let _=k.clientX>N.current?"right":"left";F.current=_,N.current=k.clientX}}))})})})})})})});J_.displayName=Wo;var sK="MenuGroup",ER=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{role:"group",...o,ref:t})});ER.displayName=sK;var lK="MenuLabel",eV=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{...o,ref:t})});eV.displayName=lK;var yx="MenuItem",j_="menu.itemSelect",Cx=le.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=le.useRef(null),i=$p(yx,e.__scopeMenu),s=kR(yx,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(j_,{bubbles:!0,cancelable:!0});d.addEventListener(j_,p=>o?.(p),{once:!0}),cu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(tV,{...n,ref:l,disabled:r,onClick:W(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{let f=s.searchRef.current!=="";r||f&&d.key===" "||IR.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Cx.displayName=yx;var tV=le.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=kR(yx,r),s=K_(r),l=le.useRef(null),u=de(t,l),[c,d]=le.useState(!1),[f,p]=le.useState("");return le.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[a.children]),(0,we.jsx)(Gp.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,we.jsx)(ox,{asChild:!0,...s,focusable:!o,children:(0,we.jsx)($.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,Wp(m=>{o?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Wp(m=>i.onItemLeave(m))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),uK="MenuCheckboxItem",rV=le.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,we.jsx)(sV,{scope:e.__scopeMenu,checked:r,children:(0,we.jsx)(Cx,{role:"menuitemcheckbox","aria-checked":wx(r)?"mixed":r,...n,ref:t,"data-state":NR(r),onSelect:W(n.onSelect,()=>o?.(wx(r)?!0:!r),{checkForDefaultPrevented:!1})})})});rV.displayName=uK;var oV="MenuRadioGroup",[cK,dK]=bl(oV,{value:void 0,onValueChange:()=>{}}),nV=le.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=nt(o);return(0,we.jsx)(cK,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,we.jsx)(ER,{...n,ref:t})})});nV.displayName=oV;var aV="MenuRadioItem",iV=le.forwardRef((e,t)=>{let{value:r,...o}=e,n=dK(aV,e.__scopeMenu),a=r===n.value;return(0,we.jsx)(sV,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(Cx,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":NR(a),onSelect:W(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});iV.displayName=aV;var AR="MenuItemIndicator",[sV,fK]=bl(AR,{checked:!1}),lV=le.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=fK(AR,r);return(0,we.jsx)(lt,{present:o||wx(a.checked)||a.checked===!0,children:(0,we.jsx)($.span,{...n,ref:t,"data-state":NR(a.checked)})})});lV.displayName=AR;var pK="MenuSeparator",uV=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});uV.displayName=pK;var mK="MenuArrow",cV=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=jp(r);return(0,we.jsx)(Ki,{...n,...o,ref:t})});cV.displayName=mK;var DR="MenuSub",[gK,dV]=bl(DR),fV=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=os(DR,t),i=jp(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=nt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(Va,{...i,children:(0,we.jsx)(X_,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(gK,{scope:t,contentId:De(),triggerId:De(),trigger:s,onTriggerChange:l,children:r})})})};fV.displayName=DR;var zp="MenuSubTrigger",pV=le.forwardRef((e,t)=>{let r=os(zp,e.__scopeMenu),o=$p(zp,e.__scopeMenu),n=dV(zp,e.__scopeMenu),a=kR(zp,e.__scopeMenu),i=le.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=le.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return le.useEffect(()=>c,[c]),le.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,we.jsx)(PR,{asChild:!0,...u,children:(0,we.jsx)(tV,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":hV(r.open),...e,ref:eo(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Wp(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:W(e.onPointerLeave,Wp(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,m=p==="right",g=m?-5:5,y=f[m?"left":"right"],h=f[m?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:y,y:f.top},{x:h,y:f.top},{x:h,y:f.bottom},{x:y,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:W(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||Y7[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});pV.displayName=zp;var mV="MenuSubContent",gV=le.forwardRef((e,t)=>{let r=Q_(Wo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=os(Wo,e.__scopeMenu),i=$p(Wo,e.__scopeMenu),s=dV(mV,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(Gp.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(lt,{present:o||a.open,children:(0,we.jsx)(Gp.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(MR,{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:W(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:W(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=Q7[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});gV.displayName=mV;function hV(e){return e?"open":"closed"}function wx(e){return e==="indeterminate"}function NR(e){return wx(e)?"indeterminate":e?"checked":"unchecked"}function hK(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function vK(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function xK(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=vK(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 yK(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 wK(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return yK(r,t)}function Wp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var vV=Y_,xV=PR,yV=Z_,wV=J_,CV=ER,SV=eV,bV=Cx,RV=rV,IV=nV,LV=iV,PV=lV,TV=uV,kV=cV,MV=fV,EV=pV,AV=gV;var Vt=R(D(),1),Sx="DropdownMenu",[SK,pLe]=Oe(Sx,[LR]),Cr=LR(),[bK,DV]=SK(Sx),NV=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Cr(t),u=Bt.useRef(null),[c,d]=$e({prop:n,defaultProp:a??!1,onChange:i,caller:Sx});return(0,Vt.jsx)(bK,{scope:t,triggerId:De(),triggerRef:u,contentId:De(),open:c,onOpenChange:d,onOpenToggle:Bt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Vt.jsx)(vV,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};NV.displayName=Sx;var OV="DropdownMenuTrigger",FV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=DV(OV,r),i=Cr(r);return(0,Vt.jsx)(xV,{asChild:!0,...i,children:(0,Vt.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:eo(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});FV.displayName=OV;var RK="DropdownMenuPortal",_V=e=>{let{__scopeDropdownMenu:t,...r}=e,o=Cr(t);return(0,Vt.jsx)(yV,{...o,...r})};_V.displayName=RK;var VV="DropdownMenuContent",BV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=DV(VV,r),a=Cr(r),i=Bt.useRef(!1);return(0,Vt.jsx)(wV,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...o,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:W(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)"}})});BV.displayName=VV;var IK="DropdownMenuGroup",HV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(CV,{...n,...o,ref:t})});HV.displayName=IK;var LK="DropdownMenuLabel",UV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(SV,{...n,...o,ref:t})});UV.displayName=LK;var PK="DropdownMenuItem",zV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(bV,{...n,...o,ref:t})});zV.displayName=PK;var TK="DropdownMenuCheckboxItem",GV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(RV,{...n,...o,ref:t})});GV.displayName=TK;var kK="DropdownMenuRadioGroup",WV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(IV,{...n,...o,ref:t})});WV.displayName=kK;var MK="DropdownMenuRadioItem",qV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(LV,{...n,...o,ref:t})});qV.displayName=MK;var EK="DropdownMenuItemIndicator",jV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(PV,{...n,...o,ref:t})});jV.displayName=EK;var AK="DropdownMenuSeparator",$V=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(TV,{...n,...o,ref:t})});$V.displayName=AK;var DK="DropdownMenuArrow",NK=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(kV,{...n,...o,ref:t})});NK.displayName=DK;var OK=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=Cr(t),[s,l]=$e({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Vt.jsx)(MV,{...i,open:s,onOpenChange:l,children:r})},FK="DropdownMenuSubTrigger",KV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(EV,{...n,...o,ref:t})});KV.displayName=FK;var _K="DropdownMenuSubContent",XV=Bt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Vt.jsx)(AV,{...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)"}})});XV.displayName=_K;var YV=NV,QV=FV,OR=_V,FR=BV,ZV=HV,_R=UV,VR=zV,BR=GV,JV=WV,HR=qV,UR=jV,zR=$V;var eB=OK,GR=KV,WR=XV;var Ht=R(D()),tB=YV,rB=QV,oB=ZV,nB=OR,aB=eB,iB=JV,qR=qa.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,Ht.jsxs)(GR,{ref:n,className:L("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,Ht.jsx)(kr,{className:"ml-auto h-4 w-4"})]}));qR.displayName=GR.displayName;var jR=qa.forwardRef(({className:e,...t},r)=>(0,Ht.jsx)(WR,{ref:r,className:L("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}));jR.displayName=WR.displayName;var $R=qa.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,Ht.jsx)(OR,{children:(0,Ht.jsx)(FR,{ref:o,sideOffset:t,className:L("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})}));$R.displayName=FR.displayName;var KR=qa.forwardRef(({className:e,inset:t,...r},o)=>(0,Ht.jsx)(VR,{ref:o,className:L("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}));KR.displayName=VR.displayName;var XR=qa.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,Ht.jsxs)(BR,{ref:n,className:L("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,Ht.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ht.jsx)(UR,{children:(0,Ht.jsx)(dr,{className:"h-4 w-4"})})}),t]}));XR.displayName=BR.displayName;var YR=qa.forwardRef(({className:e,children:t,...r},o)=>(0,Ht.jsxs)(HR,{ref:o,className:L("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,Ht.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ht.jsx)(UR,{children:(0,Ht.jsx)(ks,{className:"h-2 w-2 fill-current"})})}),t]}));YR.displayName=HR.displayName;var QR=qa.forwardRef(({className:e,inset:t,...r},o)=>(0,Ht.jsx)(_R,{ref:o,className:L("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));QR.displayName=_R.displayName;var ZR=qa.forwardRef(({className:e,...t},r)=>(0,Ht.jsx)(zR,{ref:r,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));ZR.displayName=zR.displayName;var JR=({className:e,...t})=>(0,Ht.jsx)("span",{className:L("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});JR.displayName="DropdownMenuShortcut";var vo=R(E());var sB=R(E());var ja=R(D()),lB=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"}}),BK=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"}}),Kp=sB.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 m=Math.max(0,Math.min(t,d)),g=d>0?m/d*100:0,y=l||`${Math.round(g)}%`;return(0,ja.jsxs)(ja.Fragment,{children:[s&&(0,ja.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,ja.jsx)("span",{className:L("text-sm font-medium text-muted-foreground",u),children:y})}),(0,ja.jsx)("div",{ref:p,className:L("moonui-theme",lB({variant:r,size:o,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:m,...f,children:(0,ja.jsx)("div",{className:L(BK({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});Kp.displayName="Progress";var ve=R(D()),HK=e=>e.startsWith("image/")?(0,ve.jsx)(Es,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(df,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(tf,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)($d,{className:"h-4 w-4"}):(0,ve.jsx)(Kd,{className:"h-4 w-4"}),eI=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]},UK=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(He.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,ve.jsx)("div",{className:"flex-shrink-0",children:i?(0,ve.jsx)("img",{src:i,alt:o.name,className:"h-10 w-10 object-cover rounded"}):(0,ve.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:HK(o.type)})}),(0,ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)("p",{className:"text-sm font-medium truncate",children:o.name}),(0,ve.jsx)(Fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,ve.jsx)(lo,{className:"h-3 w-3"})})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:eI(o.size)}),a==="uploading"&&(0,ve.jsxs)(jr,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Ot,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(jr,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Si,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(jr,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(sn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(Kp,{value:n,className:"h-1"})})]})]})},tI=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,m]=(0,vo.useState)(!1),[g,y]=(0,vo.useState)(null),h=I=>I.size>r?`File size exceeds ${eI(r)}`:e!=="*"&&!e.split(",").some(T=>{let P=T.trim();return P.includes("*")?I.type.startsWith(P.replace("*","")):I.type===P})?"File type not supported":null,v=(0,vo.useCallback)(async I=>{let T=Array.from(I);if(y(null),d.length+T.length>o){y(`Maximum ${o} files allowed`);return}let P=[],M=[];if(T.forEach(F=>{let N=h(F);N?M.push(`${F.name}: ${N}`):P.push(F)}),M.length>0){y(M.join(", "));return}let A=P.map((F,N)=>({id:`${Date.now()}-${N}-${F.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:F,progress:0,status:"uploading",preview:F.type.startsWith("image/")?URL.createObjectURL(F):void 0}));f(F=>[...F,...A]);for(let F of A){let N=0,H=setInterval(()=>{N+=15+F.file.size%10,N>=100?(N=100,clearInterval(H),f(O=>O.map(U=>U.id===F.id?{...U,progress:100,status:"success"}:U))):f(O=>O.map(U=>U.id===F.id?{...U,progress:N}:U))},200)}if(i)try{await i(P)}catch(F){console.error("Upload failed:",F),f(N=>N.map(H=>A.some(O=>O.id===H.id)?{...H,status:"error"}:H))}},[d.length,o,r,e,i]),x=(0,vo.useCallback)(I=>{if(I.preventDefault(),m(!1),n)return;let T=I.dataTransfer.files;T.length>0&&v(T)},[v,n]),w=(0,vo.useCallback)(I=>{I.preventDefault(),n||m(!0)},[n]),C=(0,vo.useCallback)(I=>{I.preventDefault(),m(!1)},[]),b=(0,vo.useCallback)(I=>{let T=I.target.files;T&&T.length>0&&v(T),I.target.value=""},[v]),S=(0,vo.useCallback)(I=>{f(T=>{let P=T.find(M=>M.id===I);return P?.preview&&URL.revokeObjectURL(P.preview),T.filter(M=>M.id!==I)}),s&&s(I)},[s]);return(0,ve.jsxs)("div",{ref:c,className:L("moonui-theme","space-y-4",a),...u,children:[(0,ve.jsxs)(He.div,{className:L("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:x,onDragOver:w,onDragLeave:C,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,ve.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:b,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ve.jsx)(cf,{className:"h-full w-full"})}),(0,ve.jsxs)("div",{children:[(0,ve.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ve.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",o," files, ",eI(r)," each"]})]}),(0,ve.jsx)(Fe,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ta,{children:g&&(0,ve.jsxs)(He.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,ve.jsx)(sn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:g})]})}),(0,ve.jsx)(Ta,{children:d.length>0&&(0,ve.jsxs)(He.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ve.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)(Ta,{children:d.map(I=>(0,ve.jsx)(UK,{uploadedFile:I,onRemove:S},I.id))})})]})})]})});tI.displayName="FileUpload";var uB=R(E());var Rl=R(D()),rI=uB.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=oc(0),d=oc(0),f=o==="up"||o==="down",p=f?c:d,m=mS(p,[0,n],[1,.5]),g=(v,x)=>{if(!s)return;let w=f?x.offset.y:x.offset.x,C=f?x.velocity.y:x.velocity.x,b=!1;switch(o){case"up":b=w>n||C>500;break;case"down":b=w<-n||C<-500;break;case"left":b=w>n||C>500;break;case"right":b=w<-n||C<-500;break}b?r(!1):hS(p,0,{type:"spring",stiffness:300,damping:20})},y=()=>{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%"}}},h=()=>f?{y:0}:{x:0};return t?(0,Rl.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,Rl.jsx)(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:L("absolute inset-0 bg-black/50",i)}),(0,Rl.jsxs)(He.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:g,style:{[f?"y":"x"]:p,opacity:m},initial:y(),animate:h(),exit:y(),transition:{type:"spring",damping:30,stiffness:300},className:L("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,Rl.jsx)("div",{className:"flex justify-center p-2",children:(0,Rl.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});rI.displayName="GestureDrawer";var ns=R(E());var Je=R(D());function cB({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,ns.useState)(null),[s,l]=(0,ns.useState)(!0);(0,ns.useEffect)(()=>{(async()=>{try{let m=await(await fetch("/api/github-stars")).json();i(m)}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,Je.jsxs)("div",{className:L("flex items-center animate-pulse",c[t],e),children:[(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),r&&(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Je.jsxs)("div",{className:L("flex items-center",c[t],e),children:[(0,Je.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,Je.jsx)(xu,{className:"fill-current text-yellow-500",size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(0,Je.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,Je.jsx)(Xd,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(0,Je.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,Je.jsx)(Ms,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Je.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function zK({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,ns.useState)(null),[a,i]=(0,ns.useState)(!0);(0,ns.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,Je.jsx)(Fe,{variant:"outline",size:t,className:L("moonui-theme","group",e),asChild:!0,children:(0,Je.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Je.jsx)(xu,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Je.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(0,Je.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,Je.jsx)(jd,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var Il=R(E());var Se=R(E(),1),Rx=R(E(),1),In=R(E(),1),GK=Object.defineProperty,WK=Object.defineProperties,qK=Object.getOwnPropertyDescriptors,bx=Object.getOwnPropertySymbols,fB=Object.prototype.hasOwnProperty,pB=Object.prototype.propertyIsEnumerable,dB=(e,t,r)=>t in e?GK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jK=(e,t)=>{for(var r in t||(t={}))fB.call(t,r)&&dB(e,r,t[r]);if(bx)for(var r of bx(t))pB.call(t,r)&&dB(e,r,t[r]);return e},$K=(e,t)=>WK(e,qK(t)),KK=(e,t)=>{var r={};for(var o in e)fB.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&bx)for(var o of bx(e))t.indexOf(o)<0&&pB.call(e,o)&&(r[o]=e[o]);return r};function XK(e){let t=setTimeout(e,0),r=setTimeout(e,10),o=setTimeout(e,50);return[t,r,o]}function YK(e){let t=Rx.useRef();return Rx.useEffect(()=>{t.current=e}),t.current}var QK=18,mB=40,ZK=`${mB}px`,JK=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function eX({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:o}){let[n,a]=In.useState(!1),[i,s]=In.useState(!1),[l,u]=In.useState(!1),c=In.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),d=In.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||r==="none")return;let m=f,g=m.getBoundingClientRect().left+m.offsetWidth,y=m.getBoundingClientRect().top+m.offsetHeight/2,h=g-QK,v=y;document.querySelectorAll(JK).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,r]);return In.useEffect(()=>{let f=e.current;if(!f||r==="none")return;function p(){let g=window.innerWidth-f.getBoundingClientRect().right;s(g>=mB)}p();let m=setInterval(p,1e3);return()=>{clearInterval(m)}},[e,r]),In.useEffect(()=>{let f=o||document.activeElement===t.current;if(r==="none"||!f)return;let p=setTimeout(d,0),m=setTimeout(d,2e3),g=setTimeout(d,5e3),y=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(m),clearTimeout(g),clearTimeout(y)}},[t,o,r,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:ZK}}var oI=Se.createContext({}),nI=Se.forwardRef((e,t)=>{var r=e,{value:o,onChange:n,maxLength:a,textAlign:i="left",pattern:s,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=tX,render:g,children:y}=r,h=KK(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),v,x,w,C,b;let[S,I]=Se.useState(typeof h.defaultValue=="string"?h.defaultValue:""),T=o??S,P=YK(T),M=Se.useCallback(J=>{n?.(J),I(J)},[n]),A=Se.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),F=Se.useRef(null),N=Se.useRef(null),H=Se.useRef({value:T,onChange:M,isIOS:typeof window<"u"&&((x=(v=window?.CSS)==null?void 0:v.supports)==null?void 0:x.call(v,"-webkit-touch-callout","none"))}),O=Se.useRef({prev:[(w=F.current)==null?void 0:w.selectionStart,(C=F.current)==null?void 0:C.selectionEnd,(b=F.current)==null?void 0:b.selectionDirection]});Se.useImperativeHandle(t,()=>F.current,[]),Se.useEffect(()=>{let J=F.current,ie=N.current;if(!J||!ie)return;H.current.value!==J.value&&H.current.onChange(J.value),O.current.prev=[J.selectionStart,J.selectionEnd,J.selectionDirection];function Ge(){if(document.activeElement!==J){_(null),re(null);return}let Ne=J.selectionStart,St=J.selectionEnd,Mn=J.selectionDirection,Rr=J.maxLength,Ko=J.value,Co=O.current.prev,Xo=-1,En=-1,An;if(Ko.length!==0&&Ne!==null&&St!==null){let Fc=Ne===St,_c=Ne===Ko.length&&Ko.length<Rr;if(Fc&&!_c){let So=Ne;if(So===0)Xo=0,En=1,An="forward";else if(So===Rr)Xo=So-1,En=So,An="backward";else if(Rr>1&&Ko.length>1){let Vc=0;if(Co[0]!==null&&Co[1]!==null){An=So<Co[1]?"backward":"forward";let iy=Co[0]===Co[1]&&Co[0]<Rr;An==="backward"&&!iy&&(Vc=-1)}Xo=Vc+So,En=Vc+So+1}}Xo!==-1&&En!==-1&&Xo!==En&&F.current.setSelectionRange(Xo,En,An)}let fm=Xo!==-1?Xo:Ne,Al=En!==-1?En:St,Za=An??Mn;_(fm),re(Al),O.current.prev=[fm,Al,Za]}if(document.addEventListener("selectionchange",Ge,{capture:!0}),Ge(),document.activeElement===J&&Z(!0),!document.getElementById("input-otp-style")){let Ne=document.createElement("style");if(Ne.id="input-otp-style",document.head.appendChild(Ne),Ne.sheet){let St="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Xp(Ne.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Xp(Ne.sheet,`[data-input-otp]:autofill { ${St} }`),Xp(Ne.sheet,`[data-input-otp]:-webkit-autofill { ${St} }`),Xp(Ne.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Xp(Ne.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Xe=()=>{ie&&ie.style.setProperty("--root-height",`${J.clientHeight}px`)};Xe();let Lt=new ResizeObserver(Xe);return Lt.observe(J),()=>{document.removeEventListener("selectionchange",Ge,{capture:!0}),Lt.disconnect()}},[]);let[U,V]=Se.useState(!1),[k,Z]=Se.useState(!1),[ae,_]=Se.useState(null),[Y,re]=Se.useState(null);Se.useEffect(()=>{XK(()=>{var J,ie,Ge,Xe;(J=F.current)==null||J.dispatchEvent(new Event("input"));let Lt=(ie=F.current)==null?void 0:ie.selectionStart,Ne=(Ge=F.current)==null?void 0:Ge.selectionEnd,St=(Xe=F.current)==null?void 0:Xe.selectionDirection;Lt!==null&&Ne!==null&&(_(Lt),re(Ne),O.current.prev=[Lt,Ne,St])})},[T,k]),Se.useEffect(()=>{P!==void 0&&T!==P&&P.length<a&&T.length===a&&c?.(T)},[a,c,P,T]);let X=eX({containerRef:N,inputRef:F,pushPasswordManagerStrategy:d,isFocused:k}),ce=Se.useCallback(J=>{let ie=J.currentTarget.value.slice(0,a);if(ie.length>0&&A&&!A.test(ie)){J.preventDefault();return}typeof P=="string"&&ie.length<P.length&&document.dispatchEvent(new Event("selectionchange")),M(ie)},[a,M,P,A]),z=Se.useCallback(()=>{var J;if(F.current){let ie=Math.min(F.current.value.length,a-1),Ge=F.current.value.length;(J=F.current)==null||J.setSelectionRange(ie,Ge),_(ie),re(Ge)}Z(!0)},[a]),ne=Se.useCallback(J=>{var ie,Ge;let Xe=F.current;if(!f&&(!H.current.isIOS||!J.clipboardData||!Xe))return;let Lt=J.clipboardData.getData("text/plain"),Ne=f?f(Lt):Lt;J.preventDefault();let St=(ie=F.current)==null?void 0:ie.selectionStart,Mn=(Ge=F.current)==null?void 0:Ge.selectionEnd,Rr=(St!==Mn?T.slice(0,St)+Ne+T.slice(Mn):T.slice(0,St)+Ne+T.slice(St)).slice(0,a);if(Rr.length>0&&A&&!A.test(Rr))return;Xe.value=Rr,M(Rr);let Ko=Math.min(Rr.length,a-1),Co=Rr.length;Xe.setSelectionRange(Ko,Co),_(Ko),re(Co)},[a,M,A,T]),he=Se.useMemo(()=>({position:"relative",cursor:h.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[h.disabled]),xe=Se.useMemo(()=>({position:"absolute",inset:0,width:X.willPushPWMBadge?`calc(100% + ${X.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:X.willPushPWMBadge?`inset(0 ${X.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[X.PWM_BADGE_SPACE_WIDTH,X.willPushPWMBadge,i]),pe=Se.useMemo(()=>Se.createElement("input",$K(jK({autoComplete:h.autoComplete||"one-time-code"},h),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":Y,inputMode:u,pattern:A?.source,"aria-placeholder":l,style:xe,maxLength:a,value:T,ref:F,onPaste:J=>{var ie;ne(J),(ie=h.onPaste)==null||ie.call(h,J)},onChange:ce,onMouseOver:J=>{var ie;V(!0),(ie=h.onMouseOver)==null||ie.call(h,J)},onMouseLeave:J=>{var ie;V(!1),(ie=h.onMouseLeave)==null||ie.call(h,J)},onFocus:J=>{var ie;z(),(ie=h.onFocus)==null||ie.call(h,J)},onBlur:J=>{var ie;Z(!1),(ie=h.onBlur)==null||ie.call(h,J)}})),[ce,z,ne,u,xe,a,Y,ae,h,A?.source,T]),K=Se.useMemo(()=>({slots:Array.from({length:a}).map((J,ie)=>{var Ge;let Xe=k&&ae!==null&&Y!==null&&(ae===Y&&ie===ae||ie>=ae&&ie<Y),Lt=T[ie]!==void 0?T[ie]:null,Ne=T[0]!==void 0?null:(Ge=l?.[ie])!=null?Ge:null;return{char:Lt,placeholderChar:Ne,isActive:Xe,hasFakeCaret:Xe&&Lt===null}}),isFocused:k,isHovering:!h.disabled&&U}),[k,U,a,Y,ae,h.disabled,T]),Ie=Se.useMemo(()=>g?g(K):Se.createElement(oI.Provider,{value:K},y),[y,K,g]);return Se.createElement(Se.Fragment,null,m!==null&&Se.createElement("noscript",null,Se.createElement("style",null,m)),Se.createElement("div",{ref:N,"data-input-otp-container":!0,style:he,className:p},Ie,Se.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},pe)))});nI.displayName="Input";function Xp(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var tX=`
66
+ color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,o?.key)}return n}}function ge(e,t,o,r){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:r}}function fK(e,t,o,r){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(r),renderValue:n,getContext:me(()=>[e,o,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,o,t,e)},{}),a}function pK(e,t,o,r){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 g of l.split(".")){var m;p=(m=p)==null?void 0:m[g]}return p}:c=f=>f[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:s,columns:[],getFlatColumns:me(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:me(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let m=d.columns.flatMap(g=>g.getLeafColumns());return f(m)}return[d]},ge(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var Ro="debugHeaders";function f_(e,t,o){var r;let a={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 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 mK={createTable:e=>{e.getHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,n)=>{var a,i;let s=(a=r?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=o.filter(d=>!(r!=null&&r.includes(d.id))&&!(n!=null&&n.includes(d.id)));return Nx(t,[...s,...u,...l],e)},ge(e.options,Ro,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,n)=>(o=o.filter(a=>!(r!=null&&r.includes(a.id))&&!(n!=null&&n.includes(a.id))),Nx(t,o,e,"center")),ge(e.options,Ro,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,o,r)=>{var n;let a=(n=r?.map(i=>o.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Nx(t,a,e,"left")},ge(e.options,Ro,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,o,r)=>{var n;let a=(n=r?.map(i=>o.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Nx(t,a,e,"right")},ge(e.options,Ro,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Ro,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Ro,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Ro,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Ro,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Ro,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Ro,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Ro,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Ro,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Ro,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Ro,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Ro,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,o,r)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=o[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},ge(e.options,Ro,"getLeafHeaders"))}};function Nx(e,t,o,r){var n,a;let i=0,s=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&s(m.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(x=>{let v=[...g].reverse()[0],h=x.column.depth===m.depth,y,w=!1;if(h&&x.column.parent?y=x.column.parent:(y=x.column,w=!0),v&&v?.column===y)v.subHeaders.push(x);else{let C=f_(o,y,{id:[r,p,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(S=>S.column===y).length}`:void 0,depth:p,index:g.length});C.subHeaders.push(x),g.push(C)}m.headers.push(x),x.headerGroup=m}),l.push(m),p>0&&u(g,p-1)},c=t.map((f,p)=>f_(o,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,x=0,v=[0];m.subHeaders&&m.subHeaders.length?(v=[],d(m.subHeaders).forEach(y=>{let{colSpan:w,rowSpan:C}=y;g+=w,v.push(C)})):g=1;let h=Math.min(...v);return x=x+h,m.colSpan=g,m.rowSpan=x,{colSpan:g,rowSpan:x}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var Xb=(e,t,o,r,n,a,i)=>{let s={id:t,index:r,original:o,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,r),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,r),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:()=>dK(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:me(()=>[e.getAllLeafColumns()],l=>l.map(u=>fK(e,s,u,u.id)),ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:me(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ge(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},gK={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()}}},m_=(e,t,o)=>{var r,n;let a=o==null||(r=o.toString())==null?void 0:r.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};m_.autoRemove=e=>Vn(e);var g_=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};g_.autoRemove=e=>Vn(e);var h_=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};h_.autoRemove=e=>Vn(e);var v_=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};v_.autoRemove=e=>Vn(e);var x_=(e,t,o)=>!o.some(r=>{var n;return!((n=e.getValue(t))!=null&&n.includes(r))});x_.autoRemove=e=>Vn(e)||!(e!=null&&e.length);var y_=(e,t,o)=>o.some(r=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)});y_.autoRemove=e=>Vn(e)||!(e!=null&&e.length);var w_=(e,t,o)=>e.getValue(t)===o;w_.autoRemove=e=>Vn(e);var C_=(e,t,o)=>e.getValue(t)==o;C_.autoRemove=e=>Vn(e);var Yb=(e,t,o)=>{let[r,n]=o,a=e.getValue(t);return a>=r&&a<=n};Yb.resolveFilterValue=e=>{let[t,o]=e,r=typeof t!="number"?parseFloat(t):t,n=typeof o!="number"?parseFloat(o):o,a=t===null||Number.isNaN(r)?-1/0:r,i=o===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};Yb.autoRemove=e=>Vn(e)||Vn(e[0])&&Vn(e[1]);var li={includesString:m_,includesStringSensitive:g_,equalsString:h_,arrIncludes:v_,arrIncludesAll:x_,arrIncludesSome:y_,equals:w_,weakEquals:C_,inNumberRange:Yb};function Vn(e){return e==null||e===""}var hK={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Sr("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"?li.includesString:typeof r=="number"?li.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?li.equals:Array.isArray(r)?li.arrIncludes:li.weakEquals},e.getFilterFn=()=>{var o,r;return _x(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:li[e.columnDef.filterFn]},e.getCanFilter=()=>{var o,r,n;return((o=e.columnDef.enableColumnFilter)!=null?o:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((n=t.options.enableFilters)!=null?n:!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(n=>n.id===e.id))!=null?o:-1},e.setFilterValue=o=>{t.setColumnFilters(r=>{let n=e.getFilterFn(),a=r?.find(c=>c.id===e.id),i=ws(o,a?a.value:void 0);if(p_(n,i,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){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=n=>{var a;return(a=ws(t,n))==null?void 0:a.filter(i=>{let s=o.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(p_(l,i.value,s))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 p_(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var vK=(e,t,o)=>o.reduce((r,n)=>{let a=n.getValue(e);return r+(typeof a=="number"?a:0)},0),xK=(e,t,o)=>{let r;return o.forEach(n=>{let a=n.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},yK=(e,t,o)=>{let r;return o.forEach(n=>{let a=n.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},wK=(e,t,o)=>{let r,n;return o.forEach(a=>{let i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)))}),[r,n]},CK=(e,t)=>{let o=0,r=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++o,r+=a)}),o)return r/o},SK=(e,t)=>{if(!t.length)return;let o=t.map(a=>a.getValue(e));if(!cK(o))return;if(o.length===1)return o[0];let r=Math.floor(o.length/2),n=o.sort((a,i)=>a-i);return o.length%2!==0?n[r]:(n[r-1]+n[r])/2},bK=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),RK=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,IK=(e,t)=>t.length,_b={sum:vK,min:xK,max:yK,extent:wK,mean:CK,median:SK,unique:bK,uniqueCount:RK,count:IK},PK={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:Sr("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 _b.sum;if(Object.prototype.toString.call(r)==="[object Date]")return _b.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return _x(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:_b[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 n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=o.subRows)!=null&&n.length)}}};function LK(e,t,o){if(!(t!=null&&t.length)||!o)return e;let r=e.filter(a=>!t.includes(a.id));return o==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}var TK={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Sr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(o=>[cm(t,o)],o=>o.findIndex(r=>r.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=cm(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let n=cm(t,o);return((r=n[n.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=me(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,o,r)=>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 LK(a,o,r)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},Vb=()=>({left:[],right:[]}),kK={getInitialState:e=>({columnPinning:Vb(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Sr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=o=>{let r=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(o==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(o==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=n?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var n,a,i;return((n=r.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let o=e.getLeafColumns().map(s=>s.id),{left:r,right:n}=t.getState().columnPinning,a=o.some(s=>r?.includes(s)),i=o.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var o,r;let n=e.getIsPinned();return n?(o=(r=t.getState().columnPinning)==null||(r=r[n])==null?void 0:r.indexOf(e.id))!=null?o:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(o,r,n)=>{let a=[...r??[],...n??[]];return o.filter(i=>!a.includes(i.column.id))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(o,r)=>(r??[]).map(a=>o.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(o,r)=>(r??[]).map(a=>o.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),ge(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?Vb():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:Vb())},e.getIsSomeColumnsPinned=t=>{var o;let r=e.getState().columnPinning;if(!t){var n,a;return!!((n=r.left)!=null&&n.length||(a=r.right)!=null&&a.length)}return!!((o=r[t])!=null&&o.length)},e.getLeftLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(n=>n.id===r)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(n=>n.id===r)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r)=>{let n=[...o??[],...r??[]];return t.filter(a=>!n.includes(a.id))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function MK(e){return e||(typeof document<"u"?document:null)}var Ox={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Bb=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),EK={getDefaultColumnDef:()=>Ox,getInitialState:e=>({columnSizing:{},columnSizingInfo:Bb(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Sr("columnSizing",e),onColumnSizingInfoChange:Sr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var o,r,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((o=e.columnDef.minSize)!=null?o:Ox.minSize,(r=a??e.columnDef.size)!=null?r:Ox.size),(n=e.columnDef.maxSize)!=null?n:Ox.maxSize)},e.getStart=me(o=>[o,cm(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(o=>[o,cm(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(o=>{let{[e.id]:r,...n}=o;return n})},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=n=>{if(n.subHeaders.length)n.subHeaders.forEach(r);else{var a;o+=(a=n.column.getSize())!=null?a: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),n=r?.getCanResize();return a=>{if(!r||!n||(a.persist==null||a.persist(),Hb(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=Hb(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(v,h)=>{typeof h=="number"&&(t.setColumnSizingInfo(y=>{var w,C;let S=t.options.columnResizeDirection==="rtl"?-1:1,R=(h-((w=y?.startOffset)!=null?w:0))*S,I=Math.max(R/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(T=>{let[L,k]=T;u[L]=Math.round(Math.max(k+k*I,0)*100)/100}),{...y,deltaOffset:R,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(h=>({...h,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=MK(o),m={moveHandler:v=>d(v.clientX),upHandler:v=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),f(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var h;p?.removeEventListener("touchmove",g.moveHandler),p?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((h=v.touches[0])==null?void 0:h.clientX)}},x=AK()?{passive:!1}:!1;Hb(a)?(p?.addEventListener("touchmove",g.moveHandler,x),p?.addEventListener("touchend",g.upHandler,x)):(p?.addEventListener("mousemove",m.moveHandler,x),p?.addEventListener("mouseup",m.upHandler,x)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,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?Bb():(o=e.initialState.columnSizingInfo)!=null?o:Bb())},e.getTotalSize=()=>{var t,o;return(t=(o=e.getHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,o;return(t=(o=e.getLeftHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,o;return(t=(o=e.getCenterHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,o;return(t=(o=e.getRightHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0}}},Fx=null;function AK(){if(typeof Fx=="boolean")return Fx;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 Fx=e,Fx}function Hb(e){return e.type==="touchstart"}var DK={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Sr("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 n=e.columns;return(o=n.length?n.some(a=>a.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=me(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,n)=>[...o,...r,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>me(()=>[r(),r().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(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((n,a)=>({...n,[a.id]:o||!(a.getCanHide!=null&&a.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 cm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var NK={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()}}},OK={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Sr("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,n,a;return((o=e.columnDef.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!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=()=>li.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return _x(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:li[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},FK={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Sr("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1;e._autoResetExpanded=()=>{var r,n;if(!t){e._queue(()=>{t=!0});return}if((r=(n=e.options.autoResetAll)!=null?n: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 n,a;e.setExpanded(r?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},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(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");r=Math.max(r,i.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 n;let a=r===!0?!0:!!(r!=null&&r[e.id]),i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=r,o=(n=o)!=null?n:!a,!a&&o)return{...i,[e.id]:!0};if(a&&!o){let{[e.id]:s,...l}=i;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,n;return(o=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?o:((r=t.options.enableExpanding)!=null?r:!0)&&!!((n=e.subRows)!=null&&n.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()}}}},Wb=0,jb=10,Ub=()=>({pageIndex:Wb,pageSize:jb}),_K={getInitialState:e=>({...e,pagination:{...Ub(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Sr("pagination",e)}),createTable:e=>{let t=!1,o=!1;e._autoResetPageIndex=()=>{var r,n;if(!t){e._queue(()=>{t=!0});return}if((r=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(o)return;o=!0,e._queue(()=>{e.resetPageIndex(),o=!1})}},e.setPagination=r=>{let n=a=>ws(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=r=>{var n;e.setPagination(r?Ub():(n=e.initialState.pagination)!=null?n:Ub())},e.setPageIndex=r=>{e.setPagination(n=>{let a=ws(r,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=r=>{var n,a;e.setPageIndex(r?Wb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:Wb)},e.resetPageSize=r=>{var n,a;e.setPageSize(r?jb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:jb)},e.setPageSize=r=>{e.setPagination(n=>{let a=Math.max(1,ws(r,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=r=>e.setPagination(n=>{var a;let i=ws(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],r=>{let n=[];return r&&r>0&&(n=[...new Array(r)].fill(null).map((a,i)=>i)),n},ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:r}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:r<n-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}}},zb=()=>({top:[],bottom:[]}),VK={getInitialState:e=>({rowPinning:zb(),...e}),getDefaultOptions:e=>({onRowPinningChange:Sr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(o,r,n)=>{let a=r?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(o==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(s!=null&&s.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(s!=null&&s.has(g))),...Array.from(s)]}}if(o==="top"){var p,m;return{top:[...((p=l?.top)!=null?p:[]).filter(g=>!(s!=null&&s.has(g))),...Array.from(s)],bottom:((m=l?.bottom)!=null?m:[]).filter(g=>!(s!=null&&s.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(s!=null&&s.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(s!=null&&s.has(g)))}})},e.getCanPin=()=>{var o;let{enableRowPinning:r,enablePinning:n}=t.options;return typeof r=="function"?r(e):(o=r??n)!=null?o:!0},e.getIsPinned=()=>{let o=[e.id],{top:r,bottom:n}=t.getState().rowPinning,a=o.some(s=>r?.includes(s)),i=o.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var o,r;let n=e.getIsPinned();if(!n)return-1;let a=(o=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:o.map(i=>{let{id:s}=i;return s});return(r=a?.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?zb():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:zb())},e.getIsSomeRowsPinned=t=>{var o;let r=e.getState().rowPinning;if(!t){var n,a;return!!((n=r.top)!=null&&n.length||(a=r.bottom)!=null&&a.length)}return!!((o=r[t])!=null&&o.length)},e._getPinnedRows=(t,o,r)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(o??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(o??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,o,r)=>{let n=new Set([...o??[],...r??[]]);return t.filter(a=>!n.has(a.id))},ge(e.options,"debugRows","getCenterRows"))}},BK={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Sr("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},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):n.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(o=>{let r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...o};return e.getRowModel().rows.forEach(a=>{qb(n,a.id,r,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?Gb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?Gb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?Gb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(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(n=>n.getCanSelect()&&!o[n.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:o}=e.getState(),r=!!t.length;return r&&t.some(n=>!o[n.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 n=e.getIsSelected();t.setRowSelection(a=>{var i;if(o=typeof o<"u"?o:!n,e.getCanSelect()&&n===o)return a;let s={...a};return qb(s,e.id,o,(i=r?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return Qb(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return $b(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return $b(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 n;o&&e.toggleSelected((n=r.target)==null?void 0:n.checked)}}}},qb=(e,t,o,r,n)=>{var a;let i=n.getRow(t,!0);o?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>qb(e,s.id,o,r,n))};function Gb(e,t){let o=e.getState().rowSelection,r=[],n={},a=function(i,s){return i.map(l=>{var u;let c=Qb(l,o);if(c&&(r.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:r,rowsById:n}}function Qb(e,t){var o;return(o=t[e.id])!=null?o:!1}function $b(e,t,o){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(Qb(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=$b(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var Kb=/([0-9]+)/gm,HK=(e,t,o)=>S_(Cs(e.getValue(o)).toLowerCase(),Cs(t.getValue(o)).toLowerCase()),UK=(e,t,o)=>S_(Cs(e.getValue(o)),Cs(t.getValue(o))),zK=(e,t,o)=>Zb(Cs(e.getValue(o)).toLowerCase(),Cs(t.getValue(o)).toLowerCase()),GK=(e,t,o)=>Zb(Cs(e.getValue(o)),Cs(t.getValue(o))),WK=(e,t,o)=>{let r=e.getValue(o),n=t.getValue(o);return r>n?1:r<n?-1:0},jK=(e,t,o)=>Zb(e.getValue(o),t.getValue(o));function Zb(e,t){return e===t?0:e>t?1:-1}function Cs(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function S_(e,t){let o=e.split(Kb).filter(Boolean),r=t.split(Kb).filter(Boolean);for(;o.length&&r.length;){let n=o.shift(),a=r.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 o.length-r.length}var um={alphanumeric:HK,alphanumericCaseSensitive:UK,text:zK,textCaseSensitive:GK,datetime:WK,basic:jK},qK={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Sr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let o=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let n of o){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return um.datetime;if(typeof a=="string"&&(r=!0,a.split(Kb).length>1))return um.alphanumeric}return r?um.text:um.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 _x(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:um[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let n=e.getNextSortingOrder(),a=typeof o<"u"&&o!==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?o:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?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 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,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(o&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},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(n=>n.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(n=>n.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())}},$K=[mK,DK,TK,kK,gK,hK,NK,OK,qK,PK,FK,_K,VK,BK,EK];function b_(e){var t,o;let r=[...$K,...(t=e._features)!=null?t:[]],n={_features:r},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={...{},...(o=e.initialState)!=null?o:{}};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:r,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=ws(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,m)=>{var g;return(g=n.options.getRowId==null?void 0:n.options.getRowId(f,p,m))!=null?g:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let m=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!m&&(m=n.getCoreRowModel().rowsById[f],!m))throw new Error;return m},_getDefaultColumnDef:me(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:m=>{let g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,x;return(g=(x=m.renderValue())==null||x.toString==null?void 0:x.toString())!=null?g:null},...n._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:me(()=>[n._getColumnDefs()],f=>{let p=function(m,g,x){return x===void 0&&(x=0),m.map(v=>{let h=pK(n,v,x,g),y=v;return h.columns=y.columns?p(y.columns,h,x+1):[],h})};return p(f)},ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:me(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:me(()=>[n.getAllFlatColumns()],f=>f.reduce((p,m)=>(p[m.id]=m,p),{}),ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:me(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let m=f.flatMap(g=>g.getLeafColumns());return p(m)},ge(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 R_(){return e=>me(()=>[e.options.data],t=>{let o={rows:[],flatRows:[],rowsById:{}},r=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=Xb(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(o.flatRows.push(c),o.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=r(c.originalSubRows,a+1,c))}}return s};return o.rows=r(t),o},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function KK(e){let t=[],o=r=>{var n;t.push(r),(n=r.subRows)!=null&&n.length&&r.getIsExpanded()&&r.subRows.forEach(o)};return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function XK(e,t,o){return o.options.filterFromLeafRows?YK(e,t,o):QK(e,t,o)}function YK(e,t,o){var r;let n=[],a={},i=(r=o.options.maxLeafRowFilterDepth)!=null?r: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],m=Xb(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(m.subRows=s(p.subRows,u+1),p=m,t(p)&&!m.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||m.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=m,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function QK(e,t,o){var r;let n=[],a={},i=(r=o.options.maxLeafRowFilterDepth)!=null?r: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 g=Xb(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=s(p.subRows,u+1),p=g}c.push(p),n.push(p),a[p.id]=p}}return c};return{rows:s(e),flatRows:n,rowsById:a}}function I_(){return e=>me(()=>[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 n=[],a=[];(o??[]).forEach(f=>{var p;let m=e.getColumn(f.id);if(!m)return;let g=m.getFilterFn();g&&n.push({id:f.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.resolveFilterValue(f.value))!=null?p:f.value})});let i=(o??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&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(r))!=null?p:r})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let p=t.flatRows[f];if(p.columnFilters={},n.length)for(let m=0;m<n.length;m++){u=n[m];let g=u.id;p.columnFilters[g]=u.filterFn(p,g,u.resolvedValue,x=>{p.columnFiltersMeta[g]=x})}if(a.length){for(let m=0;m<a.length;m++){c=a[m];let g=c.id;if(c.filterFn(p,g,c.resolvedValue,x=>{p.columnFiltersMeta[g]=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 XK(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function P_(e){return t=>me(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(o,r)=>{if(!r.rows.length)return r;let{pageSize:n,pageIndex:a}=o,{rows:i,flatRows:s,rowsById:l}=r,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=KK({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},ge(t.options,"debugTable","getPaginationRowModel"))}function L_(){return e=>me(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,o)=>{if(!o.rows.length||!(t!=null&&t.length))return o;let r=e.getState().sorting,n=[],a=r.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 m=a[p],g=i[m.id],x=g.sortUndefined,v=(f=m?.desc)!=null?f:!1,h=0;if(x){let y=c.getValue(m.id),w=d.getValue(m.id),C=y===void 0,S=w===void 0;if(C||S){if(x==="first")return C?-1:1;if(x==="last")return C?1:-1;h=C&&S?0:C?x:-x}}if(h===0&&(h=g.sortingFn(c,d,m.id)),h!==0)return v&&(h*=-1),g.invertSorting&&(h*=-1),h}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(o.rows),flatRows:n,rowsById:o.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Jb(e,t){return e?ZK(e)?dm.createElement(e,t):e:null}function ZK(e){return JK(e)||typeof e=="function"||eX(e)}function JK(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function eX(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function T_(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=dm.useState(()=>({current:b_(t)})),[r,n]=dm.useState(()=>o.current.initialState);return o.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),o.current}var Io=b(M());var ct=b(D()),tX=Q("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"}}),Vx=Io.forwardRef(({className:e,variant:t,size:o,loading:r,emptyContent:n,...a},i)=>{let s=t==="striped",l=Io.Children.map(a.children,u=>{if(Io.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Io.cloneElement(u,{className:P(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,ct.jsxs)("div",{className:"relative w-full overflow-auto",children:[r&&(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:P(tX({variant:t,size:o}),r&&"opacity-70",e),...a,children:l})]})});Vx.displayName="Table";var Bx=Io.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("thead",{ref:o,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Bx.displayName="TableHeader";var Hx=Io.forwardRef(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...n},a)=>{let i=Io.Children.count(r)>0;return(0,ct.jsx)("tbody",{ref:a,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?r:(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:o})})})})})});Hx.displayName="TableBody";var k_=Io.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("tfoot",{ref:o,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));k_.displayName="TableFooter";var qc=Io.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("tr",{ref:o,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));qc.displayName="TableRow";var Ux=Io.forwardRef(({className:e,sortable:t,sorted:o,onSort:r,align:n="left",children:a,...i},s)=>{let l=()=>t?o==="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"})}):o==="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,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,ct.jsx)("th",{ref:s,className:P("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[n].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?r:void 0,...i,children:t||n!=="left"?(0,ct.jsxs)("div",{className:P("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});Ux.displayName="TableHead";var fm=Io.forwardRef(({className:e,align:t="left",...o},r)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,ct.jsx)("td",{ref:r,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...o})});fm.displayName="TableCell";var M_=Io.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("caption",{ref:o,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));M_.displayName="TableCaption";var Me=b(D());function oX({columns:e,data:t,enableSorting:o=!0,enablePagination:r=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=eR.useState([]),[d,f]=eR.useState(""),p=T_({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:R_(),getPaginationRowModel:r?P_():void 0,getSortedRowModel:o?L_():void 0,getFilteredRowModel:n?I_():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Me.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Me.jsx)("div",{className:"flex items-center",children:(0,Me.jsxs)("div",{className:"relative max-w-sm",children:[(0,Me.jsx)(rl,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Me.jsx)(Co,{placeholder:i,value:d,onChange:m=>f(m.target.value),className:"pl-8"})]})}),(0,Me.jsx)("div",{className:"rounded-md border",children:(0,Me.jsxs)(Vx,{children:[(0,Me.jsx)(Bx,{children:p.getHeaderGroups().map(m=>(0,Me.jsx)(qc,{children:m.headers.map(g=>(0,Me.jsx)(Ux,{children:g.isPlaceholder?null:(0,Me.jsxs)("div",{className:P("flex items-center gap-2",g.column.getCanSort()&&"cursor-pointer select-none"),onClick:g.column.getToggleSortingHandler(),children:[Jb(g.column.columnDef.header,g.getContext()),o&&g.column.getCanSort()&&(0,Me.jsx)("div",{className:"ml-auto",children:g.column.getIsSorted()==="desc"?(0,Me.jsx)(Nu,{className:"h-4 w-4"}):g.column.getIsSorted()==="asc"?(0,Me.jsx)(Fu,{className:"h-4 w-4"}):(0,Me.jsx)(Ou,{className:"h-4 w-4 opacity-50"})})]})},g.id))},m.id))}),(0,Me.jsx)(Hx,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(m=>(0,Me.jsx)(qc,{"data-state":m.getIsSelected()&&"selected",children:m.getVisibleCells().map(g=>(0,Me.jsx)(fm,{children:Jb(g.column.columnDef.cell,g.getContext())},g.id))},m.id)):(0,Me.jsx)(qc,{children:(0,Me.jsx)(fm,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),r&&(0,Me.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Me.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Me.jsxs)("div",{className:"space-x-2",children:[(0,Me.jsxs)(De,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Me.jsx)(wn,{className:"h-4 w-4"}),"Previous"]}),(0,Me.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Me.jsxs)(De,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Me.jsx)(Ao,{className:"h-4 w-4"})]})]})]})]})}function rX(e){return({column:t})=>(0,Me.jsxs)(De,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Me.jsx)(Nu,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Me.jsx)(Fu,{className:"ml-2 h-4 w-4"}):(0,Me.jsx)(Ou,{className:"ml-2 h-4 w-4"})]})}var Vo=b(M());var ye=b(D()),nX={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},tR=Q("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 E_({className:e,variant:t,size:o,state:r,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:m,allowClear:g=!0,readOnly:x=!1,showTodayButton:v=!0,calendarProps:h,disabled:y,...w}){let[C,S]=Vo.useState(!1),[R,I]=Vo.useState(n);Vo.useEffect(()=>{I(n)},[n]);let T=U=>{let O=Array.isArray(U)?U[0]:U&&typeof U=="object"&&"from"in U?U.from:U;I(O),a?.(O),O&&S(!1)},L=U=>{U.stopPropagation(),T(void 0)},k=()=>{T(new Date)},A=U=>!!(l&&U<l||u&&U>u||c?.some(O=>O.toDateString()===U.toDateString())||d?.includes(U.getDay())),F=R&&Gv(R)?Mn(R,s):null,N=m||(0,ye.jsx)(Js,{className:"h-4 w-4"});return(0,ye.jsx)("div",{className:"moonui-theme",children:(0,ye.jsxs)(oi,{open:C,onOpenChange:S,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{variant:t==="ghost"?"ghost":"outline",className:P(tR({variant:t,size:o,state:r}),!F&&"text-muted-foreground",e),disabled:y||x,...w,children:[(0,ye.jsx)(Ga,{mode:"wait",children:(0,ye.jsxs)(Be.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"&&N,(0,ye.jsx)("span",{className:"flex-1 truncate",children:F||i}),p==="right"&&N]},F||"placeholder")}),g&&F&&!x&&!y&&(0,ye.jsxs)(Be.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:L,role:"button",tabIndex:0,onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),L(U))},children:[(0,ye.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,ye.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ye.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,ye.jsx)(va,{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,ye.jsxs)(Be.div,{...nX,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Vp,{mode:"single",selected:R,onSelect:T,disabled:A,showOutsideDays:!1,className:P("rounded-2xl",h?.className),...h}),v&&(0,ye.jsx)("div",{className:"border-t px-4 py-3",children:(0,ye.jsx)(De,{variant:"ghost",size:"sm",onClick:k,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:o,placeholder:r="Pick a date range",formatString:n="LLL dd, y",separator:a=" - ",...i}){let[s,l]=Vo.useState(!1),[u,c]=Vo.useState(t);Vo.useEffect(()=>{c(t)},[t]);let d=p=>{c(p),o?.(p),p?.from&&p?.to&&l(!1)},f=Vo.useMemo(()=>u?.from?u?.to?`${Mn(u.from,n)}${a}${Mn(u.to,n)}`:Mn(u.from,n):null,[u,n,a]);return(0,ye.jsxs)(oi,{open:s,onOpenChange:l,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{variant:i.variant==="ghost"?"ghost":"outline",className:P(tR({variant:i.variant,size:i.size,state:i.state}),!f&&"text-muted-foreground",e),disabled:i.disabled||i.readOnly,children:[(0,ye.jsx)(Js,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:f||r})]})}),(0,ye.jsx)(va,{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,ye.jsx)(Vp,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})}function iX({value:e,onChange:t,formatString:o="PPP p",showTimePicker:r=!0,timeFormat:n="24",timeInterval:a=15,...i}){let[s,l]=Vo.useState(e),[u,c]=Vo.useState(e?Mn(e,n==="24"?"HH:mm":"hh:mm a"):"00:00"),d=m=>{if(!m){l(void 0),t?.(void 0);return}let[g,x]=u.split(":").map(Number);m.setHours(g,x),l(m),t?.(m)},f=m=>{let g=m.target.value;if(c(g),s){let[x,v]=g.split(":").map(Number),h=new Date(s);h.setHours(x,v),l(h),t?.(h)}},p=Vo.useMemo(()=>{let m=[];for(let g=0;g<24;g++)for(let x=0;x<60;x+=a){let v=g.toString().padStart(2,"0"),h=x.toString().padStart(2,"0"),y=`${v}:${h}`;if(n==="12"){let w=g===0?12:g>12?g-12:g,C=g<12?"AM":"PM",S=`${w}:${h} ${C}`;m.push({value:y,label:S})}else m.push({value:y,label:y})}return m},[n,a]);return(0,ye.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,ye.jsx)(E_,{...i,value:s,onChange:d,formatString:"PPP",showTodayButton:!1}),r&&s&&(0,ye.jsxs)(Be.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,ye.jsx)(yf,{className:"h-4 w-4 text-muted-foreground"}),(0,ye.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(m=>(0,ye.jsx)("option",{value:m.value,children:m.label},m.value))})]})]})}function sX({value:e,onChange:t,placeholder:o="Pick a month",formatString:r="MMMM yyyy",...n}){let[a,i]=Vo.useState(!1),[s,l]=Vo.useState(e||new Date),u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=p=>{let m=new Date(s);m.setMonth(p),t?.(m),i(!1)},d=p=>{let m=new Date(s);m.setFullYear(m.getFullYear()+p),l(m)},f=e?Mn(e,r):null;return(0,ye.jsxs)(oi,{open:a,onOpenChange:i,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{variant:n.variant==="default"?"outline":n.variant||"outline",className:P(tR({variant:n.variant,size:n.size,state:n.state}),!f&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[(0,ye.jsx)(Js,{className:"mr-2 h-4 w-4"}),f||o]})}),(0,ye.jsx)(va,{className:"w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]",align:"start",children:(0,ye.jsxs)("div",{className:"p-3",children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsx)(De,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,ye.jsx)(wn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:s.getFullYear()}),(0,ye.jsx)(De,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,ye.jsx)(Ao,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((p,m)=>(0,ye.jsx)(De,{variant:e&&e.getMonth()===m?"primary":"outline",size:"sm",onClick:()=>c(m),className:"h-8 text-xs",children:p.slice(0,3)},p))})]})})]})}var A_=b(M());var oR=b(D());function lX({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:n,disabled:a=!1}){let[i,s]=A_.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 m=[...e],g=m[i];m.splice(i,1),m.splice(p,0,g),t(m),s(null)},d=()=>{s(null)};return(0,oR.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,oR.jsx)("div",{draggable:!a,onDragStart:m=>l(m,p),onDragOver:u,onDrop:m=>c(m,p),onDragEnd:d,className:P("transition-opacity duration-200",!a&&"cursor-move hover:opacity-80",i===p&&"opacity-50",a&&"cursor-not-allowed"),children:o(f,p)},r(f)))})}var ui=b(M());var Ut=b(M(),1);var le=b(M(),1);var we=b(D(),1),rR=["Enter"," "],uX=["ArrowDown","PageUp","Home"],N_=["ArrowUp","PageDown","End"],cX=[...uX,...N_],dX={ltr:[...rR,"ArrowRight"],rtl:[...rR,"ArrowLeft"]},fX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},hm="Menu",[mm,pX,mX]=Yn(hm),[Wl,nR]=Oe(hm,[mX,$r,Hc]),vm=$r(),O_=Hc(),[F_,Ss]=Wl(hm),[gX,xm]=Wl(hm),__=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:n,onOpenChange:a,modal:i=!0}=e,s=vm(t),[l,u]=le.useState(null),c=le.useRef(!1),d=rt(a),f=ra(n);return le.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),(0,we.jsx)(Ja,{...s,children:(0,we.jsx)(F_,{scope:t,open:o,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(gX,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:r})})})};__.displayName=hm;var hX="MenuAnchor",aR=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,n=vm(o);return(0,we.jsx)(ei,{...n,...r,ref:t})});aR.displayName=hX;var iR="MenuPortal",[vX,V_]=Wl(iR,{forceMount:void 0}),B_=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:n}=e,a=Ss(iR,t);return(0,we.jsx)(vX,{scope:t,forceMount:o,children:(0,we.jsx)(st,{present:o||a.open,children:(0,we.jsx)(Cr,{asChild:!0,container:n,children:r})})})};B_.displayName=iR;var Xr="MenuContent",[xX,sR]=Wl(Xr),H_=le.forwardRef((e,t)=>{let o=V_(Xr,e.__scopeMenu),{forceMount:r=o.forceMount,...n}=e,a=Ss(Xr,e.__scopeMenu),i=xm(Xr,e.__scopeMenu);return(0,we.jsx)(mm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(mm.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(yX,{...n,ref:t}):(0,we.jsx)(wX,{...n,ref:t})})})})}),yX=le.forwardRef((e,t)=>{let o=Ss(Xr,e.__scopeMenu),r=le.useRef(null),n=de(t,r);return le.useEffect(()=>{let a=r.current;if(a)return ms(a)},[]),(0,we.jsx)(lR,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),wX=le.forwardRef((e,t)=>{let o=Ss(Xr,e.__scopeMenu);return(0,we.jsx)(lR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),CX=sr("MenuContent.ScrollLock"),lR=le.forwardRef((e,t)=>{let{__scopeMenu:o,loop:r=!1,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...g}=e,x=Ss(Xr,o),v=xm(Xr,o),h=vm(o),y=O_(o),w=pX(o),[C,S]=le.useState(null),R=le.useRef(null),I=de(t,R,x.onContentChange),T=le.useRef(0),L=le.useRef(""),k=le.useRef(0),A=le.useRef(null),F=le.useRef("right"),N=le.useRef(0),U=m?ti:le.Fragment,O=m?{as:CX,allowPinchZoom:!0}:void 0,_=E=>{let J=L.current+E,ae=w().filter(z=>!z.disabled),V=document.activeElement,Y=ae.find(z=>z.ref.current===V)?.textValue,oe=ae.map(z=>z.textValue),X=DX(oe,J,Y),ce=ae.find(z=>z.textValue===X)?.ref.current;(function z(ne){L.current=ne,window.clearTimeout(T.current),ne!==""&&(T.current=window.setTimeout(()=>z(""),1e3))})(J),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(T.current),[]),us();let B=le.useCallback(E=>F.current===A.current?.side&&OX(E,A.current?.area),[]);return(0,we.jsx)(xX,{scope:o,searchRef:L,onItemEnter:le.useCallback(E=>{B(E)&&E.preventDefault()},[B]),onItemLeave:le.useCallback(E=>{B(E)||(R.current?.focus(),S(null))},[B]),onTriggerLeave:le.useCallback(E=>{B(E)&&E.preventDefault()},[B]),pointerGraceTimerRef:k,onPointerGraceIntentChange:le.useCallback(E=>{A.current=E},[]),children:(0,we.jsx)(U,{...O,children:(0,we.jsx)(Qa,{asChild:!0,trapped:n,onMountAutoFocus:W(a,E=>{E.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(bx,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:W(l,E=>{v.isUsingKeyboardRef.current||E.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(fs,{role:"menu","aria-orientation":"vertical","data-state":rV(x.open),"data-radix-menu-content":"",dir:v.dir,...h,...g,ref:I,style:{outline:"none",...g.style},onKeyDown:W(g.onKeyDown,E=>{let ae=E.target.closest("[data-radix-menu-content]")===E.currentTarget,V=E.ctrlKey||E.altKey||E.metaKey,Y=E.key.length===1;ae&&(E.key==="Tab"&&E.preventDefault(),!V&&Y&&_(E.key));let oe=R.current;if(E.target!==oe||!cX.includes(E.key))return;E.preventDefault();let ce=w().filter(z=>!z.disabled).map(z=>z.ref.current);N_.includes(E.key)&&ce.reverse(),EX(ce)}),onBlur:W(e.onBlur,E=>{E.currentTarget.contains(E.target)||(window.clearTimeout(T.current),L.current="")}),onPointerMove:W(e.onPointerMove,gm(E=>{let J=E.target,ae=N.current!==E.clientX;if(E.currentTarget.contains(J)&&ae){let V=E.clientX>N.current?"right":"left";F.current=V,N.current=E.clientX}}))})})})})})})});H_.displayName=Xr;var SX="MenuGroup",uR=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{role:"group",...r,ref:t})});uR.displayName=SX;var bX="MenuLabel",U_=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{...r,ref:t})});U_.displayName=bX;var zx="MenuItem",D_="menu.itemSelect",Wx=le.forwardRef((e,t)=>{let{disabled:o=!1,onSelect:r,...n}=e,a=le.useRef(null),i=xm(zx,e.__scopeMenu),s=sR(zx,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!o&&d){let f=new CustomEvent(D_,{bubbles:!0,cancelable:!0});d.addEventListener(D_,p=>r?.(p),{once:!0}),Au(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(z_,{...n,ref:l,disabled:o,onClick:W(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{let f=s.searchRef.current!=="";o||f&&d.key===" "||rR.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Wx.displayName=zx;var z_=le.forwardRef((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:n,...a}=e,i=sR(zx,o),s=O_(o),l=le.useRef(null),u=de(t,l),[c,d]=le.useState(!1),[f,p]=le.useState("");return le.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[a.children]),(0,we.jsx)(mm.ItemSlot,{scope:o,disabled:r,textValue:n??f,children:(0,we.jsx)(Rx,{asChild:!0,...s,focusable:!r,children:(0,we.jsx)($.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,gm(m=>{r?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,gm(m=>i.onItemLeave(m))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),RX="MenuCheckboxItem",G_=le.forwardRef((e,t)=>{let{checked:o=!1,onCheckedChange:r,...n}=e;return(0,we.jsx)(K_,{scope:e.__scopeMenu,checked:o,children:(0,we.jsx)(Wx,{role:"menuitemcheckbox","aria-checked":Gx(o)?"mixed":o,...n,ref:t,"data-state":fR(o),onSelect:W(n.onSelect,()=>r?.(Gx(o)?!0:!o),{checkForDefaultPrevented:!1})})})});G_.displayName=RX;var W_="MenuRadioGroup",[IX,PX]=Wl(W_,{value:void 0,onValueChange:()=>{}}),j_=le.forwardRef((e,t)=>{let{value:o,onValueChange:r,...n}=e,a=rt(r);return(0,we.jsx)(IX,{scope:e.__scopeMenu,value:o,onValueChange:a,children:(0,we.jsx)(uR,{...n,ref:t})})});j_.displayName=W_;var q_="MenuRadioItem",$_=le.forwardRef((e,t)=>{let{value:o,...r}=e,n=PX(q_,e.__scopeMenu),a=o===n.value;return(0,we.jsx)(K_,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(Wx,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":fR(a),onSelect:W(r.onSelect,()=>n.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});$_.displayName=q_;var cR="MenuItemIndicator",[K_,LX]=Wl(cR,{checked:!1}),X_=le.forwardRef((e,t)=>{let{__scopeMenu:o,forceMount:r,...n}=e,a=LX(cR,o);return(0,we.jsx)(st,{present:r||Gx(a.checked)||a.checked===!0,children:(0,we.jsx)($.span,{...n,ref:t,"data-state":fR(a.checked)})})});X_.displayName=cR;var TX="MenuSeparator",Y_=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Y_.displayName=TX;var kX="MenuArrow",Q_=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,n=vm(o);return(0,we.jsx)(ps,{...n,...r,ref:t})});Q_.displayName=kX;var dR="MenuSub",[MX,Z_]=Wl(dR),J_=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:n}=e,a=Ss(dR,t),i=vm(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=rt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(Ja,{...i,children:(0,we.jsx)(F_,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(MX,{scope:t,contentId:Ae(),triggerId:Ae(),trigger:s,onTriggerChange:l,children:o})})})};J_.displayName=dR;var pm="MenuSubTrigger",eV=le.forwardRef((e,t)=>{let o=Ss(pm,e.__scopeMenu),r=xm(pm,e.__scopeMenu),n=Z_(pm,e.__scopeMenu),a=sR(pm,e.__scopeMenu),i=le.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=le.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return le.useEffect(()=>c,[c]),le.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,we.jsx)(aR,{asChild:!0,...u,children:(0,we.jsx)(z_,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":n.contentId,"data-state":rV(o.open),...e,ref:ir(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,gm(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),c()},100))})),onPointerLeave:W(e.onPointerLeave,gm(d=>{c();let f=o.content?.getBoundingClientRect();if(f){let p=o.content?.dataset.side,m=p==="right",g=m?-5:5,x=f[m?"left":"right"],v=f[m?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+g,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:W(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||dX[r.dir].includes(d.key)&&(o.onOpenChange(!0),o.content?.focus(),d.preventDefault())})})})});eV.displayName=pm;var tV="MenuSubContent",oV=le.forwardRef((e,t)=>{let o=V_(Xr,e.__scopeMenu),{forceMount:r=o.forceMount,...n}=e,a=Ss(Xr,e.__scopeMenu),i=xm(Xr,e.__scopeMenu),s=Z_(tV,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(mm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(mm.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(lR,{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:W(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:W(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())})})})})})});oV.displayName=tV;function rV(e){return e?"open":"closed"}function Gx(e){return e==="indeterminate"}function fR(e){return Gx(e)?"indeterminate":e?"checked":"unchecked"}function EX(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function AX(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function DX(e,t,o){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1,i=AX(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==o));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function NX(e,t){let{x:o,y:r}=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>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(n=!n)}return n}function OX(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return NX(o,t)}function gm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nV=__,aV=aR,iV=B_,sV=H_,lV=uR,uV=U_,cV=Wx,dV=G_,fV=j_,pV=$_,mV=X_,gV=Y_,hV=Q_,vV=J_,xV=eV,yV=oV;var Ht=b(D(),1),jx="DropdownMenu",[_X,q1e]=Oe(jx,[nR]),Po=nR(),[VX,wV]=_X(jx),CV=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Po(t),u=Ut.useRef(null),[c,d]=qe({prop:n,defaultProp:a??!1,onChange:i,caller:jx});return(0,Ht.jsx)(VX,{scope:t,triggerId:Ae(),triggerRef:u,contentId:Ae(),open:c,onOpenChange:d,onOpenToggle:Ut.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Ht.jsx)(nV,{...l,open:c,onOpenChange:d,dir:r,modal:s,children:o})})};CV.displayName=jx;var SV="DropdownMenuTrigger",bV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...n}=e,a=wV(SV,o),i=Po(o);return(0,Ht.jsx)(aV,{asChild:!0,...i,children:(0,Ht.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":r?"":void 0,disabled:r,...n,ref:ir(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});bV.displayName=SV;var BX="DropdownMenuPortal",RV=e=>{let{__scopeDropdownMenu:t,...o}=e,r=Po(t);return(0,Ht.jsx)(iV,{...r,...o})};RV.displayName=BX;var IV="DropdownMenuContent",PV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=wV(IV,o),a=Po(o),i=Ut.useRef(!1);return(0,Ht.jsx)(sV,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:W(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)"}})});PV.displayName=IV;var HX="DropdownMenuGroup",LV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(lV,{...n,...r,ref:t})});LV.displayName=HX;var UX="DropdownMenuLabel",TV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(uV,{...n,...r,ref:t})});TV.displayName=UX;var zX="DropdownMenuItem",kV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(cV,{...n,...r,ref:t})});kV.displayName=zX;var GX="DropdownMenuCheckboxItem",MV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(dV,{...n,...r,ref:t})});MV.displayName=GX;var WX="DropdownMenuRadioGroup",EV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(fV,{...n,...r,ref:t})});EV.displayName=WX;var jX="DropdownMenuRadioItem",AV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(pV,{...n,...r,ref:t})});AV.displayName=jX;var qX="DropdownMenuItemIndicator",DV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(mV,{...n,...r,ref:t})});DV.displayName=qX;var $X="DropdownMenuSeparator",NV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(gV,{...n,...r,ref:t})});NV.displayName=$X;var KX="DropdownMenuArrow",XX=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(hV,{...n,...r,ref:t})});XX.displayName=KX;var YX=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:n,defaultOpen:a}=e,i=Po(t),[s,l]=qe({prop:r,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Ht.jsx)(vV,{...i,open:s,onOpenChange:l,children:o})},QX="DropdownMenuSubTrigger",OV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(xV,{...n,...r,ref:t})});OV.displayName=QX;var ZX="DropdownMenuSubContent",FV=Ut.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=Po(o);return(0,Ht.jsx)(yV,{...n,...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)"}})});FV.displayName=ZX;var _V=CV,VV=bV,pR=RV,mR=PV,BV=LV,gR=TV,hR=kV,vR=MV,HV=EV,xR=AV,yR=DV,wR=NV;var UV=YX,CR=OV,SR=FV;var zt=b(D()),eY=_V,tY=VV,oY=BV,rY=pR,nY=UV,aY=HV,zV=ui.forwardRef(({className:e,inset:t,children:o,...r},n)=>(0,zt.jsxs)(CR,{ref:n,className:P("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,zt.jsx)(Ao,{className:"ml-auto h-4 w-4"})]}));zV.displayName=CR.displayName;var GV=ui.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(SR,{ref:o,className:P("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}));GV.displayName=SR.displayName;var WV=ui.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,zt.jsx)(pR,{children:(0,zt.jsx)(mR,{ref:r,sideOffset:t,className:P("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})}));WV.displayName=mR.displayName;var jV=ui.forwardRef(({className:e,inset:t,...o},r)=>(0,zt.jsx)(hR,{ref:r,className:P("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}));jV.displayName=hR.displayName;var qV=ui.forwardRef(({className:e,children:t,checked:o,...r},n)=>(0,zt.jsxs)(vR,{ref:n,className:P("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,zt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zt.jsx)(yR,{children:(0,zt.jsx)(go,{className:"h-4 w-4"})})}),t]}));qV.displayName=vR.displayName;var $V=ui.forwardRef(({className:e,children:t,...o},r)=>(0,zt.jsxs)(xR,{ref:r,className:P("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,zt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zt.jsx)(yR,{children:(0,zt.jsx)(el,{className:"h-2 w-2 fill-current"})})}),t]}));$V.displayName=xR.displayName;var KV=ui.forwardRef(({className:e,inset:t,...o},r)=>(0,zt.jsx)(gR,{ref:r,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));KV.displayName=gR.displayName;var XV=ui.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(wR,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));XV.displayName=wR.displayName;var YV=({className:e,...t})=>(0,zt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});YV.displayName="DropdownMenuShortcut";var br=b(M());var QV=b(M());var ci=b(D()),iY=Q("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=Q("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"}}),qx=QV.forwardRef(({className:e,value:t=0,variant:o,size:r,radius:n,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},p)=>{let m=Math.max(0,Math.min(t,d)),g=d>0?m/d*100:0,x=l||`${Math.round(g)}%`;return(0,ci.jsxs)(ci.Fragment,{children:[s&&(0,ci.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,ci.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,ci.jsx)("div",{ref:p,className:P("moonui-theme",iY({variant:o,size:r,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:m,...f,children:(0,ci.jsx)("div",{className:P(sY({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});qx.displayName="Progress";var ve=b(D()),lY=e=>e.startsWith("image/")?(0,ve.jsx)(ol,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(Uf,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(Df,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(If,{className:"h-4 w-4"}):(0,ve.jsx)(Pf,{className:"h-4 w-4"}),bR=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]},uY=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(Be.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,ve.jsx)("div",{className:"flex-shrink-0",children:i?(0,ve.jsx)("img",{src:i,alt:r.name,className:"h-10 w-10 object-cover rounded"}):(0,ve.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:lY(r.type)})}),(0,ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)("p",{className:"text-sm font-medium truncate",children:r.name}),(0,ve.jsx)(De,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),children:(0,ve.jsx)(mr,{className:"h-3 w-3"})})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:bR(r.size)}),a==="uploading"&&(0,ve.jsxs)(gr,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(_t,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(gr,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Hi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(gr,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(Cn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(qx,{value:n,className:"h-1"})})]})]})},ZV=br.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:o=10*1024*1024,maxFiles:r=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,br.useState)([]),[p,m]=(0,br.useState)(!1),[g,x]=(0,br.useState)(null),v=I=>I.size>o?`File size exceeds ${bR(o)}`:e!=="*"&&!e.split(",").some(T=>{let L=T.trim();return L.includes("*")?I.type.startsWith(L.replace("*","")):I.type===L})?"File type not supported":null,h=(0,br.useCallback)(async I=>{let T=Array.from(I);if(x(null),d.length+T.length>r){x(`Maximum ${r} files allowed`);return}let L=[],k=[];if(T.forEach(F=>{let N=v(F);N?k.push(`${F.name}: ${N}`):L.push(F)}),k.length>0){x(k.join(", "));return}let A=L.map((F,N)=>({id:`${Date.now()}-${N}-${F.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:F,progress:0,status:"uploading",preview:F.type.startsWith("image/")?URL.createObjectURL(F):void 0}));f(F=>[...F,...A]);for(let F of A){let N=0,U=setInterval(()=>{N+=15+F.file.size%10,N>=100?(N=100,clearInterval(U),f(O=>O.map(_=>_.id===F.id?{..._,progress:100,status:"success"}:_))):f(O=>O.map(_=>_.id===F.id?{..._,progress:N}:_))},200)}if(i)try{await i(L)}catch(F){console.error("Upload failed:",F),f(N=>N.map(U=>A.some(O=>O.id===U.id)?{...U,status:"error"}:U))}},[d.length,r,o,e,i]),y=(0,br.useCallback)(I=>{if(I.preventDefault(),m(!1),n)return;let T=I.dataTransfer.files;T.length>0&&h(T)},[h,n]),w=(0,br.useCallback)(I=>{I.preventDefault(),n||m(!0)},[n]),C=(0,br.useCallback)(I=>{I.preventDefault(),m(!1)},[]),S=(0,br.useCallback)(I=>{let T=I.target.files;T&&T.length>0&&h(T),I.target.value=""},[h]),R=(0,br.useCallback)(I=>{f(T=>{let L=T.find(k=>k.id===I);return L?.preview&&URL.revokeObjectURL(L.preview),T.filter(k=>k.id!==I)}),s&&s(I)},[s]);return(0,ve.jsxs)("div",{ref:c,className:P("moonui-theme","space-y-4",a),...u,children:[(0,ve.jsxs)(Be.div,{className:P("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,ve.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:S,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ve.jsx)(Hf,{className:"h-full w-full"})}),(0,ve.jsxs)("div",{children:[(0,ve.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ve.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",bR(o)," each"]})]}),(0,ve.jsx)(De,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ga,{children:g&&(0,ve.jsxs)(Be.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,ve.jsx)(Cn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:g})]})}),(0,ve.jsx)(Ga,{children:d.length>0&&(0,ve.jsxs)(Be.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ve.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)(Ga,{children:d.map(I=>(0,ve.jsx)(uY,{uploadedFile:I,onRemove:R},I.id))})})]})})]})});ZV.displayName="FileUpload";var JV=b(M());var jl=b(D()),eB=JV.default.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=Ic(0),d=Ic(0),f=r==="up"||r==="down",p=f?c:d,m=yS(p,[0,n],[1,.5]),g=(h,y)=>{if(!s)return;let w=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,S=!1;switch(r){case"up":S=w>n||C>500;break;case"down":S=w<-n||C<-500;break;case"left":S=w>n||C>500;break;case"right":S=w<-n||C<-500;break}S?o(!1):CS(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{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,jl.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,jl.jsx)(Be.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,jl.jsxs)(Be.div,{ref:u,drag:s?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"]:p,opacity:m},initial:x(),animate:v(),exit:x(),transition:{type:"spring",damping:30,stiffness:300},className:P("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"},a),...l,children:[(r==="up"||r==="down")&&(0,jl.jsx)("div",{className:"flex justify-center p-2",children:(0,jl.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});eB.displayName="GestureDrawer";var bs=b(M());var Ze=b(D());function cY({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,bs.useState)(null),[s,l]=(0,bs.useState)(!0);(0,bs.useEffect)(()=>{(async()=>{try{let m=await(await fetch("/api/github-stars")).json();i(m)}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,Ze.jsxs)("div",{className:P("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"})]})]}):a?(0,Ze.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,Ze.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,Ze.jsx)(Ui,{className:"fill-current text-yellow-500",size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),o&&(0,Ze.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,Ze.jsx)(Lf,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),r&&(0,Ze.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,Ze.jsx)(tl,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Ze.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function vTe({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,n]=(0,bs.useState)(null),[a,i]=(0,bs.useState)(!0);(0,bs.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,Ze.jsx)(De,{variant:"outline",size:t,className:P("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)(Ui,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Ze.jsx)("span",{children:"Star on GitHub"}),!a&&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:s(r)}),(0,Ze.jsx)(Rf,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var ql=b(M());var Se=b(M(),1),Kx=b(M(),1),Bn=b(M(),1),dY=Object.defineProperty,fY=Object.defineProperties,pY=Object.getOwnPropertyDescriptors,$x=Object.getOwnPropertySymbols,oB=Object.prototype.hasOwnProperty,rB=Object.prototype.propertyIsEnumerable,tB=(e,t,o)=>t in e?dY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,mY=(e,t)=>{for(var o in t||(t={}))oB.call(t,o)&&tB(e,o,t[o]);if($x)for(var o of $x(t))rB.call(t,o)&&tB(e,o,t[o]);return e},gY=(e,t)=>fY(e,pY(t)),hY=(e,t)=>{var o={};for(var r in e)oB.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&$x)for(var r of $x(e))t.indexOf(r)<0&&rB.call(e,r)&&(o[r]=e[r]);return o};function vY(e){let t=setTimeout(e,0),o=setTimeout(e,10),r=setTimeout(e,50);return[t,o,r]}function xY(e){let t=Kx.useRef();return Kx.useEffect(()=>{t.current=e}),t.current}var yY=18,nB=40,wY=`${nB}px`,CY=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function SY({containerRef:e,inputRef:t,pushPasswordManagerStrategy:o,isFocused:r}){let[n,a]=Bn.useState(!1),[i,s]=Bn.useState(!1),[l,u]=Bn.useState(!1),c=Bn.useMemo(()=>o==="none"?!1:(o==="increase-width"||o==="experimental-no-flickering")&&n&&i,[n,i,o]),d=Bn.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||o==="none")return;let m=f,g=m.getBoundingClientRect().left+m.offsetWidth,x=m.getBoundingClientRect().top+m.offsetHeight/2,v=g-yY,h=x;document.querySelectorAll(CY).length===0&&document.elementFromPoint(v,h)===f||(a(!0),u(!0))},[e,t,l,o]);return Bn.useEffect(()=>{let f=e.current;if(!f||o==="none")return;function p(){let g=window.innerWidth-f.getBoundingClientRect().right;s(g>=nB)}p();let m=setInterval(p,1e3);return()=>{clearInterval(m)}},[e,o]),Bn.useEffect(()=>{let f=r||document.activeElement===t.current;if(o==="none"||!f)return;let p=setTimeout(d,0),m=setTimeout(d,2e3),g=setTimeout(d,5e3),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(m),clearTimeout(g),clearTimeout(x)}},[t,r,o,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:wY}}var RR=Se.createContext({}),IR=Se.forwardRef((e,t)=>{var o=e,{value:r,onChange:n,maxLength:a,textAlign:i="left",pattern:s,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=bY,render:g,children:x}=o,v=hY(o,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),h,y,w,C,S;let[R,I]=Se.useState(typeof v.defaultValue=="string"?v.defaultValue:""),T=r??R,L=xY(T),k=Se.useCallback(ee=>{n?.(ee),I(ee)},[n]),A=Se.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),F=Se.useRef(null),N=Se.useRef(null),U=Se.useRef({value:T,onChange:k,isIOS:typeof window<"u"&&((y=(h=window?.CSS)==null?void 0:h.supports)==null?void 0:y.call(h,"-webkit-touch-callout","none"))}),O=Se.useRef({prev:[(w=F.current)==null?void 0:w.selectionStart,(C=F.current)==null?void 0:C.selectionEnd,(S=F.current)==null?void 0:S.selectionDirection]});Se.useImperativeHandle(t,()=>F.current,[]),Se.useEffect(()=>{let ee=F.current,ie=N.current;if(!ee||!ie)return;U.current.value!==ee.value&&U.current.onChange(ee.value),O.current.prev=[ee.selectionStart,ee.selectionEnd,ee.selectionDirection];function ze(){if(document.activeElement!==ee){V(null),oe(null);return}let Ne=ee.selectionStart,Ct=ee.selectionEnd,$n=ee.selectionDirection,To=ee.maxLength,un=ee.value,Lr=O.current.prev,cn=-1,Kn=-1,Xn;if(un.length!==0&&Ne!==null&&Ct!==null){let md=Ne===Ct,gd=Ne===un.length&&un.length<To;if(md&&!gd){let Tr=Ne;if(Tr===0)cn=0,Kn=1,Xn="forward";else if(Tr===To)cn=Tr-1,Kn=Tr,Xn="backward";else if(To>1&&un.length>1){let hd=0;if(Lr[0]!==null&&Lr[1]!==null){Xn=Tr<Lr[1]?"backward":"forward";let Ty=Lr[0]===Lr[1]&&Lr[0]<To;Xn==="backward"&&!Ty&&(hd=-1)}cn=hd+Tr,Kn=hd+Tr+1}}cn!==-1&&Kn!==-1&&cn!==Kn&&F.current.setSelectionRange(cn,Kn,Xn)}let Vm=cn!==-1?cn:Ne,eu=Kn!==-1?Kn:Ct,vi=Xn??$n;V(Vm),oe(eu),O.current.prev=[Vm,eu,vi]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===ee&&J(!0),!document.getElementById("input-otp-style")){let Ne=document.createElement("style");if(Ne.id="input-otp-style",document.head.appendChild(Ne),Ne.sheet){let Ct="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";ym(Ne.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ym(Ne.sheet,`[data-input-otp]:autofill { ${Ct} }`),ym(Ne.sheet,`[data-input-otp]:-webkit-autofill { ${Ct} }`),ym(Ne.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),ym(Ne.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ke=()=>{ie&&ie.style.setProperty("--root-height",`${ee.clientHeight}px`)};Ke();let Lt=new ResizeObserver(Ke);return Lt.observe(ee),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),Lt.disconnect()}},[]);let[_,B]=Se.useState(!1),[E,J]=Se.useState(!1),[ae,V]=Se.useState(null),[Y,oe]=Se.useState(null);Se.useEffect(()=>{vY(()=>{var ee,ie,ze,Ke;(ee=F.current)==null||ee.dispatchEvent(new Event("input"));let Lt=(ie=F.current)==null?void 0:ie.selectionStart,Ne=(ze=F.current)==null?void 0:ze.selectionEnd,Ct=(Ke=F.current)==null?void 0:Ke.selectionDirection;Lt!==null&&Ne!==null&&(V(Lt),oe(Ne),O.current.prev=[Lt,Ne,Ct])})},[T,E]),Se.useEffect(()=>{L!==void 0&&T!==L&&L.length<a&&T.length===a&&c?.(T)},[a,c,L,T]);let X=SY({containerRef:N,inputRef:F,pushPasswordManagerStrategy:d,isFocused:E}),ce=Se.useCallback(ee=>{let ie=ee.currentTarget.value.slice(0,a);if(ie.length>0&&A&&!A.test(ie)){ee.preventDefault();return}typeof L=="string"&&ie.length<L.length&&document.dispatchEvent(new Event("selectionchange")),k(ie)},[a,k,L,A]),z=Se.useCallback(()=>{var ee;if(F.current){let ie=Math.min(F.current.value.length,a-1),ze=F.current.value.length;(ee=F.current)==null||ee.setSelectionRange(ie,ze),V(ie),oe(ze)}J(!0)},[a]),ne=Se.useCallback(ee=>{var ie,ze;let Ke=F.current;if(!f&&(!U.current.isIOS||!ee.clipboardData||!Ke))return;let Lt=ee.clipboardData.getData("text/plain"),Ne=f?f(Lt):Lt;ee.preventDefault();let Ct=(ie=F.current)==null?void 0:ie.selectionStart,$n=(ze=F.current)==null?void 0:ze.selectionEnd,To=(Ct!==$n?T.slice(0,Ct)+Ne+T.slice($n):T.slice(0,Ct)+Ne+T.slice(Ct)).slice(0,a);if(To.length>0&&A&&!A.test(To))return;Ke.value=To,k(To);let un=Math.min(To.length,a-1),Lr=To.length;Ke.setSelectionRange(un,Lr),V(un),oe(Lr)},[a,k,A,T]),he=Se.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),xe=Se.useMemo(()=>({position:"absolute",inset:0,width:X.willPushPWMBadge?`calc(100% + ${X.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:X.willPushPWMBadge?`inset(0 ${X.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[X.PWM_BADGE_SPACE_WIDTH,X.willPushPWMBadge,i]),pe=Se.useMemo(()=>Se.createElement("input",gY(mY({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":Y,inputMode:u,pattern:A?.source,"aria-placeholder":l,style:xe,maxLength:a,value:T,ref:F,onPaste:ee=>{var ie;ne(ee),(ie=v.onPaste)==null||ie.call(v,ee)},onChange:ce,onMouseOver:ee=>{var ie;B(!0),(ie=v.onMouseOver)==null||ie.call(v,ee)},onMouseLeave:ee=>{var ie;B(!1),(ie=v.onMouseLeave)==null||ie.call(v,ee)},onFocus:ee=>{var ie;z(),(ie=v.onFocus)==null||ie.call(v,ee)},onBlur:ee=>{var ie;J(!1),(ie=v.onBlur)==null||ie.call(v,ee)}})),[ce,z,ne,u,xe,a,Y,ae,v,A?.source,T]),K=Se.useMemo(()=>({slots:Array.from({length:a}).map((ee,ie)=>{var ze;let Ke=E&&ae!==null&&Y!==null&&(ae===Y&&ie===ae||ie>=ae&&ie<Y),Lt=T[ie]!==void 0?T[ie]:null,Ne=T[0]!==void 0?null:(ze=l?.[ie])!=null?ze:null;return{char:Lt,placeholderChar:Ne,isActive:Ke,hasFakeCaret:Ke&&Lt===null}}),isFocused:E,isHovering:!v.disabled&&_}),[E,_,a,Y,ae,v.disabled,T]),Ie=Se.useMemo(()=>g?g(K):Se.createElement(RR.Provider,{value:K},x),[x,K,g]);return Se.createElement(Se.Fragment,null,m!==null&&Se.createElement("noscript",null,Se.createElement("style",null,m)),Se.createElement("div",{ref:N,"data-input-otp-container":!0,style:he,className:p},Ie,Se.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},pe)))});IR.displayName="Input";function ym(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var bY=`
67
67
  [data-input-otp] {
68
68
  --nojs-bg: white !important;
69
69
  --nojs-fg: black !important;
@@ -82,31 +82,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
82
82
  --nojs-bg: black !important;
83
83
  --nojs-fg: white !important;
84
84
  }
85
- }`,gB="^\\d+$",hB="^[a-zA-Z]+$",vB="^[a-zA-Z0-9]+$";var $a=R(D()),aI=Il.forwardRef(({className:e,containerClassName:t,...r},o)=>(0,$a.jsx)(nI,{ref:o,containerClassName:L("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:L("disabled:cursor-not-allowed",e),...r}));aI.displayName="InputOTP";var iI=Il.forwardRef(({className:e,...t},r)=>(0,$a.jsx)("div",{ref:r,className:L("flex items-center",e),...t}));iI.displayName="InputOTPGroup";var sI=te(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),lI=Il.forwardRef(({index:e,className:t,...r},o)=>{let a=Il.useContext(oI)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,$a.jsxs)("div",{ref:o,"data-active":l?"":void 0,className:L(sI({isActive:!!l}),t),...r,children:[i,s&&(0,$a.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,$a.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});lI.displayName="InputOTPSlot";var uI=Il.forwardRef(({className:e,...t},r)=>(0,$a.jsx)("div",{ref:r,role:"separator",className:L("text-muted-foreground",e),...t,children:(0,$a.jsx)(qd,{"aria-hidden":"true"})}));uI.displayName="InputOTPSeparator";var Lc=R(E());var Ce=R(D());function cI({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,Lc.useState)(!1),[s,l]=(0,Lc.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,Ce.jsxs)("div",{className:L("relative group cursor-pointer transition-all duration-300",r),onMouseEnter:u,onMouseLeave:c,children:[(0,Ce.jsx)("div",{className:L("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,Ce.jsx)("div",{className:L("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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsxs)(jr,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,Ce.jsx)(gu,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,Ce.jsx)(vu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,Ce.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,Ce.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,Ce.jsx)(yu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),o&&!a&&(0,Ce.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,Ce.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function xB({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,Lc.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,Lc.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 m=await p.json();s({isAuthenticated:!0,deviceValid:m.valid,hasProAccess:m.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,Ce.jsx)("div",{className:L("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",o),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Ce.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,Ce.jsxs)("div",{className:L("relative",o),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(jr,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(vu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,Ce.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,Ce.jsxs)("div",{className:L("relative",o),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(jr,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(yu,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,Ce.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,Ce.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,Ce.jsx)(cI,{componentName:r||t,className:o,children:n||e})}return(0,Ce.jsx)("div",{className:o,children:e})}function yB({className:e}){return(0,Ce.jsxs)(jr,{variant:"secondary",className:L("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,Ce.jsx)(gu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function wB({className:e}){return(0,Ce.jsx)(jr,{variant:"outline",className:L("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var CB=R(E());var $t=R(D());function Ix({className:e,variant:t="default",showText:r=!0,...o}){let n=CB.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,$t.jsxs)("div",{className:L("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",...o,children:[(0,$t.jsxs)("defs",{children:[t==="gradient"&&(0,$t.jsxs)("linearGradient",{id:a,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.jsxs)("mask",{id:i,children:[(0,$t.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,$t.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,$t.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(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 rX({className:e,variant:t="default",...r}){return(0,$t.jsx)(Ix,{showText:!1,className:e,variant:t,...r})}function oX({className:e,variant:t="default",showText:r=!0,...o}){return(0,$t.jsx)(Ix,{className:L("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var dI=R(E());var _r=R(D()),fI=({className:e,...t})=>(0,_r.jsx)("nav",{role:"navigation","aria-label":"pagination",className:L("moonui-theme","mx-auto flex w-full justify-center",e),...t});fI.displayName="Pagination";var pI=dI.forwardRef(({className:e,...t},r)=>(0,_r.jsx)("ul",{ref:r,className:L("moonui-theme","flex flex-row items-center gap-1",e),...t}));pI.displayName="PaginationContent";var mI=dI.forwardRef(({className:e,...t},r)=>(0,_r.jsx)("li",{ref:r,className:L("moonui-theme","",e),...t}));mI.displayName="PaginationItem";var Yp=({className:e,isActive:t,size:r="icon",...o})=>(0,_r.jsx)("a",{"aria-current":t?"page":void 0,className:L(hf({variant:t?"outline":"ghost",size:r}),e),...o});Yp.displayName="PaginationLink";var gI=({className:e,...t})=>(0,_r.jsxs)(Yp,{"aria-label":"Go to previous page",size:"md",className:L("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,_r.jsx)(an,{className:"h-4 w-4"}),(0,_r.jsx)("span",{children:"Previous"})]});gI.displayName="PaginationPrevious";var hI=({className:e,...t})=>(0,_r.jsxs)(Yp,{"aria-label":"Go to next page",size:"md",className:L("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,_r.jsx)("span",{children:"Next"}),(0,_r.jsx)(kr,{className:"h-4 w-4"})]});hI.displayName="PaginationNext";var vI=({className:e,...t})=>(0,_r.jsxs)("span",{"aria-hidden":!0,className:L("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,_r.jsx)(Gn,{className:"h-4 w-4"}),(0,_r.jsx)("span",{className:"sr-only",children:"More pages"})]});vI.displayName="PaginationEllipsis";var Jp=R(E());var ss=R(E());var Q=R(E(),1),II=R(Ci(),1);function xI(e,[t,r]){return Math.min(r,Math.max(t,e))}var SB=R(E(),1);var bB=R(D(),1),yI=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"}),nX="VisuallyHidden",Qp=SB.forwardRef((e,t)=>(0,bB.jsx)($.span,{...e,ref:t,style:{...yI,...e.style}}));Qp.displayName=nX;var RB=Qp;var fe=R(D(),1),iX=[" ","Enter","ArrowUp","ArrowDown"],sX=[" ","Enter"],Ll="Select",[Px,Tx,lX]=Nn(Ll),[Pc,kPe]=Oe(Ll,[lX,zo]),kx=zo(),[uX,as]=Pc(Ll),[cX,dX]=Pc(Ll),IB=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:m}=e,g=kx(t),[y,h]=Q.useState(null),[v,x]=Q.useState(null),[w,C]=Q.useState(!1),b=Un(u),[S,I]=$e({prop:o,defaultProp:n??!1,onChange:a,caller:Ll}),[T,P]=$e({prop:i,defaultProp:s,onChange:l,caller:Ll}),M=Q.useRef(null),A=y?m||!!y.closest("form"):!0,[F,N]=Q.useState(new Set),H=Array.from(F).map(O=>O.props.value).join(";");return(0,fe.jsx)(Va,{...g,children:(0,fe.jsxs)(uX,{required:p,scope:t,trigger:y,onTriggerChange:h,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:De(),value:T,onValueChange:P,open:S,onOpenChange:I,dir:b,triggerPointerDownPosRef:M,disabled:f,children:[(0,fe.jsx)(Px.Provider,{scope:t,children:(0,fe.jsx)(cX,{scope:e.__scopeSelect,onNativeOptionAdd:Q.useCallback(O=>{N(U=>new Set(U).add(O))},[]),onNativeOptionRemove:Q.useCallback(O=>{N(U=>{let V=new Set(U);return V.delete(O),V})},[]),children:r})}),A?(0,fe.jsxs)(YB,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:O=>P(O.target.value),disabled:f,form:m,children:[T===void 0?(0,fe.jsx)("option",{value:""}):null,Array.from(F)]},H):null]})})};IB.displayName=Ll;var LB="SelectTrigger",PB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=kx(r),i=as(LB,r),s=i.disabled||o,l=de(t,i.onTriggerChange),u=Tx(r),c=Q.useRef("touch"),[d,f,p]=ZB(g=>{let y=u().filter(x=>!x.disabled),h=y.find(x=>x.value===i.value),v=JB(y,g,h);v!==void 0&&i.onValueChange(v.value)}),m=g=>{s||(i.onOpenChange(!0),p()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return(0,fe.jsx)(Ba,{asChild:!0,...a,children:(0,fe.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":QB(i.value)?"":void 0,...n,ref:l,onClick:W(n.onClick,g=>{g.currentTarget.focus(),c.current!=="mouse"&&m(g)}),onPointerDown:W(n.onPointerDown,g=>{c.current=g.pointerType;let y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(m(g),g.preventDefault())}),onKeyDown:W(n.onKeyDown,g=>{let y=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(y&&g.key===" ")&&iX.includes(g.key)&&(m(),g.preventDefault())})})})});PB.displayName=LB;var TB="SelectValue",kB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=as(TB,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return Ve(()=>{u(c)},[u,c]),(0,fe.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:QB(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});kB.displayName=TB;var fX="SelectIcon",MB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,fe.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});MB.displayName=fX;var pX="SelectPortal",EB=e=>(0,fe.jsx)(go,{asChild:!0,...e});EB.displayName=pX;var Pl="SelectContent",AB=Q.forwardRef((e,t)=>{let r=as(Pl,e.__scopeSelect),[o,n]=Q.useState();if(Ve(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?II.createPortal((0,fe.jsx)(DB,{scope:e.__scopeSelect,children:(0,fe.jsx)(Px.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(NB,{...e,ref:t})});AB.displayName=Pl;var Ln=10,[DB,is]=Pc(Pl),mX="SelectContentImpl",gX=to("SelectContent.RemoveScroll"),NB=Q.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:m,hideWhenDetached:g,avoidCollisions:y,...h}=e,v=as(Pl,r),[x,w]=Q.useState(null),[C,b]=Q.useState(null),S=de(t,z=>w(z)),[I,T]=Q.useState(null),[P,M]=Q.useState(null),A=Tx(r),[F,N]=Q.useState(!1),H=Q.useRef(!1);Q.useEffect(()=>{if(x)return Xi(x)},[x]),Wi();let O=Q.useCallback(z=>{let[ne,...he]=A().map(K=>K.ref.current),[xe]=he.slice(-1),pe=document.activeElement;for(let K of z)if(K===pe||(K?.scrollIntoView({block:"nearest"}),K===ne&&C&&(C.scrollTop=0),K===xe&&C&&(C.scrollTop=C.scrollHeight),K?.focus(),document.activeElement!==pe))return},[A,C]),U=Q.useCallback(()=>O([I,x]),[O,I,x]);Q.useEffect(()=>{F&&U()},[F,U]);let{onOpenChange:V,triggerPointerDownPosRef:k}=v;Q.useEffect(()=>{if(x){let z={x:0,y:0},ne=xe=>{z={x:Math.abs(Math.round(xe.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(k.current?.y??0))}},he=xe=>{z.x<=10&&z.y<=10?xe.preventDefault():x.contains(xe.target)||V(!1),document.removeEventListener("pointermove",ne),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",he,{capture:!0})}}},[x,V,k]),Q.useEffect(()=>{let z=()=>V(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[V]);let[Z,ae]=ZB(z=>{let ne=A().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=JB(ne,z,he);xe&&setTimeout(()=>xe.ref.current.focus())}),_=Q.useCallback((z,ne,he)=>{let xe=!H.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&(T(z),xe&&(H.current=!0))},[v.value]),Y=Q.useCallback(()=>x?.focus(),[x]),re=Q.useCallback((z,ne,he)=>{let xe=!H.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&M(z)},[v.value]),X=o==="popper"?wI:OB,ce=X===wI?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y}:{};return(0,fe.jsx)(DB,{scope:r,content:x,viewport:C,onViewportChange:b,itemRefCallback:_,selectedItem:I,onItemLeave:Y,itemTextRefCallback:re,focusSelectedItem:U,selectedItemText:P,position:o,isPositioned:F,searchRef:Z,children:(0,fe.jsx)(Ha,{as:gX,allowPinchZoom:!0,children:(0,fe.jsx)(Fa,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:W(n,z=>{v.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:(0,fe.jsx)(Vo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,fe.jsx)(X,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault(),...h,...ce,onPlaced:()=>N(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:W(h.onKeyDown,z=>{let ne=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!ne&&z.key.length===1&&ae(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let xe=A().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(z.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){let pe=z.target,K=xe.indexOf(pe);xe=xe.slice(K+1)}setTimeout(()=>O(xe)),z.preventDefault()}})})})})})})});NB.displayName=mX;var hX="SelectItemAlignedPosition",OB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=as(Pl,r),i=is(Pl,r),[s,l]=Q.useState(null),[u,c]=Q.useState(null),d=de(t,S=>c(S)),f=Tx(r),p=Q.useRef(!1),m=Q.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:h,focusSelectedItem:v}=i,x=Q.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&y&&h){let S=a.trigger.getBoundingClientRect(),I=u.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),P=h.getBoundingClientRect();if(a.dir!=="rtl"){let pe=P.left-I.left,K=T.left-pe,Ie=S.left-K,J=S.width+Ie,ie=Math.max(J,I.width),Ge=window.innerWidth-Ln,Xe=xI(K,[Ln,Math.max(Ln,Ge-ie)]);s.style.minWidth=J+"px",s.style.left=Xe+"px"}else{let pe=I.right-P.right,K=window.innerWidth-T.right-pe,Ie=window.innerWidth-S.right-K,J=S.width+Ie,ie=Math.max(J,I.width),Ge=window.innerWidth-Ln,Xe=xI(K,[Ln,Math.max(Ln,Ge-ie)]);s.style.minWidth=J+"px",s.style.right=Xe+"px"}let M=f(),A=window.innerHeight-Ln*2,F=g.scrollHeight,N=window.getComputedStyle(u),H=parseInt(N.borderTopWidth,10),O=parseInt(N.paddingTop,10),U=parseInt(N.borderBottomWidth,10),V=parseInt(N.paddingBottom,10),k=H+O+F+V+U,Z=Math.min(y.offsetHeight*5,k),ae=window.getComputedStyle(g),_=parseInt(ae.paddingTop,10),Y=parseInt(ae.paddingBottom,10),re=S.top+S.height/2-Ln,X=A-re,ce=y.offsetHeight/2,z=y.offsetTop+ce,ne=H+O+z,he=k-ne;if(ne<=re){let pe=M.length>0&&y===M[M.length-1].ref.current;s.style.bottom="0px";let K=u.clientHeight-g.offsetTop-g.offsetHeight,Ie=Math.max(X,ce+(pe?Y:0)+K+U),J=ne+Ie;s.style.height=J+"px"}else{let pe=M.length>0&&y===M[0].ref.current;s.style.top="0px";let Ie=Math.max(re,H+g.offsetTop+(pe?_:0)+ce)+he;s.style.height=Ie+"px",g.scrollTop=ne-re+g.offsetTop}s.style.margin=`${Ln}px 0`,s.style.minHeight=Z+"px",s.style.maxHeight=A+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,y,h,a.dir,o]);Ve(()=>x(),[x]);let[w,C]=Q.useState();Ve(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let b=Q.useCallback(S=>{S&&m.current===!0&&(x(),v?.(),m.current=!1)},[x,v]);return(0,fe.jsx)(xX,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:(0,fe.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,fe.jsx)($.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});OB.displayName=hX;var vX="SelectPopperPosition",wI=Q.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=Ln,...a}=e,i=kx(r);return(0,fe.jsx)($i,{...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)"}})});wI.displayName=vX;var[xX,LI]=Pc(Pl,{}),CI="SelectViewport",FB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=is(CI,r),i=LI(CI,r),s=de(t,a.onViewportChange),l=Q.useRef(0);return(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.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,fe.jsx)(Px.Slot,{scope:r,children:(0,fe.jsx)($.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:W(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 m=window.innerHeight-Ln*2,g=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),h=Math.max(g,y);if(h<m){let v=h+p,x=Math.min(m,v),w=v-x;d.style.height=x+"px",d.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});FB.displayName=CI;var _B="SelectGroup",[yX,wX]=Pc(_B),VB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=De();return(0,fe.jsx)(yX,{scope:r,id:n,children:(0,fe.jsx)($.div,{role:"group","aria-labelledby":n,...o,ref:t})})});VB.displayName=_B;var BB="SelectLabel",HB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=wX(BB,r);return(0,fe.jsx)($.div,{id:n.id,...o,ref:t})});HB.displayName=BB;var Lx="SelectItem",[CX,UB]=Pc(Lx),zB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=as(Lx,r),l=is(Lx,r),u=s.value===o,[c,d]=Q.useState(a??""),[f,p]=Q.useState(!1),m=de(t,v=>l.itemRefCallback?.(v,o,n)),g=De(),y=Q.useRef("touch"),h=()=>{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,fe.jsx)(CX,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:Q.useCallback(v=>{d(x=>x||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(Px.ItemSlot,{scope:r,value:o,disabled:n,textValue:c,children:(0,fe.jsx)($.div,{role:"option","aria-labelledby":g,"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:m,onFocus:W(i.onFocus,()=>p(!0)),onBlur:W(i.onBlur,()=>p(!1)),onClick:W(i.onClick,()=>{y.current!=="mouse"&&h()}),onPointerUp:W(i.onPointerUp,()=>{y.current==="mouse"&&h()}),onPointerDown:W(i.onPointerDown,v=>{y.current=v.pointerType}),onPointerMove:W(i.onPointerMove,v=>{y.current=v.pointerType,n?l.onItemLeave?.():y.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,v=>{v.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(i.onKeyDown,v=>{l.searchRef?.current!==""&&v.key===" "||(sX.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});zB.displayName=Lx;var Zp="SelectItemText",GB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=as(Zp,r),s=is(Zp,r),l=UB(Zp,r),u=dX(Zp,r),[c,d]=Q.useState(null),f=de(t,h=>d(h),l.onItemTextChange,h=>s.itemTextRefCallback?.(h,l.value,l.disabled)),p=c?.textContent,m=Q.useMemo(()=>(0,fe.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return Ve(()=>(g(m),()=>y(m)),[g,y,m]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)($.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?II.createPortal(a.children,i.valueNode):null]})});GB.displayName=Zp;var WB="SelectItemIndicator",qB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return UB(WB,r).isSelected?(0,fe.jsx)($.span,{"aria-hidden":!0,...o,ref:t}):null});qB.displayName=WB;var SI="SelectScrollUpButton",jB=Q.forwardRef((e,t)=>{let r=is(SI,e.__scopeSelect),o=LI(SI,e.__scopeSelect),[n,a]=Q.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{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,fe.jsx)(KB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});jB.displayName=SI;var bI="SelectScrollDownButton",$B=Q.forwardRef((e,t)=>{let r=is(bI,e.__scopeSelect),o=LI(bI,e.__scopeSelect),[n,a]=Q.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{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,fe.jsx)(KB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$B.displayName=bI;var KB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=is("SelectScrollButton",r),i=Q.useRef(null),s=Tx(r),l=Q.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Q.useEffect(()=>()=>l(),[l]),Ve(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)($.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),SX="SelectSeparator",XB=Q.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,fe.jsx)($.div,{"aria-hidden":!0,...o,ref:t})});XB.displayName=SX;var RI="SelectArrow",bX=Q.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=kx(r),a=as(RI,r),i=is(RI,r);return a.open&&i.position==="popper"?(0,fe.jsx)(Ki,{...n,...o,ref:t}):null});bX.displayName=RI;var RX="SelectBubbleInput",YB=Q.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=Q.useRef(null),a=de(o,n),i=cc(t);return Q.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,fe.jsx)($.select,{...r,style:{...yI,...r.style},ref:a,defaultValue:t})});YB.displayName=RX;function QB(e){return e===""||e===void 0}function ZB(e){let t=nt(e),r=Q.useRef(""),o=Q.useRef(0),n=Q.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=Q.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return Q.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function JB(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=IX(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 IX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var eH=IB,PI=PB,tH=kB,rH=MB,oH=EB,TI=AB,nH=FB,aH=VB,kI=HB,MI=zB,iH=GB,sH=qB,EI=jB,AI=$B,DI=XB;var je=R(D()),Tl=eH;Tl.displayName="Select";var lH=aH,Tc=tH,kl=ss.forwardRef(({className:e,children:t,variant:r="standard",size:o="md",error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,je.jsxs)(PI,{ref:c,className:L("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-800/80 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 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",r==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent dark:text-gray-200 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",r==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20",r==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 dark:text-gray-200 dark:bg-transparent 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",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,je.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,je.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)(Ot,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,je.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,je.jsx)(rH,{asChild:!0,children:l?(0,je.jsx)("span",{className:"opacity-60",children:l}):(0,je.jsx)(zn,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));kl.displayName=PI.displayName;var Mx=ss.forwardRef(({className:e,...t},r)=>(0,je.jsx)(EI,{ref:r,className:L("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(Hd,{className:"h-4 w-4"})}));Mx.displayName=EI.displayName;var Ex=ss.forwardRef(({className:e,...t},r)=>(0,je.jsx)(AI,{ref:r,className:L("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(zn,{className:"h-4 w-4"})}));Ex.displayName=AI.displayName;var Ml=ss.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,je.jsx)(oH,{children:(0,je.jsxs)(TI,{ref:s,side:o,sideOffset:n,align:a,avoidCollisions:!1,className:L(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","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,je.jsx)(Mx,{}),(0,je.jsx)(nH,{className:L("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,je.jsx)(Ex,{})]})}));Ml.displayName=TI.displayName;var NI=ss.forwardRef(({className:e,...t},r)=>(0,je.jsx)(kI,{ref:r,className:L("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));NI.displayName=kI.displayName;var Sr=ss.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,je.jsxs)(MI,{ref:s,className:L("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",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,je.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,je.jsx)(sH,{children:a||(0,je.jsx)(dr,{className:"h-4 w-4"})})}),(0,je.jsx)(iH,{children:t}),n&&(0,je.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Sr.displayName=MI.displayName;var OI=ss.forwardRef(({className:e,...t},r)=>(0,je.jsx)(DI,{ref:r,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));OI.displayName=DI.displayName;var Kt=R(D()),PX=[{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"}],uH=(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}},TX=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},FI=Jp.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=PX,size:s,...l},u)=>{let[c,d]=Jp.useState(o),[f,p]=Jp.useState(t),m=i.find(v=>v.code===c)||i[0],g=v=>{let x=v.target.value.replace(/\D/g,""),w=TX(c),C=x.slice(0,w),b=uH(C,c);p(C),r?.(C,c),v.target.value=b},y=v=>{d(v),r?.(f,v)},h=uH(f,c);return(0,Kt.jsxs)("div",{className:L("relative flex gap-2",e),children:[a&&(0,Kt.jsxs)(Tl,{value:c,onValueChange:y,children:[(0,Kt.jsx)(kl,{className:"w-[120px]",children:(0,Kt.jsx)(Tc,{children:(0,Kt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Kt.jsx)("span",{children:m.flag}),(0,Kt.jsx)("span",{children:m.code})]})})}),(0,Kt.jsx)(Ml,{children:i.map(v=>(0,Kt.jsx)(Sr,{value:v.code,children:(0,Kt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Kt.jsx)("span",{children:v.flag}),(0,Kt.jsx)("span",{children:v.code}),(0,Kt.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,Kt.jsxs)("div",{className:"relative flex-1",children:[(0,Kt.jsx)(rr,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:h,onChange:g,className:L(n&&"pl-10",e),...l}),n&&(0,Kt.jsx)(rf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});FI.displayName="PhoneInput";var qo=R(E());var xo=R(D()),kX=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"}}),cH=qo.createContext({}),_I=qo.forwardRef(({className:e,value:t,onValueChange:r,disabled:o,name:n,...a},i)=>(0,xo.jsx)(cH.Provider,{value:{value:t,onValueChange:r,disabled:o,name:n},children:(0,xo.jsx)("div",{ref:i,role:"radiogroup",className:L("moonui-theme","grid gap-2",e),...a})}));_I.displayName="RadioGroup";var Ax=qo.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=qo.useContext(cH),c=qo.useId(),d=n||c,f=u.value===a,p=m=>{u.onValueChange&&u.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,xo.jsxs)("div",{className:"relative flex items-center",children:[(0,xo.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,xo.jsx)("label",{htmlFor:d,className:L(kX({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,xo.jsx)("span",{className:L("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,xo.jsx)(ks,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Ax.displayName="RadioGroupItem";var Dx=qo.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,xo.jsx)("label",{ref:a,htmlFor:t,className:L("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));Dx.displayName="RadioLabel";var VI=qo.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=qo.useId(),i=e||a;return(0,xo.jsxs)("div",{className:"flex items-center",children:[(0,xo.jsx)(Ax,{ref:n,id:i,...o}),(0,xo.jsx)(Dx,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});VI.displayName="RadioItemWithLabel";var Ka=R(D());function dH({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,Ka.jsxs)("div",{className:L("border border-input rounded-md",o),children:[(0,Ka.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,Ka.jsxs)("div",{className:"flex gap-1",children:[(0,Ka.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,Ka.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,Ka.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,Ka.jsx)("textarea",{value:e,onChange:a,placeholder:r,disabled:n,className:L("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 WI=R(E());var se=R(E(),1);var hH=R(E(),1),HX=R(Ci(),1);var or=R(E(),1);var pH=R(E(),1);function fH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function MX(...e){return t=>{let r=!1,o=e.map(n=>{let a=fH(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():fH(e[n],null)}}}}function Xa(...e){return pH.useCallback(MX(...e),e)}function gH(e){let t=or.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];mH(n)&&typeof Nx=="function"&&(n=Nx(n._payload)),or.Children.forEach(n,f=>{if(OX(f)){s=!0;let p=f,m="child"in p.props?p.props.child:p.props.children;mH(m)&&typeof Nx=="function"&&(m=Nx(m._payload)),i=AX(p,m),l.push(i?.props?.children)}else l.push(f)}),i?i=or.cloneElement(i,void 0,l):!s&&or.Children.count(n)===1&&or.isValidElement(n)&&(i=n);let u=i?NX(i):void 0,c=Xa(o,u);if(!i){if(n||n===0)throw new Error(s?BX(e):VX(e));return n}let d=DX(a,i.props??{});return i.type!==or.Fragment&&(d.ref=o?c:u),or.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var EX=Symbol.for("radix.slottable");var AX=(e,t)=>{if("child"in e.props){let r=e.props.child;return or.isValidElement(r)?or.cloneElement(r,void 0,e.props.children(r.props.children)):null}return or.isValidElement(t)?t:null};function DX(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 NX(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)}function OX(e){return or.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EX}var FX=Symbol.for("react.lazy");function mH(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===FX&&"_payload"in e&&_X(e._payload)}function _X(e){return typeof e=="object"&&e!==null&&"then"in e}var VX=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,BX=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Nx=or[" use ".trim().toString()];var vH=R(D(),1),UX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kc=UX.reduce((e,t)=>{let r=gH(`Primitive.${t}`),o=hH.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,vH.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var nr=R(E(),1);var xH=R(E(),1),em=globalThis?.document?xH.useLayoutEffect:()=>{};var wH=R(E(),1);function zX(e,t){return wH.useReducer((r,o)=>t[r][o]??r,e)}var Mc=e=>{let{present:t,children:r}=e,o=GX(t),n=typeof r=="function"?r({present:o.isPresent}):nr.Children.only(r),a=WX(o.ref,qX(n));return typeof r=="function"||o.isPresent?nr.cloneElement(n,{ref:a}):null};Mc.displayName="Presence";function GX(e){let[t,r]=nr.useState(),o=nr.useRef(null),n=nr.useRef(e),a=nr.useRef("none"),i=nr.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=zX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return nr.useEffect(()=>{l==="mounted"?(a.current=i.current??tm(o.current),i.current=void 0):a.current="none"},[l]),em(()=>{let c=o.current,d=n.current;if(d!==e){let p=a.current,m=tm(c);e?(i.current=m,u("MOUNT")):m==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,u]),em(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=m=>{let y=tm(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(u("ANIMATION_END"),!n.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=m=>{m.target===t&&(a.current=tm(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:nr.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,i.current=tm(d)}else o.current=null;r(c)},[])}}function yH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function WX(...e){let t=nr.useRef(e);return t.current=e,nr.useCallback(r=>{let o=t.current,n=!1,a=o.map(i=>{let s=yH(i,r);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<a.length;i++){let s=a[i];typeof s=="function"?s():yH(o[i],null)}}},[])}function tm(e){return e?.animationName||"none"}function qX(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 Ya=R(E(),1),CH=R(D(),1);function SH(e,t=[]){let r=[];function o(a,i){let s=Ya.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,y=Ya.useMemo(()=>m,Object.values(m));return(0,CH.jsx)(g.Provider,{value:y,children:p})};u.displayName=a+"Provider";function c(d,f,p={}){let{optional:m=!1}=p,g=f?.[e]?.[l]||s,y=Ya.useContext(g);if(y)return y;if(i!==void 0)return i;if(!m)throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=r.map(i=>Ya.createContext(i));return function(s){let l=s?.[e]||a;return Ya.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,jX(n,...t)]}function jX(...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 Ya.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Ec=R(E(),1);function ls(e){let t=Ec.useRef(e);return Ec.useEffect(()=>{t.current=e}),Ec.useMemo(()=>(...r)=>t.current?.(...r),[])}var Ox=R(E(),1),$X=R(D(),1),KX=Ox.createContext(void 0);function bH(e){let t=Ox.useContext(KX);return e||t||"ltr"}function RH(e,[t,r]){return Math.min(r,Math.max(t,e))}var r1e=!!(typeof window<"u"&&window.document&&window.document.createElement);function us(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var LH=R(E(),1),_e=R(D(),1);function XX(e,t){return LH.useReducer((r,o)=>t[r][o]??r,e)}var BI="ScrollArea",[PH,p1e]=SH(BI),[YX,jo]=PH(BI),TH=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=se.useState(null),[u,c]=se.useState(null),[d,f]=se.useState(null),[p,m]=se.useState(null),[g,y]=se.useState(null),[h,v]=se.useState(0),[x,w]=se.useState(0),[C,b]=se.useState(!1),[S,I]=se.useState(!1),T=Xa(t,l),P=bH(n);return(0,_e.jsx)(YX,{scope:r,type:o,dir:P,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:C,onScrollbarXEnabledChange:b,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:S,onScrollbarYEnabledChange:I,onCornerWidthChange:v,onCornerHeightChange:w,children:(0,_e.jsx)(kc.div,{dir:P,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":h+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});TH.displayName=BI;var kH="ScrollAreaViewport",MH=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=jo(kH,r),s=se.useRef(null),l=Xa(t,s,i.onViewportChange);return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(QX,{nonce:n}),(0,_e.jsx)(kc.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,_e.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});MH.displayName=kH;var QX=se.memo(({nonce:e})=>(0,_e.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:e}),(e,t)=>e.nonce===t.nonce),aa="ScrollAreaScrollbar",Vx=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=jo(aa,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return se.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,_e.jsx)(ZX,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,_e.jsx)(JX,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,_e.jsx)(EH,{...o,ref:t,forceMount:r}):n.type==="always"?(0,_e.jsx)(HI,{...o,ref:t,"data-state":"visible"}):null});Vx.displayName=aa;var ZX=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=jo(aa,e.__scopeScrollArea),[a,i]=se.useState(!1);return se.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,_e.jsx)(Mc,{present:r||a,children:(0,_e.jsx)(EH,{"data-state":a?"visible":"hidden",...o,ref:t})})}),JX=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=jo(aa,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Hx(()=>l("SCROLL_END"),100),[s,l]=XX("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 se.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),se.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,_e.jsx)(Mc,{present:r||s!=="hidden",children:(0,_e.jsx)(HI,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:us(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:us(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),EH=se.forwardRef((e,t)=>{let r=jo(aa,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=Hx(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return Ac(r.viewport,l),Ac(r.content,l),(0,_e.jsx)(Mc,{present:o||a,children:(0,_e.jsx)(HI,{"data-state":a?"visible":"hidden",...n,ref:t})})}),HI=se.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=jo(aa,e.__scopeScrollArea),a=se.useRef(null),i=se.useRef(0),[s,l]=se.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=OH(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 aY(f,i.current,s,p)}return r==="horizontal"?(0,_e.jsx)(eY,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=IH(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,_e.jsx)(tY,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=IH(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}),eY=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=jo(aa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=Xa(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(DH,{"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":Bx(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),_H(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:_x(i.paddingLeft),paddingEnd:_x(i.paddingRight)}})}})}),tY=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=jo(aa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=Xa(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(DH,{"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":Bx(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),_H(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:_x(i.paddingTop),paddingEnd:_x(i.paddingBottom)}})}})}),[rY,AH]=PH(aa),DH=se.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(aa,r),[m,g]=se.useState(null),y=Xa(t,g),h=se.useRef(null),v=se.useRef(""),x=p.viewport,w=o.content-o.viewport,C=ls(c),b=ls(l),S=Hx(d,10);function I(T){if(h.current){let P=T.clientX-h.current.left,M=T.clientY-h.current.top;u({x:P,y:M})}}return se.useEffect(()=>{let T=P=>{let M=P.target;m?.contains(M)&&C(P,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[x,m,w,C]),se.useEffect(b,[o,b]),Ac(m,S),Ac(p.content,S),(0,_e.jsx)(rY,{scope:r,scrollbar:m,hasThumb:n,onThumbChange:ls(a),onThumbPointerUp:ls(i),onThumbPositionChange:b,onThumbPointerDown:ls(s),children:(0,_e.jsx)(kc.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:us(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),h.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(T))}),onPointerMove:us(e.onPointerMove,I),onPointerUp:us(e.onPointerUp,T=>{let P=T.target;P.hasPointerCapture(T.pointerId)&&P.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),h.current=null})})})}),Fx="ScrollAreaThumb",UI=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=AH(Fx,e.__scopeScrollArea);return(0,_e.jsx)(Mc,{present:r||n.hasThumb,children:(0,_e.jsx)(oY,{ref:t,...o})})}),oY=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=jo(Fx,r),i=AH(Fx,r),{onThumbPositionChange:s}=i,l=Xa(t,i.onThumbChange),u=se.useRef(void 0),c=Hx(()=>{u.current&&(u.current(),u.current=void 0)},100);return se.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=iY(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,_e.jsx)(kc.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:us(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,g=d.clientY-p.top;i.onThumbPointerDown({x:m,y:g})}),onPointerUp:us(e.onPointerUp,i.onThumbPointerUp)})});UI.displayName=Fx;var zI="ScrollAreaCorner",NH=se.forwardRef((e,t)=>{let r=jo(zI,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,_e.jsx)(nY,{...e,ref:t}):null});NH.displayName=zI;var nY=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=jo(zI,r),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return Ac(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),Ac(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,_e.jsx)(kc.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 _x(e){return e?parseInt(e,10):0}function OH(e,t){let r=e/t;return isNaN(r)?0:r}function Bx(e){let t=OH(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function aY(e,t,r,o="ltr"){let n=Bx(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 FH([l,u],d)(e)}function IH(e,t,r="ltr"){let o=Bx(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=RH(e,l);return FH([0,i],[0,s])(u)}function FH(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 _H(e,t){return e>0&&e<t}var iY=(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 Hx(e,t){let r=ls(e),o=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(o.current),[]),se.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function Ac(e,t){let r=ls(t);em(()=>{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 GI=TH,VH=MH;var BH=NH;var cs=R(D()),qI=WI.forwardRef(({className:e,children:t,...r},o)=>(0,cs.jsxs)(GI,{ref:o,className:L("relative overflow-hidden",e),...r,children:[(0,cs.jsx)(VH,{className:"h-full w-full rounded-[inherit]",children:t}),(0,cs.jsx)(Ux,{}),(0,cs.jsx)(BH,{})]}));qI.displayName=GI.displayName;var Ux=WI.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,cs.jsx)(Vx,{ref:o,orientation:t,className:L("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,cs.jsx)(UI,{className:"relative flex-1 rounded-full bg-border"})}));Ux.displayName=Vx.displayName;var Pn=R(E());var rm=R(D()),HH=(e,t)=>{let r={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return r[e]||r.up},UH={duration:.5,ease:[.25,.46,.45,.94]},jI=Pn.forwardRef(({children:e,direction:t="up",delay:r=0,duration:o=.5,distance:n=50,threshold:a=.3,once:i=!0,triggerOnce:s,stagger:l=0,className:u,variants:c,animate:d=!0,style:f,id:p,viewport:m},g)=>{let y=s!==void 0?s:i,h=Pn.useMemo(()=>c||HH(t,n),[t,n,c]),v=Pn.useMemo(()=>({...UH,duration:o,delay:r+l}),[o,r,l]),x=Pn.useMemo(()=>({once:y,amount:a,...m}),[y,a,m]);return d?(0,rm.jsx)(He.div,{ref:g,initial:"hidden",whileInView:"visible",viewport:x,variants:h,transition:v,className:L(u),style:f,id:p,children:e}):(0,rm.jsx)("div",{ref:g,className:u,style:f,id:p,children:e})});jI.displayName="ScrollReveal";var $I=Pn.forwardRef(({children:e,stagger:t=.1,className:r,style:o,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Pn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,rm.jsx)(He.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:L(r),style:o,id:n,children:e})});$I.displayName="ScrollRevealContainer";var KI=Pn.forwardRef(({children:e,direction:t="up",duration:r=.5,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Pn.useMemo(()=>a||HH(t,o),[t,o,a]),c=Pn.useMemo(()=>({...UH,duration:r}),[r]);return(0,rm.jsx)(He.div,{ref:l,variants:u,transition:c,className:L(n),style:i,id:s,children:e})});KI.displayName="ScrollRevealItem";var jH=R(E());var GH=R(E(),1);var WH=R(D(),1),lY="Separator",zH="horizontal",uY=["horizontal","vertical"],qH=GH.forwardRef((e,t)=>{let{decorative:r,orientation:o=zH,...n}=e,a=cY(o)?o:zH,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,WH.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});qH.displayName=lY;function cY(e){return uY.includes(e)}var XI=qH;var KH=R(D()),$H=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"}}),yo=jH.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,KH.jsx)(XI,{ref:i,decorative:n,orientation:t||void 0,className:L($H({orientation:t,variant:r,size:o}),e),...a}));yo.displayName=XI.displayName;var et=R(E());var d3=R(E());var s3=R(E(),1);var L1e=!!(typeof window<"u"&&window.document&&window.document.createElement);function XH(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var $o=R(E(),1);var YH=R(E(),1),QH=globalThis?.document?YH.useLayoutEffect:()=>{};var zx=R(E(),1);var fY=$o[" useInsertionEffect ".trim().toString()]||QH;function ZH({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=pY({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=$o.useRef(e!==void 0);$o.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=$o.useCallback(c=>{if(s){let d=mY(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function pY({defaultProp:e,onChange:t}){let[r,o]=$o.useState(e),n=$o.useRef(r),a=$o.useRef(t);return fY(()=>{a.current=t},[t]),$o.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function mY(e){return typeof e=="function"}var M1e=Symbol("RADIX:SYNC_STATE");var n3=R(E(),1),IY=R(Ci(),1);var ar=R(E(),1);var e3=R(E(),1);function JH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gY(...e){return t=>{let r=!1,o=e.map(n=>{let a=JH(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():JH(e[n],null)}}}}function t3(...e){return e3.useCallback(gY(...e),e)}function o3(e){let t=ar.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];r3(n)&&typeof Gx=="function"&&(n=Gx(n._payload)),ar.Children.forEach(n,f=>{if(wY(f)){s=!0;let p=f,m="child"in p.props?p.props.child:p.props.children;r3(m)&&typeof Gx=="function"&&(m=Gx(m._payload)),i=vY(p,m),l.push(i?.props?.children)}else l.push(f)}),i?i=ar.cloneElement(i,void 0,l):!s&&ar.Children.count(n)===1&&ar.isValidElement(n)&&(i=n);let u=i?yY(i):void 0,c=t3(o,u);if(!i){if(n||n===0)throw new Error(s?RY(e):bY(e));return n}let d=xY(a,i.props??{});return i.type!==ar.Fragment&&(d.ref=o?c:u),ar.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var hY=Symbol.for("radix.slottable");var vY=(e,t)=>{if("child"in e.props){let r=e.props.child;return ar.isValidElement(r)?ar.cloneElement(r,void 0,e.props.children(r.props.children)):null}return ar.isValidElement(t)?t:null};function xY(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 yY(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)}function wY(e){return ar.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hY}var CY=Symbol.for("react.lazy");function r3(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===CY&&"_payload"in e&&SY(e._payload)}function SY(e){return typeof e=="object"&&e!==null&&"then"in e}var bY=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,RY=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Gx=ar[" use ".trim().toString()];var a3=R(D(),1),LY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],i3=LY.reduce((e,t)=>{let r=o3(`Primitive.${t}`),o=n3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,a3.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var l3=R(D(),1),u3="Toggle",c3=s3.forwardRef((e,t)=>{let{pressed:r,defaultPressed:o,onPressedChange:n,...a}=e,[i,s]=ZH({prop:r,onChange:n,defaultProp:o??!1,caller:u3});return(0,l3.jsx)(i3.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:XH(e.onClick,()=>{e.disabled||s(!i)})})});c3.displayName=u3;var YI=c3;var f3=R(D()),QI=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"}}),om=d3.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,f3.jsx)(YI,{ref:n,className:L("moonui-theme",QI({variant:t,size:r,className:e})),...o}));om.displayName=YI.displayName;var jx=R(E());var Re=R(E(),1);var Mt=R(D(),1),[Wx,eTe]=Oe("Tooltip",[zo]),qx=zo(),p3="TooltipProvider",TY=700,ZI="tooltip.open",[kY,eL]=Wx(p3),m3=e=>{let{__scopeTooltip:t,delayDuration:r=TY,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,i=Re.useRef(!0),s=Re.useRef(!1),l=Re.useRef(0);return Re.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,Mt.jsx)(kY,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};m3.displayName=p3;var nm="Tooltip",[MY,am]=Wx(nm),g3=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=eL(nm,e.__scopeTooltip),u=qx(t),[c,d]=Re.useState(null),f=De(),p=Re.useRef(0),m=i??l.disableHoverableContent,g=s??l.delayDuration,y=Re.useRef(!1),[h,v]=$e({prop:o,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(ZI))):l.onClose(),a?.(S)},caller:nm}),x=Re.useMemo(()=>h?y.current?"delayed-open":"instant-open":"closed",[h]),w=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,v(!0)},[v]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),b=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,v(!0),p.current=0},g)},[g,v]);return Re.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,Mt.jsx)(Va,{...u,children:(0,Mt.jsx)(MY,{scope:t,contentId:f,open:h,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?b():w()},[l.isOpenDelayedRef,b,w]),onTriggerLeave:Re.useCallback(()=>{m?C():(window.clearTimeout(p.current),p.current=0)},[C,m]),onOpen:w,onClose:C,disableHoverableContent:m,children:r})})};g3.displayName=nm;var JI="TooltipTrigger",h3=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=am(JI,r),a=eL(JI,r),i=qx(r),s=Re.useRef(null),l=de(t,s,n.onTriggerChange),u=Re.useRef(!1),c=Re.useRef(!1),d=Re.useCallback(()=>u.current=!1,[]);return Re.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,Mt.jsx)(Ba,{asChild:!0,...i,children:(0,Mt.jsx)($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:W(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:W(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:W(e.onBlur,n.onClose),onClick:W(e.onClick,n.onClose)})})});h3.displayName=JI;var tL="TooltipPortal",[EY,AY]=Wx(tL,{forceMount:void 0}),DY=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=am(tL,t);return(0,Mt.jsx)(EY,{scope:t,forceMount:r,children:(0,Mt.jsx)(lt,{present:r||a.open,children:(0,Mt.jsx)(go,{asChild:!0,container:n,children:o})})})};DY.displayName=tL;var Dc="TooltipContent",v3=Re.forwardRef((e,t)=>{let r=AY(Dc,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=am(Dc,e.__scopeTooltip);return(0,Mt.jsx)(lt,{present:o||i.open,children:i.disableHoverableContent?(0,Mt.jsx)(x3,{side:n,...a,ref:t}):(0,Mt.jsx)(NY,{side:n,...a,ref:t})})}),NY=Re.forwardRef((e,t)=>{let r=am(Dc,e.__scopeTooltip),o=eL(Dc,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=r,c=n.current,{onPointerInTransitChange:d}=o,f=Re.useCallback(()=>{s(null),d(!1)},[d]),p=Re.useCallback((m,g)=>{let y=m.currentTarget,h={x:m.clientX,y:m.clientY},v=VY(h,y.getBoundingClientRect()),x=BY(h,v),w=HY(g.getBoundingClientRect()),C=zY([...x,...w]);s(C),d(!0)},[d]);return Re.useEffect(()=>()=>f(),[f]),Re.useEffect(()=>{if(l&&c){let m=y=>p(y,c),g=y=>p(y,l);return l.addEventListener("pointerleave",m),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",g)}}},[l,c,p,f]),Re.useEffect(()=>{if(i){let m=g=>{let y=g.target,h={x:g.clientX,y:g.clientY},v=l?.contains(y)||c?.contains(y),x=!UY(h,i);v?f():x&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,c,i,u,f]),(0,Mt.jsx)(x3,{...e,ref:a})}),[OY,FY]=Wx(nm,{isInside:!1}),_Y=nP("TooltipContent"),x3=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=am(Dc,r),u=qx(r),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(ZI,c),()=>document.removeEventListener(ZI,c)),[c]),Re.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,Mt.jsx)(Vo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,Mt.jsxs)($i,{"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,Mt.jsx)(_Y,{children:o}),(0,Mt.jsx)(OY,{scope:r,isInside:!0,children:(0,Mt.jsx)(RB,{id:l.contentId,role:"tooltip",children:n||o})})]})})});v3.displayName=Dc;var y3="TooltipArrow",w3=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=qx(r);return FY(y3,r).isInside?null:(0,Mt.jsx)(Ki,{...n,...o,ref:t})});w3.displayName=y3;function VY(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 BY(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 HY(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 UY(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 zY(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),GY(t)}function GY(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 C3=m3,S3=g3,b3=h3;var rL=v3,oL=w3;var ds=R(D()),$x=C3,R3=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"}}),im=S3,sm=b3,nL=jx.forwardRef(({className:e,...t},r)=>(0,ds.jsx)(oL,{ref:r,className:L("moonui-theme","fill-current",e),...t}));nL.displayName=oL.displayName;var Nc=jx.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,ds.jsxs)(rL,{ref:i,sideOffset:n,className:L("moonui-theme",R3({variant:t,size:r}),e),...a,children:[a.children,o&&(0,ds.jsx)(nL,{})]}));Nc.displayName=rL.displayName;var I3=jx.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},m)=>(0,ds.jsxs)(im,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,ds.jsx)(sm,{asChild:!0,children:e}),(0,ds.jsx)(Nc,{ref:m,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));I3.displayName="SimpleTooltip";var G=R(D()),Ut=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,G.jsxs)(im,{children:[(0,G.jsx)(sm,{asChild:!0,children:(0,G.jsx)(om,{pressed:r,onPressedChange:()=>o(),disabled:n,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(Nc,{children:(0,G.jsx)("p",{children:t})})]}),qY=({onColorSelect:e})=>(0,G.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,G.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:r},onClick:()=>e(r)},r))}),aL=et.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,et.useState)(e),[p,m]=(0,et.useState)(!1),[g,y]=(0,et.useState)(e),[h,v]=(0,et.useState)(null),x=et.default.useRef(null),w=et.default.useRef(null),[C,b]=(0,et.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,et.useCallback)(k=>{f(k),t?.(k)},[t]),I=(0,et.useCallback)(()=>{let k=window.getSelection();return k&&k.rangeCount>0?k.getRangeAt(0):null},[]),T=(0,et.useCallback)(k=>{if(!k)return;let Z=window.getSelection();Z&&(Z.removeAllRanges(),Z.addRange(k))},[]),P=(0,et.useCallback)((k,Z)=>{if(o)return;x.current&&x.current.focus();let ae=I();if(document.execCommand(k,!1,Z)||console.warn(`Command '${k}' failed to execute`),x.current){let Y=x.current.innerHTML;S(Y)}b({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")}),x.current&&x.current.focus()},[o,I,S]),M=(0,et.useCallback)(k=>{let Z=k.currentTarget.innerHTML;S(Z)},[S]),A=(0,et.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]),F=(0,et.useCallback)(()=>{let k=prompt("Enter URL:");k&&P("createLink",k)},[P]),N=(0,et.useCallback)(()=>{let k=prompt("Enter image URL:");k&&P("insertImage",k)},[P]),H=(0,et.useCallback)(k=>{P("formatBlock",`<h${k}>`)},[P]),O=(0,et.useCallback)(k=>{let Z=window.getSelection();if(Z&&Z.rangeCount>0){let ae=Z.getRangeAt(0),_=document.createElement("span");_.style.color=k;try{ae.surroundContents(_)}catch{P("foreColor",k)}if(x.current){let Y=x.current.innerHTML;S(Y)}}},[P,S]),U=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 Z=document.createElement("div");return Z.innerHTML=k,Z.textContent||Z.innerText||""};et.default.useEffect(()=>{x.current&&d&&d!==x.current.innerHTML&&(x.current.innerHTML=d)},[d]),et.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),y(e))},[e,d]);let V=s&&(0,G.jsx)($x,{children:(0,G.jsxs)(He.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,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Ut,{icon:(0,G.jsx)(Bd,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>P("bold"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(Yd,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>P("italic"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(lf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>P("underline"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(sf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>P("strikeThrough"),disabled:o})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(Tl,{onValueChange:k=>{k.startsWith("h")?H(k.substring(1)):k==="normal"?P("formatBlock","p"):P("fontSize",k)},disabled:o,children:[(0,G.jsx)(kl,{className:"w-24 h-8",children:(0,G.jsx)(Tc,{placeholder:"Size"})}),(0,G.jsxs)(Ml,{children:[(0,G.jsx)(Sr,{value:"1",children:"Small"}),(0,G.jsx)(Sr,{value:"3",children:"Normal"}),(0,G.jsx)(Sr,{value:"5",children:"Large"}),(0,G.jsx)(Sr,{value:"7",children:"X-Large"}),(0,G.jsx)(yo,{className:"my-1"}),(0,G.jsx)(Sr,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Sr,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Sr,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Sr,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Sr,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Sr,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Ut,{icon:(0,G.jsx)(Od,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>P("justifyLeft"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(Dd,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>P("justifyCenter"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(Fd,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>P("justifyRight"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(Nd,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>P("justifyFull"),disabled:o})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Ut,{icon:(0,G.jsx)(Jd,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>P("insertUnorderedList"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(Zd,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>P("insertOrderedList"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(nf,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>P("formatBlock","blockquote"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(zd,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>P("formatBlock","pre"),disabled:o})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Ut,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>P("outdent"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>P("indent"),disabled:o})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Ut,{icon:(0,G.jsx)(Qd,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:F,disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(Es,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:o})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(ta,{children:[(0,G.jsx)(ra,{asChild:!0,children:(0,G.jsx)(Fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,G.jsx)(As,{className:"h-3 w-3"})})}),(0,G.jsx)(Sn,{className:"w-auto p-0",children:(0,G.jsx)(qY,{onColorSelect:O})})]}),(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Ut,{icon:(0,G.jsx)(uf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>P("undo"),disabled:o}),(0,G.jsx)(Ut,{icon:(0,G.jsx)(af,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>P("redo"),disabled:o})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(yo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(Ut,{icon:p?(0,G.jsx)(qr,{className:"h-3 w-3"}):(0,G.jsx)(Ms,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(g):y(d),m(!p)},disabled:o})]})]})});return(0,G.jsxs)("div",{ref:c,className:L("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:[V,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(He.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,G.jsx)("textarea",{ref:w,value:g,onChange:k=>y(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,G.jsx)(He.div,{ref:x,contentEditable:!o,suppressContentEditableWarning:!0,className:L("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:M,onKeyDown:A,"data-placeholder":r,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,G.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:r})]}),(0,G.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,G.jsx)(jY,{content:d})})]})});aL.displayName="SimpleEditor";var jY=({content:e})=>{let[t,r]=(0,et.useState)(0);return(0,et.useEffect)(()=>{r((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,G.jsxs)(G.Fragment,{children:[t," characters"]})};var lm=R(E());var Xt=R(D()),iL=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"}}),Qa=lm.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:m,onDragEnd:g,onDragStart:y,onAnimationStart:h,onAnimationEnd:v,onAnimationIteration:x,...w}=f;if(s&&l)return c?(0,Xt.jsx)(He.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:L("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,Xt.jsx)("div",{ref:p,className:L("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?He.div:"div";return(0,Xt.jsx)(C,{ref:p,className:L("moonui-theme",iL({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?eN:{},...w})});Qa.displayName="Skeleton";var Kx=lm.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,Xt.jsx)("div",{ref:u,className:L("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,Xt.jsx)(Qa,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));Kx.displayName="SkeletonText";var Xx=lm.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,Xt.jsx)(Qa,{ref:a,variant:r,animation:o,shape:"circle",className:L("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));Xx.displayName="SkeletonAvatar";var sL=lm.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Xt.jsxs)("div",{ref:s,className:L("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Xt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Xt.jsx)(Xx,{size:"2.5rem",variant:n,animation:a}),(0,Xt.jsxs)("div",{className:"flex-1",children:[(0,Xt.jsx)(Qa,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Xt.jsx)(Qa,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Xt.jsx)(Kx,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,Xt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Xt.jsx)(Qa,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Xt.jsx)(Qa,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));sL.displayName="SkeletonCard";var Oc=R(E());var L3=R(D()),lL=Oc.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=Oc.useState(0),[c,d]=Oc.useState(0),[f,p]=Oc.useState(!1),m=h=>{a||(u(h.touches[0].clientX),p(!0))},g=h=>{a||!f||d(h.touches[0].clientX)},y=()=>{if(a||!f)return;let h=c-l;Math.abs(h)>n&&(h>0&&o?o():h<0&&r&&r()),p(!1),d(0),u(0)};return(0,L3.jsx)("div",{ref:s,className:L("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:m,onTouchMove:g,onTouchEnd:y,...i,children:t})});lL.displayName="SwipeableCard";var D3=R(E());var Tn=R(E(),1);var El=R(D(),1),Yx="Switch",[$Y,kTe]=Oe(Yx),[KY,XY]=$Y(Yx),P3=Tn.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]=Tn.useState(null),m=de(t,x=>p(x)),g=Tn.useRef(!1),y=f?c||!!f.closest("form"):!0,[h,v]=$e({prop:n,defaultProp:a??!1,onChange:u,caller:Yx});return(0,El.jsxs)(KY,{scope:r,checked:h,disabled:s,children:[(0,El.jsx)($.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":E3(h),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:m,onClick:W(e.onClick,x=>{v(w=>!w),y&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),y&&(0,El.jsx)(M3,{control:f,bubbles:!g.current,name:o,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});P3.displayName=Yx;var T3="SwitchThumb",k3=Tn.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=XY(T3,r);return(0,El.jsx)($.span,{"data-state":E3(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});k3.displayName=T3;var YY="SwitchBubbleInput",M3=Tn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=Tn.useRef(null),s=de(i,a),l=cc(r),u=dc(t);return Tn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let m=new Event("click",{bubbles:o});p.call(c,r),c.dispatchEvent(m)}},[l,r,o]),(0,El.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}})});M3.displayName=YY;function E3(e){return e?"checked":"unchecked"}var uL=P3,A3=k3;var ia=R(D()),cL=D3.forwardRef(({className:e,size:t="md",variant:r="primary",loading:o,leftIcon:n,rightIcon:a,description:i,...s},l)=>(0,ia.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,ia.jsx)("span",{className:"text-muted-foreground",children:n}),(0,ia.jsxs)(uL,{className:L("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,ia.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ia.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,ia.jsx)(A3,{className:L("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,ia.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,ia.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));cL.displayName=uL.displayName;var um=R(E());var sa=R(D()),dL=um.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]=um.useState(""),[p,m]=um.useState(""),g=v=>{v.key==="Enter"||v.key===a?(v.preventDefault(),y()):v.key==="Backspace"&&d===""&&e.length>0&&h(e.length-1)},y=()=>{let v=d.trim();if(v){if(!n&&e.includes(v)){m("This tag already exists"),setTimeout(()=>m(""),2e3);return}if(r&&e.length>=r){m(`Maximum ${r} tags allowed`),setTimeout(()=>m(""),2e3);return}t([...e,v]),f(""),m("")}},h=v=>{l||t(e.filter((x,w)=>w!==v))};return(0,sa.jsxs)("div",{className:"relative",children:[(0,sa.jsxs)("div",{className:L("flex items-center 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((v,x)=>(0,sa.jsxs)(jr,{variant:o,className:"gap-1 pr-1.5",children:[(0,sa.jsx)("span",{className:"text-xs",children:v}),!l&&(0,sa.jsx)("button",{type:"button",onClick:()=>h(x),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,sa.jsx)(lo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},x)),(0,sa.jsx)("input",{ref:c,type:"text",value:d,onChange:v=>f(v.target.value),onKeyDown:g,onBlur:y,disabled:l,placeholder:e.length===0?i:"",className:L("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,sa.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});dL.displayName="TagsInput";var wo=R(E());var la=R(D()),ZY=te(["flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none dark:text-gray-200","resize-none"],{variants:{variant:{default:"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 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:shadow-inner dark:shadow-gray-950/10",outline:"border-2 border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:border-primary dark:focus-visible:border-primary/80",ghost:"border-none bg-transparent 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-2 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-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"},size:{sm:"min-h-[60px] text-xs",md:"min-h-[80px] text-sm",lg:"min-h-[120px] text-base"},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:""}},defaultVariants:{variant:"default",size:"md",isError:!1,isSuccess:!1}}),fL=wo.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,size:n,error:a,success:i,loading:s,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:d,maxLength:f,value:p,defaultValue:m,onChange:g,...y},h)=>{let v=wo.useRef(null),[x,w]=wo.useState(p||m||"");wo.useImperativeHandle(h,()=>v.current);let C=wo.useCallback(()=>{let A=v.current;if(!A||!l)return;A.style.height="auto";let F=A.scrollHeight;u&&F>u?(A.style.height=`${u}px`,A.style.overflowY="auto"):(A.style.height=`${F}px`,A.style.overflowY="hidden")},[l,u]);wo.useEffect(()=>{C()},[x,C]),wo.useEffect(()=>{p!==void 0&&w(p)},[p]);let b=A=>{w(A.target.value),g?.(A)},S=String(x).length,I=c&&(f!==void 0||S>0),T=typeof a=="string"?a:void 0,P=typeof i=="string"?i:void 0,M=T||P;return(0,la.jsxs)("div",{className:L("moonui-theme","space-y-1.5 w-full",t),children:[(0,la.jsxs)("div",{className:"relative",children:[(0,la.jsx)("textarea",{ref:v,className:L(ZY({variant:o,size:n,isError:!!a,isSuccess:!!i}),s&&"pr-10",e),disabled:d||s,value:p,defaultValue:m,onChange:b,maxLength:f,"aria-invalid":!!a||void 0,"aria-describedby":T?`${y.id||""}-error`:P?`${y.id||""}-success`:void 0,...y}),s&&(0,la.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,la.jsx)(Ot,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,la.jsxs)("div",{className:"flex items-center justify-between",children:[M&&(0,la.jsx)("p",{className:L("text-xs transition-all",T&&"text-error",P&&"text-success",r),id:T?`${y.id||""}-error`:P?`${y.id||""}-success`:void 0,children:T||P}),I&&(0,la.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[S,f!==void 0&&` / ${f}`]})]})]})});fL.displayName="Textarea";var kn=R(E());var be=R(E(),1),O3=R(Ci(),1);var ze=R(D(),1),vL="ToastProvider",[xL,JY,eQ]=Nn("Toast"),[F3,QTe]=Oe("Toast",[eQ]),[tQ,Zx]=F3(vL),_3=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=be.useState(null),[u,c]=be.useState(0),d=be.useRef(!1),f=be.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${vL}\`. Expected non-empty \`string\`.`),(0,ze.jsx)(xL.Provider,{scope:t,children:(0,ze.jsx)(tQ,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:be.useCallback(()=>c(p=>p+1),[]),onToastRemove:be.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};_3.displayName=vL;var V3="ToastViewport",rQ=["F8"],mL="toast.viewportPause",gL="toast.viewportResume",B3=be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=rQ,label:n="Notifications ({hotkey})",...a}=e,i=Zx(V3,r),s=JY(r),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;be.useEffect(()=>{let y=h=>{o.length!==0&&o.every(x=>h[x]||h.code===x)&&d.current?.focus()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[o]),be.useEffect(()=>{let y=l.current,h=d.current;if(m&&y&&h){let v=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(mL);h.dispatchEvent(b),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(gL);h.dispatchEvent(b),i.isClosePausedRef.current=!1}},w=b=>{!y.contains(b.relatedTarget)&&x()},C=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",w),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",w),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[m,i.isClosePausedRef]);let g=be.useCallback(({tabbingDirection:y})=>{let v=s().map(x=>{let w=x.ref.current,C=[w,...gQ(w)];return y==="forwards"?C:C.reverse()});return(y==="forwards"?v.reverse():v).flat()},[s]);return be.useEffect(()=>{let y=d.current;if(y){let h=v=>{let x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){let C=document.activeElement,b=v.shiftKey;if(v.target===y&&b){u.current?.focus();return}let T=g({tabbingDirection:b?"backwards":"forwards"}),P=T.findIndex(M=>M===C);pL(T.slice(P+1))?v.preventDefault():b?u.current?.focus():c.current?.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[s,g]),(0,ze.jsxs)(p2,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,ze.jsx)(hL,{ref:u,onFocusFromOutsideViewport:()=>{let y=g({tabbingDirection:"forwards"});pL(y)}}),(0,ze.jsx)(xL.Slot,{scope:r,children:(0,ze.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,ze.jsx)(hL,{ref:c,onFocusFromOutsideViewport:()=>{let y=g({tabbingDirection:"backwards"});pL(y)}})]})});B3.displayName=V3;var H3="ToastFocusProxy",hL=be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Zx(H3,r);return(0,ze.jsx)(Qp,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});hL.displayName=H3;var cm="Toast",oQ="toast.swipeStart",nQ="toast.swipeMove",aQ="toast.swipeCancel",iQ="toast.swipeEnd",U3=be.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=$e({prop:o,defaultProp:n??!0,onChange:a,caller:cm});return(0,ze.jsx)(lt,{present:r||s,children:(0,ze.jsx)(uQ,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:nt(e.onPause),onResume:nt(e.onResume),onSwipeStart:W(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(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:W(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:W(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)})})})});U3.displayName=cm;var[sQ,lQ]=F3(cm,{onClose(){}}),uQ=be.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,...m}=e,g=Zx(cm,r),[y,h]=be.useState(null),v=de(t,N=>h(N)),x=be.useRef(null),w=be.useRef(null),C=n||g.duration,b=be.useRef(0),S=be.useRef(C),I=be.useRef(0),{onToastAdd:T,onToastRemove:P}=g,M=nt(()=>{y?.contains(document.activeElement)&&g.viewport?.focus(),i()}),A=be.useCallback(N=>{!N||N===1/0||(window.clearTimeout(I.current),b.current=new Date().getTime(),I.current=window.setTimeout(M,N))},[M]);be.useEffect(()=>{let N=g.viewport;if(N){let H=()=>{A(S.current),u?.()},O=()=>{let U=new Date().getTime()-b.current;S.current=S.current-U,window.clearTimeout(I.current),l?.()};return N.addEventListener(mL,O),N.addEventListener(gL,H),()=>{N.removeEventListener(mL,O),N.removeEventListener(gL,H)}}},[g.viewport,C,l,u,A]),be.useEffect(()=>{a&&!g.isClosePausedRef.current&&A(C)},[a,C,g.isClosePausedRef,A]),be.useEffect(()=>(T(),()=>P()),[T,P]);let F=be.useMemo(()=>y?K3(y):null,[y]);return g.viewport?(0,ze.jsxs)(ze.Fragment,{children:[F&&(0,ze.jsx)(cQ,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:F}),(0,ze.jsx)(sQ,{scope:r,onClose:M,children:O3.createPortal((0,ze.jsx)(xL.ItemSlot,{scope:r,children:(0,ze.jsx)(f2,{asChild:!0,onEscapeKeyDown:W(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,ze.jsx)($.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,N=>{N.key==="Escape"&&(s?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:W(e.onPointerDown,N=>{N.button===0&&(x.current={x:N.clientX,y:N.clientY})}),onPointerMove:W(e.onPointerMove,N=>{if(!x.current)return;let H=N.clientX-x.current.x,O=N.clientY-x.current.y,U=!!w.current,V=["left","right"].includes(g.swipeDirection),k=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Z=V?k(0,H):0,ae=V?0:k(0,O),_=N.pointerType==="touch"?10:2,Y={x:Z,y:ae},re={originalEvent:N,delta:Y};U?(w.current=Y,Qx(nQ,d,re,{discrete:!1})):N3(Y,g.swipeDirection,_)?(w.current=Y,Qx(oQ,c,re,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(H)>_||Math.abs(O)>_)&&(x.current=null)}),onPointerUp:W(e.onPointerUp,N=>{let H=w.current,O=N.target;if(O.hasPointerCapture(N.pointerId)&&O.releasePointerCapture(N.pointerId),w.current=null,x.current=null,H){let U=N.currentTarget,V={originalEvent:N,delta:H};N3(H,g.swipeDirection,g.swipeThreshold)?Qx(iQ,p,V,{discrete:!0}):Qx(aQ,f,V,{discrete:!0}),U.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),cQ=e=>{let{__scopeToast:t,children:r,...o}=e,n=Zx(cm,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return pQ(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,ze.jsx)(go,{asChild:!0,children:(0,ze.jsx)(Qp,{...o,children:a&&(0,ze.jsxs)(ze.Fragment,{children:[n.label," ",r]})})})},dQ="ToastTitle",z3=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)($.div,{...o,ref:t})});z3.displayName=dQ;var fQ="ToastDescription",G3=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)($.div,{...o,ref:t})});G3.displayName=fQ;var W3="ToastAction",q3=be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,ze.jsx)($3,{altText:r,asChild:!0,children:(0,ze.jsx)(yL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${W3}\`. Expected non-empty \`string\`.`),null)});q3.displayName=W3;var j3="ToastClose",yL=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=lQ(j3,r);return(0,ze.jsx)($3,{asChild:!0,children:(0,ze.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,n.onClose)})})});yL.displayName=j3;var $3=be.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,ze.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function K3(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),mQ(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(...K3(o))}}),t}function Qx(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?cu(n,a):n.dispatchEvent(a)}var N3=(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 pQ(e=()=>{}){let t=nt(e);Ve(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function mQ(e){return e.nodeType===e.ELEMENT_NODE}function gQ(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 pL(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var X3=_3,wL=B3,CL=U3,SL=z3,bL=G3,RL=q3,IL=yL;var br=R(D()),PL=X3,ty=kn.forwardRef(({className:e,...t},r)=>(0,br.jsx)(wL,{ref:r,className:L("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}));ty.displayName=wL.displayName;var vQ=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"}}),ry=kn.forwardRef(({className:e,variant:t,...r},o)=>(0,br.jsx)(CL,{ref:o,className:L("moonui-theme",vQ({variant:t}),e),...r}));ry.displayName=CL.displayName;var TL=kn.forwardRef(({className:e,...t},r)=>(0,br.jsx)(RL,{ref:r,className:L("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}));TL.displayName=RL.displayName;var oy=kn.forwardRef(({className:e,...t},r)=>(0,br.jsx)(IL,{ref:r,className:L("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,br.jsx)(lo,{className:"h-4 w-4"})}));oy.displayName=IL.displayName;var ny=kn.forwardRef(({className:e,...t},r)=>(0,br.jsx)(SL,{ref:r,className:L("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));ny.displayName=SL.displayName;var ay=kn.forwardRef(({className:e,...t},r)=>(0,br.jsx)(bL,{ref:r,className:L("moonui-theme","text-sm opacity-90",e),...t}));ay.displayName=bL.displayName;var xQ=5,yQ=1e6,LL=new Map,Y3=e=>{if(LL.has(e))return;let t=setTimeout(()=>{LL.delete(e),dm({type:"REMOVE_TOAST",toastId:e})},yQ);LL.set(e,t)},wQ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,xQ)};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?Y3(r):e.toasts.forEach(o=>{Y3(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}},Jx=[],ey={toasts:[]},CQ=0;function dm(e){ey=wQ(ey,e),Jx.forEach(t=>{t(ey)})}function kL({...e}){let t=`toast-${Date.now()}-${++CQ}`,r=n=>dm({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>dm({type:"DISMISS_TOAST",toastId:t});return dm({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function ML(){let[e,t]=kn.useState(ey);return kn.useEffect(()=>(Jx.push(t),()=>{let r=Jx.indexOf(t);r>-1&&Jx.splice(r,1)}),[e]),{...e,toast:kL,dismiss:r=>dm({type:"DISMISS_TOAST",toastId:r})}}function Q3(){let{toasts:e}=ML();return(0,br.jsxs)(PL,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,br.jsxs)(ry,{variant:a,open:i,onOpenChange:s,...l,children:[(0,br.jsxs)("div",{className:"grid gap-1",children:[r&&(0,br.jsx)(ny,{children:r}),o&&(0,br.jsx)(ay,{children:o})]}),n,(0,br.jsx)(oy,{})]},t)}),(0,br.jsx)(ty,{})]})}
85
+ }`,RY="^\\d+$",IY="^[a-zA-Z]+$",PY="^[a-zA-Z0-9]+$";var di=b(D()),aB=ql.forwardRef(({className:e,containerClassName:t,...o},r)=>(0,di.jsx)(IR,{ref:r,containerClassName:P("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:P("disabled:cursor-not-allowed",e),...o}));aB.displayName="InputOTP";var iB=ql.forwardRef(({className:e,...t},o)=>(0,di.jsx)("div",{ref:o,className:P("flex items-center",e),...t}));iB.displayName="InputOTPGroup";var sB=Q(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),lB=ql.forwardRef(({index:e,className:t,...o},r)=>{let a=ql.useContext(RR)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,di.jsxs)("div",{ref:r,"data-active":l?"":void 0,className:P(sB({isActive:!!l}),t),...o,children:[i,s&&(0,di.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,di.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});lB.displayName="InputOTPSlot";var uB=ql.forwardRef(({className:e,...t},o)=>(0,di.jsx)("div",{ref:o,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,di.jsx)(bf,{"aria-hidden":"true"})}));uB.displayName="InputOTPSeparator";var $c=b(M());var Ce=b(D());function cB({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:n=2e3}){let[a,i]=(0,$c.useState)(!1),[s,l]=(0,$c.useState)(null),u=()=>{if(!r)return;i(!0),s&&clearTimeout(s);let d=setTimeout(()=>{i(!1)},n);l(d)},c=()=>{s&&(clearTimeout(s),l(null)),i(!1)};return(0,Ce.jsxs)("div",{className:P("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[(0,Ce.jsx)("div",{className:P("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,Ce.jsx)("div",{className:P("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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsxs)(gr,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,Ce.jsx)(_u,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,Ce.jsx)(Bu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,Ce.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,Ce.jsxs)(De,{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,Ce.jsx)(Uu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!a&&(0,Ce.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,Ce.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function LY({children:e,componentId:t,componentName:o,className:r,fallback:n,requireCLI:a=!0}){let[i,s]=(0,$c.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,$c.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 m=await p.json();s({isAuthenticated:!0,deviceValid:m.valid,hasProAccess:m.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,Ce.jsx)("div",{className:P("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Ce.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,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(gr,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Bu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,Ce.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,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(gr,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(Uu,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,Ce.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,Ce.jsx)(De,{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,Ce.jsx)(cB,{componentName:o||t,className:r,children:n||e})}return(0,Ce.jsx)("div",{className:r,children:e})}function TY({className:e}){return(0,Ce.jsxs)(gr,{variant:"secondary",className:P("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,Ce.jsx)(_u,{className:"w-3 h-3 mr-1"}),"PRO"]})}function kY({className:e}){return(0,Ce.jsx)(gr,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var dB=b(M());var Xt=b(D());function PR({className:e,variant:t="default",showText:o=!0,...r}){let n=dB.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Xt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Xt.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:[(0,Xt.jsxs)("defs",{children:[t==="gradient"&&(0,Xt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Xt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Xt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Xt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Xt.jsxs)("mask",{id:i,children:[(0,Xt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Xt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Xt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),o&&(0,Xt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Xt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Xt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function NTe({className:e,variant:t="default",...o}){return(0,Xt.jsx)(PR,{showText:!1,className:e,variant:t,...o})}function OTe({className:e,variant:t="default",showText:o=!0,...r}){return(0,Xt.jsx)(PR,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}var LR=b(M());var Bo=b(D()),fB=({className:e,...t})=>(0,Bo.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});fB.displayName="Pagination";var pB=LR.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("ul",{ref:o,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));pB.displayName="PaginationContent";var mB=LR.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("li",{ref:o,className:P("moonui-theme","",e),...t}));mB.displayName="PaginationItem";var Xx=({className:e,isActive:t,size:o="icon",...r})=>(0,Bo.jsx)("a",{"aria-current":t?"page":void 0,className:P(yh({variant:t?"outline":"ghost",size:o}),e),...r});Xx.displayName="PaginationLink";var gB=({className:e,...t})=>(0,Bo.jsxs)(Xx,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Bo.jsx)(wn,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Previous"})]});gB.displayName="PaginationPrevious";var hB=({className:e,...t})=>(0,Bo.jsxs)(Xx,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Bo.jsx)("span",{children:"Next"}),(0,Bo.jsx)(Ao,{className:"h-4 w-4"})]});hB.displayName="PaginationNext";var vB=({className:e,...t})=>(0,Bo.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(aa,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More pages"})]});vB.displayName="PaginationEllipsis";var bm=b(M());var Ps=b(M());var Z=b(M(),1),OR=b(Da(),1);function TR(e,[t,o]){return Math.min(o,Math.max(t,e))}var xB=b(M(),1);var yB=b(D(),1),kR=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",wm=xB.forwardRef((e,t)=>(0,yB.jsx)($.span,{...e,ref:t,style:{...kR,...e.style}}));wm.displayName=MY;var wB=wm;var fe=b(D(),1),AY=[" ","Enter","ArrowUp","ArrowDown"],DY=[" ","Enter"],$l="Select",[Qx,Zx,NY]=Yn($l),[Kc,dke]=Oe($l,[NY,$r]),Jx=$r(),[OY,Rs]=Kc($l),[FY,_Y]=Kc($l),CB=e=>{let{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:m}=e,g=Jx(t),[x,v]=Z.useState(null),[h,y]=Z.useState(null),[w,C]=Z.useState(!1),S=ra(u),[R,I]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:$l}),[T,L]=qe({prop:i,defaultProp:s,onChange:l,caller:$l}),k=Z.useRef(null),A=x?m||!!x.closest("form"):!0,[F,N]=Z.useState(new Set),U=Array.from(F).map(O=>O.props.value).join(";");return(0,fe.jsx)(Ja,{...g,children:(0,fe.jsxs)(OY,{required:p,scope:t,trigger:x,onTriggerChange:v,valueNode:h,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ae(),value:T,onValueChange:L,open:R,onOpenChange:I,dir:S,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(Qx.Provider,{scope:t,children:(0,fe.jsx)(FY,{scope:e.__scopeSelect,onNativeOptionAdd:Z.useCallback(O=>{N(_=>new Set(_).add(O))},[]),onNativeOptionRemove:Z.useCallback(O=>{N(_=>{let B=new Set(_);return B.delete(O),B})},[]),children:o})}),A?(0,fe.jsxs)(qB,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:O=>L(O.target.value),disabled:f,form:m,children:[T===void 0?(0,fe.jsx)("option",{value:""}):null,Array.from(F)]},U):null]})})};CB.displayName=$l;var SB="SelectTrigger",bB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...n}=e,a=Jx(o),i=Rs(SB,o),s=i.disabled||r,l=de(t,i.onTriggerChange),u=Zx(o),c=Z.useRef("touch"),[d,f,p]=KB(g=>{let x=u().filter(y=>!y.disabled),v=x.find(y=>y.value===i.value),h=XB(x,g,v);h!==void 0&&i.onValueChange(h.value)}),m=g=>{s||(i.onOpenChange(!0),p()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return(0,fe.jsx)(ei,{asChild:!0,...a,children:(0,fe.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":$B(i.value)?"":void 0,...n,ref:l,onClick:W(n.onClick,g=>{g.currentTarget.focus(),c.current!=="mouse"&&m(g)}),onPointerDown:W(n.onPointerDown,g=>{c.current=g.pointerType;let x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(m(g),g.preventDefault())}),onKeyDown:W(n.onKeyDown,g=>{let x=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(x&&g.key===" ")&&AY.includes(g.key)&&(m(),g.preventDefault())})})})});bB.displayName=SB;var RB="SelectValue",IB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:n,children:a,placeholder:i="",...s}=e,l=Rs(RB,o),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return _e(()=>{u(c)},[u,c]),(0,fe.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:$B(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});IB.displayName=RB;var VY="SelectIcon",PB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,children:r,...n}=e;return(0,fe.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:r||"\u25BC"})});PB.displayName=VY;var BY="SelectPortal",LB=e=>(0,fe.jsx)(Cr,{asChild:!0,...e});LB.displayName=BY;var Kl="SelectContent",TB=Z.forwardRef((e,t)=>{let o=Rs(Kl,e.__scopeSelect),[r,n]=Z.useState();if(_e(()=>{n(new DocumentFragment)},[]),!o.open){let a=r;return a?OR.createPortal((0,fe.jsx)(kB,{scope:e.__scopeSelect,children:(0,fe.jsx)(Qx.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(MB,{...e,ref:t})});TB.displayName=Kl;var Hn=10,[kB,Is]=Kc(Kl),HY="SelectContentImpl",UY=sr("SelectContent.RemoveScroll"),MB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x,...v}=e,h=Rs(Kl,o),[y,w]=Z.useState(null),[C,S]=Z.useState(null),R=de(t,z=>w(z)),[I,T]=Z.useState(null),[L,k]=Z.useState(null),A=Zx(o),[F,N]=Z.useState(!1),U=Z.useRef(!1);Z.useEffect(()=>{if(y)return ms(y)},[y]),us();let O=Z.useCallback(z=>{let[ne,...he]=A().map(K=>K.ref.current),[xe]=he.slice(-1),pe=document.activeElement;for(let K of z)if(K===pe||(K?.scrollIntoView({block:"nearest"}),K===ne&&C&&(C.scrollTop=0),K===xe&&C&&(C.scrollTop=C.scrollHeight),K?.focus(),document.activeElement!==pe))return},[A,C]),_=Z.useCallback(()=>O([I,y]),[O,I,y]);Z.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:B,triggerPointerDownPosRef:E}=h;Z.useEffect(()=>{if(y){let z={x:0,y:0},ne=xe=>{z={x:Math.abs(Math.round(xe.pageX)-(E.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(E.current?.y??0))}},he=xe=>{z.x<=10&&z.y<=10?xe.preventDefault():y.contains(xe.target)||B(!1),document.removeEventListener("pointermove",ne),E.current=null};return E.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",he,{capture:!0})}}},[y,B,E]),Z.useEffect(()=>{let z=()=>B(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[B]);let[J,ae]=KB(z=>{let ne=A().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=XB(ne,z,he);xe&&setTimeout(()=>xe.ref.current.focus())}),V=Z.useCallback((z,ne,he)=>{let xe=!U.current&&!he;(h.value!==void 0&&h.value===ne||xe)&&(T(z),xe&&(U.current=!0))},[h.value]),Y=Z.useCallback(()=>y?.focus(),[y]),oe=Z.useCallback((z,ne,he)=>{let xe=!U.current&&!he;(h.value!==void 0&&h.value===ne||xe)&&k(z)},[h.value]),X=r==="popper"?MR:EB,ce=X===MR?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x}:{};return(0,fe.jsx)(kB,{scope:o,content:y,viewport:C,onViewportChange:S,itemRefCallback:V,selectedItem:I,onItemLeave:Y,itemTextRefCallback:oe,focusSelectedItem:_,selectedItemText:L,position:r,isPositioned:F,searchRef:J,children:(0,fe.jsx)(ti,{as:UY,allowPinchZoom:!0,children:(0,fe.jsx)(Qa,{asChild:!0,trapped:h.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:W(n,z=>{h.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:(0,fe.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:(0,fe.jsx)(X,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:z=>z.preventDefault(),...v,...ce,onPlaced:()=>N(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:W(v.onKeyDown,z=>{let ne=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!ne&&z.key.length===1&&ae(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let xe=A().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(z.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){let pe=z.target,K=xe.indexOf(pe);xe=xe.slice(K+1)}setTimeout(()=>O(xe)),z.preventDefault()}})})})})})})});MB.displayName=HY;var zY="SelectItemAlignedPosition",EB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,onPlaced:r,...n}=e,a=Rs(Kl,o),i=Is(Kl,o),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,R=>c(R)),f=Zx(o),p=Z.useRef(!1),m=Z.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:v,focusSelectedItem:h}=i,y=Z.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&x&&v){let R=a.trigger.getBoundingClientRect(),I=u.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),L=v.getBoundingClientRect();if(a.dir!=="rtl"){let pe=L.left-I.left,K=T.left-pe,Ie=R.left-K,ee=R.width+Ie,ie=Math.max(ee,I.width),ze=window.innerWidth-Hn,Ke=TR(K,[Hn,Math.max(Hn,ze-ie)]);s.style.minWidth=ee+"px",s.style.left=Ke+"px"}else{let pe=I.right-L.right,K=window.innerWidth-T.right-pe,Ie=window.innerWidth-R.right-K,ee=R.width+Ie,ie=Math.max(ee,I.width),ze=window.innerWidth-Hn,Ke=TR(K,[Hn,Math.max(Hn,ze-ie)]);s.style.minWidth=ee+"px",s.style.right=Ke+"px"}let k=f(),A=window.innerHeight-Hn*2,F=g.scrollHeight,N=window.getComputedStyle(u),U=parseInt(N.borderTopWidth,10),O=parseInt(N.paddingTop,10),_=parseInt(N.borderBottomWidth,10),B=parseInt(N.paddingBottom,10),E=U+O+F+B+_,J=Math.min(x.offsetHeight*5,E),ae=window.getComputedStyle(g),V=parseInt(ae.paddingTop,10),Y=parseInt(ae.paddingBottom,10),oe=R.top+R.height/2-Hn,X=A-oe,ce=x.offsetHeight/2,z=x.offsetTop+ce,ne=U+O+z,he=E-ne;if(ne<=oe){let pe=k.length>0&&x===k[k.length-1].ref.current;s.style.bottom="0px";let K=u.clientHeight-g.offsetTop-g.offsetHeight,Ie=Math.max(X,ce+(pe?Y:0)+K+_),ee=ne+Ie;s.style.height=ee+"px"}else{let pe=k.length>0&&x===k[0].ref.current;s.style.top="0px";let Ie=Math.max(oe,U+g.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",g.scrollTop=ne-oe+g.offsetTop}s.style.margin=`${Hn}px 0`,s.style.minHeight=J+"px",s.style.maxHeight=A+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,x,v,a.dir,r]);_e(()=>y(),[y]);let[w,C]=Z.useState();_e(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let S=Z.useCallback(R=>{R&&m.current===!0&&(y(),h?.(),m.current=!1)},[y,h]);return(0,fe.jsx)(WY,{scope:o,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,fe.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,fe.jsx)($.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});EB.displayName=zY;var GY="SelectPopperPosition",MR=Z.forwardRef((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:n=Hn,...a}=e,i=Jx(o);return(0,fe.jsx)(fs,{...i,...a,ref:t,align:r,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)"}})});MR.displayName=GY;var[WY,FR]=Kc(Kl,{}),ER="SelectViewport",AB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,nonce:r,...n}=e,a=Is(ER,o),i=FR(ER,o),s=de(t,a.onViewportChange),l=Z.useRef(0);return(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.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,fe.jsx)(Qx.Slot,{scope:o,children:(0,fe.jsx)($.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:W(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 m=window.innerHeight-Hn*2,g=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),v=Math.max(g,x);if(v<m){let h=v+p,y=Math.min(m,h),w=h-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})})})]})});AB.displayName=ER;var DB="SelectGroup",[jY,qY]=Kc(DB),NB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=Ae();return(0,fe.jsx)(jY,{scope:o,id:n,children:(0,fe.jsx)($.div,{role:"group","aria-labelledby":n,...r,ref:t})})});NB.displayName=DB;var OB="SelectLabel",FB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=qY(OB,o);return(0,fe.jsx)($.div,{id:n.id,...r,ref:t})});FB.displayName=OB;var Yx="SelectItem",[$Y,_B]=Kc(Yx),VB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...i}=e,s=Rs(Yx,o),l=Is(Yx,o),u=s.value===r,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),m=de(t,h=>l.itemRefCallback?.(h,r,n)),g=Ae(),x=Z.useRef("touch"),v=()=>{n||(s.onValueChange(r),s.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,fe.jsx)($Y,{scope:o,value:r,disabled:n,textId:g,isSelected:u,onItemTextChange:Z.useCallback(h=>{d(y=>y||(h?.textContent??"").trim())},[]),children:(0,fe.jsx)(Qx.ItemSlot,{scope:o,value:r,disabled:n,textValue:c,children:(0,fe.jsx)($.div,{role:"option","aria-labelledby":g,"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:m,onFocus:W(i.onFocus,()=>p(!0)),onBlur:W(i.onBlur,()=>p(!1)),onClick:W(i.onClick,()=>{x.current!=="mouse"&&v()}),onPointerUp:W(i.onPointerUp,()=>{x.current==="mouse"&&v()}),onPointerDown:W(i.onPointerDown,h=>{x.current=h.pointerType}),onPointerMove:W(i.onPointerMove,h=>{x.current=h.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,h=>{h.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(i.onKeyDown,h=>{l.searchRef?.current!==""&&h.key===" "||(DY.includes(h.key)&&v(),h.key===" "&&h.preventDefault())})})})})});VB.displayName=Yx;var Cm="SelectItemText",BB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:n,...a}=e,i=Rs(Cm,o),s=Is(Cm,o),l=_B(Cm,o),u=_Y(Cm,o),[c,d]=Z.useState(null),f=de(t,v=>d(v),l.onItemTextChange,v=>s.itemTextRefCallback?.(v,l.value,l.disabled)),p=c?.textContent,m=Z.useMemo(()=>(0,fe.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=u;return _e(()=>(g(m),()=>x(m)),[g,x,m]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)($.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?OR.createPortal(a.children,i.valueNode):null]})});BB.displayName=Cm;var HB="SelectItemIndicator",UB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return _B(HB,o).isSelected?(0,fe.jsx)($.span,{"aria-hidden":!0,...r,ref:t}):null});UB.displayName=HB;var AR="SelectScrollUpButton",zB=Z.forwardRef((e,t)=>{let o=Is(AR,e.__scopeSelect),r=FR(AR,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,r.onScrollButtonChange);return _e(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),n?(0,fe.jsx)(WB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=o;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});zB.displayName=AR;var DR="SelectScrollDownButton",GB=Z.forwardRef((e,t)=>{let o=Is(DR,e.__scopeSelect),r=FR(DR,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,r.onScrollButtonChange);return _e(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),n?(0,fe.jsx)(WB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=o;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});GB.displayName=DR;var WB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...n}=e,a=Is("SelectScrollButton",o),i=Z.useRef(null),s=Zx(o),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),_e(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)($.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),KY="SelectSeparator",jB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return(0,fe.jsx)($.div,{"aria-hidden":!0,...r,ref:t})});jB.displayName=KY;var NR="SelectArrow",XY=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=Jx(o),a=Rs(NR,o),i=Is(NR,o);return a.open&&i.position==="popper"?(0,fe.jsx)(ps,{...n,...r,ref:t}):null});XY.displayName=NR;var YY="SelectBubbleInput",qB=Z.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{let n=Z.useRef(null),a=de(r,n),i=Mc(t);return Z.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,fe.jsx)($.select,{...o,style:{...kR,...o.style},ref:a,defaultValue:t})});qB.displayName=YY;function $B(e){return e===""||e===void 0}function KB(e){let t=rt(e),o=Z.useRef(""),r=Z.useRef(0),n=Z.useCallback(i=>{let s=o.current+i;t(s),function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Z.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function XB(e,t,o){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1,i=QY(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==o));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function QY(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var YB=CB,_R=bB,QB=IB,ZB=PB,JB=LB,VR=TB,eH=AB,tH=NB,BR=FB,HR=VB,oH=BB,rH=UB,UR=zB,zR=GB,GR=jB;var je=b(D()),Xc=YB;Xc.displayName="Select";var JY=tH,Sm=QB,Yc=Ps.forwardRef(({className:e,children:t,variant:o="standard",size:r="md",error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,je.jsxs)(_R,{ref:c,className:P("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",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-800/80 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 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",o==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent dark:text-gray-200 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",o==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20",o==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 dark:text-gray-200 dark:bg-transparent 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",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,je.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,je.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)(_t,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,je.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,je.jsx)(ZB,{asChild:!0,children:l?(0,je.jsx)("span",{className:"opacity-60",children:l}):(0,je.jsx)(na,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Yc.displayName=_R.displayName;var WR=Ps.forwardRef(({className:e,...t},o)=>(0,je.jsx)(UR,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(xf,{className:"h-4 w-4"})}));WR.displayName=UR.displayName;var jR=Ps.forwardRef(({className:e,...t},o)=>(0,je.jsx)(zR,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(na,{className:"h-4 w-4"})}));jR.displayName=zR.displayName;var Qc=Ps.forwardRef(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,je.jsx)(JB,{children:(0,je.jsxs)(VR,{ref:s,side:r,sideOffset:n,align:a,avoidCollisions:!1,className:P(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","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,...i,children:[(0,je.jsx)(WR,{}),(0,je.jsx)(eH,{className:P("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,je.jsx)(jR,{})]})}));Qc.displayName=VR.displayName;var nH=Ps.forwardRef(({className:e,...t},o)=>(0,je.jsx)(BR,{ref:o,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));nH.displayName=BR.displayName;var Ho=Ps.forwardRef(({className:e,children:t,variant:o="default",size:r="md",rightIcon:n,customIndicator:a,...i},s)=>(0,je.jsxs)(HR,{ref:s,className:P("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",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),...i,children:[(0,je.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,je.jsx)(rH,{children:a||(0,je.jsx)(go,{className:"h-4 w-4"})})}),(0,je.jsx)(oH,{children:t}),n&&(0,je.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Ho.displayName=HR.displayName;var aH=Ps.forwardRef(({className:e,...t},o)=>(0,je.jsx)(GR,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));aH.displayName=GR.displayName;var Yt=b(D()),eQ=[{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"}],iH=(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 n=0;n<o.length;n++)n>0&&n%3===0&&(r+=" "),r+=o[n];return r}},tQ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},sH=bm.forwardRef(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=eQ,size:s,...l},u)=>{let[c,d]=bm.useState(r),[f,p]=bm.useState(t),m=i.find(h=>h.code===c)||i[0],g=h=>{let y=h.target.value.replace(/\D/g,""),w=tQ(c),C=y.slice(0,w),S=iH(C,c);p(C),o?.(C,c),h.target.value=S},x=h=>{d(h),o?.(f,h)},v=iH(f,c);return(0,Yt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Yt.jsxs)(Xc,{value:c,onValueChange:x,children:[(0,Yt.jsx)(Yc,{className:"w-[120px]",children:(0,Yt.jsx)(Sm,{children:(0,Yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Yt.jsx)("span",{children:m.flag}),(0,Yt.jsx)("span",{children:m.code})]})})}),(0,Yt.jsx)(Qc,{children:i.map(h=>(0,Yt.jsx)(Ho,{value:h.code,children:(0,Yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Yt.jsx)("span",{children:h.flag}),(0,Yt.jsx)("span",{children:h.code}),(0,Yt.jsx)("span",{className:"text-muted-foreground",children:h.name})]})},h.code))})]}),(0,Yt.jsxs)("div",{className:"relative flex-1",children:[(0,Yt.jsx)(Co,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:g,className:P(n&&"pl-10",e),...l}),n&&(0,Yt.jsx)(Nf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});sH.displayName="PhoneInput";var Yr=b(M());var Rr=b(D()),oQ=Q("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"}}),lH=Yr.createContext({}),uH=Yr.forwardRef(({className:e,value:t,onValueChange:o,disabled:r,name:n,...a},i)=>(0,Rr.jsx)(lH.Provider,{value:{value:t,onValueChange:o,disabled:r,name:n},children:(0,Rr.jsx)("div",{ref:i,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...a})}));uH.displayName="RadioGroup";var qR=Yr.forwardRef(({className:e,variant:t,size:o,indicator:r,id:n,value:a,disabled:i,...s},l)=>{let u=Yr.useContext(lH),c=Yr.useId(),d=n||c,f=u.value===a,p=m=>{u.onValueChange&&u.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,Rr.jsxs)("div",{className:"relative flex items-center",children:[(0,Rr.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,Rr.jsx)("label",{htmlFor:d,className:P(oQ({variant:t,size:o}),"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,Rr.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(r||(0,Rr.jsx)(el,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});qR.displayName="RadioGroupItem";var $R=Yr.forwardRef(({className:e,htmlFor:t,children:o,disabled:r=!1,...n},a)=>(0,Rr.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...n,children:o}));$R.displayName="RadioLabel";var cH=Yr.forwardRef(({id:e,label:t,labelClassName:o,...r},n)=>{let a=Yr.useId(),i=e||a;return(0,Rr.jsxs)("div",{className:"flex items-center",children:[(0,Rr.jsx)(qR,{ref:n,id:i,...r}),(0,Rr.jsx)($R,{htmlFor:i,disabled:r.disabled,className:o,children:t})]})});cH.displayName="RadioItemWithLabel";var fi=b(D());function rQ({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,fi.jsxs)("div",{className:P("border border-input rounded-md",r),children:[(0,fi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,fi.jsxs)("div",{className:"flex gap-1",children:[(0,fi.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,fi.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,fi.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,fi.jsx)("textarea",{value:e,onChange:a,placeholder:o,disabled:n,className:P("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 JR=b(M());var se=b(M(),1);var gH=b(M(),1),mQ=b(Da(),1);var so=b(M(),1);var fH=b(M(),1);function dH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nQ(...e){return t=>{let o=!1,r=e.map(n=>{let a=dH(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():dH(e[n],null)}}}}function pi(...e){return fH.useCallback(nQ(...e),e)}function mH(e){let t=so.forwardRef((o,r)=>{let{children:n,...a}=o,i=null,s=!1,l=[];pH(n)&&typeof ey=="function"&&(n=ey(n._payload)),so.Children.forEach(n,f=>{if(uQ(f)){s=!0;let p=f,m="child"in p.props?p.props.child:p.props.children;pH(m)&&typeof ey=="function"&&(m=ey(m._payload)),i=iQ(p,m),l.push(i?.props?.children)}else l.push(f)}),i?i=so.cloneElement(i,void 0,l):!s&&so.Children.count(n)===1&&so.isValidElement(n)&&(i=n);let u=i?lQ(i):void 0,c=pi(r,u);if(!i){if(n||n===0)throw new Error(s?pQ(e):fQ(e));return n}let d=sQ(a,i.props??{});return i.type!==so.Fragment&&(d.ref=r?c:u),so.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var aQ=Symbol.for("radix.slottable");var iQ=(e,t)=>{if("child"in e.props){let o=e.props.child;return so.isValidElement(o)?so.cloneElement(o,void 0,e.props.children(o.props.children)):null}return so.isValidElement(t)?t:null};function sQ(e,t){let o={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function lQ(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)}function uQ(e){return so.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aQ}var cQ=Symbol.for("react.lazy");function pH(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cQ&&"_payload"in e&&dQ(e._payload)}function dQ(e){return typeof e=="object"&&e!==null&&"then"in e}var fQ=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,pQ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ey=so[" use ".trim().toString()];var hH=b(D(),1),gQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zc=gQ.reduce((e,t)=>{let o=mH(`Primitive.${t}`),r=gH.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,hH.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var lo=b(M(),1);var vH=b(M(),1),Rm=globalThis?.document?vH.useLayoutEffect:()=>{};var yH=b(M(),1);function hQ(e,t){return yH.useReducer((o,r)=>t[o][r]??o,e)}var Jc=e=>{let{present:t,children:o}=e,r=vQ(t),n=typeof o=="function"?o({present:r.isPresent}):lo.Children.only(o),a=xQ(r.ref,yQ(n));return typeof o=="function"||r.isPresent?lo.cloneElement(n,{ref:a}):null};Jc.displayName="Presence";function vQ(e){let[t,o]=lo.useState(),r=lo.useRef(null),n=lo.useRef(e),a=lo.useRef("none"),i=lo.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=hQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return lo.useEffect(()=>{l==="mounted"?(a.current=i.current??Im(r.current),i.current=void 0):a.current="none"},[l]),Rm(()=>{let c=r.current,d=n.current;if(d!==e){let p=a.current,m=Im(c);e?(i.current=m,u("MOUNT")):m==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,u]),Rm(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=m=>{let x=Im(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&x&&(u("ANIMATION_END"),!n.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(a.current=Im(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:lo.useCallback(c=>{if(c){let d=getComputedStyle(c);r.current=d,i.current=Im(d)}else r.current=null;o(c)},[])}}function xH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xQ(...e){let t=lo.useRef(e);return t.current=e,lo.useCallback(o=>{let r=t.current,n=!1,a=r.map(i=>{let s=xH(i,o);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<a.length;i++){let s=a[i];typeof s=="function"?s():xH(r[i],null)}}},[])}function Im(e){return e?.animationName||"none"}function yQ(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 mi=b(M(),1),wH=b(D(),1);function CH(e,t=[]){let o=[];function r(a,i){let s=mi.createContext(i);s.displayName=a+"Context";let l=o.length;o=[...o,i];let u=d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,x=mi.useMemo(()=>m,Object.values(m));return(0,wH.jsx)(g.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f,p={}){let{optional:m=!1}=p,g=f?.[e]?.[l]||s,x=mi.useContext(g);if(x)return x;if(i!==void 0)return i;if(!m)throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=o.map(i=>mi.createContext(i));return function(s){let l=s?.[e]||a;return mi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[r,wQ(n,...t)]}function wQ(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return mi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}var ed=b(M(),1);function Ls(e){let t=ed.useRef(e);return ed.useEffect(()=>{t.current=e}),ed.useMemo(()=>(...o)=>t.current?.(...o),[])}var ty=b(M(),1),CQ=b(D(),1),SQ=ty.createContext(void 0);function SH(e){let t=ty.useContext(SQ);return e||t||"ltr"}function bH(e,[t,o]){return Math.min(o,Math.max(t,e))}var Vke=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ts(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)}}var IH=b(M(),1),Fe=b(D(),1);function bQ(e,t){return IH.useReducer((o,r)=>t[o][r]??o,e)}var KR="ScrollArea",[PH,Xke]=CH(KR),[RQ,Qr]=PH(KR),LH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=se.useState(null),[u,c]=se.useState(null),[d,f]=se.useState(null),[p,m]=se.useState(null),[g,x]=se.useState(null),[v,h]=se.useState(0),[y,w]=se.useState(0),[C,S]=se.useState(!1),[R,I]=se.useState(!1),T=pi(t,l),L=SH(n);return(0,Fe.jsx)(RQ,{scope:o,type:r,dir:L,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:C,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:x,scrollbarYEnabled:R,onScrollbarYEnabledChange:I,onCornerWidthChange:h,onCornerHeightChange:w,children:(0,Fe.jsx)(Zc.div,{dir:L,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});LH.displayName=KR;var TH="ScrollAreaViewport",kH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:n,...a}=e,i=Qr(TH,o),s=se.useRef(null),l=pi(t,s,i.onViewportChange);return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(IQ,{nonce:n}),(0,Fe.jsx)(Zc.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Fe.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});kH.displayName=TH;var IQ=se.memo(({nonce:e})=>(0,Fe.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:e}),(e,t)=>e.nonce===t.nonce),ya="ScrollAreaScrollbar",ny=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Qr(ya,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return se.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,Fe.jsx)(PQ,{...r,ref:t,forceMount:o}):n.type==="scroll"?(0,Fe.jsx)(LQ,{...r,ref:t,forceMount:o}):n.type==="auto"?(0,Fe.jsx)(MH,{...r,ref:t,forceMount:o}):n.type==="always"?(0,Fe.jsx)(XR,{...r,ref:t,"data-state":"visible"}):null});ny.displayName=ya;var PQ=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Qr(ya,e.__scopeScrollArea),[a,i]=se.useState(!1);return se.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,Fe.jsx)(Jc,{present:o||a,children:(0,Fe.jsx)(MH,{"data-state":a?"visible":"hidden",...r,ref:t})})}),LQ=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Qr(ya,e.__scopeScrollArea),a=e.orientation==="horizontal",i=iy(()=>l("SCROLL_END"),100),[s,l]=bQ("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 se.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),se.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,Fe.jsx)(Jc,{present:o||s!=="hidden",children:(0,Fe.jsx)(XR,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ts(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Ts(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),MH=se.forwardRef((e,t)=>{let o=Qr(ya,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=iy(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;i(s?u:c)}},10);return td(o.viewport,l),td(o.content,l),(0,Fe.jsx)(Jc,{present:r||a,children:(0,Fe.jsx)(XR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),XR=se.forwardRef((e,t)=>{let{orientation:o="vertical",...r}=e,n=Qr(ya,e.__scopeScrollArea),a=se.useRef(null),i=se.useRef(0),[s,l]=se.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=NH(s.viewport,s.content),c={...r,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 DQ(f,i.current,s,p)}return o==="horizontal"?(0,Fe.jsx)(TQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=RH(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))}}):o==="vertical"?(0,Fe.jsx)(kQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=RH(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}),TQ=se.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...n}=e,a=Qr(ya,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=pi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Fe.jsx)(AH,{"data-orientation":"horizontal",...n,ref:u,sizes:o,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":ay(o)+"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),FH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ry(i.paddingLeft),paddingEnd:ry(i.paddingRight)}})}})}),kQ=se.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...n}=e,a=Qr(ya,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=pi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Fe.jsx)(AH,{"data-orientation":"vertical",...n,ref:u,sizes:o,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":ay(o)+"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),FH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ry(i.paddingTop),paddingEnd:ry(i.paddingBottom)}})}})}),[MQ,EH]=PH(ya),AH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=Qr(ya,o),[m,g]=se.useState(null),x=pi(t,g),v=se.useRef(null),h=se.useRef(""),y=p.viewport,w=r.content-r.viewport,C=Ls(c),S=Ls(l),R=iy(d,10);function I(T){if(v.current){let L=T.clientX-v.current.left,k=T.clientY-v.current.top;u({x:L,y:k})}}return se.useEffect(()=>{let T=L=>{let k=L.target;m?.contains(k)&&C(L,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[y,m,w,C]),se.useEffect(S,[r,S]),td(m,R),td(p.content,R),(0,Fe.jsx)(MQ,{scope:o,scrollbar:m,hasThumb:n,onThumbChange:Ls(a),onThumbPointerUp:Ls(i),onThumbPositionChange:S,onThumbPointerDown:Ls(s),children:(0,Fe.jsx)(Zc.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Ts(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=m.getBoundingClientRect(),h.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(T))}),onPointerMove:Ts(e.onPointerMove,I),onPointerUp:Ts(e.onPointerUp,T=>{let L=T.target;L.hasPointerCapture(T.pointerId)&&L.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=h.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),oy="ScrollAreaThumb",YR=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=EH(oy,e.__scopeScrollArea);return(0,Fe.jsx)(Jc,{present:o||n.hasThumb,children:(0,Fe.jsx)(EQ,{ref:t,...r})})}),EQ=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,style:r,...n}=e,a=Qr(oy,o),i=EH(oy,o),{onThumbPositionChange:s}=i,l=pi(t,i.onThumbChange),u=se.useRef(void 0),c=iy(()=>{u.current&&(u.current(),u.current=void 0)},100);return se.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=NQ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,Fe.jsx)(Zc.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)",...r},onPointerDownCapture:Ts(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,g=d.clientY-p.top;i.onThumbPointerDown({x:m,y:g})}),onPointerUp:Ts(e.onPointerUp,i.onThumbPointerUp)})});YR.displayName=oy;var QR="ScrollAreaCorner",DH=se.forwardRef((e,t)=>{let o=Qr(QR,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?(0,Fe.jsx)(AQ,{...e,ref:t}):null});DH.displayName=QR;var AQ=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,...r}=e,n=Qr(QR,o),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return td(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),td(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,Fe.jsx)(Zc.div,{...r,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 ry(e){return e?parseInt(e,10):0}function NH(e,t){let o=e/t;return isNaN(o)?0:o}function ay(e){let t=NH(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function DQ(e,t,o,r="ltr"){let n=ay(o),a=n/2,i=t||a,s=n-i,l=o.scrollbar.paddingStart+i,u=o.scrollbar.size-o.scrollbar.paddingEnd-s,c=o.content-o.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return OH([l,u],d)(e)}function RH(e,t,o="ltr"){let r=ay(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-r,l=o==="ltr"?[0,i]:[i*-1,0],u=bH(e,l);return OH([0,i],[0,s])(u)}function OH(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 FH(e,t){return e>0&&e<t}var NQ=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=o.left!==a.left,s=o.top!==a.top;(i||s)&&t(),o=a,r=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(r)};function iy(e,t){let o=Ls(e),r=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(r.current),[]),se.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function td(e,t){let o=Ls(t);Rm(()=>{let r=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var ZR=LH,_H=kH;var VH=DH;var ks=b(D()),BH=JR.forwardRef(({className:e,children:t,...o},r)=>(0,ks.jsxs)(ZR,{ref:r,className:P("relative overflow-hidden",e),...o,children:[(0,ks.jsx)(_H,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ks.jsx)(eI,{}),(0,ks.jsx)(VH,{})]}));BH.displayName=ZR.displayName;var eI=JR.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,ks.jsx)(ny,{ref:r,orientation:t,className:P("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,ks.jsx)(YR,{className:"relative flex-1 rounded-full bg-border"})}));eI.displayName=ny.displayName;var Un=b(M());var Pm=b(D()),HH=(e,t)=>{let o={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return o[e]||o.up},UH={duration:.5,ease:[.25,.46,.45,.94]},zH=Un.forwardRef(({children:e,direction:t="up",delay:o=0,duration:r=.5,distance:n=50,threshold:a=.3,once:i=!0,triggerOnce:s,stagger:l=0,className:u,variants:c,animate:d=!0,style:f,id:p,viewport:m},g)=>{let x=s!==void 0?s:i,v=Un.useMemo(()=>c||HH(t,n),[t,n,c]),h=Un.useMemo(()=>({...UH,duration:r,delay:o+l}),[r,o,l]),y=Un.useMemo(()=>({once:x,amount:a,...m}),[x,a,m]);return d?(0,Pm.jsx)(Be.div,{ref:g,initial:"hidden",whileInView:"visible",viewport:y,variants:v,transition:h,className:P(u),style:f,id:p,children:e}):(0,Pm.jsx)("div",{ref:g,className:u,style:f,id:p,children:e})});zH.displayName="ScrollReveal";var GH=Un.forwardRef(({children:e,stagger:t=.1,className:o,style:r,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Un.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,Pm.jsx)(Be.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(o),style:r,id:n,children:e})});GH.displayName="ScrollRevealContainer";var WH=Un.forwardRef(({children:e,direction:t="up",duration:o=.5,distance:r=50,className:n,variants:a,style:i,id:s},l)=>{let u=Un.useMemo(()=>a||HH(t,r),[t,r,a]),c=Un.useMemo(()=>({...UH,duration:o}),[o]);return(0,Pm.jsx)(Be.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});WH.displayName="ScrollRevealItem";var XH=b(M());var qH=b(M(),1);var $H=b(D(),1),FQ="Separator",jH="horizontal",_Q=["horizontal","vertical"],KH=qH.forwardRef((e,t)=>{let{decorative:o,orientation:r=jH,...n}=e,a=VQ(r)?r:jH,s=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,$H.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});KH.displayName=FQ;function VQ(e){return _Q.includes(e)}var tI=KH;var YH=b(D()),HQ=Q("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"}}),Zr=XH.forwardRef(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:n=!0,...a},i)=>(0,YH.jsx)(tI,{ref:i,decorative:n,orientation:t||void 0,className:P(HQ({orientation:t,variant:o,size:r}),e),...a}));Zr.displayName=tI.displayName;var Je=b(M());var w3=b(M());var x3=b(M(),1);var UQ=Object.defineProperty,od=(e,t)=>UQ(e,"name",{value:t,configurable:!0}),QH=!!(typeof window<"u"&&window.document&&window.document.createElement);function rI(e,t,{checkForDefaultPrevented:o=!0}={}){return od(function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}od(rI,"composeEventHandlers");function zQ(e){if(!QH)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}od(zQ,"getOwnerWindow");function oI(e){if(!QH)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}od(oI,"getOwnerDocument");function ZH(e,t=!1){let{activeElement:o}=oI(e);if(!o?.nodeName)return null;if(JH(o)&&o.contentDocument)return ZH(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let n=oI(o).getElementById(r);if(n)return n}}return o}od(ZH,"getActiveElement");function JH(e){return e.tagName==="IFRAME"}od(JH,"isFrame");var Jr=b(M(),1);var rd=!1;var e3=b(M(),1),sy=globalThis?.document?e3.useLayoutEffect:()=>{};var zn=b(M(),1);var nd=b(M(),1),GQ=Object.defineProperty,WQ=(e,t)=>GQ(e,"name",{value:t,configurable:!0}),t3=nd[" useEffectEvent ".trim().toString()],o3=nd[" useInsertionEffect ".trim().toString()];function nI(e){if(typeof t3=="function")return t3(e);let t=nd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof o3=="function"?o3(()=>{t.current=e}):sy(()=>{t.current=e}),nd.useMemo(()=>(...o)=>t.current?.(...o),[])}WQ(nI,"useEffectEvent");var jQ=Object.defineProperty,Lm=(e,t)=>jQ(e,"name",{value:t,configurable:!0}),qQ=Jr[" useInsertionEffect ".trim().toString()]||sy;function aI({prop:e,defaultProp:t,onChange:o=Lm(()=>{},"onChange"),caller:r}){let[n,a,i]=n3({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;if(rd){let c=Jr.useRef(e!==void 0);Jr.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} 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,r])}let u=Jr.useCallback(c=>{if(s){let d=a3(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}Lm(aI,"useControllableState");function n3({defaultProp:e,onChange:t}){let[o,r]=Jr.useState(e),n=Jr.useRef(o),a=Jr.useRef(t);return qQ(()=>{a.current=t},[t]),Jr.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}Lm(n3,"useUncontrolledState");function a3(e){return typeof e=="function"}Lm(a3,"isFunction");var r3=Symbol("RADIX:SYNC_STATE");function $Q(e,t,o,r){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=nI(i);if(rd){let x=zn.useRef(n!==void 0);zn.useEffect(()=>{let v=x.current;v!==l&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${l?"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.`),x.current=l},[l,s])}let c=[{...o,state:a}];r&&c.push(r);let[d,f]=zn.useReducer((x,v)=>{if(v.type===r3)return{...x,state:v.state};let h=e(x,v);return l&&!Object.is(h.state,x.state)&&u(h.state),h},...c),p=d.state,m=zn.useRef(p);zn.useEffect(()=>{m.current!==p&&(m.current=p,l||u(p))},[p,m,l]);let g=zn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return zn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:r3,state:n})},[n,d.state,l]),[g,f]}Lm($Q,"useControllableStateReducer");var m3=b(M(),1),g3=b(Da(),1);var It=b(M(),1);var i3=b(M(),1),KQ=Object.defineProperty,sI=(e,t)=>KQ(e,"name",{value:t,configurable:!0});function iI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}sI(iI,"setRef");function s3(...e){return t=>{let o=!1,r=e.map(n=>{let a=iI(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():iI(e[n],null)}}}}sI(s3,"composeRefs");function lI(...e){return i3.useCallback(s3(...e),e)}sI(lI,"useComposedRefs");var QQ=b(D(),1),XQ=Object.defineProperty,en=(e,t)=>XQ(e,"name",{value:t,configurable:!0}),YQ=en((e,t)=>{let o={...t};for(let r in t){let n=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(n&&a){let s=typeof n=="function",l=typeof a=="function";rd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(o[r]=n);else r==="style"?o[r]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:r==="className"?o[r]=[n,a].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=l3(a,n))}return{...e,...o}},"mergeProps");function l3(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}en(l3,"concatAriaDescribedby");var u3=It.createContext(YQ);u3.displayName="SlotContext";function cI(e){let t=It.forwardRef((o,r)=>{let n=It.useContext(u3),{children:a,mergeProps:i=n,...s}=o,l=null,u=!1,c=[];uI(a)&&typeof ly=="function"&&(a=ly(a._payload)),It.Children.forEach(a,m=>{if(f3(m)){u=!0;let g=m,x="child"in g.props?g.props.child:g.props.children;uI(x)&&typeof ly=="function"&&(x=ly(x._payload)),l=JQ(g,x),c.push(l?.props?.children)}else c.push(m)}),l?l=It.cloneElement(l,void 0,c):!u&&It.Children.count(a)===1&&It.isValidElement(a)&&(l=a);let d=l?d3(l):void 0,f=lI(r,d);if(!l){if(a||a===0)throw new Error(u?oZ(e):tZ(e));return a}let p=i(s,l.props??{});return l.type!==It.Fragment&&(p.ref=r?f:d),It.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}en(cI,"createSlot");var c3=Symbol.for("radix.slottable");function ZQ(e){let t=en(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=c3,t}en(ZQ,"createSlottable");var JQ=en((e,t)=>{if("child"in e.props){let o=e.props.child;return It.isValidElement(o)?It.cloneElement(o,void 0,e.props.children(o.props.children)):null}return It.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function d3(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)}en(d3,"getElementRef");function f3(e){return It.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===c3}en(f3,"isSlottable");var eZ=Symbol.for("react.lazy");function uI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===eZ&&"_payload"in e&&p3(e._payload)}en(uI,"isLazyComponent");function p3(e){return typeof e=="object"&&e!==null&&"then"in e}en(p3,"isPromiseLike");var tZ=en(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),oZ=en(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ly=It[" use ".trim().toString()];var h3=b(D(),1),rZ=Object.defineProperty,nZ=(e,t)=>rZ(e,"name",{value:t,configurable:!0}),aZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],v3=aZ.reduce((e,t)=>{let o=cI(`Primitive.${t}`),r=m3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,h3.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function iZ(e,t){e&&g3.flushSync(()=>e.dispatchEvent(t))}nZ(iZ,"dispatchDiscreteCustomEvent");var y3=b(D(),1),sZ=Object.defineProperty,lZ=(e,t)=>sZ(e,"name",{value:t,configurable:!0}),uZ="Toggle",Tm=x3.forwardRef(lZ(function(t,o){let{pressed:r,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=aI({prop:r,onChange:a,defaultProp:n??!1,caller:uZ});return(0,y3.jsx)(v3.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:o,onClick:rI(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var C3=b(D()),uy=Q("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"}}),cy=w3.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,C3.jsx)(Tm,{ref:n,className:P("moonui-theme",uy({variant:t,size:o,className:e})),...r}));cy.displayName=Tm.displayName;var py=b(M());var Re=b(M(),1);var Et=b(D(),1),[dy,UMe]=Oe("Tooltip",[$r]),fy=$r(),S3="TooltipProvider",dZ=700,dI="tooltip.open",[fZ,pI]=dy(S3),b3=e=>{let{__scopeTooltip:t,delayDuration:o=dZ,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,i=Re.useRef(!0),s=Re.useRef(!1),l=Re.useRef(0);return Re.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,Et.jsx)(fZ,{scope:t,isOpenDelayedRef:i,delayDuration:o,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};b3.displayName=S3;var km="Tooltip",[pZ,Mm]=dy(km),R3=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=pI(km,e.__scopeTooltip),u=fy(t),[c,d]=Re.useState(null),f=Ae(),p=Re.useRef(0),m=i??l.disableHoverableContent,g=s??l.delayDuration,x=Re.useRef(!1),[v,h]=qe({prop:r,defaultProp:n??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(dI))):l.onClose(),a?.(R)},caller:km}),y=Re.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),w=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,h(!0)},[h]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h(!1)},[h]),S=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,h(!0),p.current=0},g)},[g,h]);return Re.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,Et.jsx)(Ja,{...u,children:(0,Et.jsx)(pZ,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?S():w()},[l.isOpenDelayedRef,S,w]),onTriggerLeave:Re.useCallback(()=>{m?C():(window.clearTimeout(p.current),p.current=0)},[C,m]),onOpen:w,onClose:C,disableHoverableContent:m,children:o})})};R3.displayName=km;var fI="TooltipTrigger",I3=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,n=Mm(fI,o),a=pI(fI,o),i=fy(o),s=Re.useRef(null),l=de(t,s,n.onTriggerChange),u=Re.useRef(!1),c=Re.useRef(!1),d=Re.useCallback(()=>u.current=!1,[]);return Re.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,Et.jsx)(ei,{asChild:!0,...i,children:(0,Et.jsx)($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:W(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:W(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:W(e.onBlur,n.onClose),onClick:W(e.onClick,n.onClose)})})});I3.displayName=fI;var mI="TooltipPortal",[mZ,gZ]=dy(mI,{forceMount:void 0}),hZ=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:n}=e,a=Mm(mI,t);return(0,Et.jsx)(mZ,{scope:t,forceMount:o,children:(0,Et.jsx)(st,{present:o||a.open,children:(0,Et.jsx)(Cr,{asChild:!0,container:n,children:r})})})};hZ.displayName=mI;var ad="TooltipContent",P3=Re.forwardRef((e,t)=>{let o=gZ(ad,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,i=Mm(ad,e.__scopeTooltip);return(0,Et.jsx)(st,{present:r||i.open,children:i.disableHoverableContent?(0,Et.jsx)(L3,{side:n,...a,ref:t}):(0,Et.jsx)(vZ,{side:n,...a,ref:t})})}),vZ=Re.forwardRef((e,t)=>{let o=Mm(ad,e.__scopeTooltip),r=pI(ad,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=o,c=n.current,{onPointerInTransitChange:d}=r,f=Re.useCallback(()=>{s(null),d(!1)},[d]),p=Re.useCallback((m,g)=>{let x=m.currentTarget,v={x:m.clientX,y:m.clientY},h=CZ(v,x.getBoundingClientRect()),y=SZ(v,h),w=bZ(g.getBoundingClientRect()),C=IZ([...y,...w]);s(C),d(!0)},[d]);return Re.useEffect(()=>()=>f(),[f]),Re.useEffect(()=>{if(l&&c){let m=x=>p(x,c),g=x=>p(x,l);return l.addEventListener("pointerleave",m),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",g)}}},[l,c,p,f]),Re.useEffect(()=>{if(i){let m=g=>{let x=g.target,v={x:g.clientX,y:g.clientY},h=l?.contains(x)||c?.contains(x),y=!RZ(v,i);h?f():y&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,c,i,u,f]),(0,Et.jsx)(L3,{...e,ref:a})}),[xZ,yZ]=dy(km,{isInside:!1}),wZ=hP("TooltipContent"),L3=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Mm(ad,o),u=fy(o),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(dI,c),()=>document.removeEventListener(dI,c)),[c]),Re.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,Et.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,Et.jsxs)(fs,{"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,Et.jsx)(wZ,{children:r}),(0,Et.jsx)(xZ,{scope:o,isInside:!0,children:(0,Et.jsx)(wB,{id:l.contentId,role:"tooltip",children:n||r})})]})})});P3.displayName=ad;var T3="TooltipArrow",k3=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,n=fy(o);return yZ(T3,o).isInside?null:(0,Et.jsx)(ps,{...n,...r,ref:t})});k3.displayName=T3;function CZ(e,t){let o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function SZ(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 bZ(e){let{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function RZ(e,t){let{x:o,y:r}=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>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(n=!n)}return n}function IZ(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),PZ(t)}function PZ(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];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 o=[];for(let r=e.length-1;r>=0;r--){let n=e[r];for(;o.length>=2;){let a=o[o.length-1],i=o[o.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))o.pop();else break}o.push(n)}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 M3=b3,E3=R3,A3=I3;var gI=P3,hI=k3;var Ms=b(D()),vI=M3,TZ=Q("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"}}),my=E3,gy=A3,D3=py.forwardRef(({className:e,...t},o)=>(0,Ms.jsx)(hI,{ref:o,className:P("moonui-theme","fill-current",e),...t}));D3.displayName=hI.displayName;var Em=py.forwardRef(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:n=4,...a},i)=>(0,Ms.jsxs)(gI,{ref:i,sideOffset:n,className:P("moonui-theme",TZ({variant:t,size:o}),e),...a,children:[a.children,r&&(0,Ms.jsx)(D3,{})]}));Em.displayName=gI.displayName;var kZ=py.forwardRef(({children:e,content:t,variant:o="default",size:r="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},m)=>(0,Ms.jsxs)(my,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,Ms.jsx)(gy,{asChild:!0,children:e}),(0,Ms.jsx)(Em,{ref:m,side:n,align:a,variant:o,size:r,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));kZ.displayName="SimpleTooltip";var G=b(D()),Gt=({icon:e,tooltip:t,active:o,onClick:r,disabled:n})=>(0,G.jsxs)(my,{children:[(0,G.jsx)(gy,{asChild:!0,children:(0,G.jsx)(cy,{pressed:o,onPressedChange:()=>r(),disabled:n,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(Em,{children:(0,G.jsx)("p",{children:t})})]}),MZ=({onColorSelect:e})=>(0,G.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,G.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:o},onClick:()=>e(o)},o))}),N3=Je.default.forwardRef(({value:e="",onChange:t,placeholder:o="Start writing...",disabled:r=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,Je.useState)(e),[p,m]=(0,Je.useState)(!1),[g,x]=(0,Je.useState)(e),[v,h]=(0,Je.useState)(null),y=Je.default.useRef(null),w=Je.default.useRef(null),[C,S]=(0,Je.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}),R=(0,Je.useCallback)(E=>{f(E),t?.(E)},[t]),I=(0,Je.useCallback)(()=>{let E=window.getSelection();return E&&E.rangeCount>0?E.getRangeAt(0):null},[]),T=(0,Je.useCallback)(E=>{if(!E)return;let J=window.getSelection();J&&(J.removeAllRanges(),J.addRange(E))},[]),L=(0,Je.useCallback)((E,J)=>{if(r)return;y.current&&y.current.focus();let ae=I();if(document.execCommand(E,!1,J)||console.warn(`Command '${E}' failed to execute`),y.current){let Y=y.current.innerHTML;R(Y)}S({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,I,R]),k=(0,Je.useCallback)(E=>{let J=E.currentTarget.innerHTML;R(J)},[R]),A=(0,Je.useCallback)(E=>{if(E.ctrlKey||E.metaKey)switch(E.key){case"b":E.preventDefault(),L("bold");break;case"i":E.preventDefault(),L("italic");break;case"u":E.preventDefault(),L("underline");break;case"z":E.preventDefault(),E.shiftKey?L("redo"):L("undo");break}E.key==="Tab"&&(E.preventDefault(),L("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[L]),F=(0,Je.useCallback)(()=>{let E=prompt("Enter URL:");E&&L("createLink",E)},[L]),N=(0,Je.useCallback)(()=>{let E=prompt("Enter image URL:");E&&L("insertImage",E)},[L]),U=(0,Je.useCallback)(E=>{L("formatBlock",`<h${E}>`)},[L]),O=(0,Je.useCallback)(E=>{let J=window.getSelection();if(J&&J.rangeCount>0){let ae=J.getRangeAt(0),V=document.createElement("span");V.style.color=E;try{ae.surroundContents(V)}catch{L("foreColor",E)}if(y.current){let Y=y.current.innerHTML;R(Y)}}},[L,R]),_=E=>{if(typeof window>"u")return E.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'");let J=document.createElement("div");return J.innerHTML=E,J.textContent||J.innerText||""};Je.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),Je.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,G.jsx)(vI,{children:(0,G.jsxs)(Be.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,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Gt,{icon:(0,G.jsx)(vf,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>L("bold"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(Tf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>L("italic"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(Vf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>L("underline"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(_f,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>L("strikeThrough"),disabled:r})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(Xc,{onValueChange:E=>{E.startsWith("h")?U(E.substring(1)):E==="normal"?L("formatBlock","p"):L("fontSize",E)},disabled:r,children:[(0,G.jsx)(Yc,{className:"w-24 h-8",children:(0,G.jsx)(Sm,{placeholder:"Size"})}),(0,G.jsxs)(Qc,{children:[(0,G.jsx)(Ho,{value:"1",children:"Small"}),(0,G.jsx)(Ho,{value:"3",children:"Normal"}),(0,G.jsx)(Ho,{value:"5",children:"Large"}),(0,G.jsx)(Ho,{value:"7",children:"X-Large"}),(0,G.jsx)(Zr,{className:"my-1"}),(0,G.jsx)(Ho,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Ho,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Ho,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Ho,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Ho,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Ho,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Gt,{icon:(0,G.jsx)(pf,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>L("justifyLeft"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(df,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>L("justifyCenter"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(mf,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>L("justifyRight"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(ff,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>L("justifyFull"),disabled:r})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Gt,{icon:(0,G.jsx)(Ef,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>L("insertUnorderedList"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(Mf,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>L("insertOrderedList"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(Of,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>L("formatBlock","blockquote"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(wf,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>L("formatBlock","pre"),disabled:r})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Gt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>L("outdent"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>L("indent"),disabled:r})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Gt,{icon:(0,G.jsx)(kf,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:F,disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(ol,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:r})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(oi,{children:[(0,G.jsx)(ri,{asChild:!0,children:(0,G.jsx)(De,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:(0,G.jsx)(Hu,{className:"h-3 w-3"})})}),(0,G.jsx)(va,{className:"w-auto p-0",children:(0,G.jsx)(MZ,{onColorSelect:O})})]}),(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Gt,{icon:(0,G.jsx)(Bf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>L("undo"),disabled:r}),(0,G.jsx)(Gt,{icon:(0,G.jsx)(Ff,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>L("redo"),disabled:r})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(Zr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(Gt,{icon:p?(0,G.jsx)(Yo,{className:"h-3 w-3"}):(0,G.jsx)(tl,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?R(g):x(d),m(!p)},disabled:r})]})]})});return(0,G.jsxs)("div",{ref:c,className:P("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",n),...u,children:[B,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(Be.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,G.jsx)("textarea",{ref:w,value:g,onChange:E=>x(E.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:r,placeholder:"HTML source code..."})}):(0,G.jsx)(Be.div,{ref:y,contentEditable:!r,suppressContentEditableWarning:!0,className:P("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:k,onKeyDown:A,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,G.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),(0,G.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,G.jsx)(EZ,{content:d})})]})});N3.displayName="SimpleEditor";var EZ=({content:e})=>{let[t,o]=(0,Je.useState)(0);return(0,Je.useEffect)(()=>{o((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,G.jsxs)(G.Fragment,{children:[t," characters"]})};var Am=b(M());var Qt=b(D()),O3=Q("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"}}),Es=Am.forwardRef(({className:e,variant:t,size:o,shape:r,animation:n,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},p)=>{let{onDrag:m,onDragEnd:g,onDragStart:x,onAnimationStart:v,onAnimationEnd:h,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,Qt.jsx)(Be.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:P("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,Qt.jsx)("div",{ref:p,className:P("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?Be.div:"div";return(0,Qt.jsx)(C,{ref:p,className:P("moonui-theme",O3({variant:t,size:o,shape:r,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?PD:{},...w})});Es.displayName="Skeleton";var xI=Am.forwardRef(({className:e,lines:t=3,lineHeight:o="0.85rem",spacing:r="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,Qt.jsx)("div",{ref:u,className:P("moonui-theme","flex flex-col",e),style:{gap:r},...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)(Es,{variant:i,animation:s,className:"w-full",style:{height:o,width:`${p}%`}},d)})}));xI.displayName="SkeletonText";var yI=Am.forwardRef(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...n},a)=>(0,Qt.jsx)(Es,{ref:a,variant:o,animation:r,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));yI.displayName="SkeletonAvatar";var F3=Am.forwardRef(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Qt.jsxs)("div",{ref:s,className:P("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)(yI,{size:"2.5rem",variant:n,animation:a}),(0,Qt.jsxs)("div",{className:"flex-1",children:[(0,Qt.jsx)(Es,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Qt.jsx)(Es,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Qt.jsx)(xI,{lines:o,variant:n,animation:a,className:"mb-4"}),r&&(0,Qt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Qt.jsx)(Es,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Qt.jsx)(Es,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));F3.displayName="SkeletonCard";var id=b(M());var V3=b(D()),_3=id.forwardRef(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=id.useState(0),[c,d]=id.useState(0),[f,p]=id.useState(!1),m=v=>{a||(u(v.touches[0].clientX),p(!0))},g=v=>{a||!f||d(v.touches[0].clientX)},x=()=>{if(a||!f)return;let v=c-l;Math.abs(v)>n&&(v>0&&r?r():v<0&&o&&o()),p(!1),d(0),u(0)};return(0,V3.jsx)("div",{ref:s,className:P("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:m,onTouchMove:g,onTouchEnd:x,...i,children:t})});_3.displayName="SwipeableCard";var j3=b(M());var Gn=b(M(),1);var Xl=b(D(),1),hy="Switch",[AZ,hEe]=Oe(hy),[DZ,NZ]=AZ(hy),B3=Gn.forwardRef((e,t)=>{let{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=Gn.useState(null),m=de(t,y=>p(y)),g=Gn.useRef(!1),x=f?c||!!f.closest("form"):!0,[v,h]=qe({prop:n,defaultProp:a??!1,onChange:u,caller:hy});return(0,Xl.jsxs)(DZ,{scope:o,checked:v,disabled:s,children:[(0,Xl.jsx)($.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":G3(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:m,onClick:W(e.onClick,y=>{h(w=>!w),x&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),x&&(0,Xl.jsx)(z3,{control:f,bubbles:!g.current,name:r,value:l,checked:v,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});B3.displayName=hy;var H3="SwitchThumb",U3=Gn.forwardRef((e,t)=>{let{__scopeSwitch:o,...r}=e,n=NZ(H3,o);return(0,Xl.jsx)($.span,{"data-state":G3(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});U3.displayName=H3;var OZ="SwitchBubbleInput",z3=Gn.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{let i=Gn.useRef(null),s=de(i,a),l=Mc(o),u=Ec(t);return Gn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==o&&p){let m=new Event("click",{bubbles:r});p.call(c,o),c.dispatchEvent(m)}},[l,o,r]),(0,Xl.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});z3.displayName=OZ;function G3(e){return e?"checked":"unchecked"}var wI=B3,W3=U3;var wa=b(D()),q3=j3.forwardRef(({className:e,size:t="md",variant:o="primary",loading:r,leftIcon:n,rightIcon:a,description:i,...s},l)=>(0,wa.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,wa.jsx)("span",{className:"text-muted-foreground",children:n}),(0,wa.jsxs)(wI,{className:P("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||s.disabled,...s,ref:l,children:[r?(0,wa.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,wa.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,wa.jsx)(W3,{className:P("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,wa.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,wa.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));q3.displayName=wI.displayName;var Dm=b(M());var Ca=b(D()),$3=Dm.forwardRef(({value:e=[],onChange:t,maxTags:o,variant:r="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=Dm.useState(""),[p,m]=Dm.useState(""),g=h=>{h.key==="Enter"||h.key===a?(h.preventDefault(),x()):h.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},x=()=>{let h=d.trim();if(h){if(!n&&e.includes(h)){m("This tag already exists"),setTimeout(()=>m(""),2e3);return}if(o&&e.length>=o){m(`Maximum ${o} tags allowed`),setTimeout(()=>m(""),2e3);return}t([...e,h]),f(""),m("")}},v=h=>{l||t(e.filter((y,w)=>w!==h))};return(0,Ca.jsxs)("div",{className:"relative",children:[(0,Ca.jsxs)("div",{className:P("flex items-center 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((h,y)=>(0,Ca.jsxs)(gr,{variant:r,className:"gap-1 pr-1.5",children:[(0,Ca.jsx)("span",{className:"text-xs",children:h}),!l&&(0,Ca.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,Ca.jsx)(mr,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},y)),(0,Ca.jsx)("input",{ref:c,type:"text",value:d,onChange:h=>f(h.target.value),onKeyDown:g,onBlur:x,disabled:l,placeholder:e.length===0?i:"",className:P("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,Ca.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});$3.displayName="TagsInput";var Ir=b(M());var Sa=b(D()),_Z=Q(["flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none dark:text-gray-200","resize-none"],{variants:{variant:{default:"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 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:shadow-inner dark:shadow-gray-950/10",outline:"border-2 border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:border-primary dark:focus-visible:border-primary/80",ghost:"border-none bg-transparent 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-2 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-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"},size:{sm:"min-h-[60px] text-xs",md:"min-h-[80px] text-sm",lg:"min-h-[120px] text-base"},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:""}},defaultVariants:{variant:"default",size:"md",isError:!1,isSuccess:!1}}),K3=Ir.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:n,error:a,success:i,loading:s,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:d,maxLength:f,value:p,defaultValue:m,onChange:g,...x},v)=>{let h=Ir.useRef(null),[y,w]=Ir.useState(p||m||"");Ir.useImperativeHandle(v,()=>h.current);let C=Ir.useCallback(()=>{let A=h.current;if(!A||!l)return;A.style.height="auto";let F=A.scrollHeight;u&&F>u?(A.style.height=`${u}px`,A.style.overflowY="auto"):(A.style.height=`${F}px`,A.style.overflowY="hidden")},[l,u]);Ir.useEffect(()=>{C()},[y,C]),Ir.useEffect(()=>{p!==void 0&&w(p)},[p]);let S=A=>{w(A.target.value),g?.(A)},R=String(y).length,I=c&&(f!==void 0||R>0),T=typeof a=="string"?a:void 0,L=typeof i=="string"?i:void 0,k=T||L;return(0,Sa.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,Sa.jsxs)("div",{className:"relative",children:[(0,Sa.jsx)("textarea",{ref:h,className:P(_Z({variant:r,size:n,isError:!!a,isSuccess:!!i}),s&&"pr-10",e),disabled:d||s,value:p,defaultValue:m,onChange:S,maxLength:f,"aria-invalid":!!a||void 0,"aria-describedby":T?`${x.id||""}-error`:L?`${x.id||""}-success`:void 0,...x}),s&&(0,Sa.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,Sa.jsx)(_t,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,Sa.jsxs)("div",{className:"flex items-center justify-between",children:[k&&(0,Sa.jsx)("p",{className:P("text-xs transition-all",T&&"text-error",L&&"text-success",o),id:T?`${x.id||""}-error`:L?`${x.id||""}-success`:void 0,children:T||L}),I&&(0,Sa.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[R,f!==void 0&&` / ${f}`]})]})]})});K3.displayName="Textarea";var Wn=b(M());var be=b(M(),1),Y3=b(Da(),1);var Ue=b(D(),1),II="ToastProvider",[PI,VZ,BZ]=Yn("Toast"),[Q3,VEe]=Oe("Toast",[BZ]),[HZ,xy]=Q3(II),Z3=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=be.useState(null),[u,c]=be.useState(0),d=be.useRef(!1),f=be.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${II}\`. Expected non-empty \`string\`.`),(0,Ue.jsx)(PI.Provider,{scope:t,children:(0,Ue.jsx)(HZ,{scope:t,label:o,duration:r,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:be.useCallback(()=>c(p=>p+1),[]),onToastRemove:be.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Z3.displayName=II;var J3="ToastViewport",UZ=["F8"],SI="toast.viewportPause",bI="toast.viewportResume",eU=be.forwardRef((e,t)=>{let{__scopeToast:o,hotkey:r=UZ,label:n="Notifications ({hotkey})",...a}=e,i=xy(J3,o),s=VZ(o),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;be.useEffect(()=>{let x=v=>{r.length!==0&&r.every(y=>v[y]||v.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),be.useEffect(()=>{let x=l.current,v=d.current;if(m&&x&&v){let h=()=>{if(!i.isClosePausedRef.current){let S=new CustomEvent(SI);v.dispatchEvent(S),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let S=new CustomEvent(bI);v.dispatchEvent(S),i.isClosePausedRef.current=!1}},w=S=>{!x.contains(S.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",h),x.addEventListener("focusout",w),x.addEventListener("pointermove",h),x.addEventListener("pointerleave",C),window.addEventListener("blur",h),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",h),x.removeEventListener("focusout",w),x.removeEventListener("pointermove",h),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",h),window.removeEventListener("focus",y)}}},[m,i.isClosePausedRef]);let g=be.useCallback(({tabbingDirection:x})=>{let h=s().map(y=>{let w=y.ref.current,C=[w,...eJ(w)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?h.reverse():h).flat()},[s]);return be.useEffect(()=>{let x=d.current;if(x){let v=h=>{let y=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!y){let C=document.activeElement,S=h.shiftKey;if(h.target===x&&S){u.current?.focus();return}let T=g({tabbingDirection:S?"backwards":"forwards"}),L=T.findIndex(k=>k===C);CI(T.slice(L+1))?h.preventDefault():S?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[s,g]),(0,Ue.jsxs)(a2,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,Ue.jsx)(RI,{ref:u,onFocusFromOutsideViewport:()=>{let x=g({tabbingDirection:"forwards"});CI(x)}}),(0,Ue.jsx)(PI.Slot,{scope:o,children:(0,Ue.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,Ue.jsx)(RI,{ref:c,onFocusFromOutsideViewport:()=>{let x=g({tabbingDirection:"backwards"});CI(x)}})]})});eU.displayName=J3;var tU="ToastFocusProxy",RI=be.forwardRef((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...n}=e,a=xy(tU,o);return(0,Ue.jsx)(wm,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&r()}})});RI.displayName=tU;var Nm="Toast",zZ="toast.swipeStart",GZ="toast.swipeMove",WZ="toast.swipeCancel",jZ="toast.swipeEnd",oU=be.forwardRef((e,t)=>{let{forceMount:o,open:r,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=qe({prop:r,defaultProp:n??!0,onChange:a,caller:Nm});return(0,Ue.jsx)(st,{present:o||s,children:(0,Ue.jsx)(KZ,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:rt(e.onPause),onResume:rt(e.onResume),onSwipeStart:W(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(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:W(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:W(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)})})})});oU.displayName=Nm;var[qZ,$Z]=Q3(Nm,{onClose(){}}),KZ=be.forwardRef((e,t)=>{let{__scopeToast:o,type:r="foreground",duration:n,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,g=xy(Nm,o),[x,v]=be.useState(null),h=de(t,N=>v(N)),y=be.useRef(null),w=be.useRef(null),C=n||g.duration,S=be.useRef(0),R=be.useRef(C),I=be.useRef(0),{onToastAdd:T,onToastRemove:L}=g,k=rt(()=>{x?.contains(document.activeElement)&&g.viewport?.focus(),i()}),A=be.useCallback(N=>{!N||N===1/0||(window.clearTimeout(I.current),S.current=new Date().getTime(),I.current=window.setTimeout(k,N))},[k]);be.useEffect(()=>{let N=g.viewport;if(N){let U=()=>{A(R.current),u?.()},O=()=>{let _=new Date().getTime()-S.current;R.current=R.current-_,window.clearTimeout(I.current),l?.()};return N.addEventListener(SI,O),N.addEventListener(bI,U),()=>{N.removeEventListener(SI,O),N.removeEventListener(bI,U)}}},[g.viewport,C,l,u,A]),be.useEffect(()=>{a&&!g.isClosePausedRef.current&&A(C)},[a,C,g.isClosePausedRef,A]),be.useEffect(()=>(T(),()=>L()),[T,L]);let F=be.useMemo(()=>x?uU(x):null,[x]);return g.viewport?(0,Ue.jsxs)(Ue.Fragment,{children:[F&&(0,Ue.jsx)(XZ,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:F}),(0,Ue.jsx)(qZ,{scope:o,onClose:k,children:Y3.createPortal((0,Ue.jsx)(PI.ItemSlot,{scope:o,children:(0,Ue.jsx)(n2,{asChild:!0,onEscapeKeyDown:W(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||k(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ue.jsx)($.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,N=>{N.key==="Escape"&&(s?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:W(e.onPointerDown,N=>{N.button===0&&(y.current={x:N.clientX,y:N.clientY})}),onPointerMove:W(e.onPointerMove,N=>{if(!y.current)return;let U=N.clientX-y.current.x,O=N.clientY-y.current.y,_=!!w.current,B=["left","right"].includes(g.swipeDirection),E=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,J=B?E(0,U):0,ae=B?0:E(0,O),V=N.pointerType==="touch"?10:2,Y={x:J,y:ae},oe={originalEvent:N,delta:Y};_?(w.current=Y,vy(GZ,d,oe,{discrete:!1})):X3(Y,g.swipeDirection,V)?(w.current=Y,vy(zZ,c,oe,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(U)>V||Math.abs(O)>V)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,N=>{let U=w.current,O=N.target;if(O.hasPointerCapture(N.pointerId)&&O.releasePointerCapture(N.pointerId),w.current=null,y.current=null,U){let _=N.currentTarget,B={originalEvent:N,delta:U};X3(U,g.swipeDirection,g.swipeThreshold)?vy(jZ,p,B,{discrete:!0}):vy(WZ,f,B,{discrete:!0}),_.addEventListener("click",E=>E.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),XZ=e=>{let{__scopeToast:t,children:o,...r}=e,n=xy(Nm,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return ZZ(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,Ue.jsx)(Cr,{asChild:!0,children:(0,Ue.jsx)(wm,{...r,children:a&&(0,Ue.jsxs)(Ue.Fragment,{children:[n.label," ",o]})})})},YZ="ToastTitle",rU=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)($.div,{...r,ref:t})});rU.displayName=YZ;var QZ="ToastDescription",nU=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)($.div,{...r,ref:t})});nU.displayName=QZ;var aU="ToastAction",iU=be.forwardRef((e,t)=>{let{altText:o,...r}=e;return o.trim()?(0,Ue.jsx)(lU,{altText:o,asChild:!0,children:(0,Ue.jsx)(LI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${aU}\`. Expected non-empty \`string\`.`),null)});iU.displayName=aU;var sU="ToastClose",LI=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e,n=$Z(sU,o);return(0,Ue.jsx)(lU,{asChild:!0,children:(0,Ue.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,n.onClose)})})});LI.displayName=sU;var lU=be.forwardRef((e,t)=>{let{__scopeToast:o,altText:r,...n}=e;return(0,Ue.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...n,ref:t})});function uU(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),JZ(r)){let n=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...uU(r))}}),t}function vy(e,t,o,{discrete:r}){let n=o.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Au(n,a):n.dispatchEvent(a)}var X3=(e,t,o=0)=>{let r=Math.abs(e.x),n=Math.abs(e.y),a=r>n;return t==="left"||t==="right"?a&&r>o:!a&&n>o};function ZZ(e=()=>{}){let t=rt(e);_e(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function JZ(e){return e.nodeType===e.ELEMENT_NODE}function eJ(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function CI(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var cU=Z3,TI=eU,kI=oU,MI=rU,EI=nU,AI=iU,DI=LI;var Lo=b(D()),fU=cU,OI=Wn.forwardRef(({className:e,...t},o)=>(0,Lo.jsx)(TI,{ref:o,className:P("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}));OI.displayName=TI.displayName;var oJ=Q("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"}}),FI=Wn.forwardRef(({className:e,variant:t,...o},r)=>(0,Lo.jsx)(kI,{ref:r,className:P("moonui-theme",oJ({variant:t}),e),...o}));FI.displayName=kI.displayName;var pU=Wn.forwardRef(({className:e,...t},o)=>(0,Lo.jsx)(AI,{ref:o,className:P("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}));pU.displayName=AI.displayName;var _I=Wn.forwardRef(({className:e,...t},o)=>(0,Lo.jsx)(DI,{ref:o,className:P("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,Lo.jsx)(mr,{className:"h-4 w-4"})}));_I.displayName=DI.displayName;var VI=Wn.forwardRef(({className:e,...t},o)=>(0,Lo.jsx)(MI,{ref:o,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));VI.displayName=MI.displayName;var BI=Wn.forwardRef(({className:e,...t},o)=>(0,Lo.jsx)(EI,{ref:o,className:P("moonui-theme","text-sm opacity-90",e),...t}));BI.displayName=EI.displayName;var rJ=5,nJ=1e6,NI=new Map,dU=e=>{if(NI.has(e))return;let t=setTimeout(()=>{NI.delete(e),Om({type:"REMOVE_TOAST",toastId:e})},nJ);NI.set(e,t)},aJ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,rJ)};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?dU(o):e.toasts.forEach(r=>{dU(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}},yy=[],wy={toasts:[]},iJ=0;function Om(e){wy=aJ(wy,e),yy.forEach(t=>{t(wy)})}function mU({...e}){let t=`toast-${Date.now()}-${++iJ}`,o=n=>Om({type:"UPDATE_TOAST",toast:{...n,id:t}}),r=()=>Om({type:"DISMISS_TOAST",toastId:t});return Om({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||r()}}}),{id:t,dismiss:r,update:o}}function gU(){let[e,t]=Wn.useState(wy);return Wn.useEffect(()=>(yy.push(t),()=>{let o=yy.indexOf(t);o>-1&&yy.splice(o,1)}),[e]),{...e,toast:mU,dismiss:o=>Om({type:"DISMISS_TOAST",toastId:o})}}function sJ(){let{toasts:e}=gU();return(0,Lo.jsxs)(fU,{children:[e.map(function({id:t,title:o,description:r,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,Lo.jsxs)(FI,{variant:a,open:i,onOpenChange:s,...l,children:[(0,Lo.jsxs)("div",{className:"grid gap-1",children:[o&&(0,Lo.jsx)(VI,{children:o}),r&&(0,Lo.jsx)(BI,{children:r})]}),n,(0,Lo.jsx)(_I,{})]},t)}),(0,Lo.jsx)(OI,{})]})}var hU=b(M());var yU=b(D()),vU=Q(["inline-flex items-center justify-center rounded","border border-border bg-muted","px-1.5 font-mono font-medium text-muted-foreground","shadow-[0_1px_0_1px_hsl(var(--border))]","select-none whitespace-nowrap"],{variants:{size:{sm:"h-5 min-w-5 text-[10px]",md:"h-6 min-w-6 text-xs"}},defaultVariants:{size:"md"}}),xU=hU.forwardRef(({className:e,size:t,children:o,...r},n)=>(0,yU.jsx)("kbd",{ref:n,className:P("moonui-theme",vU({size:t}),e),...r,children:o}));xU.displayName="Kbd";var tn=b(M());var Pr=b(D()),wU=Q(["moonui-theme inline-flex items-center rounded-md outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"],{variants:{size:{sm:"gap-0.5",md:"gap-1",lg:"gap-1.5"}},defaultVariants:{size:"md"}}),lJ={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},CU=tn.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=lJ[l??"md"],m=i==="half"?.5:1,g=t!==void 0,[x,v]=tn.useState(o??0),h=g?t??0:x,[y,w]=tn.useState(null),C=y!==null?y:h,S=tn.useCallback(L=>{a||(g||v(L),r?.(L))},[a,g,r]),R=tn.useCallback(L=>{if(a)return;let k=null;switch(L.key){case"ArrowRight":case"ArrowUp":k=Math.min(n,h+m);break;case"ArrowLeft":case"ArrowDown":k=Math.max(m,h-m);break;case"Home":k=m;break;case"End":k=n;break;default:return}L.preventDefault(),S(k)},[a,n,h,m,S]),I=L=>{if(tn.isValidElement(s)){let k=s;return tn.cloneElement(k,{className:P(p,"shrink-0",L&&"fill-current",k.props?.className)})}return(0,Pr.jsx)(Ui,{className:P(p,"shrink-0",L&&"fill-current"),"aria-hidden":"true"})},T=Array.from({length:n},(L,k)=>k+1);return(0,Pr.jsx)("div",{ref:d,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":a||void 0,tabIndex:a?void 0:0,onKeyDown:R,onMouseLeave:()=>w(null),className:P(wU({size:l}),e),...c,children:T.map(L=>{let k=Math.max(0,Math.min(1,C-(L-1))),A=L-.5;return(0,Pr.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,Pr.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,Pr.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-amber-400",style:{width:`${k*100}%`},children:I(!0)}),!a&&i==="half"&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":h===A,"aria-label":`${A} stars`,tabIndex:-1,onClick:()=>S(A),onMouseEnter:()=>w(A),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":h===L,"aria-label":`${L} stars`,tabIndex:-1,onClick:()=>S(L),onMouseEnter:()=>w(L),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":h===L,"aria-label":`${L} ${L===1?"star":"stars"}`,tabIndex:-1,onClick:()=>S(L),onMouseEnter:()=>w(L),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},L)})})});CU.displayName="Rating";var SU=b(M());var Yl=b(D()),bU=Q(["inline-block shrink-0 rounded-full","border-current border-t-transparent","animate-spin motion-reduce:animate-none"],{variants:{size:{sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-[3px]",xl:"h-10 w-10 border-4"}},defaultVariants:{size:"md"}}),uJ={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},RU=SU.forwardRef(({className:e,size:t,variant:o="default",label:r="Loading",...n},a)=>(0,Yl.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[o==="dots"?(0,Yl.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,Yl.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",uJ[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,Yl.jsx)("span",{className:P(bU({size:t})),"aria-hidden":"true"}),(0,Yl.jsx)("span",{className:"sr-only",children:r})]}));RU.displayName="Spinner";var As=b(M());var LU=b(D()),IU=Q("moonui-theme inline-flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-stretch"},attached:{true:"",false:"gap-2"}},compoundVariants:[{orientation:"horizontal",attached:!0,class:["[&>*:not(:first-child)]:rounded-l-none","[&>*:not(:last-child)]:rounded-r-none","[&>*:not(:first-child)]:-ml-px"]},{orientation:"vertical",attached:!0,class:["[&>*:not(:first-child)]:rounded-t-none","[&>*:not(:last-child)]:rounded-b-none","[&>*:not(:first-child)]:-mt-px"]}],defaultVariants:{orientation:"horizontal",attached:!0}}),PU=As.forwardRef(({className:e,orientation:t,attached:o,size:r,variant:n,children:a,...i},s)=>{let u=r!==void 0||n!==void 0?As.Children.map(a,c=>{if(!As.isValidElement(c)||c.type!==De)return c;let d=c.props;return As.cloneElement(c,{size:d.size??r,variant:d.variant??n})}):a;return(0,LU.jsx)("div",{ref:s,role:"group",className:P(IU({orientation:t,attached:o}),e),...i,children:u})});PU.displayName="ButtonGroup";var Jl=b(M());var zo=b(M(),1);var rn=b(M(),1),HI=b(D(),1),cJ=Object.defineProperty,on=(e,t)=>cJ(e,"name",{value:t,configurable:!0});function dJ(e,t){let o=rn.createContext(t);o.displayName=e+"Context";let r=on(a=>{let{children:i,...s}=a,l=rn.useMemo(()=>s,Object.values(s));return(0,HI.jsx)(o.Provider,{value:l,children:i})},"Provider");r.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=rn.useContext(o);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return on(n,"useContext"),[r,n]}on(dJ,"createContext");function gi(e,t=[]){let o=[];function r(a,i){let s=rn.createContext(i);s.displayName=a+"Context";let l=o.length;o=[...o,i];let u=on(d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,x=rn.useMemo(()=>m,Object.values(m));return(0,HI.jsx)(g.Provider,{value:x,children:p})},"Provider");u.displayName=a+"Provider";function c(d,f,p={}){let{optional:m=!1}=p,g=f?.[e]?.[l]||s,x=rn.useContext(g);if(x)return x;if(i!==void 0)return i;if(!m)throw new Error(`\`${d}\` must be used within \`${a}\``)}return on(c,"useContext"),[u,c]}on(r,"createContext");let n=on(()=>{let a=o.map(i=>rn.createContext(i));return on(function(s){let l=s?.[e]||a;return rn.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[r,TU(n,...t)]}on(gi,"createContextScope");function TU(...e){let t=e[0];if(e.length===1)return t;let o=on(()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return on(function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return rn.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}on(TU,"composeContextScopes");var _U=b(M(),1),VU=b(Da(),1);var Pt=b(M(),1);var kU=b(M(),1),fJ=Object.defineProperty,zI=(e,t)=>fJ(e,"name",{value:t,configurable:!0});function UI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}zI(UI,"setRef");function MU(...e){return t=>{let o=!1,r=e.map(n=>{let a=UI(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():UI(e[n],null)}}}}zI(MU,"composeRefs");function nn(...e){return kU.useCallback(MU(...e),e)}zI(nn,"useComposedRefs");var sd=!1;var gJ=b(D(),1),pJ=Object.defineProperty,an=(e,t)=>pJ(e,"name",{value:t,configurable:!0}),mJ=an((e,t)=>{let o={...t};for(let r in t){let n=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(n&&a){let s=typeof n=="function",l=typeof a=="function";sd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(o[r]=n);else r==="style"?o[r]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:r==="className"?o[r]=[n,a].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=EU(a,n))}return{...e,...o}},"mergeProps");function EU(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}an(EU,"concatAriaDescribedby");var AU=Pt.createContext(mJ);AU.displayName="SlotContext";function hi(e){let t=Pt.forwardRef((o,r)=>{let n=Pt.useContext(AU),{children:a,mergeProps:i=n,...s}=o,l=null,u=!1,c=[];GI(a)&&typeof Cy=="function"&&(a=Cy(a._payload)),Pt.Children.forEach(a,m=>{if(OU(m)){u=!0;let g=m,x="child"in g.props?g.props.child:g.props.children;GI(x)&&typeof Cy=="function"&&(x=Cy(x._payload)),l=vJ(g,x),c.push(l?.props?.children)}else c.push(m)}),l?l=Pt.cloneElement(l,void 0,c):!u&&Pt.Children.count(a)===1&&Pt.isValidElement(a)&&(l=a);let d=l?NU(l):void 0,f=nn(r,d);if(!l){if(a||a===0)throw new Error(u?wJ(e):yJ(e));return a}let p=i(s,l.props??{});return l.type!==Pt.Fragment&&(p.ref=r?f:d),Pt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}an(hi,"createSlot");var DU=Symbol.for("radix.slottable");function hJ(e){let t=an(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=DU,t}an(hJ,"createSlottable");var vJ=an((e,t)=>{if("child"in e.props){let o=e.props.child;return Pt.isValidElement(o)?Pt.cloneElement(o,void 0,e.props.children(o.props.children)):null}return Pt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function NU(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)}an(NU,"getElementRef");function OU(e){return Pt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DU}an(OU,"isSlottable");var xJ=Symbol.for("react.lazy");function GI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===xJ&&"_payload"in e&&FU(e._payload)}an(GI,"isLazyComponent");function FU(e){return typeof e=="object"&&e!==null&&"then"in e}an(FU,"isPromiseLike");var yJ=an(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),wJ=an(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Cy=Pt[" use ".trim().toString()];var BU=b(D(),1),CJ=Object.defineProperty,SJ=(e,t)=>CJ(e,"name",{value:t,configurable:!0}),bJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ld=bJ.reduce((e,t)=>{let o=hi(`Primitive.${t}`),r=_U.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,BU.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function RJ(e,t){e&&VU.flushSync(()=>e.dispatchEvent(t))}SJ(RJ,"dispatchDiscreteCustomEvent");var Jt=b(M(),1);var IJ=Object.defineProperty,ud=(e,t)=>IJ(e,"name",{value:t,configurable:!0}),HU=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ds(e,t,{checkForDefaultPrevented:o=!0}={}){return ud(function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}ud(Ds,"composeEventHandlers");function PJ(e){if(!HU)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ud(PJ,"getOwnerWindow");function WI(e){if(!HU)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ud(WI,"getOwnerDocument");function UU(e,t=!1){let{activeElement:o}=WI(e);if(!o?.nodeName)return null;if(zU(o)&&o.contentDocument)return UU(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let n=WI(o).getElementById(r);if(n)return n}}return o}ud(UU,"getActiveElement");function zU(e){return e.tagName==="IFRAME"}ud(zU,"isFrame");var jn=b(M(),1);var Sy=b(D(),1),ar=b(M(),1);var Ql=b(D(),1);var LJ=Object.defineProperty,Zt=(e,t)=>LJ(e,"name",{value:t,configurable:!0});function $I(e){let t=e+"CollectionProvider",[o,r]=gi(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=Zt(g=>{let{scope:x,children:v}=g,h=jn.useRef(null),y=jn.useRef(new Map).current;return(0,Sy.jsx)(n,{scope:x,itemMap:y,collectionRef:h,children:v})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=hi(s),u=jn.forwardRef((g,x)=>{let{scope:v,children:h}=g,y=a(s,v),w=nn(x,y.collectionRef);return(0,Sy.jsx)(l,{ref:w,children:h})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=hi(c),p=jn.forwardRef((g,x)=>{let{scope:v,children:h,...y}=g,w=jn.useRef(null),C=nn(x,w),S=a(c,v);return jn.useEffect(()=>(S.itemMap.set(w,{ref:w,...y}),()=>void S.itemMap.delete(w))),(0,Sy.jsx)(f,{[d]:"",ref:C,children:h})});p.displayName=c;function m(g){let x=a(e+"CollectionConsumer",g);return jn.useCallback(()=>{let h=x.collectionRef.current;if(!h)return[];let y=Array.from(h.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((S,R)=>y.indexOf(S.ref.current)-y.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return Zt(m,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},m,r]}Zt($I,"createCollection");var GU=new WeakMap,At,sn,jI=(sn=class extends Map{constructor(o){super(o);ky(this,At,void 0);Bm(this,At,[...super.keys()]),GU.set(this,!0)}set(o,r){return GU.get(this)&&(this.has(o)?eo(this,At)[eo(this,At).indexOf(o)]=o:eo(this,At).push(o)),super.set(o,r),this}insert(o,r,n){let a=this.has(r),i=eo(this,At).length,s=KI(o),l=s>=0?s:i+s,u=l<0||l>=i?-1:l;if(u===this.size||a&&u===this.size-1||u===-1)return this.set(r,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...eo(this,At)],f,p=!1;for(let m=l;m<c;m++)if(l===m){let g=d[m];d[m]===r&&(g=d[m+1]),a&&this.delete(r),f=this.get(g),this.set(r,n)}else{!p&&d[m-1]===r&&(p=!0);let g=d[p?m:m-1],x=f;f=this.get(g),this.delete(g),this.set(g,x)}return this}with(o,r,n){let a=new sn(this);return a.insert(o,r,n),a}before(o){let r=eo(this,At).indexOf(o)-1;if(!(r<0))return this.entryAt(r)}setBefore(o,r,n){let a=eo(this,At).indexOf(o);return a===-1?this:this.insert(a,r,n)}after(o){let r=eo(this,At).indexOf(o);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(o,r,n){let a=eo(this,At).indexOf(o);return a===-1?this:this.insert(a+1,r,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Bm(this,At,[]),super.clear()}delete(o){let r=super.delete(o);return r&&eo(this,At).splice(eo(this,At).indexOf(o),1),r}deleteAt(o){let r=this.keyAt(o);return r!==void 0?this.delete(r):!1}at(o){let r=by(eo(this,At),o);if(r!==void 0)return this.get(r)}entryAt(o){let r=by(eo(this,At),o);if(r!==void 0)return[r,this.get(r)]}indexOf(o){return eo(this,At).indexOf(o)}keyAt(o){return by(eo(this,At),o)}from(o,r){let n=this.indexOf(o);if(n===-1)return;let a=n+r;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(o,r){let n=this.indexOf(o);if(n===-1)return;let a=n+r;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return a;n++}}findIndex(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return n;n++}return-1}filter(o,r){let n=[],a=0;for(let i of this)Reflect.apply(o,r,[i,a,this])&&n.push(i),a++;return new sn(n)}map(o,r){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(o,r,[i,a,this])]),a++;return new sn(n)}reduce(...o){let[r,n]=o,a=0,i=n??this.at(0);for(let s of this)a===0&&o.length===1?i=s:i=Reflect.apply(r,this,[i,s,a,this]),a++;return i}reduceRight(...o){let[r,n]=o,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&o.length===1?a=s:a=Reflect.apply(r,this,[a,s,i,this])}return a}toSorted(o){let r=[...this.entries()].sort(o);return new sn(r)}toReversed(){let o=new sn;for(let r=this.size-1;r>=0;r--){let n=this.keyAt(r),a=this.get(n);o.set(n,a)}return o}toSpliced(...o){let r=[...this.entries()];return r.splice(...o),new sn(r)}slice(o,r){let n=new sn,a=this.size-1;if(o===void 0)return n;o<0&&(o=o+this.size),r!==void 0&&r>0&&(a=r-1);for(let i=o;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(o,r){let n=0;for(let a of this){if(!Reflect.apply(o,r,[a,n,this]))return!1;n++}return!0}some(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return!0;n++}return!1}},At=new WeakMap,Zt(sn,"OrderedDict"),sn);function by(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=WU(e,t);return o===-1?void 0:e[o]}Zt(by,"at");function WU(e,t){let o=e.length,r=KI(t),n=r>=0?r:o+r;return n<0||n>=o?-1:n}Zt(WU,"toSafeIndex");function KI(e){return e!==e||e===0?0:Math.trunc(e)}Zt(KI,"toSafeInteger");function TJ(e){let t=e+"CollectionProvider",[o,r]=gi(t),[n,a]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new jI,setItemMap:Zt(()=>{},"setItemMap")}),i=Zt(({state:y,...w})=>y?(0,Ql.jsx)(l,{...w,state:y}):(0,Ql.jsx)(s,{...w}),"CollectionProvider");i.displayName=t;let s=Zt(y=>{let w=x();return(0,Ql.jsx)(l,{...y,state:w})},"CollectionInit");s.displayName=t+"Init";let l=Zt(y=>{let{scope:w,children:C,state:S}=y,R=ar.useRef(null),[I,T]=ar.useState(null),L=nn(R,T),[k,A]=S;return ar.useEffect(()=>{if(!I)return;let F=$U(()=>{});return F.observe(I,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[I]),(0,Ql.jsx)(n,{scope:w,itemMap:k,setItemMap:A,collectionRef:L,collectionRefObject:R,collectionElement:I,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=hi(u),d=ar.forwardRef((y,w)=>{let{scope:C,children:S}=y,R=a(u,C),I=nn(w,R.collectionRef);return(0,Ql.jsx)(c,{ref:I,children:S})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",m=hi(f),g=ar.forwardRef((y,w)=>{let{scope:C,children:S,...R}=y,I=ar.useRef(null),[T,L]=ar.useState(null),k=nn(w,I,L),A=a(f,C),{setItemMap:F}=A,N=ar.useRef(R);jU(N.current,R)||(N.current=R);let U=N.current;return ar.useEffect(()=>{let O=U;return F(_=>T?_.has(T)?_.set(T,{...O,element:T}).toSorted(qI):(_.set(T,{...O,element:T}),_.toSorted(qI)):_),()=>{F(_=>!T||!_.has(T)?_:(_.delete(T),new jI(_)))}},[T,U,F]),(0,Ql.jsx)(m,{[p]:"",ref:k,children:S})});g.displayName=f;function x(){return ar.useState(new jI)}Zt(x,"useInitCollection");function v(y){let{itemMap:w}=a(e+"CollectionConsumer",y);return w}return Zt(v,"useCollection"),[{Provider:i,Slot:d,ItemSlot:g},{createCollectionScope:r,useCollection:v,useInitCollection:x}]}Zt(TJ,"createCollection");function jU(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let n of o)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}Zt(jU,"shallowEqual");function qU(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Zt(qU,"isElementPreceding");function qI(e,t){return!e[1].element||!t[1].element?0:qU(e[1].element,t[1].element)?-1:1}Zt(qI,"sortByDocumentPosition");function $U(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}Zt($U,"getChildListObserver");var XI=b(M(),1);var KU=b(M(),1),Ns=globalThis?.document?KU.useLayoutEffect:()=>{};var kJ=Object.defineProperty,MJ=(e,t)=>kJ(e,"name",{value:t,configurable:!0}),EJ=XI[" useId ".trim().toString()]||(()=>{}),AJ=0;function YI(e){let[t,o]=XI.useState(EJ());return Ns(()=>{e||o(r=>r??String(AJ++))},[e]),e||(t?`radix-${t}`:"")}MJ(YI,"useId");var cd=b(M(),1),DJ=Object.defineProperty,NJ=(e,t)=>DJ(e,"name",{value:t,configurable:!0});function QI(e){let t=cd.useRef(e);return cd.useEffect(()=>{t.current=e}),cd.useMemo(()=>(...o)=>t.current?.(...o),[])}NJ(QI,"useCallbackRef");var ln=b(M(),1);var qn=b(M(),1);var dd=b(M(),1),OJ=Object.defineProperty,FJ=(e,t)=>OJ(e,"name",{value:t,configurable:!0}),XU=dd[" useEffectEvent ".trim().toString()],YU=dd[" useInsertionEffect ".trim().toString()];function ZI(e){if(typeof XU=="function")return XU(e);let t=dd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof YU=="function"?YU(()=>{t.current=e}):Ns(()=>{t.current=e}),dd.useMemo(()=>(...o)=>t.current?.(...o),[])}FJ(ZI,"useEffectEvent");var _J=Object.defineProperty,Fm=(e,t)=>_J(e,"name",{value:t,configurable:!0}),VJ=ln[" useInsertionEffect ".trim().toString()]||Ns;function fd({prop:e,defaultProp:t,onChange:o=Fm(()=>{},"onChange"),caller:r}){let[n,a,i]=ZU({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;if(sd){let c=ln.useRef(e!==void 0);ln.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} 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,r])}let u=ln.useCallback(c=>{if(s){let d=JU(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}Fm(fd,"useControllableState");function ZU({defaultProp:e,onChange:t}){let[o,r]=ln.useState(e),n=ln.useRef(o),a=ln.useRef(t);return VJ(()=>{a.current=t},[t]),ln.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}Fm(ZU,"useUncontrolledState");function JU(e){return typeof e=="function"}Fm(JU,"isFunction");var QU=Symbol("RADIX:SYNC_STATE");function BJ(e,t,o,r){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=ZI(i);if(sd){let x=qn.useRef(n!==void 0);qn.useEffect(()=>{let v=x.current;v!==l&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${l?"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.`),x.current=l},[l,s])}let c=[{...o,state:a}];r&&c.push(r);let[d,f]=qn.useReducer((x,v)=>{if(v.type===QU)return{...x,state:v.state};let h=e(x,v);return l&&!Object.is(h.state,x.state)&&u(h.state),h},...c),p=d.state,m=qn.useRef(p);qn.useEffect(()=>{m.current!==p&&(m.current=p,l||u(p))},[p,m,l]);let g=qn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return qn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:QU,state:n})},[n,d.state,l]),[g,f]}Fm(BJ,"useControllableStateReducer");var Ry=b(M(),1),zJ=b(D(),1),HJ=Object.defineProperty,UJ=(e,t)=>HJ(e,"name",{value:t,configurable:!0}),GJ=Ry.createContext(void 0);function _m(e){let t=Ry.useContext(GJ);return e||t||"ltr"}UJ(_m,"useDirection");var jJ=b(M(),1),Iy=b(M(),1),WJ=Object.defineProperty,eP=(e,t)=>WJ(e,"name",{value:t,configurable:!0}),JI=!1;function ez(){let[e,t]=Iy.useState(JI);return Iy.useEffect(()=>{JI||(JI=!0,t(!0))},[]),e}eP(ez,"useIsHydrated");var tz=jJ[" useSyncExternalStore ".trim().toString()];function oz(){return()=>{}}eP(oz,"subscribe");function rz(){return tz(oz,()=>!0,()=>!1)}eP(rz,"useIsHydratedModern");var nz=typeof tz=="function"?rz:ez;var Os=b(D(),1),qJ=Object.defineProperty,Zl=(e,t)=>qJ(e,"name",{value:t,configurable:!0}),tP="rovingFocusGroup.onEntryFocus",$J={bubbles:!1,cancelable:!0},Py="RovingFocusGroup",[oP,az,KJ]=$I(Py),[XJ,rP]=gi(Py,[KJ]),[YJ,QJ]=XJ(Py),iz=Jt.forwardRef(Zl(function(t,o){return(0,Os.jsx)(oP.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,Os.jsx)(oP.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,Os.jsx)(ZJ,{...t,ref:o})})})},"RovingFocusGroup")),ZJ=Jt.forwardRef(Zl(function(t,o){let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=Jt.useRef(null),m=nn(o,p),g=_m(i),[x,v]=fd({prop:s,defaultProp:l??null,onChange:u,caller:Py}),[h,y]=Jt.useState(!1),w=QI(c),C=az(r),S=Jt.useRef(!1),[R,I]=Jt.useState(0);return Jt.useEffect(()=>{let T=p.current;if(T)return T.addEventListener(tP,w),()=>T.removeEventListener(tP,w)},[w]),(0,Os.jsx)(YJ,{scope:r,orientation:n,dir:g,loop:a,currentTabStopId:x,onItemFocus:Jt.useCallback(T=>v(T),[v]),onItemShiftTab:Jt.useCallback(()=>y(!0),[]),onFocusableItemAdd:Jt.useCallback(()=>I(T=>T+1),[]),onFocusableItemRemove:Jt.useCallback(()=>I(T=>T-1),[]),children:(0,Os.jsx)(ld.div,{tabIndex:h||R===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:Ds(t.onMouseDown,()=>{S.current=!0}),onFocus:Ds(t.onFocus,T=>{let L=!S.current;if(T.target===T.currentTarget&&L&&!h){let k=new CustomEvent(tP,$J);if(T.currentTarget.dispatchEvent(k),!k.defaultPrevented){let A=C().filter(_=>_.focusable),F=A.find(_=>_.active),N=A.find(_=>_.id===x),O=[F,N,...A].filter(Boolean).map(_=>_.ref.current);nP(O,d)}}S.current=!1}),onBlur:Ds(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),JJ="RovingFocusGroupItem",sz=Jt.forwardRef(Zl(function(t,o){let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=YI(),c=i||u,d=QJ(JJ,r),f=d.currentTabStopId===c,p=az(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:x}=d,v=nz();return Ns(()=>{if(!(!v||!n))return m(),()=>g()},[v,n,m,g]),Jt.useEffect(()=>{if(!(v||!n))return m(),()=>g()},[v,n,m,g]),(0,Os.jsx)(oP.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:(0,Os.jsx)(ld.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:o,onMouseDown:Ds(t.onMouseDown,h=>{n?d.onItemFocus(c):h.preventDefault()}),onFocus:Ds(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:Ds(t.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let y=uz(h,d.orientation,d.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let C=p().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();let S=C.indexOf(h.currentTarget);C=d.loop?cz(C,S+1):C.slice(S+1)}setTimeout(()=>nP(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),eee={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Zl(lz,"getDirectionAwareKey");function uz(e,t,o){let r=lz(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return eee[r]}Zl(uz,"getFocusIntent");function nP(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}Zl(nP,"focusFirst");function cz(e,t){return e.map((o,r)=>e[(t+r)%e.length])}Zl(cz,"wrapArray");var Uo=b(D(),1),oee=Object.defineProperty,Fs=(e,t)=>oee(e,"name",{value:t,configurable:!0}),pd="ToggleGroup",[fz,YAe]=gi(pd,[rP]),pz=rP(),mz=zo.forwardRef(Fs(function(t,o){let{type:r,...n}=t;if(r==="single")return(0,Uo.jsx)(ree,{role:"radiogroup",...n,ref:o});if(r==="multiple")return(0,Uo.jsx)(nee,{role:"toolbar",...n,ref:o});throw new Error(`Missing prop \`type\` expected on \`${pd}\``)},"ToggleGroup")),[gz,hz]=fz(pd),ree=zo.forwardRef(Fs(function(t,o){let{value:r,defaultValue:n,onValueChange:a=Fs(()=>{},"onValueChange"),...i}=t,[s,l]=fd({prop:r,defaultProp:n??"",onChange:a,caller:pd});return(0,Uo.jsx)(gz,{scope:t.__scopeToggleGroup,type:"single",value:zo.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:zo.useCallback(()=>l(""),[l]),children:(0,Uo.jsx)(vz,{...i,ref:o})})},"ToggleGroupImplSingle")),nee=zo.forwardRef(Fs(function(t,o){let{value:r,defaultValue:n,onValueChange:a=Fs(()=>{},"onValueChange"),...i}=t,[s,l]=fd({prop:r,defaultProp:n??[],onChange:a,caller:pd}),u=zo.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=zo.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,Uo.jsx)(gz,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,Uo.jsx)(vz,{...i,ref:o})})},"ToggleGroupImplMultiple")),[aee,iee]=fz(pd),vz=zo.forwardRef(Fs(function(t,o){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=pz(r),d=_m(s),f={dir:d,...u};return(0,Uo.jsx)(aee,{scope:r,rovingFocus:a,disabled:n,children:a?(0,Uo.jsx)(iz,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,Uo.jsx)(ld.div,{...f,ref:o})}):(0,Uo.jsx)(ld.div,{...f,ref:o})})},"ToggleGroupImpl")),aP="ToggleGroupItem",xz=zo.forwardRef(Fs(function(t,o){let r=hz(aP,t.__scopeToggleGroup),n=iee(aP,t.__scopeToggleGroup),a=pz(t.__scopeToggleGroup),i=r.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=zo.useRef(null);return n.rovingFocus?(0,Uo.jsx)(sz,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,Uo.jsx)(dz,{...l,ref:o})}):(0,Uo.jsx)(dz,{...l,ref:o})},"ToggleGroupItem")),dz=zo.forwardRef(Fs(function(t,o){let{__scopeToggleGroup:r,value:n,...a}=t,i=hz(aP,r),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,Uo.jsx)(Tm,{...l,...a,ref:o,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var Ly=b(D()),yz=Jl.createContext({size:"default",variant:"default"}),wz=Jl.forwardRef(({className:e,variant:t,size:o,children:r,...n},a)=>(0,Ly.jsx)(mz,{ref:a,className:P("moonui-theme inline-flex items-center justify-center gap-1",e),...n,children:(0,Ly.jsx)(yz.Provider,{value:{variant:t,size:o},children:r})}));wz.displayName="ToggleGroup";var Cz=Jl.forwardRef(({className:e,children:t,variant:o,size:r,...n},a)=>{let i=Jl.useContext(yz);return(0,Ly.jsx)(xz,{ref:a,className:P(uy({variant:i.variant??o,size:i.size??r}),e),...n,children:t})});Cz.displayName="ToggleGroupItem";export{GW as Accordion,wk as AccordionContent,xk as AccordionItem,yk as AccordionTrigger,bk as Alert,Ik as AlertDescription,Rk as AlertTitle,Lk as AspectRatio,dC as Avatar,fC as AvatarFallback,zk as AvatarGroup,Uk as AvatarImage,gr as Badge,Wk as Breadcrumb,pC as BreadcrumbEllipsis,qk as BreadcrumbItem,Kk as BreadcrumbLink,jk as BreadcrumbList,Xk as BreadcrumbPage,$k as BreadcrumbSeparator,De as Button,PU as ButtonGroup,TD as Card,gN as CardCVCInput,AD as CardContent,ED as CardDescription,mN as CardExpiryInput,DD as CardFooter,kD as CardHeader,pN as CardNumberInput,MD as CardTitle,hN as CardZipInput,LN as Carousel,kN as CarouselContent,EN as CarouselItem,DN as CarouselNext,AN as CarouselPrevious,DS as Checkbox,UN as CheckboxGroup,Jv as CheckboxLabel,zN as CheckboxWithLabel,l$ as Collapsible,jN as CollapsibleContent,WN as CollapsibleTrigger,wb as ColorPicker,Fb as Command,uK as CommandDialog,s_ as CommandEmpty,l_ as CommandGroup,a_ as CommandInput,c_ as CommandItem,i_ as CommandList,u_ as CommandSeparator,d_ as CommandShortcut,E_ as DatePicker,aX as DateRangePicker,iX as DateTimePicker,Db as Dialog,nK as DialogClose,Dx as DialogContent,Ob as DialogDescription,n_ as DialogFooter,sK as DialogForm,Nb as DialogHeader,lm as DialogTitle,oK as DialogTrigger,lX as DraggableList,eY as DropdownMenu,qV as DropdownMenuCheckboxItem,WV as DropdownMenuContent,oY as DropdownMenuGroup,jV as DropdownMenuItem,KV as DropdownMenuLabel,rY as DropdownMenuPortal,aY as DropdownMenuRadioGroup,$V as DropdownMenuRadioItem,XV as DropdownMenuSeparator,YV as DropdownMenuShortcut,nY as DropdownMenuSub,GV as DropdownMenuSubContent,zV as DropdownMenuSubTrigger,tY as DropdownMenuTrigger,ZV as FileUpload,kY as FreeBadge,eB as GestureDrawer,vTe as GitHubStarButton,cY as GitHubStars,b7 as GradientPicker,Co as Input,aB as InputOTP,iB as InputOTPGroup,uB as InputOTPSeparator,lB as InputOTPSlot,xU as Kbd,tr as Label,cB as LockedComponent,sX as MonthPicker,PR as MoonLogo,OTe as MoonLogoAnimated,NTe as MoonLogoIcon,GW as MoonUIAccordion,wk as MoonUIAccordionContent,xk as MoonUIAccordionItem,yk as MoonUIAccordionTrigger,bk as MoonUIAlert,Ik as MoonUIAlertDescription,Rk as MoonUIAlertTitle,Lk as MoonUIAspectRatio,dC as MoonUIAvatar,fC as MoonUIAvatarFallback,zk as MoonUIAvatarGroup,Uk as MoonUIAvatarImage,gr as MoonUIBadge,Wk as MoonUIBreadcrumb,pC as MoonUIBreadcrumbEllipsis,qk as MoonUIBreadcrumbItem,Kk as MoonUIBreadcrumbLink,jk as MoonUIBreadcrumbList,Xk as MoonUIBreadcrumbPage,$k as MoonUIBreadcrumbSeparator,De as MoonUIButton,PU as MoonUIButtonGroup,Vp as MoonUICalendar,TD as MoonUICard,gN as MoonUICardCVCInput,AD as MoonUICardContent,ED as MoonUICardDescription,mN as MoonUICardExpiryInput,DD as MoonUICardFooter,kD as MoonUICardHeader,pN as MoonUICardNumberInput,MD as MoonUICardTitle,hN as MoonUICardZipInput,LN as MoonUICarousel,kN as MoonUICarouselContent,EN as MoonUICarouselItem,DN as MoonUICarouselNext,AN as MoonUICarouselPrevious,DS as MoonUICheckbox,UN as MoonUICheckboxGroup,Jv as MoonUICheckboxLabel,zN as MoonUICheckboxWithLabel,l$ as MoonUICollapsible,jN as MoonUICollapsibleContent,WN as MoonUICollapsibleTrigger,wb as MoonUIColorPicker,Fb as MoonUICommand,uK as MoonUICommandDialog,s_ as MoonUICommandEmpty,l_ as MoonUICommandGroup,a_ as MoonUICommandInput,c_ as MoonUICommandItem,i_ as MoonUICommandList,u_ as MoonUICommandSeparator,d_ as MoonUICommandShortcut,oX as MoonUIDataTableBasic,E_ as MoonUIDatePicker,aX as MoonUIDateRangePicker,iX as MoonUIDateTimePicker,Db as MoonUIDialog,nK as MoonUIDialogClose,Dx as MoonUIDialogContent,Ob as MoonUIDialogDescription,n_ as MoonUIDialogFooter,Nb as MoonUIDialogHeader,lm as MoonUIDialogTitle,oK as MoonUIDialogTrigger,lX as MoonUIDraggableList,eY as MoonUIDropdownMenu,qV as MoonUIDropdownMenuCheckboxItem,WV as MoonUIDropdownMenuContent,oY as MoonUIDropdownMenuGroup,jV as MoonUIDropdownMenuItem,KV as MoonUIDropdownMenuLabel,rY as MoonUIDropdownMenuPortal,aY as MoonUIDropdownMenuRadioGroup,$V as MoonUIDropdownMenuRadioItem,XV as MoonUIDropdownMenuSeparator,YV as MoonUIDropdownMenuShortcut,nY as MoonUIDropdownMenuSub,GV as MoonUIDropdownMenuSubContent,zV as MoonUIDropdownMenuSubTrigger,tY as MoonUIDropdownMenuTrigger,ZV as MoonUIFileUpload,kY as MoonUIFreeBadge,eB as MoonUIGestureDrawer,cY as MoonUIGitHubStars,b7 as MoonUIGradientPicker,Co as MoonUIInput,aB as MoonUIInputOTP,iB as MoonUIInputOTPGroup,uB as MoonUIInputOTPSeparator,lB as MoonUIInputOTPSlot,xU as MoonUIKbd,tr as MoonUILabel,cB as MoonUILockedComponent,sX as MoonUIMonthPicker,PR as MoonUIMoonLogo,fB as MoonUIPagination,pB as MoonUIPaginationContent,vB as MoonUIPaginationEllipsis,mB as MoonUIPaginationItem,Xx as MoonUIPaginationLink,hB as MoonUIPaginationNext,gB as MoonUIPaginationPrevious,sH as MoonUIPhoneInput,oi as MoonUIPopover,va as MoonUIPopoverContent,ri as MoonUIPopoverTrigger,TY as MoonUIProBadge,LY as MoonUIProComponentWrapper,qx as MoonUIProgress,uH as MoonUIRadioGroup,qR as MoonUIRadioGroupItem,cH as MoonUIRadioItemWithLabel,$R as MoonUIRadioLabel,CU as MoonUIRating,rQ as MoonUIRichTextEditor,BH as MoonUIScrollArea,eI as MoonUIScrollBar,zH as MoonUIScrollReveal,GH as MoonUIScrollRevealContainer,WH as MoonUIScrollRevealItem,Xc as MoonUISelect,Qc as MoonUISelectContent,JY as MoonUISelectGroup,Ho as MoonUISelectItem,nH as MoonUISelectLabel,jR as MoonUISelectScrollDownButton,WR as MoonUISelectScrollUpButton,aH as MoonUISelectSeparator,Yc as MoonUISelectTrigger,Sm as MoonUISelectValue,Zr as MoonUISeparator,S7 as MoonUISimpleColorPicker,N3 as MoonUISimpleEditor,Es as MoonUISkeleton,yI as MoonUISkeletonAvatar,F3 as MoonUISkeletonCard,xI as MoonUISkeletonText,si as MoonUISlider,RU as MoonUISpinner,_3 as MoonUISwipeableCard,q3 as MoonUISwitch,Vx as MoonUITable,Hx as MoonUITableBody,M_ as MoonUITableCaption,fm as MoonUITableCell,k_ as MoonUITableFooter,Ux as MoonUITableHead,Bx as MoonUITableHeader,qc as MoonUITableRow,Px as MoonUITabs,zc as MoonUITabsContent,Lx as MoonUITabsList,Uc as MoonUITabsTrigger,$3 as MoonUITagsInput,K3 as MoonUITextarea,FI as MoonUIToast,pU as MoonUIToastAction,_I as MoonUIToastClose,BI as MoonUIToastDescription,fU as MoonUIToastProvider,VI as MoonUIToastTitle,OI as MoonUIToastViewport,sJ as MoonUIToaster,cy as MoonUIToggle,wz as MoonUIToggleGroup,Cz as MoonUIToggleGroupItem,my as MoonUITooltip,Em as MoonUITooltipContent,vI as MoonUITooltipProvider,gy as MoonUITooltipTrigger,fB as Pagination,pB as PaginationContent,vB as PaginationEllipsis,mB as PaginationItem,Xx as PaginationLink,hB as PaginationNext,gB as PaginationPrevious,Hu as Palette,sH as PhoneInput,hh as Pipette,oi as Popover,LPe as PopoverAnchor,TPe as PopoverClose,va as PopoverContent,e7 as PopoverFooter,J9 as PopoverHeader,Z9 as PopoverSeparator,ri as PopoverTrigger,TY as ProBadge,LY as ProComponentWrapper,qx as Progress,IY as REGEXP_ONLY_CHARS,RY as REGEXP_ONLY_DIGITS,PY as REGEXP_ONLY_DIGITS_AND_CHARS,uH as RadioGroup,qR as RadioGroupItem,cH as RadioItemWithLabel,$R as RadioLabel,CU as Rating,rQ as RichTextEditor,BH as ScrollArea,eI as ScrollBar,zH as ScrollReveal,GH as ScrollRevealContainer,WH as ScrollRevealItem,Xc as Select,Qc as SelectContent,JY as SelectGroup,Ho as SelectItem,nH as SelectLabel,jR as SelectScrollDownButton,WR as SelectScrollUpButton,aH as SelectSeparator,Yc as SelectTrigger,Sm as SelectValue,Zr as Separator,S7 as SimpleColorPicker,N3 as SimpleEditor,kZ as SimpleTooltip,Es as Skeleton,yI as SkeletonAvatar,F3 as SkeletonCard,xI as SkeletonText,si as Slider,RU as Spinner,_3 as SwipeableCard,q3 as Switch,Vx as Table,Hx as TableBody,M_ as TableCaption,fm as TableCell,k_ as TableFooter,Ux as TableHead,Bx as TableHeader,qc as TableRow,Px as Tabs,zc as TabsContent,Lx as TabsList,Uc as TabsTrigger,$3 as TagsInput,K3 as Textarea,FI as Toast,pU as ToastAction,_I as ToastClose,BI as ToastDescription,fU as ToastProvider,VI as ToastTitle,OI as ToastViewport,sJ as Toaster,cy as Toggle,wz as ToggleGroup,Cz as ToggleGroupItem,my as Tooltip,D3 as TooltipArrow,Em as TooltipContent,vI as TooltipProvider,gy as TooltipTrigger,jW as aspectRatioVariants,Gk as badgeVariants,IU as buttonGroupVariants,yh as buttonVariants,TN as carouselContentVariants,MN as carouselItemVariants,P as cn,u$ as collapsibleContentVariants,GN as collapsibleTriggerVariants,Mn as format,sB as inputOTPSlotVariants,vU as kbdVariants,Gk as moonUIBadgeVariants,IU as moonUIButtonGroupVariants,yh as moonUIButtonVariants,TN as moonUICarouselContentVariants,MN as moonUICarouselItemVariants,rX as moonUICreateSortableHeader,sB as moonUIInputOTPSlotVariants,vU as moonUIKbdVariants,wU as moonUIRatingVariants,O3 as moonUISkeletonVariants,bU as moonUISpinnerVariants,uy as moonUIToggleVariants,Q9 as popoverContentVariants,iY as progressVariants,wU as ratingVariants,HQ as separatorVariants,O3 as skeletonVariants,bU as spinnerVariants,mU as toast,uy as toggleVariants,TZ as tooltipVariants,qp as useCarousel,gU as useToast};
86
86
  /*! Bundled license information:
87
87
 
88
- react/cjs/react.production.min.js:
89
- (**
90
- * @license React
91
- * react.production.min.js
92
- *
93
- * Copyright (c) Facebook, Inc. and its affiliates.
94
- *
95
- * This source code is licensed under the MIT license found in the
96
- * LICENSE file in the root directory of this source tree.
97
- *)
98
-
99
- react/cjs/react-jsx-runtime.production.min.js:
100
- (**
101
- * @license React
102
- * react-jsx-runtime.production.min.js
103
- *
104
- * Copyright (c) Facebook, Inc. and its affiliates.
105
- *
106
- * This source code is licensed under the MIT license found in the
107
- * LICENSE file in the root directory of this source tree.
108
- *)
109
-
110
88
  scheduler/cjs/scheduler.production.min.js:
111
89
  (**
112
90
  * @license React
@@ -661,6 +639,341 @@ lucide-react/dist/esm/lucide-react.js:
661
639
  *)
662
640
  */
663
641
 
642
+ if (typeof window !== 'undefined' && !window.React) {
643
+ console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
644
+ }
645
+ //# sourceMappingURL=index.global.js.map of this source tree.
646
+ *)
647
+
648
+ lucide-react/dist/esm/icons/code.js:
649
+ (**
650
+ * @license lucide-react v0.525.0 - ISC
651
+ *
652
+ * This source code is licensed under the ISC license.
653
+ * See the LICENSE file in the root directory of this source tree.
654
+ *)
655
+
656
+ lucide-react/dist/esm/icons/copy.js:
657
+ (**
658
+ * @license lucide-react v0.525.0 - ISC
659
+ *
660
+ * This source code is licensed under the ISC license.
661
+ * See the LICENSE file in the root directory of this source tree.
662
+ *)
663
+
664
+ lucide-react/dist/esm/icons/credit-card.js:
665
+ (**
666
+ * @license lucide-react v0.525.0 - ISC
667
+ *
668
+ * This source code is licensed under the ISC license.
669
+ * See the LICENSE file in the root directory of this source tree.
670
+ *)
671
+
672
+ lucide-react/dist/esm/icons/crown.js:
673
+ (**
674
+ * @license lucide-react v0.525.0 - ISC
675
+ *
676
+ * This source code is licensed under the ISC license.
677
+ * See the LICENSE file in the root directory of this source tree.
678
+ *)
679
+
680
+ lucide-react/dist/esm/icons/dot.js:
681
+ (**
682
+ * @license lucide-react v0.525.0 - ISC
683
+ *
684
+ * This source code is licensed under the ISC license.
685
+ * See the LICENSE file in the root directory of this source tree.
686
+ *)
687
+
688
+ lucide-react/dist/esm/icons/ellipsis.js:
689
+ (**
690
+ * @license lucide-react v0.525.0 - ISC
691
+ *
692
+ * This source code is licensed under the ISC license.
693
+ * See the LICENSE file in the root directory of this source tree.
694
+ *)
695
+
696
+ lucide-react/dist/esm/icons/external-link.js:
697
+ (**
698
+ * @license lucide-react v0.525.0 - ISC
699
+ *
700
+ * This source code is licensed under the ISC license.
701
+ * See the LICENSE file in the root directory of this source tree.
702
+ *)
703
+
704
+ lucide-react/dist/esm/icons/eye.js:
705
+ (**
706
+ * @license lucide-react v0.525.0 - ISC
707
+ *
708
+ * This source code is licensed under the ISC license.
709
+ * See the LICENSE file in the root directory of this source tree.
710
+ *)
711
+
712
+ lucide-react/dist/esm/icons/file-text.js:
713
+ (**
714
+ * @license lucide-react v0.525.0 - ISC
715
+ *
716
+ * This source code is licensed under the ISC license.
717
+ * See the LICENSE file in the root directory of this source tree.
718
+ *)
719
+
720
+ lucide-react/dist/esm/icons/file.js:
721
+ (**
722
+ * @license lucide-react v0.525.0 - ISC
723
+ *
724
+ * This source code is licensed under the ISC license.
725
+ * See the LICENSE file in the root directory of this source tree.
726
+ *)
727
+
728
+ lucide-react/dist/esm/icons/git-fork.js:
729
+ (**
730
+ * @license lucide-react v0.525.0 - ISC
731
+ *
732
+ * This source code is licensed under the ISC license.
733
+ * See the LICENSE file in the root directory of this source tree.
734
+ *)
735
+
736
+ lucide-react/dist/esm/icons/image.js:
737
+ (**
738
+ * @license lucide-react v0.525.0 - ISC
739
+ *
740
+ * This source code is licensed under the ISC license.
741
+ * See the LICENSE file in the root directory of this source tree.
742
+ *)
743
+
744
+ lucide-react/dist/esm/icons/info.js:
745
+ (**
746
+ * @license lucide-react v0.525.0 - ISC
747
+ *
748
+ * This source code is licensed under the ISC license.
749
+ * See the LICENSE file in the root directory of this source tree.
750
+ *)
751
+
752
+ lucide-react/dist/esm/icons/italic.js:
753
+ (**
754
+ * @license lucide-react v0.525.0 - ISC
755
+ *
756
+ * This source code is licensed under the ISC license.
757
+ * See the LICENSE file in the root directory of this source tree.
758
+ *)
759
+
760
+ lucide-react/dist/esm/icons/link.js:
761
+ (**
762
+ * @license lucide-react v0.525.0 - ISC
763
+ *
764
+ * This source code is licensed under the ISC license.
765
+ * See the LICENSE file in the root directory of this source tree.
766
+ *)
767
+
768
+ lucide-react/dist/esm/icons/list-ordered.js:
769
+ (**
770
+ * @license lucide-react v0.525.0 - ISC
771
+ *
772
+ * This source code is licensed under the ISC license.
773
+ * See the LICENSE file in the root directory of this source tree.
774
+ *)
775
+
776
+ lucide-react/dist/esm/icons/list.js:
777
+ (**
778
+ * @license lucide-react v0.525.0 - ISC
779
+ *
780
+ * This source code is licensed under the ISC license.
781
+ * See the LICENSE file in the root directory of this source tree.
782
+ *)
783
+
784
+ lucide-react/dist/esm/icons/loader-circle.js:
785
+ (**
786
+ * @license lucide-react v0.525.0 - ISC
787
+ *
788
+ * This source code is licensed under the ISC license.
789
+ * See the LICENSE file in the root directory of this source tree.
790
+ *)
791
+
792
+ lucide-react/dist/esm/icons/lock.js:
793
+ (**
794
+ * @license lucide-react v0.525.0 - ISC
795
+ *
796
+ * This source code is licensed under the ISC license.
797
+ * See the LICENSE file in the root directory of this source tree.
798
+ *)
799
+
800
+ lucide-react/dist/esm/icons/minus.js:
801
+ (**
802
+ * @license lucide-react v0.525.0 - ISC
803
+ *
804
+ * This source code is licensed under the ISC license.
805
+ * See the LICENSE file in the root directory of this source tree.
806
+ *)
807
+
808
+ lucide-react/dist/esm/icons/music.js:
809
+ (**
810
+ * @license lucide-react v0.525.0 - ISC
811
+ *
812
+ * This source code is licensed under the ISC license.
813
+ * See the LICENSE file in the root directory of this source tree.
814
+ *)
815
+
816
+ lucide-react/dist/esm/icons/palette.js:
817
+ (**
818
+ * @license lucide-react v0.525.0 - ISC
819
+ *
820
+ * This source code is licensed under the ISC license.
821
+ * See the LICENSE file in the root directory of this source tree.
822
+ *)
823
+
824
+ lucide-react/dist/esm/icons/phone.js:
825
+ (**
826
+ * @license lucide-react v0.525.0 - ISC
827
+ *
828
+ * This source code is licensed under the ISC license.
829
+ * See the LICENSE file in the root directory of this source tree.
830
+ *)
831
+
832
+ lucide-react/dist/esm/icons/pipette.js:
833
+ (**
834
+ * @license lucide-react v0.525.0 - ISC
835
+ *
836
+ * This source code is licensed under the ISC license.
837
+ * See the LICENSE file in the root directory of this source tree.
838
+ *)
839
+
840
+ lucide-react/dist/esm/icons/quote.js:
841
+ (**
842
+ * @license lucide-react v0.525.0 - ISC
843
+ *
844
+ * This source code is licensed under the ISC license.
845
+ * See the LICENSE file in the root directory of this source tree.
846
+ *)
847
+
848
+ lucide-react/dist/esm/icons/redo.js:
849
+ (**
850
+ * @license lucide-react v0.525.0 - ISC
851
+ *
852
+ * This source code is licensed under the ISC license.
853
+ * See the LICENSE file in the root directory of this source tree.
854
+ *)
855
+
856
+ lucide-react/dist/esm/icons/search.js:
857
+ (**
858
+ * @license lucide-react v0.525.0 - ISC
859
+ *
860
+ * This source code is licensed under the ISC license.
861
+ * See the LICENSE file in the root directory of this source tree.
862
+ *)
863
+
864
+ lucide-react/dist/esm/icons/square-pen.js:
865
+ (**
866
+ * @license lucide-react v0.525.0 - ISC
867
+ *
868
+ * This source code is licensed under the ISC license.
869
+ * See the LICENSE file in the root directory of this source tree.
870
+ *)
871
+
872
+ lucide-react/dist/esm/icons/star.js:
873
+ (**
874
+ * @license lucide-react v0.525.0 - ISC
875
+ *
876
+ * This source code is licensed under the ISC license.
877
+ * See the LICENSE file in the root directory of this source tree.
878
+ *)
879
+
880
+ lucide-react/dist/esm/icons/strikethrough.js:
881
+ (**
882
+ * @license lucide-react v0.525.0 - ISC
883
+ *
884
+ * This source code is licensed under the ISC license.
885
+ * See the LICENSE file in the root directory of this source tree.
886
+ *)
887
+
888
+ lucide-react/dist/esm/icons/triangle-alert.js:
889
+ (**
890
+ * @license lucide-react v0.525.0 - ISC
891
+ *
892
+ * This source code is licensed under the ISC license.
893
+ * See the LICENSE file in the root directory of this source tree.
894
+ *)
895
+
896
+ lucide-react/dist/esm/icons/underline.js:
897
+ (**
898
+ * @license lucide-react v0.525.0 - ISC
899
+ *
900
+ * This source code is licensed under the ISC license.
901
+ * See the LICENSE file in the root directory of this source tree.
902
+ *)
903
+
904
+ lucide-react/dist/esm/icons/undo.js:
905
+ (**
906
+ * @license lucide-react v0.525.0 - ISC
907
+ *
908
+ * This source code is licensed under the ISC license.
909
+ * See the LICENSE file in the root directory of this source tree.
910
+ *)
911
+
912
+ lucide-react/dist/esm/icons/upload.js:
913
+ (**
914
+ * @license lucide-react v0.525.0 - ISC
915
+ *
916
+ * This source code is licensed under the ISC license.
917
+ * See the LICENSE file in the root directory of this source tree.
918
+ *)
919
+
920
+ lucide-react/dist/esm/icons/video.js:
921
+ (**
922
+ * @license lucide-react v0.525.0 - ISC
923
+ *
924
+ * This source code is licensed under the ISC license.
925
+ * See the LICENSE file in the root directory of this source tree.
926
+ *)
927
+
928
+ lucide-react/dist/esm/icons/x.js:
929
+ (**
930
+ * @license lucide-react v0.525.0 - ISC
931
+ *
932
+ * This source code is licensed under the ISC license.
933
+ * See the LICENSE file in the root directory of this source tree.
934
+ *)
935
+
936
+ lucide-react/dist/esm/icons/zap.js:
937
+ (**
938
+ * @license lucide-react v0.525.0 - ISC
939
+ *
940
+ * This source code is licensed under the ISC license.
941
+ * See the LICENSE file in the root directory of this source tree.
942
+ *)
943
+
944
+ lucide-react/dist/esm/lucide-react.js:
945
+ (**
946
+ * @license lucide-react v0.525.0 - ISC
947
+ *
948
+ * This source code is licensed under the ISC license.
949
+ * See the LICENSE file in the root directory of this source tree.
950
+ *)
951
+
952
+ @tanstack/table-core/build/lib/index.mjs:
953
+ (**
954
+ * table-core
955
+ *
956
+ * Copyright (c) TanStack
957
+ *
958
+ * This source code is licensed under the MIT license found in the
959
+ * LICENSE.md file in the root directory of this source tree.
960
+ *
961
+ * @license MIT
962
+ *)
963
+
964
+ @tanstack/react-table/build/lib/index.mjs:
965
+ (**
966
+ * react-table
967
+ *
968
+ * Copyright (c) TanStack
969
+ *
970
+ * This source code is licensed under the MIT license found in the
971
+ * LICENSE.md file in the root directory of this source tree.
972
+ *
973
+ * @license MIT
974
+ *)
975
+ */
976
+
664
977
  if (typeof window !== 'undefined' && !window.React) {
665
978
  console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
666
979
  }