@moontra/moonui 3.2.0 → 3.4.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.
- package/dist/chunk-VXDFZPDA.global.js +33 -0
- package/dist/{chunk-X5ULQZNC.global.js.map → chunk-VXDFZPDA.global.js.map} +1 -1
- package/dist/index.d.mts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.global.js +41 -19
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +216 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +208 -22
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.global.js +30 -6
- package/dist/lib/theme.global.js.map +1 -1
- package/package.json +2 -1
- package/src/components/ui/__tests__/button-group.test.tsx +183 -0
- package/src/components/ui/__tests__/checkbox.test.tsx +16 -12
- package/src/components/ui/__tests__/color-picker.test.tsx +147 -331
- package/src/components/ui/__tests__/radio-group.test.tsx +60 -0
- package/src/components/ui/__tests__/slider.test.tsx +96 -0
- package/src/components/ui/__tests__/toggle-group.test.tsx +323 -0
- package/src/components/ui/button-group.tsx +125 -0
- package/src/components/ui/checkbox.tsx +20 -18
- package/src/components/ui/color-picker.tsx +12 -0
- package/src/components/ui/index.ts +30 -0
- package/src/components/ui/radio-group.tsx +47 -8
- package/src/components/ui/slider.tsx +56 -2
- package/src/components/ui/toggle-group.tsx +97 -0
- package/dist/chunk-X5ULQZNC.global.js +0 -33
package/dist/index.global.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
/** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
|
|
4
|
-
import{a as JH,b as Pl,c as R,d as E,e as D}from"./chunk-X5ULQZNC.global.js";var tI=Pl(Xe=>{"use strict";function Fx(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<Jp(n,t))e[o]=t,e[r]=n,r=o;else break e}}function Xo(e){return e.length===0?null:e[0]}function tm(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>Jp(s,r))l<n&&0>Jp(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>Jp(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function Jp(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(jR=performance,Xe.unstable_now=function(){return jR.now()}):(Dx=Date,$R=Dx.now(),Xe.unstable_now=function(){return Dx.now()-$R});var jR,Dx,$R,Dn=[],Za=[],c3=1,bo=null,nr=3,rm=!1,fs=!1,Nc=!1,YR=typeof setTimeout=="function"?setTimeout:null,QR=typeof clearTimeout=="function"?clearTimeout:null,KR=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _x(e){for(var t=Xo(Za);t!==null;){if(t.callback===null)tm(Za);else if(t.startTime<=e)tm(Za),t.sortIndex=t.expirationTime,Fx(Dn,t);else break;t=Xo(Za)}}function Vx(e){if(Nc=!1,_x(e),!fs)if(Xo(Dn)!==null)fs=!0,Hx(Bx);else{var t=Xo(Za);t!==null&&Ux(Vx,t.startTime-e)}}function Bx(e,t){fs=!1,Nc&&(Nc=!1,QR(Oc),Oc=-1),rm=!0;var r=nr;try{for(_x(t),bo=Xo(Dn);bo!==null&&(!(bo.expirationTime>t)||e&&!eI());){var o=bo.callback;if(typeof o=="function"){bo.callback=null,nr=bo.priorityLevel;var n=o(bo.expirationTime<=t);t=Xe.unstable_now(),typeof n=="function"?bo.callback=n:bo===Xo(Dn)&&tm(Dn),_x(t)}else tm(Dn);bo=Xo(Dn)}if(bo!==null)var a=!0;else{var i=Xo(Za);i!==null&&Ux(Vx,i.startTime-t),a=!1}return a}finally{bo=null,nr=r,rm=!1}}var om=!1,em=null,Oc=-1,ZR=5,JR=-1;function eI(){return!(Xe.unstable_now()-JR<ZR)}function Nx(){if(em!==null){var e=Xe.unstable_now();JR=e;var t=!0;try{t=em(!0,e)}finally{t?Dc():(om=!1,em=null)}}else om=!1}var Dc;typeof KR=="function"?Dc=function(){KR(Nx)}:typeof MessageChannel<"u"?(Ox=new MessageChannel,XR=Ox.port2,Ox.port1.onmessage=Nx,Dc=function(){XR.postMessage(null)}):Dc=function(){YR(Nx,0)};var Ox,XR;function Hx(e){em=e,om||(om=!0,Dc())}function Ux(e,t){Oc=YR(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(){fs||rm||(fs=!0,Hx(Bx))};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"):ZR=0<e?Math.floor(1e3/e):5};Xe.unstable_getCurrentPriorityLevel=function(){return nr};Xe.unstable_getFirstCallbackNode=function(){return Xo(Dn)};Xe.unstable_next=function(e){switch(nr){case 1:case 2:case 3:var t=3;break;default:t=nr}var r=nr;nr=t;try{return e()}finally{nr=r}};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 r=nr;nr=e;try{return t()}finally{nr=r}};Xe.unstable_scheduleCallback=function(e,t,r){var o=Xe.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:c3++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,Fx(Za,e),Xo(Dn)===null&&e===Xo(Za)&&(Nc?(QR(Oc),Oc=-1):Nc=!0,Ux(Vx,r-o))):(e.sortIndex=n,Fx(Dn,e),fs||rm||(fs=!0,Hx(Bx))),e};Xe.unstable_shouldYield=eI;Xe.unstable_wrapCallback=function(e){var t=nr;return function(){var r=nr;nr=t;try{return e.apply(this,arguments)}finally{nr=r}}}});var oI=Pl((jY,rI)=>{"use strict";rI.exports=tI()});var s1=Pl(no=>{"use strict";var d3=E(),ro=oI();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 cL=new Set,od={};function Is(e,t){Xl(e,t),Xl(e+"Capture",t)}function Xl(e,t){for(od[e]=t,e=0;e<t.length;e++)cL.add(t[e])}var ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cy=Object.prototype.hasOwnProperty,f3=/^[: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]*$/,nI={},aI={};function p3(e){return cy.call(aI,e)?!0:cy.call(nI,e)?!1:f3.test(e)?aI[e]=!0:(nI[e]=!0,!1)}function m3(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 g3(e,t,r,o){if(t===null||typeof t>"u"||m3(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ir(e,t,r,o,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var Qt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Qt[e]=new Ir(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Qt[t]=new Ir(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qt[e]=new Ir(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qt[e]=new Ir(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Qt[e]=new Ir(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Qt[e]=new Ir(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Qt[e]=new Ir(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Qt[e]=new Ir(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Qt[e]=new Ir(e,5,!1,e.toLowerCase(),null,!1,!1)});var r0=/[\-:]([a-z])/g;function o0(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(r0,o0);Qt[t]=new Ir(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r0,o0);Qt[t]=new Ir(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r0,o0);Qt[t]=new Ir(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Qt[e]=new Ir(e,1,!1,e.toLowerCase(),null,!1,!1)});Qt.xlinkHref=new Ir("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Qt[e]=new Ir(e,1,!1,e.toLowerCase(),null,!0,!0)});function n0(e,t,r,o){var n=Qt.hasOwnProperty(t)?Qt[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(g3(t,r,n,o)&&(r=null),o||n===null?p3(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 ma=d3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,nm=Symbol.for("react.element"),El=Symbol.for("react.portal"),Al=Symbol.for("react.fragment"),a0=Symbol.for("react.strict_mode"),dy=Symbol.for("react.profiler"),dL=Symbol.for("react.provider"),fL=Symbol.for("react.context"),i0=Symbol.for("react.forward_ref"),fy=Symbol.for("react.suspense"),py=Symbol.for("react.suspense_list"),s0=Symbol.for("react.memo"),ei=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var pL=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var iI=Symbol.iterator;function Fc(e){return e===null||typeof e!="object"?null:(e=iI&&e[iI]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,zx;function Wc(e){if(zx===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);zx=t&&t[1]||""}return`
|
|
5
|
-
`+
|
|
4
|
+
var q4=Object.create;var ag=Object.defineProperty;var $4=Object.getOwnPropertyDescriptor;var K4=Object.getOwnPropertyNames;var X4=Object.getPrototypeOf,Y4=Object.prototype.hasOwnProperty;var Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q4=(e,t)=>{for(var r in t)ag(e,r,{get:t[r],enumerable:!0})},C1=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of K4(t))!Y4.call(e,n)&&n!==r&&ag(e,n,{get:()=>t[n],enumerable:!(o=$4(t,n))||o.enumerable});return e};var b=(e,t,r)=>(r=e!=null?q4(X4(e)):{},C1(t||!e||!e.__esModule?ag(r,"default",{value:e,enumerable:!0}):r,e)),Z4=e=>C1(ag({},"__esModule",{value:!0}),e);var S1=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var tr=(e,t,r)=>(S1(e,t,"read from private field"),r?r.call(e):t.get(e)),s0=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ig=(e,t,r,o)=>(S1(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);var N1=Zn(Me=>{"use strict";var Pd=Symbol.for("react.element"),J4=Symbol.for("react.portal"),e5=Symbol.for("react.fragment"),t5=Symbol.for("react.strict_mode"),r5=Symbol.for("react.profiler"),o5=Symbol.for("react.provider"),n5=Symbol.for("react.context"),a5=Symbol.for("react.forward_ref"),i5=Symbol.for("react.suspense"),s5=Symbol.for("react.memo"),l5=Symbol.for("react.lazy"),b1=Symbol.iterator;function u5(e){return e===null||typeof e!="object"?null:(e=b1&&e[b1]||e["@@iterator"],typeof e=="function"?e:null)}var P1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L1=Object.assign,T1={};function du(e,t,r){this.props=e,this.context=t,this.refs=T1,this.updater=r||P1}du.prototype.isReactComponent={};du.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")};du.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function k1(){}k1.prototype=du.prototype;function u0(e,t,r){this.props=e,this.context=t,this.refs=T1,this.updater=r||P1}var c0=u0.prototype=new k1;c0.constructor=u0;L1(c0,du.prototype);c0.isPureReactComponent=!0;var R1=Array.isArray,M1=Object.prototype.hasOwnProperty,d0={current:null},E1={key:!0,ref:!0,__self:!0,__source:!0};function A1(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)M1.call(t,o)&&!E1.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:Pd,type:e,key:a,ref:i,props:n,_owner:d0.current}}function c5(e,t){return{$$typeof:Pd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function f0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pd}function d5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var I1=/\/+/g;function l0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?d5(""+e.key):t.toString(36)}function lg(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 Pd:case J4:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+l0(i,0):o,R1(n)?(r="",e!=null&&(r=e.replace(I1,"$&/")+"/"),lg(n,t,r,"",function(u){return u})):n!=null&&(f0(n)&&(n=c5(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(I1,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",R1(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+l0(a,s);i+=lg(a,t,r,l,n)}else if(l=u5(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+l0(a,s++),i+=lg(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 sg(e,t,r){if(e==null)return e;var o=[],n=0;return lg(e,o,"","",function(a){return t.call(r,a,n++)}),o}function f5(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 Er={current:null},ug={transition:null},p5={ReactCurrentDispatcher:Er,ReactCurrentBatchConfig:ug,ReactCurrentOwner:d0};function D1(){throw Error("act(...) is not supported in production builds of React.")}Me.Children={map:sg,forEach:function(e,t,r){sg(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return sg(e,function(){t++}),t},toArray:function(e){return sg(e,function(t){return t})||[]},only:function(e){if(!f0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Me.Component=du;Me.Fragment=e5;Me.Profiler=r5;Me.PureComponent=u0;Me.StrictMode=t5;Me.Suspense=i5;Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p5;Me.act=D1;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=L1({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=d0.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)M1.call(t,l)&&!E1.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:Pd,type:e.type,key:n,ref:a,props:o,_owner:i}};Me.createContext=function(e){return e={$$typeof:n5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o5,_context:e},e.Consumer=e};Me.createElement=A1;Me.createFactory=function(e){var t=A1.bind(null,e);return t.type=e,t};Me.createRef=function(){return{current:null}};Me.forwardRef=function(e){return{$$typeof:a5,render:e}};Me.isValidElement=f0;Me.lazy=function(e){return{$$typeof:l5,_payload:{_status:-1,_result:e},_init:f5}};Me.memo=function(e,t){return{$$typeof:s5,type:e,compare:t===void 0?null:t}};Me.startTransition=function(e){var t=ug.transition;ug.transition={};try{e()}finally{ug.transition=t}};Me.unstable_act=D1;Me.useCallback=function(e,t){return Er.current.useCallback(e,t)};Me.useContext=function(e){return Er.current.useContext(e)};Me.useDebugValue=function(){};Me.useDeferredValue=function(e){return Er.current.useDeferredValue(e)};Me.useEffect=function(e,t){return Er.current.useEffect(e,t)};Me.useId=function(){return Er.current.useId()};Me.useImperativeHandle=function(e,t,r){return Er.current.useImperativeHandle(e,t,r)};Me.useInsertionEffect=function(e,t){return Er.current.useInsertionEffect(e,t)};Me.useLayoutEffect=function(e,t){return Er.current.useLayoutEffect(e,t)};Me.useMemo=function(e,t){return Er.current.useMemo(e,t)};Me.useReducer=function(e,t,r){return Er.current.useReducer(e,t,r)};Me.useRef=function(e){return Er.current.useRef(e)};Me.useState=function(e){return Er.current.useState(e)};Me.useSyncExternalStore=function(e,t,r){return Er.current.useSyncExternalStore(e,t,r)};Me.useTransition=function(){return Er.current.useTransition()};Me.version="18.3.1"});var M=Zn((Cte,O1)=>{"use strict";O1.exports=N1()});var _1=Zn(cg=>{"use strict";var m5=M(),g5=Symbol.for("react.element"),h5=Symbol.for("react.fragment"),v5=Object.prototype.hasOwnProperty,x5=m5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y5={key:!0,ref:!0,__self:!0,__source:!0};function F1(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)v5.call(t,o)&&!y5.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:g5,type:e,key:a,ref:i,props:n,_owner:x5.current}}cg.Fragment=h5;cg.jsx=F1;cg.jsxs=F1});var D=Zn((bte,V1)=>{"use strict";V1.exports=_1()});var eT=Zn(Ye=>{"use strict";function v0(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<pg(n,t))e[o]=t,e[r]=n,r=o;else break e}}function mn(e){return e.length===0?null:e[0]}function gg(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>pg(s,r))l<n&&0>pg(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>pg(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function pg(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(j1=performance,Ye.unstable_now=function(){return j1.now()}):(m0=Date,q1=m0.now(),Ye.unstable_now=function(){return m0.now()-q1});var j1,m0,q1,ea=[],Si=[],M5=1,Oo=null,dr=3,hg=!1,Bs=!1,Td=!1,X1=typeof setTimeout=="function"?setTimeout:null,Y1=typeof clearTimeout=="function"?clearTimeout:null,$1=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x0(e){for(var t=mn(Si);t!==null;){if(t.callback===null)gg(Si);else if(t.startTime<=e)gg(Si),t.sortIndex=t.expirationTime,v0(ea,t);else break;t=mn(Si)}}function y0(e){if(Td=!1,x0(e),!Bs)if(mn(ea)!==null)Bs=!0,C0(w0);else{var t=mn(Si);t!==null&&S0(y0,t.startTime-e)}}function w0(e,t){Bs=!1,Td&&(Td=!1,Y1(kd),kd=-1),hg=!0;var r=dr;try{for(x0(t),Oo=mn(ea);Oo!==null&&(!(Oo.expirationTime>t)||e&&!J1());){var o=Oo.callback;if(typeof o=="function"){Oo.callback=null,dr=Oo.priorityLevel;var n=o(Oo.expirationTime<=t);t=Ye.unstable_now(),typeof n=="function"?Oo.callback=n:Oo===mn(ea)&&gg(ea),x0(t)}else gg(ea);Oo=mn(ea)}if(Oo!==null)var a=!0;else{var i=mn(Si);i!==null&&S0(y0,i.startTime-t),a=!1}return a}finally{Oo=null,dr=r,hg=!1}}var vg=!1,mg=null,kd=-1,Q1=5,Z1=-1;function J1(){return!(Ye.unstable_now()-Z1<Q1)}function g0(){if(mg!==null){var e=Ye.unstable_now();Z1=e;var t=!0;try{t=mg(!0,e)}finally{t?Ld():(vg=!1,mg=null)}}else vg=!1}var Ld;typeof $1=="function"?Ld=function(){$1(g0)}:typeof MessageChannel<"u"?(h0=new MessageChannel,K1=h0.port2,h0.port1.onmessage=g0,Ld=function(){K1.postMessage(null)}):Ld=function(){X1(g0,0)};var h0,K1;function C0(e){mg=e,vg||(vg=!0,Ld())}function S0(e,t){kd=X1(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(){Bs||hg||(Bs=!0,C0(w0))};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"):Q1=0<e?Math.floor(1e3/e):5};Ye.unstable_getCurrentPriorityLevel=function(){return dr};Ye.unstable_getFirstCallbackNode=function(){return mn(ea)};Ye.unstable_next=function(e){switch(dr){case 1:case 2:case 3:var t=3;break;default:t=dr}var r=dr;dr=t;try{return e()}finally{dr=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=dr;dr=e;try{return t()}finally{dr=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:M5++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,v0(Si,e),mn(ea)===null&&e===mn(Si)&&(Td?(Y1(kd),kd=-1):Td=!0,S0(y0,r-o))):(e.sortIndex=n,v0(ea,e),Bs||hg||(Bs=!0,C0(w0))),e};Ye.unstable_shouldYield=J1;Ye.unstable_wrapCallback=function(e){var t=dr;return function(){var r=dr;dr=t;try{return e.apply(this,arguments)}finally{dr=r}}}});var rT=Zn((Hte,tT)=>{"use strict";tT.exports=eT()});var iE=Zn(vo=>{"use strict";var E5=M(),go=rT();function q(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 uk=new Set,Qd={};function Zs(e,t){Du(e,t),Du(e+"Capture",t)}function Du(e,t){for(Qd[e]=t,e=0;e<t.length;e++)uk.add(t[e])}var Da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),j0=Object.prototype.hasOwnProperty,A5=/^[: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]*$/,oT={},nT={};function D5(e){return j0.call(nT,e)?!0:j0.call(oT,e)?!1:A5.test(e)?nT[e]=!0:(oT[e]=!0,!1)}function N5(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 O5(e,t,r,o){if(t===null||typeof t>"u"||N5(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 Nr(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 nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nr[e]=new Nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nr[t]=new Nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nr[e]=new Nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nr[e]=new Nr(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){nr[e]=new Nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nr[e]=new Nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nr[e]=new Nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nr[e]=new Nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nr[e]=new Nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var _w=/[\-:]([a-z])/g;function Vw(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(_w,Vw);nr[t]=new Nr(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(_w,Vw);nr[t]=new Nr(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(_w,Vw);nr[t]=new Nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nr[e]=new Nr(e,1,!1,e.toLowerCase(),null,!1,!1)});nr.xlinkHref=new Nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nr[e]=new Nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bw(e,t,r,o){var n=nr.hasOwnProperty(t)?nr[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(O5(t,r,n,o)&&(r=null),o||n===null?D5(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 _a=E5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xg=Symbol.for("react.element"),gu=Symbol.for("react.portal"),hu=Symbol.for("react.fragment"),Hw=Symbol.for("react.strict_mode"),q0=Symbol.for("react.profiler"),ck=Symbol.for("react.provider"),dk=Symbol.for("react.context"),Uw=Symbol.for("react.forward_ref"),$0=Symbol.for("react.suspense"),K0=Symbol.for("react.suspense_list"),zw=Symbol.for("react.memo"),Ri=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var fk=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var aT=Symbol.iterator;function Md(e){return e===null||typeof e!="object"?null:(e=aT&&e[aT]||e["@@iterator"],typeof e=="function"?e:null)}var mt=Object.assign,b0;function Vd(e){if(b0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);b0=t&&t[1]||""}return`
|
|
5
|
+
`+b0+e}var R0=!1;function I0(e,t){if(!e||R0)return"";R0=!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
6
|
`),a=o.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{Gx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Wc(e):""}function h3(e){switch(e.tag){case 5:return Wc(e.type);case 16:return Wc("Lazy");case 13:return Wc("Suspense");case 19:return Wc("SuspenseList");case 0:case 2:case 15:return e=Wx(e.type,!1),e;case 11:return e=Wx(e.type.render,!1),e;case 1:return e=Wx(e.type,!0),e;default:return""}}function my(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 Al:return"Fragment";case El:return"Portal";case dy:return"Profiler";case a0:return"StrictMode";case fy:return"Suspense";case py:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fL:return(e.displayName||"Context")+".Consumer";case dL:return(e._context.displayName||"Context")+".Provider";case i0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case s0:return t=e.displayName||null,t!==null?t:my(e.type)||"Memo";case ei:t=e._payload,e=e._init;try{return my(e(t))}catch{}}return null}function v3(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 my(t);case 8:return t===a0?"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 mi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function x3(e){var t=mL(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 am(e){e._valueTracker||(e._valueTracker=x3(e))}function gL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=mL(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Dm(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 gy(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function sI(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=mi(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 hL(e,t){t=t.checked,t!=null&&n0(e,"checked",t,!1)}function hy(e,t){hL(e,t);var r=mi(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")?vy(e,t.type,r):t.hasOwnProperty("defaultValue")&&vy(e,t.type,mi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function lI(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 vy(e,t,r){(t!=="number"||Dm(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var qc=Array.isArray;function Gl(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=""+mi(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 xy(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uI(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(qc(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:mi(r)}}function vL(e,t){var r=mi(t.value),o=mi(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 cI(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function xL(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 yy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?xL(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var im,yL=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(im=im||document.createElement("div"),im.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=im.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kc={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},y3=["Webkit","ms","Moz","O"];Object.keys(Kc).forEach(function(e){y3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kc[t]=Kc[e]})});function wL(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Kc.hasOwnProperty(e)&&Kc[e]?(""+t).trim():t+"px"}function CL(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=wL(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var w3=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 wy(e,t){if(t){if(w3[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 Cy(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 Sy=null;function l0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var by=null,Wl=null,ql=null;function dI(e){if(e=Sd(e)){if(typeof by!="function")throw Error(j(280));var t=e.stateNode;t&&(t=sg(t),by(e.stateNode,e.type,t))}}function SL(e){Wl?ql?ql.push(e):ql=[e]:Wl=e}function bL(){if(Wl){var e=Wl,t=ql;if(ql=Wl=null,dI(e),t)for(e=0;e<t.length;e++)dI(t[e])}}function RL(e,t){return e(t)}function IL(){}var qx=!1;function LL(e,t,r){if(qx)return e(t,r);qx=!0;try{return RL(e,t,r)}finally{qx=!1,(Wl!==null||ql!==null)&&(IL(),bL())}}function ad(e,t){var r=e.stateNode;if(r===null)return null;var o=sg(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 Ry=!1;if(ca)try{kl={},Object.defineProperty(kl,"passive",{get:function(){Ry=!0}}),window.addEventListener("test",kl,kl),window.removeEventListener("test",kl,kl)}catch{Ry=!1}var kl;function C3(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 Xc=!1,Nm=null,Om=!1,Iy=null,S3={onError:function(e){Xc=!0,Nm=e}};function b3(e,t,r,o,n,a,i,s,l){Xc=!1,Nm=null,C3.apply(S3,arguments)}function R3(e,t,r,o,n,a,i,s,l){if(b3.apply(this,arguments),Xc){if(Xc){var u=Nm;Xc=!1,Nm=null}else throw Error(j(198));Om||(Om=!0,Iy=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 PL(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 fI(e){if(Ls(e)!==e)throw Error(j(188))}function I3(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 fI(n),e;if(a===o)return fI(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 TL(e){return e=I3(e),e!==null?kL(e):null}function kL(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kL(e);if(t!==null)return t;e=e.sibling}return null}var ML=ro.unstable_scheduleCallback,pI=ro.unstable_cancelCallback,L3=ro.unstable_shouldYield,P3=ro.unstable_requestPaint,St=ro.unstable_now,T3=ro.unstable_getCurrentPriorityLevel,u0=ro.unstable_ImmediatePriority,EL=ro.unstable_UserBlockingPriority,Fm=ro.unstable_NormalPriority,k3=ro.unstable_LowPriority,AL=ro.unstable_IdlePriority,og=null,_n=null;function M3(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(og,e,void 0,(e.current.flags&128)===128)}catch{}}var en=Math.clz32?Math.clz32:D3,E3=Math.log,A3=Math.LN2;function D3(e){return e>>>=0,e===0?32:31-(E3(e)/A3|0)|0}var sm=64,lm=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 _m(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-en(t),n=1<<r,o|=e[r],t&=~n;return o}function N3(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 O3(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-en(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=N3(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function Ly(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function DL(){var e=sm;return sm<<=1,!(sm&4194240)&&(sm=64),e}function jx(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function wd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-en(t),e[t]=r}function F3(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-en(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function c0(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-en(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var Ge=0;function NL(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var OL,d0,FL,_L,VL,Py=!1,um=[],ii=null,si=null,li=null,id=new Map,sd=new Map,ri=[],_3="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 mI(e,t){switch(e){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":si=null;break;case"mouseover":case"mouseout":li=null;break;case"pointerover":case"pointerout":id.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sd.delete(t.pointerId)}}function _c(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=Sd(t),t!==null&&d0(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function V3(e,t,r,o,n){switch(t){case"focusin":return ii=_c(ii,e,t,r,o,n),!0;case"dragenter":return si=_c(si,e,t,r,o,n),!0;case"mouseover":return li=_c(li,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return id.set(a,_c(id.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,sd.set(a,_c(sd.get(a)||null,e,t,r,o,n)),!0}return!1}function BL(e){var t=gs(e.target);if(t!==null){var r=Ls(t);if(r!==null){if(t=r.tag,t===13){if(t=PL(r),t!==null){e.blockedOn=t,VL(e.priority,function(){FL(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 bm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Ty(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Sy=o,r.target.dispatchEvent(o),Sy=null}else return t=Sd(r),t!==null&&d0(t),e.blockedOn=r,!1;t.shift()}return!0}function gI(e,t,r){bm(e)&&r.delete(t)}function B3(){Py=!1,ii!==null&&bm(ii)&&(ii=null),si!==null&&bm(si)&&(si=null),li!==null&&bm(li)&&(li=null),id.forEach(gI),sd.forEach(gI)}function Vc(e,t){e.blockedOn===t&&(e.blockedOn=null,Py||(Py=!0,ro.unstable_scheduleCallback(ro.unstable_NormalPriority,B3)))}function ld(e){function t(n){return Vc(n,e)}if(0<um.length){Vc(um[0],e);for(var r=1;r<um.length;r++){var o=um[r];o.blockedOn===e&&(o.blockedOn=null)}}for(ii!==null&&Vc(ii,e),si!==null&&Vc(si,e),li!==null&&Vc(li,e),id.forEach(t),sd.forEach(t),r=0;r<ri.length;r++)o=ri[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<ri.length&&(r=ri[0],r.blockedOn===null);)BL(r),r.blockedOn===null&&ri.shift()}var jl=ma.ReactCurrentBatchConfig,Vm=!0;function H3(e,t,r,o){var n=Ge,a=jl.transition;jl.transition=null;try{Ge=1,f0(e,t,r,o)}finally{Ge=n,jl.transition=a}}function U3(e,t,r,o){var n=Ge,a=jl.transition;jl.transition=null;try{Ge=4,f0(e,t,r,o)}finally{Ge=n,jl.transition=a}}function f0(e,t,r,o){if(Vm){var n=Ty(e,t,r,o);if(n===null)Jx(e,t,o,Bm,r),mI(e,o);else if(V3(n,e,t,r,o))o.stopPropagation();else if(mI(e,o),t&4&&-1<_3.indexOf(e)){for(;n!==null;){var a=Sd(n);if(a!==null&&OL(a),a=Ty(e,t,r,o),a===null&&Jx(e,t,o,Bm,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else Jx(e,t,o,null,r)}}var Bm=null;function Ty(e,t,r,o){if(Bm=null,e=l0(o),e=gs(e),e!==null)if(t=Ls(e),t===null)e=null;else if(r=t.tag,r===13){if(e=PL(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 Bm=e,null}function HL(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(T3()){case u0:return 1;case EL:return 4;case Fm:case k3:return 16;case AL:return 536870912;default:return 16}default:return 16}}var ni=null,p0=null,Rm=null;function UL(){if(Rm)return Rm;var e,t=p0,r=t.length,o,n="value"in ni?ni.value:ni.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 Rm=n.slice(e,1<o?1-o:void 0)}function Im(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 cm(){return!0}function hI(){return!1}function oo(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)?cm:hI,this.isPropagationStopped=hI,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=cm)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=cm)},persist:function(){},isPersistent:cm}),t}var ru={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},m0=oo(ru),Cd=pt({},ru,{view:0,detail:0}),z3=oo(Cd),$x,Kx,Bc,ng=pt({},Cd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:g0,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!==Bc&&(Bc&&e.type==="mousemove"?($x=e.screenX-Bc.screenX,Kx=e.screenY-Bc.screenY):Kx=$x=0,Bc=e),$x)},movementY:function(e){return"movementY"in e?e.movementY:Kx}}),vI=oo(ng),G3=pt({},ng,{dataTransfer:0}),W3=oo(G3),q3=pt({},Cd,{relatedTarget:0}),Xx=oo(q3),j3=pt({},ru,{animationName:0,elapsedTime:0,pseudoElement:0}),$3=oo(j3),K3=pt({},ru,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),X3=oo(K3),Y3=pt({},ru,{data:0}),xI=oo(Y3),Q3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z3={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"},J3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eU(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J3[e])?!!t[e]:!1}function g0(){return eU}var tU=pt({},Cd,{key:function(e){if(e.key){var t=Q3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Im(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:g0,charCode:function(e){return e.type==="keypress"?Im(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Im(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rU=oo(tU),oU=pt({},ng,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yI=oo(oU),nU=pt({},Cd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:g0}),aU=oo(nU),iU=pt({},ru,{propertyName:0,elapsedTime:0,pseudoElement:0}),sU=oo(iU),lU=pt({},ng,{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}),uU=oo(lU),cU=[9,13,27,32],h0=ca&&"CompositionEvent"in window,Yc=null;ca&&"documentMode"in document&&(Yc=document.documentMode);var dU=ca&&"TextEvent"in window&&!Yc,zL=ca&&(!h0||Yc&&8<Yc&&11>=Yc),wI=String.fromCharCode(32),CI=!1;function GL(e,t){switch(e){case"keyup":return cU.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dl=!1;function fU(e,t){switch(e){case"compositionend":return WL(t);case"keypress":return t.which!==32?null:(CI=!0,wI);case"textInput":return e=t.data,e===wI&&CI?null:e;default:return null}}function pU(e,t){if(Dl)return e==="compositionend"||!h0&&GL(e,t)?(e=UL(),Rm=p0=ni=null,Dl=!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 zL&&t.locale!=="ko"?null:t.data;default:return null}}var mU={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 SI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mU[e.type]:t==="textarea"}function qL(e,t,r,o){SL(o),t=Hm(t,"onChange"),0<t.length&&(r=new m0("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var Qc=null,ud=null;function gU(e){rP(e,0)}function ag(e){var t=Fl(e);if(gL(t))return e}function hU(e,t){if(e==="change")return t}var jL=!1;ca&&(ca?(fm="oninput"in document,fm||(Yx=document.createElement("div"),Yx.setAttribute("oninput","return;"),fm=typeof Yx.oninput=="function"),dm=fm):dm=!1,jL=dm&&(!document.documentMode||9<document.documentMode));var dm,fm,Yx;function bI(){Qc&&(Qc.detachEvent("onpropertychange",$L),ud=Qc=null)}function $L(e){if(e.propertyName==="value"&&ag(ud)){var t=[];qL(t,ud,e,l0(e)),LL(gU,t)}}function vU(e,t,r){e==="focusin"?(bI(),Qc=t,ud=r,Qc.attachEvent("onpropertychange",$L)):e==="focusout"&&bI()}function xU(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ag(ud)}function yU(e,t){if(e==="click")return ag(t)}function wU(e,t){if(e==="input"||e==="change")return ag(t)}function CU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:CU;function cd(e,t){if(rn(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(!cy.call(t,n)||!rn(e[n],t[n]))return!1}return!0}function RI(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function II(e,t){var r=RI(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=RI(r)}}function KL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?KL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function XL(){for(var e=window,t=Dm();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Dm(e.document)}return t}function v0(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 SU(e){var t=XL(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&KL(r.ownerDocument.documentElement,r)){if(o!==null&&v0(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=II(r,a);var i=II(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 bU=ca&&"documentMode"in document&&11>=document.documentMode,Nl=null,ky=null,Zc=null,My=!1;function LI(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;My||Nl==null||Nl!==Dm(o)||(o=Nl,"selectionStart"in o&&v0(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}),Zc&&cd(Zc,o)||(Zc=o,o=Hm(ky,"onSelect"),0<o.length&&(t=new m0("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Nl)))}function pm(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ol={animationend:pm("Animation","AnimationEnd"),animationiteration:pm("Animation","AnimationIteration"),animationstart:pm("Animation","AnimationStart"),transitionend:pm("Transition","TransitionEnd")},Qx={},YL={};ca&&(YL=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function ig(e){if(Qx[e])return Qx[e];if(!Ol[e])return e;var t=Ol[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in YL)return Qx[e]=t[r];return e}var QL=ig("animationend"),ZL=ig("animationiteration"),JL=ig("animationstart"),eP=ig("transitionend"),tP=new Map,PI="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 hi(e,t){tP.set(e,t),Is(t,[e])}for(mm=0;mm<PI.length;mm++)gm=PI[mm],TI=gm.toLowerCase(),kI=gm[0].toUpperCase()+gm.slice(1),hi(TI,"on"+kI);var gm,TI,kI,mm;hi(QL,"onAnimationEnd");hi(ZL,"onAnimationIteration");hi(JL,"onAnimationStart");hi("dblclick","onDoubleClick");hi("focusin","onFocus");hi("focusout","onBlur");hi(eP,"onTransitionEnd");Xl("onMouseEnter",["mouseout","mouseover"]);Xl("onMouseLeave",["mouseout","mouseover"]);Xl("onPointerEnter",["pointerout","pointerover"]);Xl("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 $c="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(" "),RU=new Set("cancel close invalid load scroll toggle".split(" ").concat($c));function MI(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,R3(o,t,void 0,e),e.currentTarget=null}function rP(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;MI(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;MI(n,s,u),a=l}}}if(Om)throw e=Iy,Om=!1,Iy=null,e}function et(e,t){var r=t[Oy];r===void 0&&(r=t[Oy]=new Set);var o=e+"__bubble";r.has(o)||(oP(t,e,2,!1),r.add(o))}function Zx(e,t,r){var o=0;t&&(o|=4),oP(r,e,o,t)}var hm="_reactListening"+Math.random().toString(36).slice(2);function dd(e){if(!e[hm]){e[hm]=!0,cL.forEach(function(r){r!=="selectionchange"&&(RU.has(r)||Zx(r,!1,e),Zx(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hm]||(t[hm]=!0,Zx("selectionchange",!1,t))}}function oP(e,t,r,o){switch(HL(t)){case 1:var n=H3;break;case 4:n=U3;break;default:n=f0}r=n.bind(null,t,r,e),n=void 0,!Ry||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 Jx(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}LL(function(){var u=a,c=l0(r),d=[];e:{var f=tP.get(e);if(f!==void 0){var p=m0,m=e;switch(e){case"keypress":if(Im(r)===0)break e;case"keydown":case"keyup":p=rU;break;case"focusin":m="focus",p=Xx;break;case"focusout":m="blur",p=Xx;break;case"beforeblur":case"afterblur":p=Xx;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=vI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=W3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=aU;break;case QL:case ZL:case JL:p=$3;break;case eP:p=sU;break;case"scroll":p=z3;break;case"wheel":p=uU;break;case"copy":case"cut":case"paste":p=X3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yI}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=ad(v,h),w!=null&&g.push(fd(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!==Sy&&(m=r.relatedTarget||r.fromElement)&&(gs(m)||m[da]))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=vI,w="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=yI,w="onPointerLeave",h="onPointerEnter",v="pointer"),y=p==null?f:Fl(p),x=m==null?f:Fl(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=Ml(x))v++;for(x=0,w=h;w;w=Ml(w))x++;for(;0<v-x;)g=Ml(g),v--;for(;0<x-v;)h=Ml(h),x--;for(;v--;){if(g===h||h!==null&&g===h.alternate)break t;g=Ml(g),h=Ml(h)}g=null}else g=null;p!==null&&EI(d,f,p,g,!1),m!==null&&y!==null&&EI(d,y,m,g,!0)}}e:{if(f=u?Fl(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=hU;else if(SI(f))if(jL)C=wU;else{C=xU;var S=vU}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=yU);if(C&&(C=C(e,u))){qL(d,C,r,c);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&vy(f,"number",f.value)}switch(S=u?Fl(u):window,e){case"focusin":(SI(S)||S.contentEditable==="true")&&(Nl=S,ky=u,Zc=null);break;case"focusout":Zc=ky=Nl=null;break;case"mousedown":My=!0;break;case"contextmenu":case"mouseup":case"dragend":My=!1,LI(d,r,c);break;case"selectionchange":if(bU)break;case"keydown":case"keyup":LI(d,r,c)}var b;if(h0)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 Dl?GL(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(zL&&r.locale!=="ko"&&(Dl||I!=="onCompositionStart"?I==="onCompositionEnd"&&Dl&&(b=UL()):(ni=c,p0="value"in ni?ni.value:ni.textContent,Dl=!0)),S=Hm(u,I),0<S.length&&(I=new xI(I,e,null,r,c),d.push({event:I,listeners:S}),b?I.data=b:(b=WL(r),b!==null&&(I.data=b)))),(b=dU?fU(e,r):pU(e,r))&&(u=Hm(u,"onBeforeInput"),0<u.length&&(c=new xI("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=b))}rP(d,t)})}function fd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Hm(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=ad(e,r),a!=null&&o.unshift(fd(e,a,n)),a=ad(e,t),a!=null&&o.push(fd(e,a,n))),e=e.return}return o}function Ml(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function EI(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=ad(r,a),l!=null&&i.unshift(fd(r,l,s))):n||(l=ad(r,a),l!=null&&i.push(fd(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var IU=/\r\n?/g,LU=/\u0000|\uFFFD/g;function AI(e){return(typeof e=="string"?e:""+e).replace(IU,`
|
|
9
|
-
`).replace(LU,"")}function vm(e,t,r){if(t=AI(t),AI(e)!==t&&r)throw Error(j(425))}function Um(){}var Ey=null,Ay=null;function Dy(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 Ny=typeof setTimeout=="function"?setTimeout:void 0,PU=typeof clearTimeout=="function"?clearTimeout:void 0,DI=typeof Promise=="function"?Promise:void 0,TU=typeof queueMicrotask=="function"?queueMicrotask:typeof DI<"u"?function(e){return DI.resolve(null).then(e).catch(kU)}:Ny;function kU(e){setTimeout(function(){throw e})}function ey(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),ld(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);ld(t)}function ui(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 NI(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 ou=Math.random().toString(36).slice(2),Fn="__reactFiber$"+ou,pd="__reactProps$"+ou,da="__reactContainer$"+ou,Oy="__reactEvents$"+ou,MU="__reactListeners$"+ou,EU="__reactHandles$"+ou;function gs(e){var t=e[Fn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[da]||r[Fn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=NI(e);e!==null;){if(r=e[Fn])return r;e=NI(e)}return t}e=r,r=e.parentNode}return null}function Sd(e){return e=e[Fn]||e[da],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function sg(e){return e[pd]||null}var Fy=[],_l=-1;function vi(e){return{current:e}}function tt(e){0>_l||(e.current=Fy[_l],Fy[_l]=null,_l--)}function Ye(e,t){_l++,Fy[_l]=e.current,e.current=t}var gi={},lr=vi(gi),_r=vi(!1),ws=gi;function Yl(e,t){var r=e.type.contextTypes;if(!r)return gi;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 Vr(e){return e=e.childContextTypes,e!=null}function zm(){tt(_r),tt(lr)}function OI(e,t,r){if(lr.current!==gi)throw Error(j(168));Ye(lr,t),Ye(_r,r)}function nP(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,v3(e)||"Unknown",n));return pt({},r,o)}function Gm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gi,ws=lr.current,Ye(lr,e),Ye(_r,_r.current),!0}function FI(e,t,r){var o=e.stateNode;if(!o)throw Error(j(169));r?(e=nP(e,t,ws),o.__reactInternalMemoizedMergedChildContext=e,tt(_r),tt(lr),Ye(lr,e)):tt(_r),Ye(_r,r)}var ia=null,lg=!1,ty=!1;function aP(e){ia===null?ia=[e]:ia.push(e)}function AU(e){lg=!0,aP(e)}function xi(){if(!ty&&ia!==null){ty=!0;var e=0,t=Ge;try{var r=ia;for(Ge=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}ia=null,lg=!1}catch(n){throw ia!==null&&(ia=ia.slice(e+1)),ML(u0,xi),n}finally{Ge=t,ty=!1}}return null}var Vl=[],Bl=0,Wm=null,qm=0,Ro=[],Io=0,Cs=null,sa=1,la="";function ps(e,t){Vl[Bl++]=qm,Vl[Bl++]=Wm,Wm=e,qm=t}function iP(e,t,r){Ro[Io++]=sa,Ro[Io++]=la,Ro[Io++]=Cs,Cs=e;var o=sa;e=la;var n=32-en(o)-1;o&=~(1<<n),r+=1;var a=32-en(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,sa=1<<32-en(t)+n|r<<n|o,la=a+e}else sa=1<<a|r<<n|o,la=e}function x0(e){e.return!==null&&(ps(e,1),iP(e,1,0))}function y0(e){for(;e===Wm;)Wm=Vl[--Bl],Vl[Bl]=null,qm=Vl[--Bl],Vl[Bl]=null;for(;e===Cs;)Cs=Ro[--Io],Ro[Io]=null,la=Ro[--Io],Ro[Io]=null,sa=Ro[--Io],Ro[Io]=null}var to=null,eo=null,it=!1,Jo=null;function sP(e,t){var r=Lo(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function _I(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,to=e,eo=ui(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,to=e,eo=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Cs!==null?{id:sa,overflow:la}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Lo(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,to=e,eo=null,!0):!1;default:return!1}}function _y(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vy(e){if(it){var t=eo;if(t){var r=t;if(!_I(e,t)){if(_y(e))throw Error(j(418));t=ui(r.nextSibling);var o=to;t&&_I(e,t)?sP(o,r):(e.flags=e.flags&-4097|2,it=!1,to=e)}}else{if(_y(e))throw Error(j(418));e.flags=e.flags&-4097|2,it=!1,to=e}}}function VI(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;to=e}function xm(e){if(e!==to)return!1;if(!it)return VI(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Dy(e.type,e.memoizedProps)),t&&(t=eo)){if(_y(e))throw lP(),Error(j(418));for(;t;)sP(e,t),t=ui(t.nextSibling)}if(VI(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){eo=ui(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}eo=null}}else eo=to?ui(e.stateNode.nextSibling):null;return!0}function lP(){for(var e=eo;e;)e=ui(e.nextSibling)}function Ql(){eo=to=null,it=!1}function w0(e){Jo===null?Jo=[e]:Jo.push(e)}var DU=ma.ReactCurrentBatchConfig;function Hc(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 ym(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function BI(e){var t=e._init;return t(e._payload)}function uP(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=pi(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=ly(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===Al?c(h,v,x.props.children,w,x.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ei&&BI(C)===v.type)?(w=n(v,x.props),w.ref=Hc(h,v,x),w.return=h,w):(w=Am(x.type,x.key,x.props,null,h.mode,w),w.ref=Hc(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=uy(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=ly(""+v,h.mode,x),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case nm:return x=Am(v.type,v.key,v.props,null,h.mode,x),x.ref=Hc(h,null,v),x.return=h,x;case El:return v=uy(v,h.mode,x),v.return=h,v;case ei:var w=v._init;return d(h,w(v._payload),x)}if(qc(v)||Fc(v))return v=ys(v,h.mode,x,null),v.return=h,v;ym(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 nm:return x.key===C?l(h,v,x,w):null;case El:return x.key===C?u(h,v,x,w):null;case ei:return C=x._init,f(h,v,C(x._payload),w)}if(qc(x)||Fc(x))return C!==null?null:c(h,v,x,w,null);ym(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 nm:return h=h.get(w.key===null?x:w.key)||null,l(v,h,w,C);case El:return h=h.get(w.key===null?x:w.key)||null,u(v,h,w,C);case ei:var S=w._init;return p(h,v,x,S(w._payload),C)}if(qc(w)||Fc(w))return h=h.get(x)||null,c(v,h,w,C,null);ym(v,w)}return null}function m(h,v,x,w){for(var C=null,S=null,b=v,I=v=0,T=null;b!==null&&I<x.length;I++){b.index>I?(T=b,b=null):T=b.sibling;var P=f(h,b,x[I],w);if(P===null){b===null&&(b=T);break}e&&b&&P.alternate===null&&t(h,b),v=a(P,v,I),S===null?C=P:S.sibling=P,S=P,b=T}if(I===x.length)return r(h,b),it&&ps(h,I),C;if(b===null){for(;I<x.length;I++)b=d(h,x[I],w),b!==null&&(v=a(b,v,I),S===null?C=b:S.sibling=b,S=b);return it&&ps(h,I),C}for(b=o(h,b);I<x.length;I++)T=p(b,h,I,x[I],w),T!==null&&(e&&T.alternate!==null&&b.delete(T.key===null?I:T.key),v=a(T,v,I),S===null?C=T:S.sibling=T,S=T);return e&&b.forEach(function(k){return t(h,k)}),it&&ps(h,I),C}function g(h,v,x,w){var C=Fc(x);if(typeof C!="function")throw Error(j(150));if(x=C.call(x),x==null)throw Error(j(151));for(var S=C=null,b=v,I=v=0,T=null,P=x.next();b!==null&&!P.done;I++,P=x.next()){b.index>I?(T=b,b=null):T=b.sibling;var k=f(h,b,P.value,w);if(k===null){b===null&&(b=T);break}e&&b&&k.alternate===null&&t(h,b),v=a(k,v,I),S===null?C=k:S.sibling=k,S=k,b=T}if(P.done)return r(h,b),it&&ps(h,I),C;if(b===null){for(;!P.done;I++,P=x.next())P=d(h,P.value,w),P!==null&&(v=a(P,v,I),S===null?C=P:S.sibling=P,S=P);return it&&ps(h,I),C}for(b=o(h,b);!P.done;I++,P=x.next())P=p(b,h,I,P.value,w),P!==null&&(e&&P.alternate!==null&&b.delete(P.key===null?I:P.key),v=a(P,v,I),S===null?C=P:S.sibling=P,S=P);return e&&b.forEach(function(A){return t(h,A)}),it&&ps(h,I),C}function y(h,v,x,w){if(typeof x=="object"&&x!==null&&x.type===Al&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nm:e:{for(var C=x.key,S=v;S!==null;){if(S.key===C){if(C=x.type,C===Al){if(S.tag===7){r(h,S.sibling),v=n(S,x.props.children),v.return=h,h=v;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ei&&BI(C)===S.type){r(h,S.sibling),v=n(S,x.props),v.ref=Hc(h,S,x),v.return=h,h=v;break e}r(h,S);break}else t(h,S);S=S.sibling}x.type===Al?(v=ys(x.props.children,h.mode,w,x.key),v.return=h,h=v):(w=Am(x.type,x.key,x.props,null,h.mode,w),w.ref=Hc(h,v,x),w.return=h,h=w)}return i(h);case El:e:{for(S=x.key;v!==null;){if(v.key===S)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=uy(x,h.mode,w),v.return=h,h=v}return i(h);case ei:return S=x._init,y(h,v,S(x._payload),w)}if(qc(x))return m(h,v,x,w);if(Fc(x))return g(h,v,x,w);ym(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=ly(x,h.mode,w),v.return=h,h=v),i(h)):r(h,v)}return y}var Zl=uP(!0),cP=uP(!1),jm=vi(null),$m=null,Hl=null,C0=null;function S0(){C0=Hl=$m=null}function b0(e){var t=jm.current;tt(jm),e._currentValue=t}function By(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 $l(e,t){$m=e,C0=Hl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Fr=!0),e.firstContext=null)}function To(e){var t=e._currentValue;if(C0!==e)if(e={context:e,memoizedValue:t,next:null},Hl===null){if($m===null)throw Error(j(308));Hl=e,$m.dependencies={lanes:0,firstContext:e}}else Hl=Hl.next=e;return t}var hs=null;function R0(e){hs===null?hs=[e]:hs.push(e)}function dP(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,R0(t)):(r.next=n.next,n.next=r),t.interleaved=r,fa(e,o)}function fa(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 ti=!1;function I0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fP(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 ua(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ci(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,Ee&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,fa(e,r)}return n=o.interleaved,n===null?(t.next=t,R0(o)):(t.next=n.next,n.next=t),o.interleaved=t,fa(e,r)}function Lm(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,c0(e,r)}}function HI(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 Km(e,t,r,o){var n=e.updateQueue;ti=!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=pt({},d,f);break e;case 2:ti=!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 UI(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 bd={},Vn=vi(bd),md=vi(bd),gd=vi(bd);function vs(e){if(e===bd)throw Error(j(174));return e}function L0(e,t){switch(Ye(gd,t),Ye(md,e),Ye(Vn,bd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yy(t,e)}tt(Vn),Ye(Vn,t)}function Jl(){tt(Vn),tt(md),tt(gd)}function pP(e){vs(gd.current);var t=vs(Vn.current),r=yy(t,e.type);t!==r&&(Ye(md,e),Ye(Vn,r))}function P0(e){md.current===e&&(tt(Vn),tt(md))}var dt=vi(0);function Xm(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 ry=[];function T0(){for(var e=0;e<ry.length;e++)ry[e]._workInProgressVersionPrimary=null;ry.length=0}var Pm=ma.ReactCurrentDispatcher,oy=ma.ReactCurrentBatchConfig,Ss=0,ft=null,Et=null,Ut=null,Ym=!1,Jc=!1,hd=0,NU=0;function ar(){throw Error(j(321))}function k0(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!rn(e[r],t[r]))return!1;return!0}function M0(e,t,r,o,n,a){if(Ss=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pm.current=e===null||e.memoizedState===null?VU:BU,e=r(o,n),Jc){a=0;do{if(Jc=!1,hd=0,25<=a)throw Error(j(301));a+=1,Ut=Et=null,t.updateQueue=null,Pm.current=HU,e=r(o,n)}while(Jc)}if(Pm.current=Qm,t=Et!==null&&Et.next!==null,Ss=0,Ut=Et=ft=null,Ym=!1,t)throw Error(j(300));return e}function E0(){var e=hd!==0;return hd=0,e}function On(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?ft.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function ko(){if(Et===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Et.next;var t=Ut===null?ft.memoizedState:Ut.next;if(t!==null)Ut=t,Et=e;else{if(e===null)throw Error(j(310));Et=e,e={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Ut===null?ft.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function vd(e,t){return typeof t=="function"?t(e):t}function ny(e){var t=ko(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var o=Et,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,ft.lanes|=c,bs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,rn(o,t.memoizedState)||(Fr=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}if(e=r.interleaved,e!==null){n=e;do a=n.lane,ft.lanes|=a,bs|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ay(e){var t=ko(),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);rn(a,t.memoizedState)||(Fr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function mP(){}function gP(e,t){var r=ft,o=ko(),n=t(),a=!rn(o.memoizedState,n);if(a&&(o.memoizedState=n,Fr=!0),o=o.queue,A0(xP.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||Ut!==null&&Ut.memoizedState.tag&1){if(r.flags|=2048,xd(9,vP.bind(null,r,o,n,t),void 0,null),zt===null)throw Error(j(349));Ss&30||hP(r,t,n)}return n}function hP(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function vP(e,t,r,o){t.value=r,t.getSnapshot=o,yP(t)&&wP(e)}function xP(e,t,r){return r(function(){yP(t)&&wP(e)})}function yP(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rn(e,r)}catch{return!0}}function wP(e){var t=fa(e,1);t!==null&&tn(t,e,1,-1)}function zI(e){var t=On();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vd,lastRenderedState:e},t.queue=e,e=e.dispatch=_U.bind(null,ft,e),[t.memoizedState,e]}function xd(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function CP(){return ko().memoizedState}function Tm(e,t,r,o){var n=On();ft.flags|=e,n.memoizedState=xd(1|t,r,void 0,o===void 0?null:o)}function ug(e,t,r,o){var n=ko();o=o===void 0?null:o;var a=void 0;if(Et!==null){var i=Et.memoizedState;if(a=i.destroy,o!==null&&k0(o,i.deps)){n.memoizedState=xd(t,r,a,o);return}}ft.flags|=e,n.memoizedState=xd(1|t,r,a,o)}function GI(e,t){return Tm(8390656,8,e,t)}function A0(e,t){return ug(2048,8,e,t)}function SP(e,t){return ug(4,2,e,t)}function bP(e,t){return ug(4,4,e,t)}function RP(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 IP(e,t,r){return r=r!=null?r.concat([e]):null,ug(4,4,RP.bind(null,t,e),r)}function D0(){}function LP(e,t){var r=ko();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&k0(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function PP(e,t){var r=ko();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&k0(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function TP(e,t,r){return Ss&21?(rn(r,t)||(r=DL(),ft.lanes|=r,bs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Fr=!0),e.memoizedState=r)}function OU(e,t){var r=Ge;Ge=r!==0&&4>r?r:4,e(!0);var o=oy.transition;oy.transition={};try{e(!1),t()}finally{Ge=r,oy.transition=o}}function kP(){return ko().memoizedState}function FU(e,t,r){var o=fi(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},MP(e))EP(t,r);else if(r=dP(e,t,r,o),r!==null){var n=Rr();tn(r,e,o,n),AP(r,t,o)}}function _U(e,t,r){var o=fi(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(MP(e))EP(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,rn(s,i)){var l=t.interleaved;l===null?(n.next=n,R0(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=dP(e,t,n,o),r!==null&&(n=Rr(),tn(r,e,o,n),AP(r,t,o))}}function MP(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function EP(e,t){Jc=Ym=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function AP(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,c0(e,r)}}var Qm={readContext:To,useCallback:ar,useContext:ar,useEffect:ar,useImperativeHandle:ar,useInsertionEffect:ar,useLayoutEffect:ar,useMemo:ar,useReducer:ar,useRef:ar,useState:ar,useDebugValue:ar,useDeferredValue:ar,useTransition:ar,useMutableSource:ar,useSyncExternalStore:ar,useId:ar,unstable_isNewReconciler:!1},VU={readContext:To,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:To,useEffect:GI,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Tm(4194308,4,RP.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Tm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tm(4,2,e,t)},useMemo:function(e,t){var r=On();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=On();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=FU.bind(null,ft,e),[o.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:zI,useDebugValue:D0,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=zI(!1),t=e[0];return e=OU.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=ft,n=On();if(it){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),zt===null)throw Error(j(349));Ss&30||hP(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,GI(xP.bind(null,o,a,e),[e]),o.flags|=2048,xd(9,vP.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=On(),t=zt.identifierPrefix;if(it){var r=la,o=sa;r=(o&~(1<<32-en(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=hd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=NU++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BU={readContext:To,useCallback:LP,useContext:To,useEffect:A0,useImperativeHandle:IP,useInsertionEffect:SP,useLayoutEffect:bP,useMemo:PP,useReducer:ny,useRef:CP,useState:function(){return ny(vd)},useDebugValue:D0,useDeferredValue:function(e){var t=ko();return TP(t,Et.memoizedState,e)},useTransition:function(){var e=ny(vd)[0],t=ko().memoizedState;return[e,t]},useMutableSource:mP,useSyncExternalStore:gP,useId:kP,unstable_isNewReconciler:!1},HU={readContext:To,useCallback:LP,useContext:To,useEffect:A0,useImperativeHandle:IP,useInsertionEffect:SP,useLayoutEffect:bP,useMemo:PP,useReducer:ay,useRef:CP,useState:function(){return ay(vd)},useDebugValue:D0,useDeferredValue:function(e){var t=ko();return Et===null?t.memoizedState=e:TP(t,Et.memoizedState,e)},useTransition:function(){var e=ay(vd)[0],t=ko().memoizedState;return[e,t]},useMutableSource:mP,useSyncExternalStore:gP,useId:kP,unstable_isNewReconciler:!1};function Qo(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Hy(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:pt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var cg={isMounted:function(e){return(e=e._reactInternals)?Ls(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Rr(),n=fi(e),a=ua(o,n);a.payload=t,r!=null&&(a.callback=r),t=ci(e,a,n),t!==null&&(tn(t,e,n,o),Lm(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Rr(),n=fi(e),a=ua(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=ci(e,a,n),t!==null&&(tn(t,e,n,o),Lm(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Rr(),o=fi(e),n=ua(r,o);n.tag=2,t!=null&&(n.callback=t),t=ci(e,n,o),t!==null&&(tn(t,e,o,r),Lm(t,e,o))}};function WI(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?!cd(r,o)||!cd(n,a):!0}function DP(e,t,r){var o=!1,n=gi,a=t.contextType;return typeof a=="object"&&a!==null?a=To(a):(n=Vr(t)?ws:lr.current,o=t.contextTypes,a=(o=o!=null)?Yl(e,n):gi),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cg,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function qI(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&&cg.enqueueReplaceState(t,t.state,null)}function Uy(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},I0(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=To(a):(a=Vr(t)?ws:lr.current,n.context=Yl(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Hy(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&&cg.enqueueReplaceState(n,n.state,null),Km(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function eu(e,t){try{var r="",o=t;do r+=h3(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{R0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Vd(e):""}function F5(e){switch(e.tag){case 5:return Vd(e.type);case 16:return Vd("Lazy");case 13:return Vd("Suspense");case 19:return Vd("SuspenseList");case 0:case 2:case 15:return e=I0(e.type,!1),e;case 11:return e=I0(e.type.render,!1),e;case 1:return e=I0(e.type,!0),e;default:return""}}function X0(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 hu:return"Fragment";case gu:return"Portal";case q0:return"Profiler";case Hw:return"StrictMode";case $0:return"Suspense";case K0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dk:return(e.displayName||"Context")+".Consumer";case ck:return(e._context.displayName||"Context")+".Provider";case Uw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zw:return t=e.displayName||null,t!==null?t:X0(e.type)||"Memo";case Ri:t=e._payload,e=e._init;try{return X0(e(t))}catch{}}return null}function _5(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 X0(t);case 8:return t===Hw?"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 Vi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function V5(e){var t=pk(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 yg(e){e._valueTracker||(e._valueTracker=V5(e))}function mk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=pk(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function $g(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 Y0(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function iT(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=Vi(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 gk(e,t){t=t.checked,t!=null&&Bw(e,"checked",t,!1)}function Q0(e,t){gk(e,t);var r=Vi(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")?Z0(e,t.type,r):t.hasOwnProperty("defaultValue")&&Z0(e,t.type,Vi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sT(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 Z0(e,t,r){(t!=="number"||$g(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Bd=Array.isArray;function Lu(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=""+Vi(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 J0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lT(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(q(92));if(Bd(r)){if(1<r.length)throw Error(q(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Vi(r)}}function hk(e,t){var r=Vi(t.value),o=Vi(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 uT(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function vk(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 ew(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?vk(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wg,xk=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(wg=wg||document.createElement("div"),wg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var zd={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},B5=["Webkit","ms","Moz","O"];Object.keys(zd).forEach(function(e){B5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zd[t]=zd[e]})});function yk(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||zd.hasOwnProperty(e)&&zd[e]?(""+t).trim():t+"px"}function wk(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=yk(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var H5=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 tw(e,t){if(t){if(H5[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 rw(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 ow=null;function Gw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nw=null,Tu=null,ku=null;function cT(e){if(e=vf(e)){if(typeof nw!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Ch(t),nw(e.stateNode,e.type,t))}}function Ck(e){Tu?ku?ku.push(e):ku=[e]:Tu=e}function Sk(){if(Tu){var e=Tu,t=ku;if(ku=Tu=null,cT(e),t)for(e=0;e<t.length;e++)cT(t[e])}}function bk(e,t){return e(t)}function Rk(){}var P0=!1;function Ik(e,t,r){if(P0)return e(t,r);P0=!0;try{return bk(e,t,r)}finally{P0=!1,(Tu!==null||ku!==null)&&(Rk(),Sk())}}function Jd(e,t){var r=e.stateNode;if(r===null)return null;var o=Ch(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(q(231,t,typeof r));return r}var aw=!1;if(Da)try{pu={},Object.defineProperty(pu,"passive",{get:function(){aw=!0}}),window.addEventListener("test",pu,pu),window.removeEventListener("test",pu,pu)}catch{aw=!1}var pu;function U5(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 Gd=!1,Kg=null,Xg=!1,iw=null,z5={onError:function(e){Gd=!0,Kg=e}};function G5(e,t,r,o,n,a,i,s,l){Gd=!1,Kg=null,U5.apply(z5,arguments)}function W5(e,t,r,o,n,a,i,s,l){if(G5.apply(this,arguments),Gd){if(Gd){var u=Kg;Gd=!1,Kg=null}else throw Error(q(198));Xg||(Xg=!0,iw=u)}}function Js(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 Pk(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 dT(e){if(Js(e)!==e)throw Error(q(188))}function j5(e){var t=e.alternate;if(!t){if(t=Js(e),t===null)throw Error(q(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 dT(n),e;if(a===o)return dT(n),t;a=a.sibling}throw Error(q(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(q(189))}}if(r.alternate!==o)throw Error(q(190))}if(r.tag!==3)throw Error(q(188));return r.stateNode.current===r?e:t}function Lk(e){return e=j5(e),e!==null?Tk(e):null}function Tk(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tk(e);if(t!==null)return t;e=e.sibling}return null}var kk=go.unstable_scheduleCallback,fT=go.unstable_cancelCallback,q5=go.unstable_shouldYield,$5=go.unstable_requestPaint,bt=go.unstable_now,K5=go.unstable_getCurrentPriorityLevel,Ww=go.unstable_ImmediatePriority,Mk=go.unstable_UserBlockingPriority,Yg=go.unstable_NormalPriority,X5=go.unstable_LowPriority,Ek=go.unstable_IdlePriority,vh=null,na=null;function Y5(e){if(na&&typeof na.onCommitFiberRoot=="function")try{na.onCommitFiberRoot(vh,e,void 0,(e.current.flags&128)===128)}catch{}}var yn=Math.clz32?Math.clz32:J5,Q5=Math.log,Z5=Math.LN2;function J5(e){return e>>>=0,e===0?32:31-(Q5(e)/Z5|0)|0}var Cg=64,Sg=4194304;function Hd(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 Qg(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=Hd(s):(a&=i,a!==0&&(o=Hd(a)))}else i=r&~n,i!==0?o=Hd(i):a!==0&&(o=Hd(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-yn(t),n=1<<r,o|=e[r],t&=~n;return o}function eG(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 tG(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-yn(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=eG(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function sw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ak(){var e=Cg;return Cg<<=1,!(Cg&4194240)&&(Cg=64),e}function L0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function gf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yn(t),e[t]=r}function rG(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-yn(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function jw(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-yn(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var We=0;function Dk(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Nk,qw,Ok,Fk,_k,lw=!1,bg=[],Mi=null,Ei=null,Ai=null,ef=new Map,tf=new Map,Pi=[],oG="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 pT(e,t){switch(e){case"focusin":case"focusout":Mi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":ef.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tf.delete(t.pointerId)}}function Ed(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=vf(t),t!==null&&qw(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function nG(e,t,r,o,n){switch(t){case"focusin":return Mi=Ed(Mi,e,t,r,o,n),!0;case"dragenter":return Ei=Ed(Ei,e,t,r,o,n),!0;case"mouseover":return Ai=Ed(Ai,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return ef.set(a,Ed(ef.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,tf.set(a,Ed(tf.get(a)||null,e,t,r,o,n)),!0}return!1}function Vk(e){var t=zs(e.target);if(t!==null){var r=Js(t);if(r!==null){if(t=r.tag,t===13){if(t=Pk(r),t!==null){e.blockedOn=t,_k(e.priority,function(){Ok(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 _g(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=uw(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);ow=o,r.target.dispatchEvent(o),ow=null}else return t=vf(r),t!==null&&qw(t),e.blockedOn=r,!1;t.shift()}return!0}function mT(e,t,r){_g(e)&&r.delete(t)}function aG(){lw=!1,Mi!==null&&_g(Mi)&&(Mi=null),Ei!==null&&_g(Ei)&&(Ei=null),Ai!==null&&_g(Ai)&&(Ai=null),ef.forEach(mT),tf.forEach(mT)}function Ad(e,t){e.blockedOn===t&&(e.blockedOn=null,lw||(lw=!0,go.unstable_scheduleCallback(go.unstable_NormalPriority,aG)))}function rf(e){function t(n){return Ad(n,e)}if(0<bg.length){Ad(bg[0],e);for(var r=1;r<bg.length;r++){var o=bg[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Mi!==null&&Ad(Mi,e),Ei!==null&&Ad(Ei,e),Ai!==null&&Ad(Ai,e),ef.forEach(t),tf.forEach(t),r=0;r<Pi.length;r++)o=Pi[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Pi.length&&(r=Pi[0],r.blockedOn===null);)Vk(r),r.blockedOn===null&&Pi.shift()}var Mu=_a.ReactCurrentBatchConfig,Zg=!0;function iG(e,t,r,o){var n=We,a=Mu.transition;Mu.transition=null;try{We=1,$w(e,t,r,o)}finally{We=n,Mu.transition=a}}function sG(e,t,r,o){var n=We,a=Mu.transition;Mu.transition=null;try{We=4,$w(e,t,r,o)}finally{We=n,Mu.transition=a}}function $w(e,t,r,o){if(Zg){var n=uw(e,t,r,o);if(n===null)N0(e,t,o,Jg,r),pT(e,o);else if(nG(n,e,t,r,o))o.stopPropagation();else if(pT(e,o),t&4&&-1<oG.indexOf(e)){for(;n!==null;){var a=vf(n);if(a!==null&&Nk(a),a=uw(e,t,r,o),a===null&&N0(e,t,o,Jg,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else N0(e,t,o,null,r)}}var Jg=null;function uw(e,t,r,o){if(Jg=null,e=Gw(o),e=zs(e),e!==null)if(t=Js(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Pk(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 Jg=e,null}function Bk(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(K5()){case Ww:return 1;case Mk:return 4;case Yg:case X5:return 16;case Ek:return 536870912;default:return 16}default:return 16}}var Ti=null,Kw=null,Vg=null;function Hk(){if(Vg)return Vg;var e,t=Kw,r=t.length,o,n="value"in Ti?Ti.value:Ti.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 Vg=n.slice(e,1<o?1-o:void 0)}function Bg(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 Rg(){return!0}function gT(){return!1}function ho(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)?Rg:gT,this.isPropagationStopped=gT,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=Rg)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Rg)},persist:function(){},isPersistent:Rg}),t}var Hu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xw=ho(Hu),hf=mt({},Hu,{view:0,detail:0}),lG=ho(hf),T0,k0,Dd,xh=mt({},hf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yw,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!==Dd&&(Dd&&e.type==="mousemove"?(T0=e.screenX-Dd.screenX,k0=e.screenY-Dd.screenY):k0=T0=0,Dd=e),T0)},movementY:function(e){return"movementY"in e?e.movementY:k0}}),hT=ho(xh),uG=mt({},xh,{dataTransfer:0}),cG=ho(uG),dG=mt({},hf,{relatedTarget:0}),M0=ho(dG),fG=mt({},Hu,{animationName:0,elapsedTime:0,pseudoElement:0}),pG=ho(fG),mG=mt({},Hu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gG=ho(mG),hG=mt({},Hu,{data:0}),vT=ho(hG),vG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xG={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"},yG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yG[e])?!!t[e]:!1}function Yw(){return wG}var CG=mt({},hf,{key:function(e){if(e.key){var t=vG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yw,charCode:function(e){return e.type==="keypress"?Bg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SG=ho(CG),bG=mt({},xh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xT=ho(bG),RG=mt({},hf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yw}),IG=ho(RG),PG=mt({},Hu,{propertyName:0,elapsedTime:0,pseudoElement:0}),LG=ho(PG),TG=mt({},xh,{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}),kG=ho(TG),MG=[9,13,27,32],Qw=Da&&"CompositionEvent"in window,Wd=null;Da&&"documentMode"in document&&(Wd=document.documentMode);var EG=Da&&"TextEvent"in window&&!Wd,Uk=Da&&(!Qw||Wd&&8<Wd&&11>=Wd),yT=String.fromCharCode(32),wT=!1;function zk(e,t){switch(e){case"keyup":return MG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vu=!1;function AG(e,t){switch(e){case"compositionend":return Gk(t);case"keypress":return t.which!==32?null:(wT=!0,yT);case"textInput":return e=t.data,e===yT&&wT?null:e;default:return null}}function DG(e,t){if(vu)return e==="compositionend"||!Qw&&zk(e,t)?(e=Hk(),Vg=Kw=Ti=null,vu=!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 Uk&&t.locale!=="ko"?null:t.data;default:return null}}var NG={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 CT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!NG[e.type]:t==="textarea"}function Wk(e,t,r,o){Ck(o),t=eh(t,"onChange"),0<t.length&&(r=new Xw("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var jd=null,of=null;function OG(e){tM(e,0)}function yh(e){var t=wu(e);if(mk(t))return e}function FG(e,t){if(e==="change")return t}var jk=!1;Da&&(Da?(Pg="oninput"in document,Pg||(E0=document.createElement("div"),E0.setAttribute("oninput","return;"),Pg=typeof E0.oninput=="function"),Ig=Pg):Ig=!1,jk=Ig&&(!document.documentMode||9<document.documentMode));var Ig,Pg,E0;function ST(){jd&&(jd.detachEvent("onpropertychange",qk),of=jd=null)}function qk(e){if(e.propertyName==="value"&&yh(of)){var t=[];Wk(t,of,e,Gw(e)),Ik(OG,t)}}function _G(e,t,r){e==="focusin"?(ST(),jd=t,of=r,jd.attachEvent("onpropertychange",qk)):e==="focusout"&&ST()}function VG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yh(of)}function BG(e,t){if(e==="click")return yh(t)}function HG(e,t){if(e==="input"||e==="change")return yh(t)}function UG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cn=typeof Object.is=="function"?Object.is:UG;function nf(e,t){if(Cn(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(!j0.call(t,n)||!Cn(e[n],t[n]))return!1}return!0}function bT(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function RT(e,t){var r=bT(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=bT(r)}}function $k(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$k(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kk(){for(var e=window,t=$g();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=$g(e.document)}return t}function Zw(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 zG(e){var t=Kk(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&$k(r.ownerDocument.documentElement,r)){if(o!==null&&Zw(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=RT(r,a);var i=RT(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 GG=Da&&"documentMode"in document&&11>=document.documentMode,xu=null,cw=null,qd=null,dw=!1;function IT(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;dw||xu==null||xu!==$g(o)||(o=xu,"selectionStart"in o&&Zw(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}),qd&&nf(qd,o)||(qd=o,o=eh(cw,"onSelect"),0<o.length&&(t=new Xw("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=xu)))}function Lg(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var yu={animationend:Lg("Animation","AnimationEnd"),animationiteration:Lg("Animation","AnimationIteration"),animationstart:Lg("Animation","AnimationStart"),transitionend:Lg("Transition","TransitionEnd")},A0={},Xk={};Da&&(Xk=document.createElement("div").style,"AnimationEvent"in window||(delete yu.animationend.animation,delete yu.animationiteration.animation,delete yu.animationstart.animation),"TransitionEvent"in window||delete yu.transitionend.transition);function wh(e){if(A0[e])return A0[e];if(!yu[e])return e;var t=yu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Xk)return A0[e]=t[r];return e}var Yk=wh("animationend"),Qk=wh("animationiteration"),Zk=wh("animationstart"),Jk=wh("transitionend"),eM=new Map,PT="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 Hi(e,t){eM.set(e,t),Zs(t,[e])}for(Tg=0;Tg<PT.length;Tg++)kg=PT[Tg],LT=kg.toLowerCase(),TT=kg[0].toUpperCase()+kg.slice(1),Hi(LT,"on"+TT);var kg,LT,TT,Tg;Hi(Yk,"onAnimationEnd");Hi(Qk,"onAnimationIteration");Hi(Zk,"onAnimationStart");Hi("dblclick","onDoubleClick");Hi("focusin","onFocus");Hi("focusout","onBlur");Hi(Jk,"onTransitionEnd");Du("onMouseEnter",["mouseout","mouseover"]);Du("onMouseLeave",["mouseout","mouseover"]);Du("onPointerEnter",["pointerout","pointerover"]);Du("onPointerLeave",["pointerout","pointerover"]);Zs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ud="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(" "),WG=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ud));function kT(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,W5(o,t,void 0,e),e.currentTarget=null}function tM(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;kT(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;kT(n,s,u),a=l}}}if(Xg)throw e=iw,Xg=!1,iw=null,e}function tt(e,t){var r=t[hw];r===void 0&&(r=t[hw]=new Set);var o=e+"__bubble";r.has(o)||(rM(t,e,2,!1),r.add(o))}function D0(e,t,r){var o=0;t&&(o|=4),rM(r,e,o,t)}var Mg="_reactListening"+Math.random().toString(36).slice(2);function af(e){if(!e[Mg]){e[Mg]=!0,uk.forEach(function(r){r!=="selectionchange"&&(WG.has(r)||D0(r,!1,e),D0(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mg]||(t[Mg]=!0,D0("selectionchange",!1,t))}}function rM(e,t,r,o){switch(Bk(t)){case 1:var n=iG;break;case 4:n=sG;break;default:n=$w}r=n.bind(null,t,r,e),n=void 0,!aw||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 N0(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=zs(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}Ik(function(){var u=a,c=Gw(r),d=[];e:{var f=eM.get(e);if(f!==void 0){var p=Xw,m=e;switch(e){case"keypress":if(Bg(r)===0)break e;case"keydown":case"keyup":p=SG;break;case"focusin":m="focus",p=M0;break;case"focusout":m="blur",p=M0;break;case"beforeblur":case"afterblur":p=M0;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=hT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=cG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=IG;break;case Yk:case Qk:case Zk:p=pG;break;case Jk:p=LG;break;case"scroll":p=lG;break;case"wheel":p=kG;break;case"copy":case"cut":case"paste":p=gG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=xT}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=Jd(h,v),w!=null&&g.push(sf(h,w,y)))),x)break;h=h.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!==ow&&(m=r.relatedTarget||r.fromElement)&&(zs(m)||m[Na]))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?zs(m):null,m!==null&&(x=Js(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=hT,w="onMouseLeave",v="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(g=xT,w="onPointerLeave",v="onPointerEnter",h="pointer"),x=p==null?f:wu(p),y=m==null?f:wu(m),f=new g(w,h+"leave",p,r,c),f.target=x,f.relatedTarget=y,w=null,zs(c)===u&&(g=new g(v,h+"enter",m,r,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=mu(y))h++;for(y=0,w=v;w;w=mu(w))y++;for(;0<h-y;)g=mu(g),h--;for(;0<y-h;)v=mu(v),y--;for(;h--;){if(g===v||v!==null&&g===v.alternate)break t;g=mu(g),v=mu(v)}g=null}else g=null;p!==null&&MT(d,f,p,g,!1),m!==null&&x!==null&&MT(d,x,m,g,!0)}}e:{if(f=u?wu(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=FG;else if(CT(f))if(jk)C=HG;else{C=VG;var S=_G}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=BG);if(C&&(C=C(e,u))){Wk(d,C,r,c);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Z0(f,"number",f.value)}switch(S=u?wu(u):window,e){case"focusin":(CT(S)||S.contentEditable==="true")&&(xu=S,cw=u,qd=null);break;case"focusout":qd=cw=xu=null;break;case"mousedown":dw=!0;break;case"contextmenu":case"mouseup":case"dragend":dw=!1,IT(d,r,c);break;case"selectionchange":if(GG)break;case"keydown":case"keyup":IT(d,r,c)}var R;if(Qw)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 vu?zk(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(Uk&&r.locale!=="ko"&&(vu||I!=="onCompositionStart"?I==="onCompositionEnd"&&vu&&(R=Hk()):(Ti=c,Kw="value"in Ti?Ti.value:Ti.textContent,vu=!0)),S=eh(u,I),0<S.length&&(I=new vT(I,e,null,r,c),d.push({event:I,listeners:S}),R?I.data=R:(R=Gk(r),R!==null&&(I.data=R)))),(R=EG?AG(e,r):DG(e,r))&&(u=eh(u,"onBeforeInput"),0<u.length&&(c=new vT("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=R))}tM(d,t)})}function sf(e,t,r){return{instance:e,listener:t,currentTarget:r}}function eh(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=Jd(e,r),a!=null&&o.unshift(sf(e,a,n)),a=Jd(e,t),a!=null&&o.push(sf(e,a,n))),e=e.return}return o}function mu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function MT(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=Jd(r,a),l!=null&&i.unshift(sf(r,l,s))):n||(l=Jd(r,a),l!=null&&i.push(sf(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var jG=/\r\n?/g,qG=/\u0000|\uFFFD/g;function ET(e){return(typeof e=="string"?e:""+e).replace(jG,`
|
|
9
|
+
`).replace(qG,"")}function Eg(e,t,r){if(t=ET(t),ET(e)!==t&&r)throw Error(q(425))}function th(){}var fw=null,pw=null;function mw(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 gw=typeof setTimeout=="function"?setTimeout:void 0,$G=typeof clearTimeout=="function"?clearTimeout:void 0,AT=typeof Promise=="function"?Promise:void 0,KG=typeof queueMicrotask=="function"?queueMicrotask:typeof AT<"u"?function(e){return AT.resolve(null).then(e).catch(XG)}:gw;function XG(e){setTimeout(function(){throw e})}function O0(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),rf(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);rf(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 DT(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),oa="__reactFiber$"+Uu,lf="__reactProps$"+Uu,Na="__reactContainer$"+Uu,hw="__reactEvents$"+Uu,YG="__reactListeners$"+Uu,QG="__reactHandles$"+Uu;function zs(e){var t=e[oa];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Na]||r[oa]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=DT(e);e!==null;){if(r=e[oa])return r;e=DT(e)}return t}e=r,r=e.parentNode}return null}function vf(e){return e=e[oa]||e[Na],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Ch(e){return e[lf]||null}var vw=[],Cu=-1;function Ui(e){return{current:e}}function rt(e){0>Cu||(e.current=vw[Cu],vw[Cu]=null,Cu--)}function Qe(e,t){Cu++,vw[Cu]=e.current,e.current=t}var Bi={},gr=Ui(Bi),Kr=Ui(!1),$s=Bi;function Nu(e,t){var r=e.type.contextTypes;if(!r)return Bi;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 Xr(e){return e=e.childContextTypes,e!=null}function rh(){rt(Kr),rt(gr)}function NT(e,t,r){if(gr.current!==Bi)throw Error(q(168));Qe(gr,t),Qe(Kr,r)}function oM(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(q(108,_5(e)||"Unknown",n));return mt({},r,o)}function oh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bi,$s=gr.current,Qe(gr,e),Qe(Kr,Kr.current),!0}function OT(e,t,r){var o=e.stateNode;if(!o)throw Error(q(169));r?(e=oM(e,t,$s),o.__reactInternalMemoizedMergedChildContext=e,rt(Kr),rt(gr),Qe(gr,e)):rt(Kr),Qe(Kr,r)}var ka=null,Sh=!1,F0=!1;function nM(e){ka===null?ka=[e]:ka.push(e)}function ZG(e){Sh=!0,nM(e)}function zi(){if(!F0&&ka!==null){F0=!0;var e=0,t=We;try{var r=ka;for(We=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}ka=null,Sh=!1}catch(n){throw ka!==null&&(ka=ka.slice(e+1)),kk(Ww,zi),n}finally{We=t,F0=!1}}return null}var Su=[],bu=0,nh=null,ah=0,Fo=[],_o=0,Ks=null,Ma=1,Ea="";function Hs(e,t){Su[bu++]=ah,Su[bu++]=nh,nh=e,ah=t}function aM(e,t,r){Fo[_o++]=Ma,Fo[_o++]=Ea,Fo[_o++]=Ks,Ks=e;var o=Ma;e=Ea;var n=32-yn(o)-1;o&=~(1<<n),r+=1;var a=32-yn(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,Ma=1<<32-yn(t)+n|r<<n|o,Ea=a+e}else Ma=1<<a|r<<n|o,Ea=e}function Jw(e){e.return!==null&&(Hs(e,1),aM(e,1,0))}function eC(e){for(;e===nh;)nh=Su[--bu],Su[bu]=null,ah=Su[--bu],Su[bu]=null;for(;e===Ks;)Ks=Fo[--_o],Fo[_o]=null,Ea=Fo[--_o],Fo[_o]=null,Ma=Fo[--_o],Fo[_o]=null}var mo=null,po=null,st=!1,xn=null;function iM(e,t){var r=Vo(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 FT(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,mo=e,po=Di(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mo=e,po=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ks!==null?{id:Ma,overflow:Ea}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Vo(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,mo=e,po=null,!0):!1;default:return!1}}function xw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function yw(e){if(st){var t=po;if(t){var r=t;if(!FT(e,t)){if(xw(e))throw Error(q(418));t=Di(r.nextSibling);var o=mo;t&&FT(e,t)?iM(o,r):(e.flags=e.flags&-4097|2,st=!1,mo=e)}}else{if(xw(e))throw Error(q(418));e.flags=e.flags&-4097|2,st=!1,mo=e}}}function _T(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mo=e}function Ag(e){if(e!==mo)return!1;if(!st)return _T(e),st=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!mw(e.type,e.memoizedProps)),t&&(t=po)){if(xw(e))throw sM(),Error(q(418));for(;t;)iM(e,t),t=Di(t.nextSibling)}if(_T(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 r=e.data;if(r==="/$"){if(t===0){po=Di(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}po=null}}else po=mo?Di(e.stateNode.nextSibling):null;return!0}function sM(){for(var e=po;e;)e=Di(e.nextSibling)}function Ou(){po=mo=null,st=!1}function tC(e){xn===null?xn=[e]:xn.push(e)}var JG=_a.ReactCurrentBatchConfig;function Nd(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(q(309));var o=r.stateNode}if(!o)throw Error(q(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(q(284));if(!r._owner)throw Error(q(290,e))}return e}function Dg(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function VT(e){var t=e._init;return t(e._payload)}function lM(e){function t(v,h){if(e){var y=v.deletions;y===null?(v.deletions=[h],v.flags|=16):y.push(h)}}function r(v,h){if(!e)return null;for(;h!==null;)t(v,h),h=h.sibling;return null}function o(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=_i(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=G0(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===hu?c(v,h,y.props.children,w,y.key):h!==null&&(h.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ri&&VT(C)===h.type)?(w=n(h,y.props),w.ref=Nd(v,h,y),w.return=v,w):(w=qg(y.type,y.key,y.props,null,v.mode,w),w.ref=Nd(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=W0(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=qs(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=G0(""+h,v.mode,y),h.return=v,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case xg:return y=qg(h.type,h.key,h.props,null,v.mode,y),y.ref=Nd(v,null,h),y.return=v,y;case gu:return h=W0(h,v.mode,y),h.return=v,h;case Ri:var w=h._init;return d(v,w(h._payload),y)}if(Bd(h)||Md(h))return h=qs(h,v.mode,y,null),h.return=v,h;Dg(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 xg:return y.key===C?l(v,h,y,w):null;case gu:return y.key===C?u(v,h,y,w):null;case Ri:return C=y._init,f(v,h,C(y._payload),w)}if(Bd(y)||Md(y))return C!==null?null:c(v,h,y,w,null);Dg(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 xg:return v=v.get(w.key===null?y:w.key)||null,l(h,v,w,C);case gu:return v=v.get(w.key===null?y:w.key)||null,u(h,v,w,C);case Ri:var S=w._init;return p(v,h,y,S(w._payload),C)}if(Bd(w)||Md(w))return v=v.get(y)||null,c(h,v,w,C,null);Dg(h,w)}return null}function m(v,h,y,w){for(var C=null,S=null,R=h,I=h=0,L=null;R!==null&&I<y.length;I++){R.index>I?(L=R,R=null):L=R.sibling;var T=f(v,R,y[I],w);if(T===null){R===null&&(R=L);break}e&&R&&T.alternate===null&&t(v,R),h=a(T,h,I),S===null?C=T:S.sibling=T,S=T,R=L}if(I===y.length)return r(v,R),st&&Hs(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 st&&Hs(v,I),C}for(R=o(v,R);I<y.length;I++)L=p(R,v,I,y[I],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(k){return t(v,k)}),st&&Hs(v,I),C}function g(v,h,y,w){var C=Md(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,L=null,T=y.next();R!==null&&!T.done;I++,T=y.next()){R.index>I?(L=R,R=null):L=R.sibling;var k=f(v,R,T.value,w);if(k===null){R===null&&(R=L);break}e&&R&&k.alternate===null&&t(v,R),h=a(k,h,I),S===null?C=k:S.sibling=k,S=k,R=L}if(T.done)return r(v,R),st&&Hs(v,I),C;if(R===null){for(;!T.done;I++,T=y.next())T=d(v,T.value,w),T!==null&&(h=a(T,h,I),S===null?C=T:S.sibling=T,S=T);return st&&Hs(v,I),C}for(R=o(v,R);!T.done;I++,T=y.next())T=p(R,v,I,T.value,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(E){return t(v,E)}),st&&Hs(v,I),C}function x(v,h,y,w){if(typeof y=="object"&&y!==null&&y.type===hu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case xg:e:{for(var C=y.key,S=h;S!==null;){if(S.key===C){if(C=y.type,C===hu){if(S.tag===7){r(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===Ri&&VT(C)===S.type){r(v,S.sibling),h=n(S,y.props),h.ref=Nd(v,S,y),h.return=v,v=h;break e}r(v,S);break}else t(v,S);S=S.sibling}y.type===hu?(h=qs(y.props.children,v.mode,w,y.key),h.return=v,v=h):(w=qg(y.type,y.key,y.props,null,v.mode,w),w.ref=Nd(v,h,y),w.return=v,v=w)}return i(v);case gu: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){r(v,h.sibling),h=n(h,y.children||[]),h.return=v,v=h;break e}else{r(v,h);break}else t(v,h);h=h.sibling}h=W0(y,v.mode,w),h.return=v,v=h}return i(v);case Ri:return S=y._init,x(v,h,S(y._payload),w)}if(Bd(y))return m(v,h,y,w);if(Md(y))return g(v,h,y,w);Dg(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,h!==null&&h.tag===6?(r(v,h.sibling),h=n(h,y),h.return=v,v=h):(r(v,h),h=G0(y,v.mode,w),h.return=v,v=h),i(v)):r(v,h)}return x}var Fu=lM(!0),uM=lM(!1),ih=Ui(null),sh=null,Ru=null,rC=null;function oC(){rC=Ru=sh=null}function nC(e){var t=ih.current;rt(ih),e._currentValue=t}function ww(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 Eu(e,t){sh=e,rC=Ru=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($r=!0),e.firstContext=null)}function Ho(e){var t=e._currentValue;if(rC!==e)if(e={context:e,memoizedValue:t,next:null},Ru===null){if(sh===null)throw Error(q(308));Ru=e,sh.dependencies={lanes:0,firstContext:e}}else Ru=Ru.next=e;return t}var Gs=null;function aC(e){Gs===null?Gs=[e]:Gs.push(e)}function cM(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,aC(t)):(r.next=n.next,n.next=r),t.interleaved=r,Oa(e,o)}function Oa(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 Ii=!1;function iC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dM(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ni(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,De&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,Oa(e,r)}return n=o.interleaved,n===null?(t.next=t,aC(o)):(t.next=n.next,n.next=t),o.interleaved=t,Oa(e,r)}function Hg(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,jw(e,r)}}function BT(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 lh(e,t,r,o){var n=e.updateQueue;Ii=!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:Ii=!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);Ys|=i,e.lanes=i,e.memoizedState=d}}function HT(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(q(191,n));n.call(o)}}}var xf={},aa=Ui(xf),uf=Ui(xf),cf=Ui(xf);function Ws(e){if(e===xf)throw Error(q(174));return e}function sC(e,t){switch(Qe(cf,t),Qe(uf,e),Qe(aa,xf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ew(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ew(t,e)}rt(aa),Qe(aa,t)}function _u(){rt(aa),rt(uf),rt(cf)}function fM(e){Ws(cf.current);var t=Ws(aa.current),r=ew(t,e.type);t!==r&&(Qe(uf,e),Qe(aa,r))}function lC(e){uf.current===e&&(rt(aa),rt(uf))}var ft=Ui(0);function uh(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 _0=[];function uC(){for(var e=0;e<_0.length;e++)_0[e]._workInProgressVersionPrimary=null;_0.length=0}var Ug=_a.ReactCurrentDispatcher,V0=_a.ReactCurrentBatchConfig,Xs=0,pt=null,Ot=null,jt=null,ch=!1,$d=!1,df=0,eW=0;function fr(){throw Error(q(321))}function cC(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Cn(e[r],t[r]))return!1;return!0}function dC(e,t,r,o,n,a){if(Xs=a,pt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ug.current=e===null||e.memoizedState===null?nW:aW,e=r(o,n),$d){a=0;do{if($d=!1,df=0,25<=a)throw Error(q(301));a+=1,jt=Ot=null,t.updateQueue=null,Ug.current=iW,e=r(o,n)}while($d)}if(Ug.current=dh,t=Ot!==null&&Ot.next!==null,Xs=0,jt=Ot=pt=null,ch=!1,t)throw Error(q(300));return e}function fC(){var e=df!==0;return df=0,e}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?pt.memoizedState=jt=e:jt=jt.next=e,jt}function Uo(){if(Ot===null){var e=pt.alternate;e=e!==null?e.memoizedState:null}else e=Ot.next;var t=jt===null?pt.memoizedState:jt.next;if(t!==null)jt=t,Ot=e;else{if(e===null)throw Error(q(310));Ot=e,e={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},jt===null?pt.memoizedState=jt=e:jt=jt.next=e}return jt}function ff(e,t){return typeof t=="function"?t(e):t}function B0(e){var t=Uo(),r=t.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=Ot,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((Xs&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,Ys|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,Cn(o,t.memoizedState)||($r=!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,Ys|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function H0(e){var t=Uo(),r=t.queue;if(r===null)throw Error(q(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);Cn(a,t.memoizedState)||($r=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function pM(){}function mM(e,t){var r=pt,o=Uo(),n=t(),a=!Cn(o.memoizedState,n);if(a&&(o.memoizedState=n,$r=!0),o=o.queue,pC(vM.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||jt!==null&&jt.memoizedState.tag&1){if(r.flags|=2048,pf(9,hM.bind(null,r,o,n,t),void 0,null),qt===null)throw Error(q(349));Xs&30||gM(r,t,n)}return n}function gM(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 hM(e,t,r,o){t.value=r,t.getSnapshot=o,xM(t)&&yM(e)}function vM(e,t,r){return r(function(){xM(t)&&yM(e)})}function xM(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Cn(e,r)}catch{return!0}}function yM(e){var t=Oa(e,1);t!==null&&wn(t,e,1,-1)}function UT(e){var t=ra();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ff,lastRenderedState:e},t.queue=e,e=e.dispatch=oW.bind(null,pt,e),[t.memoizedState,e]}function pf(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 wM(){return Uo().memoizedState}function zg(e,t,r,o){var n=ra();pt.flags|=e,n.memoizedState=pf(1|t,r,void 0,o===void 0?null:o)}function bh(e,t,r,o){var n=Uo();o=o===void 0?null:o;var a=void 0;if(Ot!==null){var i=Ot.memoizedState;if(a=i.destroy,o!==null&&cC(o,i.deps)){n.memoizedState=pf(t,r,a,o);return}}pt.flags|=e,n.memoizedState=pf(1|t,r,a,o)}function zT(e,t){return zg(8390656,8,e,t)}function pC(e,t){return bh(2048,8,e,t)}function CM(e,t){return bh(4,2,e,t)}function SM(e,t){return bh(4,4,e,t)}function bM(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 RM(e,t,r){return r=r!=null?r.concat([e]):null,bh(4,4,bM.bind(null,t,e),r)}function mC(){}function IM(e,t){var r=Uo();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&cC(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function PM(e,t){var r=Uo();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&cC(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function LM(e,t,r){return Xs&21?(Cn(r,t)||(r=Ak(),pt.lanes|=r,Ys|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$r=!0),e.memoizedState=r)}function tW(e,t){var r=We;We=r!==0&&4>r?r:4,e(!0);var o=V0.transition;V0.transition={};try{e(!1),t()}finally{We=r,V0.transition=o}}function TM(){return Uo().memoizedState}function rW(e,t,r){var o=Fi(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},kM(e))MM(t,r);else if(r=cM(e,t,r,o),r!==null){var n=Dr();wn(r,e,o,n),EM(r,t,o)}}function oW(e,t,r){var o=Fi(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(kM(e))MM(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,Cn(s,i)){var l=t.interleaved;l===null?(n.next=n,aC(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=cM(e,t,n,o),r!==null&&(n=Dr(),wn(r,e,o,n),EM(r,t,o))}}function kM(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function MM(e,t){$d=ch=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function EM(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,jw(e,r)}}var dh={readContext:Ho,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},nW={readContext:Ho,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:Ho,useEffect:zT,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zg(4194308,4,bM.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zg(4194308,4,e,t)},useInsertionEffect:function(e,t){return zg(4,2,e,t)},useMemo:function(e,t){var r=ra();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=ra();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=rW.bind(null,pt,e),[o.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:UT,useDebugValue:mC,useDeferredValue:function(e){return ra().memoizedState=e},useTransition:function(){var e=UT(!1),t=e[0];return e=tW.bind(null,e[1]),ra().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=pt,n=ra();if(st){if(r===void 0)throw Error(q(407));r=r()}else{if(r=t(),qt===null)throw Error(q(349));Xs&30||gM(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,zT(vM.bind(null,o,a,e),[e]),o.flags|=2048,pf(9,hM.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=ra(),t=qt.identifierPrefix;if(st){var r=Ea,o=Ma;r=(o&~(1<<32-yn(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=df++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=eW++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},aW={readContext:Ho,useCallback:IM,useContext:Ho,useEffect:pC,useImperativeHandle:RM,useInsertionEffect:CM,useLayoutEffect:SM,useMemo:PM,useReducer:B0,useRef:wM,useState:function(){return B0(ff)},useDebugValue:mC,useDeferredValue:function(e){var t=Uo();return LM(t,Ot.memoizedState,e)},useTransition:function(){var e=B0(ff)[0],t=Uo().memoizedState;return[e,t]},useMutableSource:pM,useSyncExternalStore:mM,useId:TM,unstable_isNewReconciler:!1},iW={readContext:Ho,useCallback:IM,useContext:Ho,useEffect:pC,useImperativeHandle:RM,useInsertionEffect:CM,useLayoutEffect:SM,useMemo:PM,useReducer:H0,useRef:wM,useState:function(){return H0(ff)},useDebugValue:mC,useDeferredValue:function(e){var t=Uo();return Ot===null?t.memoizedState=e:LM(t,Ot.memoizedState,e)},useTransition:function(){var e=H0(ff)[0],t=Uo().memoizedState;return[e,t]},useMutableSource:pM,useSyncExternalStore:mM,useId:TM,unstable_isNewReconciler:!1};function hn(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 Cw(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 Rh={isMounted:function(e){return(e=e._reactInternals)?Js(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Dr(),n=Fi(e),a=Aa(o,n);a.payload=t,r!=null&&(a.callback=r),t=Ni(e,a,n),t!==null&&(wn(t,e,n,o),Hg(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Dr(),n=Fi(e),a=Aa(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Ni(e,a,n),t!==null&&(wn(t,e,n,o),Hg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Dr(),o=Fi(e),n=Aa(r,o);n.tag=2,t!=null&&(n.callback=t),t=Ni(e,n,o),t!==null&&(wn(t,e,o,r),Hg(t,e,o))}};function GT(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?!nf(r,o)||!nf(n,a):!0}function AM(e,t,r){var o=!1,n=Bi,a=t.contextType;return typeof a=="object"&&a!==null?a=Ho(a):(n=Xr(t)?$s:gr.current,o=t.contextTypes,a=(o=o!=null)?Nu(e,n):Bi),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rh,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function WT(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&&Rh.enqueueReplaceState(t,t.state,null)}function Sw(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},iC(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Ho(a):(a=Xr(t)?$s:gr.current,n.context=Nu(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Cw(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&&Rh.enqueueReplaceState(n,n.state,null),lh(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Vu(e,t){try{var r="",o=t;do r+=F5(o),o=o.return;while(o);var n=r}catch(a){n=`
|
|
10
10
|
Error generating stack: `+a.message+`
|
|
11
|
-
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function iy(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function zy(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var UU=typeof WeakMap=="function"?WeakMap:Map;function NP(e,t,r){r=ua(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){Jm||(Jm=!0,Zy=o),zy(e,t)},r}function OP(e,t,r){r=ua(-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(){zy(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){zy(e,t),typeof o!="function"&&(di===null?di=new Set([this]):di.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function jI(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new UU;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=t4.bind(null,e,t,r),t.then(e,e))}function $I(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 KI(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=ua(-1,1),t.tag=2,ci(r,t,1))),r.lanes|=1),e)}var zU=ma.ReactCurrentOwner,Fr=!1;function br(e,t,r,o){t.child=e===null?cP(t,null,r,o):Zl(t,e.child,r,o)}function XI(e,t,r,o,n){r=r.render;var a=t.ref;return $l(t,n),o=M0(e,t,r,o,a,n),r=E0(),e!==null&&!Fr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,pa(e,t,n)):(it&&r&&x0(t),t.flags|=1,br(e,t,o,n),t.child)}function YI(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!U0(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,FP(e,t,a,o,n)):(e=Am(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:cd,r(i,o)&&e.ref===t.ref)return pa(e,t,n)}return t.flags|=1,e=pi(a,o),e.ref=t.ref,e.return=t,t.child=e}function FP(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(cd(a,o)&&e.ref===t.ref)if(Fr=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&(Fr=!0);else return t.lanes=e.lanes,pa(e,t,n)}return Gy(e,t,r,o,n)}function _P(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},Ye(zl,Jr),Jr|=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,Ye(zl,Jr),Jr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Ye(zl,Jr),Jr|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Ye(zl,Jr),Jr|=o;return br(e,t,n,r),t.child}function VP(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Gy(e,t,r,o,n){var a=Vr(r)?ws:lr.current;return a=Yl(t,a),$l(t,n),r=M0(e,t,r,o,a,n),o=E0(),e!==null&&!Fr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,pa(e,t,n)):(it&&o&&x0(t),t.flags|=1,br(e,t,r,n),t.child)}function QI(e,t,r,o,n){if(Vr(r)){var a=!0;Gm(t)}else a=!1;if($l(t,n),t.stateNode===null)km(e,t),DP(t,r,o),Uy(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=To(u):(u=Vr(r)?ws:lr.current,u=Yl(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)&&qI(t,i,o,u),ti=!1;var f=t.memoizedState;i.state=f,Km(t,o,i,n),l=t.memoizedState,s!==o||f!==l||_r.current||ti?(typeof c=="function"&&(Hy(t,r,c,o),l=t.memoizedState),(s=ti||WI(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,fP(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Qo(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=To(l):(l=Vr(r)?ws:lr.current,l=Yl(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)&&qI(t,i,o,l),ti=!1,f=t.memoizedState,i.state=f,Km(t,o,i,n);var m=t.memoizedState;s!==d||f!==m||_r.current||ti?(typeof p=="function"&&(Hy(t,r,p,o),m=t.memoizedState),(u=ti||WI(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 Wy(e,t,r,o,a,n)}function Wy(e,t,r,o,n,a){VP(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&FI(t,r,!1),pa(e,t,a);o=t.stateNode,zU.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Zl(t,e.child,null,a),t.child=Zl(t,null,s,a)):br(e,t,s,a),t.memoizedState=o.state,n&&FI(t,r,!0),t.child}function BP(e){var t=e.stateNode;t.pendingContext?OI(e,t.pendingContext,t.pendingContext!==t.context):t.context&&OI(e,t.context,!1),L0(e,t.containerInfo)}function ZI(e,t,r,o,n){return Ql(),w0(n),t.flags|=256,br(e,t,r,o),t.child}var qy={dehydrated:null,treeContext:null,retryLane:0};function jy(e){return{baseLanes:e,cachePool:null,transitions:null}}function HP(e,t,r){var o=t.pendingProps,n=dt.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(n&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Ye(dt,n&1),e===null)return Vy(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=pg(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=jy(r),t.memoizedState=qy,e):N0(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return GU(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=pi(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=pi(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?jy(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=qy,o}return a=e.child,e=a.sibling,o=pi(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 N0(e,t){return t=pg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wm(e,t,r,o){return o!==null&&w0(o),Zl(t,e.child,null,r),e=N0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GU(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=iy(Error(j(422))),wm(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=pg({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&&Zl(t,e.child,null,i),t.child.memoizedState=jy(i),t.memoizedState=qy,a);if(!(t.mode&1))return wm(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=iy(a,o,void 0),wm(e,t,i,o)}if(s=(i&e.childLanes)!==0,Fr||s){if(o=zt,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,fa(e,n),tn(o,e,n,-1))}return H0(),o=iy(Error(j(421))),wm(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=r4.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,eo=ui(n.nextSibling),to=t,it=!0,Jo=null,e!==null&&(Ro[Io++]=sa,Ro[Io++]=la,Ro[Io++]=Cs,sa=e.id,la=e.overflow,Cs=t),t=N0(t,o.children),t.flags|=4096,t)}function JI(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),By(e.return,t,r)}function sy(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 UP(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(br(e,t,o.children,r),o=dt.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&JI(e,r,t);else if(e.tag===19)JI(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(Ye(dt,o),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&Xm(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),sy(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&&Xm(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}sy(t,!0,r,null,a);break;case"together":sy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function km(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pa(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=pi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=pi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function WU(e,t,r){switch(t.tag){case 3:BP(t),Ql();break;case 5:pP(t);break;case 1:Vr(t.type)&&Gm(t);break;case 4:L0(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Ye(jm,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Ye(dt,dt.current&1),t.flags|=128,null):r&t.child.childLanes?HP(e,t,r):(Ye(dt,dt.current&1),e=pa(e,t,r),e!==null?e.sibling:null);Ye(dt,dt.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return UP(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Ye(dt,dt.current),o)break;return null;case 22:case 23:return t.lanes=0,_P(e,t,r)}return pa(e,t,r)}var zP,$y,GP,WP;zP=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}};$y=function(){};GP=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,vs(Vn.current);var a=null;switch(r){case"input":n=gy(e,n),o=gy(e,o),a=[];break;case"select":n=pt({},n,{value:void 0}),o=pt({},o,{value:void 0}),a=[];break;case"textarea":n=xy(e,n),o=xy(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Um)}wy(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"&&(od.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"&&(od.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&et("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)}};WP=function(e,t,r,o){r!==o&&(t.flags|=4)};function Uc(e,t){if(!it)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 ir(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 qU(e,t,r){var o=t.pendingProps;switch(y0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ir(t),null;case 1:return Vr(t.type)&&zm(),ir(t),null;case 3:return o=t.stateNode,Jl(),tt(_r),tt(lr),T0(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(xm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Jo!==null&&(t0(Jo),Jo=null))),$y(e,t),ir(t),null;case 5:P0(t);var n=vs(gd.current);if(r=t.type,e!==null&&t.stateNode!=null)GP(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 ir(t),null}if(e=vs(Vn.current),xm(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[Fn]=t,o[pd]=a,e=(t.mode&1)!==0,r){case"dialog":et("cancel",o),et("close",o);break;case"iframe":case"object":case"embed":et("load",o);break;case"video":case"audio":for(n=0;n<$c.length;n++)et($c[n],o);break;case"source":et("error",o);break;case"img":case"image":case"link":et("error",o),et("load",o);break;case"details":et("toggle",o);break;case"input":sI(o,a),et("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},et("invalid",o);break;case"textarea":uI(o,a),et("invalid",o)}wy(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]):od.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&et("scroll",o)}switch(r){case"input":am(o),lI(o,a,!0);break;case"textarea":am(o),cI(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=Um)}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=xL(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[Fn]=t,e[pd]=o,zP(e,t,!1,!1),t.stateNode=e;e:{switch(i=Cy(r,o),r){case"dialog":et("cancel",e),et("close",e),n=o;break;case"iframe":case"object":case"embed":et("load",e),n=o;break;case"video":case"audio":for(n=0;n<$c.length;n++)et($c[n],e);n=o;break;case"source":et("error",e),n=o;break;case"img":case"image":case"link":et("error",e),et("load",e),n=o;break;case"details":et("toggle",e),n=o;break;case"input":sI(e,o),n=gy(e,o),et("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=pt({},o,{value:void 0}),et("invalid",e);break;case"textarea":uI(e,o),n=xy(e,o),et("invalid",e);break;default:n=o}wy(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?CL(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yL(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&nd(e,l):typeof l=="number"&&nd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(od.hasOwnProperty(a)?l!=null&&a==="onScroll"&&et("scroll",e):l!=null&&n0(e,a,l,i))}switch(r){case"input":am(e),lI(e,o,!1);break;case"textarea":am(e),cI(e);break;case"option":o.value!=null&&e.setAttribute("value",""+mi(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?Gl(e,!!o.multiple,a,!1):o.defaultValue!=null&&Gl(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Um)}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 ir(t),null;case 6:if(e&&t.stateNode!=null)WP(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(j(166));if(r=vs(gd.current),vs(Vn.current),xm(t)){if(o=t.stateNode,r=t.memoizedProps,o[Fn]=t,(a=o.nodeValue!==r)&&(e=to,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[Fn]=t,t.stateNode=o}return ir(t),null;case 13:if(tt(dt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&eo!==null&&t.mode&1&&!(t.flags&128))lP(),Ql(),t.flags|=98560,a=!1;else if(a=xm(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[Fn]=t}else Ql(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ir(t),a=!1}else Jo!==null&&(t0(Jo),Jo=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?At===0&&(At=3):H0())),t.updateQueue!==null&&(t.flags|=4),ir(t),null);case 4:return Jl(),$y(e,t),e===null&&dd(t.stateNode.containerInfo),ir(t),null;case 10:return b0(t.type._context),ir(t),null;case 17:return Vr(t.type)&&zm(),ir(t),null;case 19:if(tt(dt),a=t.memoizedState,a===null)return ir(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)Uc(a,!1);else{if(At!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Xm(e),i!==null){for(t.flags|=128,Uc(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 Ye(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&St()>tu&&(t.flags|=128,o=!0,Uc(a,!1),t.lanes=4194304)}else{if(!o)if(e=Xm(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Uc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!it)return ir(t),null}else 2*St()-a.renderingStartTime>tu&&r!==1073741824&&(t.flags|=128,o=!0,Uc(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=St(),t.sibling=null,r=dt.current,Ye(dt,o?r&1|2:r&1),t):(ir(t),null);case 22:case 23:return B0(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Jr&1073741824&&(ir(t),t.subtreeFlags&6&&(t.flags|=8192)):ir(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function jU(e,t){switch(y0(t),t.tag){case 1:return Vr(t.type)&&zm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jl(),tt(_r),tt(lr),T0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return P0(t),null;case 13:if(tt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(dt),null;case 4:return Jl(),null;case 10:return b0(t.type._context),null;case 22:case 23:return B0(),null;case 24:return null;default:return null}}var Cm=!1,sr=!1,$U=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Ul(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){vt(e,t,o)}else r.current=null}function Ky(e,t,r){try{r()}catch(o){vt(e,t,o)}}var eL=!1;function KU(e,t){if(Ey=Vm,e=XL(),v0(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(Ay={focusedElem:e,selectionRange:r},Vm=!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:Qo(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){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return m=eL,eL=!1,m}function ed(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&&Ky(t,r,a)}n=n.next}while(n!==o)}}function dg(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 Xy(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 qP(e){var t=e.alternate;t!==null&&(e.alternate=null,qP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fn],delete t[pd],delete t[Oy],delete t[MU],delete t[EU])),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 jP(e){return e.tag===5||e.tag===3||e.tag===4}function tL(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jP(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 Yy(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=Um));else if(o!==4&&(e=e.child,e!==null))for(Yy(e,t,r),e=e.sibling;e!==null;)Yy(e,t,r),e=e.sibling}function Qy(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(Qy(e,t,r),e=e.sibling;e!==null;)Qy(e,t,r),e=e.sibling}var Xt=null,Zo=!1;function Ja(e,t,r){for(r=r.child;r!==null;)$P(e,t,r),r=r.sibling}function $P(e,t,r){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(og,r)}catch{}switch(r.tag){case 5:sr||Ul(r,t);case 6:var o=Xt,n=Zo;Xt=null,Ja(e,t,r),Xt=o,Zo=n,Xt!==null&&(Zo?(e=Xt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Xt.removeChild(r.stateNode));break;case 18:Xt!==null&&(Zo?(e=Xt,r=r.stateNode,e.nodeType===8?ey(e.parentNode,r):e.nodeType===1&&ey(e,r),ld(e)):ey(Xt,r.stateNode));break;case 4:o=Xt,n=Zo,Xt=r.stateNode.containerInfo,Zo=!0,Ja(e,t,r),Xt=o,Zo=n;break;case 0:case 11:case 14:case 15:if(!sr&&(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)&&Ky(r,t,i),n=n.next}while(n!==o)}Ja(e,t,r);break;case 1:if(!sr&&(Ul(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){vt(r,t,s)}Ja(e,t,r);break;case 21:Ja(e,t,r);break;case 22:r.mode&1?(sr=(o=sr)||r.memoizedState!==null,Ja(e,t,r),sr=o):Ja(e,t,r);break;default:Ja(e,t,r)}}function rL(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new $U),t.forEach(function(o){var n=o4.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function Yo(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:Xt=s.stateNode,Zo=!1;break e;case 3:Xt=s.stateNode.containerInfo,Zo=!0;break e;case 4:Xt=s.stateNode.containerInfo,Zo=!0;break e}s=s.return}if(Xt===null)throw Error(j(160));$P(a,i,n),Xt=null,Zo=!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;)KP(t,e),t=t.sibling}function KP(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Yo(t,e),Nn(e),o&4){try{ed(3,e,e.return),dg(3,e)}catch(g){vt(e,e.return,g)}try{ed(5,e,e.return)}catch(g){vt(e,e.return,g)}}break;case 1:Yo(t,e),Nn(e),o&512&&r!==null&&Ul(r,r.return);break;case 5:if(Yo(t,e),Nn(e),o&512&&r!==null&&Ul(r,r.return),e.flags&32){var n=e.stateNode;try{nd(n,"")}catch(g){vt(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&&hL(n,a),Cy(s,i);var u=Cy(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?CL(n,d):c==="dangerouslySetInnerHTML"?yL(n,d):c==="children"?nd(n,d):n0(n,c,d,u)}switch(s){case"input":hy(n,a);break;case"textarea":vL(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Gl(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Gl(n,!!a.multiple,a.defaultValue,!0):Gl(n,!!a.multiple,a.multiple?[]:"",!1))}n[pd]=a}catch(g){vt(e,e.return,g)}}break;case 6:if(Yo(t,e),Nn(e),o&4){if(e.stateNode===null)throw Error(j(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(g){vt(e,e.return,g)}}break;case 3:if(Yo(t,e),Nn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{ld(t.containerInfo)}catch(g){vt(e,e.return,g)}break;case 4:Yo(t,e),Nn(e);break;case 13:Yo(t,e),Nn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(_0=St())),o&4&&rL(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(sr=(u=sr)||c,Yo(t,e),sr=u):Yo(t,e),Nn(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:ed(4,f,f.return);break;case 1:Ul(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){vt(o,r,g)}}break;case 5:Ul(f,f.return);break;case 22:if(f.memoizedState!==null){nL(d);continue}}p!==null?(p.return=f,oe=p):nL(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=wL("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:Yo(t,e),Nn(e),o&4&&rL(e);break;case 21:break;default:Yo(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(jP(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&&(nd(n,""),o.flags&=-33);var a=tL(e);Qy(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=tL(e);Yy(e,s,i);break;default:throw Error(j(161))}}catch(l){vt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function XU(e,t,r){oe=e,XP(e,t,r)}function XP(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||Cm;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||sr;s=Cm;var u=sr;if(Cm=i,(sr=l)&&!u)for(oe=n;oe!==null;)i=oe,l=i.child,i.tag===22&&i.memoizedState!==null?aL(n):l!==null?(l.return=i,oe=l):aL(n);for(;a!==null;)oe=a,XP(a,t,r),a=a.sibling;oe=n,Cm=s,sr=u}oL(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,oe=a):oL(e,t,r)}}function oL(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:sr||dg(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!sr)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Qo(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&UI(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}UI(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&&ld(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}sr||t.flags&512&&Xy(t)}catch(f){vt(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 nL(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 aL(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{dg(4,t)}catch(l){vt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){vt(t,n,l)}}var a=t.return;try{Xy(t)}catch(l){vt(t,a,l)}break;case 5:var i=t.return;try{Xy(t)}catch(l){vt(t,i,l)}}}catch(l){vt(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 YU=Math.ceil,Zm=ma.ReactCurrentDispatcher,O0=ma.ReactCurrentOwner,Po=ma.ReactCurrentBatchConfig,Ee=0,zt=null,Lt=null,Yt=0,Jr=0,zl=vi(0),At=0,yd=null,bs=0,fg=0,F0=0,td=null,Or=null,_0=0,tu=1/0,aa=null,Jm=!1,Zy=null,di=null,Sm=!1,ai=null,eg=0,rd=0,Jy=null,Mm=-1,Em=0;function Rr(){return Ee&6?St():Mm!==-1?Mm:Mm=St()}function fi(e){return e.mode&1?Ee&2&&Yt!==0?Yt&-Yt:DU.transition!==null?(Em===0&&(Em=DL()),Em):(e=Ge,e!==0||(e=window.event,e=e===void 0?16:HL(e.type)),e):1}function tn(e,t,r,o){if(50<rd)throw rd=0,Jy=null,Error(j(185));wd(e,r,o),(!(Ee&2)||e!==zt)&&(e===zt&&(!(Ee&2)&&(fg|=r),At===4&&oi(e,Yt)),Br(e,o),r===1&&Ee===0&&!(t.mode&1)&&(tu=St()+500,lg&&xi()))}function Br(e,t){var r=e.callbackNode;O3(e,t);var o=_m(e,e===zt?Yt:0);if(o===0)r!==null&&pI(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&pI(r),t===1)e.tag===0?AU(iL.bind(null,e)):aP(iL.bind(null,e)),TU(function(){!(Ee&6)&&xi()}),r=null;else{switch(NL(o)){case 1:r=u0;break;case 4:r=EL;break;case 16:r=Fm;break;case 536870912:r=AL;break;default:r=Fm}r=o1(r,YP.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function YP(e,t){if(Mm=-1,Em=0,Ee&6)throw Error(j(327));var r=e.callbackNode;if(Kl()&&e.callbackNode!==r)return null;var o=_m(e,e===zt?Yt:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=tg(e,o);else{t=o;var n=Ee;Ee|=2;var a=ZP();(zt!==e||Yt!==t)&&(aa=null,tu=St()+500,xs(e,t));do try{JU();break}catch(s){QP(e,s)}while(1);S0(),Zm.current=a,Ee=n,Lt!==null?t=0:(zt=null,Yt=0,t=At)}if(t!==0){if(t===2&&(n=Ly(e),n!==0&&(o=n,t=e0(e,n))),t===1)throw r=yd,xs(e,0),oi(e,o),Br(e,St()),r;if(t===6)oi(e,o);else{if(n=e.current.alternate,!(o&30)&&!QU(n)&&(t=tg(e,o),t===2&&(a=Ly(e),a!==0&&(o=a,t=e0(e,a))),t===1))throw r=yd,xs(e,0),oi(e,o),Br(e,St()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error(j(345));case 2:ms(e,Or,aa);break;case 3:if(oi(e,o),(o&130023424)===o&&(t=_0+500-St(),10<t)){if(_m(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Rr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=Ny(ms.bind(null,e,Or,aa),t);break}ms(e,Or,aa);break;case 4:if(oi(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-en(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=St()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*YU(o/1960))-o,10<o){e.timeoutHandle=Ny(ms.bind(null,e,Or,aa),o);break}ms(e,Or,aa);break;case 5:ms(e,Or,aa);break;default:throw Error(j(329))}}}return Br(e,St()),e.callbackNode===r?YP.bind(null,e):null}function e0(e,t){var r=td;return e.current.memoizedState.isDehydrated&&(xs(e,t).flags|=256),e=tg(e,t),e!==2&&(t=Or,Or=r,t!==null&&t0(t)),e}function t0(e){Or===null?Or=e:Or.push.apply(Or,e)}function QU(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(!rn(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 oi(e,t){for(t&=~F0,t&=~fg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-en(t),o=1<<r;e[r]=-1,t&=~o}}function iL(e){if(Ee&6)throw Error(j(327));Kl();var t=_m(e,0);if(!(t&1))return Br(e,St()),null;var r=tg(e,t);if(e.tag!==0&&r===2){var o=Ly(e);o!==0&&(t=o,r=e0(e,o))}if(r===1)throw r=yd,xs(e,0),oi(e,t),Br(e,St()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ms(e,Or,aa),Br(e,St()),null}function V0(e,t){var r=Ee;Ee|=1;try{return e(t)}finally{Ee=r,Ee===0&&(tu=St()+500,lg&&xi())}}function Rs(e){ai!==null&&ai.tag===0&&!(Ee&6)&&Kl();var t=Ee;Ee|=1;var r=Po.transition,o=Ge;try{if(Po.transition=null,Ge=1,e)return e()}finally{Ge=o,Po.transition=r,Ee=t,!(Ee&6)&&xi()}}function B0(){Jr=zl.current,tt(zl)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,PU(r)),Lt!==null)for(r=Lt.return;r!==null;){var o=r;switch(y0(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&zm();break;case 3:Jl(),tt(_r),tt(lr),T0();break;case 5:P0(o);break;case 4:Jl();break;case 13:tt(dt);break;case 19:tt(dt);break;case 10:b0(o.type._context);break;case 22:case 23:B0()}r=r.return}if(zt=e,Lt=e=pi(e.current,null),Yt=Jr=t,At=0,yd=null,F0=fg=bs=0,Or=td=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 QP(e,t){do{var r=Lt;try{if(S0(),Pm.current=Qm,Ym){for(var o=ft.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}Ym=!1}if(Ss=0,Ut=Et=ft=null,Jc=!1,hd=0,O0.current=null,r===null||r.return===null){At=1,yd=t,Lt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=Yt,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=$I(i);if(p!==null){p.flags&=-257,KI(p,i,s,a,t),p.mode&1&&jI(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)){jI(a,u,t),H0();break e}l=Error(j(426))}}else if(it&&s.mode&1){var y=$I(i);if(y!==null){!(y.flags&65536)&&(y.flags|=256),KI(y,i,s,a,t),w0(eu(l,s));break e}}a=l=eu(l,s),At!==4&&(At=2),td===null?td=[a]:td.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=NP(a,l,t);HI(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"&&(di===null||!di.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=OP(a,s,t);HI(a,w);break e}}a=a.return}while(a!==null)}e1(r)}catch(C){t=C,Lt===r&&r!==null&&(Lt=r=r.return);continue}break}while(1)}function ZP(){var e=Zm.current;return Zm.current=Qm,e===null?Qm:e}function H0(){(At===0||At===3||At===2)&&(At=4),zt===null||!(bs&268435455)&&!(fg&268435455)||oi(zt,Yt)}function tg(e,t){var r=Ee;Ee|=2;var o=ZP();(zt!==e||Yt!==t)&&(aa=null,xs(e,t));do try{ZU();break}catch(n){QP(e,n)}while(1);if(S0(),Ee=r,Zm.current=o,Lt!==null)throw Error(j(261));return zt=null,Yt=0,At}function ZU(){for(;Lt!==null;)JP(Lt)}function JU(){for(;Lt!==null&&!L3();)JP(Lt)}function JP(e){var t=r1(e.alternate,e,Jr);e.memoizedProps=e.pendingProps,t===null?e1(e):Lt=t,O0.current=null}function e1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=jU(r,t),r!==null){r.flags&=32767,Lt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{At=6,Lt=null;return}}else if(r=qU(r,t,Jr),r!==null){Lt=r;return}if(t=t.sibling,t!==null){Lt=t;return}Lt=t=e}while(t!==null);At===0&&(At=5)}function ms(e,t,r){var o=Ge,n=Po.transition;try{Po.transition=null,Ge=1,e4(e,t,r,o)}finally{Po.transition=n,Ge=o}return null}function e4(e,t,r,o){do Kl();while(ai!==null);if(Ee&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(F3(e,a),e===zt&&(Lt=zt=null,Yt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Sm||(Sm=!0,o1(Fm,function(){return Kl(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Po.transition,Po.transition=null;var i=Ge;Ge=1;var s=Ee;Ee|=4,O0.current=null,KU(e,r),KP(r,e),SU(Ay),Vm=!!Ey,Ay=Ey=null,e.current=r,XU(r,e,n),P3(),Ee=s,Ge=i,Po.transition=a}else e.current=r;if(Sm&&(Sm=!1,ai=e,eg=n),a=e.pendingLanes,a===0&&(di=null),M3(r.stateNode,o),Br(e,St()),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(Jm)throw Jm=!1,e=Zy,Zy=null,e;return eg&1&&e.tag!==0&&Kl(),a=e.pendingLanes,a&1?e===Jy?rd++:(rd=0,Jy=e):rd=0,xi(),null}function Kl(){if(ai!==null){var e=NL(eg),t=Po.transition,r=Ge;try{if(Po.transition=null,Ge=16>e?16:e,ai===null)var o=!1;else{if(e=ai,ai=null,eg=0,Ee&6)throw Error(j(331));var n=Ee;for(Ee|=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:ed(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(qP(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:ed(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:dg(9,s)}}catch(C){vt(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(Ee=n,xi(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(og,e)}catch{}o=!0}return o}finally{Ge=r,Po.transition=t}}return!1}function sL(e,t,r){t=eu(r,t),t=NP(e,t,1),e=ci(e,t,1),t=Rr(),e!==null&&(wd(e,1,t),Br(e,t))}function vt(e,t,r){if(e.tag===3)sL(e,e,r);else for(;t!==null;){if(t.tag===3){sL(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(di===null||!di.has(o))){e=eu(r,e),e=OP(t,e,1),t=ci(t,e,1),e=Rr(),t!==null&&(wd(t,1,e),Br(t,e));break}}t=t.return}}function t4(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Rr(),e.pingedLanes|=e.suspendedLanes&r,zt===e&&(Yt&r)===r&&(At===4||At===3&&(Yt&130023424)===Yt&&500>St()-_0?xs(e,0):F0|=r),Br(e,t)}function t1(e,t){t===0&&(e.mode&1?(t=lm,lm<<=1,!(lm&130023424)&&(lm=4194304)):t=1);var r=Rr();e=fa(e,t),e!==null&&(wd(e,t,r),Br(e,r))}function r4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),t1(e,r)}function o4(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),t1(e,r)}var r1;r1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||_r.current)Fr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Fr=!1,WU(e,t,r);Fr=!!(e.flags&131072)}else Fr=!1,it&&t.flags&1048576&&iP(t,qm,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;km(e,t),e=t.pendingProps;var n=Yl(t,lr.current);$l(t,r),n=M0(null,t,o,e,n,r);var a=E0();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,Vr(o)?(a=!0,Gm(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,I0(t),n.updater=cg,t.stateNode=n,n._reactInternals=t,Uy(t,o,e,r),t=Wy(null,t,o,!0,a,r)):(t.tag=0,it&&a&&x0(t),br(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(km(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=a4(o),e=Qo(o,e),n){case 0:t=Gy(null,t,o,e,r);break e;case 1:t=QI(null,t,o,e,r);break e;case 11:t=XI(null,t,o,e,r);break e;case 14:t=YI(null,t,o,Qo(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:Qo(o,n),Gy(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qo(o,n),QI(e,t,o,n,r);case 3:e:{if(BP(t),e===null)throw Error(j(387));o=t.pendingProps,a=t.memoizedState,n=a.element,fP(e,t),Km(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=eu(Error(j(423)),t),t=ZI(e,t,o,r,n);break e}else if(o!==n){n=eu(Error(j(424)),t),t=ZI(e,t,o,r,n);break e}else for(eo=ui(t.stateNode.containerInfo.firstChild),to=t,it=!0,Jo=null,r=cP(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ql(),o===n){t=pa(e,t,r);break e}br(e,t,o,r)}t=t.child}return t;case 5:return pP(t),e===null&&Vy(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,Dy(o,n)?i=null:a!==null&&Dy(o,a)&&(t.flags|=32),VP(e,t),br(e,t,i,r),t.child;case 6:return e===null&&Vy(t),null;case 13:return HP(e,t,r);case 4:return L0(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Zl(t,null,o,r):br(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qo(o,n),XI(e,t,o,n,r);case 7:return br(e,t,t.pendingProps,r),t.child;case 8:return br(e,t,t.pendingProps.children,r),t.child;case 12:return br(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,Ye(jm,o._currentValue),o._currentValue=i,a!==null)if(rn(a.value,i)){if(a.children===n.children&&!_r.current){t=pa(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=ua(-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),By(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),By(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}br(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,$l(t,r),n=To(n),o=o(n),t.flags|=1,br(e,t,o,r),t.child;case 14:return o=t.type,n=Qo(o,t.pendingProps),n=Qo(o.type,n),YI(e,t,o,n,r);case 15:return FP(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qo(o,n),km(e,t),t.tag=1,Vr(o)?(e=!0,Gm(t)):e=!1,$l(t,r),DP(t,o,n),Uy(t,o,n,r),Wy(null,t,o,!0,e,r);case 19:return UP(e,t,r);case 22:return _P(e,t,r)}throw Error(j(156,t.tag))};function o1(e,t){return ML(e,t)}function n4(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lo(e,t,r,o){return new n4(e,t,r,o)}function U0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a4(e){if(typeof e=="function")return U0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i0)return 11;if(e===s0)return 14}return 2}function pi(e,t){var r=e.alternate;return r===null?(r=Lo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Am(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")U0(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Al:return ys(r.children,n,a,t);case a0:i=8,n|=8;break;case dy:return e=Lo(12,r,t,n|2),e.elementType=dy,e.lanes=a,e;case fy:return e=Lo(13,r,t,n),e.elementType=fy,e.lanes=a,e;case py:return e=Lo(19,r,t,n),e.elementType=py,e.lanes=a,e;case pL:return pg(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dL:i=10;break e;case fL:i=9;break e;case i0:i=11;break e;case s0:i=14;break e;case ei:i=16,o=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=Lo(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function ys(e,t,r,o){return e=Lo(7,e,o,t),e.lanes=r,e}function pg(e,t,r,o){return e=Lo(22,e,o,t),e.elementType=pL,e.lanes=r,e.stateNode={isHidden:!1},e}function ly(e,t,r){return e=Lo(6,e,null,t),e.lanes=r,e}function uy(e,t,r){return t=Lo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function i4(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=jx(0),this.expirationTimes=jx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jx(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function z0(e,t,r,o,n,a,i,s,l){return e=new i4(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Lo(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},I0(a),e}function s4(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:El,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function n1(e){if(!e)return gi;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(Vr(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(Vr(r))return nP(e,r,t)}return t}function a1(e,t,r,o,n,a,i,s,l){return e=z0(r,o,!0,e,n,a,i,s,l),e.context=n1(null),r=e.current,o=Rr(),n=fi(r),a=ua(o,n),a.callback=t??null,ci(r,a,n),e.current.lanes=n,wd(e,n,o),Br(e,o),e}function mg(e,t,r,o){var n=t.current,a=Rr(),i=fi(n);return r=n1(r),t.context===null?t.context=r:t.pendingContext=r,t=ua(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=ci(n,t,i),e!==null&&(tn(e,n,i,a),Lm(e,n,i)),i}function rg(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 lL(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function G0(e,t){lL(e,t),(e=e.alternate)&&lL(e,t)}function l4(){return null}var i1=typeof reportError=="function"?reportError:function(e){console.error(e)};function W0(e){this._internalRoot=e}gg.prototype.render=W0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));mg(e,t,null,null)};gg.prototype.unmount=W0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rs(function(){mg(null,e,null,null)}),t[da]=null}};function gg(e){this._internalRoot=e}gg.prototype.unstable_scheduleHydration=function(e){if(e){var t=_L();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ri.length&&t!==0&&t<ri[r].priority;r++);ri.splice(r,0,e),r===0&&BL(e)}};function q0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function uL(){}function u4(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=rg(i);a.call(u)}}var i=a1(t,o,e,0,null,!1,!1,"",uL);return e._reactRootContainer=i,e[da]=i.current,dd(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=rg(l);s.call(u)}}var l=z0(e,0,!1,null,null,!1,!1,"",uL);return e._reactRootContainer=l,e[da]=l.current,dd(e.nodeType===8?e.parentNode:e),Rs(function(){mg(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=rg(i);s.call(l)}}mg(t,i,e,n)}else i=u4(r,t,e,n,o);return rg(i)}OL=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=jc(t.pendingLanes);r!==0&&(c0(t,r|1),Br(t,St()),!(Ee&6)&&(tu=St()+500,xi()))}break;case 13:Rs(function(){var o=fa(e,1);if(o!==null){var n=Rr();tn(o,e,1,n)}}),G0(e,1)}};d0=function(e){if(e.tag===13){var t=fa(e,134217728);if(t!==null){var r=Rr();tn(t,e,134217728,r)}G0(e,134217728)}};FL=function(e){if(e.tag===13){var t=fi(e),r=fa(e,t);if(r!==null){var o=Rr();tn(r,e,t,o)}G0(e,t)}};_L=function(){return Ge};VL=function(e,t){var r=Ge;try{return Ge=e,t()}finally{Ge=r}};by=function(e,t,r){switch(t){case"input":if(hy(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=sg(o);if(!n)throw Error(j(90));gL(o),hy(o,n)}}}break;case"textarea":vL(e,r);break;case"select":t=r.value,t!=null&&Gl(e,!!r.multiple,t,!1)}};RL=V0;IL=Rs;var c4={usingClientEntryPoint:!1,Events:[Sd,Fl,sg,SL,bL,V0]},zc={findFiberByHostInstance:gs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d4={bundleType:zc.bundleType,version:zc.version,rendererPackageName:zc.rendererPackageName,rendererConfig:zc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=TL(e),e===null?null:e.stateNode},findFiberByHostInstance:zc.findFiberByHostInstance||l4,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Gc.isDisabled&&Gc.supportsFiber))try{og=Gc.inject(d4),_n=Gc}catch{}var Gc;no.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c4;no.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!q0(t))throw Error(j(200));return s4(e,t,null,r)};no.createRoot=function(e,t){if(!q0(e))throw Error(j(299));var r=!1,o="",n=i1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=z0(e,1,!1,null,null,r,!1,o,n),e[da]=t.current,dd(e.nodeType===8?e.parentNode:e),new W0(t)};no.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=TL(t),e=e===null?null:e.stateNode,e};no.flushSync=function(e){return Rs(e)};no.hydrate=function(e,t,r){if(!hg(t))throw Error(j(200));return vg(null,e,t,!0,r)};no.hydrateRoot=function(e,t,r){if(!q0(e))throw Error(j(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=i1;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=a1(t,null,e,1,r??null,n,!1,a,i),e[da]=t.current,dd(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 gg(t)};no.render=function(e,t,r){if(!hg(t))throw Error(j(200));return vg(null,e,t,!1,r)};no.unmountComponentAtNode=function(e){if(!hg(e))throw Error(j(40));return e._reactRootContainer?(Rs(function(){vg(null,null,e,!1,function(){e._reactRootContainer=null,e[da]=null})}),!0):!1};no.unstable_batchedUpdates=V0;no.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!hg(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return vg(e,t,r,!1,o)};no.version="18.3.1-next-f1338f8080-20240426"});var yi=Pl((KY,u1)=>{"use strict";function l1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l1)}catch(e){console.error(e)}}l1(),u1.exports=s1()});var oT=Pl(rT=>{"use strict";var xu=E();function v5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var x5=typeof Object.is=="function"?Object.is:v5,y5=xu.useState,w5=xu.useEffect,C5=xu.useLayoutEffect,S5=xu.useDebugValue;function b5(e,t){var r=t(),o=y5({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return C5(function(){n.value=r,n.getSnapshot=t,lw(n)&&a({inst:n})},[e,r,t]),w5(function(){return lw(n)&&a({inst:n}),e(function(){lw(n)&&a({inst:n})})},[e]),S5(r),r}function lw(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!x5(e,r)}catch{return!0}}function R5(e,t){return t()}var I5=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?R5:b5;rT.useSyncExternalStore=xu.useSyncExternalStore!==void 0?xu.useSyncExternalStore:I5});var aT=Pl((nte,nT)=>{"use strict";nT.exports=oT()});var kg=R(E());var Ur=R(E(),1);var Co=R(E(),1),Ax=R(D(),1);function HR(e,t){let r=Co.createContext(t),o=a=>{let{children:i,...s}=a,l=Co.useMemo(()=>s,Object.values(s));return(0,Ax.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Co.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 Ne(e,t=[]){let r=[];function o(a,i){let s=Co.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,y=Co.useMemo(()=>m,Object.values(m));return(0,Ax.jsx)(g.Provider,{value:y,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,m=Co.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=>Co.createContext(i));return function(s){let l=s?.[e]||a;return Co.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,e3(n,...t)]}function e3(...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 Co.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Qa=R(E(),1);var zR=R(E(),1);function UR(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qr(...e){return t=>{let r=!1,o=e.map(n=>{let a=UR(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():UR(e[n],null)}}}}function de(...e){return zR.useCallback(Qr(...e),e)}var Mt=R(E(),1);var Tl=R(D(),1);function Zr(e){let t=t3(e),r=Mt.forwardRef((o,n)=>{let{children:a,...i}=o,s=Mt.Children.toArray(a),l=s.find(r3);if(l){let u=l.props.children,c=s.map(d=>d===l?Mt.Children.count(u)>1?Mt.Children.only(null):Mt.isValidElement(u)?u.props.children:null:d);return(0,Tl.jsx)(t,{...i,ref:n,children:Mt.isValidElement(u)?Mt.cloneElement(u,void 0,c):null})}return(0,Tl.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function t3(e){let t=Mt.forwardRef((r,o)=>{let{children:n,...a}=r;if(Mt.isValidElement(n)){let i=n3(n),s=o3(a,n.props);return n.type!==Mt.Fragment&&(s.ref=o?Qr(o,i):i),Mt.cloneElement(n,s)}return Mt.Children.count(n)>1?Mt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GR=Symbol("radix.slottable");function WR(e){let t=({children:r})=>(0,Tl.jsx)(Tl.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=GR,t}function r3(e){return Mt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GR}function o3(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 n3(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 Qp=R(D(),1),a3=R(E(),1);var i3=R(D(),1);function An(e){let t=e+"CollectionProvider",[r,o]=Ne(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{let{scope:y,children:h}=g,v=Qa.default.useRef(null),x=Qa.default.useRef(new Map).current;return(0,Qp.jsx)(n,{scope:y,itemMap:x,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=Zr(s),u=Qa.default.forwardRef((g,y)=>{let{scope:h,children:v}=g,x=a(s,h),w=de(y,x.collectionRef);return(0,Qp.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Zr(c),p=Qa.default.forwardRef((g,y)=>{let{scope:h,children:v,...x}=g,w=Qa.default.useRef(null),C=de(y,w),S=a(c,h);return Qa.default.useEffect(()=>(S.itemMap.set(w,{ref:w,...x}),()=>void S.itemMap.delete(w))),(0,Qp.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function m(g){let y=a(e+"CollectionConsumer",g);return Qa.default.useCallback(()=>{let v=y.collectionRef.current;if(!v)return[];let x=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((S,b)=>x.indexOf(S.ref.current)-x.indexOf(b.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},m,o]}var BY=!!(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 So=R(E(),1);var qR=R(E(),1),Fe=globalThis?.document?qR.useLayoutEffect:()=>{};var Zp=R(E(),1);var s3=So[" useInsertionEffect ".trim().toString()]||Fe;function je({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=l3({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=So.useRef(e!==void 0);So.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=So.useCallback(c=>{if(s){let d=u3(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function l3({defaultProp:e,onChange:t}){let[r,o]=So.useState(e),n=So.useRef(r),a=So.useRef(t);return s3(()=>{a.current=t},[t]),So.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function u3(e){return typeof e=="function"}var GY=Symbol("RADIX:SYNC_STATE");var c1=R(E(),1),d1=R(yi(),1);var f1=R(D(),1),f4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=f4.reduce((e,t)=>{let r=Zr(`Primitive.${t}`),o=c1.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,f1.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function nu(e,t){e&&d1.flushSync(()=>e.dispatchEvent(t))}var Zt=R(E(),1);var Hr=R(E(),1);var p1=R(E(),1);function p4(e,t){return p1.useReducer((r,o)=>t[r][o]??r,e)}var st=e=>{let{present:t,children:r}=e,o=m4(t),n=typeof r=="function"?r({present:o.isPresent}):Hr.Children.only(r),a=de(o.ref,g4(n));return typeof r=="function"||o.isPresent?Hr.cloneElement(n,{ref:a}):null};st.displayName="Presence";function m4(e){let[t,r]=Hr.useState(),o=Hr.useRef(null),n=Hr.useRef(e),a=Hr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=p4(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Hr.useEffect(()=>{let u=xg(o.current);a.current=s==="mounted"?u:"none"},[s]),Fe(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=xg(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),Fe(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let g=xg(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=xg(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:Hr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function xg(e){return e?.animationName||"none"}function g4(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 j0=R(E(),1);var h4=j0[" useId ".trim().toString()]||(()=>{}),v4=0;function Ae(e){let[t,r]=j0.useState(h4());return Fe(()=>{e||r(o=>o??String(v4++))},[e]),e||(t?`radix-${t}`:"")}var Ps=R(D(),1),yg="Collapsible",[x4,$0]=Ne(yg),[y4,K0]=x4(yg),m1=Zt.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=je({prop:o,defaultProp:n??!1,onChange:i,caller:yg});return(0,Ps.jsx)(y4,{scope:r,disabled:a,contentId:Ae(),open:l,onOpenToggle:Zt.useCallback(()=>u(c=>!c),[u]),children:(0,Ps.jsx)($.div,{"data-state":Y0(l),"data-disabled":a?"":void 0,...s,ref:t})})});m1.displayName=yg;var g1="CollapsibleTrigger",h1=Zt.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=K0(g1,r);return(0,Ps.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Y0(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});h1.displayName=g1;var X0="CollapsibleContent",v1=Zt.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=K0(X0,e.__scopeCollapsible);return(0,Ps.jsx)(st,{present:r||n.open,children:({present:a})=>(0,Ps.jsx)(w4,{...o,ref:t,present:a})})});v1.displayName=X0;var w4=Zt.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=K0(X0,r),[s,l]=Zt.useState(o),u=Zt.useRef(null),c=de(t,u),d=Zt.useRef(0),f=d.current,p=Zt.useRef(0),m=p.current,g=i.open||s,y=Zt.useRef(g),h=Zt.useRef(void 0);return Zt.useEffect(()=>{let v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),Fe(()=>{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":Y0(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 Y0(e){return e?"open":"closed"}var wg=m1,au=h1,Rd=v1;var Cg=R(E(),1),C4=R(D(),1),S4=Cg.createContext(void 0);function Bn(e){let t=Cg.useContext(S4);return e||t||"ltr"}var Dt=R(D(),1),on="Accordion",b4=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Z0,R4,I4]=An(on),[bg,wQ]=Ne(on,[I4,$0]),J0=$0(),y1=Ur.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,Dt.jsx)(Z0.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Dt.jsx)(k4,{...a,ref:t}):(0,Dt.jsx)(T4,{...n,ref:t})})});y1.displayName=on;var[w1,L4]=bg(on),[C1,P4]=bg(on,{collapsible:!1}),T4=Ur.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=je({prop:r,defaultProp:o??"",onChange:n,caller:on});return(0,Dt.jsx)(w1,{scope:e.__scopeAccordion,value:Ur.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Ur.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Dt.jsx)(C1,{scope:e.__scopeAccordion,collapsible:a,children:(0,Dt.jsx)(S1,{...i,ref:t})})})}),k4=Ur.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=je({prop:r,defaultProp:o??[],onChange:n,caller:on}),l=Ur.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Ur.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,Dt.jsx)(w1,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Dt.jsx)(C1,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Dt.jsx)(S1,{...a,ref:t})})})}),[M4,Rg]=bg(on),S1=Ur.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=Ur.default.useRef(null),l=de(s,t),u=R4(r),d=Bn(n)==="ltr",f=W(e.onKeyDown,p=>{if(!b4.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)},S=()=>{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():S());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?S():C());break;case"ArrowUp":a==="vertical"&&S();break}let b=v%h;g[b].ref.current?.focus()});return(0,Dt.jsx)(M4,{scope:r,disabled:o,direction:n,orientation:a,children:(0,Dt.jsx)(Z0.Slot,{scope:r,children:(0,Dt.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),Sg="AccordionItem",[E4,ew]=bg(Sg),b1=Ur.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=Rg(Sg,r),i=L4(Sg,r),s=J0(r),l=Ae(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,Dt.jsx)(E4,{scope:r,open:u,disabled:c,triggerId:l,children:(0,Dt.jsx)(wg,{"data-orientation":a.orientation,"data-state":k1(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});b1.displayName=Sg;var R1="AccordionHeader",I1=Ur.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Rg(on,r),a=ew(R1,r);return(0,Dt.jsx)($.h3,{"data-orientation":n.orientation,"data-state":k1(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});I1.displayName=R1;var Q0="AccordionTrigger",L1=Ur.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Rg(on,r),a=ew(Q0,r),i=P4(Q0,r),s=J0(r);return(0,Dt.jsx)(Z0.ItemSlot,{scope:r,children:(0,Dt.jsx)(au,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});L1.displayName=Q0;var P1="AccordionContent",T1=Ur.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Rg(on,r),a=ew(P1,r),i=J0(r);return(0,Dt.jsx)(Rd,{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}})});T1.displayName=P1;function k1(e){return e?"open":"closed"}var M1=y1,E1=b1,A1=I1,tw=L1,rw=T1;var Lg=R(E());var D1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D4=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),ow=e=>{let t=D4(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ig=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),N1=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Id=R(E());var O1={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 F1=(0,Id.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Id.createElement)("svg",{ref:l,...O1,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Ig("lucide",n),...!a&&!N1(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Id.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var B=(e,t)=>{let r=(0,Lg.forwardRef)(({className:o,...n},a)=>(0,Lg.createElement)(F1,{ref:a,iconNode:t,className:Ig(`lucide-${D1(ow(e))}`,`lucide-${e}`,o),...n}));return r.displayName=ow(e),r};var N4=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Ld=B("align-center",N4);var O4=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Pd=B("align-justify",O4);var F4=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Td=B("align-left",F4);var _4=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],kd=B("align-right",_4);var V4=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],iu=B("arrow-down",V4);var B4=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Md=B("arrow-left",B4);var H4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ed=B("arrow-right",H4);var U4=[["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"}]],su=B("arrow-up-down",U4);var z4=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],lu=B("arrow-up",z4);var G4=[["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"}]],Ad=B("bold",G4);var W4=[["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",W4);var q4=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ur=B("check",q4);var j4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Hn=B("chevron-down",j4);var $4=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],nn=B("chevron-left",$4);var K4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lr=B("chevron-right",K4);var X4=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Dd=B("chevron-up",X4);var Y4=[["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"}]],an=B("circle-alert",Y4);var Q4=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],wi=B("circle-check-big",Q4);var Z4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ks=B("circle",Z4);var J4=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Nd=B("clock",J4);var ez=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Od=B("code",ez);var tz=[["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"}]],Fd=B("copy",tz);var rz=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],_d=B("credit-card",rz);var oz=[["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"}]],uu=B("crown",oz);var nz=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Vd=B("dot",nz);var az=[["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"}]],Un=B("ellipsis",az);var iz=[["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"}]],Bd=B("external-link",iz);var sz=[["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",sz);var lz=[["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"}]],Hd=B("file-text",lz);var uz=[["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"}]],Ud=B("file",uz);var cz=[["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"}]],zd=B("git-fork",cz);var dz=[["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",dz);var fz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cu=B("info",fz);var pz=[["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"}]],Gd=B("italic",pz);var mz=[["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"}]],Wd=B("link",mz);var gz=[["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"}]],qd=B("list-ordered",gz);var hz=[["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",hz);var vz=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nt=B("loader-circle",vz);var xz=[["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"}]],du=B("lock",xz);var yz=[["path",{d:"M5 12h14",key:"1ays0h"}]],$d=B("minus",yz);var wz=[["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"}]],Kd=B("music",wz);var Cz=[["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"}]],fu=B("palette",Cz);var Sz=[["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"}]],Xd=B("phone",Sz);var bz=[["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"}]],Pg=B("pipette",bz);var Rz=[["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"}]],Yd=B("quote",Rz);var Iz=[["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"}]],Qd=B("redo",Iz);var Lz=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],As=B("search",Lz);var Pz=[["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"}]],zr=B("square-pen",Pz);var Tz=[["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"}]],Ci=B("star",Tz);var kz=[["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"}]],Zd=B("strikethrough",kz);var Mz=[["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"}]],Si=B("triangle-alert",Mz);var Ez=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Jd=B("underline",Ez);var Az=[["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"}]],ef=B("undo",Az);var Dz=[["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"}]],tf=B("upload",Dz);var Nz=[["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"}]],rf=B("video",Nz);var Oz=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=B("x",Oz);var Fz=[["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"}]],pu=B("zap",Fz);function _1(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=_1(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Tg(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=_1(e))&&(o&&(o+=" "),o+=t);return o}var iw="-",_z=e=>{let t=Bz(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(iw);return s[0]===""&&s.length!==1&&s.shift(),H1(s,t)||Vz(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},H1=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?H1(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(iw);return t.validators.find(({validator:i})=>i(a))?.classGroupId},V1=/^\[(.+)\]$/,Vz=e=>{if(V1.test(e)){let t=V1.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Bz=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Uz(Object.entries(e.classGroups),r).forEach(([a,i])=>{aw(i,o,a,t)}),o},aw=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:B1(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(Hz(n)){aw(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{aw(i,B1(t,a),r,o)})})},B1=(e,t)=>{let r=e;return t.split(iw).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Hz=e=>e.isThemeGetter,Uz=(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,zz=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)}}},U1="!",Gz=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(U1),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},Wz=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},qz=e=>({cache:zz(e.cacheSize),parseClassName:Gz(e),..._z(e)}),jz=/\s+/,$z=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(jz),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=Wz(c).join(":"),h=d?y+U1: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 Kz(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=z1(t))&&(o&&(o+=" "),o+=r);return o}var z1=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=z1(e[o]))&&(r&&(r+=" "),r+=t);return r};function Xz(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=qz(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=$z(l,r);return n(l,c),c}return function(){return a(Kz.apply(null,arguments))}}var rt=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},G1=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yz=/^\d+\/\d+$/,Qz=new Set(["px","full","screen"]),Zz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jz=/\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$/,e5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,t5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ga=e=>mu(e)||Qz.has(e)||Yz.test(e),bi=e=>gu(e,"length",c5),mu=e=>!!e&&!Number.isNaN(Number(e)),nw=e=>gu(e,"number",mu),of=e=>!!e&&Number.isInteger(Number(e)),o5=e=>e.endsWith("%")&&mu(e.slice(0,-1)),Le=e=>G1.test(e),Ri=e=>Zz.test(e),n5=new Set(["length","size","percentage"]),a5=e=>gu(e,n5,W1),i5=e=>gu(e,"position",W1),s5=new Set(["image","url"]),l5=e=>gu(e,s5,f5),u5=e=>gu(e,"",d5),nf=()=>!0,gu=(e,t,r)=>{let o=G1.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},c5=e=>Jz.test(e)&&!e5.test(e),W1=()=>!1,d5=e=>t5.test(e),f5=e=>r5.test(e);var p5=()=>{let e=rt("colors"),t=rt("spacing"),r=rt("blur"),o=rt("brightness"),n=rt("borderColor"),a=rt("borderRadius"),i=rt("borderSpacing"),s=rt("borderWidth"),l=rt("contrast"),u=rt("grayscale"),c=rt("hueRotate"),d=rt("invert"),f=rt("gap"),p=rt("gradientColorStops"),m=rt("gradientColorStopPositions"),g=rt("inset"),y=rt("margin"),h=rt("opacity"),v=rt("padding"),x=rt("saturate"),w=rt("scale"),C=rt("sepia"),S=rt("skew"),b=rt("space"),I=rt("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Le,t],A=()=>[Le,t],F=()=>["",ga,bi],N=()=>["auto",mu,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"],M=()=>["","0",Le],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[mu,Le];return{cacheSize:500,separator:":",theme:{colors:[nf],spacing:[ga,bi],blur:["none","",Ri,Le],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Ri,Le],borderSpacing:A(),borderWidth:F(),contrast:ae(),grayscale:M(),hueRotate:ae(),invert:M(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[o5,bi],inset:k(),margin:k(),opacity:ae(),padding:A(),saturate:ae(),scale:ae(),sepia:M(),skew:ae(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[Ri]}],"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:[...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",of,Le]}],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",Le]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",of,Le]}],"grid-cols":[{"grid-cols":[nf]}],"col-start-end":[{col:["auto",{span:["full",of,Le]},Le]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[nf]}],"row-start-end":[{row:["auto",{span:[of,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":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"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:[Ri]},Ri]}],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",Ri,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nw]}],"font-family":[{font:[nf]}],"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",mu,nw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ga,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",ga,bi]}],"underline-offset":[{"underline-offset":["auto",ga,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(),i5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",a5]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},l5]}],"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":[ga,Le]}],"outline-w":[{outline:[ga,bi]}],"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":[ga,bi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ri,u5]}],"shadow-color":[{shadow:[nf]}],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",Ri,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:[of,Le]}],"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",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:[ga,bi,nw]}],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 q1=Xz(p5);function L(...e){return q1(Tg(e))}var Ii=R(D()),m5=M1,j1=kg.forwardRef(({className:e,...t},r)=>(0,Ii.jsx)(E1,{ref:r,className:L("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));j1.displayName="AccordionItem";var $1=kg.forwardRef(({className:e,children:t,...r},o)=>(0,Ii.jsx)(A1,{className:"flex",children:(0,Ii.jsxs)(tw,{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,Ii.jsx)(Hn,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));$1.displayName=tw.displayName;var K1=kg.forwardRef(({className:e,children:t,...r},o)=>(0,Ii.jsx)(rw,{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,Ii.jsx)("div",{className:"pb-4 pt-0",children:t})}));K1.displayName=rw.displayName;var hu=R(E());var X1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Y1=Tg,Q=(e,t)=>r=>{var o;if(t?.variants==null)return Y1(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=X1(c)||X1(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 Y1(e,i,l,r?.class,r?.className)};var ha=R(D()),g5=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}}),Q1=hu.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=hu.useMemo(()=>{switch(t){case"success":return ur;case"warning":return Si;case"error":return an;case"info":return cu;default:return cu}},[t]);return(0,ha.jsxs)("div",{ref:u,role:"alert",className:L("moonui-theme",g5({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,ha.jsx)(c,{className:"h-5 w-5"}),(0,ha.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,ha.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,ha.jsx)(ao,{className:"h-4 w-4"})})]})});Q1.displayName="Alert";var Z1=hu.forwardRef(({className:e,...t},r)=>(0,ha.jsx)("h5",{ref:r,className:L("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));Z1.displayName="AlertTitle";var J1=hu.forwardRef(({className:e,...t},r)=>(0,ha.jsx)("div",{ref:r,className:L("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));J1.displayName="AlertDescription";var eT=R(E());var sw=R(D()),h5=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"}}),tT=eT.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,sw.jsx)("div",{ref:s,className:L("moonui-theme",h5({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,sw.jsx)("div",{className:"absolute inset-0",children:a})}));tT.displayName="AspectRatio";var sf=R(E());var Mo=R(E(),1);var vu=R(E(),1);function ot(e){let t=vu.useRef(e);return vu.useEffect(()=>{t.current=e}),vu.useMemo(()=>(...r)=>t.current?.(...r),[])}var iT=R(aT(),1);function sT(){return(0,iT.useSyncExternalStore)(L5,()=>!0,()=>!1)}function L5(){return()=>{}}var af=R(D(),1),uw="Avatar",[P5,dte]=Ne(uw),[T5,uT]=P5(uw),cT=Mo.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=Mo.useState("idle");return(0,af.jsx)(T5,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,af.jsx)($.span,{...o,ref:t})})});cT.displayName=uw;var dT="AvatarImage",fT=Mo.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=uT(dT,r),s=k5(o,a),l=ot(u=>{n(u),i.onImageLoadingStatusChange(u)});return Fe(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,af.jsx)($.img,{...a,ref:t,src:o}):null});fT.displayName=dT;var pT="AvatarFallback",mT=Mo.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=uT(pT,r),[i,s]=Mo.useState(o===void 0);return Mo.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,af.jsx)($.span,{...n,ref:t}):null});mT.displayName=pT;function lT(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function k5(e,{referrerPolicy:t,crossOrigin:r}){let o=sT(),n=Mo.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Mo.useState(()=>lT(a,e));return Fe(()=>{s(lT(a,e))},[a,e]),Fe(()=>{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 cw=cT,dw=fT,fw=mT;var sn=R(D()),E5=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"}}),pw=sf.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,sn.jsx)(cw,{ref:a,className:L("moonui-theme",E5({size:t,radius:r,variant:o}),e),...n}));pw.displayName=cw.displayName;var gT=sf.forwardRef(({className:e,...t},r)=>(0,sn.jsx)(dw,{ref:r,className:L("moonui-theme","aspect-square h-full w-full",e),...t}));gT.displayName=dw.displayName;var mw=sf.forwardRef(({className:e,...t},r)=>(0,sn.jsx)(fw,{ref:r,className:L("flex h-full w-full items-center justify-center bg-muted",e),...t}));mw.displayName=fw.displayName;var hT=sf.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,sn.jsx)("div",{ref:a,className:L("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:`${o}px`,zIndex:i.length-u},children:l},u)),s>0&&(0,sn.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,sn.jsx)(pw,{variant:"border",children:(0,sn.jsxs)(mw,{children:["+",s]})})})]})})});hT.displayName="AvatarGroup";var cr=R(D()),vT=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 io({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,cr.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,cr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,cr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,cr.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,cr.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,cr.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,cr.jsxs)("div",{className:L("moonui-theme",vT({variant:t,size:r,radius:o}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,cr.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,cr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,cr.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,cr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,cr.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,cr.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,cr.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 zn=R(E());var Pr=R(D()),A5=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"}}),xT=zn.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Pr.jsx)("nav",{ref:n,className:L("moonui-theme",A5({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));xT.displayName="Breadcrumb";var yT=zn.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=zn.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Pr.jsxs)("ol",{ref:n,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Pr.jsx)(gw,{}),l]})}return(0,Pr.jsx)("ol",{ref:n,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});yT.displayName="BreadcrumbList";var wT=zn.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?zn.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Pr.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,Pr.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})})});wT.displayName="BreadcrumbItem";var CT=({children:e,className:t,...r})=>(0,Pr.jsx)("span",{role:"presentation","aria-hidden":"true",className:L("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Pr.jsx)(Lr,{className:"h-3.5 w-3.5"})});CT.displayName="BreadcrumbSeparator";var gw=({className:e,...t})=>(0,Pr.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,Pr.jsx)(Un,{className:"h-4 w-4"}),(0,Pr.jsx)("span",{className:"sr-only",children:"More pages"})]});gw.displayName="BreadcrumbEllipsis";var ST=zn.forwardRef(({className:e,href:t,...r},o)=>(0,Pr.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}));ST.displayName="BreadcrumbLink";var bT=zn.forwardRef(({className:e,...t},r)=>(0,Pr.jsx)("span",{ref:r,className:L("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));bT.displayName="BreadcrumbPage";var RT=R(E());var Eg=R(D()),Mg=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}}),_e=RT.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,Eg.jsxs)("button",{className:L("moonui-theme",Mg({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"data-loading":i?"":void 0,...d,children:[i&&(0,Eg.jsx)(Nt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));_e.displayName="Button";var el=R(E());var qf=R(D(),1),jn=R(E(),1);var IT=R(E(),1),yu=(0,IT.createContext)({});var LT=R(E(),1);function Gn(e){let t=(0,LT.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Ag=R(E(),1);var wu=typeof window<"u";var Cu=wu?Ag.useLayoutEffect:Ag.useEffect;var Xw=R(D(),1),Ak=R(E(),1),Gf=R(E(),1);var PT=R(E(),1),Li=(0,PT.createContext)(null);var Mk=R(D(),1);function Ds(e,t){e.indexOf(t)===-1&&e.push(t)}function ln(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Gt=(e,t,r)=>r>t?t:r<e?e:r;var va=()=>{},Jt=()=>{};var dr={};var lf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function uf(e){return typeof e=="object"&&e!==null}var cf=e=>/^0[^.\s]+$/u.test(e);function Ns(e){let t;return()=>(t===void 0&&(t=e()),t)}var mt=e=>e;var D5=(e,t)=>r=>t(e(r)),un=(...e)=>e.reduce(D5);var Eo=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var xa=class{constructor(){this.subscriptions=[]}add(t){return Ds(this.subscriptions,t),()=>ln(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 bt=e=>e*1e3,Ot=e=>e/1e3;function df(e,t){return t?e*(1e3/t):0}var TT=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var kT=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,N5=1e-7,O5=12;function F5(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=kT(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>N5&&++s<O5);return i}function Pi(e,t,r,o){if(e===t&&r===o)return mt;let n=a=>F5(a,0,1,e,r);return a=>a===0||a===1?a:kT(n(a),t,o)}var Dg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Ng=e=>t=>1-e(1-t);var Og=Pi(.33,1.53,.69,.99),Su=Ng(Og),ff=Dg(Su);var pf=e=>(e*=2)<1?.5*Su(e):.5*(2-Math.pow(2,-10*(e-1)));var mf=e=>1-Math.sin(Math.acos(e)),gf=Ng(mf),hf=Dg(mf);var hw=Pi(.42,0,1,1),vw=Pi(0,0,.58,1),vf=Pi(.42,0,.58,1);var xf=e=>Array.isArray(e)&&typeof e[0]!="number";function yf(e,t){return xf(e)?e[TT(0,e.length,t)]:e}var wf=e=>Array.isArray(e)&&typeof e[0]=="number";var MT={linear:mt,easeIn:hw,easeInOut:vf,easeOut:vw,circIn:mf,circInOut:hf,circOut:gf,backIn:Su,backInOut:ff,backOut:Og,anticipate:pf},_5=e=>typeof e=="string",Fg=e=>{if(wf(e)){Jt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Pi(t,r,o,n)}else if(_5(e))return Jt(MT[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),MT[e];return e};var Cf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Gr={value:null,addProjectionMetrics:null};function ET(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&&Gr.value&&Gr.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var V5=40;function _g(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=Cf.reduce((x,w)=>(x[w]=ET(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=dr.useManualTiming?n.timestamp:performance.now();r=!1,dr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(x-n.timestamp,V5),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:Cf.reduce((x,w)=>{let C=i[w];return x[w]=(S,b=!1,I=!1)=>(r||y(),C.schedule(S,b,I)),x},{}),cancel:x=>{for(let w=0;w<Cf.length;w++)i[Cf[w]].cancel(x)},state:n,steps:i}}var{schedule:Pe,cancel:fr,state:xt,steps:Sf}=_g(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);var Vg;function B5(){Vg=void 0}var yt={now:()=>(Vg===void 0&&yt.set(xt.isProcessing||dr.useManualTiming?xt.timestamp:performance.now()),Vg),set:e=>{Vg=e,queueMicrotask(B5)}};var cn={layout:0,mainThread:0,waapi:0};var AT=e=>t=>typeof t=="string"&&t.startsWith(e),Os=AT("--"),H5=AT("var(--"),Fs=e=>H5(e)?U5.test(e.split("/*")[0].trim()):!1,U5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Wn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ya={...Wn,transform:e=>Gt(0,1,e)},bf={...Wn,default:1};var Ti=e=>Math.round(e*1e5)/1e5;var bu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DT(e){return e==null}var NT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Ru=(e,t)=>r=>!!(typeof r=="string"&&NT.test(r)&&r.startsWith(e)||t&&!DT(r)&&Object.prototype.hasOwnProperty.call(r,t)),Bg=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(bu);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var z5=e=>Gt(0,255,e),xw={...Wn,transform:e=>Math.round(z5(e))},qn={test:Ru("rgb","red"),parse:Bg("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+xw.transform(e)+", "+xw.transform(t)+", "+xw.transform(r)+", "+Ti(ya.transform(o))+")"};function G5(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 Rf={test:Ru("#"),parse:G5,transform:qn.transform};var If=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dn=If("deg"),pr=If("%"),ue=If("px"),yw=If("vh"),ww=If("vw"),Hg=(()=>({...pr,parse:e=>pr.parse(e)/100,transform:e=>pr.transform(e*100)}))();var ki={test:Ru("hsl","hue"),parse:Bg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+pr.transform(Ti(t))+", "+pr.transform(Ti(r))+", "+Ti(ya.transform(o))+")"};var lt={test:e=>qn.test(e)||Rf.test(e)||ki.test(e),parse:e=>qn.test(e)?qn.parse(e):ki.test(e)?ki.parse(e):Rf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qn.transform(e):ki.transform(e),getAnimatableNone:e=>{let t=lt.parse(e);return t.alpha=0,lt.transform(t)}};var OT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W5(e){return isNaN(e)&&typeof e=="string"&&(e.match(bu)?.length||0)+(e.match(OT)?.length||0)>0}var _T="number",VT="color",q5="var",j5="var(",FT="${}",$5=/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 Mi(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace($5,l=>(lt.test(l)?(o.color.push(a),n.push(VT),r.push(lt.parse(l))):l.startsWith(j5)?(o.var.push(a),n.push(q5),r.push(l)):(o.number.push(a),n.push(_T),r.push(parseFloat(l))),++a,FT)).split(FT);return{values:r,split:s,indexes:o,types:n}}function BT(e){return Mi(e).values}function HT(e){let{split:t,types:r}=Mi(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===_T?a+=Ti(n[i]):s===VT?a+=lt.transform(n[i]):a+=n[i]}return a}}var K5=e=>typeof e=="number"?0:lt.test(e)?lt.getAnimatableNone(e):e;function X5(e){let t=BT(e);return HT(e)(t.map(K5))}var mr={test:W5,parse:BT,createTransformer:HT,getAnimatableNone:X5};function Cw(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 UT({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=Cw(l,s,e+1/3),a=Cw(l,s,e),i=Cw(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function Iu(e,t){return r=>r>0?t:e}var ke=(e,t,r)=>e+(t-e)*r;var Sw=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},Y5=[Rf,qn,ki],Q5=e=>Y5.find(t=>t.test(e));function zT(e){let t=Q5(e);if(va(!!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===ki&&(r=UT(r)),r}var bw=(e,t)=>{let r=zT(e),o=zT(t);if(!r||!o)return Iu(e,t);let n={...r};return a=>(n.red=Sw(r.red,o.red,a),n.green=Sw(r.green,o.green,a),n.blue=Sw(r.blue,o.blue,a),n.alpha=ke(r.alpha,o.alpha,a),qn.transform(n))};var Ug=new Set(["none","hidden"]);function GT(e,t){return Ug.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Z5(e,t){return r=>ke(e,t,r)}function zg(e){return typeof e=="number"?Z5:typeof e=="string"?Fs(e)?Iu:lt.test(e)?bw:tG:Array.isArray(e)?WT:typeof e=="object"?lt.test(e)?bw:J5:Iu}function WT(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>zg(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function J5(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=zg(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function eG(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][o[a]],s=e.values[i]??0;r[n]=s,o[a]++}return r}var tG=(e,t)=>{let r=mr.createTransformer(t),o=Mi(e),n=Mi(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?Ug.has(e)&&!n.values.length||Ug.has(t)&&!o.values.length?GT(e,t):un(WT(eG(o,n),n.values),r):(va(!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"),Iu(e,t))};function Gg(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ke(e,t,r):zg(e)(e,t)}var qT=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Pe.update(t,r),stop:()=>fr(t),now:()=>xt.isProcessing?xt.timestamp:yt.now()}};var Wg=(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 Lu(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 Lf(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(Lu(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Ot(n)}}var rG=5;function qg(e,t,r){let o=Math.max(t-rG,0);return df(r-e(o),t-o)}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 Iw=.001;function jT({duration:e=nt.duration,bounce:t=nt.bounce,velocity:r=nt.velocity,mass:o=nt.mass}){let n,a;va(e<=bt(nt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Gt(nt.minDamping,nt.maxDamping,i),e=Gt(nt.minDuration,nt.maxDuration,Ot(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=jg(u,i),m=Math.exp(-d);return Iw-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=jg(Math.pow(u,2),i);return(-n(u)+Iw>0?-1:1)*((f-p)*m)/g}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-Iw+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=nG(n,a,s);if(e=bt(e),isNaN(l))return{stiffness:nt.stiffness,damping:nt.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var oG=12;function nG(e,t,r){let o=r;for(let n=1;n<oG;n++)o=o-e(o)/t(o);return o}function jg(e,t){return e*Math.sqrt(1-t*t)}var aG=["duration","bounce"],iG=["stiffness","damping","mass"];function $T(e,t){return t.some(r=>e[r]!==void 0)}function sG(e){let t={velocity:nt.velocity,stiffness:nt.stiffness,damping:nt.damping,mass:nt.mass,isResolvedFromDuration:!1,...e};if(!$T(e,iG)&&$T(e,aG))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Gt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:nt.mass,stiffness:n,damping:a}}else{let r=jT(e);t={...t,...r,mass:nt.mass},t.isResolvedFromDuration=!0}return t}function wa(e=nt.visualDuration,t=nt.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}=sG({...r,velocity:-Ot(r.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),y=i-a,h=Ot(Math.sqrt(l/c)),v=Math.abs(y)<5;o||(o=v?nt.restSpeed.granular:nt.restSpeed.default),n||(n=v?nt.restDelta.granular:nt.restDelta.default);let x;if(g<1){let C=jg(h,g);x=S=>{let b=Math.exp(-g*h*S);return i-b*((m+g*h*y)/C*Math.sin(C*S)+y*Math.cos(C*S))}}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=S=>{let b=Math.exp(-g*h*S),I=Math.min(C*S,300);return i-b*((m+g*h*y)*Math.sinh(I)+C*y*Math.cosh(I))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let S=x(C);if(p)s.done=C>=d;else{let b=C===0?m:0;g<1&&(b=C===0?bt(m):qg(x,C,S));let I=Math.abs(b)<=o,T=Math.abs(i-S)<=n;s.done=I&&T}return s.value=s.done?i:S,s},toString:()=>{let C=Math.min(Lu(w),2e4),S=Wg(b=>w.next(C*b).value,C,30);return C+"ms "+S},toTransition:()=>{}};return w}wa.applyToOptions=e=>{let t=Lf(e,100,wa);return e.ease=t.ease,e.duration=bt(t.duration),e.type="keyframes",e};function Pf({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,S,b=I=>{p(f.value)&&(C=I,S=wa({keyframes:[f.value,m(f.value)],velocity:qg(x,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return b(0),{calculatedDuration:null,next:I=>{let T=!1;return!S&&C===void 0&&(T=!0,w(I),b(I)),C!==void 0&&I>=C?S.next(I-C):(!T&&w(I),f)}}}function lG(e,t,r){let o=[],n=r||dr.mix||Gg,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=un(l,s)}o.push(s)}return o}function $g(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(Jt(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=lG(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=Eo(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Gt(e[0],e[a-1],c)):u}function Tf(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=Eo(0,t,o);e.push(ke(r,1,n))}}function kf(e){let t=[0];return Tf(t,e.length-1),t}function KT(e,t){return e.map(r=>r*t)}function uG(e,t){return e.map(()=>t||vf).splice(0,e.length-1)}function _s({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=xf(o)?o.map(Fg):Fg(o),a={done:!1,value:t[0]},i=KT(r&&r.length===t.length?r:kf(t),e),s=$g(i,t,{ease:Array.isArray(n)?n:uG(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var cG=e=>e!==null;function Pu(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(cG),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var dG={decay:Pf,inertia:Pf,tween:_s,keyframes:_s,spring:wa};function Kg(e){typeof e.type=="string"&&(e.type=dG[e.type])}var Ei=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 fG=e=>e/100,Ca=class extends Ei{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!==yt.now()&&this.tick(yt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},cn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Kg(t);let{type:r=_s,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||_s;l!==_s&&typeof s[0]!="number"&&(this.mixKeyframes=un(fG,Gg(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=Lu(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=Gt(0,1,P)*s}let C=v?{done:!1,value:c[0]}:w.next(x);a&&(C.value=a(C.value));let{done:S}=C;!v&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let b=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return b&&m!==Pf&&(C.value=Pu(c,this.options,y,this.speed)),g&&g(C.value),b&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return Ot(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ot(t)}get time(){return Ot(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 r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ot(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=qT,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(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,cn.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 XT(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Vs=e=>e*180/Math.PI,Lw=e=>{let t=Vs(Math.atan2(e[1],e[0]));return Pw(t)},pG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lw,rotateZ:Lw,skewX:e=>Vs(Math.atan(e[1])),skewY:e=>Vs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Pw=e=>(e=e%360,e<0&&(e+=360),e),YT=Lw,QT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ZT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),mG={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:QT,scaleY:ZT,scale:e=>(QT(e)+ZT(e))/2,rotateX:e=>Pw(Vs(Math.atan2(e[6],e[5]))),rotateY:e=>Pw(Vs(Math.atan2(-e[2],e[0]))),rotateZ:YT,rotate:YT,skewX:e=>Vs(Math.atan(e[4])),skewY:e=>Vs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mf(e){return e.includes("scale")?1:0}function Ef(e,t){if(!e||e==="none")return Mf(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=mG,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=pG,n=s}if(!n)return Mf(t);let a=o[t],i=n[1].split(",").map(gG);return typeof a=="function"?a(i):i[a]}var Tw=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Ef(r,t)};function gG(e){return parseFloat(e.trim())}var fn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],so=(()=>new Set(fn))();var kw=e=>e===Wn||e===ue,hG=new Set(["x","y","z"]),vG=fn.filter(e=>!hG.has(e));function JT(e){let t=[];return vG.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var Ai={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ef(t,"x"),y:(e,{transform:t})=>Ef(t,"y")};Ai.translateX=Ai.x;Ai.translateY=Ai.y;var Bs=new Set,Mw=!1,Ew=!1,Aw=!1;function ek(){if(Ew){let e=Array.from(Bs).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=JT(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)})}Ew=!1,Mw=!1,Bs.forEach(e=>e.complete(Aw)),Bs.clear()}function tk(){Bs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ew=!0)})}function Dw(){Aw=!0,tk(),ek(),Aw=!1}var Sa=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?(Bs.add(this),Mw||(Mw=!0,Pe.read(tk),Pe.resolveKeyframes(ek))):(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])}XT(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bs.delete(this)}cancel(){this.state==="scheduled"&&(Bs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var rk=e=>e.startsWith("--");function ok(e,t,r){rk(t)?e.style.setProperty(t,r):e.style[t]=r}var nk=Ns(()=>window.ScrollTimeline!==void 0);var ak={};function ik(e,t){let r=Ns(e);return()=>ak[t]??r()}var Xg=ik(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Hs=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var Nw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hs([0,.65,.55,1]),circOut:Hs([.55,0,1,.45]),backIn:Hs([.31,.01,.66,-.59]),backOut:Hs([.33,1.53,.69,.99])};function Ow(e,t){if(e)return typeof e=="function"?Xg()?Wg(e,t):"ease-out":wf(e)?Hs(e):Array.isArray(e)?e.map(r=>Ow(r,t)||Nw.easeOut):Nw[e]}function sk(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=Ow(s,n);Array.isArray(d)&&(c.easing=d),Gr.value&&cn.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 Gr.value&&p.finished.finally(()=>{cn.waapi--}),p}function Us(e){return typeof e=="function"&&"applyToOptions"in e}function lk({type:e,...t}){return Us(e)&&Xg()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Yg=class extends Ei{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,Jt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=lk(t);this.animation=sk(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=Pu(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):ok(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 Ot(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ot(t)}get time(){return Ot(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:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&nk()?(this.animation.timeline=t,mt):r(this)}};var uk={anticipate:pf,backInOut:ff,circInOut:hf};function xG(e){return e in uk}function ck(e){typeof e.ease=="string"&&xG(e.ease)&&(e.ease=uk[e.ease])}var dk=10,Qg=class extends Yg{constructor(t){ck(t),Kg(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 Ca({...i,autoplay:!1}),l=bt(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-dk).value,s.sample(l).value,dk),s.stop()}};var Fw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mr.test(e)||e==="0")&&!e.startsWith("url("));function yG(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 fk(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=Fw(n,t),s=Fw(a,t);return va(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:yG(e)||(r==="spring"||Us(r))&&o}function Tu(e){e.duration=0,e.type="keyframes"}var wG=new Set(["opacity","clipPath","filter","transform"]),CG=Ns(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pk(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 CG()&&r&&wG.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var SG=40,Af=class extends Ei{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=yt.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||Sa;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=yt.now(),fk(t,a,i,s)||((dr.instantAnimations||!l)&&c?.(Pu(t,o,r)),t[0]=t[t.length-1],Tu(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>SG?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&pk(f)?new Qg({...f,element:f.motionValue.owner.current}):new Ca(f);p.finished.then(()=>this.notifyFinished()).catch(mt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Dw()),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 Zg=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 mk(this.animations,"duration")}get iterationDuration(){return mk(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 mk(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 Df=class extends Zg{then(t,r){return this.finished.finally(t).then(()=>{})}};var bG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RG(e){let t=bG.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var IG=4;function _w(e,t,r=1){Jt(r<=IG,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=RG(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return lf(i)?parseFloat(i):i}return Fs(n)?_w(n,t,r+1):n}function zs(e,t){return e?.[t]??e?.default??e}var Nf=new Set(["width","height","top","left","right","bottom",...fn]);var gk={test:e=>e==="auto",parse:e=>e};var Jg=e=>t=>t.test(e);var Vw=[Wn,ue,pr,dn,ww,yw,gk],Bw=e=>Vw.find(Jg(e));function hk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cf(e):!0}var LG=new Set(["brightness","contrast","saturate","opacity"]);function PG(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(bu)||[];if(!o)return e;let n=r.replace(o,""),a=LG.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var TG=/\b([a-z-]*)\(.*?\)/gu,Of={...mr,getAnimatableNone:e=>{let t=e.match(TG);return t?t.map(PG).join(" "):e}};var Hw={...Wn,transform:Math.round};var vk={rotate:dn,rotateX:dn,rotateY:dn,rotateZ:dn,scale:bf,scaleX:bf,scaleY:bf,scaleZ:bf,skew:dn,skewX:dn,skewY:dn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:ya,originX:Hg,originY:Hg,originZ:ue};var Gs={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,...vk,zIndex:Hw,fillOpacity:ya,strokeOpacity:ya,numOctaves:Hw};var xk={...Gs,color:lt,backgroundColor:lt,outlineColor:lt,fill:lt,stroke:lt,borderColor:lt,borderTopColor:lt,borderRightColor:lt,borderBottomColor:lt,borderLeftColor:lt,filter:Of,WebkitFilter:Of},Ff=e=>xk[e];function _f(e,t){let r=Ff(e);return r!==Of&&(r=mr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var kG=new Set(["auto","none","0"]);function yk(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!kG.has(a)&&Mi(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=_f(r,n)}var Vf=class extends Sa{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(),Fs(u))){let c=_w(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Nf.has(o)||t.length!==2)return;let[n,a]=t,i=Bw(n),s=Bw(a);if(i!==s)if(kw(i)&&kw(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Ai[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||hk(t[n]))&&o.push(n);o.length&&yk(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=Ai[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]=Ai[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 Bf(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 Hf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Uf(e){return uf(e)&&"offsetHeight"in e}var wk=30,MG=e=>!isNaN(parseFloat(e)),Ws={current:void 0},eh=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=yt.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=yt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=MG(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 xa);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 Ws.current&&Ws.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wk)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,wk);return df(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 Wr(e,t){return new eh(e,t)}var{schedule:qs,cancel:EG}=_g(queueMicrotask,!1);var Ao={x:!1,y:!1};function th(){return Ao.x||Ao.y}function Uw(e){return e==="x"||e==="y"?Ao[e]?null:(Ao[e]=!0,()=>{Ao[e]=!1}):Ao.x||Ao.y?null:(Ao.x=Ao.y=!0,()=>{Ao.x=Ao.y=!1})}function rh(e,t){let r=Bf(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function Ck(e){return!(e.pointerType==="touch"||th())}function zw(e,t,r={}){let[o,n,a]=rh(e,r),i=s=>{if(!Ck(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{Ck(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var Gw=(e,t)=>t?e===t?!0:Gw(e,t.parentElement):!1;var js=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var AG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sk(e){return AG.has(e.tagName)||e.tabIndex!==-1}var ku=new WeakSet;function bk(e){return t=>{t.key==="Enter"&&e(t)}}function Ww(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Rk=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=bk(()=>{if(ku.has(r))return;Ww(r,"down");let n=bk(()=>{Ww(r,"up")}),a=()=>Ww(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 Ik(e){return js(e)&&!th()}function qw(e,t,r={}){let[o,n,a]=rh(e,r),i=s=>{let l=s.currentTarget;if(!Ik(s))return;ku.add(l);let u=t(l,s),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ku.has(l)&&ku.delete(l),Ik(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||Gw(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),Uf(s)&&(s.addEventListener("focus",u=>Rk(u,n)),!Sk(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function $s(e){return uf(e)&&"ownerSVGElement"in e}function zf(e){return $s(e)&&e.tagName==="svg"}function jw(...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=$g(n,a,i);return t?s(o):s}var Ve=e=>!!(e&&e.getVelocity);var DG=[...Vw,lt,mr],$w=e=>DG.find(Jg(e));var oh=R(E(),1),ba=R(E(),1);var Lk=R(E(),1),Di=(0,Lk.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var Tk=R(E(),1);function Pk(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function NG(...e){return t=>{let r=!1,o=e.map(n=>{let a=Pk(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():Pk(e[n],null)}}}}function kk(...e){return Tk.useCallback(NG(...e),e)}var Kw=class extends oh.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Uf(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 Ek({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,ba.useId)(),a=(0,ba.useRef)(null),i=(0,ba.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,ba.useContext)(Di),l=kk(a,e?.ref);return(0,ba.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 U0(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function bw(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var sW=typeof WeakMap=="function"?WeakMap:Map;function DM(e,t,r){r=Aa(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){ph||(ph=!0,Dw=o),bw(e,t)},r}function NM(e,t,r){r=Aa(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var n=t.value;r.payload=function(){return o(n)},r.callback=function(){bw(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){bw(e,t),typeof o!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function jT(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new sW;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=CW.bind(null,e,t,r),t.then(e,e))}function qT(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 $T(e,t,r,o,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Aa(-1,1),t.tag=2,Ni(r,t,1))),r.lanes|=1),e)}var lW=_a.ReactCurrentOwner,$r=!1;function Ar(e,t,r,o){t.child=e===null?uM(t,null,r,o):Fu(t,e.child,r,o)}function KT(e,t,r,o,n){r=r.render;var a=t.ref;return Eu(t,n),o=dC(e,t,r,o,a,n),r=fC(),e!==null&&!$r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Fa(e,t,n)):(st&&r&&Jw(t),t.flags|=1,Ar(e,t,o,n),t.child)}function XT(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!SC(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,OM(e,t,a,o,n)):(e=qg(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:nf,r(i,o)&&e.ref===t.ref)return Fa(e,t,n)}return t.flags|=1,e=_i(a,o),e.ref=t.ref,e.return=t,t.child=e}function OM(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(nf(a,o)&&e.ref===t.ref)if($r=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&($r=!0);else return t.lanes=e.lanes,Fa(e,t,n)}return Rw(e,t,r,o,n)}function FM(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(Pu,fo),fo|=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(Pu,fo),fo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Qe(Pu,fo),fo|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Qe(Pu,fo),fo|=o;return Ar(e,t,n,r),t.child}function _M(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Rw(e,t,r,o,n){var a=Xr(r)?$s:gr.current;return a=Nu(t,a),Eu(t,n),r=dC(e,t,r,o,a,n),o=fC(),e!==null&&!$r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Fa(e,t,n)):(st&&o&&Jw(t),t.flags|=1,Ar(e,t,r,n),t.child)}function YT(e,t,r,o,n){if(Xr(r)){var a=!0;oh(t)}else a=!1;if(Eu(t,n),t.stateNode===null)Gg(e,t),AM(t,r,o),Sw(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=Ho(u):(u=Xr(r)?$s:gr.current,u=Nu(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)&&WT(t,i,o,u),Ii=!1;var f=t.memoizedState;i.state=f,lh(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Kr.current||Ii?(typeof c=="function"&&(Cw(t,r,c,o),l=t.memoizedState),(s=Ii||GT(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,dM(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:hn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Ho(l):(l=Xr(r)?$s:gr.current,l=Nu(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)&&WT(t,i,o,l),Ii=!1,f=t.memoizedState,i.state=f,lh(t,o,i,n);var m=t.memoizedState;s!==d||f!==m||Kr.current||Ii?(typeof p=="function"&&(Cw(t,r,p,o),m=t.memoizedState),(u=Ii||GT(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 Iw(e,t,r,o,a,n)}function Iw(e,t,r,o,n,a){_M(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&OT(t,r,!1),Fa(e,t,a);o=t.stateNode,lW.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Fu(t,e.child,null,a),t.child=Fu(t,null,s,a)):Ar(e,t,s,a),t.memoizedState=o.state,n&&OT(t,r,!0),t.child}function VM(e){var t=e.stateNode;t.pendingContext?NT(e,t.pendingContext,t.pendingContext!==t.context):t.context&&NT(e,t.context,!1),sC(e,t.containerInfo)}function QT(e,t,r,o,n){return Ou(),tC(n),t.flags|=256,Ar(e,t,r,o),t.child}var Pw={dehydrated:null,treeContext:null,retryLane:0};function Lw(e){return{baseLanes:e,cachePool:null,transitions:null}}function BM(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 yw(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=Lh(i,o,0,null),e=qs(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Lw(r),t.memoizedState=Pw,e):gC(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return uW(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=_i(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=_i(s,a):(a=qs(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?Lw(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=Pw,o}return a=e.child,e=a.sibling,o=_i(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 gC(e,t){return t=Lh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ng(e,t,r,o){return o!==null&&tC(o),Fu(t,e.child,null,r),e=gC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uW(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=U0(Error(q(422))),Ng(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=Lh({mode:"visible",children:o.children},n,0,null),a=qs(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&Fu(t,e.child,null,i),t.child.memoizedState=Lw(i),t.memoizedState=Pw,a);if(!(t.mode&1))return Ng(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error(q(419)),o=U0(a,o,void 0),Ng(e,t,i,o)}if(s=(i&e.childLanes)!==0,$r||s){if(o=qt,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,Oa(e,n),wn(o,e,n,-1))}return CC(),o=U0(Error(q(421))),Ng(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=SW.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,po=Di(n.nextSibling),mo=t,st=!0,xn=null,e!==null&&(Fo[_o++]=Ma,Fo[_o++]=Ea,Fo[_o++]=Ks,Ma=e.id,Ea=e.overflow,Ks=t),t=gC(t,o.children),t.flags|=4096,t)}function ZT(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),ww(e.return,t,r)}function z0(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 HM(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Ar(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&&ZT(e,r,t);else if(e.tag===19)ZT(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&&uh(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),z0(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&&uh(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}z0(t,!0,r,null,a);break;case"together":z0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Gg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fa(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ys|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,r=_i(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=_i(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function cW(e,t,r){switch(t.tag){case 3:VM(t),Ou();break;case 5:fM(t);break;case 1:Xr(t.type)&&oh(t);break;case 4:sC(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Qe(ih,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?BM(e,t,r):(Qe(ft,ft.current&1),e=Fa(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 HM(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,FM(e,t,r)}return Fa(e,t,r)}var UM,Tw,zM,GM;UM=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}};Tw=function(){};zM=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,Ws(aa.current);var a=null;switch(r){case"input":n=Y0(e,n),o=Y0(e,o),a=[];break;case"select":n=mt({},n,{value:void 0}),o=mt({},o,{value:void 0}),a=[];break;case"textarea":n=J0(e,n),o=J0(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=th)}tw(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"&&(Qd.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"&&(Qd.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)}};GM=function(e,t,r,o){r!==o&&(t.flags|=4)};function Od(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 pr(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 dW(e,t,r){var o=t.pendingProps;switch(eC(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pr(t),null;case 1:return Xr(t.type)&&rh(),pr(t),null;case 3:return o=t.stateNode,_u(),rt(Kr),rt(gr),uC(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Ag(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xn!==null&&(Fw(xn),xn=null))),Tw(e,t),pr(t),null;case 5:lC(t);var n=Ws(cf.current);if(r=t.type,e!==null&&t.stateNode!=null)zM(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(q(166));return pr(t),null}if(e=Ws(aa.current),Ag(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[oa]=t,o[lf]=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<Ud.length;n++)tt(Ud[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":iT(o,a),tt("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},tt("invalid",o);break;case"textarea":lT(o,a),tt("invalid",o)}tw(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&&Eg(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Eg(o.textContent,s,e),n=["children",""+s]):Qd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&tt("scroll",o)}switch(r){case"input":yg(o),sT(o,a,!0);break;case"textarea":yg(o),uT(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=th)}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=vk(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[oa]=t,e[lf]=o,UM(e,t,!1,!1),t.stateNode=e;e:{switch(i=rw(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<Ud.length;n++)tt(Ud[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":iT(e,o),n=Y0(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":lT(e,o),n=J0(e,o),tt("invalid",e);break;default:n=o}tw(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?wk(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&xk(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Zd(e,l):typeof l=="number"&&Zd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Qd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&tt("scroll",e):l!=null&&Bw(e,a,l,i))}switch(r){case"input":yg(e),sT(e,o,!1);break;case"textarea":yg(e),uT(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Vi(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?Lu(e,!!o.multiple,a,!1):o.defaultValue!=null&&Lu(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=th)}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 pr(t),null;case 6:if(e&&t.stateNode!=null)GM(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(q(166));if(r=Ws(cf.current),Ws(aa.current),Ag(t)){if(o=t.stateNode,r=t.memoizedProps,o[oa]=t,(a=o.nodeValue!==r)&&(e=mo,e!==null))switch(e.tag){case 3:Eg(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Eg(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[oa]=t,t.stateNode=o}return pr(t),null;case 13:if(rt(ft),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(st&&po!==null&&t.mode&1&&!(t.flags&128))sM(),Ou(),t.flags|=98560,a=!1;else if(a=Ag(t),o!==null&&o.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[oa]=t}else Ou(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pr(t),a=!1}else xn!==null&&(Fw(xn),xn=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?Ft===0&&(Ft=3):CC())),t.updateQueue!==null&&(t.flags|=4),pr(t),null);case 4:return _u(),Tw(e,t),e===null&&af(t.stateNode.containerInfo),pr(t),null;case 10:return nC(t.type._context),pr(t),null;case 17:return Xr(t.type)&&rh(),pr(t),null;case 19:if(rt(ft),a=t.memoizedState,a===null)return pr(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)Od(a,!1);else{if(Ft!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=uh(e),i!==null){for(t.flags|=128,Od(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()>Bu&&(t.flags|=128,o=!0,Od(a,!1),t.lanes=4194304)}else{if(!o)if(e=uh(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Od(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!st)return pr(t),null}else 2*bt()-a.renderingStartTime>Bu&&r!==1073741824&&(t.flags|=128,o=!0,Od(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):(pr(t),null);case 22:case 23:return wC(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?fo&1073741824&&(pr(t),t.subtreeFlags&6&&(t.flags|=8192)):pr(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function fW(e,t){switch(eC(t),t.tag){case 1:return Xr(t.type)&&rh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _u(),rt(Kr),rt(gr),uC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lC(t),null;case 13:if(rt(ft),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Ou()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(ft),null;case 4:return _u(),null;case 10:return nC(t.type._context),null;case 22:case 23:return wC(),null;case 24:return null;default:return null}}var Og=!1,mr=!1,pW=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Iu(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 kw(e,t,r){try{r()}catch(o){xt(e,t,o)}}var JT=!1;function mW(e,t){if(fw=Zg,e=Kk(),Zw(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(pw={focusedElem:e,selectionRange:r},Zg=!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,x=m.memoizedState,v=t.stateNode,h=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:hn(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){xt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return m=JT,JT=!1,m}function Kd(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&&kw(t,r,a)}n=n.next}while(n!==o)}}function Ih(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 Mw(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 WM(e){var t=e.alternate;t!==null&&(e.alternate=null,WM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[oa],delete t[lf],delete t[hw],delete t[YG],delete t[QG])),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 jM(e){return e.tag===5||e.tag===3||e.tag===4}function ek(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jM(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 Ew(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=th));else if(o!==4&&(e=e.child,e!==null))for(Ew(e,t,r),e=e.sibling;e!==null;)Ew(e,t,r),e=e.sibling}function Aw(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(Aw(e,t,r),e=e.sibling;e!==null;)Aw(e,t,r),e=e.sibling}var rr=null,vn=!1;function bi(e,t,r){for(r=r.child;r!==null;)qM(e,t,r),r=r.sibling}function qM(e,t,r){if(na&&typeof na.onCommitFiberUnmount=="function")try{na.onCommitFiberUnmount(vh,r)}catch{}switch(r.tag){case 5:mr||Iu(r,t);case 6:var o=rr,n=vn;rr=null,bi(e,t,r),rr=o,vn=n,rr!==null&&(vn?(e=rr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):rr.removeChild(r.stateNode));break;case 18:rr!==null&&(vn?(e=rr,r=r.stateNode,e.nodeType===8?O0(e.parentNode,r):e.nodeType===1&&O0(e,r),rf(e)):O0(rr,r.stateNode));break;case 4:o=rr,n=vn,rr=r.stateNode.containerInfo,vn=!0,bi(e,t,r),rr=o,vn=n;break;case 0:case 11:case 14:case 15:if(!mr&&(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)&&kw(r,t,i),n=n.next}while(n!==o)}bi(e,t,r);break;case 1:if(!mr&&(Iu(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)}bi(e,t,r);break;case 21:bi(e,t,r);break;case 22:r.mode&1?(mr=(o=mr)||r.memoizedState!==null,bi(e,t,r),mr=o):bi(e,t,r);break;default:bi(e,t,r)}}function tk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new pW),t.forEach(function(o){var n=bW.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function gn(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:rr=s.stateNode,vn=!1;break e;case 3:rr=s.stateNode.containerInfo,vn=!0;break e;case 4:rr=s.stateNode.containerInfo,vn=!0;break e}s=s.return}if(rr===null)throw Error(q(160));qM(a,i,n),rr=null,vn=!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;)$M(t,e),t=t.sibling}function $M(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),ta(e),o&4){try{Kd(3,e,e.return),Ih(3,e)}catch(g){xt(e,e.return,g)}try{Kd(5,e,e.return)}catch(g){xt(e,e.return,g)}}break;case 1:gn(t,e),ta(e),o&512&&r!==null&&Iu(r,r.return);break;case 5:if(gn(t,e),ta(e),o&512&&r!==null&&Iu(r,r.return),e.flags&32){var n=e.stateNode;try{Zd(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&&gk(n,a),rw(s,i);var u=rw(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?wk(n,d):c==="dangerouslySetInnerHTML"?xk(n,d):c==="children"?Zd(n,d):Bw(n,c,d,u)}switch(s){case"input":Q0(n,a);break;case"textarea":hk(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Lu(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Lu(n,!!a.multiple,a.defaultValue,!0):Lu(n,!!a.multiple,a.multiple?[]:"",!1))}n[lf]=a}catch(g){xt(e,e.return,g)}}break;case 6:if(gn(t,e),ta(e),o&4){if(e.stateNode===null)throw Error(q(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(g){xt(e,e.return,g)}}break;case 3:if(gn(t,e),ta(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{rf(t.containerInfo)}catch(g){xt(e,e.return,g)}break;case 4:gn(t,e),ta(e);break;case 13:gn(t,e),ta(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(xC=bt())),o&4&&tk(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(mr=(u=mr)||c,gn(t,e),mr=u):gn(t,e),ta(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:Kd(4,f,f.return);break;case 1:Iu(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:Iu(f,f.return);break;case 22:if(f.memoizedState!==null){ok(d);continue}}p!==null?(p.return=f,oe=p):ok(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=yk("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:gn(t,e),ta(e),o&4&&tk(e);break;case 21:break;default:gn(t,e),ta(e)}}function ta(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(jM(r)){var o=r;break e}r=r.return}throw Error(q(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(Zd(n,""),o.flags&=-33);var a=ek(e);Aw(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=ek(e);Ew(e,s,i);break;default:throw Error(q(161))}}catch(l){xt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gW(e,t,r){oe=e,KM(e,t,r)}function KM(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||Og;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||mr;s=Og;var u=mr;if(Og=i,(mr=l)&&!u)for(oe=n;oe!==null;)i=oe,l=i.child,i.tag===22&&i.memoizedState!==null?nk(n):l!==null?(l.return=i,oe=l):nk(n);for(;a!==null;)oe=a,KM(a,t,r),a=a.sibling;oe=n,Og=s,mr=u}rk(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,oe=a):rk(e,t,r)}}function rk(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:mr||Ih(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!mr)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:hn(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&HT(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}HT(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&&rf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}mr||t.flags&512&&Mw(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 ok(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 nk(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ih(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{Mw(t)}catch(l){xt(t,a,l)}break;case 5:var i=t.return;try{Mw(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 hW=Math.ceil,fh=_a.ReactCurrentDispatcher,hC=_a.ReactCurrentOwner,Bo=_a.ReactCurrentBatchConfig,De=0,qt=null,kt=null,or=0,fo=0,Pu=Ui(0),Ft=0,mf=null,Ys=0,Ph=0,vC=0,Xd=null,qr=null,xC=0,Bu=1/0,Ta=null,ph=!1,Dw=null,Oi=null,Fg=!1,ki=null,mh=0,Yd=0,Nw=null,Wg=-1,jg=0;function Dr(){return De&6?bt():Wg!==-1?Wg:Wg=bt()}function Fi(e){return e.mode&1?De&2&&or!==0?or&-or:JG.transition!==null?(jg===0&&(jg=Ak()),jg):(e=We,e!==0||(e=window.event,e=e===void 0?16:Bk(e.type)),e):1}function wn(e,t,r,o){if(50<Yd)throw Yd=0,Nw=null,Error(q(185));gf(e,r,o),(!(De&2)||e!==qt)&&(e===qt&&(!(De&2)&&(Ph|=r),Ft===4&&Li(e,or)),Yr(e,o),r===1&&De===0&&!(t.mode&1)&&(Bu=bt()+500,Sh&&zi()))}function Yr(e,t){var r=e.callbackNode;tG(e,t);var o=Qg(e,e===qt?or:0);if(o===0)r!==null&&fT(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&fT(r),t===1)e.tag===0?ZG(ak.bind(null,e)):nM(ak.bind(null,e)),KG(function(){!(De&6)&&zi()}),r=null;else{switch(Dk(o)){case 1:r=Ww;break;case 4:r=Mk;break;case 16:r=Yg;break;case 536870912:r=Ek;break;default:r=Yg}r=rE(r,XM.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function XM(e,t){if(Wg=-1,jg=0,De&6)throw Error(q(327));var r=e.callbackNode;if(Au()&&e.callbackNode!==r)return null;var o=Qg(e,e===qt?or:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=gh(e,o);else{t=o;var n=De;De|=2;var a=QM();(qt!==e||or!==t)&&(Ta=null,Bu=bt()+500,js(e,t));do try{yW();break}catch(s){YM(e,s)}while(1);oC(),fh.current=a,De=n,kt!==null?t=0:(qt=null,or=0,t=Ft)}if(t!==0){if(t===2&&(n=sw(e),n!==0&&(o=n,t=Ow(e,n))),t===1)throw r=mf,js(e,0),Li(e,o),Yr(e,bt()),r;if(t===6)Li(e,o);else{if(n=e.current.alternate,!(o&30)&&!vW(n)&&(t=gh(e,o),t===2&&(a=sw(e),a!==0&&(o=a,t=Ow(e,a))),t===1))throw r=mf,js(e,0),Li(e,o),Yr(e,bt()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error(q(345));case 2:Us(e,qr,Ta);break;case 3:if(Li(e,o),(o&130023424)===o&&(t=xC+500-bt(),10<t)){if(Qg(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Dr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=gw(Us.bind(null,e,qr,Ta),t);break}Us(e,qr,Ta);break;case 4:if(Li(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-yn(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*hW(o/1960))-o,10<o){e.timeoutHandle=gw(Us.bind(null,e,qr,Ta),o);break}Us(e,qr,Ta);break;case 5:Us(e,qr,Ta);break;default:throw Error(q(329))}}}return Yr(e,bt()),e.callbackNode===r?XM.bind(null,e):null}function Ow(e,t){var r=Xd;return e.current.memoizedState.isDehydrated&&(js(e,t).flags|=256),e=gh(e,t),e!==2&&(t=qr,qr=r,t!==null&&Fw(t)),e}function Fw(e){qr===null?qr=e:qr.push.apply(qr,e)}function vW(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(!Cn(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 Li(e,t){for(t&=~vC,t&=~Ph,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-yn(t),o=1<<r;e[r]=-1,t&=~o}}function ak(e){if(De&6)throw Error(q(327));Au();var t=Qg(e,0);if(!(t&1))return Yr(e,bt()),null;var r=gh(e,t);if(e.tag!==0&&r===2){var o=sw(e);o!==0&&(t=o,r=Ow(e,o))}if(r===1)throw r=mf,js(e,0),Li(e,t),Yr(e,bt()),r;if(r===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Us(e,qr,Ta),Yr(e,bt()),null}function yC(e,t){var r=De;De|=1;try{return e(t)}finally{De=r,De===0&&(Bu=bt()+500,Sh&&zi())}}function Qs(e){ki!==null&&ki.tag===0&&!(De&6)&&Au();var t=De;De|=1;var r=Bo.transition,o=We;try{if(Bo.transition=null,We=1,e)return e()}finally{We=o,Bo.transition=r,De=t,!(De&6)&&zi()}}function wC(){fo=Pu.current,rt(Pu)}function js(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,$G(r)),kt!==null)for(r=kt.return;r!==null;){var o=r;switch(eC(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&rh();break;case 3:_u(),rt(Kr),rt(gr),uC();break;case 5:lC(o);break;case 4:_u();break;case 13:rt(ft);break;case 19:rt(ft);break;case 10:nC(o.type._context);break;case 22:case 23:wC()}r=r.return}if(qt=e,kt=e=_i(e.current,null),or=fo=t,Ft=0,mf=null,vC=Ph=Ys=0,qr=Xd=null,Gs!==null){for(t=0;t<Gs.length;t++)if(r=Gs[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}Gs=null}return e}function YM(e,t){do{var r=kt;try{if(oC(),Ug.current=dh,ch){for(var o=pt.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}ch=!1}if(Xs=0,jt=Ot=pt=null,$d=!1,df=0,hC.current=null,r===null||r.return===null){Ft=1,mf=t,kt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=or,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=qT(i);if(p!==null){p.flags&=-257,$T(p,i,s,a,t),p.mode&1&&jT(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)){jT(a,u,t),CC();break e}l=Error(q(426))}}else if(st&&s.mode&1){var x=qT(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),$T(x,i,s,a,t),tC(Vu(l,s));break e}}a=l=Vu(l,s),Ft!==4&&(Ft=2),Xd===null?Xd=[a]:Xd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=DM(a,l,t);BT(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"&&(Oi===null||!Oi.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=NM(a,s,t);BT(a,w);break e}}a=a.return}while(a!==null)}JM(r)}catch(C){t=C,kt===r&&r!==null&&(kt=r=r.return);continue}break}while(1)}function QM(){var e=fh.current;return fh.current=dh,e===null?dh:e}function CC(){(Ft===0||Ft===3||Ft===2)&&(Ft=4),qt===null||!(Ys&268435455)&&!(Ph&268435455)||Li(qt,or)}function gh(e,t){var r=De;De|=2;var o=QM();(qt!==e||or!==t)&&(Ta=null,js(e,t));do try{xW();break}catch(n){YM(e,n)}while(1);if(oC(),De=r,fh.current=o,kt!==null)throw Error(q(261));return qt=null,or=0,Ft}function xW(){for(;kt!==null;)ZM(kt)}function yW(){for(;kt!==null&&!q5();)ZM(kt)}function ZM(e){var t=tE(e.alternate,e,fo);e.memoizedProps=e.pendingProps,t===null?JM(e):kt=t,hC.current=null}function JM(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=fW(r,t),r!==null){r.flags&=32767,kt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ft=6,kt=null;return}}else if(r=dW(r,t,fo),r!==null){kt=r;return}if(t=t.sibling,t!==null){kt=t;return}kt=t=e}while(t!==null);Ft===0&&(Ft=5)}function Us(e,t,r){var o=We,n=Bo.transition;try{Bo.transition=null,We=1,wW(e,t,r,o)}finally{Bo.transition=n,We=o}return null}function wW(e,t,r,o){do Au();while(ki!==null);if(De&6)throw Error(q(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(q(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(rG(e,a),e===qt&&(kt=qt=null,or=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Fg||(Fg=!0,rE(Yg,function(){return Au(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Bo.transition,Bo.transition=null;var i=We;We=1;var s=De;De|=4,hC.current=null,mW(e,r),$M(r,e),zG(pw),Zg=!!fw,pw=fw=null,e.current=r,gW(r,e,n),$5(),De=s,We=i,Bo.transition=a}else e.current=r;if(Fg&&(Fg=!1,ki=e,mh=n),a=e.pendingLanes,a===0&&(Oi=null),Y5(r.stateNode,o),Yr(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(ph)throw ph=!1,e=Dw,Dw=null,e;return mh&1&&e.tag!==0&&Au(),a=e.pendingLanes,a&1?e===Nw?Yd++:(Yd=0,Nw=e):Yd=0,zi(),null}function Au(){if(ki!==null){var e=Dk(mh),t=Bo.transition,r=We;try{if(Bo.transition=null,We=16>e?16:e,ki===null)var o=!1;else{if(e=ki,ki=null,mh=0,De&6)throw Error(q(331));var n=De;for(De|=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:Kd(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(WM(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 x=g.sibling;g.sibling=null,g=x}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:Kd(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,oe=v;break e}oe=a.return}}var h=e.current;for(oe=h;oe!==null;){i=oe;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,oe=y;else e:for(i=h;oe!==null;){if(s=oe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ih(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(De=n,zi(),na&&typeof na.onPostCommitFiberRoot=="function")try{na.onPostCommitFiberRoot(vh,e)}catch{}o=!0}return o}finally{We=r,Bo.transition=t}}return!1}function ik(e,t,r){t=Vu(r,t),t=DM(e,t,1),e=Ni(e,t,1),t=Dr(),e!==null&&(gf(e,1,t),Yr(e,t))}function xt(e,t,r){if(e.tag===3)ik(e,e,r);else for(;t!==null;){if(t.tag===3){ik(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Oi===null||!Oi.has(o))){e=Vu(r,e),e=NM(t,e,1),t=Ni(t,e,1),e=Dr(),t!==null&&(gf(t,1,e),Yr(t,e));break}}t=t.return}}function CW(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Dr(),e.pingedLanes|=e.suspendedLanes&r,qt===e&&(or&r)===r&&(Ft===4||Ft===3&&(or&130023424)===or&&500>bt()-xC?js(e,0):vC|=r),Yr(e,t)}function eE(e,t){t===0&&(e.mode&1?(t=Sg,Sg<<=1,!(Sg&130023424)&&(Sg=4194304)):t=1);var r=Dr();e=Oa(e,t),e!==null&&(gf(e,t,r),Yr(e,r))}function SW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),eE(e,r)}function bW(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(q(314))}o!==null&&o.delete(t),eE(e,r)}var tE;tE=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kr.current)$r=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return $r=!1,cW(e,t,r);$r=!!(e.flags&131072)}else $r=!1,st&&t.flags&1048576&&aM(t,ah,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Gg(e,t),e=t.pendingProps;var n=Nu(t,gr.current);Eu(t,r),n=dC(null,t,o,e,n,r);var a=fC();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,Xr(o)?(a=!0,oh(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,iC(t),n.updater=Rh,t.stateNode=n,n._reactInternals=t,Sw(t,o,e,r),t=Iw(null,t,o,!0,a,r)):(t.tag=0,st&&a&&Jw(t),Ar(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Gg(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=IW(o),e=hn(o,e),n){case 0:t=Rw(null,t,o,e,r);break e;case 1:t=YT(null,t,o,e,r);break e;case 11:t=KT(null,t,o,e,r);break e;case 14:t=XT(null,t,o,hn(o.type,e),r);break e}throw Error(q(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),Rw(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),YT(e,t,o,n,r);case 3:e:{if(VM(t),e===null)throw Error(q(387));o=t.pendingProps,a=t.memoizedState,n=a.element,dM(e,t),lh(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=Vu(Error(q(423)),t),t=QT(e,t,o,r,n);break e}else if(o!==n){n=Vu(Error(q(424)),t),t=QT(e,t,o,r,n);break e}else for(po=Di(t.stateNode.containerInfo.firstChild),mo=t,st=!0,xn=null,r=uM(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ou(),o===n){t=Fa(e,t,r);break e}Ar(e,t,o,r)}t=t.child}return t;case 5:return fM(t),e===null&&yw(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,mw(o,n)?i=null:a!==null&&mw(o,a)&&(t.flags|=32),_M(e,t),Ar(e,t,i,r),t.child;case 6:return e===null&&yw(t),null;case 13:return BM(e,t,r);case 4:return sC(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Fu(t,null,o,r):Ar(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),KT(e,t,o,n,r);case 7:return Ar(e,t,t.pendingProps,r),t.child;case 8:return Ar(e,t,t.pendingProps.children,r),t.child;case 12:return Ar(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(ih,o._currentValue),o._currentValue=i,a!==null)if(Cn(a.value,i)){if(a.children===n.children&&!Kr.current){t=Fa(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===o){if(a.tag===1){l=Aa(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),ww(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(q(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),ww(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}Ar(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Eu(t,r),n=Ho(n),o=o(n),t.flags|=1,Ar(e,t,o,r),t.child;case 14:return o=t.type,n=hn(o,t.pendingProps),n=hn(o.type,n),XT(e,t,o,n,r);case 15:return OM(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),Gg(e,t),t.tag=1,Xr(o)?(e=!0,oh(t)):e=!1,Eu(t,r),AM(t,o,n),Sw(t,o,n,r),Iw(null,t,o,!0,e,r);case 19:return HM(e,t,r);case 22:return FM(e,t,r)}throw Error(q(156,t.tag))};function rE(e,t){return kk(e,t)}function RW(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 Vo(e,t,r,o){return new RW(e,t,r,o)}function SC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IW(e){if(typeof e=="function")return SC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uw)return 11;if(e===zw)return 14}return 2}function _i(e,t){var r=e.alternate;return r===null?(r=Vo(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 qg(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")SC(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case hu:return qs(r.children,n,a,t);case Hw:i=8,n|=8;break;case q0:return e=Vo(12,r,t,n|2),e.elementType=q0,e.lanes=a,e;case $0:return e=Vo(13,r,t,n),e.elementType=$0,e.lanes=a,e;case K0:return e=Vo(19,r,t,n),e.elementType=K0,e.lanes=a,e;case fk:return Lh(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ck:i=10;break e;case dk:i=9;break e;case Uw:i=11;break e;case zw:i=14;break e;case Ri:i=16,o=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=Vo(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function qs(e,t,r,o){return e=Vo(7,e,o,t),e.lanes=r,e}function Lh(e,t,r,o){return e=Vo(22,e,o,t),e.elementType=fk,e.lanes=r,e.stateNode={isHidden:!1},e}function G0(e,t,r){return e=Vo(6,e,null,t),e.lanes=r,e}function W0(e,t,r){return t=Vo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PW(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=L0(0),this.expirationTimes=L0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=L0(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function bC(e,t,r,o,n,a,i,s,l){return e=new PW(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Vo(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},iC(a),e}function LW(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gu,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function oE(e){if(!e)return Bi;e=e._reactInternals;e:{if(Js(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(Xr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var r=e.type;if(Xr(r))return oM(e,r,t)}return t}function nE(e,t,r,o,n,a,i,s,l){return e=bC(r,o,!0,e,n,a,i,s,l),e.context=oE(null),r=e.current,o=Dr(),n=Fi(r),a=Aa(o,n),a.callback=t??null,Ni(r,a,n),e.current.lanes=n,gf(e,n,o),Yr(e,o),e}function Th(e,t,r,o){var n=t.current,a=Dr(),i=Fi(n);return r=oE(r),t.context===null?t.context=r:t.pendingContext=r,t=Aa(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Ni(n,t,i),e!==null&&(wn(e,n,i,a),Hg(e,n,i)),i}function hh(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 sk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function RC(e,t){sk(e,t),(e=e.alternate)&&sk(e,t)}function TW(){return null}var aE=typeof reportError=="function"?reportError:function(e){console.error(e)};function IC(e){this._internalRoot=e}kh.prototype.render=IC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));Th(e,t,null,null)};kh.prototype.unmount=IC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qs(function(){Th(null,e,null,null)}),t[Na]=null}};function kh(e){this._internalRoot=e}kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fk();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Pi.length&&t!==0&&t<Pi[r].priority;r++);Pi.splice(r,0,e),r===0&&Vk(e)}};function PC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lk(){}function kW(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=hh(i);a.call(u)}}var i=nE(t,o,e,0,null,!1,!1,"",lk);return e._reactRootContainer=i,e[Na]=i.current,af(e.nodeType===8?e.parentNode:e),Qs(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=hh(l);s.call(u)}}var l=bC(e,0,!1,null,null,!1,!1,"",lk);return e._reactRootContainer=l,e[Na]=l.current,af(e.nodeType===8?e.parentNode:e),Qs(function(){Th(t,l,r,o)}),l}function Eh(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=hh(i);s.call(l)}}Th(t,i,e,n)}else i=kW(r,t,e,n,o);return hh(i)}Nk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Hd(t.pendingLanes);r!==0&&(jw(t,r|1),Yr(t,bt()),!(De&6)&&(Bu=bt()+500,zi()))}break;case 13:Qs(function(){var o=Oa(e,1);if(o!==null){var n=Dr();wn(o,e,1,n)}}),RC(e,1)}};qw=function(e){if(e.tag===13){var t=Oa(e,134217728);if(t!==null){var r=Dr();wn(t,e,134217728,r)}RC(e,134217728)}};Ok=function(e){if(e.tag===13){var t=Fi(e),r=Oa(e,t);if(r!==null){var o=Dr();wn(r,e,t,o)}RC(e,t)}};Fk=function(){return We};_k=function(e,t){var r=We;try{return We=e,t()}finally{We=r}};nw=function(e,t,r){switch(t){case"input":if(Q0(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=Ch(o);if(!n)throw Error(q(90));mk(o),Q0(o,n)}}}break;case"textarea":hk(e,r);break;case"select":t=r.value,t!=null&&Lu(e,!!r.multiple,t,!1)}};bk=yC;Rk=Qs;var MW={usingClientEntryPoint:!1,Events:[vf,wu,Ch,Ck,Sk,yC]},Fd={findFiberByHostInstance:zs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EW={bundleType:Fd.bundleType,version:Fd.version,rendererPackageName:Fd.rendererPackageName,rendererConfig:Fd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_a.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Lk(e),e===null?null:e.stateNode},findFiberByHostInstance:Fd.findFiberByHostInstance||TW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(_d=__REACT_DEVTOOLS_GLOBAL_HOOK__,!_d.isDisabled&&_d.supportsFiber))try{vh=_d.inject(EW),na=_d}catch{}var _d;vo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MW;vo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!PC(t))throw Error(q(200));return LW(e,t,null,r)};vo.createRoot=function(e,t){if(!PC(e))throw Error(q(299));var r=!1,o="",n=aE;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=bC(e,1,!1,null,null,r,!1,o,n),e[Na]=t.current,af(e.nodeType===8?e.parentNode:e),new IC(t)};vo.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=Lk(t),e=e===null?null:e.stateNode,e};vo.flushSync=function(e){return Qs(e)};vo.hydrate=function(e,t,r){if(!Mh(t))throw Error(q(200));return Eh(null,e,t,!0,r)};vo.hydrateRoot=function(e,t,r){if(!PC(e))throw Error(q(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=aE;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=nE(t,null,e,1,r??null,n,!1,a,i),e[Na]=t.current,af(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 kh(t)};vo.render=function(e,t,r){if(!Mh(t))throw Error(q(200));return Eh(null,e,t,!1,r)};vo.unmountComponentAtNode=function(e){if(!Mh(e))throw Error(q(40));return e._reactRootContainer?(Qs(function(){Eh(null,null,e,!1,function(){e._reactRootContainer=null,e[Na]=null})}),!0):!1};vo.unstable_batchedUpdates=yC;vo.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Mh(r))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Eh(e,t,r,!1,o)};vo.version="18.3.1-next-f1338f8080-20240426"});var Va=Zn((zte,lE)=>{"use strict";function sE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sE)}catch(e){console.error(e)}}sE(),lE.exports=iE()});var QE=Zn(YE=>{"use strict";var tc=M();function O6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var F6=typeof Object.is=="function"?Object.is:O6,_6=tc.useState,V6=tc.useEffect,B6=tc.useLayoutEffect,H6=tc.useDebugValue;function U6(e,t){var r=t(),o=_6({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return B6(function(){n.value=r,n.getSnapshot=t,YC(n)&&a({inst:n})},[e,r,t]),V6(function(){return YC(n)&&a({inst:n}),e(function(){YC(n)&&a({inst:n})})},[e]),H6(r),r}function YC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!F6(e,r)}catch{return!0}}function z6(e,t){return t()}var G6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?z6:U6;YE.useSyncExternalStore=tc.useSyncExternalStore!==void 0?tc.useSyncExternalStore:G6});var JE=Zn((Zae,ZE)=>{"use strict";ZE.exports=QE()});var xte={};Q4(xte,{Accordion:()=>jE,AccordionContent:()=>WC,AccordionItem:()=>zC,AccordionTrigger:()=>GC,Alert:()=>jC,AlertDescription:()=>$C,AlertTitle:()=>qC,AspectRatio:()=>XC,Avatar:()=>Gh,AvatarFallback:()=>Wh,AvatarGroup:()=>rS,AvatarImage:()=>tS,Badge:()=>eo,Breadcrumb:()=>nS,BreadcrumbEllipsis:()=>jh,BreadcrumbItem:()=>iS,BreadcrumbLink:()=>lS,BreadcrumbList:()=>aS,BreadcrumbPage:()=>uS,BreadcrumbSeparator:()=>sS,Button:()=>Ee,ButtonGroup:()=>qL,Card:()=>xb,CardCVCInput:()=>Mb,CardContent:()=>Sb,CardDescription:()=>Cb,CardExpiryInput:()=>kb,CardFooter:()=>bb,CardHeader:()=>yb,CardNumberInput:()=>Tb,CardTitle:()=>wb,CardZipInput:()=>Eb,Carousel:()=>_b,CarouselContent:()=>Bb,CarouselItem:()=>Ub,CarouselNext:()=>Gb,CarouselPrevious:()=>zb,Checkbox:()=>Ix,CheckboxGroup:()=>qb,CheckboxLabel:()=>om,CheckboxWithLabel:()=>$b,Collapsible:()=>_O,CollapsibleContent:()=>Qb,CollapsibleTrigger:()=>Yb,ColorPicker:()=>Zx,Command:()=>sy,CommandDialog:()=>iB,CommandEmpty:()=>ZR,CommandGroup:()=>JR,CommandInput:()=>YR,CommandItem:()=>tI,CommandList:()=>QR,CommandSeparator:()=>eI,CommandShortcut:()=>rI,DatePicker:()=>RI,DateRangePicker:()=>PB,DateTimePicker:()=>LB,Dialog:()=>ny,DialogClose:()=>oB,DialogContent:()=>Cm,DialogDescription:()=>iy,DialogFooter:()=>XR,DialogForm:()=>aB,DialogHeader:()=>ay,DialogTitle:()=>td,DialogTrigger:()=>rB,DraggableList:()=>MB,DropdownMenu:()=>HH,DropdownMenuCheckboxItem:()=>YI,DropdownMenuContent:()=>KI,DropdownMenuGroup:()=>zH,DropdownMenuItem:()=>XI,DropdownMenuLabel:()=>ZI,DropdownMenuPortal:()=>GH,DropdownMenuRadioGroup:()=>jH,DropdownMenuRadioItem:()=>QI,DropdownMenuSeparator:()=>JI,DropdownMenuShortcut:()=>eP,DropdownMenuSub:()=>WH,DropdownMenuSubContent:()=>$I,DropdownMenuSubTrigger:()=>qI,DropdownMenuTrigger:()=>UH,FileUpload:()=>rP,FreeBadge:()=>aU,GestureDrawer:()=>oP,GitHubStarButton:()=>MQ,GitHubStars:()=>XH,GradientPicker:()=>IV,Input:()=>lr,InputOTP:()=>iP,InputOTPGroup:()=>sP,InputOTPSeparator:()=>cP,InputOTPSlot:()=>uP,Kbd:()=>HL,Label:()=>Br,LockedComponent:()=>dP,MonthPicker:()=>TB,MoonLogo:()=>xy,MoonLogoAnimated:()=>jQ,MoonLogoIcon:()=>WQ,MoonUIAccordion:()=>jE,MoonUIAccordionContent:()=>WC,MoonUIAccordionItem:()=>zC,MoonUIAccordionTrigger:()=>GC,MoonUIAlert:()=>jC,MoonUIAlertDescription:()=>$C,MoonUIAlertTitle:()=>qC,MoonUIAspectRatio:()=>XC,MoonUIAvatar:()=>Gh,MoonUIAvatarFallback:()=>Wh,MoonUIAvatarGroup:()=>rS,MoonUIAvatarImage:()=>tS,MoonUIBadge:()=>eo,MoonUIBreadcrumb:()=>nS,MoonUIBreadcrumbEllipsis:()=>jh,MoonUIBreadcrumbItem:()=>iS,MoonUIBreadcrumbLink:()=>lS,MoonUIBreadcrumbList:()=>aS,MoonUIBreadcrumbPage:()=>uS,MoonUIBreadcrumbSeparator:()=>sS,MoonUIButton:()=>Ee,MoonUIButtonGroup:()=>qL,MoonUICalendar:()=>Bc,MoonUICard:()=>xb,MoonUICardCVCInput:()=>Mb,MoonUICardContent:()=>Sb,MoonUICardDescription:()=>Cb,MoonUICardExpiryInput:()=>kb,MoonUICardFooter:()=>bb,MoonUICardHeader:()=>yb,MoonUICardNumberInput:()=>Tb,MoonUICardTitle:()=>wb,MoonUICardZipInput:()=>Eb,MoonUICarousel:()=>_b,MoonUICarouselContent:()=>Bb,MoonUICarouselItem:()=>Ub,MoonUICarouselNext:()=>Gb,MoonUICarouselPrevious:()=>zb,MoonUICheckbox:()=>Ix,MoonUICheckboxGroup:()=>qb,MoonUICheckboxLabel:()=>om,MoonUICheckboxWithLabel:()=>$b,MoonUICollapsible:()=>_O,MoonUICollapsibleContent:()=>Qb,MoonUICollapsibleTrigger:()=>Yb,MoonUIColorPicker:()=>Zx,MoonUICommand:()=>sy,MoonUICommandDialog:()=>iB,MoonUICommandEmpty:()=>ZR,MoonUICommandGroup:()=>JR,MoonUICommandInput:()=>YR,MoonUICommandItem:()=>tI,MoonUICommandList:()=>QR,MoonUICommandSeparator:()=>eI,MoonUICommandShortcut:()=>rI,MoonUIDataTableBasic:()=>RB,MoonUIDatePicker:()=>RI,MoonUIDateRangePicker:()=>PB,MoonUIDateTimePicker:()=>LB,MoonUIDialog:()=>ny,MoonUIDialogClose:()=>oB,MoonUIDialogContent:()=>Cm,MoonUIDialogDescription:()=>iy,MoonUIDialogFooter:()=>XR,MoonUIDialogHeader:()=>ay,MoonUIDialogTitle:()=>td,MoonUIDialogTrigger:()=>rB,MoonUIDraggableList:()=>MB,MoonUIDropdownMenu:()=>HH,MoonUIDropdownMenuCheckboxItem:()=>YI,MoonUIDropdownMenuContent:()=>KI,MoonUIDropdownMenuGroup:()=>zH,MoonUIDropdownMenuItem:()=>XI,MoonUIDropdownMenuLabel:()=>ZI,MoonUIDropdownMenuPortal:()=>GH,MoonUIDropdownMenuRadioGroup:()=>jH,MoonUIDropdownMenuRadioItem:()=>QI,MoonUIDropdownMenuSeparator:()=>JI,MoonUIDropdownMenuShortcut:()=>eP,MoonUIDropdownMenuSub:()=>WH,MoonUIDropdownMenuSubContent:()=>$I,MoonUIDropdownMenuSubTrigger:()=>qI,MoonUIDropdownMenuTrigger:()=>UH,MoonUIFileUpload:()=>rP,MoonUIFreeBadge:()=>aU,MoonUIGestureDrawer:()=>oP,MoonUIGitHubStars:()=>XH,MoonUIGradientPicker:()=>IV,MoonUIInput:()=>lr,MoonUIInputOTP:()=>iP,MoonUIInputOTPGroup:()=>sP,MoonUIInputOTPSeparator:()=>cP,MoonUIInputOTPSlot:()=>uP,MoonUIKbd:()=>HL,MoonUILabel:()=>Br,MoonUILockedComponent:()=>dP,MoonUIMonthPicker:()=>TB,MoonUIMoonLogo:()=>xy,MoonUIPagination:()=>pP,MoonUIPaginationContent:()=>mP,MoonUIPaginationEllipsis:()=>xP,MoonUIPaginationItem:()=>gP,MoonUIPaginationLink:()=>_m,MoonUIPaginationNext:()=>vP,MoonUIPaginationPrevious:()=>hP,MoonUIPhoneInput:()=>_P,MoonUIPopover:()=>wa,MoonUIPopoverContent:()=>Vn,MoonUIPopoverTrigger:()=>Ca,MoonUIProBadge:()=>nU,MoonUIProComponentWrapper:()=>oU,MoonUIProgress:()=>Om,MoonUIRadioGroup:()=>VP,MoonUIRadioGroupItem:()=>Iy,MoonUIRadioItemWithLabel:()=>BP,MoonUIRadioLabel:()=>Py,MoonUIRating:()=>zL,MoonUIRichTextEditor:()=>YU,MoonUIScrollArea:()=>qP,MoonUIScrollBar:()=>Ny,MoonUIScrollReveal:()=>$P,MoonUIScrollRevealContainer:()=>KP,MoonUIScrollRevealItem:()=>XP,MoonUISelect:()=>ru,MoonUISelectContent:()=>nu,MoonUISelectGroup:()=>$U,MoonUISelectItem:()=>Lr,MoonUISelectLabel:()=>OP,MoonUISelectScrollDownButton:()=>Ry,MoonUISelectScrollUpButton:()=>by,MoonUISelectSeparator:()=>FP,MoonUISelectTrigger:()=>ou,MoonUISelectValue:()=>ad,MoonUISeparator:()=>To,MoonUISimpleColorPicker:()=>RV,MoonUISimpleEditor:()=>pL,MoonUISkeleton:()=>vi,MoonUISkeletonAvatar:()=>zy,MoonUISkeletonCard:()=>gL,MoonUISkeletonText:()=>Uy,MoonUISlider:()=>ba,MoonUISpinner:()=>WL,MoonUISwipeableCard:()=>hL,MoonUISwitch:()=>xL,MoonUITable:()=>Im,MoonUITableBody:()=>Lm,MoonUITableCaption:()=>CI,MoonUITableCell:()=>rd,MoonUITableFooter:()=>wI,MoonUITableHead:()=>Tm,MoonUITableHeader:()=>Pm,MoonUITableRow:()=>Yl,MoonUITabs:()=>gm,MoonUITabsContent:()=>$l,MoonUITabsList:()=>hm,MoonUITabsTrigger:()=>ql,MoonUITagsInput:()=>yL,MoonUITextarea:()=>wL,MoonUIToast:()=>Xy,MoonUIToastAction:()=>FL,MoonUIToastClose:()=>Yy,MoonUIToastDescription:()=>Zy,MoonUIToastProvider:()=>OL,MoonUIToastTitle:()=>Qy,MoonUIToastViewport:()=>Ky,MoonUIToaster:()=>Gz,MoonUIToggle:()=>$m,MoonUIToggleGroup:()=>p1,MoonUIToggleGroupItem:()=>m1,MoonUITooltip:()=>Ym,MoonUITooltipContent:()=>md,MoonUITooltipProvider:()=>Hy,MoonUITooltipTrigger:()=>Qm,Pagination:()=>pP,PaginationContent:()=>mP,PaginationEllipsis:()=>xP,PaginationItem:()=>gP,PaginationLink:()=>_m,PaginationNext:()=>vP,PaginationPrevious:()=>hP,Palette:()=>al,PhoneInput:()=>_P,Pipette:()=>jf,Popover:()=>wa,PopoverAnchor:()=>VK,PopoverClose:()=>BK,PopoverContent:()=>Vn,PopoverFooter:()=>oV,PopoverHeader:()=>rV,PopoverSeparator:()=>tV,PopoverTrigger:()=>Ca,ProBadge:()=>nU,ProComponentWrapper:()=>oU,Progress:()=>Om,REGEXP_ONLY_CHARS:()=>tU,REGEXP_ONLY_DIGITS:()=>eU,REGEXP_ONLY_DIGITS_AND_CHARS:()=>rU,RadioGroup:()=>VP,RadioGroupItem:()=>Iy,RadioItemWithLabel:()=>BP,RadioLabel:()=>Py,Rating:()=>zL,RichTextEditor:()=>YU,ScrollArea:()=>qP,ScrollBar:()=>Ny,ScrollReveal:()=>$P,ScrollRevealContainer:()=>KP,ScrollRevealItem:()=>XP,Select:()=>ru,SelectContent:()=>nu,SelectGroup:()=>$U,SelectItem:()=>Lr,SelectLabel:()=>OP,SelectScrollDownButton:()=>Ry,SelectScrollUpButton:()=>by,SelectSeparator:()=>FP,SelectTrigger:()=>ou,SelectValue:()=>ad,Separator:()=>To,SimpleColorPicker:()=>RV,SimpleEditor:()=>pL,SimpleTooltip:()=>vz,Skeleton:()=>vi,SkeletonAvatar:()=>zy,SkeletonCard:()=>gL,SkeletonText:()=>Uy,Slider:()=>ba,Spinner:()=>WL,SwipeableCard:()=>hL,Switch:()=>xL,Table:()=>Im,TableBody:()=>Lm,TableCaption:()=>CI,TableCell:()=>rd,TableFooter:()=>wI,TableHead:()=>Tm,TableHeader:()=>Pm,TableRow:()=>Yl,Tabs:()=>gm,TabsContent:()=>$l,TabsList:()=>hm,TabsTrigger:()=>ql,TagsInput:()=>yL,Textarea:()=>wL,Toast:()=>Xy,ToastAction:()=>FL,ToastClose:()=>Yy,ToastDescription:()=>Zy,ToastProvider:()=>OL,ToastTitle:()=>Qy,ToastViewport:()=>Ky,Toaster:()=>Gz,Toggle:()=>$m,ToggleGroup:()=>p1,ToggleGroupItem:()=>m1,Tooltip:()=>Ym,TooltipArrow:()=>fL,TooltipContent:()=>md,TooltipProvider:()=>Hy,TooltipTrigger:()=>Qm,aspectRatioVariants:()=>XE,badgeVariants:()=>oS,buttonGroupVariants:()=>jL,buttonVariants:()=>op,carouselContentVariants:()=>Vb,carouselItemVariants:()=>Hb,cn:()=>P,collapsibleContentVariants:()=>VO,collapsibleTriggerVariants:()=>Kb,format:()=>jo,inputOTPSlotVariants:()=>lP,kbdVariants:()=>BL,moonUIBadgeVariants:()=>oS,moonUIButtonGroupVariants:()=>jL,moonUIButtonVariants:()=>op,moonUICarouselContentVariants:()=>Vb,moonUICarouselItemVariants:()=>Hb,moonUICreateSortableHeader:()=>IB,moonUIInputOTPSlotVariants:()=>lP,moonUIKbdVariants:()=>BL,moonUIRatingVariants:()=>UL,moonUISkeletonVariants:()=>mL,moonUISpinnerVariants:()=>GL,moonUIToggleVariants:()=>qm,popoverContentVariants:()=>eV,progressVariants:()=>$H,ratingVariants:()=>UL,separatorVariants:()=>A3,skeletonVariants:()=>mL,spinnerVariants:()=>GL,toast:()=>_L,toggleVariants:()=>qm,tooltipVariants:()=>hz,useCarousel:()=>Hc,useToast:()=>VL});module.exports=Z4(xte);var zh=b(M());var Zr=b(M(),1);var Do=b(M(),1),p0=b(D(),1);function B1(e,t){let r=Do.createContext(t),o=a=>{let{children:i,...s}=a,l=Do.useMemo(()=>s,Object.values(s));return(0,p0.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Do.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 Fe(e,t=[]){let r=[];function o(a,i){let s=Do.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,x=Do.useMemo(()=>m,Object.values(m));return(0,p0.jsx)(g.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,m=Do.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=>Do.createContext(i));return function(s){let l=s?.[e]||a;return Do.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,w5(n,...t)]}function w5(...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 Do.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Ci=b(M(),1);var U1=b(M(),1);function H1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uo(...e){return t=>{let r=!1,o=e.map(n=>{let a=H1(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():H1(e[n],null)}}}}function de(...e){return U1.useCallback(uo(...e),e)}var Nt=b(M(),1);var fu=b(D(),1);function co(e){let t=C5(e),r=Nt.forwardRef((o,n)=>{let{children:a,...i}=o,s=Nt.Children.toArray(a),l=s.find(S5);if(l){let u=l.props.children,c=s.map(d=>d===l?Nt.Children.count(u)>1?Nt.Children.only(null):Nt.isValidElement(u)?u.props.children:null:d);return(0,fu.jsx)(t,{...i,ref:n,children:Nt.isValidElement(u)?Nt.cloneElement(u,void 0,c):null})}return(0,fu.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function C5(e){let t=Nt.forwardRef((r,o)=>{let{children:n,...a}=r;if(Nt.isValidElement(n)){let i=R5(n),s=b5(a,n.props);return n.type!==Nt.Fragment&&(s.ref=o?uo(o,i):i),Nt.cloneElement(n,s)}return Nt.Children.count(n)>1?Nt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var z1=Symbol("radix.slottable");function G1(e){let t=({children:r})=>(0,fu.jsx)(fu.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=z1,t}function S5(e){return Nt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z1}function b5(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 R5(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 dg=b(D(),1),I5=b(M(),1);var P5=b(D(),1);function Jn(e){let t=e+"CollectionProvider",[r,o]=Fe(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{let{scope:x,children:v}=g,h=Ci.default.useRef(null),y=Ci.default.useRef(new Map).current;return(0,dg.jsx)(n,{scope:x,itemMap:y,collectionRef:h,children:v})};i.displayName=t;let s=e+"CollectionSlot",l=co(s),u=Ci.default.forwardRef((g,x)=>{let{scope:v,children:h}=g,y=a(s,v),w=de(x,y.collectionRef);return(0,dg.jsx)(l,{ref:w,children:h})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=co(c),p=Ci.default.forwardRef((g,x)=>{let{scope:v,children:h,...y}=g,w=Ci.default.useRef(null),C=de(x,w),S=a(c,v);return Ci.default.useEffect(()=>(S.itemMap.set(w,{ref:w,...y}),()=>void S.itemMap.delete(w))),(0,dg.jsx)(f,{[d]:"",ref:C,children:h})});p.displayName=c;function m(g){let x=a(e+"CollectionConsumer",g);return Ci.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,o]}var Dte=!!(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 No=b(M(),1);var W1=b(M(),1),Ve=globalThis?.document?W1.useLayoutEffect:()=>{};var fg=b(M(),1);var L5=No[" useInsertionEffect ".trim().toString()]||Ve;function $e({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=T5({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=No.useRef(e!==void 0);No.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=No.useCallback(c=>{if(s){let d=k5(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function T5({defaultProp:e,onChange:t}){let[r,o]=No.useState(e),n=No.useRef(r),a=No.useRef(t);return L5(()=>{a.current=t},[t]),No.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function k5(e){return typeof e=="function"}var _te=Symbol("RADIX:SYNC_STATE");var uE=b(M(),1),cE=b(Va(),1);var dE=b(D(),1),AW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=AW.reduce((e,t)=>{let r=co(`Primitive.${t}`),o=uE.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,dE.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function zu(e,t){e&&cE.flushSync(()=>e.dispatchEvent(t))}var ar=b(M(),1);var Qr=b(M(),1);var fE=b(M(),1);function DW(e,t){return fE.useReducer((r,o)=>t[r][o]??r,e)}var lt=e=>{let{present:t,children:r}=e,o=NW(t),n=typeof r=="function"?r({present:o.isPresent}):Qr.Children.only(r),a=de(o.ref,OW(n));return typeof r=="function"||o.isPresent?Qr.cloneElement(n,{ref:a}):null};lt.displayName="Presence";function NW(e){let[t,r]=Qr.useState(),o=Qr.useRef(null),n=Qr.useRef(e),a=Qr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=DW(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Qr.useEffect(()=>{let u=Ah(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=Ah(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=Ah(o.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=Ah(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:Qr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Ah(e){return e?.animationName||"none"}function OW(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 LC=b(M(),1);var FW=LC[" useId ".trim().toString()]||(()=>{}),_W=0;function Ne(e){let[t,r]=LC.useState(FW());return Ve(()=>{e||r(o=>o??String(_W++))},[e]),e||(t?`radix-${t}`:"")}var el=b(D(),1),Dh="Collapsible",[VW,TC]=Fe(Dh),[BW,kC]=VW(Dh),pE=ar.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:Dh});return(0,el.jsx)(BW,{scope:r,disabled:a,contentId:Ne(),open:l,onOpenToggle:ar.useCallback(()=>u(c=>!c),[u]),children:(0,el.jsx)($.div,{"data-state":EC(l),"data-disabled":a?"":void 0,...s,ref:t})})});pE.displayName=Dh;var mE="CollapsibleTrigger",gE=ar.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=kC(mE,r);return(0,el.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":EC(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});gE.displayName=mE;var MC="CollapsibleContent",hE=ar.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=kC(MC,e.__scopeCollapsible);return(0,el.jsx)(lt,{present:r||n.open,children:({present:a})=>(0,el.jsx)(HW,{...o,ref:t,present:a})})});hE.displayName=MC;var HW=ar.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=kC(MC,r),[s,l]=ar.useState(o),u=ar.useRef(null),c=de(t,u),d=ar.useRef(0),f=d.current,p=ar.useRef(0),m=p.current,g=i.open||s,x=ar.useRef(g),v=ar.useRef(void 0);return ar.useEffect(()=>{let h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),Ve(()=>{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(o)}},[i.open,o]),(0,el.jsx)($.div,{"data-state":EC(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 EC(e){return e?"open":"closed"}var Nh=pE,Gu=gE,yf=hE;var Oh=b(M(),1),UW=b(D(),1),zW=Oh.createContext(void 0);function ia(e){let t=Oh.useContext(zW);return e||t||"ltr"}var _t=b(D(),1),Sn="Accordion",GW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[DC,WW,jW]=Jn(Sn),[_h,mre]=Fe(Sn,[jW,TC]),NC=TC(),xE=Zr.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,_t.jsx)(DC.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,_t.jsx)(XW,{...a,ref:t}):(0,_t.jsx)(KW,{...n,ref:t})})});xE.displayName=Sn;var[yE,qW]=_h(Sn),[wE,$W]=_h(Sn,{collapsible:!1}),KW=Zr.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:Sn});return(0,_t.jsx)(yE,{scope:e.__scopeAccordion,value:Zr.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Zr.default.useCallback(()=>a&&l(""),[a,l]),children:(0,_t.jsx)(wE,{scope:e.__scopeAccordion,collapsible:a,children:(0,_t.jsx)(CE,{...i,ref:t})})})}),XW=Zr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=$e({prop:r,defaultProp:o??[],onChange:n,caller:Sn}),l=Zr.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Zr.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,_t.jsx)(yE,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,_t.jsx)(wE,{scope:e.__scopeAccordion,collapsible:!0,children:(0,_t.jsx)(CE,{...a,ref:t})})})}),[YW,Vh]=_h(Sn),CE=Zr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=Zr.default.useRef(null),l=de(s,t),u=WW(r),d=ia(n)==="ltr",f=W(e.onKeyDown,p=>{if(!GW.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,_t.jsx)(YW,{scope:r,disabled:o,direction:n,orientation:a,children:(0,_t.jsx)(DC.Slot,{scope:r,children:(0,_t.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),Fh="AccordionItem",[QW,OC]=_h(Fh),SE=Zr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=Vh(Fh,r),i=qW(Fh,r),s=NC(r),l=Ne(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,_t.jsx)(QW,{scope:r,open:u,disabled:c,triggerId:l,children:(0,_t.jsx)(Nh,{"data-orientation":a.orientation,"data-state":TE(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});SE.displayName=Fh;var bE="AccordionHeader",RE=Zr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Vh(Sn,r),a=OC(bE,r);return(0,_t.jsx)($.h3,{"data-orientation":n.orientation,"data-state":TE(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});RE.displayName=bE;var AC="AccordionTrigger",IE=Zr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Vh(Sn,r),a=OC(AC,r),i=$W(AC,r),s=NC(r);return(0,_t.jsx)(DC.ItemSlot,{scope:r,children:(0,_t.jsx)(Gu,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});IE.displayName=AC;var PE="AccordionContent",LE=Zr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Vh(Sn,r),a=OC(PE,r),i=NC(r);return(0,_t.jsx)(yf,{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}})});LE.displayName=PE;function TE(e){return e?"open":"closed"}var kE=xE,ME=SE,EE=RE,FC=IE,_C=LE;var Hh=b(M());var AE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JW=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),VC=e=>{let t=JW(e);return t.charAt(0).toUpperCase()+t.slice(1)},Bh=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),DE=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var wf=b(M());var NE={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 OE=(0,wf.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,wf.createElement)("svg",{ref:l,...NE,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Bh("lucide",n),...!a&&!DE(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,wf.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var U=(e,t)=>{let r=(0,Hh.forwardRef)(({className:o,...n},a)=>(0,Hh.createElement)(OE,{ref:a,iconNode:t,className:Bh(`lucide-${AE(VC(e))}`,`lucide-${e}`,o),...n}));return r.displayName=VC(e),r};var ej=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Cf=U("align-center",ej);var tj=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Sf=U("align-justify",tj);var rj=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],bf=U("align-left",rj);var oj=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Rf=U("align-right",oj);var nj=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Wu=U("arrow-down",nj);var aj=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],If=U("arrow-left",aj);var ij=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Pf=U("arrow-right",ij);var sj=[["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"}]],ju=U("arrow-up-down",sj);var lj=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],qu=U("arrow-up",lj);var uj=[["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"}]],Lf=U("bold",uj);var cj=[["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"}]],tl=U("calendar",cj);var dj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hr=U("check",dj);var fj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sa=U("chevron-down",fj);var pj=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],bn=U("chevron-left",pj);var mj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Or=U("chevron-right",mj);var gj=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Tf=U("chevron-up",gj);var hj=[["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"}]],Rn=U("circle-alert",hj);var vj=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Gi=U("circle-check-big",vj);var xj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rl=U("circle",xj);var yj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],kf=U("clock",yj);var wj=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Mf=U("code",wj);var Cj=[["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"}]],Ef=U("copy",Cj);var Sj=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Af=U("credit-card",Sj);var bj=[["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=U("crown",bj);var Rj=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Df=U("dot",Rj);var Ij=[["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"}]],la=U("ellipsis",Ij);var Pj=[["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"}]],Nf=U("external-link",Pj);var Lj=[["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"}]],ol=U("eye",Lj);var Tj=[["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"}]],Of=U("file-text",Tj);var kj=[["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"}]],Ff=U("file",kj);var Mj=[["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"}]],_f=U("git-fork",Mj);var Ej=[["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"}]],nl=U("image",Ej);var Aj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ku=U("info",Aj);var Dj=[["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"}]],Vf=U("italic",Dj);var Nj=[["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"}]],Bf=U("link",Nj);var Oj=[["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"}]],Hf=U("list-ordered",Oj);var Fj=[["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"}]],Uf=U("list",Fj);var _j=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vt=U("loader-circle",_j);var Vj=[["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"}]],Xu=U("lock",Vj);var Bj=[["path",{d:"M5 12h14",key:"1ays0h"}]],zf=U("minus",Bj);var Hj=[["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"}]],Gf=U("music",Hj);var Uj=[["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"}]],al=U("palette",Uj);var zj=[["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"}]],Wf=U("phone",zj);var Gj=[["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"}]],jf=U("pipette",Gj);var Wj=[["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"}]],qf=U("quote",Wj);var jj=[["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"}]],$f=U("redo",jj);var qj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],il=U("search",qj);var $j=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Jr=U("square-pen",$j);var Kj=[["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"}]],Wi=U("star",Kj);var Xj=[["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"}]],Kf=U("strikethrough",Xj);var Yj=[["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"}]],ji=U("triangle-alert",Yj);var Qj=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Xf=U("underline",Qj);var Zj=[["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"}]],Yf=U("undo",Zj);var Jj=[["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"}]],Qf=U("upload",Jj);var e6=[["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"}]],Zf=U("video",e6);var t6=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xo=U("x",t6);var r6=[["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=U("zap",r6);function FE(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=FE(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Uh(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=FE(e))&&(o&&(o+=" "),o+=t);return o}var UC="-",o6=e=>{let t=a6(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(UC);return s[0]===""&&s.length!==1&&s.shift(),BE(s,t)||n6(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},BE=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?BE(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(UC);return t.validators.find(({validator:i})=>i(a))?.classGroupId},_E=/^\[(.+)\]$/,n6=e=>{if(_E.test(e)){let t=_E.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},a6=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return s6(Object.entries(e.classGroups),r).forEach(([a,i])=>{HC(i,o,a,t)}),o},HC=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:VE(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(i6(n)){HC(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{HC(i,VE(t,a),r,o)})})},VE=(e,t)=>{let r=e;return t.split(UC).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},i6=e=>e.isThemeGetter,s6=(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,l6=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)}}},HE="!",u6=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],a=t.length,i=s=>{let l=[],u=0,c=0,d;for(let x=0;x<s.length;x++){let v=s[x];if(u===0){if(v===n&&(o||s.slice(x,x+a)===t)){l.push(s.slice(c,x)),c=x+a;continue}if(v==="/"){d=x;continue}}v==="["?u++:v==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(HE),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},c6=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},d6=e=>({cache:l6(e.cacheSize),parseClassName:u6(e),...o6(e)}),f6=/\s+/,p6=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(f6),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 x=c6(c).join(":"),v=d?x+HE: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 m6(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=UE(t))&&(o&&(o+=" "),o+=r);return o}var UE=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=UE(e[o]))&&(r&&(r+=" "),r+=t);return r};function g6(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=d6(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=p6(l,r);return n(l,c),c}return function(){return a(m6.apply(null,arguments))}}var ot=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},zE=/^\[(?:([a-z-]+):)?(.+)\]$/i,h6=/^\d+\/\d+$/,v6=new Set(["px","full","screen"]),x6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y6=/\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$/,w6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,C6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ba=e=>Qu(e)||v6.has(e)||h6.test(e),qi=e=>Zu(e,"length",M6),Qu=e=>!!e&&!Number.isNaN(Number(e)),BC=e=>Zu(e,"number",Qu),Jf=e=>!!e&&Number.isInteger(Number(e)),b6=e=>e.endsWith("%")&&Qu(e.slice(0,-1)),Pe=e=>zE.test(e),$i=e=>x6.test(e),R6=new Set(["length","size","percentage"]),I6=e=>Zu(e,R6,GE),P6=e=>Zu(e,"position",GE),L6=new Set(["image","url"]),T6=e=>Zu(e,L6,A6),k6=e=>Zu(e,"",E6),ep=()=>!0,Zu=(e,t,r)=>{let o=zE.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},M6=e=>y6.test(e)&&!w6.test(e),GE=()=>!1,E6=e=>C6.test(e),A6=e=>S6.test(e);var D6=()=>{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"),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"),L=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Pe,t],E=()=>[Pe,t],F=()=>["",Ba,qi],N=()=>["auto",Qu,Pe],B=()=>["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"],H=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Pe],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[Qu,Pe];return{cacheSize:500,separator:":",theme:{colors:[ep],spacing:[Ba,qi],blur:["none","",$i,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",$i,Pe],borderSpacing:E(),borderWidth:F(),contrast:ae(),grayscale:A(),hueRotate:ae(),invert:A(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[b6,qi],inset:k(),margin:k(),opacity:ae(),padding:E(),saturate:ae(),scale:ae(),sepia:A(),skew:ae(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[$i]}],"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:[...B(),Pe]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],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",Jf,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:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Jf,Pe]}],"grid-cols":[{"grid-cols":[ep]}],"col-start-end":[{col:["auto",{span:["full",Jf,Pe]},Pe]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ep]}],"row-start-end":[{row:["auto",{span:[Jf,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",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"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:[$i]},$i]}],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",$i,qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",BC]}],"font-family":[{font:[ep]}],"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",Qu,BC]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ba,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",Ba,qi]}],"underline-offset":[{"underline-offset":["auto",Ba,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:E()}],"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:[...B(),P6]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",I6]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},T6]}],"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":[Ba,Pe]}],"outline-w":[{outline:[Ba,qi]}],"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":[Ba,qi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$i,k6]}],"shadow-color":[{shadow:[ep]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$i,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":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",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:[Jf,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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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:[Ba,qi,BC]}],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 WE=g6(D6);function P(...e){return WE(Uh(e))}var Ki=b(D()),jE=kE,zC=zh.forwardRef(({className:e,...t},r)=>(0,Ki.jsx)(ME,{ref:r,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));zC.displayName="AccordionItem";var GC=zh.forwardRef(({className:e,children:t,...r},o)=>(0,Ki.jsx)(EE,{className:"flex",children:(0,Ki.jsxs)(FC,{ref:o,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),...r,children:[t,(0,Ki.jsx)(sa,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));GC.displayName=FC.displayName;var WC=zh.forwardRef(({className:e,children:t,...r},o)=>(0,Ki.jsx)(_C,{ref:o,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),...r,children:(0,Ki.jsx)("div",{className:"pb-4 pt-0",children:t})}));WC.displayName=_C.displayName;var Ju=b(M());var qE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$E=Uh,Q=(e,t)=>r=>{var o;if(t?.variants==null)return $E(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=qE(c)||qE(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,x]=m;return Array.isArray(x)?x.includes({...a,...s}[g]):{...a,...s}[g]===x})?[...u,d,f]:u},[]);return $E(e,i,l,r?.class,r?.className)};var Ha=b(D()),N6=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}}),jC=Ju.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=Ju.useMemo(()=>{switch(t){case"success":return hr;case"warning":return ji;case"error":return Rn;case"info":return Ku;default:return Ku}},[t]);return(0,Ha.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",N6({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,Ha.jsx)(c,{className:"h-5 w-5"}),(0,Ha.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,Ha.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,Ha.jsx)(xo,{className:"h-4 w-4"})})]})});jC.displayName="Alert";var qC=Ju.forwardRef(({className:e,...t},r)=>(0,Ha.jsx)("h5",{ref:r,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));qC.displayName="AlertTitle";var $C=Ju.forwardRef(({className:e,...t},r)=>(0,Ha.jsx)("div",{ref:r,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));$C.displayName="AlertDescription";var KE=b(M());var KC=b(D()),XE=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"}}),XC=KE.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,KC.jsx)("div",{ref:s,className:P("moonui-theme",XE({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,KC.jsx)("div",{className:"absolute inset-0",children:a})}));XC.displayName="AspectRatio";var rp=b(M());var zo=b(M(),1);var ec=b(M(),1);function nt(e){let t=ec.useRef(e);return ec.useEffect(()=>{t.current=e}),ec.useMemo(()=>(...r)=>t.current?.(...r),[])}var eA=b(JE(),1);function tA(){return(0,eA.useSyncExternalStore)(W6,()=>!0,()=>!1)}function W6(){return()=>{}}var tp=b(D(),1),QC="Avatar",[j6,aie]=Fe(QC),[q6,oA]=j6(QC),nA=zo.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=zo.useState("idle");return(0,tp.jsx)(q6,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,tp.jsx)($.span,{...o,ref:t})})});nA.displayName=QC;var aA="AvatarImage",iA=zo.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=oA(aA,r),s=$6(o,a),l=nt(u=>{n(u),i.onImageLoadingStatusChange(u)});return Ve(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,tp.jsx)($.img,{...a,ref:t,src:o}):null});iA.displayName=aA;var sA="AvatarFallback",lA=zo.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=oA(sA,r),[i,s]=zo.useState(o===void 0);return zo.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,tp.jsx)($.span,{...n,ref:t}):null});lA.displayName=sA;function rA(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function $6(e,{referrerPolicy:t,crossOrigin:r}){let o=tA(),n=zo.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=zo.useState(()=>rA(a,e));return Ve(()=>{s(rA(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 ZC=nA,JC=iA,eS=lA;var In=b(D()),X6=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"}}),Gh=rp.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,In.jsx)(ZC,{ref:a,className:P("moonui-theme",X6({size:t,radius:r,variant:o}),e),...n}));Gh.displayName=ZC.displayName;var tS=rp.forwardRef(({className:e,...t},r)=>(0,In.jsx)(JC,{ref:r,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));tS.displayName=JC.displayName;var Wh=rp.forwardRef(({className:e,...t},r)=>(0,In.jsx)(eS,{ref:r,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));Wh.displayName=eS.displayName;var rS=rp.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,In.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,In.jsxs)("div",{className:"flex",children:[i.map((l,u)=>(0,In.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${o}px`,zIndex:i.length-u},children:l},u)),s>0&&(0,In.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,In.jsx)(Gh,{variant:"border",children:(0,In.jsxs)(Wh,{children:["+",s]})})})]})})});rS.displayName="AvatarGroup";var vr=b(D()),oS=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 eo({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,vr.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,vr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,vr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,vr.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,vr.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,vr.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,vr.jsxs)("div",{className:P("moonui-theme",oS({variant:t,size:r,radius:o}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,vr.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,vr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,vr.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,vr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,vr.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,vr.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,vr.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 ua=b(M());var Fr=b(D()),Y6=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"}}),nS=ua.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Fr.jsx)("nav",{ref:n,className:P("moonui-theme",Y6({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));nS.displayName="Breadcrumb";var aS=ua.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=ua.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Fr.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Fr.jsx)(jh,{}),l]})}return(0,Fr.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});aS.displayName="BreadcrumbList";var iS=ua.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?ua.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Fr.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,Fr.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})})});iS.displayName="BreadcrumbItem";var sS=({children:e,className:t,...r})=>(0,Fr.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Fr.jsx)(Or,{className:"h-3.5 w-3.5"})});sS.displayName="BreadcrumbSeparator";var jh=({className:e,...t})=>(0,Fr.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,Fr.jsx)(la,{className:"h-4 w-4"}),(0,Fr.jsx)("span",{className:"sr-only",children:"More pages"})]});jh.displayName="BreadcrumbEllipsis";var lS=ua.forwardRef(({className:e,href:t,...r},o)=>(0,Fr.jsx)("a",{ref:o,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),...r}));lS.displayName="BreadcrumbLink";var uS=ua.forwardRef(({className:e,...t},r)=>(0,Fr.jsx)("span",{ref:r,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));uS.displayName="BreadcrumbPage";var uA=b(M());var qh=b(D()),op=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}}),Ee=uA.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,qh.jsxs)("button",{className:P("moonui-theme",op({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"data-loading":i?"":void 0,...d,children:[i&&(0,qh.jsx)(Vt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Ee.displayName="Button";var Tl=b(M());var Up=b(D(),1),pa=b(M(),1);var cA=b(M(),1),rc=(0,cA.createContext)({});var dA=b(M(),1);function ca(e){let t=(0,dA.useRef)(null);return t.current===null&&(t.current=e()),t.current}var $h=b(M(),1);var oc=typeof window<"u";var nc=oc?$h.useLayoutEffect:$h.useEffect;var GS=b(D(),1),vD=b(M(),1),Bp=b(M(),1);var fA=b(M(),1),Xi=(0,fA.createContext)(null);var gD=b(D(),1);function sl(e,t){e.indexOf(t)===-1&&e.push(t)}function Pn(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var $t=(e,t,r)=>r>t?t:r<e?e:r;var Ua=()=>{},ir=()=>{};var xr={};var np=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ap(e){return typeof e=="object"&&e!==null}var ip=e=>/^0[^.\s]+$/u.test(e);function ll(e){let t;return()=>(t===void 0&&(t=e()),t)}var gt=e=>e;var Q6=(e,t)=>r=>t(e(r)),Ln=(...e)=>e.reduce(Q6);var Go=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var za=class{constructor(){this.subscriptions=[]}add(t){return sl(this.subscriptions,t),()=>Pn(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,Bt=e=>e/1e3;function sp(e,t){return t?e*(1e3/t):0}var pA=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var mA=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Z6=1e-7,J6=12;function eq(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=mA(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>Z6&&++s<J6);return i}function Yi(e,t,r,o){if(e===t&&r===o)return gt;let n=a=>eq(a,0,1,e,r);return a=>a===0||a===1?a:mA(n(a),t,o)}var Kh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Xh=e=>t=>1-e(1-t);var Yh=Yi(.33,1.53,.69,.99),ac=Xh(Yh),lp=Kh(ac);var up=e=>(e*=2)<1?.5*ac(e):.5*(2-Math.pow(2,-10*(e-1)));var cp=e=>1-Math.sin(Math.acos(e)),dp=Xh(cp),fp=Kh(cp);var cS=Yi(.42,0,1,1),dS=Yi(0,0,.58,1),pp=Yi(.42,0,.58,1);var mp=e=>Array.isArray(e)&&typeof e[0]!="number";function gp(e,t){return mp(e)?e[pA(0,e.length,t)]:e}var hp=e=>Array.isArray(e)&&typeof e[0]=="number";var gA={linear:gt,easeIn:cS,easeInOut:pp,easeOut:dS,circIn:cp,circInOut:fp,circOut:dp,backIn:ac,backInOut:lp,backOut:Yh,anticipate:up},tq=e=>typeof e=="string",Qh=e=>{if(hp(e)){ir(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Yi(t,r,o,n)}else if(tq(e))return ir(gA[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),gA[e];return e};var vp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var to={value:null,addProjectionMetrics:null};function hA(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&&to.value&&to.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var rq=40;function Zh(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=vp.reduce((y,w)=>(y[w]=hA(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=xr.useManualTiming?n.timestamp:performance.now();r=!1,xr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(y-n.timestamp,rq),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,r&&t&&(o=!1,e(g))},x=()=>{r=!0,o=!0,n.isProcessing||e(g)};return{schedule:vp.reduce((y,w)=>{let C=i[w];return y[w]=(S,R=!1,I=!1)=>(r||x(),C.schedule(S,R,I)),y},{}),cancel:y=>{for(let w=0;w<vp.length;w++)i[vp[w]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:yr,state:yt,steps:xp}=Zh(typeof requestAnimationFrame<"u"?requestAnimationFrame:gt,!0);var Jh;function oq(){Jh=void 0}var wt={now:()=>(Jh===void 0&&wt.set(yt.isProcessing||xr.useManualTiming?yt.timestamp:performance.now()),Jh),set:e=>{Jh=e,queueMicrotask(oq)}};var Tn={layout:0,mainThread:0,waapi:0};var vA=e=>t=>typeof t=="string"&&t.startsWith(e),ul=vA("--"),nq=vA("var(--"),cl=e=>nq(e)?aq.test(e.split("/*")[0].trim()):!1,aq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var da={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ga={...da,transform:e=>$t(0,1,e)},yp={...da,default:1};var Qi=e=>Math.round(e*1e5)/1e5;var ic=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xA(e){return e==null}var yA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var sc=(e,t)=>r=>!!(typeof r=="string"&&yA.test(r)&&r.startsWith(e)||t&&!xA(r)&&Object.prototype.hasOwnProperty.call(r,t)),ev=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(ic);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var iq=e=>$t(0,255,e),fS={...da,transform:e=>Math.round(iq(e))},fa={test:sc("rgb","red"),parse:ev("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+fS.transform(e)+", "+fS.transform(t)+", "+fS.transform(r)+", "+Qi(Ga.transform(o))+")"};function sq(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 wp={test:sc("#"),parse:sq,transform:fa.transform};var Cp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kn=Cp("deg"),wr=Cp("%"),ue=Cp("px"),pS=Cp("vh"),mS=Cp("vw"),tv=(()=>({...wr,parse:e=>wr.parse(e)/100,transform:e=>wr.transform(e*100)}))();var Zi={test:sc("hsl","hue"),parse:ev("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+wr.transform(Qi(t))+", "+wr.transform(Qi(r))+", "+Qi(Ga.transform(o))+")"};var ut={test:e=>fa.test(e)||wp.test(e)||Zi.test(e),parse:e=>fa.test(e)?fa.parse(e):Zi.test(e)?Zi.parse(e):wp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fa.transform(e):Zi.transform(e),getAnimatableNone:e=>{let t=ut.parse(e);return t.alpha=0,ut.transform(t)}};var wA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lq(e){return isNaN(e)&&typeof e=="string"&&(e.match(ic)?.length||0)+(e.match(wA)?.length||0)>0}var SA="number",bA="color",uq="var",cq="var(",CA="${}",dq=/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 Ji(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(dq,l=>(ut.test(l)?(o.color.push(a),n.push(bA),r.push(ut.parse(l))):l.startsWith(cq)?(o.var.push(a),n.push(uq),r.push(l)):(o.number.push(a),n.push(SA),r.push(parseFloat(l))),++a,CA)).split(CA);return{values:r,split:s,indexes:o,types:n}}function RA(e){return Ji(e).values}function IA(e){let{split:t,types:r}=Ji(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===SA?a+=Qi(n[i]):s===bA?a+=ut.transform(n[i]):a+=n[i]}return a}}var fq=e=>typeof e=="number"?0:ut.test(e)?ut.getAnimatableNone(e):e;function pq(e){let t=RA(e);return IA(e)(t.map(fq))}var Cr={test:lq,parse:RA,createTransformer:IA,getAnimatableNone:pq};function gS(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 PA({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=gS(l,s,e+1/3),a=gS(l,s,e),i=gS(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function lc(e,t){return r=>r>0?t:e}var ke=(e,t,r)=>e+(t-e)*r;var hS=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},mq=[wp,fa,Zi],gq=e=>mq.find(t=>t.test(e));function LA(e){let t=gq(e);if(Ua(!!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===Zi&&(r=PA(r)),r}var vS=(e,t)=>{let r=LA(e),o=LA(t);if(!r||!o)return lc(e,t);let n={...r};return a=>(n.red=hS(r.red,o.red,a),n.green=hS(r.green,o.green,a),n.blue=hS(r.blue,o.blue,a),n.alpha=ke(r.alpha,o.alpha,a),fa.transform(n))};var rv=new Set(["none","hidden"]);function TA(e,t){return rv.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function hq(e,t){return r=>ke(e,t,r)}function ov(e){return typeof e=="number"?hq:typeof e=="string"?cl(e)?lc:ut.test(e)?vS:yq:Array.isArray(e)?kA:typeof e=="object"?ut.test(e)?vS:vq:lc}function kA(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>ov(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function vq(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=ov(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function xq(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 yq=(e,t)=>{let r=Cr.createTransformer(t),o=Ji(e),n=Ji(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?rv.has(e)&&!n.values.length||rv.has(t)&&!o.values.length?TA(e,t):Ln(kA(xq(o,n),n.values),r):(Ua(!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"),lc(e,t))};function nv(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ke(e,t,r):ov(e)(e,t)}var MA=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Le.update(t,r),stop:()=>yr(t),now:()=>yt.isProcessing?yt.timestamp:wt.now()}};var av=(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 uc(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 Sp(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(uc(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Bt(n)}}var wq=5;function iv(e,t,r){let o=Math.max(t-wq,0);return sp(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 yS=.001;function EA({duration:e=at.duration,bounce:t=at.bounce,velocity:r=at.velocity,mass:o=at.mass}){let n,a;Ua(e<=Rt(at.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=$t(at.minDamping,at.maxDamping,i),e=$t(at.minDuration,at.maxDuration,Bt(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=sv(u,i),m=Math.exp(-d);return yS-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=sv(Math.pow(u,2),i);return(-n(u)+yS>0?-1:1)*((f-p)*m)/g}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-yS+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=Sq(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 Cq=12;function Sq(e,t,r){let o=r;for(let n=1;n<Cq;n++)o=o-e(o)/t(o);return o}function sv(e,t){return e*Math.sqrt(1-t*t)}var bq=["duration","bounce"],Rq=["stiffness","damping","mass"];function AA(e,t){return t.some(r=>e[r]!==void 0)}function Iq(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!AA(e,Rq)&&AA(e,bq))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*$t(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:at.mass,stiffness:n,damping:a}}else{let r=EA(e);t={...t,...r,mass:at.mass},t.isResolvedFromDuration=!0}return t}function Wa(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}=Iq({...r,velocity:-Bt(r.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),x=i-a,v=Bt(Math.sqrt(l/c)),h=Math.abs(x)<5;o||(o=h?at.restSpeed.granular:at.restSpeed.default),n||(n=h?at.restDelta.granular:at.restDelta.default);let y;if(g<1){let C=sv(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?Rt(m):iv(y,C,S));let I=Math.abs(R)<=o,L=Math.abs(i-S)<=n;s.done=I&&L}return s.value=s.done?i:S,s},toString:()=>{let C=Math.min(uc(w),2e4),S=av(R=>w.next(C*R).value,C,30);return C+"ms "+S},toTransition:()=>{}};return w}Wa.applyToOptions=e=>{let t=Sp(e,100,Wa);return e.ease=t.ease,e.duration=Rt(t.duration),e.type="keyframes",e};function bp({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,x=d+g,v=i===void 0?x:i(x);v!==x&&(g=v-d);let h=I=>-g*Math.exp(-I/o),y=I=>v+h(I),w=I=>{let L=h(I),T=y(I);f.done=Math.abs(L)<=u,f.value=f.done?v:T},C,S,R=I=>{p(f.value)&&(C=I,S=Wa({keyframes:[f.value,m(f.value)],velocity:iv(y,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:I=>{let L=!1;return!S&&C===void 0&&(L=!0,w(I),R(I)),C!==void 0&&I>=C?S.next(I-C):(!L&&w(I),f)}}}function Pq(e,t,r){let o=[],n=r||xr.mix||nv,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=Ln(l,s)}o.push(s)}return o}function lv(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(ir(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=Pq(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=Go(e[d],e[d+1],c);return s[d](f)};return r?c=>u($t(e[0],e[a-1],c)):u}function Rp(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=Go(0,t,o);e.push(ke(r,1,n))}}function Ip(e){let t=[0];return Rp(t,e.length-1),t}function DA(e,t){return e.map(r=>r*t)}function Lq(e,t){return e.map(()=>t||pp).splice(0,e.length-1)}function dl({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=mp(o)?o.map(Qh):Qh(o),a={done:!1,value:t[0]},i=DA(r&&r.length===t.length?r:Ip(t),e),s=lv(i,t,{ease:Array.isArray(n)?n:Lq(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Tq=e=>e!==null;function cc(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(Tq),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var kq={decay:bp,inertia:bp,tween:dl,keyframes:dl,spring:Wa};function uv(e){typeof e.type=="string"&&(e.type=kq[e.type])}var es=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 Mq=e=>e/100,ja=class extends es{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?.())},Tn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;uv(t);let{type:r=dl,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||dl;l!==dl&&typeof s[0]!="number"&&(this.mixKeyframes=Ln(Mq,nv(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=uc(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:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),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=o;if(d){let I=Math.min(this.currentTime,n)/s,L=Math.floor(I),T=I%1;!T&&I>=1&&(T=1),T===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/s)):f==="mirror"&&(w=i)),y=$t(0,1,T)*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!==bp&&(C.value=cc(c,this.options,x,this.speed)),g&&g(C.value),R&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return Bt(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Bt(t)}get time(){return Bt(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=Bt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=MA,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,Tn.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 NA(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var fl=e=>e*180/Math.PI,wS=e=>{let t=fl(Math.atan2(e[1],e[0]));return CS(t)},Eq={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:wS,rotateZ:wS,skewX:e=>fl(Math.atan(e[1])),skewY:e=>fl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},CS=e=>(e=e%360,e<0&&(e+=360),e),OA=wS,FA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_A=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Aq={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:FA,scaleY:_A,scale:e=>(FA(e)+_A(e))/2,rotateX:e=>CS(fl(Math.atan2(e[6],e[5]))),rotateY:e=>CS(fl(Math.atan2(-e[2],e[0]))),rotateZ:OA,rotate:OA,skewX:e=>fl(Math.atan(e[4])),skewY:e=>fl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Pp(e){return e.includes("scale")?1:0}function Lp(e,t){if(!e||e==="none")return Pp(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=Aq,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Eq,n=s}if(!n)return Pp(t);let a=o[t],i=n[1].split(",").map(Dq);return typeof a=="function"?a(i):i[a]}var SS=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Lp(r,t)};function Dq(e){return parseFloat(e.trim())}var Mn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=(()=>new Set(Mn))();var bS=e=>e===da||e===ue,Nq=new Set(["x","y","z"]),Oq=Mn.filter(e=>!Nq.has(e));function VA(e){let t=[];return Oq.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var ts={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})=>Lp(t,"x"),y:(e,{transform:t})=>Lp(t,"y")};ts.translateX=ts.x;ts.translateY=ts.y;var pl=new Set,RS=!1,IS=!1,PS=!1;function BA(){if(IS){let e=Array.from(pl).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=VA(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)})}IS=!1,RS=!1,pl.forEach(e=>e.complete(PS)),pl.clear()}function HA(){pl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(IS=!0)})}function LS(){PS=!0,HA(),BA(),PS=!1}var qa=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?(pl.add(this),RS||(RS=!0,Le.read(HA),Le.resolveKeyframes(BA))):(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])}NA(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pl.delete(this)}cancel(){this.state==="scheduled"&&(pl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var UA=e=>e.startsWith("--");function zA(e,t,r){UA(t)?e.style.setProperty(t,r):e.style[t]=r}var GA=ll(()=>window.ScrollTimeline!==void 0);var WA={};function jA(e,t){let r=ll(e);return()=>WA[t]??r()}var cv=jA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var ml=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var TS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ml([0,.65,.55,1]),circOut:ml([.55,0,1,.45]),backIn:ml([.31,.01,.66,-.59]),backOut:ml([.33,1.53,.69,.99])};function kS(e,t){if(e)return typeof e=="function"?cv()?av(e,t):"ease-out":hp(e)?ml(e):Array.isArray(e)?e.map(r=>kS(r,t)||TS.easeOut):TS[e]}function qA(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=kS(s,n);Array.isArray(d)&&(c.easing=d),to.value&&Tn.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 to.value&&p.finished.finally(()=>{Tn.waapi--}),p}function gl(e){return typeof e=="function"&&"applyToOptions"in e}function $A({type:e,...t}){return gl(e)&&cv()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var dv=class extends es{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,ir(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=$A(t);this.animation=qA(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=cc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):zA(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 Bt(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Bt(t)}get time(){return Bt(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&&GA()?(this.animation.timeline=t,gt):r(this)}};var KA={anticipate:up,backInOut:lp,circInOut:fp};function Fq(e){return e in KA}function XA(e){typeof e.ease=="string"&&Fq(e.ease)&&(e.ease=KA[e.ease])}var YA=10,fv=class extends dv{constructor(t){XA(t),uv(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 ja({...i,autoplay:!1}),l=Rt(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-YA).value,s.sample(l).value,YA),s.stop()}};var MS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Cr.test(e)||e==="0")&&!e.startsWith("url("));function _q(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 QA(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=MS(n,t),s=MS(a,t);return Ua(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:_q(e)||(r==="spring"||gl(r))&&o}function dc(e){e.duration=0,e.type="keyframes"}var Vq=new Set(["opacity","clipPath","filter","transform"]),Bq=ll(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ZA(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 Bq()&&r&&Vq.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var Hq=40,Tp=class extends es{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||qa;this.keyframeResolver=new p(s,(m,g,x)=>this.onKeyframesResolved(m,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=o;this.resolvedAt=wt.now(),QA(t,a,i,s)||((xr.instantAnimations||!l)&&c?.(cc(t,o,r)),t[0]=t[t.length-1],dc(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Hq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&ZA(f)?new fv({...f,element:f.motionValue.owner.current}):new ja(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(),LS()),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 pv=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 JA(this.animations,"duration")}get iterationDuration(){return JA(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 JA(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 kp=class extends pv{then(t,r){return this.finished.finally(t).then(()=>{})}};var Uq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zq(e){let t=Uq.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var Gq=4;function ES(e,t,r=1){ir(r<=Gq,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=zq(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return np(i)?parseFloat(i):i}return cl(n)?ES(n,t,r+1):n}function hl(e,t){return e?.[t]??e?.default??e}var Mp=new Set(["width","height","top","left","right","bottom",...Mn]);var eD={test:e=>e==="auto",parse:e=>e};var mv=e=>t=>t.test(e);var AS=[da,ue,wr,kn,mS,pS,eD],DS=e=>AS.find(mv(e));function tD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ip(e):!0}var Wq=new Set(["brightness","contrast","saturate","opacity"]);function jq(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(ic)||[];if(!o)return e;let n=r.replace(o,""),a=Wq.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var qq=/\b([a-z-]*)\(.*?\)/gu,Ep={...Cr,getAnimatableNone:e=>{let t=e.match(qq);return t?t.map(jq).join(" "):e}};var NS={...da,transform:Math.round};var rD={rotate:kn,rotateX:kn,rotateY:kn,rotateZ:kn,scale:yp,scaleX:yp,scaleY:yp,scaleZ:yp,skew:kn,skewX:kn,skewY:kn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:Ga,originX:tv,originY:tv,originZ:ue};var vl={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,...rD,zIndex:NS,fillOpacity:Ga,strokeOpacity:Ga,numOctaves:NS};var oD={...vl,color:ut,backgroundColor:ut,outlineColor:ut,fill:ut,stroke:ut,borderColor:ut,borderTopColor:ut,borderRightColor:ut,borderBottomColor:ut,borderLeftColor:ut,filter:Ep,WebkitFilter:Ep},Ap=e=>oD[e];function Dp(e,t){let r=Ap(e);return r!==Ep&&(r=Cr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var $q=new Set(["auto","none","0"]);function nD(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!$q.has(a)&&Ji(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=Dp(r,n)}var Np=class extends qa{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(),cl(u))){let c=ES(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Mp.has(o)||t.length!==2)return;let[n,a]=t,i=DS(n),s=DS(a);if(i!==s)if(bS(i)&&bS(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else ts[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||tD(t[n]))&&o.push(n);o.length&&nD(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=ts[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]=ts[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 Op(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 Fp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function _p(e){return ap(e)&&"offsetHeight"in e}var aD=30,Kq=e=>!isNaN(parseFloat(e)),xl={current:void 0},gv=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=Kq(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 za);let o=this.events[t].add(r);return t==="change"?()=>{o(),Le.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 xl.current&&xl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=wt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>aD)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,aD);return sp(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 ro(e,t){return new gv(e,t)}var{schedule:yl,cancel:Xq}=Zh(queueMicrotask,!1);var Wo={x:!1,y:!1};function hv(){return Wo.x||Wo.y}function OS(e){return e==="x"||e==="y"?Wo[e]?null:(Wo[e]=!0,()=>{Wo[e]=!1}):Wo.x||Wo.y?null:(Wo.x=Wo.y=!0,()=>{Wo.x=Wo.y=!1})}function vv(e,t){let r=Op(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function iD(e){return!(e.pointerType==="touch"||hv())}function FS(e,t,r={}){let[o,n,a]=vv(e,r),i=s=>{if(!iD(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{iD(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var _S=(e,t)=>t?e===t?!0:_S(e,t.parentElement):!1;var wl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Yq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sD(e){return Yq.has(e.tagName)||e.tabIndex!==-1}var fc=new WeakSet;function lD(e){return t=>{t.key==="Enter"&&e(t)}}function VS(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var uD=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=lD(()=>{if(fc.has(r))return;VS(r,"down");let n=lD(()=>{VS(r,"up")}),a=()=>VS(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 cD(e){return wl(e)&&!hv()}function BS(e,t,r={}){let[o,n,a]=vv(e,r),i=s=>{let l=s.currentTarget;if(!cD(s))return;fc.add(l);let u=t(l,s),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),fc.has(l)&&fc.delete(l),cD(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||_S(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),_p(s)&&(s.addEventListener("focus",u=>uD(u,n)),!sD(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Cl(e){return ap(e)&&"ownerSVGElement"in e}function Vp(e){return Cl(e)&&e.tagName==="svg"}function HS(...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=lv(n,a,i);return t?s(o):s}var Be=e=>!!(e&&e.getVelocity);var Qq=[...AS,ut,Cr],US=e=>Qq.find(mv(e));var xv=b(M(),1),$a=b(M(),1);var dD=b(M(),1),rs=(0,dD.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var pD=b(M(),1);function fD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zq(...e){return t=>{let r=!1,o=e.map(n=>{let a=fD(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():fD(e[n],null)}}}}function mD(...e){return pD.useCallback(Zq(...e),e)}var zS=class extends xv.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=_p(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 hD({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,$a.useId)(),a=(0,$a.useRef)(null),i=(0,$a.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,$a.useContext)(rs),l=mD(a,e?.ref);return(0,$a.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 x=o??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,12 +16,12 @@ 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,Mk.jsx)(Kw,{isPresent:t,childRef:a,sizeRef:i,children:oh.cloneElement(e,{ref:l})})}var Dk=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=Gn(OG),c=(0,Gf.useId)(),d=!0,f=(0,Gf.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,Gf.useMemo)(()=>{u.forEach((p,m)=>u.set(m,!1))},[r]),Ak.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,Xw.jsx)(Ek,{isPresent:r,anchorX:s,root:l,children:e})),(0,Xw.jsx)(Li.Provider,{value:f,children:e})};function OG(){return new Map}var Ni=R(E(),1);function nh(e=!0){let t=(0,Ni.useContext)(Li);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,Ni.useId)();(0,Ni.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,Ni.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var ah=R(E(),1),Wf=e=>e.key||"";function Yw(e){let t=[];return ah.Children.forEach(e,r=>{(0,ah.isValidElement)(r)&&t.push(r)}),t}var Ra=({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]=nh(i),d=(0,jn.useMemo)(()=>Yw(e),[e]),f=i&&!u?[]:d.map(Wf),p=(0,jn.useRef)(!0),m=(0,jn.useRef)(d),g=Gn(()=>new Map),[y,h]=(0,jn.useState)(d),[v,x]=(0,jn.useState)(d);Cu(()=>{p.current=!1,m.current=d;for(let S=0;S<v.length;S++){let b=Wf(v[S]);f.includes(b)?g.delete(b):g.get(b)!==!0&&g.set(b,!1)}},[v,f.length,f.join("-")]);let w=[];if(d!==y){let S=[...d];for(let b=0;b<v.length;b++){let I=v[b],T=Wf(I);f.includes(T)||(S.splice(b,0,I),w.push(I))}return a==="wait"&&w.length&&(S=w),x(Yw(S)),h(d),null}let{forceRender:C}=(0,jn.useContext)(yu);return(0,qf.jsx)(qf.Fragment,{children:v.map(S=>{let b=Wf(S),I=i&&!u?!1:d===v||f.includes(b),T=()=>{if(g.has(b))g.set(b,!0);else return;let P=!0;g.forEach(k=>{k||(P=!1)}),P&&(C?.(),x(m.current),i&&c?.(),o&&o())};return(0,qf.jsx)(Dk,{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:S},b)})})};var Nk=R(E(),1),ih=(0,Nk.createContext)({strict:!1});var Ok={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"]},Ia={};for(let e in Ok)Ia[e]={isEnabled:t=>Ok[e].some(r=>!!t[r])};function Fk(e){for(let t in e)Ia[t]={...Ia[t],...e[t]}}var FG=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 jf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||FG.has(e)}var _k=e=>!jf(e);function _G(e){typeof e=="function"&&(_k=t=>t.startsWith("on")?!jf(t):e(t))}try{_G(JH("@emotion/is-prop-valid").default)}catch{}function Vk(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(_k(n)||r===!0&&jf(n)||!t&&!jf(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var xh=R(D(),1);var Vu=R(E(),1);var Bk=R(E(),1),Oi=(0,Bk.createContext)({});var uh=R(E(),1);function Fi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function La(e){return typeof e=="string"||Array.isArray(e)}var sh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$f=["initial",...sh];function Ks(e){return Fi(e.animate)||$f.some(t=>La(e[t]))}function lh(e){return!!(Ks(e)||e.variants)}function Hk(e,t){if(Ks(e)){let{initial:r,animate:o}=e;return{initial:r===!1||La(r)?r:void 0,animate:La(o)?o:void 0}}return e.inherit!==!1?t:{}}function zk(e){let{initial:t,animate:r}=Hk(e,(0,uh.useContext)(Oi));return(0,uh.useMemo)(()=>({initial:t,animate:r}),[Uk(t),Uk(r)])}function Uk(e){return Array.isArray(e)?e.join(" "):e}var Du=R(E(),1);var qk=R(E(),1);var Xs={};function Gk(e){for(let t in e)Xs[t]=e[t],Os(t)&&(Xs[t].isCSSVariable=!0)}function ch(e,{layout:t,layoutId:r}){return so.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Xs[e]||e==="opacity")}var VG={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BG=fn.length;function Wk(e,t,r){let o="",n=!0;for(let a=0;a<BG;a++){let i=fn[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=Hf(s,Gs[i]);if(!l){n=!1;let c=VG[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function Mu(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(so.has(l)){i=!0;continue}else if(Os(l)){n[l]=u;continue}else{let c=Hf(u,Gs[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=Wk(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 Eu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qw(e,t,r){for(let o in t)!Ve(t[o])&&!ch(o,r)&&(e[o]=t[o])}function HG({transformTemplate:e},t){return(0,qk.useMemo)(()=>{let r=Eu();return Mu(r,t,e),Object.assign({},r.vars,r.style)},[t])}function UG(e,t){let r=e.style||{},o={};return Qw(o,r,e),Object.assign(o,HG(e,t)),o}function jk(e,t){let r={},o=UG(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 Kk=R(E(),1);var zG={offset:"stroke-dashoffset",array:"stroke-dasharray"},GG={offset:"strokeDashoffset",array:"strokeDasharray"};function $k(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?zG:GG;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(Mu(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&&$k(d,n,a,i,!1)}var fh=()=>({...Eu(),attrs:{}});var ph=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Xk(e,t,r,o){let n=(0,Kk.useMemo)(()=>{let a=fh();return dh(a,t,ph(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};Qw(a,e.style,e),n.style={...a,...n.style}}return n}var Yk=["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 Au(e){return typeof e!="string"||e.includes("-")?!1:!!(Yk.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qk(e,t,r,{latestValues:o},n,a=!1){let s=(Au(e)?Xk:jk)(t,o,n,e),l=Vk(t,typeof e=="string",a),u=e!==Du.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,Du.useMemo)(()=>Ve(c)?c.get():c,[c]);return(0,Du.createElement)(e,{...u,children:d})}var Zw=R(E(),1);function Zk(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function Nu(e,t,r,o){if(typeof t=="function"){let[n,a]=Zk(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]=Zk(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function Ou(e){return Ve(e)?e.get():e}function WG({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:qG(r,o,n,e),renderState:t()}}function qG(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=Ou(a[f]);let{initial:i,animate:s}=e,l=Ks(e),u=lh(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"&&!Fi(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=Nu(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 mh=e=>(t,r)=>{let o=(0,Zw.useContext)(Oi),n=(0,Zw.useContext)(Li),a=()=>WG(e,t,o,n);return r?a():Gn(a)};function Fu(e,t,r){let{style:o}=e,n={};for(let a in o)(Ve(o[a])||t.style&&Ve(t.style[a])||ch(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var Jk=mh({scrapeMotionValuesFromProps:Fu,createRenderState:Eu});function gh(e,t,r){let o=Fu(e,t,r);for(let n in e)if(Ve(e[n])||Ve(t[n])){let a=fn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var eM=mh({scrapeMotionValuesFromProps:gh,createRenderState:fh});var tM=Symbol.for("motionComponentSymbol");var rM=R(E(),1);function Pa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function oM(e,t,r){return(0,rM.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Pa(r)&&(r.current=o))},[t])}var qr=R(E(),1);var _u=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var jG="framerAppearId",hh="data-"+_u(jG);var nM=R(E(),1),vh=(0,nM.createContext)({});function aM(e,t,r,o,n){let{visualElement:a}=(0,qr.useContext)(Oi),i=(0,qr.useContext)(ih),s=(0,qr.useContext)(Li),l=(0,qr.useContext)(Di).reducedMotion,u=(0,qr.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,qr.useContext)(vh);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&$G(u.current,r,n,d);let f=(0,qr.useRef)(!1);(0,qr.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[hh],m=(0,qr.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Cu(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),(0,qr.useEffect)(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),m.current=!1),c.enteringChildren=void 0)}),c}function $G(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:iM(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Pa(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function iM(e){if(e)return e.options.allowProjection!==!1?e.projection:iM(e.parent)}function yh(e,{forwardMotionProps:t=!1}={},r,o){r&&Fk(r);let n=Au(e)?eM:Jk;function a(s,l){let u,c={...(0,Vu.useContext)(Di),...s,layoutId:KG(s)},{isStatic:d}=c,f=zk(s),p=n(s,d);if(!d&&wu){XG(c,r);let m=YG(c);u=m.MeasureLayout,f.visualElement=aM(e,p,c,o,m.ProjectionNode)}return(0,xh.jsxs)(Oi.Provider,{value:f,children:[u&&f.visualElement?(0,xh.jsx)(u,{visualElement:f.visualElement,...c}):null,Qk(e,s,oM(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,Vu.forwardRef)(a);return i[tM]=e,i}function KG({layoutId:e}){let t=(0,Vu.useContext)(yu).id;return t&&e!==void 0?t+"-"+e:e}function XG(e,t){let r=(0,Vu.useContext)(ih).strict}function YG(e){let{drag:t,layout:r}=Ia;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sM(e,t){if(typeof Proxy>"u")return yh;let r=new Map,o=(a,i)=>yh(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,yh(i,void 0,e,t)),r.get(i))})}var bM=R(E(),1);function wh({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function lM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function uM(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 Jw(e){return e===void 0||e===1}function Ch({scale:e,scaleX:t,scaleY:r}){return!Jw(e)||!Jw(t)||!Jw(r)}function Ta(e){return Ch(e)||eC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eC(e){return cM(e.x)||cM(e.y)}function cM(e){return e&&e!=="0%"}function Kf(e,t,r){let o=e-r,n=t*o;return r+n}function dM(e,t,r,o,n){return n!==void 0&&(e=Kf(e,n,o)),Kf(e,r,o)+t}function tC(e,t=0,r=1,o,n){e.min=dM(e.min,t,r,o,n),e.max=dM(e.max,t,r,o,n)}function rC(e,{x:t,y:r}){tC(e.x,t.translate,t.scale,t.originPoint),tC(e.y,r.translate,r.scale,r.originPoint)}var fM=.999999999999,pM=1.0000000000001;function gM(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&&Ys(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,rC(e,i)),o&&Ta(a.latestValues)&&Ys(e,a.latestValues))}t.x<pM&&t.x>fM&&(t.x=1),t.y<pM&&t.y>fM&&(t.y=1)}function _i(e,t){e.min=e.min+t,e.max=e.max+t}function mM(e,t,r,o,n=.5){let a=ke(e.min,e.max,n);tC(e,t,r,a,o)}function Ys(e,t){mM(e.x,t.x,t.scaleX,t.scale,t.originX),mM(e.y,t.y,t.scaleY,t.scale,t.originY)}function oC(e,t){return wh(uM(e.getBoundingClientRect(),t))}function hM(e,t,r){let o=oC(e,r),{scroll:n}=t;return n&&(_i(o.x,n.offset.x),_i(o.y,n.offset.y)),o}var vM=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qs=()=>({x:vM(),y:vM()}),xM=()=>({min:0,max:0}),$e=()=>({x:xM(),y:xM()});var Xf={current:null},Sh={current:!1};function yM(){if(Sh.current=!0,!!wu)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xf.current=e.matches;e.addEventListener("change",t),t()}else Xf.current=!1}var Vi=new WeakMap;function wM(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Ve(n))e.addValue(o,n);else if(Ve(a))e.addValue(o,Wr(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,Wr(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var CM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Bu=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=Sa,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,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=Ks(r),this.isVariantNode=lh(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&&Ve(p)&&p.set(l[f])}}mount(t){this.current=t,Vi.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),Sh.current||yM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xf.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),fr(this.notifyUpdate),fr(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=so.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 Ia){let r=Ia[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):$e()}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<CM.length;o++){let n=CM[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=wM(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=Wr(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"&&(lf(o)||cf(o))?o=parseFloat(o):!$w(o)&&mr.test(r)&&(o=_f(t,r)),this.setBaseTarget(t,Ve(o)?o.get():o)),Ve(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=Nu(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&&!Ve(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 xa),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){qs.render(this.render)}};var Hu=class extends Bu{constructor(){super(...arguments),this.KeyframeResolver=Vf}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;Ve(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function bh(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 QG(e){return window.getComputedStyle(e)}var Uu=class extends Hu{constructor(){super(...arguments),this.type="html",this.renderInstance=bh}readValueFromInstance(t,r){if(so.has(r))return this.projection?.isProjecting?Mf(r):Tw(t,r);{let o=QG(t),n=(Os(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return oC(t,r)}build(t,r,o){Mu(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return Fu(t,r,o)}};var Rh=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 SM(e,t,r,o){bh(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(Rh.has(n)?n:_u(n),t.attrs[n])}var zu=class extends Hu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(so.has(r)){let o=Ff(r);return o&&o.default||0}return r=Rh.has(r)?r:_u(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return gh(t,r,o)}build(t,r,o){dh(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){SM(t,r,o,n)}mount(t){this.isSVGTag=ph(t.tagName),super.mount(t)}};var RM=(e,t)=>Au(e)?new zu(t):new Uu(t,{allowProjection:e!==bM.Fragment});function $n(e,t,r){let o=e.getProps();return Nu(o,t,r!==void 0?r:o.custom,e)}var Yf=e=>Array.isArray(e);function ZG(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Wr(r))}function JG(e){return Yf(e)?e[e.length-1]||0:e}function IM(e,t){let r=$n(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=JG(a[i]);ZG(e,i,s)}}function LM(e){return!!(Ve(e)&&e.add)}function Qf(e,t){let r=e.getValue("willChange");if(LM(r))return r.add(t);if(!r&&dr.WillChange){let o=new dr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Ih(e){return e.props[hh]}var eW=e=>e!==null;function PM(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(eW),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var tW={type:"spring",stiffness:500,damping:25,restSpeed:10},rW=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),oW={type:"keyframes",duration:.8},nW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TM=(e,{keyframes:t})=>t.length>2?oW:so.has(e)?e.startsWith("scale")?rW(t[1]):tW:nW;function kM({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 Gu=(e,t,r,o={},n,a)=>i=>{let s=zs(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-bt(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};kM(s)||Object.assign(c,TM(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)&&(Tu(c),c.delay===0&&(d=!0)),(dr.instantAnimations||dr.skipAnimations)&&(d=!0,Tu(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=PM(c.keyframes,s);if(f!==void 0){Pe.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new Ca(c):new Af(c)};function aW({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function Wu(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&&aW(u,c))continue;let p={delay:r,...zs(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=Ih(e);if(h){let v=window.MotionHandoffAnimation(h,c,Pe);v!==null&&(p.startTime=v,g=!0)}}Qf(e,c),d.start(Gu(c,d,f,e.shouldReduceMotion&&Nf.has(c)?{type:!1}:p,e,g));let y=d.animation;y&&l.push(y)}return i&&Promise.all(l).then(()=>{Pe.update(()=>{i&&IM(e,i)})}),l}function Lh(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 Ph(e,t,r={}){let o=$n(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(Wu(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return iW(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 iW(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(Ph(l,t,{...i,delay:r+(typeof o=="function"?0:o)+Lh(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function MM(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>Ph(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=Ph(e,t,r);else{let n=typeof t=="function"?$n(e,t,r.custom):t;o=Promise.all(Wu(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function nC(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 sW=$f.length;function aC(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?aC(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<sW;r++){let o=$f[r],n=e.props[o];(La(n)||n===!1)&&(t[o]=n)}return t}var lW=[...sh].reverse(),uW=sh.length;function cW(e){return t=>Promise.all(t.map(({animation:r,options:o})=>MM(e,r,o)))}function AM(e){let t=cW(e),r=EM(),o=!0,n=l=>(u,c)=>{let d=$n(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=aC(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let y=0;y<uW;y++){let h=lW[y],v=r[h],x=u[h]!==void 0?u[h]:c[h],w=La(x),C=h===l?v.isActive:null;C===!1&&(m=y);let S=x===c[h]&&x!==u[h]&&w;if(S&&o&&e.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...p},!v.isActive&&C===null||!x&&!v.prevProp||Fi(x)||typeof x=="boolean")continue;let b=dW(v.prevProp,x),I=b||h===l&&v.isActive&&!S&&w||y>m&&w,T=!1,P=Array.isArray(x)?x:[x],k=P.reduce(n(h),{});C===!1&&(k={});let{prevResolvedValues:A={}}=v,F={...A,...k},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=k[U],M=A[U];if(p.hasOwnProperty(U))continue;let J=!1;Yf(V)&&Yf(M)?J=!nC(V,M):J=V!==M,J?V!=null?N(U):f.add(U):V!==void 0&&f.has(U)?N(U):v.protectedKeys[U]=!0}v.prevProp=x,v.prevResolvedValues=k,v.isActive&&(p={...p,...k}),o&&e.blockInitialAnimation&&(I=!1);let H=S&&b;I&&(!H||T)&&d.push(...P.map(U=>{let V={type:h};if(typeof U=="string"&&o&&!H&&e.manuallyAnimateOnMount&&e.parent){let{parent:M}=e,J=$n(M,U);if(M.enteringChildren&&J){let{delayChildren:ae}=J.transition||{};V.delay=Lh(M.enteringChildren,e,ae)}}return{animation:U,options:V}}))}if(f.size){let y={};if(typeof u.initial!="boolean"){let h=$n(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=EM()}}}function dW(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nC(t,e):!1}function Zs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function EM(){return{animate:Zs(!0),whileInView:Zs(),whileHover:Zs(),whileTap:Zs(),whileDrag:Zs(),whileFocus:Zs(),exit:Zs()}}var Wt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Th=class extends Wt{constructor(t){super(t),t.animationState||(t.animationState=AM(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Fi(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 fW=0,kh=class extends Wt{constructor(){super(...arguments),this.id=fW++}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 DM={animation:{Feature:Th},exit:{Feature:kh}};function ka(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function Ma(e){return{point:{x:e.pageX,y:e.pageY}}}var NM=e=>t=>js(t)&&e(t,Ma(t));function Bi(e,t,r,o){return ka(e,t,NM(r),o)}var VM=1e-4,pW=1-VM,mW=1+VM,BM=.01,gW=0-BM,hW=0+BM;function Ft(e){return e.max-e.min}function HM(e,t,r){return Math.abs(e-t)<=r}function OM(e,t,r,o=.5){e.origin=o,e.originPoint=ke(t.min,t.max,e.origin),e.scale=Ft(r)/Ft(t),e.translate=ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=pW&&e.scale<=mW||isNaN(e.scale))&&(e.scale=1),(e.translate>=gW&&e.translate<=hW||isNaN(e.translate))&&(e.translate=0)}function qu(e,t,r,o){OM(e.x,t.x,r.x,o?o.originX:void 0),OM(e.y,t.y,r.y,o?o.originY:void 0)}function FM(e,t,r){e.min=r.min+t.min,e.max=e.min+Ft(t)}function UM(e,t,r){FM(e.x,t.x,r.x),FM(e.y,t.y,r.y)}function _M(e,t,r){e.min=t.min-r.min,e.max=e.min+Ft(t)}function ju(e,t,r){_M(e.x,t.x,r.x),_M(e.y,t.y,r.y)}function jr(e){return[e("x"),e("y")]}var Mh=({current:e})=>e?e.ownerDocument.defaultView:null;var zM=(e,t)=>Math.abs(e-t);function GM(e,t){let r=zM(e.x,t.x),o=zM(e.y,t.y);return Math.sqrt(r**2+o**2)}var $u=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=sC(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=GM(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;let{point:g}=f,{timestamp:y}=xt;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=iC(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=sC(f.type==="pointercancel"?this.lastMoveEventInfo:iC(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,h),g&&g(f,h)},!js(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=Ma(t),l=iC(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=xt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,sC(l,this.history)),this.removeListeners=un(Bi(this.contextWindow,"pointermove",this.handlePointerMove),Bi(this.contextWindow,"pointerup",this.handlePointerUp),Bi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fr(this.updatePoint)}};function iC(e,t){return t?{point:t(e.point)}:e}function WM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sC({point:e},t){return{point:e,delta:WM(e,qM(t)),offset:WM(e,vW(t)),velocity:xW(t,.1)}}function vW(e){return e[0]}function qM(e){return e[e.length-1]}function xW(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=qM(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>bt(t)));)r--;if(!o)return{x:0,y:0};let a=Ot(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 YM(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 jM(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 QM(e,{top:t,left:r,bottom:o,right:n}){return{x:jM(e.x,r,n),y:jM(e.y,t,o)}}function $M(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 ZM(e,t){return{x:$M(e.x,t.x),y:$M(e.y,t.y)}}function JM(e,t){let r=.5,o=Ft(e),n=Ft(t);return n>o?r=Eo(t.min,t.max-o,e.min):o>n&&(r=Eo(e.min,e.max-n,t.min)),Gt(0,1,r)}function eE(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 Eh=.35;function tE(e=Eh){return e===!1?e=0:e===!0&&(e=Eh),{x:KM(e,"left","right"),y:KM(e,"top","bottom")}}function KM(e,t,r){return{min:XM(e,t),max:XM(e,r)}}function XM(e,t){return typeof e=="number"?e:e[t]||0}var yW=new WeakMap,Dh=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: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(Ma(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Uw(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),jr(h=>{let v=this.getAxisMotionValue(h).get()||0;if(pr.test(v)){let{projection:x}=this.visualElement;if(x&&x.layout){let w=x.layout.layoutBox[h];w&&(v=Ft(w)*(parseFloat(v)/100))}}this.originPoint[h]=v}),g&&Pe.postRender(()=>g(d,f)),Qf(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=wW(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=()=>jr(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new $u(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:Mh(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||!Ah(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=YM(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&&Pa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=QM(o.layoutBox,t):this.constraints=!1,this.elastic=tE(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&jr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=eE(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Pa(t))return!1;let o=t.current;Jt(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=hM(o,n.root,this.visualElement.getTransformPagePoint()),i=ZM(n.layout.layoutBox,a);if(r){let s=r(lM(i));this.hasMutatedConstraints=!!s,s&&(i=wh(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=jr(c=>{if(!Ah(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 Qf(this.visualElement,t),o.start(Gu(t,o,0,r,this.visualElement,!1))}stopAnimation(){jr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jr(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){jr(r=>{let{drag:o}=this.getProps();if(!Ah(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(!Pa(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};jr(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=JM({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(),jr(i=>{if(!Ah(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;yW.set(this.visualElement,this);let t=this.visualElement.current,r=Bi(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Pa(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=ka(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(jr(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=Eh,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Ah(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function wW(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Nh=class extends Wt{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new Dh(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 rE=e=>(t,r)=>{e&&Pe.postRender(()=>e(t,r))},Oh=class extends Wt{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new $u(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Mh(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:rE(t),onStart:rE(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&Pe.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=Bi(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 aE=R(D(),1);var Zf=R(E(),1);var Ku={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function oE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Xu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let r=oE(e,t.target.x),o=oE(e,t.target.y);return`${r}% ${o}%`}};var nE={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=mr.parse(e);if(n.length>5)return o;let a=mr.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 lC=!1,uC=class extends Zf.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;Gk(CW),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),lC&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Ku.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,lC=!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(),qs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;lC=!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 Fh(e){let[t,r]=nh(),o=(0,Zf.useContext)(yu);return(0,aE.jsx)(uC,{...e,layoutGroup:o,switchLayoutGroup:(0,Zf.useContext)(vh),isPresent:t,safeToRemove:r})}var CW={borderRadius:{...Xu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xu,borderTopRightRadius:Xu,borderBottomLeftRadius:Xu,borderBottomRightRadius:Xu,boxShadow:nE};function _h(e,t,r){let o=Ve(e)?e:Wr(e);return o.start(Gu("",o,t,r)),o.animation}var iE=(e,t)=>e.depth-t.depth;var Vh=class{constructor(){this.children=[],this.isDirty=!1}add(t){Ds(this.children,t),this.isDirty=!0}remove(t){ln(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iE),this.isDirty=!1,this.children.forEach(t)}};function sE(e,t){let r=yt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(fr(o),e(a-t))};return Pe.setup(o,!0),()=>fr(o)}var dE=["TopLeft","TopRight","BottomLeft","BottomRight"],SW=dE.length,lE=e=>typeof e=="string"?parseFloat(e):e,uE=e=>typeof e=="number"||ue.test(e);function fE(e,t,r,o,n,a){n?(e.opacity=ke(0,r.opacity??1,bW(o)),e.opacityExit=ke(t.opacity??1,0,RW(o))):a&&(e.opacity=ke(t.opacity??1,r.opacity??1,o));for(let i=0;i<SW;i++){let s=`border${dE[i]}Radius`,l=cE(t,s),u=cE(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||uE(l)===uE(u)?(e[s]=Math.max(ke(lE(l),lE(u),o),0),(pr.test(u)||pr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=ke(t.rotate||0,r.rotate||0,o))}function cE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var bW=pE(0,.5,gf),RW=pE(.5,.95,mt);function pE(e,t,r){return o=>o<e?0:o>t?1:r(Eo(e,t,o))}function mE(e,t){e.min=t.min,e.max=t.max}function lo(e,t){mE(e.x,t.x),mE(e.y,t.y)}function cC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function gE(e,t,r,o,n){return e-=t,e=Kf(e,1/r,o),n!==void 0&&(e=Kf(e,1/n,o)),e}function IW(e,t=0,r=1,o=.5,n,a=e,i=e){if(pr.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=gE(e.min,t,r,s,n),e.max=gE(e.max,t,r,s,n)}function hE(e,t,[r,o,n],a,i){IW(e,t[r],t[o],t[n],t.scale,a,i)}var LW=["x","scaleX","originX"],PW=["y","scaleY","originY"];function dC(e,t,r,o){hE(e.x,t,LW,r?r.x:void 0,o?o.x:void 0),hE(e.y,t,PW,r?r.y:void 0,o?o.y:void 0)}function vE(e){return e.translate===0&&e.scale===1}function fC(e){return vE(e.x)&&vE(e.y)}function xE(e,t){return e.min===t.min&&e.max===t.max}function wE(e,t){return xE(e.x,t.x)&&xE(e.y,t.y)}function yE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pC(e,t){return yE(e.x,t.x)&&yE(e.y,t.y)}function mC(e){return Ft(e.x)/Ft(e.y)}function gC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Bh=class{constructor(){this.members=[]}add(t){Ds(this.members,t),t.scheduleRender()}remove(t){if(ln(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 CE(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 Js={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},hC=["","X","Y","Z"],TW=1e3,kW=0;function vC(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function ME(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=Ih(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&&ME(o)}function Hh({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=kW++,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,Gr.value&&(Js.nodes=Js.calculatedTargetDeltas=Js.calculatedProjections=0),this.nodes.forEach(AW),this.nodes.forEach(FW),this.nodes.forEach(_W),this.nodes.forEach(DW),Gr.addProjectionMetrics&&Gr.addProjectionMetrics(Js)},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 Vh)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new xa),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=$s(i)&&!zf(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=sE(f,250),Ku.hasAnimatedSinceResize&&(Ku.hasAnimatedSinceResize=!1,this.nodes.forEach(RE)))})}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()||zW,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),h=!this.targetLayout||!pC(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={...zs(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||RE(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(),fr(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(VW),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&&ME(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(SE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(OW),this.nodes.forEach(MW),this.nodes.forEach(EW)):this.nodes.forEach(bE),this.clearAllSnapshots();let s=yt.now();xt.delta=Gt(0,1e3/60,s-xt.timestamp),xt.timestamp=s,xt.isProcessing=!0,Sf.update.process(xt),Sf.preRender.process(xt),Sf.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NW),this.sharedNodes.forEach(BW)}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&&!Ft(this.snapshot.measuredBox.x)&&!Ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let 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=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&&!fC(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Ta(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)),GW(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(WW))){let{scroll:u}=this.root;u&&(_i(s.x,u.offset.x),_i(s.y,u.offset.y))}return s}removeElementScroll(i){let s=$e();if(lo(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&&lo(s,i),_i(s.x,c.offset.x),_i(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=$e();lo(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&&Ys(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ta(c.latestValues)&&Ys(l,c.latestValues)}return Ta(this.latestValues)&&Ys(l,this.latestValues),l}removeTransform(i){let s=$e();lo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Ta(u.latestValues))continue;Ch(u.latestValues)&&u.updateSnapshot();let c=$e(),d=u.measurePageBox();lo(c,d),dC(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ta(this.latestValues)&&dC(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(),ju(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),lo(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(),UM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):lo(this.target,this.layout.layoutBox),rC(this.target,this.targetDelta)):lo(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(),ju(this.relativeTargetOrigin,this.target,f.target),lo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Gr.value&&Js.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ch(this.parent.latestValues)||eC(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;lo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;gM(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():(cC(this.prevProjectionDelta.x,this.projectionDelta.x),cC(this.prevProjectionDelta.y,this.projectionDelta.y)),qu(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!gC(this.projectionDelta.x,this.prevProjectionDelta.x)||!gC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Gr.value&&Js.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=Qs(),this.projectionDelta=Qs(),this.projectionDeltaWithTransform=Qs()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Qs();(!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,y=this.getStack(),h=!y||y.members.length<=1,v=!!(g&&!h&&this.options.crossfade===!0&&!this.path.some(UW));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let C=w/1e3;IE(d.x,i.x,C),IE(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ju(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),HW(this.relativeTarget,this.relativeTargetOrigin,f,C),x&&wE(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=$e()),lo(x,this.relativeTarget)),g&&(this.animationValues=c,fE(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&&(fr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{Ku.hasAnimatedSinceResize=!0,cn.layout++,this.motionValue||(this.motionValue=Wr(0)),this.currentAnimation=_h(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{cn.layout--},onComplete:()=>{cn.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(TW),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&&EE(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$e();let d=Ft(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Ft(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}lo(s,l),Ys(s,c),qu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Bh),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&&vC("z",i,u,this.animationValues);for(let c=0;c<hC.length;c++)vC(`rotate${hC[c]}`,i,u,this.animationValues),vC(`skew${hC[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=Ou(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=Ou(s?.pointerEvents)||""),this.hasProjected&&!Ta(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=CE(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 Xs){if(c[m]===void 0)continue;let{correct:g,applyTo:y,isCSSVariable:h}=Xs[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?Ou(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(SE),this.root.sharedNodes.clear()}}}function MW(e){e.updateLayout()}function EW(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"?jr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ft(d);d.min=r[c].min,d.max=d.min+f}):EE(n,t.layoutBox,r)&&jr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ft(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=Qs();qu(i,r,t.layoutBox);let s=Qs();a?qu(s,e.applyTransform(o,!0),t.measuredBox):qu(s,r,t.layoutBox);let l=!fC(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();ju(p,t.layoutBox,d.layoutBox);let m=$e();ju(m,r,f.layoutBox),pC(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 AW(e){Gr.value&&Js.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 DW(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NW(e){e.clearSnapshot()}function SE(e){e.clearMeasurements()}function bE(e){e.isLayoutDirty=!1}function OW(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function RE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FW(e){e.resolveTargetDelta()}function _W(e){e.calcProjection()}function VW(e){e.resetSkewAndRotation()}function BW(e){e.removeLeadSnapshot()}function IE(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 LE(e,t,r,o){e.min=ke(t.min,r.min,o),e.max=ke(t.max,r.max,o)}function HW(e,t,r,o){LE(e.x,t.x,r.x,o),LE(e.y,t.y,r.y,o)}function UW(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var zW={duration:.45,ease:[.4,0,.1,1]},PE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),TE=PE("applewebkit/")&&!PE("chrome/")?Math.round:mt;function kE(e){e.min=TE(e.min),e.max=TE(e.max)}function GW(e){kE(e.x),kE(e.y)}function EE(e,t,r){return e==="position"||e==="preserve-aspect"&&!HM(mC(t),mC(r),.2)}function WW(e){return e!==e.root&&e.scroll?.wasRoot}var AE=Hh({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 xC={current:void 0},Uh=Hh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xC.current){let e=new AE({});e.mount(window),e.setOptions({layoutScroll:!0}),xC.current=e}return xC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var DE={pan:{Feature:Oh},drag:{Feature:Nh,ProjectionNode:Uh,MeasureLayout:Fh}};function NE(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,Ma(t)))}var zh=class extends Wt{mount(){let{current:t}=this.node;t&&(this.unmount=zw(t,(r,o)=>(NE(this.node,o,"Start"),n=>NE(this.node,n,"End"))))}unmount(){}};var Gh=class extends Wt{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=un(ka(this.node.current,"focus",()=>this.onFocus()),ka(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function OE(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,Ma(t)))}var Wh=class extends Wt{mount(){let{current:t}=this.node;t&&(this.unmount=qw(t,(r,o)=>(OE(this.node,o,"Start"),(n,{success:a})=>OE(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var wC=new WeakMap,yC=new WeakMap,qW=e=>{let t=wC.get(e.target);t&&t(e)},jW=e=>{e.forEach(qW)};function $W({root:e,...t}){let r=e||document;yC.has(r)||yC.set(r,{});let o=yC.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(jW,{root:e,...t})),o[n]}function FE(e,t,r){let o=$W(t);return wC.set(e,r),o.observe(e),()=>{wC.delete(e),o.unobserve(e)}}var KW={some:0,all:1},qh=class extends Wt{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:KW[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 FE(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(XW(t,r))&&this.startObserver()}unmount(){}};function XW({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var _E={inView:{Feature:qh},tap:{Feature:Wh},focus:{Feature:Gh},hover:{Feature:zh}};var VE={layout:{ProjectionNode:Uh,MeasureLayout:Fh}};var BE={...DM,..._E,...DE,...VE};var Be=sM(BE,RM);var Yu=R(E(),1);function Qu(e){let t=Gn(()=>Wr(e)),{isStatic:r}=(0,Yu.useContext)(Di);if(r){let[,o]=(0,Yu.useState)(e);(0,Yu.useEffect)(()=>t.on("change",o),[])}return t}function jh(e,t){let r=Qu(t()),o=()=>r.set(t());return o(),Cu(()=>{let n=()=>Pe.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),fr(o)}}),r}function HE(e){Ws.current=[],e();let t=jh(Ws.current,e);return Ws.current=void 0,t}function CC(e,t,r,o){if(typeof e=="function")return HE(e);let n=typeof t=="function"?t:jw(t,r,o);return Array.isArray(e)?UE(e,n):UE([e],([a])=>n(a))}function UE(e,t){let r=Gn(()=>[]);return jh(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function Jf(e){return typeof e=="object"&&!Array.isArray(e)}function $h(e,t,r,o){return typeof e=="string"&&Jf(t)?Bf(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function zE(e,t,r){return e*(t+1)}function SC(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 YW(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(ln(e,n),o--)}}function GE(e,t,r,o,n,a){YW(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,o[i]),easing:yf(r,i)})}function WE(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function qE(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var QW="easeInOut",ZW=20;function KE(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,SC(d,m.at,c,u));continue}let[g,y,h={}]=m;h.at!==void 0&&(d=SC(d,h.at,c,u));let v=0,x=(w,C,S,b=0,I=0)=>{let T=JW(w),{delay:P=0,times:k=kf(T),type:A="keyframes",repeat:F,repeatType:N,repeatDelay:H=0,...O}=C,{ease:U=t.ease||"easeOut",duration:V}=C,M=typeof P=="function"?P(b,I):P,J=T.length,ae=Us(A)?A:n?.[A||"keyframes"];if(J<=2&&ae){let X=100;if(J===2&&r6(T)){let ne=T[1]-T[0];X=Math.abs(ne)}let ce={...O};V!==void 0&&(ce.duration=bt(V));let z=Lf(ce,X,ae);U=z.ease,V=z.duration}V??(V=a);let _=d+M;k.length===1&&k[0]===0&&(k[1]=1);let Y=k.length-T.length;if(Y>0&&Tf(k,Y),T.length===1&&T.unshift(null),F){Jt(F<ZW,"Repeat count too high, must be less than 20","repeat-count-high"),V=zE(V,F);let X=[...T],ce=[...k];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++)k.push(ce[he]+(ne+1)),U.push(he===0?"linear":yf(z,he-1))}WE(k,F)}let re=_+V;GE(S,T,U,k,_,re),v=Math.max(M+V,v),f=Math.max(re,f)};if(Ve(g)){let w=jE(g,s);x(y,h,$E("default",w))}else{let w=$h(g,y,o,l),C=w.length;for(let S=0;S<C;S++){y=y,h=h;let b=w[S],I=jE(b,s);for(let T in y)x(y[T],e6(h,T),$E(T,I),S,C)}}c=d,d+=v}return s.forEach((p,m)=>{for(let g in p){let y=p[g];y.sort(qE);let h=[],v=[],x=[];for(let C=0;C<y.length;C++){let{at:S,value:b,easing:I}=y[C];h.push(b),v.push(Eo(0,f,S)),x.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),x.unshift(QW)),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 jE(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function $E(e,t){return t[e]||(t[e]=[]),t[e]}function JW(e){return Array.isArray(e)?e:[e]}function e6(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var t6=e=>typeof e=="number",r6=e=>e.every(t6);function o6(e,t){return e in t}var Kh=class extends Bu{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(o6(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 $e()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function XE(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=$s(e)&&!zf(e)?new zu(t):new Uu(t);r.mount(e),Vi.set(e,r)}function YE(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new Kh(t);r.mount(e),Vi.set(e,r)}function n6(e,t){return Ve(e)||typeof e=="number"||typeof e=="string"&&!Jf(t)}function Xh(e,t,r,o){let n=[];if(n6(e,t))n.push(_h(e,Jf(t)&&t.default||t,r&&(r.default||r)));else{let a=$h(e,t,o),i=a.length;Jt(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];Jt(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?XE:YE;Vi.has(l)||u(l);let c=Vi.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...Wu(c,{...t,transition:d},{}))}}return n}function QE(e,t,r){let o=[];return KE(e,t,r,{spring:wa}).forEach(({keyframes:a,transition:i},s)=>{o.push(...Xh(s,a,i))}),o}function a6(e){return Array.isArray(e)&&e.some(Array.isArray)}function ZE(e){function t(r,o,n){let a=[],i;if(a6(r))a=QE(r,o,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=Xh(r,o,u,e)}let s=new Df(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{ln(e.animations,s)})),s}return t}var bC=ZE();var fxe=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"}}),pn={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}},Yh={lift:{y:-2,transition:pn.smooth},scale:{scale:1.05,transition:pn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:pn.smooth},rotate:{rotate:2,transition:pn.bouncy}},JE={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},pxe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:pn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:pn.smooth}},mxe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:pn.smooth}}},gxe={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:pn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:pn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:pn.smooth}},eA={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var hxe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:pn.bouncy};var Hi=R(D()),tA=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"}}),rA=el.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"?Yh.scale:a==="glow"?Yh.glow:Yh.lift,whileTap:JE.scale};return(0,Hi.jsx)(Be.div,{ref:s,className:L("moonui-theme",tA({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,Hi.jsx)("div",{ref:s,className:L("moonui-theme",tA({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});rA.displayName="Card";var oA=el.forwardRef(({className:e,...t},r)=>(0,Hi.jsx)("div",{ref:r,className:L("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));oA.displayName="CardHeader";var nA=el.forwardRef(({className:e,...t},r)=>(0,Hi.jsx)("h3",{ref:r,className:L("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));nA.displayName="CardTitle";var aA=el.forwardRef(({className:e,...t},r)=>(0,Hi.jsx)("p",{ref:r,className:L("moonui-theme","text-sm text-muted-foreground",e),...t}));aA.displayName="CardDescription";var iA=el.forwardRef(({className:e,...t},r)=>(0,Hi.jsx)("div",{ref:r,className:L("moonui-theme","p-6 pt-0",e),...t}));iA.displayName="CardContent";var sA=el.forwardRef(({className:e,...t},r)=>(0,Hi.jsx)("div",{ref:r,className:L("moonui-theme","flex items-center p-6 pt-0",e),...t}));sA.displayName="CardFooter";var BA=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 er(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Qh(e,t){let r=Te(e);if(isNaN(t))return er(e,NaN);if(!t)return r;let o=r.getDate(),n=er(e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let a=n.getDate();return o>=a?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}var i6=Math.pow(10,8)*24*60*60*1e3,kxe=-i6,Zh=6048e5,lA=864e5;var s6=3600;var uA=s6*24,Mxe=uA*7,l6=uA*365.2425,u6=l6/12,Exe=u6*3;var c6={};function Kn(){return c6}function mn(e,t){let r=Kn(),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 tl(e){return mn(e,{weekStartsOn:1})}function Jh(e){let t=Te(e),r=t.getFullYear(),o=er(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=tl(o),a=er(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=tl(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Zu(e){let t=Te(e);return t.setHours(0,0,0,0),t}function RC(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 cA(e,t){let r=Zu(e),o=Zu(t),n=+r-RC(r),a=+o-RC(o);return Math.round((n-a)/lA)}function dA(e){let t=Jh(e),r=er(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),tl(r)}function fA(e){return er(e,Date.now())}function rl(e,t){let r=Zu(e),o=Zu(t);return+r==+o}function pA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ev(e){if(!pA(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function mA(e){let t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function tv(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 gA(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function hA(e){let t=Te(e),r=er(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function vA(e,t){let r=Kn(),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 d6={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"}},xA=(e,t,r)=>{let o,n=d6[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 f6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},p6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yA={date:rv({formats:f6,defaultWidth:"full"}),time:rv({formats:p6,defaultWidth:"full"}),dateTime:rv({formats:m6,defaultWidth:"full"})};var g6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wA=(e,t,r,o)=>g6[e];function Ju(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 h6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},v6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},x6={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"]},y6={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"]},w6={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"}},C6={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"}},S6=(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"},CA={ordinalNumber:S6,era:Ju({values:h6,defaultWidth:"wide"}),quarter:Ju({values:v6,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ju({values:x6,defaultWidth:"wide"}),day:Ju({values:y6,defaultWidth:"wide"}),dayPeriod:Ju({values:w6,defaultWidth:"wide",formattingValues:C6,defaultFormattingWidth:"wide"})};function ec(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)?R6(s,d=>d.test(i)):b6(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 b6(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function R6(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function SA(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 I6=/^(\d+)(th|st|nd|rd)?/i,L6=/\d+/i,P6={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},T6={any:[/^b/i,/^(a|c)/i]},k6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},M6={any:[/1/i,/2/i,/3/i,/4/i]},E6={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},A6={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]},D6={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},N6={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]},O6={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},F6={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}},bA={ordinalNumber:SA({matchPattern:I6,parsePattern:L6,valueCallback:e=>parseInt(e,10)}),era:ec({matchPatterns:P6,defaultMatchWidth:"wide",parsePatterns:T6,defaultParseWidth:"any"}),quarter:ec({matchPatterns:k6,defaultMatchWidth:"wide",parsePatterns:M6,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ec({matchPatterns:E6,defaultMatchWidth:"wide",parsePatterns:A6,defaultParseWidth:"any"}),day:ec({matchPatterns:D6,defaultMatchWidth:"wide",parsePatterns:N6,defaultParseWidth:"any"}),dayPeriod:ec({matchPatterns:O6,defaultMatchWidth:"any",parsePatterns:F6,defaultParseWidth:"any"})};var IC={code:"en-US",formatDistance:xA,formatLong:yA,formatRelative:wA,localize:CA,match:bA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function RA(e){let t=Te(e);return cA(t,hA(t))+1}function IA(e){let t=Te(e),r=+tl(t)-+dA(t);return Math.round(r/Zh)+1}function ov(e,t){let r=Te(e),o=r.getFullYear(),n=Kn(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=er(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=mn(i,t),l=er(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=mn(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function LA(e,t){let r=Kn(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=ov(e,t),a=er(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),mn(a,t)}function PA(e,t){let r=Te(e),o=+mn(r,t)-+LA(r,t);return Math.round(o/Zh)+1}function He(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Ea={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return He(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):He(r+1,2)},d(e,t){return He(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 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 r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return He(n,t.length)}};var tc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},LC={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 Ea.y(e,t)},Y:function(e,t,r,o){let n=ov(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return He(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):He(a,t.length)},R:function(e,t){let r=Jh(e);return He(r,t.length)},u:function(e,t){let r=e.getFullYear();return He(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 He(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 He(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 Ea.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 He(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=PA(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):He(n,t.length)},I:function(e,t,r){let o=IA(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):He(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ea.d(e,t)},D:function(e,t,r){let o=RA(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):He(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 He(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 He(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 He(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=tc.noon:o===0?n=tc.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=tc.evening:o>=12?n=tc.afternoon:o>=4?n=tc.morning:n=tc.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 Ea.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ea.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):He(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):He(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ea.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ea.s(e,t)},S:function(e,t){return Ea.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return kA(o);case"XXXX":case"XX":return ol(o);case"XXXXX":case"XXX":default:return ol(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return kA(o);case"xxxx":case"xx":return ol(o);case"xxxxx":case"xxx":default:return ol(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+TA(o,":");case"OOOO":default:return"GMT"+ol(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+TA(o,":");case"zzzz":default:return"GMT"+ol(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return He(o,t.length)},T:function(e,t,r){let o=e.getTime();return He(o,t.length)}};function TA(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+He(a,2)}function kA(e,t){return e%60===0?(e>0?"-":"+")+He(Math.abs(e)/60,2):ol(e,t)}function ol(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=He(Math.trunc(o/60),2),a=He(o%60,2);return r+n+t+a}var MA=(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"})}},EA=(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"})}},_6=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return MA(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}}",MA(o,t)).replace("{{time}}",EA(n,t))},AA={p:EA,P:_6};var V6=/^D+$/,B6=/^Y+$/,H6=["D","DD","YY","YYYY"];function DA(e){return V6.test(e)}function NA(e){return B6.test(e)}function OA(e,t,r){let o=U6(e,t,r);if(console.warn(o),H6.includes(e))throw new RangeError(o)}function U6(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 z6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,G6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W6=/^'([^]*?)'?$/,q6=/''/g,j6=/[a-zA-Z]/;function gn(e,t,r){let o=Kn(),n=r?.locale??o.locale??IC,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(!ev(s))throw new RangeError("Invalid time value");let l=t.match(G6).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=AA[d];return f(c,n.formatLong)}return c}).join("").match(z6).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:$6(c)};if(LC[d])return{isToken:!0,value:c};if(d.match(j6))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&&NA(d)||!r?.useAdditionalDayOfYearTokens&&DA(d))&&OA(d,t,String(e));let f=LC[d[0]];return f(s,d,n.localize,u)}).join("")}function $6(e){let t=e.match(W6);return t?t[1].replace(q6,"'"):e}function PC(e){return Te(e).getDay()}function FA(e,t){let r=Te(e),o=Te(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function _A(e){return rl(e,fA(e))}function VA(e,t){return Qh(e,-t)}var Tr=R(D());function ep({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]=BA.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(VA(c,1))},m=()=>{d(Qh(c,1))},g=S=>{if(!o?.(S)){if(e==="single")r?.(S);else if(e==="range"){let b=t;!b?.from||b.from&&b.to?r?.({from:S,to:void 0}):S<b.from?r?.({from:S,to:b.from}):r?.({from:b.from,to:S})}}},y=S=>{if(!t)return!1;if(e==="single")return rl(S,t);if(e==="range"){let b=t;return b.from&&b.to?S>=b.from&&S<=b.to:b.from?rl(S,b.from):!1}return!1},h=S=>{if(e!=="range"||!t)return!1;let b=t;return b.from?rl(S,b.from):!1},v=S=>{if(e!=="range"||!t)return!1;let b=t;return b.to?rl(S,b.to):!1},x=S=>{if(e!=="range"||!t)return!1;let b=t;return!b.from||!b.to?!1:S>b.from&&S<b.to},C=(()=>{let S=gA(c),b=mA(c),I=tv({start:S,end:b}),T=PC(S),P=[];if(T>0&&n){let N=mn(S),H=new Date(S);H.setDate(H.getDate()-1),P.push(...tv({start:N,end:H}))}let k=PC(b),A=[];if(k<6&&n){let N=new Date(b);N.setDate(N.getDate()+1);let H=vA(b);A.push(...tv({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,Tr.jsxs)("div",{className:L("moonui-theme","p-0",a),children:[(0,Tr.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Tr.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,Tr.jsx)(nn,{className:"h-5 w-5"})}),(0,Tr.jsx)("h2",{className:"text-base font-medium",children:gn(c,"MMMM yyyy")}),(0,Tr.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,Tr.jsx)(Lr,{className:"h-5 w-5"})})]}),(0,Tr.jsxs)("div",{className:"px-6 pb-4",children:[(0,Tr.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((S,b)=>(0,Tr.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:S.full,children:S.short},`weekday-${b}`))}),(0,Tr.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((S,b)=>{if(!S)return(0,Tr.jsx)("div",{className:"h-10 w-10"},`empty-${b}`);let I=!FA(S,c),T=o?.(S)||!1,P=y(S),k=_A(S),A=h(S),F=v(S),N=x(S);return(0,Tr.jsx)("button",{onClick:()=>g(S),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",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:gn(S,"d")},S.toISOString())})})]})]})}ep.displayName="Calendar";var nl=R(E());var Ui=R(D()),K6=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"},HA=(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},UA=nl.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=nl.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=K6(d);l(f);let p=f==="amex"?15:16,m=d.slice(0,p),g=HA(m,f);r?.(m,f),c.target.value=g};return(0,Ui.jsxs)("div",{className:"relative",children:[(0,Ui.jsx)(gr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:HA(t,s),onChange:u,className:L(o&&"pl-10",e),...a}),o&&(0,Ui.jsx)(_d,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});UA.displayName="CardNumberInput";var zA=nl.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,Ui.jsx)(gr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});zA.displayName="CardExpiryInput";var GA=nl.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,Ui.jsx)(gr,{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})});GA.displayName="CardCVCInput";var WA=nl.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,Ui.jsx)(gr,{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})});WA.displayName="CardZipInput";var Rt=R(E());var Do=R(E(),1);function X6(e){return Object.prototype.toString.call(e)==="[object Object]"}function qA(e){return X6(e)||Array.isArray(e)}function $A(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function nv(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}`:!qA(s)||!qA(l)?s===l:nv(s,l)})}function jA(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function KA(e,t){if(e.length!==t.length)return!1;let r=jA(e),o=jA(t);return r.every((n,a)=>{let i=o[a];return nv(n,i)})}function MC(e){return typeof e=="number"}function TC(e){return typeof e=="string"}function av(e){return typeof e=="boolean"}function XA(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return Math.abs(e)}function EC(e){return Math.sign(e)}function rp(e,t){return gt(e-t)}function Y6(e,t){if(e===0||t===0||gt(e)<=gt(t))return 0;let r=rp(gt(e),gt(t));return gt(r/e)}function Q6(e){return Math.round(e*100)/100}function op(e){return np(e).map(Number)}function hn(e){return e[ip(e)]}function ip(e){return Math.max(0,e.length-1)}function AC(e,t){return t===ip(e)}function YA(e,t=0){return Array.from(Array(e),(r,o)=>t+o)}function np(e){return Object.keys(e)}function QA(e,t){return[e,t].reduce((r,o)=>(np(o).forEach(n=>{let a=r[n],i=o[n],s=XA(a)&&XA(i);r[n]=s?QA(a,i):i}),r),{})}function kC(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Z6(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 TC(e)?r[e](l):e(t,l,u)}return{measure:i}}function ap(){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 J6(e,t,r,o){let n=ap(),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 eq(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 al(e=0,t=0){let r=gt(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 ZA(e,t,r){let{constrain:o}=al(0,e),n=e+1,a=i(t);function i(f){return r?gt((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 ZA(e,s(),r)}let d={get:s,set:l,add:u,clone:c};return d}function tq(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"],S={passive:!1},b=ap(),I=ap(),T=al(50,225).constrain(p.measure(20)),P={mouse:300,touch:400},k={mouse:500,touch:600},A=m?43:25,F=!1,N=0,H=0,O=!1,U=!1,V=!1,M=!1;function J(K){if(!v)return;function Ie(ie){(av(v)||v(K,ie))&&ce(ie)}let ee=t;b.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(){b.clear(),I.clear()}function _(){let K=M?r: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 re(){return(m?k:P)[M?"mouse":"touch"]}function X(K,Ie){let ee=d.add(EC(K)*-1),ie=c.byDistance(K,!m).distance;return m||gt(K)<T?ie:y&&Ie?ie*.5:c.byIndex(ee.get(),0).distance}function ce(K){let Ie=kC(K,o);M=Ie,V=m&&Ie&&!K.buttons&&F,F=rp(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(!kC(K,o)&&K.touches.length>=2)return ne(K);let ee=a.readPoint(K),ie=a.readPoint(K,x),ze=rp(ee,N),Ke=rp(ie,H);if(!U&&!M&&(!K.cancelable||(U=ze>Ke,!U)))return ne(K);let It=a.pointerMove(K);ze>g&&(V=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(It)),K.preventDefault()}function ne(K){let ee=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(K)*re(),ze=X(w(ie),ee),Ke=Y6(ie,ze),It=A-10*Ke,De=h+Ke/50;U=!1,O=!1,I.clear(),u.useDuration(It).useFriction(De),l.distance(ze,!m),M=!1,f.emit("pointerUp")}function he(K){V&&(K.stopPropagation(),K.preventDefault(),V=!1)}function xe(){return O}return{init:J,destroy:ae,pointerDown:xe}}function rq(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(kC(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&>(g)>.1?g:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function oq(){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 nq(e){function t(o){return e*(o/100)}return{measure:t}}function aq(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),S=w?u:c[C],b=f(w?e:o[C]);if(gt(b-S)>=.5){y.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(av(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 iq(e,t,r,o,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let S=o.get()-e.get(),b=!l,I=0;return b?(i=0,r.set(o),e.set(o),I=S):(r.set(e),i+=S/l,i*=u,c+=i,e.add(i),I=c-d),s=EC(I),d=c,C}function p(){let S=o.get()-t.get();return gt(S)<.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(S){return l=S,C}function w(S){return u=S,C}let C={direction:g,duration:m,velocity:y,seek:f,settled:p,useBaseFriction:v,useBaseDuration:h,useFriction:w,useDuration:x};return C}function sq(e,t,r,o,n){let a=n.measure(10),i=n.measure(50),s=al(.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=gt(e[m]-t.get()),y=r.get()-t.get(),h=s.constrain(g/i);r.subtract(y*h),!p&>(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 lq(e,t,r,o,n){let a=al(-t+e,0),i=d(),s=c(),l=f();function u(m,g){return rp(m,g)<=1}function c(){let m=i[0],g=hn(i),y=i.lastIndexOf(m),h=i.indexOf(g)+1;return al(y,h)}function d(){return r.map((m,g)=>{let{min:y,max:h}=a,v=a.constrain(m),x=!g,w=AC(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 uq(e,t,r){let o=t[0],n=r?o-e:hn(t);return{limit:al(n,o)}}function cq(e,t,r,o){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=al(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 dq(e){let{max:t,length:r}=e;function o(a){let i=a-t;return r?i/-r:0}return{get:o}}function fq(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(gt)}function f(){return o.map(g=>r[a]-g[a]).map(g=>-gt(g))}function p(){return s(u).map(g=>g[0]).map((g,y)=>g+l[y])}return{snaps:u,snapsAligned:c}}function pq(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=AC(y,g);if(h){let x=hn(y[0])+1;return YA(x)}if(v){let x=ip(a)-hn(y)[0]+1;return YA(x,hn(y)[0])}return m})}return{slideRegistry:u}}function mq(e,t,r,o,n){let{reachedAny:a,removeOffset:i,constrain:s}=o;function l(m){return m.concat().sort((g,y)=>gt(g)-gt(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)=>gt(v.diff)-gt(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=>EC(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 gq(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 hq(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));MC(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=>{(av(s)||s(p,h))&&m(y)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function tp(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 MC(l)?l:l.get()}return{get:r,set:o,add:n,subtract:a}}function JA(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=Q6(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 vq(e,t,r,o,n,a,i,s,l){let c=op(n),d=op(n).reverse(),f=h().concat(v());function p(b,I){return b.reduce((T,P)=>T-n[P],I)}function m(b,I){return b.reduce((T,P)=>p(T,I)>0?T.concat([P]):T,[])}function g(b){return a.map((I,T)=>({start:I-o[T]+.5+b,end:I+t-.5+b}))}function y(b,I,T){let P=g(I);return b.map(k=>{let A=T?0:-r,F=T?r:0,N=T?"end":"start",H=P[k][N];return{index:k,loopPoint:H,slideLocation:tp(-1),translate:JA(e,l[k]),target:()=>s.get()>H?A:F}})}function h(){let b=i[0],I=m(d,b);return y(I,r,!1)}function v(){let b=t-i[0]-1,I=m(c,b);return y(I,-r,!0)}function x(){return f.every(({index:b})=>{let I=c.filter(T=>T!==b);return p(I,t)<=.1})}function w(){f.forEach(b=>{let{target:I,translate:T,slideLocation:P}=b,k=I();k!==P.get()&&(T.to(k),P.set(k))})}function C(){f.forEach(b=>b.translate.clear())}return{canLoop:x,clear:C,loop:w,loopPoints:f}}function xq(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||(av(r)||r(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),n=!0}return{init:a,destroy:i}}function yq(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 np(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 wq(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 gt(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,S=AC(w,x);return C?f[x]+c:S?f[x]+d:w[x+1][s]-v[s]}).map(gt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function Cq(e,t,r,o,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=MC(r);function p(h,v){return op(h).filter(x=>x%v===0).map(x=>h.slice(x,x+v))}function m(h){return h.length?op(h).reduce((v,x,w)=>{let C=hn(v)||0,S=C===0,b=x===ip(h),I=n[u]-a[C][u],T=n[u]-a[x][c],P=!o&&S?d(i):0,k=!o&&b?d(s):0,A=gt(T-k-(I+P));return w&&A>t+l&&v.push(x),b&&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 Sq(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:S}=a,b=2,I=oq(),T=I.measure(t),P=r.map(I.measure),k=eq(l,u),A=k.measureSize(T),F=nq(A),N=Z6(s,A),H=!d&&!!v,O=d||!!v,{slideSizes:U,slideSizesWithGaps:V,startGap:M,endGap:J}=wq(k,T,P,r,O,n),ae=Cq(k,A,y,d,T,P,M,J,b),{snaps:_,snapsAligned:Y}=fq(k,N,T,P,ae),re=-hn(_)+hn(V),{snapsContained:X,scrollContainLimit:ce}=lq(A,re,Y,v,b),z=H?X:Y,{limit:ne}=uq(re,z,d),he=ZA(ip(z),c,d),xe=he.clone(),pe=op(r),K=({dragHandler:Ya,scrollBody:Mc,scrollBounds:Ec,options:{loop:wo}})=>{wo||Ec.constrain(Ya.pointerDown()),Mc.seek()},Ie=({scrollBody:Ya,translate:Mc,location:Ec,offsetLocation:wo,previousLocation:Ac,scrollLooper:Ex,slideLooper:$H,dragHandler:KH,animation:XH,eventHandler:NR,scrollBounds:YH,options:{loop:OR}},FR)=>{let _R=Ya.settled(),QH=!YH.shouldConstrain(),VR=OR?_R:_R&&QH,BR=VR&&!KH.pointerDown();BR&&XH.stop();let ZH=Ec.get()*FR+Ac.get()*(1-FR);wo.set(ZH),OR&&(Ex.loop(Ya.direction()),$H.loop()),Mc.to(wo.get()),BR&&NR.emit("settle"),VR||NR.emit("scroll")},ee=J6(o,n,()=>K(Ll),Ya=>Ie(Ll,Ya)),ie=.68,ze=z[he.get()],Ke=tp(ze),It=tp(ze),De=tp(ze),Ct=tp(ze),kn=iq(Ke,De,It,Ct,f,ie),Sr=mq(d,z,re,ne,Ct),$o=gq(ee,he,xe,kn,Sr,Ct,i),yo=dq(ne),Ko=ap(),Mn=yq(t,r,i,g),{slideRegistry:En}=pq(H,v,z,ce,ae,pe),Yp=hq(e,r,En,$o,kn,Ko,i,S),Ll={ownerDocument:o,ownerWindow:n,eventHandler:i,containerRect:T,slideRects:P,animation:ee,axis:k,dragHandler:tq(k,e,o,n,Ct,rq(k,n),Ke,ee,$o,kn,Sr,he,i,F,p,m,h,ie,C),eventStore:Ko,percentOfView:F,index:he,indexPrevious:xe,limit:ne,location:Ke,offsetLocation:De,previousLocation:It,options:a,resizeHandler:aq(t,i,n,r,k,x,I),scrollBody:kn,scrollBounds:sq(ne,De,Ct,kn,F),scrollLooper:cq(re,ne,De,[Ke,De,It,Ct]),scrollProgress:yo,scrollSnapList:z.map(yo.get),scrollSnaps:z,scrollTarget:Sr,scrollTo:$o,slideLooper:vq(k,A,re,U,V,_,z,De,r),slideFocus:Yp,slidesHandler:xq(t,i,w),slidesInView:Mn,slideIndexes:pe,slideRegistry:En,slidesToScroll:ae,target:Ct,translate:JA(k,t)};return Ll}function bq(){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 Rq={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 Iq(e){function t(a,i){return QA(a,i||{})}function r(a){let i=a.breakpoints||{},s=np(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=>np(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:o}}function Lq(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 sp(e,t,r){let o=e.ownerDocument,n=o.defaultView,a=Iq(n),i=Lq(a),s=ap(),l=bq(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=l,g=k,y=!1,h,v=u(Rq,sp.globalOptions),x=u(v),w=[],C,S,b;function I(){let{container:pe,slides:K}=x;S=(TC(pe)?e.querySelector(pe):pe)||e.children[0];let ee=TC(K)?S.querySelectorAll(K):K;b=[].slice.call(ee||S.children)}function T(pe){let K=Sq(e,S,b,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",k)),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(),S.offsetParent&&b.length&&h.dragHandler.init(xe),C=i.init(xe,w)))}function k(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 M(){return h.scrollSnapList}function J(){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 S}function he(){return b}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:J,scrollSnapList:M,scrollTo:N,selectedScrollSnap:ae,slideNodes:he,slidesInView:Y,slidesNotInView:re};return P(t,r),setTimeout(()=>l.emit("init"),0),xe}sp.globalOptions=void 0;function iv(e={},t=[]){let r=(0,Do.useRef)(e),o=(0,Do.useRef)(t),[n,a]=(0,Do.useState)(),[i,s]=(0,Do.useState)(),l=(0,Do.useCallback)(()=>{n&&n.reInit(r.current,o.current)},[n]);return(0,Do.useEffect)(()=>{nv(r.current,e)||(r.current=e,l())},[e,l]),(0,Do.useEffect)(()=>{KA(o.current,t)||(o.current=t,l())},[t,l]),(0,Do.useEffect)(()=>{if($A()&&i){sp.globalOptions=iv.globalOptions;let u=sp(i,r.current,o.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}iv.globalOptions=void 0;var uo=R(D()),eD=Rt.createContext(null);function lp(){let e=Rt.useContext(eD);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var tD=Rt.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]=iv({...t,axis:l==="horizontal"?"x":"y"},o),[d,f]=Rt.useState(!1),[p,m]=Rt.useState(!1),g=Rt.useCallback(x=>{x&&(f(x.canScrollPrev()),m(x.canScrollNext()))},[]),y=Rt.useCallback(()=>{c?.scrollPrev()},[c]),h=Rt.useCallback(()=>{c?.scrollNext()},[c]),v=Rt.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 Rt.useEffect(()=>{!c||!r||r(c)},[c,r]),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,uo.jsx)(eD.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:y,scrollNext:h,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,uo.jsx)("div",{ref:s,onKeyDownCapture:v,className:L("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});tD.displayName="Carousel";var rD=Q("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),oD=Rt.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=lp();return(0,uo.jsx)("div",{ref:o,className:"overflow-hidden",children:(0,uo.jsx)("div",{ref:r,className:L(rD({orientation:n}),e),...t})})});oD.displayName="CarouselContent";var nD=Q("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),aD=Rt.forwardRef(({className:e,...t},r)=>{let{orientation:o}=lp();return(0,uo.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:L(nD({orientation:o}),e),...t})});aD.displayName="CarouselItem";var iD=Rt.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=lp();return(0,uo.jsxs)(_e,{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,uo.jsx)(Md,{className:"h-4 w-4","aria-hidden":"true"}),(0,uo.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});iD.displayName="CarouselPrevious";var sD=Rt.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=lp();return(0,uo.jsxs)(_e,{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,uo.jsx)(Ed,{className:"h-4 w-4","aria-hidden":"true"}),(0,uo.jsx)("span",{className:"sr-only",children:"Next slide"})]})});sD.displayName="CarouselNext";var vn=R(E());var kr=R(E(),1);var sv=R(E(),1);function rc(e){let t=sv.useRef({value:e,previous:e});return sv.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var lD=R(E(),1);function oc(e){let[t,r]=lD.useState(void 0);return Fe(()=>{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 co=R(D(),1),lv="Checkbox",[Pq,xwe]=Ne(lv),[Tq,DC]=Pq(lv);function kq(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]=je({prop:r,defaultProp:n??!1,onChange:l,caller:lv}),[m,g]=kr.useState(null),[y,h]=kr.useState(null),v=kr.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:zi(n)?!1:n,isFormControl:x,bubbleInput:y,setBubbleInput:h};return(0,co.jsx)(Tq,{scope:t,...w,children:Mq(d)?d(w):o})}var uD="CheckboxTrigger",cD=kr.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=DC(uD,e),g=de(n,c),y=kr.useRef(l);return kr.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(y.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,co.jsx)($.button,{type:"button",role:"checkbox","aria-checked":zi(l)?"mixed":l,"aria-required":u,"data-state":mD(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=>zi(v)?!0:!v),m&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});cD.displayName=uD;var uv=kr.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,co.jsx)(kq,{__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,co.jsxs)(co.Fragment,{children:[(0,co.jsx)(cD,{...d,ref:t,__scopeCheckbox:r}),f&&(0,co.jsx)(pD,{__scopeCheckbox:r})]})})});uv.displayName=lv;var dD="CheckboxIndicator",NC=kr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=DC(dD,r);return(0,co.jsx)(st,{present:o||zi(a.checked)||a.checked===!0,children:(0,co.jsx)($.span,{"data-state":mD(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});NC.displayName=dD;var fD="CheckboxBubbleInput",pD=kr.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=DC(fD,e),m=de(r,p),g=rc(a),y=oc(o);kr.useEffect(()=>{let v=f;if(!v)return;let x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,S=!n.current;if(g!==a&&C){let b=new Event("click",{bubbles:S});v.indeterminate=zi(a),C.call(v,zi(a)?!1:a),v.dispatchEvent(b)}},[f,g,a,n]);let h=kr.useRef(zi(a)?!1:a);return(0,co.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%)"}})});pD.displayName=fD;function Mq(e){return typeof e=="function"}function zi(e){return e==="indeterminate"}function mD(e){return zi(e)?"indeterminate":e?"checked":"unchecked"}var No=R(D()),Aq=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"}}),OC=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,No.jsx)(uv,{ref:u,checked:c?!1:s,className:L("moonui-theme",Aq({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,No.jsx)(NC,{className:L("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,No.jsx)($d,{className:"h-[65%] w-[65%]"}):i||(0,No.jsx)(ur,{className:"h-[65%] w-[65%]"})})})});OC.displayName=uv.displayName;var gD=vn.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,No.jsx)("div",{ref:a,className:L("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));gD.displayName="CheckboxGroup";var cv=vn.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,No.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}));cv.displayName="CheckboxLabel";var hD=vn.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=vn.useId(),s=e||i;return(0,No.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,No.jsx)(cv,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,No.jsx)(OC,{ref:a,id:s,...n}),r==="end"&&(0,No.jsx)(cv,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});hD.displayName="CheckboxWithLabel";var FC=R(E());var il=R(D()),Dq=wg,vD=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"}}),xD=FC.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,il.jsx)(au,{ref:i,className:L("moonui-theme",vD({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,il.jsxs)(au,{ref:i,className:L("moonui-theme",vD({variant:r,size:o}),e),...a,children:[t,(0,il.jsx)(Hn,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));xD.displayName=au.displayName;var Nq=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"}}),yD=FC.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,il.jsx)(Rd,{ref:a,className:L("moonui-theme",Nq({variant:r,size:o}),e),...n,children:(0,il.jsx)("div",{className:"p-4",children:t})}));yD.displayName=Rd.displayName;var Ho=R(E());var sl=R(E());var fo=R(D()),Oq=Q("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Fq=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}}),gr=sl.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:S,...b},I)=>{let[T,P]=sl.useState(!1),[k,A]=sl.useState(h||v||""),N=T||k!==""&&k!==null&&k!==void 0,H=J=>{P(!0),w?.(J)},O=J=>{P(!1),C?.(J)},U=J=>{A(J.target.value),x?.(J)};sl.useEffect(()=>{h!==void 0&&A(h)},[h]);let V=p||s||l,M=s?"error":l?"success":"normal";return(0,fo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,fo.jsxs)("div",{className:L("moonui-theme",Oq({size:n}),t),children:[g&&m&&(0,fo.jsx)("label",{htmlFor:b.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,fo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,fo.jsx)(Nt,{className:"h-4 w-4 animate-spin"}):c}),(0,fo.jsx)("input",{className:L(Fq({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?`${b.id||""}-error`:l?`${b.id||""}-success`:void 0,value:h,defaultValue:v,onChange:U,onFocus:H,onBlur:O,placeholder:g?N?S:"":S,...b}),d&&!u&&(0,fo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,fo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,fo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,fo.jsx)(Nt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),V&&(0,fo.jsx)("p",{className:L("text-xs transition-all",M==="error"&&"text-error",M==="success"&&"text-success",M==="normal"&&"text-muted-foreground",r),id:s?`${b.id||""}-error`:l?`${b.id||""}-success`:void 0,children:s||l||""})]})});gr.displayName="Input";var bD=R(E());var wD=R(E(),1);var CD=R(D(),1),_q="Label",SD=wD.forwardRef((e,t)=>(0,CD.jsx)($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));SD.displayName=_q;var _C=SD;var RD=R(D()),Bq=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"),$r=bD.forwardRef(({className:e,...t},r)=>(0,RD.jsx)(_C,{ref:r,className:L(Bq(),e),...t}));$r.displayName=_C.displayName;var N2=R(E());var ut=R(E(),1);var ht=R(E(),1);var ID=R(E(),1);function LD(e,t=globalThis?.document){let r=ot(e);ID.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 BC=R(D(),1),Hq="DismissableLayer",VC="dismissableLayer.update",Uq="dismissableLayer.pointerDownOutside",zq="dismissableLayer.focusOutside",PD,kD=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oo=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(kD),[c,d]=ht.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),m=de(t,b=>d(b)),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=Wq(b=>{let I=b.target,T=[...u.branches].some(P=>P.contains(I));!w||T||(n?.(b),i?.(b),b.defaultPrevented||s?.())},f),S=qq(b=>{let I=b.target;[...u.branches].some(P=>P.contains(I))||(a?.(b),i?.(b),b.defaultPrevented||s?.())},f);return LD(b=>{v===u.layers.size-1&&(o?.(b),!b.defaultPrevented&&s&&(b.preventDefault(),s()))},f),ht.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(PD=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),TD(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=PD)}},[c,f,r,u]),ht.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),TD())},[c,u]),ht.useEffect(()=>{let b=()=>p({});return document.addEventListener(VC,b),()=>document.removeEventListener(VC,b)},[]),(0,BC.jsx)($.div,{...l,ref:m,style:{pointerEvents:x?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)})});Oo.displayName=Hq;var Gq="DismissableLayerBranch",MD=ht.forwardRef((e,t)=>{let r=ht.useContext(kD),o=ht.useRef(null),n=de(t,o);return ht.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,BC.jsx)($.div,{...e,ref:n})});MD.displayName=Gq;function Wq(e,t=globalThis?.document){let r=ot(e),o=ht.useRef(!1),n=ht.useRef(()=>{});return ht.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){ED(Uq,r,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function qq(e,t=globalThis?.document){let r=ot(e),o=ht.useRef(!1);return ht.useEffect(()=>{let n=a=>{a.target&&!o.current&&ED(zq,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 TD(){let e=new CustomEvent(VC);document.dispatchEvent(e)}function ED(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?nu(n,a):n.dispatchEvent(a)}var AD=Oo,DD=MD;var OD=R(E(),1),HC=0;function Gi(){OD.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ND()),document.body.insertAdjacentElement("beforeend",e[1]??ND()),HC++,()=>{HC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),HC--}},[])}function ND(){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 Fo=R(E(),1);var HD=R(D(),1),UC="focusScope.autoFocusOnMount",zC="focusScope.autoFocusOnUnmount",FD={bubbles:!1,cancelable:!0},$q="FocusScope",Aa=Fo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Fo.useState(null),u=ot(n),c=ot(a),d=Fo.useRef(null),f=de(t,g=>l(g)),p=Fo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Fo.useEffect(()=>{if(o){let v=function(S){if(p.paused||!s)return;let b=S.target;s.contains(b)?d.current=b:Wi(d.current,{select:!0})},x=function(S){if(p.paused||!s)return;let b=S.relatedTarget;b!==null&&(s.contains(b)||Wi(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(let I of S)I.removedNodes.length>0&&Wi(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]),Fo.useEffect(()=>{if(s){VD.add(p);let g=document.activeElement;if(!s.contains(g)){let h=new CustomEvent(UC,FD);s.addEventListener(UC,u),s.dispatchEvent(h),h.defaultPrevented||(Kq(Jq(UD(s)),{select:!0}),document.activeElement===g&&Wi(s))}return()=>{s.removeEventListener(UC,u),setTimeout(()=>{let h=new CustomEvent(zC,FD);s.addEventListener(zC,c),s.dispatchEvent(h),h.defaultPrevented||Wi(g??document.body,{select:!0}),s.removeEventListener(zC,c),VD.remove(p)},0)}}},[s,u,c,p]);let m=Fo.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]=Xq(v);x&&w?!g.shiftKey&&h===w?(g.preventDefault(),r&&Wi(x,{select:!0})):g.shiftKey&&h===x&&(g.preventDefault(),r&&Wi(w,{select:!0})):h===v&&g.preventDefault()}},[r,o,p.paused]);return(0,HD.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});Aa.displayName=$q;function Kq(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(Wi(o,{select:t}),document.activeElement!==r)return}function Xq(e){let t=UD(e),r=_D(t,e),o=_D(t.reverse(),e);return[r,o]}function UD(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 _D(e,t){for(let r of e)if(!Yq(r,{upTo:t}))return r}function Yq(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 Qq(e){return e instanceof HTMLInputElement&&"select"in e}function Wi(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Qq(e)&&t&&e.select()}}var VD=Zq();function Zq(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=BD(e,t),e.unshift(t)},remove(t){e=BD(e,t),e[0]?.resume()}}}function BD(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Jq(e){return e.filter(t=>t.tagName!=="A")}var Xr=R(E(),1);var WD=["top","right","bottom","left"];var Xn=Math.min,Mr=Math.max,cp=Math.round,dp=Math.floor,xn=e=>({x:e,y:e}),e8={left:"right",right:"left",bottom:"top",top:"bottom"},t8={start:"end",end:"start"};function fv(e,t,r){return Mr(e,Xn(t,r))}function Yn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function ll(e){return e.split("-")[1]}function pv(e){return e==="x"?"y":"x"}function mv(e){return e==="y"?"height":"width"}var r8=new Set(["top","bottom"]);function yn(e){return r8.has(Qn(e))?"y":"x"}function gv(e){return pv(yn(e))}function qD(e,t,r){r===void 0&&(r=!1);let o=ll(e),n=gv(e),a=mv(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=up(i)),[i,up(i)]}function jD(e){let t=up(e);return[dv(e),t,dv(t)]}function dv(e){return e.replace(/start|end/g,t=>t8[t])}var zD=["left","right"],GD=["right","left"],o8=["top","bottom"],n8=["bottom","top"];function a8(e,t,r){switch(e){case"top":case"bottom":return r?t?GD:zD:t?zD:GD;case"left":case"right":return t?o8:n8;default:return[]}}function $D(e,t,r,o){let n=ll(e),a=a8(Qn(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(dv)))),a}function up(e){return e.replace(/left|right|bottom|top/g,t=>e8[t])}function i8(e){return{top:0,right:0,bottom:0,left:0,...e}}function GC(e){return typeof e!="number"?i8(e):{top:e,right:e,bottom:e,left:e}}function ul(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 KD(e,t,r){let{reference:o,floating:n}=e,a=yn(t),i=gv(t),s=mv(i),l=Qn(t),u=a==="y",c=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:o.y-n.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-n.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ll(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var QD=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}=KD(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}=KD(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function nc(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}=Yn(t,e),m=GC(p),y=s[f?d==="floating"?"reference":"floating":d],h=ul(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=ul(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 ZD=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}=Yn(e,t)||{};if(u==null)return{};let d=GC(c),f={x:r,y:o},p=gv(n),m=mv(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],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),b=S?S[x]:0;(!b||!await(i.isElement==null?void 0:i.isElement(S)))&&(b=s.floating[x]||a.floating[m]);let I=w/2-C/2,T=b/2-g[m]/2-1,P=Xn(d[h],T),k=Xn(d[v],T),A=P,F=b-g[m]-k,N=b/2-g[m]/2+I,H=fv(A,N,F),O=!l.arrow&&ll(n)!=null&&N!==H&&a.reference[m]/2-(N<A?P:k)-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 JD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Yn(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let h=Qn(n),v=yn(s),x=Qn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(x||!g?[up(s)]:jD(s)),S=m!=="none";!f&&S&&C.push(...$D(s,g,m,w));let b=[s,...C],I=await nc(t,y),T=[],P=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&T.push(I[h]),d){let N=qD(n,i,w);T.push(I[N[0]],I[N[1]])}if(P=[...P,{placement:n,overflows:T}],!T.every(N=>N<=0)){var k,A;let N=(((k=a.flip)==null?void 0:k.index)||0)+1,H=b[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(S){let M=yn(V.placement);return M===v||M==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(M=>M>0).reduce((M,J)=>M+J,0)]).sort((V,M)=>V[1]-M[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 XD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function YD(e){return WD.some(t=>e[t]>=0)}var eN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=Yn(e,t);switch(o){case"referenceHidden":{let a=await nc(t,{...n,elementContext:"reference"}),i=XD(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:YD(i)}}}case"escaped":{let a=await nc(t,{...n,altBoundary:!0}),i=XD(a,r.floating);return{data:{escapedOffsets:i,escaped:YD(i)}}}default:return{}}}}};var tN=new Set(["left","top"]);async function s8(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=Qn(r),s=ll(r),l=yn(r)==="y",u=tN.has(i)?-1:1,c=a&&l?-1:1,d=Yn(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 rN=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 s8(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}}}}},oN=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}=Yn(e,t),u={x:r,y:o},c=await nc(t,l),d=yn(Qn(n)),f=pv(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=fv(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=fv(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}}}}}},nN=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}=Yn(e,t),c={x:r,y:o},d=yn(n),f=pv(d),p=c[f],m=c[d],g=Yn(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=tN.has(Qn(n)),C=a.reference[d]-a.floating[x]+(w&&((h=i.offset)==null?void 0:h[d])||0)+(w?0:y.crossAxis),S=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>S&&(m=S)}return{[f]:p,[d]:m}}}},aN=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}=Yn(e,t),c=await nc(t,u),d=Qn(n),f=ll(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=Xn(g-c[y],v),C=Xn(m-c[h],x),S=!t.middlewareData.shift,b=w,I=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=v),S&&!f){let P=Mr(c.left,0),k=Mr(c.right,0),A=Mr(c.top,0),F=Mr(c.bottom,0);p?I=m-2*(P!==0||k!==0?P+k:Mr(c.left,c.right)):b=g-2*(A!==0||F!==0?A+F:Mr(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:b});let T=await i.getDimensions(s.floating);return m!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function hv(){return typeof window<"u"}function dl(e){return sN(e)?(e.nodeName||"").toLowerCase():"#document"}function Kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wn(e){var t;return(t=(sN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sN(e){return hv()?e instanceof Node||e instanceof Kr(e).Node:!1}function _o(e){return hv()?e instanceof Element||e instanceof Kr(e).Element:!1}function Cn(e){return hv()?e instanceof HTMLElement||e instanceof Kr(e).HTMLElement:!1}function iN(e){return!hv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kr(e).ShadowRoot}var l8=new Set(["inline","contents"]);function ac(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!l8.has(n)}var u8=new Set(["table","td","th"]);function lN(e){return u8.has(dl(e))}var c8=[":popover-open",":modal"];function fp(e){return c8.some(t=>{try{return e.matches(t)}catch{return!1}})}var d8=["transform","translate","scale","rotate","perspective"],f8=["transform","translate","scale","rotate","perspective","filter"],p8=["paint","layout","strict","content"];function vv(e){let t=xv(),r=_o(e)?Vo(e):e;return d8.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)||f8.some(o=>(r.willChange||"").includes(o))||p8.some(o=>(r.contain||"").includes(o))}function uN(e){let t=Da(e);for(;Cn(t)&&!fl(t);){if(vv(t))return t;if(fp(t))return null;t=Da(t)}return null}function xv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var m8=new Set(["html","body","#document"]);function fl(e){return m8.has(dl(e))}function Vo(e){return Kr(e).getComputedStyle(e)}function pp(e){return _o(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Da(e){if(dl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||iN(e)&&e.host||wn(e);return iN(t)?t.host:t}function cN(e){let t=Da(e);return fl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cn(t)&&ac(t)?t:cN(t)}function cl(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=cN(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=Kr(n);if(a){let s=yv(i);return t.concat(i,i.visualViewport||[],ac(n)?n:[],s&&r?cl(s):[])}return t.concat(n,cl(n,[],r))}function yv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mN(e){let t=Vo(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=cp(r)!==a||cp(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function qC(e){return _o(e)?e:e.contextElement}function ic(e){let t=qC(e);if(!Cn(t))return xn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=mN(t),i=(a?cp(r.width):r.width)/o,s=(a?cp(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 gN(e){let t=Kr(e);return!xv()||!t.visualViewport?g8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function h8(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Kr(e)?!1:t}function pl(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=qC(e),i=xn(1);t&&(o?_o(o)&&(i=ic(o)):i=ic(e));let s=h8(a,r,o)?gN(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=Kr(a),p=o&&_o(o)?Kr(o):o,m=f,g=yv(m);for(;g&&o&&p!==m;){let y=ic(g),h=g.getBoundingClientRect(),v=Vo(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=Kr(g),g=yv(m)}}return ul({width:c,height:d,x:l,y:u})}function wv(e,t){let r=pp(e).scrollLeft;return t?t.left+r:pl(wn(e)).left+r}function hN(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-wv(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function v8(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=wn(o),s=t?fp(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)&&((dl(o)!=="body"||ac(i))&&(l=pp(o)),Cn(o))){let p=pl(o);u=ic(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?hN(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 x8(e){return Array.from(e.getClientRects())}function y8(e){let t=wn(e),r=pp(e),o=e.ownerDocument.body,n=Mr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Mr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+wv(e),s=-r.scrollTop;return Vo(o).direction==="rtl"&&(i+=Mr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var dN=25;function w8(e,t){let r=Kr(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=xv();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=wv(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<=dN&&(a-=m)}else u<=dN&&(a+=u);return{width:a,height:i,x:s,y:l}}var C8=new Set(["absolute","fixed"]);function S8(e,t){let r=pl(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=Cn(e)?ic(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 fN(e,t,r){let o;if(t==="viewport")o=w8(e,r);else if(t==="document")o=y8(wn(e));else if(_o(t))o=S8(t,r);else{let n=gN(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ul(o)}function vN(e,t){let r=Da(e);return r===t||!_o(r)||fl(r)?!1:Vo(r).position==="fixed"||vN(r,t)}function b8(e,t){let r=t.get(e);if(r)return r;let o=cl(e,[],!1).filter(s=>_o(s)&&dl(s)!=="body"),n=null,a=Vo(e).position==="fixed",i=a?Da(e):e;for(;_o(i)&&!fl(i);){let s=Vo(i),l=vv(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&C8.has(n.position)||ac(i)&&!l&&vN(e,i))?o=o.filter(c=>c!==i):n=s,i=Da(i)}return t.set(e,o),o}function R8(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?fp(t)?[]:b8(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=fN(t,c,n);return u.top=Mr(d.top,u.top),u.right=Xn(d.right,u.right),u.bottom=Xn(d.bottom,u.bottom),u.left=Mr(d.left,u.left),u},fN(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function I8(e){let{width:t,height:r}=mN(e);return{width:t,height:r}}function L8(e,t,r){let o=Cn(t),n=wn(t),a=r==="fixed",i=pl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=xn(0);function u(){l.x=wv(n)}if(o||!o&&!a)if((dl(t)!=="body"||ac(n))&&(s=pp(t)),o){let p=pl(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?hN(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 WC(e){return Vo(e).position==="static"}function pN(e,t){if(!Cn(e)||Vo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return wn(e)===r&&(r=r.ownerDocument.body),r}function xN(e,t){let r=Kr(e);if(fp(e))return r;if(!Cn(e)){let n=Da(e);for(;n&&!fl(n);){if(_o(n)&&!WC(n))return n;n=Da(n)}return r}let o=pN(e,t);for(;o&&lN(o)&&WC(o);)o=pN(o,t);return o&&fl(o)&&WC(o)&&!vv(o)?r:o||uN(e)||r}var P8=async function(e){let t=this.getOffsetParent||xN,r=this.getDimensions,o=await r(e.floating);return{reference:L8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function T8(e){return Vo(e).direction==="rtl"}var yN={convertOffsetParentRelativeRectToViewportRelativeRect:v8,getDocumentElement:wn,getClippingRect:R8,getOffsetParent:xN,getElementRects:P8,getClientRects:x8,getDimensions:I8,getScale:ic,isElement:_o,isRTL:T8};function wN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function k8(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=dp(d),g=dp(n.clientWidth-(c+f)),y=dp(n.clientHeight-(d+p)),h=dp(c),x={rootMargin:-m+"px "+-g+"px "+-y+"px "+-h+"px",threshold:Mr(0,Xn(1,l))||1},w=!0;function C(S){let b=S[0].intersectionRatio;if(b!==l){if(!w)return i();b?i(!1,b):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b===1&&!wN(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 jC(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=qC(e),c=n||a?[...u?cl(u):[],...cl(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",r,{passive:!0}),a&&h.addEventListener("resize",r)});let d=u&&s?k8(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?pl(e):null;l&&y();function y(){let h=pl(e);g&&!wN(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 CN=rN;var SN=oN,bN=JD,RN=aN,IN=eN,$C=ZD;var LN=nN,KC=(e,t,r)=>{let o=new Map,n={platform:yN,...r},a={...n.platform,_c:o};return QD(e,t,{...n,platform:a})};var Pt=R(E(),1),TN=R(E(),1),kN=R(yi(),1),M8=typeof document<"u",E8=function(){},Cv=M8?TN.useLayoutEffect:E8;function Sv(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(!Sv(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)&&!Sv(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function MN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PN(e,t){let r=MN(e);return Math.round(t*r)/r}function XC(e){let t=Pt.useRef(e);return Cv(()=>{t.current=e}),t}function EN(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]=Pt.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Pt.useState(o);Sv(f,o)||p(o);let[m,g]=Pt.useState(null),[y,h]=Pt.useState(null),v=Pt.useCallback(V=>{V!==S.current&&(S.current=V,g(V))},[]),x=Pt.useCallback(V=>{V!==b.current&&(b.current=V,h(V))},[]),w=a||m,C=i||y,S=Pt.useRef(null),b=Pt.useRef(null),I=Pt.useRef(c),T=l!=null,P=XC(l),k=XC(n),A=XC(u),F=Pt.useCallback(()=>{if(!S.current||!b.current)return;let V={placement:t,strategy:r,middleware:f};k.current&&(V.platform=k.current),KC(S.current,b.current,V).then(M=>{let J={...M,isPositioned:A.current!==!1};N.current&&!Sv(I.current,J)&&(I.current=J,kN.flushSync(()=>{d(J)}))})},[f,t,r,k,A]);Cv(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[u]);let N=Pt.useRef(!1);Cv(()=>(N.current=!0,()=>{N.current=!1}),[]),Cv(()=>{if(w&&(S.current=w),C&&(b.current=C),w&&C){if(P.current)return P.current(w,C,F);F()}},[w,C,F,P,T]);let H=Pt.useMemo(()=>({reference:S,floating:b,setReference:v,setFloating:x}),[v,x]),O=Pt.useMemo(()=>({reference:w,floating:C}),[w,C]),U=Pt.useMemo(()=>{let V={position:r,left:0,top:0};if(!O.floating)return V;let M=PN(O.floating,c.x),J=PN(O.floating,c.y);return s?{...V,transform:"translate("+M+"px, "+J+"px)",...MN(O.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:J}},[r,s,O.floating,c.x,c.y]);return Pt.useMemo(()=>({...c,update:F,refs:H,elements:O,floatingStyles:U}),[c,F,H,O,U])}var A8=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?$C({element:o.current,padding:n}).fn(r):{}:o?$C({element:o,padding:n}).fn(r):{}}}},AN=(e,t)=>({...CN(e),options:[e,t]}),DN=(e,t)=>({...SN(e),options:[e,t]}),NN=(e,t)=>({...LN(e),options:[e,t]}),ON=(e,t)=>({...bN(e),options:[e,t]}),FN=(e,t)=>({...RN(e),options:[e,t]});var _N=(e,t)=>({...IN(e),options:[e,t]});var VN=(e,t)=>({...A8(e),options:[e,t]});var BN=R(E(),1);var YC=R(D(),1),D8="Arrow",HN=BN.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,YC.jsx)($.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,YC.jsx)("polygon",{points:"0,0 30,0 15,10"})})});HN.displayName=D8;var UN=HN;var qi=R(D(),1);var QC="Popper",[zN,Bo]=Ne(QC),[O8,GN]=zN(QC),WN=e=>{let{__scopePopper:t,children:r}=e,[o,n]=Xr.useState(null);return(0,qi.jsx)(O8,{scope:t,anchor:o,onAnchorChange:n,children:r})};WN.displayName=QC;var qN="PopperAnchor",jN=Xr.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=GN(qN,r),i=Xr.useRef(null),s=de(t,i),l=Xr.useRef(null);return Xr.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,qi.jsx)($.div,{...n,ref:s})});jN.displayName=qN;var ZC="PopperContent",[F8,_8]=zN(ZC),$N=Xr.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=GN(ZC,r),[h,v]=Xr.useState(null),x=de(t,z=>v(z)),[w,C]=Xr.useState(null),S=oc(w),b=S?.width??0,I=S?.height??0,T=o+(a!=="center"?"-"+a:""),P=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:P,boundary:k.filter(B8),altBoundary:A},{refs:N,floatingStyles:H,placement:O,isPositioned:U,middlewareData:V}=EN({strategy:"fixed",placement:T,whileElementsMounted:(...z)=>jC(...z,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[AN({mainAxis:n+I,alignmentAxis:i}),l&&DN({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?NN():void 0,...F}),l&&ON({...F}),FN({...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&&VN({element:w,padding:s}),H8({arrowWidth:b,arrowHeight:I}),f&&_N({strategy:"referenceHidden",...F})]}),[M,J]=YN(O),ae=ot(m);Fe(()=>{U&&ae?.()},[U,ae]);let _=V.arrow?.x,Y=V.arrow?.y,re=V.arrow?.centerOffset!==0,[X,ce]=Xr.useState();return Fe(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,qi.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,qi.jsx)(F8,{scope:r,placedSide:M,onArrowChange:C,arrowX:_,arrowY:Y,shouldHideArrow:re,children:(0,qi.jsx)($.div,{"data-side":M,"data-align":J,...g,ref:x,style:{...g.style,animation:U?void 0:"none"}})})})});$N.displayName=ZC;var KN="PopperArrow",V8={top:"bottom",right:"left",bottom:"top",left:"right"},XN=Xr.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=_8(KN,o),i=V8[a.placedSide];return(0,qi.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,qi.jsx)(UN,{...n,ref:r,style:{...n.style,display:"block"}})})});XN.displayName=KN;function B8(e){return e!==null}var H8=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]=YN(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 YN(e){let[t,r="center"]=e.split("-");return[t,r]}var Na=WN,Oa=jN,ji=$N,$i=XN;var Rv=R(E(),1),QN=R(yi(),1);var ZN=R(D(),1),U8="Portal",po=Rv.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Rv.useState(!1);Fe(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?QN.default.createPortal((0,ZN.jsx)($.div,{...o,ref:t}),i):null});po.displayName=U8;var z8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},sc=new WeakMap,Iv=new WeakMap,Lv={},JC=0,JN=function(e){return e&&(e.host||JN(e.parentNode))},G8=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=JN(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})},W8=function(e,t,r,o){var n=G8(t,Array.isArray(e)?e:[e]);Lv[r]||(Lv[r]=new WeakMap);var a=Lv[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=(sc.get(f)||0)+1,y=(a.get(f)||0)+1;sc.set(f,g),a.set(f,y),i.push(f),g===1&&m&&Iv.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(),JC++,function(){i.forEach(function(d){var f=sc.get(d)-1,p=a.get(d)-1;sc.set(d,f),a.set(d,p),f||(Iv.has(d)||d.removeAttribute(o),Iv.delete(d)),p||d.removeAttribute(r)}),JC--,JC||(sc=new WeakMap,sc=new WeakMap,Iv=new WeakMap,Lv={})}},Ki=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||z8(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),W8(o,n,r,"aria-hidden")):function(){return null}};var Yr=function(){return Yr=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},Yr.apply(this,arguments)};function Pv(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 e2(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 Av=R(E());var hr=R(E());var ml="right-scroll-bar-position",gl="width-before-scroll-bar",eS="with-scroll-bars-hidden",tS="--removed-body-scroll-bar-size";function Tv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var t2=R(E());function r2(e,t){var r=(0,t2.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 kv=R(E());var q8=typeof window<"u"?kv.useLayoutEffect:kv.useEffect,o2=new WeakMap;function rS(e,t){var r=r2(t||null,function(o){return e.forEach(function(n){return Tv(n,o)})});return q8(function(){var o=o2.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Tv(s,null)}),a.forEach(function(s){n.has(s)||Tv(s,i)})}o2.set(r,e)},[e]),r}function j8(e){return e}function $8(e,t){t===void 0&&(t=j8);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 oS(e){e===void 0&&(e={});var t=$8(null);return t.options=Yr({async:!0,ssr:!1},e),t}var n2=R(E()),a2=function(e){var t=e.sideCar,r=Pv(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 n2.createElement(o,Yr({},r))};a2.isSideCarExport=!0;function nS(e,t){return e.useMedium(t),a2}var Mv=oS();var aS=function(){},mp=hr.forwardRef(function(e,t){var r=hr.useRef(null),o=hr.useState({onScrollCapture:aS,onWheelCapture:aS,onTouchMoveCapture:aS}),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=Pv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,S=rS([r,t]),b=Yr(Yr({},w),n);return hr.createElement(hr.Fragment,null,c&&hr.createElement(C,{sideCar:Mv,removeScrollBar:u,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!y,lockRef:r,gapMode:x}),i?hr.cloneElement(hr.Children.only(s),Yr(Yr({},b),{ref:S})):hr.createElement(v,Yr({},b,{className:l,ref:S}),s))});mp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mp.classNames={fullWidth:gl,zeroRight:ml};var at=R(E());var uc=R(E());var l2=R(E());var i2;var s2=function(){if(i2)return i2;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function K8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s2();return t&&e.setAttribute("nonce",t),e}function X8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Y8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var iS=function(){var e=0,t=null;return{add:function(r){e==0&&(t=K8())&&(X8(t,r),Y8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var sS=function(){var e=iS();return function(t,r){l2.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var gp=function(){var e=sS(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var Q8={left:0,top:0,right:0,gap:0},lS=function(e){return parseInt(e||"",10)||0},Z8=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[lS(r),lS(o),lS(n)]},uS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q8;var t=Z8(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 J8=gp(),lc="data-scroll-locked",ej=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(
|
|
19
|
+
`),()=>{x.contains(g)&&x.removeChild(g)}},[t]),(0,gD.jsx)(zS,{isPresent:t,childRef:a,sizeRef:i,children:xv.cloneElement(e,{ref:l})})}var xD=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=ca(Jq),c=(0,Bp.useId)(),d=!0,f=(0,Bp.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,Bp.useMemo)(()=>{u.forEach((p,m)=>u.set(m,!1))},[r]),vD.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,GS.jsx)(hD,{isPresent:r,anchorX:s,root:l,children:e})),(0,GS.jsx)(Xi.Provider,{value:f,children:e})};function Jq(){return new Map}var os=b(M(),1);function yv(e=!0){let t=(0,os.useContext)(Xi);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,os.useId)();(0,os.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,os.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var wv=b(M(),1),Hp=e=>e.key||"";function WS(e){let t=[];return wv.Children.forEach(e,r=>{(0,wv.isValidElement)(r)&&t.push(r)}),t}var Ka=({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]=yv(i),d=(0,pa.useMemo)(()=>WS(e),[e]),f=i&&!u?[]:d.map(Hp),p=(0,pa.useRef)(!0),m=(0,pa.useRef)(d),g=ca(()=>new Map),[x,v]=(0,pa.useState)(d),[h,y]=(0,pa.useState)(d);nc(()=>{p.current=!1,m.current=d;for(let S=0;S<h.length;S++){let R=Hp(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],L=Hp(I);f.includes(L)||(S.splice(R,0,I),w.push(I))}return a==="wait"&&w.length&&(S=w),y(WS(S)),v(d),null}let{forceRender:C}=(0,pa.useContext)(rc);return(0,Up.jsx)(Up.Fragment,{children:h.map(S=>{let R=Hp(S),I=i&&!u?!1:d===h||f.includes(R),L=()=>{if(g.has(R))g.set(R,!0);else return;let T=!0;g.forEach(k=>{k||(T=!1)}),T&&(C?.(),y(m.current),i&&c?.(),o&&o())};return(0,Up.jsx)(xD,{isPresent:I,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:L,anchorX:s,children:S},R)})})};var yD=b(M(),1),Cv=(0,yD.createContext)({strict:!1});var wD={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"]},Xa={};for(let e in wD)Xa[e]={isEnabled:t=>wD[e].some(r=>!!t[r])};function CD(e){for(let t in e)Xa[t]={...Xa[t],...e[t]}}var e$=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 zp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||e$.has(e)}var SD=e=>!zp(e);function t$(e){typeof e=="function"&&(SD=t=>t.startsWith("on")?!zp(t):e(t))}try{t$(require("@emotion/is-prop-valid").default)}catch{}function bD(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(SD(n)||r===!0&&zp(n)||!t&&!zp(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var Dv=b(D(),1);var Cc=b(M(),1);var RD=b(M(),1),ns=(0,RD.createContext)({});var Rv=b(M(),1);function as(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ya(e){return typeof e=="string"||Array.isArray(e)}var Sv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gp=["initial",...Sv];function Sl(e){return as(e.animate)||Gp.some(t=>Ya(e[t]))}function bv(e){return!!(Sl(e)||e.variants)}function ID(e,t){if(Sl(e)){let{initial:r,animate:o}=e;return{initial:r===!1||Ya(r)?r:void 0,animate:Ya(o)?o:void 0}}return e.inherit!==!1?t:{}}function LD(e){let{initial:t,animate:r}=ID(e,(0,Rv.useContext)(ns));return(0,Rv.useMemo)(()=>({initial:t,animate:r}),[PD(t),PD(r)])}function PD(e){return Array.isArray(e)?e.join(" "):e}var hc=b(M(),1);var MD=b(M(),1);var bl={};function TD(e){for(let t in e)bl[t]=e[t],ul(t)&&(bl[t].isCSSVariable=!0)}function Iv(e,{layout:t,layoutId:r}){return yo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!bl[e]||e==="opacity")}var r$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o$=Mn.length;function kD(e,t,r){let o="",n=!0;for(let a=0;a<o$;a++){let i=Mn[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=Fp(s,vl[i]);if(!l){n=!1;let c=r$[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function pc(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(yo.has(l)){i=!0;continue}else if(ul(l)){n[l]=u;continue}else{let c=Fp(u,vl[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=kD(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 mc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jS(e,t,r){for(let o in t)!Be(t[o])&&!Iv(o,r)&&(e[o]=t[o])}function n$({transformTemplate:e},t){return(0,MD.useMemo)(()=>{let r=mc();return pc(r,t,e),Object.assign({},r.vars,r.style)},[t])}function a$(e,t){let r=e.style||{},o={};return jS(o,r,e),Object.assign(o,n$(e,t)),o}function ED(e,t){let r={},o=a$(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 DD=b(M(),1);var i$={offset:"stroke-dashoffset",array:"stroke-dasharray"},s$={offset:"strokeDashoffset",array:"strokeDasharray"};function AD(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?i$:s$;e[a.offset]=ue.transform(-o);let i=ue.transform(t),s=ue.transform(r);e[a.array]=`${i} ${s}`}function Pv(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(pc(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&&AD(d,n,a,i,!1)}var Lv=()=>({...mc(),attrs:{}});var Tv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ND(e,t,r,o){let n=(0,DD.useMemo)(()=>{let a=Lv();return Pv(a,t,Tv(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};jS(a,e.style,e),n.style={...a,...n.style}}return n}var OD=["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 gc(e){return typeof e!="string"||e.includes("-")?!1:!!(OD.indexOf(e)>-1||/[A-Z]/u.test(e))}function FD(e,t,r,{latestValues:o},n,a=!1){let s=(gc(e)?ND:ED)(t,o,n,e),l=bD(t,typeof e=="string",a),u=e!==hc.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,hc.useMemo)(()=>Be(c)?c.get():c,[c]);return(0,hc.createElement)(e,{...u,children:d})}var qS=b(M(),1);function _D(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function vc(e,t,r,o){if(typeof t=="function"){let[n,a]=_D(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]=_D(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function xc(e){return Be(e)?e.get():e}function l$({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:u$(r,o,n,e),renderState:t()}}function u$(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=xc(a[f]);let{initial:i,animate:s}=e,l=Sl(e),u=bv(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"&&!as(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=vc(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 kv=e=>(t,r)=>{let o=(0,qS.useContext)(ns),n=(0,qS.useContext)(Xi),a=()=>l$(e,t,o,n);return r?a():ca(a)};function yc(e,t,r){let{style:o}=e,n={};for(let a in o)(Be(o[a])||t.style&&Be(t.style[a])||Iv(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var VD=kv({scrapeMotionValuesFromProps:yc,createRenderState:mc});function Mv(e,t,r){let o=yc(e,t,r);for(let n in e)if(Be(e[n])||Be(t[n])){let a=Mn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var BD=kv({scrapeMotionValuesFromProps:Mv,createRenderState:Lv});var HD=Symbol.for("motionComponentSymbol");var UD=b(M(),1);function Qa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zD(e,t,r){return(0,UD.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Qa(r)&&(r.current=o))},[t])}var oo=b(M(),1);var wc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var c$="framerAppearId",Ev="data-"+wc(c$);var GD=b(M(),1),Av=(0,GD.createContext)({});function WD(e,t,r,o,n){let{visualElement:a}=(0,oo.useContext)(ns),i=(0,oo.useContext)(Cv),s=(0,oo.useContext)(Xi),l=(0,oo.useContext)(rs).reducedMotion,u=(0,oo.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,oo.useContext)(Av);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&d$(u.current,r,n,d);let f=(0,oo.useRef)(!1);(0,oo.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[Ev],m=(0,oo.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return nc(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),(0,oo.useEffect)(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),m.current=!1),c.enteringChildren=void 0)}),c}function d$(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:jD(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Qa(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function jD(e){if(e)return e.options.allowProjection!==!1?e.projection:jD(e.parent)}function Nv(e,{forwardMotionProps:t=!1}={},r,o){r&&CD(r);let n=gc(e)?BD:VD;function a(s,l){let u,c={...(0,Cc.useContext)(rs),...s,layoutId:f$(s)},{isStatic:d}=c,f=LD(s),p=n(s,d);if(!d&&oc){p$(c,r);let m=m$(c);u=m.MeasureLayout,f.visualElement=WD(e,p,c,o,m.ProjectionNode)}return(0,Dv.jsxs)(ns.Provider,{value:f,children:[u&&f.visualElement?(0,Dv.jsx)(u,{visualElement:f.visualElement,...c}):null,FD(e,s,zD(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,Cc.forwardRef)(a);return i[HD]=e,i}function f$({layoutId:e}){let t=(0,Cc.useContext)(rc).id;return t&&e!==void 0?t+"-"+e:e}function p$(e,t){let r=(0,Cc.useContext)(Cv).strict}function m$(e){let{drag:t,layout:r}=Xa;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function qD(e,t){if(typeof Proxy>"u")return Nv;let r=new Map,o=(a,i)=>Nv(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,Nv(i,void 0,e,t)),r.get(i))})}var lN=b(M(),1);function Ov({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function $D({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function KD(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 $S(e){return e===void 0||e===1}function Fv({scale:e,scaleX:t,scaleY:r}){return!$S(e)||!$S(t)||!$S(r)}function Za(e){return Fv(e)||KS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KS(e){return XD(e.x)||XD(e.y)}function XD(e){return e&&e!=="0%"}function Wp(e,t,r){let o=e-r,n=t*o;return r+n}function YD(e,t,r,o,n){return n!==void 0&&(e=Wp(e,n,o)),Wp(e,r,o)+t}function XS(e,t=0,r=1,o,n){e.min=YD(e.min,t,r,o,n),e.max=YD(e.max,t,r,o,n)}function YS(e,{x:t,y:r}){XS(e.x,t.translate,t.scale,t.originPoint),XS(e.y,r.translate,r.scale,r.originPoint)}var QD=.999999999999,ZD=1.0000000000001;function eN(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&&Rl(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,YS(e,i)),o&&Za(a.latestValues)&&Rl(e,a.latestValues))}t.x<ZD&&t.x>QD&&(t.x=1),t.y<ZD&&t.y>QD&&(t.y=1)}function is(e,t){e.min=e.min+t,e.max=e.max+t}function JD(e,t,r,o,n=.5){let a=ke(e.min,e.max,n);XS(e,t,r,a,o)}function Rl(e,t){JD(e.x,t.x,t.scaleX,t.scale,t.originX),JD(e.y,t.y,t.scaleY,t.scale,t.originY)}function QS(e,t){return Ov(KD(e.getBoundingClientRect(),t))}function tN(e,t,r){let o=QS(e,r),{scroll:n}=t;return n&&(is(o.x,n.offset.x),is(o.y,n.offset.y)),o}var rN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Il=()=>({x:rN(),y:rN()}),oN=()=>({min:0,max:0}),Ke=()=>({x:oN(),y:oN()});var jp={current:null},_v={current:!1};function nN(){if(_v.current=!0,!!oc)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jp.current=e.matches;e.addEventListener("change",t),t()}else jp.current=!1}var ss=new WeakMap;function aN(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,ro(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,ro(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var iN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Sc=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=qa,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,Le.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=Sl(r),this.isVariantNode=bv(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,ss.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)),_v.current||nN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jp.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),yr(this.notifyUpdate),yr(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=yo.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.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 Xa){let r=Xa[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<iN.length;o++){let n=iN[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=aN(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=ro(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"&&(np(o)||ip(o))?o=parseFloat(o):!US(o)&&Cr.test(r)&&(o=Dp(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=vc(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 za),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){yl.render(this.render)}};var bc=class extends Sc{constructor(){super(...arguments),this.KeyframeResolver=Np}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 Vv(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 g$(e){return window.getComputedStyle(e)}var Rc=class extends bc{constructor(){super(...arguments),this.type="html",this.renderInstance=Vv}readValueFromInstance(t,r){if(yo.has(r))return this.projection?.isProjecting?Pp(r):SS(t,r);{let o=g$(t),n=(ul(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return QS(t,r)}build(t,r,o){pc(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return yc(t,r,o)}};var Bv=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 sN(e,t,r,o){Vv(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(Bv.has(n)?n:wc(n),t.attrs[n])}var Ic=class extends bc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(yo.has(r)){let o=Ap(r);return o&&o.default||0}return r=Bv.has(r)?r:wc(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return Mv(t,r,o)}build(t,r,o){Pv(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){sN(t,r,o,n)}mount(t){this.isSVGTag=Tv(t.tagName),super.mount(t)}};var uN=(e,t)=>gc(e)?new Ic(t):new Rc(t,{allowProjection:e!==lN.Fragment});function ma(e,t,r){let o=e.getProps();return vc(o,t,r!==void 0?r:o.custom,e)}var qp=e=>Array.isArray(e);function h$(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ro(r))}function v$(e){return qp(e)?e[e.length-1]||0:e}function cN(e,t){let r=ma(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=v$(a[i]);h$(e,i,s)}}function dN(e){return!!(Be(e)&&e.add)}function $p(e,t){let r=e.getValue("willChange");if(dN(r))return r.add(t);if(!r&&xr.WillChange){let o=new xr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Hv(e){return e.props[Ev]}var x$=e=>e!==null;function fN(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(x$),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var y$={type:"spring",stiffness:500,damping:25,restSpeed:10},w$=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),C$={type:"keyframes",duration:.8},S$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pN=(e,{keyframes:t})=>t.length>2?C$:yo.has(e)?e.startsWith("scale")?w$(t[1]):y$:S$;function mN({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 Pc=(e,t,r,o={},n,a)=>i=>{let s=hl(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};mN(s)||Object.assign(c,pN(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)&&(dc(c),c.delay===0&&(d=!0)),(xr.instantAnimations||xr.skipAnimations)&&(d=!0,dc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=fN(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new ja(c):new Tp(c)};function b$({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function Lc(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&&b$(u,c))continue;let p={delay:r,...hl(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=Hv(e);if(v){let h=window.MotionHandoffAnimation(v,c,Le);h!==null&&(p.startTime=h,g=!0)}}$p(e,c),d.start(Pc(c,d,f,e.shouldReduceMotion&&Mp.has(c)?{type:!1}:p,e,g));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&cN(e,i)})}),l}function Uv(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 zv(e,t,r={}){let o=ma(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(Lc(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return R$(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 R$(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(zv(l,t,{...i,delay:r+(typeof o=="function"?0:o)+Uv(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function gN(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>zv(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=zv(e,t,r);else{let n=typeof t=="function"?ma(e,t,r.custom):t;o=Promise.all(Lc(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function ZS(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 I$=Gp.length;function JS(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?JS(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<I$;r++){let o=Gp[r],n=e.props[o];(Ya(n)||n===!1)&&(t[o]=n)}return t}var P$=[...Sv].reverse(),L$=Sv.length;function T$(e){return t=>Promise.all(t.map(({animation:r,options:o})=>gN(e,r,o)))}function vN(e){let t=T$(e),r=hN(),o=!0,n=l=>(u,c)=>{let d=ma(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=JS(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let x=0;x<L$;x++){let v=P$[x],h=r[v],y=u[v]!==void 0?u[v]:c[v],w=Ya(y),C=v===l?h.isActive:null;C===!1&&(m=x);let S=y===c[v]&&y!==u[v]&&w;if(S&&o&&e.manuallyAnimateOnMount&&(S=!1),h.protectedKeys={...p},!h.isActive&&C===null||!y&&!h.prevProp||as(y)||typeof y=="boolean")continue;let R=k$(h.prevProp,y),I=R||v===l&&h.isActive&&!S&&w||x>m&&w,L=!1,T=Array.isArray(y)?y:[y],k=T.reduce(n(v),{});C===!1&&(k={});let{prevResolvedValues:E={}}=h,F={...E,...k},N=_=>{I=!0,f.has(_)&&(L=!0,f.delete(_)),h.needsAnimating[_]=!0;let H=e.getValue(_);H&&(H.liveStyle=!1)};for(let _ in F){let H=k[_],A=E[_];if(p.hasOwnProperty(_))continue;let J=!1;qp(H)&&qp(A)?J=!ZS(H,A):J=H!==A,J?H!=null?N(_):f.add(_):H!==void 0&&f.has(_)?N(_):h.protectedKeys[_]=!0}h.prevProp=y,h.prevResolvedValues=k,h.isActive&&(p={...p,...k}),o&&e.blockInitialAnimation&&(I=!1);let B=S&&R;I&&(!B||L)&&d.push(...T.map(_=>{let H={type:v};if(typeof _=="string"&&o&&!B&&e.manuallyAnimateOnMount&&e.parent){let{parent:A}=e,J=ma(A,_);if(A.enteringChildren&&J){let{delayChildren:ae}=J.transition||{};H.delay=Uv(A.enteringChildren,e,ae)}}return{animation:_,options:H}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let v=ma(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 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=hN()}}}function k$(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ZS(t,e):!1}function Pl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hN(){return{animate:Pl(!0),whileInView:Pl(),whileHover:Pl(),whileTap:Pl(),whileDrag:Pl(),whileFocus:Pl(),exit:Pl()}}var Kt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Gv=class extends Kt{constructor(t){super(t),t.animationState||(t.animationState=vN(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();as(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 M$=0,Wv=class extends Kt{constructor(){super(...arguments),this.id=M$++}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 xN={animation:{Feature:Gv},exit:{Feature:Wv}};function Ja(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function ei(e){return{point:{x:e.pageX,y:e.pageY}}}var yN=e=>t=>wl(t)&&e(t,ei(t));function ls(e,t,r,o){return Ja(e,t,yN(r),o)}var bN=1e-4,E$=1-bN,A$=1+bN,RN=.01,D$=0-RN,N$=0+RN;function Ht(e){return e.max-e.min}function IN(e,t,r){return Math.abs(e-t)<=r}function wN(e,t,r,o=.5){e.origin=o,e.originPoint=ke(t.min,t.max,e.origin),e.scale=Ht(r)/Ht(t),e.translate=ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=E$&&e.scale<=A$||isNaN(e.scale))&&(e.scale=1),(e.translate>=D$&&e.translate<=N$||isNaN(e.translate))&&(e.translate=0)}function Tc(e,t,r,o){wN(e.x,t.x,r.x,o?o.originX:void 0),wN(e.y,t.y,r.y,o?o.originY:void 0)}function CN(e,t,r){e.min=r.min+t.min,e.max=e.min+Ht(t)}function PN(e,t,r){CN(e.x,t.x,r.x),CN(e.y,t.y,r.y)}function SN(e,t,r){e.min=t.min-r.min,e.max=e.min+Ht(t)}function kc(e,t,r){SN(e.x,t.x,r.x),SN(e.y,t.y,r.y)}function no(e){return[e("x"),e("y")]}var jv=({current:e})=>e?e.ownerDocument.defaultView:null;var LN=(e,t)=>Math.abs(e-t);function TN(e,t){let r=LN(e.x,t.x),o=LN(e.y,t.y);return Math.sqrt(r**2+o**2)}var Mc=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=tb(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=TN(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;let{point:g}=f,{timestamp:x}=yt;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=eb(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=tb(f.type==="pointercancel"?this.lastMoveEventInfo:eb(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),g&&g(f,v)},!wl(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=ei(t),l=eb(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=yt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,tb(l,this.history)),this.removeListeners=Ln(ls(this.contextWindow,"pointermove",this.handlePointerMove),ls(this.contextWindow,"pointerup",this.handlePointerUp),ls(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),yr(this.updatePoint)}};function eb(e,t){return t?{point:t(e.point)}:e}function kN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tb({point:e},t){return{point:e,delta:kN(e,MN(t)),offset:kN(e,O$(t)),velocity:F$(t,.1)}}function O$(e){return e[0]}function MN(e){return e[e.length-1]}function F$(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=MN(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>Rt(t)));)r--;if(!o)return{x:0,y:0};let a=Bt(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 ON(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 EN(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 FN(e,{top:t,left:r,bottom:o,right:n}){return{x:EN(e.x,r,n),y:EN(e.y,t,o)}}function AN(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 _N(e,t){return{x:AN(e.x,t.x),y:AN(e.y,t.y)}}function VN(e,t){let r=.5,o=Ht(e),n=Ht(t);return n>o?r=Go(t.min,t.max-o,e.min):o>n&&(r=Go(e.min,e.max-n,t.min)),$t(0,1,r)}function BN(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 qv=.35;function HN(e=qv){return e===!1?e=0:e===!0&&(e=qv),{x:DN(e,"left","right"),y:DN(e,"top","bottom")}}function DN(e,t,r){return{min:NN(e,t),max:NN(e,r)}}function NN(e,t){return typeof e=="number"?e:e[t]||0}var _$=new WeakMap,Kv=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(ei(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=OS(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),no(v=>{let h=this.getAxisMotionValue(v).get()||0;if(wr.test(h)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[v];w&&(h=Ht(w)*(parseFloat(h)/100))}}this.originPoint[v]=h}),g&&Le.postRender(()=>g(d,f)),$p(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=V$(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=()=>no(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Mc(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:jv(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&&Le.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||!$v(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=ON(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&&Qa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=FN(o.layoutBox,t):this.constraints=!1,this.elastic=HN(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&no(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=BN(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Qa(t))return!1;let o=t.current;ir(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=tN(o,n.root,this.visualElement.getTransformPagePoint()),i=_N(n.layout.layoutBox,a);if(r){let s=r($D(i));this.hasMutatedConstraints=!!s,s&&(i=Ov(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=no(c=>{if(!$v(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 $p(this.visualElement,t),o.start(Pc(t,o,0,r,this.visualElement,!1))}stopAnimation(){no(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){no(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){no(r=>{let{drag:o}=this.getProps();if(!$v(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(!Qa(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};no(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=VN({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(),no(i=>{if(!$v(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;_$.set(this.visualElement,this);let t=this.visualElement.current,r=ls(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Qa(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()),Le.read(o);let i=Ja(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(no(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=qv,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function $v(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function V$(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Xv=class extends Kt{constructor(t){super(t),this.removeGroupControls=gt,this.removeListeners=gt,this.controls=new Kv(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 UN=e=>(t,r)=>{e&&Le.postRender(()=>e(t,r))},Yv=class extends Kt{constructor(){super(...arguments),this.removePointerDownListener=gt}onPointerDown(t){this.session=new Mc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jv(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:UN(t),onStart:UN(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=ls(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 WN=b(D(),1);var Kp=b(M(),1);var Ec={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ac={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let r=zN(e,t.target.x),o=zN(e,t.target.y);return`${r}% ${o}%`}};var GN={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=Cr.parse(e);if(n.length>5)return o;let a=Cr.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 rb=!1,ob=class extends Kp.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;TD(B$),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),rb&&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,rb=!0,n||t.layoutDependency!==r||r===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(),yl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;rb=!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 Qv(e){let[t,r]=yv(),o=(0,Kp.useContext)(rc);return(0,WN.jsx)(ob,{...e,layoutGroup:o,switchLayoutGroup:(0,Kp.useContext)(Av),isPresent:t,safeToRemove:r})}var B$={borderRadius:{...Ac,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ac,borderTopRightRadius:Ac,borderBottomLeftRadius:Ac,borderBottomRightRadius:Ac,boxShadow:GN};function Zv(e,t,r){let o=Be(e)?e:ro(e);return o.start(Pc("",o,t,r)),o.animation}var jN=(e,t)=>e.depth-t.depth;var Jv=class{constructor(){this.children=[],this.isDirty=!1}add(t){sl(this.children,t),this.isDirty=!0}remove(t){Pn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jN),this.isDirty=!1,this.children.forEach(t)}};function qN(e,t){let r=wt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(yr(o),e(a-t))};return Le.setup(o,!0),()=>yr(o)}var YN=["TopLeft","TopRight","BottomLeft","BottomRight"],H$=YN.length,$N=e=>typeof e=="string"?parseFloat(e):e,KN=e=>typeof e=="number"||ue.test(e);function QN(e,t,r,o,n,a){n?(e.opacity=ke(0,r.opacity??1,U$(o)),e.opacityExit=ke(t.opacity??1,0,z$(o))):a&&(e.opacity=ke(t.opacity??1,r.opacity??1,o));for(let i=0;i<H$;i++){let s=`border${YN[i]}Radius`,l=XN(t,s),u=XN(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||KN(l)===KN(u)?(e[s]=Math.max(ke($N(l),$N(u),o),0),(wr.test(u)||wr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=ke(t.rotate||0,r.rotate||0,o))}function XN(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var U$=ZN(0,.5,dp),z$=ZN(.5,.95,gt);function ZN(e,t,r){return o=>o<e?0:o>t?1:r(Go(e,t,o))}function JN(e,t){e.min=t.min,e.max=t.max}function wo(e,t){JN(e.x,t.x),JN(e.y,t.y)}function nb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function e2(e,t,r,o,n){return e-=t,e=Wp(e,1/r,o),n!==void 0&&(e=Wp(e,1/n,o)),e}function G$(e,t=0,r=1,o=.5,n,a=e,i=e){if(wr.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=e2(e.min,t,r,s,n),e.max=e2(e.max,t,r,s,n)}function t2(e,t,[r,o,n],a,i){G$(e,t[r],t[o],t[n],t.scale,a,i)}var W$=["x","scaleX","originX"],j$=["y","scaleY","originY"];function ab(e,t,r,o){t2(e.x,t,W$,r?r.x:void 0,o?o.x:void 0),t2(e.y,t,j$,r?r.y:void 0,o?o.y:void 0)}function r2(e){return e.translate===0&&e.scale===1}function ib(e){return r2(e.x)&&r2(e.y)}function o2(e,t){return e.min===t.min&&e.max===t.max}function a2(e,t){return o2(e.x,t.x)&&o2(e.y,t.y)}function n2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sb(e,t){return n2(e.x,t.x)&&n2(e.y,t.y)}function lb(e){return Ht(e.x)/Ht(e.y)}function ub(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var ex=class{constructor(){this.members=[]}add(t){sl(this.members,t),t.scheduleRender()}remove(t){if(Pn(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 i2(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 Ll={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cb=["","X","Y","Z"],q$=1e3,$$=0;function db(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function g2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=Hv(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Le,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&g2(o)}function tx({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=$$++,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,to.value&&(Ll.nodes=Ll.calculatedTargetDeltas=Ll.calculatedProjections=0),this.nodes.forEach(Y$),this.nodes.forEach(e8),this.nodes.forEach(t8),this.nodes.forEach(Q$),to.addProjectionMetrics&&to.addProjectionMetrics(Ll)},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 Jv)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new za),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=Cl(i)&&!Vp(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=qN(f,250),Ec.hasAnimatedSinceResize&&(Ec.hasAnimatedSinceResize=!1,this.nodes.forEach(u2)))})}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()||i8,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!sb(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={...hl(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||u2(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(),yr(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(r8),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&&g2(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(s2);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(l2);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(J$),this.nodes.forEach(K$),this.nodes.forEach(X$)):this.nodes.forEach(l2),this.clearAllSnapshots();let s=wt.now();yt.delta=$t(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,xp.update.process(yt),xp.preRender.process(yt),xp.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Z$),this.sharedNodes.forEach(o8)}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&&!Ht(this.snapshot.measuredBox.x)&&!Ht(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&&!ib(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Za(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)),s8(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(l8))){let{scroll:u}=this.root;u&&(is(s.x,u.offset.x),is(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Ke();if(wo(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&&wo(s,i),is(s.x,c.offset.x),is(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=Ke();wo(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&&Rl(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Za(c.latestValues)&&Rl(l,c.latestValues)}return Za(this.latestValues)&&Rl(l,this.latestValues),l}removeTransform(i){let s=Ke();wo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Za(u.latestValues))continue;Fv(u.latestValues)&&u.updateSnapshot();let c=Ke(),d=u.measurePageBox();wo(c,d),ab(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Za(this.latestValues)&&ab(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(),kc(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),wo(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(),PN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wo(this.target,this.layout.layoutBox),YS(this.target,this.targetDelta)):wo(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(),kc(this.relativeTargetOrigin,this.target,f.target),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}to.value&&Ll.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Fv(this.parent.latestValues)||KS(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;wo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;eN(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():(nb(this.prevProjectionDelta.x,this.projectionDelta.x),nb(this.prevProjectionDelta.y,this.projectionDelta.y)),Tc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!ub(this.projectionDelta.x,this.prevProjectionDelta.x)||!ub(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),to.value&&Ll.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=Il(),this.projectionDelta=Il(),this.projectionDeltaWithTransform=Il()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Il();(!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,x=this.getStack(),v=!x||x.members.length<=1,h=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(a8));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;c2(d.x,i.x,C),c2(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),n8(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&a2(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ke()),wo(y,this.relativeTarget)),g&&(this.animationValues=c,QN(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&&(yr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Ec.hasAnimatedSinceResize=!0,Tn.layout++,this.motionValue||(this.motionValue=ro(0)),this.currentAnimation=Zv(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{Tn.layout--},onComplete:()=>{Tn.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(q$),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&&h2(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ke();let d=Ht(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Ht(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}wo(s,l),Rl(s,c),Tc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new ex),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&&db("z",i,u,this.animationValues);for(let c=0;c<cb.length;c++)db(`rotate${cb[c]}`,i,u,this.animationValues),db(`skew${cb[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=xc(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=xc(s?.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=i2(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 bl){if(c[m]===void 0)continue;let{correct:g,applyTo:x,isCSSVariable:v}=bl[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?xc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(s2),this.root.sharedNodes.clear()}}}function K$(e){e.updateLayout()}function X$(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"?no(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ht(d);d.min=r[c].min,d.max=d.min+f}):h2(n,t.layoutBox,r)&&no(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ht(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=Il();Tc(i,r,t.layoutBox);let s=Il();a?Tc(s,e.applyTransform(o,!0),t.measuredBox):Tc(s,r,t.layoutBox);let l=!ib(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();kc(p,t.layoutBox,d.layoutBox);let m=Ke();kc(m,r,f.layoutBox),sb(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 Y$(e){to.value&&Ll.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 Q$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Z$(e){e.clearSnapshot()}function s2(e){e.clearMeasurements()}function l2(e){e.isLayoutDirty=!1}function J$(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function u2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function e8(e){e.resolveTargetDelta()}function t8(e){e.calcProjection()}function r8(e){e.resetSkewAndRotation()}function o8(e){e.removeLeadSnapshot()}function c2(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 d2(e,t,r,o){e.min=ke(t.min,r.min,o),e.max=ke(t.max,r.max,o)}function n8(e,t,r,o){d2(e.x,t.x,r.x,o),d2(e.y,t.y,r.y,o)}function a8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var i8={duration:.45,ease:[.4,0,.1,1]},f2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),p2=f2("applewebkit/")&&!f2("chrome/")?Math.round:gt;function m2(e){e.min=p2(e.min),e.max=p2(e.max)}function s8(e){m2(e.x),m2(e.y)}function h2(e,t,r){return e==="position"||e==="preserve-aspect"&&!IN(lb(t),lb(r),.2)}function l8(e){return e!==e.root&&e.scroll?.wasRoot}var v2=tx({attachResizeListener:(e,t)=>Ja(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var fb={current:void 0},rx=tx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fb.current){let e=new v2({});e.mount(window),e.setOptions({layoutScroll:!0}),fb.current=e}return fb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var x2={pan:{Feature:Yv},drag:{Feature:Xv,ProjectionNode:rx,MeasureLayout:Qv}};function y2(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&&Le.postRender(()=>a(t,ei(t)))}var ox=class extends Kt{mount(){let{current:t}=this.node;t&&(this.unmount=FS(t,(r,o)=>(y2(this.node,o,"Start"),n=>y2(this.node,n,"End"))))}unmount(){}};var nx=class extends Kt{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=Ln(Ja(this.node.current,"focus",()=>this.onFocus()),Ja(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function w2(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&&Le.postRender(()=>a(t,ei(t)))}var ax=class extends Kt{mount(){let{current:t}=this.node;t&&(this.unmount=BS(t,(r,o)=>(w2(this.node,o,"Start"),(n,{success:a})=>w2(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var mb=new WeakMap,pb=new WeakMap,u8=e=>{let t=mb.get(e.target);t&&t(e)},c8=e=>{e.forEach(u8)};function d8({root:e,...t}){let r=e||document;pb.has(r)||pb.set(r,{});let o=pb.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(c8,{root:e,...t})),o[n]}function C2(e,t,r){let o=d8(t);return mb.set(e,r),o.observe(e),()=>{mb.delete(e),o.unobserve(e)}}var f8={some:0,all:1},ix=class extends Kt{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:f8[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 C2(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(p8(t,r))&&this.startObserver()}unmount(){}};function p8({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var S2={inView:{Feature:ix},tap:{Feature:ax},focus:{Feature:nx},hover:{Feature:ox}};var b2={layout:{ProjectionNode:rx,MeasureLayout:Qv}};var R2={...xN,...S2,...x2,...b2};var He=qD(R2,uN);var Dc=b(M(),1);function Nc(e){let t=ca(()=>ro(e)),{isStatic:r}=(0,Dc.useContext)(rs);if(r){let[,o]=(0,Dc.useState)(e);(0,Dc.useEffect)(()=>t.on("change",o),[])}return t}function sx(e,t){let r=Nc(t()),o=()=>r.set(t());return o(),nc(()=>{let n=()=>Le.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),yr(o)}}),r}function I2(e){xl.current=[],e();let t=sx(xl.current,e);return xl.current=void 0,t}function gb(e,t,r,o){if(typeof e=="function")return I2(e);let n=typeof t=="function"?t:HS(t,r,o);return Array.isArray(e)?P2(e,n):P2([e],([a])=>n(a))}function P2(e,t){let r=ca(()=>[]);return sx(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function Xp(e){return typeof e=="object"&&!Array.isArray(e)}function lx(e,t,r,o){return typeof e=="string"&&Xp(t)?Op(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function L2(e,t,r){return e*(t+1)}function hb(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 m8(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(Pn(e,n),o--)}}function T2(e,t,r,o,n,a){m8(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,o[i]),easing:gp(r,i)})}function k2(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function M2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var g8="easeInOut",h8=20;function D2(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,hb(d,m.at,c,u));continue}let[g,x,v={}]=m;v.at!==void 0&&(d=hb(d,v.at,c,u));let h=0,y=(w,C,S,R=0,I=0)=>{let L=v8(w),{delay:T=0,times:k=Ip(L),type:E="keyframes",repeat:F,repeatType:N,repeatDelay:B=0,...O}=C,{ease:_=t.ease||"easeOut",duration:H}=C,A=typeof T=="function"?T(R,I):T,J=L.length,ae=gl(E)?E:n?.[E||"keyframes"];if(J<=2&&ae){let X=100;if(J===2&&w8(L)){let ne=L[1]-L[0];X=Math.abs(ne)}let ce={...O};H!==void 0&&(ce.duration=Rt(H));let z=Sp(ce,X,ae);_=z.ease,H=z.duration}H??(H=a);let V=d+A;k.length===1&&k[0]===0&&(k[1]=1);let Y=k.length-L.length;if(Y>0&&Rp(k,Y),L.length===1&&L.unshift(null),F){ir(F<h8,"Repeat count too high, must be less than 20","repeat-count-high"),H=L2(H,F);let X=[...L],ce=[...k];_=Array.isArray(_)?[..._]:[_];let z=[..._];for(let ne=0;ne<F;ne++){L.push(...X);for(let he=0;he<X.length;he++)k.push(ce[he]+(ne+1)),_.push(he===0?"linear":gp(z,he-1))}k2(k,F)}let re=V+H;T2(S,L,_,k,V,re),h=Math.max(A+H,h),f=Math.max(re,f)};if(Be(g)){let w=E2(g,s);y(x,v,A2("default",w))}else{let w=lx(g,x,o,l),C=w.length;for(let S=0;S<C;S++){x=x,v=v;let R=w[S],I=E2(R,s);for(let L in x)y(x[L],x8(v,L),A2(L,I),S,C)}}c=d,d+=h}return s.forEach((p,m)=>{for(let g in p){let x=p[g];x.sort(M2);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(Go(0,f,S)),y.push(I||"easeOut")}h[0]!==0&&(h.unshift(0),v.unshift(v[0]),y.unshift(g8)),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,...r}}}),i}function E2(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function A2(e,t){return t[e]||(t[e]=[]),t[e]}function v8(e){return Array.isArray(e)?e:[e]}function x8(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var y8=e=>typeof e=="number",w8=e=>e.every(y8);function C8(e,t){return e in t}var ux=class extends Sc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(C8(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 N2(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Cl(e)&&!Vp(e)?new Ic(t):new Rc(t);r.mount(e),ss.set(e,r)}function O2(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new ux(t);r.mount(e),ss.set(e,r)}function S8(e,t){return Be(e)||typeof e=="number"||typeof e=="string"&&!Xp(t)}function cx(e,t,r,o){let n=[];if(S8(e,t))n.push(Zv(e,Xp(t)&&t.default||t,r&&(r.default||r)));else{let a=lx(e,t,o),i=a.length;ir(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];ir(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?N2:O2;ss.has(l)||u(l);let c=ss.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...Lc(c,{...t,transition:d},{}))}}return n}function F2(e,t,r){let o=[];return D2(e,t,r,{spring:Wa}).forEach(({keyframes:a,transition:i},s)=>{o.push(...cx(s,a,i))}),o}function b8(e){return Array.isArray(e)&&e.some(Array.isArray)}function _2(e){function t(r,o,n){let a=[],i;if(b8(r))a=F2(r,o,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=cx(r,o,u,e)}let s=new kp(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{Pn(e.animations,s)})),s}return t}var vb=_2();var iSe=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"}}),En={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}},dx={lift:{y:-2,transition:En.smooth},scale:{scale:1.05,transition:En.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:En.smooth},rotate:{rotate:2,transition:En.bouncy}},V2={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},sSe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:En.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:En.smooth}},lSe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:En.smooth}}},uSe={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:En.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:En.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:En.smooth}},B2={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var cSe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:En.bouncy};var us=b(D()),H2=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"}}),xb=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"?dx.scale:a==="glow"?dx.glow:dx.lift,whileTap:V2.scale};return(0,us.jsx)(He.div,{ref:s,className:P("moonui-theme",H2({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,us.jsx)("div",{ref:s,className:P("moonui-theme",H2({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});xb.displayName="Card";var yb=Tl.forwardRef(({className:e,...t},r)=>(0,us.jsx)("div",{ref:r,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));yb.displayName="CardHeader";var wb=Tl.forwardRef(({className:e,...t},r)=>(0,us.jsx)("h3",{ref:r,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));wb.displayName="CardTitle";var Cb=Tl.forwardRef(({className:e,...t},r)=>(0,us.jsx)("p",{ref:r,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));Cb.displayName="CardDescription";var Sb=Tl.forwardRef(({className:e,...t},r)=>(0,us.jsx)("div",{ref:r,className:P("moonui-theme","p-6 pt-0",e),...t}));Sb.displayName="CardContent";var bb=Tl.forwardRef(({className:e,...t},r)=>(0,us.jsx)("div",{ref:r,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));bb.displayName="CardFooter";var xO=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 sr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function fx(e,t){let r=Te(e);if(isNaN(t))return sr(e,NaN);if(!t)return r;let o=r.getDate(),n=sr(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 R8=Math.pow(10,8)*24*60*60*1e3,bSe=-R8,px=6048e5,U2=864e5;var I8=3600;var z2=I8*24,RSe=z2*7,P8=z2*365.2425,L8=P8/12,ISe=L8*3;var T8={};function ga(){return T8}function An(e,t){let r=ga(),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 kl(e){return An(e,{weekStartsOn:1})}function mx(e){let t=Te(e),r=t.getFullYear(),o=sr(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=kl(o),a=sr(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=kl(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Oc(e){let t=Te(e);return t.setHours(0,0,0,0),t}function Rb(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 G2(e,t){let r=Oc(e),o=Oc(t),n=+r-Rb(r),a=+o-Rb(o);return Math.round((n-a)/U2)}function W2(e){let t=mx(e),r=sr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),kl(r)}function j2(e){return sr(e,Date.now())}function Ml(e,t){let r=Oc(e),o=Oc(t);return+r==+o}function q2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gx(e){if(!q2(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function $2(e){let t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function hx(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 K2(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function X2(e){let t=Te(e),r=sr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Y2(e,t){let r=ga(),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 k8={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"}},Q2=(e,t,r)=>{let o,n=k8[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 vx(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var M8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},A8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Z2={date:vx({formats:M8,defaultWidth:"full"}),time:vx({formats:E8,defaultWidth:"full"}),dateTime:vx({formats:A8,defaultWidth:"full"})};var D8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},J2=(e,t,r,o)=>D8[e];function Fc(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 N8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},O8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},F8={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"]},_8={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"]},V8={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"}},B8={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"}},H8=(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"},eO={ordinalNumber:H8,era:Fc({values:N8,defaultWidth:"wide"}),quarter:Fc({values:O8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fc({values:F8,defaultWidth:"wide"}),day:Fc({values:_8,defaultWidth:"wide"}),dayPeriod:Fc({values:V8,defaultWidth:"wide",formattingValues:B8,defaultFormattingWidth:"wide"})};function _c(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)?z8(s,d=>d.test(i)):U8(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 U8(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function z8(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function tO(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 G8=/^(\d+)(th|st|nd|rd)?/i,W8=/\d+/i,j8={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},q8={any:[/^b/i,/^(a|c)/i]},$8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K8={any:[/1/i,/2/i,/3/i,/4/i]},X8={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},Y8={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]},Q8={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},Z8={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]},J8={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},e9={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}},rO={ordinalNumber:tO({matchPattern:G8,parsePattern:W8,valueCallback:e=>parseInt(e,10)}),era:_c({matchPatterns:j8,defaultMatchWidth:"wide",parsePatterns:q8,defaultParseWidth:"any"}),quarter:_c({matchPatterns:$8,defaultMatchWidth:"wide",parsePatterns:K8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_c({matchPatterns:X8,defaultMatchWidth:"wide",parsePatterns:Y8,defaultParseWidth:"any"}),day:_c({matchPatterns:Q8,defaultMatchWidth:"wide",parsePatterns:Z8,defaultParseWidth:"any"}),dayPeriod:_c({matchPatterns:J8,defaultMatchWidth:"any",parsePatterns:e9,defaultParseWidth:"any"})};var Ib={code:"en-US",formatDistance:Q2,formatLong:Z2,formatRelative:J2,localize:eO,match:rO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function oO(e){let t=Te(e);return G2(t,X2(t))+1}function nO(e){let t=Te(e),r=+kl(t)-+W2(t);return Math.round(r/px)+1}function xx(e,t){let r=Te(e),o=r.getFullYear(),n=ga(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=sr(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=An(i,t),l=sr(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=An(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function aO(e,t){let r=ga(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=xx(e,t),a=sr(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),An(a,t)}function iO(e,t){let r=Te(e),o=+An(r,t)-+aO(r,t);return Math.round(o/px)+1}function Ue(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var ti={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 Vc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pb={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 ti.y(e,t)},Y:function(e,t,r,o){let n=xx(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=mx(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 ti.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=iO(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ue(n,t.length)},I:function(e,t,r){let o=nO(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"}):ti.d(e,t)},D:function(e,t,r){let o=oO(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=Vc.noon:o===0?n=Vc.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=Vc.evening:o>=12?n=Vc.afternoon:o>=4?n=Vc.morning:n=Vc.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 ti.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ti.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"}):ti.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ti.s(e,t)},S:function(e,t){return ti.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return lO(o);case"XXXX":case"XX":return El(o);case"XXXXX":case"XXX":default:return El(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return lO(o);case"xxxx":case"xx":return El(o);case"xxxxx":case"xxx":default:return El(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+sO(o,":");case"OOOO":default:return"GMT"+El(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+sO(o,":");case"zzzz":default:return"GMT"+El(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 sO(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 lO(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):El(e,t)}function El(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 uO=(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"})}},cO=(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"})}},t9=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return uO(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}}",uO(o,t)).replace("{{time}}",cO(n,t))},dO={p:cO,P:t9};var r9=/^D+$/,o9=/^Y+$/,n9=["D","DD","YY","YYYY"];function fO(e){return r9.test(e)}function pO(e){return o9.test(e)}function mO(e,t,r){let o=a9(e,t,r);if(console.warn(o),n9.includes(e))throw new RangeError(o)}function a9(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 i9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l9=/^'([^]*?)'?$/,u9=/''/g,c9=/[a-zA-Z]/;function jo(e,t,r){let o=ga(),n=r?.locale??o.locale??Ib,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(!gx(s))throw new RangeError("Invalid time value");let l=t.match(s9).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=dO[d];return f(c,n.formatLong)}return c}).join("").match(i9).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:d9(c)};if(Pb[d])return{isToken:!0,value:c};if(d.match(c9))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&&pO(d)||!r?.useAdditionalDayOfYearTokens&&fO(d))&&mO(d,t,String(e));let f=Pb[d[0]];return f(s,d,n.localize,u)}).join("")}function d9(e){let t=e.match(l9);return t?t[1].replace(u9,"'"):e}function Lb(e){return Te(e).getDay()}function gO(e,t){let r=Te(e),o=Te(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function hO(e){return Ml(e,j2(e))}function vO(e,t){return fx(e,-t)}var _r=b(D());function Bc({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]=xO.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(vO(c,1))},m=()=>{d(fx(c,1))},g=S=>{if(!o?.(S)){if(e==="single")r?.(S);else if(e==="range"){let R=t;!R?.from||R.from&&R.to?r?.({from:S,to:void 0}):S<R.from?r?.({from:S,to:R.from}):r?.({from:R.from,to:S})}}},x=S=>{if(!t)return!1;if(e==="single")return Ml(S,t);if(e==="range"){let R=t;return R.from&&R.to?S>=R.from&&S<=R.to:R.from?Ml(S,R.from):!1}return!1},v=S=>{if(e!=="range"||!t)return!1;let R=t;return R.from?Ml(S,R.from):!1},h=S=>{if(e!=="range"||!t)return!1;let R=t;return R.to?Ml(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=K2(c),R=$2(c),I=hx({start:S,end:R}),L=Lb(S),T=[];if(L>0&&n){let N=An(S),B=new Date(S);B.setDate(B.getDate()-1),T.push(...hx({start:N,end:B}))}let k=Lb(R),E=[];if(k<6&&n){let N=new Date(R);N.setDate(N.getDate()+1);let B=Y2(R);E.push(...hx({start:N,end:B}))}let F=[];if(!n&&L>0)for(let N=0;N<L;N++)F.push(null);return[...T,...F,...I,...E]})();return(0,_r.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,_r.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,_r.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,_r.jsx)(bn,{className:"h-5 w-5"})}),(0,_r.jsx)("h2",{className:"text-base font-medium",children:jo(c,"MMMM yyyy")}),(0,_r.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,_r.jsx)(Or,{className:"h-5 w-5"})})]}),(0,_r.jsxs)("div",{className:"px-6 pb-4",children:[(0,_r.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((S,R)=>(0,_r.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,_r.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((S,R)=>{if(!S)return(0,_r.jsx)("div",{className:"h-10 w-10"},`empty-${R}`);let I=!gO(S,c),L=o?.(S)||!1,T=x(S),k=hO(S),E=v(S),F=h(S),N=y(S);return(0,_r.jsx)("button",{onClick:()=>g(S),disabled:L,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",L&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!N&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",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",E&&"rounded-r-none",F&&"rounded-l-none"),type:"button",children:jo(S,"d")},S.toISOString())})})]})]})}Bc.displayName="Calendar";var Al=b(M());var cs=b(D()),f9=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"},yO=(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},Tb=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=f9(d);l(f);let p=f==="amex"?15:16,m=d.slice(0,p),g=yO(m,f);r?.(m,f),c.target.value=g};return(0,cs.jsxs)("div",{className:"relative",children:[(0,cs.jsx)(lr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:yO(t,s),onChange:u,className:P(o&&"pl-10",e),...a}),o&&(0,cs.jsx)(Af,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});Tb.displayName="CardNumberInput";var kb=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,cs.jsx)(lr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});kb.displayName="CardExpiryInput";var Mb=Al.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,cs.jsx)(lr,{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})});Mb.displayName="CardCVCInput";var Eb=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,cs.jsx)(lr,{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})});Eb.displayName="CardZipInput";var It=b(M());var qo=b(M(),1);function p9(e){return Object.prototype.toString.call(e)==="[object Object]"}function wO(e){return p9(e)||Array.isArray(e)}function SO(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function yx(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}`:!wO(s)||!wO(l)?s===l:yx(s,l)})}function CO(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function bO(e,t){if(e.length!==t.length)return!1;let r=CO(e),o=CO(t);return r.every((n,a)=>{let i=o[a];return yx(n,i)})}function Nb(e){return typeof e=="number"}function Ab(e){return typeof e=="string"}function wx(e){return typeof e=="boolean"}function RO(e){return Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return Math.abs(e)}function Ob(e){return Math.sign(e)}function Qp(e,t){return ht(e-t)}function m9(e,t){if(e===0||t===0||ht(e)<=ht(t))return 0;let r=Qp(ht(e),ht(t));return ht(r/e)}function g9(e){return Math.round(e*100)/100}function Zp(e){return Jp(e).map(Number)}function Dn(e){return e[tm(e)]}function tm(e){return Math.max(0,e.length-1)}function Fb(e,t){return t===tm(e)}function IO(e,t=0){return Array.from(Array(e),(r,o)=>t+o)}function Jp(e){return Object.keys(e)}function PO(e,t){return[e,t].reduce((r,o)=>(Jp(o).forEach(n=>{let a=r[n],i=o[n],s=RO(a)&&RO(i);r[n]=s?PO(a,i):i}),r),{})}function Db(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function h9(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 Ab(e)?r[e](l):e(t,l,u)}return{measure:i}}function em(){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 v9(e,t,r,o){let n=em(),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,r(),r());let v=x-i;for(i=x,s+=v;s>=a;)r(),s-=a;let h=s/a;o(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:r,render:o}}function x9(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:x}=m;return o?g:x}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 Dl(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 LO(e,t,r){let{constrain:o}=Dl(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 LO(e,s(),r)}let d={get:s,set:l,add:u,clone:c};return d}function y9(e,t,r,o,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=em(),I=em(),L=Dl(50,225).constrain(p.measure(20)),T={mouse:300,touch:400},k={mouse:500,touch:600},E=m?43:25,F=!1,N=0,B=0,O=!1,_=!1,H=!1,A=!1;function J(K){if(!h)return;function Ie(ie){(wx(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=A?r: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 re(){return(m?k:T)[A?"mouse":"touch"]}function X(K,Ie){let ee=d.add(Ob(K)*-1),ie=c.byDistance(K,!m).distance;return m||ht(K)<L?ie:x&&Ie?ie*.5:c.byIndex(ee.get(),0).distance}function ce(K){let Ie=Db(K,o);A=Ie,H=m&&Ie&&!K.buttons&&F,F=Qp(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),B=a.readPoint(K,y),f.emit("pointerDown")))}function z(K){if(!Db(K,o)&&K.touches.length>=2)return ne(K);let ee=a.readPoint(K),ie=a.readPoint(K,y),Ge=Qp(ee,N),Xe=Qp(ie,B);if(!_&&!A&&(!K.cancelable||(_=Ge>Xe,!_)))return ne(K);let Tt=a.pointerMove(K);Ge>g&&(H=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(Tt)),K.preventDefault()}function ne(K){let ee=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(K)*re(),Ge=X(w(ie),ee),Xe=m9(ie,Ge),Tt=E-10*Xe,Oe=v+Xe/50;_=!1,O=!1,I.clear(),u.useDuration(Tt).useFriction(Oe),l.distance(Ge,!m),A=!1,f.emit("pointerUp")}function he(K){H&&(K.stopPropagation(),K.preventDefault(),H=!1)}function xe(){return O}return{init:J,destroy:ae,pointerDown:xe}}function w9(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(Db(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 C9(){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 S9(e){function t(o){return e*(o/100)}return{measure:t}}function b9(e,t,r,o,n,a,i){let s=[e].concat(o),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=o.map(f);function v(h){for(let y of h){if(d)return;let w=y.target===e,C=o.indexOf(y.target),S=w?u:c[C],R=f(w?e:o[C]);if(ht(R-S)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(h=>{(wx(a)||a(x,h))&&v(h)}),r.requestAnimationFrame(()=>{s.forEach(h=>l.observe(h))})}function m(){d=!0,l&&l.disconnect()}return{init:p,destroy:m}}function R9(e,t,r,o,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let S=o.get()-e.get(),R=!l,I=0;return R?(i=0,r.set(o),e.set(o),I=S):(r.set(e),i+=S/l,i*=u,c+=i,e.add(i),I=c-d),s=Ob(I),d=c,C}function p(){let S=o.get()-t.get();return ht(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 I9(e,t,r,o,n){let a=n.measure(10),i=n.measure(50),s=Dl(.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()),x=r.get()-t.get(),v=s.constrain(g/i);r.subtract(x*v),!p&&ht(x)<a&&(r.set(e.constrain(r.get())),o.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function P9(e,t,r,o,n){let a=Dl(-t+e,0),i=d(),s=c(),l=f();function u(m,g){return Qp(m,g)<=1}function c(){let m=i[0],g=Dn(i),x=i.lastIndexOf(m),v=i.indexOf(g)+1;return Dl(x,v)}function d(){return r.map((m,g)=>{let{min:x,max:v}=a,h=a.constrain(m),y=!g,w=Fb(r,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(o==="keepSnaps")return i;let{min:m,max:g}=s;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:s}}function L9(e,t,r){let o=t[0],n=r?o-e:Dn(t);return{limit:Dl(n,o)}}function T9(e,t,r,o){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Dl(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 k9(e){let{max:t,length:r}=e;function o(a){let i=a-t;return r?i/-r:0}return{get:o}}function M9(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=>Dn(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,x)=>g+l[x])}return{snaps:u,snapsAligned:c}}function E9(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,x)=>{let v=!g,h=Fb(x,g);if(v){let y=Dn(x[0])+1;return IO(y)}if(h){let y=tm(a)-Dn(x)[0]+1;return IO(y,Dn(x)[0])}return m})}return{slideRegistry:u}}function A9(e,t,r,o,n){let{reachedAny:a,removeOffset:i,constrain:s}=o;function l(m){return m.concat().sort((g,x)=>ht(g)-ht(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)=>ht(h.diff)-ht(y.diff)),{index:v}=x[0];return{index:v,distance:g}}function c(m,g){let x=[m,m+r,m-r];if(!e)return m;if(!g)return l(x);let v=x.filter(h=>Ob(h)===g);return v.length?l(v):Dn(x)-r}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 D9(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 N9(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 h=r.findIndex(y=>y.includes(g));Nb(h)&&(n.useDuration(0),o.index(h,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((g,x)=>{a.add(g,"focus",v=>{(wx(s)||s(p,v))&&m(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Yp(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 Nb(l)?l:l.get()}return{get:r,set:o,add:n,subtract:a}}function TO(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=g9(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 O9(e,t,r,o,n,a,i,s,l){let c=Zp(n),d=Zp(n).reverse(),f=v().concat(h());function p(R,I){return R.reduce((L,T)=>L-n[T],I)}function m(R,I){return R.reduce((L,T)=>p(L,I)>0?L.concat([T]):L,[])}function g(R){return a.map((I,L)=>({start:I-o[L]+.5+R,end:I+t-.5+R}))}function x(R,I,L){let T=g(I);return R.map(k=>{let E=L?0:-r,F=L?r:0,N=L?"end":"start",B=T[k][N];return{index:k,loopPoint:B,slideLocation:Yp(-1),translate:TO(e,l[k]),target:()=>s.get()>B?E:F}})}function v(){let R=i[0],I=m(d,R);return x(I,r,!1)}function h(){let R=t-i[0]-1,I=m(c,R);return x(I,-r,!0)}function y(){return f.every(({index:R})=>{let I=c.filter(L=>L!==R);return p(I,t)<=.1})}function w(){f.forEach(R=>{let{target:I,translate:L,slideLocation:T}=R,k=I();k!==T.get()&&(L.to(k),T.set(k))})}function C(){f.forEach(R=>R.translate.clear())}return{canLoop:y,clear:C,loop:w,loopPoints:f}}function F9(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||(wx(r)||r(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),n=!0}return{init:a,destroy:i}}function _9(e,t,r,o){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,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 Jp(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 V9(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=x();function m(){if(!u)return 0;let h=r[0];return ht(t[s]-h[s])}function g(){if(!u)return 0;let h=a.getComputedStyle(Dn(o));return parseFloat(h.getPropertyValue(`margin-${l}`))}function x(){return r.map((h,y,w)=>{let C=!y,S=Fb(w,y);return C?f[y]+c:S?f[y]+d:w[y+1][s]-h[s]}).map(ht)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function B9(e,t,r,o,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=Nb(r);function p(v,h){return Zp(v).filter(y=>y%h===0).map(y=>v.slice(y,y+h))}function m(v){return v.length?Zp(v).reduce((h,y,w)=>{let C=Dn(h)||0,S=C===0,R=y===tm(v),I=n[u]-a[C][u],L=n[u]-a[y][c],T=!o&&S?d(i):0,k=!o&&R?d(s):0,E=ht(L-k-(I+T));return w&&E>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,r):m(v)}return{groupSlides:g}}function H9(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:x,skipSnaps:v,containScroll:h,watchResize:y,watchSlides:w,watchDrag:C,watchFocus:S}=a,R=2,I=C9(),L=I.measure(t),T=r.map(I.measure),k=x9(l,u),E=k.measureSize(L),F=S9(E),N=h9(s,E),B=!d&&!!h,O=d||!!h,{slideSizes:_,slideSizesWithGaps:H,startGap:A,endGap:J}=V9(k,L,T,r,O,n),ae=B9(k,E,x,d,L,T,A,J,R),{snaps:V,snapsAligned:Y}=M9(k,N,L,T,ae),re=-Dn(V)+Dn(H),{snapsContained:X,scrollContainLimit:ce}=P9(E,re,Y,h,R),z=B?X:Y,{limit:ne}=L9(re,z,d),he=LO(tm(z),c,d),xe=he.clone(),pe=Zp(r),K=({dragHandler:wi,scrollBody:bd,scrollBounds:Rd,options:{loop:Ao}})=>{Ao||Rd.constrain(wi.pointerDown()),bd.seek()},Ie=({scrollBody:wi,translate:bd,location:Rd,offsetLocation:Ao,previousLocation:Id,scrollLooper:i0,slideLooper:H4,dragHandler:U4,animation:z4,eventHandler:g1,scrollBounds:G4,options:{loop:h1}},v1)=>{let x1=wi.settled(),W4=!G4.shouldConstrain(),y1=h1?x1:x1&&W4,w1=y1&&!U4.pointerDown();w1&&z4.stop();let j4=Rd.get()*v1+Id.get()*(1-v1);Ao.set(j4),h1&&(i0.loop(wi.direction()),H4.loop()),bd.to(Ao.get()),w1&&g1.emit("settle"),y1||g1.emit("scroll")},ee=v9(o,n,()=>K(cu),wi=>Ie(cu,wi)),ie=.68,Ge=z[he.get()],Xe=Yp(Ge),Tt=Yp(Ge),Oe=Yp(Ge),St=Yp(Ge),Xn=R9(Xe,Oe,Tt,St,f,ie),Mr=A9(d,z,re,ne,St),fn=D9(ee,he,xe,Xn,Mr,St,i),Eo=k9(ne),pn=em(),Yn=_9(t,r,i,g),{slideRegistry:Qn}=E9(B,h,z,ce,ae,pe),ng=N9(e,r,Qn,fn,Xn,pn,i,S),cu={ownerDocument:o,ownerWindow:n,eventHandler:i,containerRect:L,slideRects:T,animation:ee,axis:k,dragHandler:y9(k,e,o,n,St,w9(k,n),Xe,ee,fn,Xn,Mr,he,i,F,p,m,v,ie,C),eventStore:pn,percentOfView:F,index:he,indexPrevious:xe,limit:ne,location:Xe,offsetLocation:Oe,previousLocation:Tt,options:a,resizeHandler:b9(t,i,n,r,k,y,I),scrollBody:Xn,scrollBounds:I9(ne,Oe,St,Xn,F),scrollLooper:T9(re,ne,Oe,[Xe,Oe,Tt,St]),scrollProgress:Eo,scrollSnapList:z.map(Eo.get),scrollSnaps:z,scrollTarget:Mr,scrollTo:fn,slideLooper:O9(k,E,re,_,H,V,z,Oe,r),slideFocus:ng,slidesHandler:F9(t,i,w),slidesInView:Yn,slideIndexes:pe,slideRegistry:Qn,slidesToScroll:ae,target:St,translate:TO(k,t)};return cu}function U9(){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 z9={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 G9(e){function t(a,i){return PO(a,i||{})}function r(a){let i=a.breakpoints||{},s=Jp(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=>Jp(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:o}}function W9(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 rm(e,t,r){let o=e.ownerDocument,n=o.defaultView,a=G9(n),i=W9(a),s=em(),l=U9(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=l,g=k,x=!1,v,h=u(z9,rm.globalOptions),y=u(h),w=[],C,S,R;function I(){let{container:pe,slides:K}=y;S=(Ab(pe)?e.querySelector(pe):pe)||e.children[0];let ee=Ab(K)?S.querySelectorAll(K):K;R=[].slice.call(ee||S.children)}function L(pe){let K=H9(e,S,R,o,n,pe,l);if(pe.loop&&!K.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return L(Ie)}return K}function T(pe,K){x||(h=u(h,pe),y=c(h),w=K||w,I(),v=L(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();E(),T(u({startIndex:Ie},pe),K),l.emit("reInit")}function E(){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(),E(),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 B(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 H(){return v.index.add(-1).get()!==ae()}function A(){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 re(){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:H,containerNode:ne,internalEngine:ce,destroy:F,off:p,on:f,emit:m,plugins:X,previousScrollSnap:V,reInit:g,rootNode:z,scrollNext:B,scrollPrev:O,scrollProgress:J,scrollSnapList:A,scrollTo:N,selectedScrollSnap:ae,slideNodes:he,slidesInView:Y,slidesNotInView:re};return T(t,r),setTimeout(()=>l.emit("init"),0),xe}rm.globalOptions=void 0;function Cx(e={},t=[]){let r=(0,qo.useRef)(e),o=(0,qo.useRef)(t),[n,a]=(0,qo.useState)(),[i,s]=(0,qo.useState)(),l=(0,qo.useCallback)(()=>{n&&n.reInit(r.current,o.current)},[n]);return(0,qo.useEffect)(()=>{yx(r.current,e)||(r.current=e,l())},[e,l]),(0,qo.useEffect)(()=>{bO(o.current,t)||(o.current=t,l())},[t,l]),(0,qo.useEffect)(()=>{if(SO()&&i){rm.globalOptions=Cx.globalOptions;let u=rm(i,r.current,o.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Cx.globalOptions=void 0;var Co=b(D()),kO=It.createContext(null);function Hc(){let e=It.useContext(kO);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var _b=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]=Cx({...t,axis:l==="horizontal"?"x":"y"},o),[d,f]=It.useState(!1),[p,m]=It.useState(!1),g=It.useCallback(y=>{y&&(f(y.canScrollPrev()),m(y.canScrollNext()))},[]),x=It.useCallback(()=>{c?.scrollPrev()},[c]),v=It.useCallback(()=>{c?.scrollNext()},[c]),h=It.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 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,Co.jsx)(kO.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:x,scrollNext:v,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,Co.jsx)("div",{ref:s,onKeyDownCapture:h,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});_b.displayName="Carousel";var Vb=Q("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),Bb=It.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=Hc();return(0,Co.jsx)("div",{ref:o,className:"overflow-hidden",children:(0,Co.jsx)("div",{ref:r,className:P(Vb({orientation:n}),e),...t})})});Bb.displayName="CarouselContent";var Hb=Q("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),Ub=It.forwardRef(({className:e,...t},r)=>{let{orientation:o}=Hc();return(0,Co.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:P(Hb({orientation:o}),e),...t})});Ub.displayName="CarouselItem";var zb=It.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=Hc();return(0,Co.jsxs)(Ee,{ref:n,variant:t,size:r,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,...o,children:[(0,Co.jsx)(If,{className:"h-4 w-4","aria-hidden":"true"}),(0,Co.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});zb.displayName="CarouselPrevious";var Gb=It.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=Hc();return(0,Co.jsxs)(Ee,{ref:n,variant:t,size:r,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,...o,children:[(0,Co.jsx)(Pf,{className:"h-4 w-4","aria-hidden":"true"}),(0,Co.jsx)("span",{className:"sr-only",children:"Next slide"})]})});Gb.displayName="CarouselNext";var Nl=b(M());var Vr=b(M(),1);var Sx=b(M(),1);function Uc(e){let t=Sx.useRef({value:e,previous:e});return Sx.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var MO=b(M(),1);function zc(e){let[t,r]=MO.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 So=b(D(),1),bx="Checkbox",[j9,fIe]=Fe(bx),[q9,Wb]=j9(bx);function $9(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:bx}),[m,g]=Vr.useState(null),[x,v]=Vr.useState(null),h=Vr.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:ds(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:v};return(0,So.jsx)(q9,{scope:t,...w,children:K9(d)?d(w):o})}var EO="CheckboxTrigger",AO=Vr.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}=Wb(EO,e),g=de(n,c),x=Vr.useRef(l);return Vr.useEffect(()=>{let v=a?.form;if(v){let h=()=>d(x.current);return v.addEventListener("reset",h),()=>v.removeEventListener("reset",h)}},[a,d]),(0,So.jsx)($.button,{type:"button",role:"checkbox","aria-checked":ds(l)?"mixed":l,"aria-required":u,"data-state":FO(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:g,onKeyDown:W(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:W(r,v=>{d(h=>ds(h)?!0:!h),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});AO.displayName=EO;var Rx=Vr.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,So.jsx)($9,{__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,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(AO,{...d,ref:t,__scopeCheckbox:r}),f&&(0,So.jsx)(OO,{__scopeCheckbox:r})]})})});Rx.displayName=bx;var DO="CheckboxIndicator",jb=Vr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=Wb(DO,r);return(0,So.jsx)(lt,{present:o||ds(a.checked)||a.checked===!0,children:(0,So.jsx)($.span,{"data-state":FO(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});jb.displayName=DO;var NO="CheckboxBubbleInput",OO=Vr.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}=Wb(NO,e),m=de(r,p),g=Uc(a),x=zc(o);Vr.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=ds(a),C.call(h,ds(a)?!1:a),h.dispatchEvent(R)}},[f,g,a,n]);let v=Vr.useRef(ds(a)?!1:a);return(0,So.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%)"}})});OO.displayName=NO;function K9(e){return typeof e=="function"}function ds(e){return e==="indeterminate"}function FO(e){return ds(e)?"indeterminate":e?"checked":"unchecked"}var $o=b(D()),Y9=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 data-[state=indeterminate]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]: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"}}),Ix=Nl.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>(0,$o.jsx)(Rx,{ref:u,checked:a?"indeterminate":s,className:P("moonui-theme",Y9({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,$o.jsx)(jb,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:a?(0,$o.jsx)(zf,{className:"h-[65%] w-[65%]"}):i||(0,$o.jsx)(hr,{className:"h-[65%] w-[65%]"})})}));Ix.displayName=Rx.displayName;var qb=Nl.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,$o.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));qb.displayName="CheckboxGroup";var om=Nl.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,$o.jsx)("label",{ref:i,htmlFor:t,className:P("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}));om.displayName="CheckboxLabel";var $b=Nl.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=Nl.useId(),s=e||i;return(0,$o.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,$o.jsx)(om,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,$o.jsx)(Ix,{ref:a,id:s,...n}),r==="end"&&(0,$o.jsx)(om,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});$b.displayName="CheckboxWithLabel";var Xb=b(M());var Ol=b(D()),_O=Nh,Kb=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"}}),Yb=Xb.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,Ol.jsx)(Gu,{ref:i,className:P("moonui-theme",Kb({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,Ol.jsxs)(Gu,{ref:i,className:P("moonui-theme",Kb({variant:r,size:o}),e),...a,children:[t,(0,Ol.jsx)(sa,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));Yb.displayName=Gu.displayName;var VO=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"}}),Qb=Xb.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,Ol.jsx)(yf,{ref:a,className:P("moonui-theme",VO({variant:r,size:o}),e),...n,children:(0,Ol.jsx)("div",{className:"p-4",children:t})}));Qb.displayName=yf.displayName;var Jo=b(M());var Fl=b(M());var bo=b(D()),Q9=Q("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Z9=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}}),lr=Fl.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:x,value:v,defaultValue:h,onChange:y,onFocus:w,onBlur:C,placeholder:S,...R},I)=>{let[L,T]=Fl.useState(!1),[k,E]=Fl.useState(v||h||""),N=L||k!==""&&k!==null&&k!==void 0,B=J=>{T(!0),w?.(J)},O=J=>{T(!1),C?.(J)},_=J=>{E(J.target.value),y?.(J)};Fl.useEffect(()=>{v!==void 0&&E(v)},[v]);let H=p||s||l,A=s?"error":l?"success":"normal";return(0,bo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,bo.jsxs)("div",{className:P("moonui-theme",Q9({size:n}),t),children:[g&&m&&(0,bo.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",L&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",x),children:m}),c&&(0,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,bo.jsx)(Vt,{className:"h-4 w-4 animate-spin"}):c}),(0,bo.jsx)("input",{className:P(Z9({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?`${R.id||""}-error`:l?`${R.id||""}-success`:void 0,value:v,defaultValue:h,onChange:_,onFocus:B,onBlur:O,placeholder:g?N?S:"":S,...R}),d&&!u&&(0,bo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,bo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,bo.jsx)(Vt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),H&&(0,bo.jsx)("p",{className:P("text-xs transition-all",A==="error"&&"text-error",A==="success"&&"text-success",A==="normal"&&"text-muted-foreground",r),id:s?`${R.id||""}-error`:l?`${R.id||""}-success`:void 0,children:s||l||""})]})});lr.displayName="Input";var zO=b(M());var BO=b(M(),1);var HO=b(D(),1),J9="Label",UO=BO.forwardRef((e,t)=>(0,HO.jsx)($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));UO.displayName=J9;var Zb=UO;var GO=b(D()),t7=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"),Br=zO.forwardRef(({className:e,...t},r)=>(0,GO.jsx)(Zb,{ref:r,className:P(t7(),e),...t}));Br.displayName=Zb.displayName;var J_=b(M());var ct=b(M(),1);var vt=b(M(),1);var WO=b(M(),1);function jO(e,t=globalThis?.document){let r=nt(e);WO.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 eR=b(D(),1),r7="DismissableLayer",Jb="dismissableLayer.update",o7="dismissableLayer.pointerDownOutside",n7="dismissableLayer.focusOutside",qO,KO=vt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ko=vt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=vt.useContext(KO),[c,d]=vt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=vt.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=i7(R=>{let I=R.target,L=[...u.branches].some(T=>T.contains(I));!w||L||(n?.(R),i?.(R),R.defaultPrevented||s?.())},f),S=s7(R=>{let I=R.target;[...u.branches].some(T=>T.contains(I))||(a?.(R),i?.(R),R.defaultPrevented||s?.())},f);return jO(R=>{h===u.layers.size-1&&(o?.(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},f),vt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qO=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),$O(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=qO)}},[c,f,r,u]),vt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),$O())},[c,u]),vt.useEffect(()=>{let R=()=>p({});return document.addEventListener(Jb,R),()=>document.removeEventListener(Jb,R)},[]),(0,eR.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)})});Ko.displayName=r7;var a7="DismissableLayerBranch",XO=vt.forwardRef((e,t)=>{let r=vt.useContext(KO),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,eR.jsx)($.div,{...e,ref:n})});XO.displayName=a7;function i7(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(){YO(o7,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 s7(e,t=globalThis?.document){let r=nt(e),o=vt.useRef(!1);return vt.useEffect(()=>{let n=a=>{a.target&&!o.current&&YO(n7,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 $O(){let e=new CustomEvent(Jb);document.dispatchEvent(e)}function YO(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?zu(n,a):n.dispatchEvent(a)}var QO=Ko,ZO=XO;var eF=b(M(),1),tR=0;function fs(){eF.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??JO()),document.body.insertAdjacentElement("beforeend",e[1]??JO()),tR++,()=>{tR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tR--}},[])}function JO(){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 Xo=b(M(),1);var aF=b(D(),1),rR="focusScope.autoFocusOnMount",oR="focusScope.autoFocusOnUnmount",tF={bubbles:!1,cancelable:!0},u7="FocusScope",ri=Xo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Xo.useState(null),u=nt(n),c=nt(a),d=Xo.useRef(null),f=de(t,g=>l(g)),p=Xo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Xo.useEffect(()=>{if(o){let h=function(S){if(p.paused||!s)return;let R=S.target;s.contains(R)?d.current=R:ps(d.current,{select:!0})},y=function(S){if(p.paused||!s)return;let R=S.relatedTarget;R!==null&&(s.contains(R)||ps(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(let I of S)I.removedNodes.length>0&&ps(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()}}},[o,s,p.paused]),Xo.useEffect(()=>{if(s){oF.add(p);let g=document.activeElement;if(!s.contains(g)){let v=new CustomEvent(rR,tF);s.addEventListener(rR,u),s.dispatchEvent(v),v.defaultPrevented||(c7(g7(iF(s)),{select:!0}),document.activeElement===g&&ps(s))}return()=>{s.removeEventListener(rR,u),setTimeout(()=>{let v=new CustomEvent(oR,tF);s.addEventListener(oR,c),s.dispatchEvent(v),v.defaultPrevented||ps(g??document.body,{select:!0}),s.removeEventListener(oR,c),oF.remove(p)},0)}}},[s,u,c,p]);let m=Xo.useCallback(g=>{if(!r&&!o||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]=d7(h);y&&w?!g.shiftKey&&v===w?(g.preventDefault(),r&&ps(y,{select:!0})):g.shiftKey&&v===y&&(g.preventDefault(),r&&ps(w,{select:!0})):v===h&&g.preventDefault()}},[r,o,p.paused]);return(0,aF.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});ri.displayName=u7;function c7(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(ps(o,{select:t}),document.activeElement!==r)return}function d7(e){let t=iF(e),r=rF(t,e),o=rF(t.reverse(),e);return[r,o]}function iF(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 rF(e,t){for(let r of e)if(!f7(r,{upTo:t}))return r}function f7(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 p7(e){return e instanceof HTMLInputElement&&"select"in e}function ps(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&p7(e)&&t&&e.select()}}var oF=m7();function m7(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=nF(e,t),e.unshift(t)},remove(t){e=nF(e,t),e[0]?.resume()}}}function nF(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function g7(e){return e.filter(t=>t.tagName!=="A")}var io=b(M(),1);var uF=["top","right","bottom","left"];var ha=Math.min,Hr=Math.max,am=Math.round,im=Math.floor,Nn=e=>({x:e,y:e}),h7={left:"right",right:"left",bottom:"top",top:"bottom"},v7={start:"end",end:"start"};function Lx(e,t,r){return Hr(e,ha(t,r))}function va(e,t){return typeof e=="function"?e(t):e}function xa(e){return e.split("-")[0]}function _l(e){return e.split("-")[1]}function Tx(e){return e==="x"?"y":"x"}function kx(e){return e==="y"?"height":"width"}var x7=new Set(["top","bottom"]);function On(e){return x7.has(xa(e))?"y":"x"}function Mx(e){return Tx(On(e))}function cF(e,t,r){r===void 0&&(r=!1);let o=_l(e),n=Mx(e),a=kx(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=nm(i)),[i,nm(i)]}function dF(e){let t=nm(e);return[Px(e),t,Px(t)]}function Px(e){return e.replace(/start|end/g,t=>v7[t])}var sF=["left","right"],lF=["right","left"],y7=["top","bottom"],w7=["bottom","top"];function C7(e,t,r){switch(e){case"top":case"bottom":return r?t?lF:sF:t?sF:lF;case"left":case"right":return t?y7:w7;default:return[]}}function fF(e,t,r,o){let n=_l(e),a=C7(xa(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Px)))),a}function nm(e){return e.replace(/left|right|bottom|top/g,t=>h7[t])}function S7(e){return{top:0,right:0,bottom:0,left:0,...e}}function nR(e){return typeof e!="number"?S7(e):{top:e,right:e,bottom:e,left:e}}function Vl(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 pF(e,t,r){let{reference:o,floating:n}=e,a=On(t),i=Mx(t),s=kx(i),l=xa(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(_l(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var hF=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}=pF(u,o,l),f=o,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:o,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}=pF(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function Gc(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}=va(t,e),m=nR(p),x=s[f?d==="floating"?"reference":"floating":d],v=Vl(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),h=d==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Vl(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 vF=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}=va(e,t)||{};if(u==null)return{};let d=nR(c),f={x:r,y:o},p=Mx(n),m=kx(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,L=R/2-g[m]/2-1,T=ha(d[v],L),k=ha(d[h],L),E=T,F=R-g[m]-k,N=R/2-g[m]/2+I,B=Lx(E,N,F),O=!l.arrow&&_l(n)!=null&&N!==B&&a.reference[m]/2-(N<E?T:k)-g[m]/2<0,_=O?N<E?N-E:N-F:0;return{[p]:f[p]+_,data:{[p]:B,centerOffset:N-B-_,...O&&{alignmentOffset:_}},reset:O}}});var xF=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,...x}=va(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let v=xa(n),h=On(s),y=xa(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!g?[nm(s)]:dF(s)),S=m!=="none";!f&&S&&C.push(...fF(s,g,m,w));let R=[s,...C],I=await Gc(t,x),L=[],T=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&L.push(I[v]),d){let N=cF(n,i,w);L.push(I[N[0]],I[N[1]])}if(T=[...T,{placement:n,overflows:L}],!L.every(N=>N<=0)){var k,E;let N=(((k=a.flip)==null?void 0:k.index)||0)+1,B=R[N];if(B&&(!(d==="alignment"?h!==On(B):!1)||T.every(H=>On(H.placement)===h?H.overflows[0]>0:!0)))return{data:{index:N,overflows:T},reset:{placement:B}};let O=(E=T.filter(_=>_.overflows[0]<=0).sort((_,H)=>_.overflows[1]-H.overflows[1])[0])==null?void 0:E.placement;if(!O)switch(p){case"bestFit":{var F;let _=(F=T.filter(H=>{if(S){let A=On(H.placement);return A===h||A==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(A=>A>0).reduce((A,J)=>A+J,0)]).sort((H,A)=>H[1]-A[1])[0])==null?void 0:F[0];_&&(O=_);break}case"initialPlacement":O=s;break}if(n!==O)return{reset:{placement:O}}}return{}}}};function mF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gF(e){return uF.some(t=>e[t]>=0)}var yF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=va(e,t);switch(o){case"referenceHidden":{let a=await Gc(t,{...n,elementContext:"reference"}),i=mF(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:gF(i)}}}case"escaped":{let a=await Gc(t,{...n,altBoundary:!0}),i=mF(a,r.floating);return{data:{escapedOffsets:i,escaped:gF(i)}}}default:return{}}}}};var wF=new Set(["left","top"]);async function b7(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=xa(r),s=_l(r),l=On(r)==="y",u=wF.has(i)?-1:1,c=a&&l?-1:1,d=va(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 CF=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 b7(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}}}}},SF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:v,y:h}=x;return{x:v,y:h}}},...l}=va(e,t),u={x:r,y:o},c=await Gc(t,l),d=On(xa(n)),f=Tx(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=Lx(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=Lx(h,m,y)}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}}}}}},bF=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}=va(e,t),c={x:r,y:o},d=On(n),f=Tx(d),p=c[f],m=c[d],g=va(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=wF.has(xa(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}}}},RF=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}=va(e,t),c=await Gc(t,u),d=xa(n),f=_l(n),p=On(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=ha(g-c[x],h),C=ha(m-c[v],y),S=!t.middlewareData.shift,R=w,I=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=h),S&&!f){let T=Hr(c.left,0),k=Hr(c.right,0),E=Hr(c.top,0),F=Hr(c.bottom,0);p?I=m-2*(T!==0||k!==0?T+k:Hr(c.left,c.right)):R=g-2*(E!==0||F!==0?E+F:Hr(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:R});let L=await i.getDimensions(s.floating);return m!==L.width||g!==L.height?{reset:{rects:!0}}:{}}}};function Ex(){return typeof window<"u"}function Hl(e){return PF(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){var t;return(t=(PF(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function PF(e){return Ex()?e instanceof Node||e instanceof ao(e).Node:!1}function Yo(e){return Ex()?e instanceof Element||e instanceof ao(e).Element:!1}function _n(e){return Ex()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function IF(e){return!Ex()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}var R7=new Set(["inline","contents"]);function Wc(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Qo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!R7.has(n)}var I7=new Set(["table","td","th"]);function LF(e){return I7.has(Hl(e))}var P7=[":popover-open",":modal"];function sm(e){return P7.some(t=>{try{return e.matches(t)}catch{return!1}})}var L7=["transform","translate","scale","rotate","perspective"],T7=["transform","translate","scale","rotate","perspective","filter"],k7=["paint","layout","strict","content"];function Ax(e){let t=Dx(),r=Yo(e)?Qo(e):e;return L7.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)||T7.some(o=>(r.willChange||"").includes(o))||k7.some(o=>(r.contain||"").includes(o))}function TF(e){let t=oi(e);for(;_n(t)&&!Ul(t);){if(Ax(t))return t;if(sm(t))return null;t=oi(t)}return null}function Dx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var M7=new Set(["html","body","#document"]);function Ul(e){return M7.has(Hl(e))}function Qo(e){return ao(e).getComputedStyle(e)}function lm(e){return Yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oi(e){if(Hl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||IF(e)&&e.host||Fn(e);return IF(t)?t.host:t}function kF(e){let t=oi(e);return Ul(t)?e.ownerDocument?e.ownerDocument.body:e.body:_n(t)&&Wc(t)?t:kF(t)}function Bl(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=kF(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=ao(n);if(a){let s=Nx(i);return t.concat(i,i.visualViewport||[],Wc(n)?n:[],s&&r?Bl(s):[])}return t.concat(n,Bl(n,[],r))}function Nx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DF(e){let t=Qo(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=_n(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=am(r)!==a||am(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function iR(e){return Yo(e)?e:e.contextElement}function jc(e){let t=iR(e);if(!_n(t))return Nn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=DF(t),i=(a?am(r.width):r.width)/o,s=(a?am(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var E7=Nn(0);function NF(e){let t=ao(e);return!Dx()||!t.visualViewport?E7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ao(e)?!1:t}function zl(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=iR(e),i=Nn(1);t&&(o?Yo(o)&&(i=jc(o)):i=jc(e));let s=A7(a,r,o)?NF(a):Nn(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=ao(a),p=o&&Yo(o)?ao(o):o,m=f,g=Nx(m);for(;g&&o&&p!==m;){let x=jc(g),v=g.getBoundingClientRect(),h=Qo(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=ao(g),g=Nx(m)}}return Vl({width:c,height:d,x:l,y:u})}function Ox(e,t){let r=lm(e).scrollLeft;return t?t.left+r:zl(Fn(e)).left+r}function OF(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ox(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function D7(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=Fn(o),s=t?sm(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Nn(1),c=Nn(0),d=_n(o);if((d||!d&&!a)&&((Hl(o)!=="body"||Wc(i))&&(l=lm(o)),_n(o))){let p=zl(o);u=jc(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?OF(i,l):Nn(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 N7(e){return Array.from(e.getClientRects())}function O7(e){let t=Fn(e),r=lm(e),o=e.ownerDocument.body,n=Hr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Hr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+Ox(e),s=-r.scrollTop;return Qo(o).direction==="rtl"&&(i+=Hr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var MF=25;function F7(e,t){let r=ao(e),o=Fn(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Dx();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=Ox(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<=MF&&(a-=m)}else u<=MF&&(a+=u);return{width:a,height:i,x:s,y:l}}var _7=new Set(["absolute","fixed"]);function V7(e,t){let r=zl(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=_n(e)?jc(e):Nn(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 EF(e,t,r){let o;if(t==="viewport")o=F7(e,r);else if(t==="document")o=O7(Fn(e));else if(Yo(t))o=V7(t,r);else{let n=NF(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Vl(o)}function FF(e,t){let r=oi(e);return r===t||!Yo(r)||Ul(r)?!1:Qo(r).position==="fixed"||FF(r,t)}function B7(e,t){let r=t.get(e);if(r)return r;let o=Bl(e,[],!1).filter(s=>Yo(s)&&Hl(s)!=="body"),n=null,a=Qo(e).position==="fixed",i=a?oi(e):e;for(;Yo(i)&&!Ul(i);){let s=Qo(i),l=Ax(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&_7.has(n.position)||Wc(i)&&!l&&FF(e,i))?o=o.filter(c=>c!==i):n=s,i=oi(i)}return t.set(e,o),o}function H7(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?sm(t)?[]:B7(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=EF(t,c,n);return u.top=Hr(d.top,u.top),u.right=ha(d.right,u.right),u.bottom=ha(d.bottom,u.bottom),u.left=Hr(d.left,u.left),u},EF(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function U7(e){let{width:t,height:r}=DF(e);return{width:t,height:r}}function z7(e,t,r){let o=_n(t),n=Fn(t),a=r==="fixed",i=zl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Nn(0);function u(){l.x=Ox(n)}if(o||!o&&!a)if((Hl(t)!=="body"||Wc(n))&&(s=lm(t)),o){let p=zl(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?OF(n,s):Nn(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 aR(e){return Qo(e).position==="static"}function AF(e,t){if(!_n(e)||Qo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Fn(e)===r&&(r=r.ownerDocument.body),r}function _F(e,t){let r=ao(e);if(sm(e))return r;if(!_n(e)){let n=oi(e);for(;n&&!Ul(n);){if(Yo(n)&&!aR(n))return n;n=oi(n)}return r}let o=AF(e,t);for(;o&&LF(o)&&aR(o);)o=AF(o,t);return o&&Ul(o)&&aR(o)&&!Ax(o)?r:o||TF(e)||r}var G7=async function(e){let t=this.getOffsetParent||_F,r=this.getDimensions,o=await r(e.floating);return{reference:z7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function W7(e){return Qo(e).direction==="rtl"}var VF={convertOffsetParentRelativeRectToViewportRelativeRect:D7,getDocumentElement:Fn,getClippingRect:H7,getOffsetParent:_F,getElementRects:G7,getClientRects:N7,getDimensions:U7,getScale:jc,isElement:Yo,isRTL:W7};function BF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function j7(e,t){let r=null,o,n=Fn(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=im(d),g=im(n.clientWidth-(c+f)),x=im(n.clientHeight-(d+p)),v=im(c),y={rootMargin:-m+"px "+-g+"px "+-x+"px "+-v+"px",threshold:Hr(0,ha(1,l))||1},w=!0;function C(S){let R=S[0].intersectionRatio;if(R!==l){if(!w)return i();R?i(!1,R):o=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!BF(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(C,y)}r.observe(e)}return i(!0),a}function sR(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=iR(e),c=n||a?[...u?Bl(u):[],...Bl(t)]:[];c.forEach(v=>{n&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});let d=u&&s?j7(u,r):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)})),r()}),u&&!l&&p.observe(u),p.observe(t));let m,g=l?zl(e):null;l&&x();function x(){let v=zl(e);g&&!BF(g,v)&&r(),g=v,m=requestAnimationFrame(x)}return r(),()=>{var v;c.forEach(h=>{n&&h.removeEventListener("scroll",r),a&&h.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var HF=CF;var UF=SF,zF=xF,GF=RF,WF=yF,lR=vF;var jF=bF,uR=(e,t,r)=>{let o=new Map,n={platform:VF,...r},a={...n.platform,_c:o};return hF(e,t,{...n,platform:a})};var Mt=b(M(),1),$F=b(M(),1),KF=b(Va(),1),q7=typeof document<"u",$7=function(){},Fx=q7?$F.useLayoutEffect:$7;function _x(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(!_x(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)&&!_x(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function XF(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qF(e,t){let r=XF(e);return Math.round(t*r)/r}function cR(e){let t=Mt.useRef(e);return Fx(()=>{t.current=e}),t}function YF(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]=Mt.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Mt.useState(o);_x(f,o)||p(o);let[m,g]=Mt.useState(null),[x,v]=Mt.useState(null),h=Mt.useCallback(H=>{H!==S.current&&(S.current=H,g(H))},[]),y=Mt.useCallback(H=>{H!==R.current&&(R.current=H,v(H))},[]),w=a||m,C=i||x,S=Mt.useRef(null),R=Mt.useRef(null),I=Mt.useRef(c),L=l!=null,T=cR(l),k=cR(n),E=cR(u),F=Mt.useCallback(()=>{if(!S.current||!R.current)return;let H={placement:t,strategy:r,middleware:f};k.current&&(H.platform=k.current),uR(S.current,R.current,H).then(A=>{let J={...A,isPositioned:E.current!==!1};N.current&&!_x(I.current,J)&&(I.current=J,KF.flushSync(()=>{d(J)}))})},[f,t,r,k,E]);Fx(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[u]);let N=Mt.useRef(!1);Fx(()=>(N.current=!0,()=>{N.current=!1}),[]),Fx(()=>{if(w&&(S.current=w),C&&(R.current=C),w&&C){if(T.current)return T.current(w,C,F);F()}},[w,C,F,T,L]);let B=Mt.useMemo(()=>({reference:S,floating:R,setReference:h,setFloating:y}),[h,y]),O=Mt.useMemo(()=>({reference:w,floating:C}),[w,C]),_=Mt.useMemo(()=>{let H={position:r,left:0,top:0};if(!O.floating)return H;let A=qF(O.floating,c.x),J=qF(O.floating,c.y);return s?{...H,transform:"translate("+A+"px, "+J+"px)",...XF(O.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:J}},[r,s,O.floating,c.x,c.y]);return Mt.useMemo(()=>({...c,update:F,refs:B,elements:O,floatingStyles:_}),[c,F,B,O,_])}var K7=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?lR({element:o.current,padding:n}).fn(r):{}:o?lR({element:o,padding:n}).fn(r):{}}}},QF=(e,t)=>({...HF(e),options:[e,t]}),ZF=(e,t)=>({...UF(e),options:[e,t]}),JF=(e,t)=>({...jF(e),options:[e,t]}),e_=(e,t)=>({...zF(e),options:[e,t]}),t_=(e,t)=>({...GF(e),options:[e,t]});var r_=(e,t)=>({...WF(e),options:[e,t]});var o_=(e,t)=>({...K7(e),options:[e,t]});var n_=b(M(),1);var dR=b(D(),1),X7="Arrow",a_=n_.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,dR.jsx)($.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,dR.jsx)("polygon",{points:"0,0 30,0 15,10"})})});a_.displayName=X7;var i_=a_;var ms=b(D(),1);var fR="Popper",[s_,Zo]=Fe(fR),[Q7,l_]=s_(fR),u_=e=>{let{__scopePopper:t,children:r}=e,[o,n]=io.useState(null);return(0,ms.jsx)(Q7,{scope:t,anchor:o,onAnchorChange:n,children:r})};u_.displayName=fR;var c_="PopperAnchor",d_=io.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=l_(c_,r),i=io.useRef(null),s=de(t,i),l=io.useRef(null);return io.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,ms.jsx)($.div,{...n,ref:s})});d_.displayName=c_;var pR="PopperContent",[Z7,J7]=s_(pR),f_=io.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,x=l_(pR,r),[v,h]=io.useState(null),y=de(t,z=>h(z)),[w,C]=io.useState(null),S=zc(w),R=S?.width??0,I=S?.height??0,L=o+(a!=="center"?"-"+a:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],E=k.length>0,F={padding:T,boundary:k.filter(tK),altBoundary:E},{refs:N,floatingStyles:B,placement:O,isPositioned:_,middlewareData:H}=YF({strategy:"fixed",placement:L,whileElementsMounted:(...z)=>sR(...z,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[QF({mainAxis:n+I,alignmentAxis:i}),l&&ZF({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?JF():void 0,...F}),l&&e_({...F}),t_({...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&&o_({element:w,padding:s}),rK({arrowWidth:R,arrowHeight:I}),f&&r_({strategy:"referenceHidden",...F})]}),[A,J]=g_(O),ae=nt(m);Ve(()=>{_&&ae?.()},[_,ae]);let V=H.arrow?.x,Y=H.arrow?.y,re=H.arrow?.centerOffset!==0,[X,ce]=io.useState();return Ve(()=>{v&&ce(window.getComputedStyle(v).zIndex)},[v]),(0,ms.jsx)("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:_?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ms.jsx)(Z7,{scope:r,placedSide:A,onArrowChange:C,arrowX:V,arrowY:Y,shouldHideArrow:re,children:(0,ms.jsx)($.div,{"data-side":A,"data-align":J,...g,ref:y,style:{...g.style,animation:_?void 0:"none"}})})})});f_.displayName=pR;var p_="PopperArrow",eK={top:"bottom",right:"left",bottom:"top",left:"right"},m_=io.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=J7(p_,o),i=eK[a.placedSide];return(0,ms.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,ms.jsx)(i_,{...n,ref:r,style:{...n.style,display:"block"}})})});m_.displayName=p_;function tK(e){return e!==null}var rK=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]=g_(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 g_(e){let[t,r="center"]=e.split("-");return[t,r]}var ni=u_,ai=d_,gs=f_,hs=m_;var Bx=b(M(),1),h_=b(Va(),1);var v_=b(D(),1),oK="Portal",Ro=Bx.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Bx.useState(!1);Ve(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?h_.default.createPortal((0,v_.jsx)($.div,{...o,ref:t}),i):null});Ro.displayName=oK;var nK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qc=new WeakMap,Hx=new WeakMap,Ux={},mR=0,x_=function(e){return e&&(e.host||x_(e.parentNode))},aK=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=x_(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})},iK=function(e,t,r,o){var n=aK(t,Array.isArray(e)?e:[e]);Ux[r]||(Ux[r]=new WeakMap);var a=Ux[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=(qc.get(f)||0)+1,x=(a.get(f)||0)+1;qc.set(f,g),a.set(f,x),i.push(f),g===1&&m&&Hx.set(f,!0),x===1&&f.setAttribute(r,"true"),m||f.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),s.clear(),mR++,function(){i.forEach(function(d){var f=qc.get(d)-1,p=a.get(d)-1;qc.set(d,f),a.set(d,p),f||(Hx.has(d)||d.removeAttribute(o),Hx.delete(d)),p||d.removeAttribute(r)}),mR--,mR||(qc=new WeakMap,qc=new WeakMap,Hx=new WeakMap,Ux={})}},vs=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||nK(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),iK(o,n,r,"aria-hidden")):function(){return null}};var so=function(){return so=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},so.apply(this,arguments)};function zx(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 y_(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 $x=b(M());var Sr=b(M());var Gl="right-scroll-bar-position",Wl="width-before-scroll-bar",gR="with-scroll-bars-hidden",hR="--removed-body-scroll-bar-size";function Gx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var w_=b(M());function C_(e,t){var r=(0,w_.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var Wx=b(M());var sK=typeof window<"u"?Wx.useLayoutEffect:Wx.useEffect,S_=new WeakMap;function vR(e,t){var r=C_(t||null,function(o){return e.forEach(function(n){return Gx(n,o)})});return sK(function(){var o=S_.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Gx(s,null)}),a.forEach(function(s){n.has(s)||Gx(s,i)})}S_.set(r,e)},[e]),r}function lK(e){return e}function uK(e,t){t===void 0&&(t=lK);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 xR(e){e===void 0&&(e={});var t=uK(null);return t.options=so({async:!0,ssr:!1},e),t}var b_=b(M()),R_=function(e){var t=e.sideCar,r=zx(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 b_.createElement(o,so({},r))};R_.isSideCarExport=!0;function yR(e,t){return e.useMedium(t),R_}var jx=xR();var wR=function(){},um=Sr.forwardRef(function(e,t){var r=Sr.useRef(null),o=Sr.useState({onScrollCapture:wR,onWheelCapture:wR,onTouchMoveCapture:wR}),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,x=e.allowPinchZoom,v=e.as,h=v===void 0?"div":v,y=e.gapMode,w=zx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,S=vR([r,t]),R=so(so({},w),n);return Sr.createElement(Sr.Fragment,null,c&&Sr.createElement(C,{sideCar:jx,removeScrollBar:u,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?Sr.cloneElement(Sr.Children.only(s),so(so({},R),{ref:S})):Sr.createElement(h,so({},R,{className:l,ref:S}),s))});um.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};um.classNames={fullWidth:Wl,zeroRight:Gl};var it=b(M());var Kc=b(M());var L_=b(M());var I_;var P_=function(){if(I_)return I_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=P_();return t&&e.setAttribute("nonce",t),e}function dK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var CR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=cK())&&(dK(t,r),fK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var SR=function(){var e=CR();return function(t,r){L_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var cm=function(){var e=SR(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var pK={left:0,top:0,right:0,gap:0},bR=function(e){return parseInt(e||"",10)||0},mK=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[bR(r),bR(o),bR(n)]},RR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pK;var t=mK(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 gK=cm(),$c="data-scroll-locked",hK=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(gR,` {
|
|
21
21
|
overflow: hidden `).concat(o,`;
|
|
22
22
|
padding-right: `).concat(s,"px ").concat(o,`;
|
|
23
23
|
}
|
|
24
|
-
body[`).concat(
|
|
24
|
+
body[`).concat($c,`] {
|
|
25
25
|
overflow: hidden `).concat(o,`;
|
|
26
26
|
overscroll-behavior: contain;
|
|
27
27
|
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
@@ -34,36 +34,36 @@ Error generating stack: `+a.message+`
|
|
|
34
34
|
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.`).concat(
|
|
37
|
+
.`).concat(Gl,` {
|
|
38
38
|
right: `).concat(s,"px ").concat(o,`;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.`).concat(
|
|
41
|
+
.`).concat(Wl,` {
|
|
42
42
|
margin-right: `).concat(s,"px ").concat(o,`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.`).concat(
|
|
45
|
+
.`).concat(Gl," .").concat(Gl,` {
|
|
46
46
|
right: 0 `).concat(o,`;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.`).concat(
|
|
49
|
+
.`).concat(Wl," .").concat(Wl,` {
|
|
50
50
|
margin-right: 0 `).concat(o,`;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
body[`).concat(
|
|
54
|
-
`).concat(
|
|
53
|
+
body[`).concat($c,`] {
|
|
54
|
+
`).concat(hR,": ").concat(s,`px;
|
|
55
55
|
}
|
|
56
|
-
`)},
|
|
56
|
+
`)},T_=function(){var e=parseInt(document.body.getAttribute($c)||"0",10);return isFinite(e)?e:0},vK=function(){Kc.useEffect(function(){return document.body.setAttribute($c,(T_()+1).toString()),function(){var e=T_()-1;e<=0?document.body.removeAttribute($c):document.body.setAttribute($c,e.toString())}},[])},IR=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;vK();var a=Kc.useMemo(function(){return RR(n)},[n]);return Kc.createElement(gK,{styles:hK(a,!t,n,r?"":"!important")})};var PR=!1;if(typeof window<"u")try{dm=Object.defineProperty({},"passive",{get:function(){return PR=!0,!0}}),window.addEventListener("test",dm,dm),window.removeEventListener("test",dm,dm)}catch{PR=!1}var dm,jl=PR?{passive:!1}:!1;var xK=function(e){return e.tagName==="TEXTAREA"},k_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xK(e)&&r[t]==="visible")},yK=function(e){return k_(e,"overflowY")},wK=function(e){return k_(e,"overflowX")},LR=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=M_(e,o);if(n){var a=E_(e,o),i=a[1],s=a[2];if(i>s)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},CK=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},SK=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},M_=function(e,t){return e==="v"?yK(t):wK(t)},E_=function(e,t){return e==="v"?CK(t):SK(t)},bK=function(e,t){return e==="h"&&t==="rtl"?-1:1},A_=function(e,t,r,o,n){var a=bK(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=E_(e,s),m=p[0],g=p[1],x=p[2],v=g-x-a*m;(m||v)&&M_(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 qx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},D_=function(e){return[e.deltaX,e.deltaY]},N_=function(e){return e&&"current"in e?e.current:e},RK=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IK=function(e){return`
|
|
57
57
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
58
58
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
59
|
-
`)},cj=0,cc=[];function h2(e){var t=at.useRef([]),r=at.useRef([0,0]),o=at.useRef(),n=at.useState(cj++)[0],a=at.useState(gp)[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=e2([e.lockRef.current],(e.shards||[]).map(g2),!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=at.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var h=Ev(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,S=g.target,b=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&b==="h"&&S.type==="range")return!1;var I=fS(b,S);if(!I)return!0;if(I?C=b:(C=b==="v"?"h":"v",I=fS(b,S)),!I)return!1;if(!o.current&&"changedTouches"in g&&(x||w)&&(o.current=C),!C)return!0;var T=o.current||C;return p2(T,y,g,T==="h"?x:w,!0)},[]),l=at.useCallback(function(g){var y=g;if(!(!cc.length||cc[cc.length-1]!==a)){var h="deltaY"in y?m2(y):Ev(y),v=t.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&lj(C.delta,h)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var x=(i.current.shards||[]).map(g2).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=at.useCallback(function(g,y,h,v){var x={name:g,delta:y,target:h,should:v,shadowParent:dj(h)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),c=at.useCallback(function(g){r.current=Ev(g),o.current=void 0},[]),d=at.useCallback(function(g){u(g.type,m2(g),g.target,s(g,e.lockRef.current))},[]),f=at.useCallback(function(g){u(g.type,Ev(g),g.target,s(g,e.lockRef.current))},[]);at.useEffect(function(){return cc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,hl),document.addEventListener("touchmove",l,hl),document.addEventListener("touchstart",c,hl),function(){cc=cc.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,hl),document.removeEventListener("touchmove",l,hl),document.removeEventListener("touchstart",c,hl)}},[]);var p=e.removeScrollBar,m=e.inert;return at.createElement(at.Fragment,null,m?at.createElement(a,{styles:uj(n)}):null,p?at.createElement(cS,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var v2=nS(Mv,h2);var x2=Av.forwardRef(function(e,t){return Av.createElement(mp,Yr({},e,{ref:t,sideCar:v2}))});x2.classNames=mp.classNames;var Fa=x2;var Tt=R(D(),1),Dv="Popover",[y2,jSe]=Ne(Dv,[Bo]),vp=Bo(),[fj,Xi]=y2(Dv),w2=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=vp(t),l=ut.useRef(null),[u,c]=ut.useState(!1),[d,f]=je({prop:o,defaultProp:n??!1,onChange:a,caller:Dv});return(0,Tt.jsx)(Na,{...s,children:(0,Tt.jsx)(fj,{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:r})})};w2.displayName=Dv;var C2="PopoverAnchor",S2=ut.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Xi(C2,r),a=vp(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ut.useEffect(()=>(i(),()=>s()),[i,s]),(0,Tt.jsx)(Oa,{...a,...o,ref:t})});S2.displayName=C2;var b2="PopoverTrigger",R2=ut.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Xi(b2,r),a=vp(r),i=de(t,n.triggerRef),s=(0,Tt.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":k2(n.open),...o,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Tt.jsx)(Oa,{asChild:!0,...a,children:s})});R2.displayName=b2;var pS="PopoverPortal",[pj,mj]=y2(pS,{forceMount:void 0}),gj=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=Xi(pS,t);return(0,Tt.jsx)(pj,{scope:t,forceMount:r,children:(0,Tt.jsx)(st,{present:r||a.open,children:(0,Tt.jsx)(po,{asChild:!0,container:n,children:o})})})};gj.displayName=pS;var dc="PopoverContent",I2=ut.forwardRef((e,t)=>{let r=mj(dc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=Xi(dc,e.__scopePopover);return(0,Tt.jsx)(st,{present:o||a.open,children:a.modal?(0,Tt.jsx)(vj,{...n,ref:t}):(0,Tt.jsx)(xj,{...n,ref:t})})});I2.displayName=dc;var hj=Zr("PopoverContent.RemoveScroll"),vj=ut.forwardRef((e,t)=>{let r=Xi(dc,e.__scopePopover),o=ut.useRef(null),n=de(t,o),a=ut.useRef(!1);return ut.useEffect(()=>{let i=o.current;if(i)return Ki(i)},[]),(0,Tt.jsx)(Fa,{as:hj,allowPinchZoom:!0,children:(0,Tt.jsx)(L2,{...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})})})}),xj=ut.forwardRef((e,t)=>{let r=Xi(dc,e.__scopePopover),o=ut.useRef(!1),n=ut.useRef(!1);return(0,Tt.jsx)(L2,{...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()}})}),L2=ut.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=Xi(dc,r),p=vp(r);return Gi(),(0,Tt.jsx)(Aa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Tt.jsx)(Oo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Tt.jsx)(ji,{"data-state":k2(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)"}})})})}),P2="PopoverClose",T2=ut.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Xi(P2,r);return(0,Tt.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});T2.displayName=P2;var yj="PopoverArrow",wj=ut.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=vp(r);return(0,Tt.jsx)($i,{...n,...o,ref:t})});wj.displayName=yj;function k2(e){return e?"open":"closed"}var M2=w2,E2=S2,A2=R2;var mS=I2,D2=T2;var Zn=R(D()),Sj=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"}}),_a=M2,Va=A2,XSe=E2,Jn=N2.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,Zn.jsxs)(Zn.Fragment,{children:[u&&(0,Zn.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,Zn.jsx)(mS,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:L(Sj({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Jn.displayName=mS.displayName;var YSe=D2,bj=({className:e,...t})=>(0,Zn.jsx)("div",{className:L("moonui-theme","my-2 h-px bg-border",e),...t});bj.displayName="PopoverSeparator";var Rj=({className:e,...t})=>(0,Zn.jsx)("div",{className:L("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});Rj.displayName="PopoverHeader";var Ij=({className:e,...t})=>(0,Zn.jsx)("div",{className:L("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});Ij.displayName="PopoverFooter";var yp=R(E());var Ha=R(E(),1);var qt=R(E(),1);var Yi=R(D(),1),gS="rovingFocusGroup.onEntryFocus",Lj={bubbles:!1,cancelable:!0},xp="RovingFocusGroup",[hS,O2,Pj]=An(xp),[Tj,fc]=Ne(xp,[Pj]),[kj,Mj]=Tj(xp),F2=qt.forwardRef((e,t)=>(0,Yi.jsx)(hS.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Yi.jsx)(hS.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Yi.jsx)(Ej,{...e,ref:t})})}));F2.displayName=xp;var Ej=qt.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=qt.useRef(null),p=de(t,f),m=Bn(a),[g,y]=je({prop:i,defaultProp:s??null,onChange:l,caller:xp}),[h,v]=qt.useState(!1),x=ot(u),w=O2(r),C=qt.useRef(!1),[S,b]=qt.useState(0);return qt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(gS,x),()=>I.removeEventListener(gS,x)},[x]),(0,Yi.jsx)(kj,{scope:r,orientation:o,dir:m,loop:n,currentTabStopId:g,onItemFocus:qt.useCallback(I=>y(I),[y]),onItemShiftTab:qt.useCallback(()=>v(!0),[]),onFocusableItemAdd:qt.useCallback(()=>b(I=>I+1),[]),onFocusableItemRemove:qt.useCallback(()=>b(I=>I-1),[]),children:(0,Yi.jsx)($.div,{tabIndex:h||S===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(gS,Lj);if(I.currentTarget.dispatchEvent(P),!P.defaultPrevented){let k=w().filter(O=>O.focusable),A=k.find(O=>O.active),F=k.find(O=>O.id===g),H=[A,F,...k].filter(Boolean).map(O=>O.ref.current);B2(H,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),_2="RovingFocusGroupItem",V2=qt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ae(),u=a||l,c=Mj(_2,r),d=c.currentTabStopId===u,f=O2(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:g}=c;return qt.useEffect(()=>{if(o)return p(),()=>m()},[o,p,m]),(0,Yi.jsx)(hS.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,Yi.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=Nj(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?Oj(x,w+1):x.slice(w+1)}setTimeout(()=>B2(x))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:g!=null}):i})})});V2.displayName=_2;var Aj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Nj(e,t,r){let o=Dj(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Aj[o]}function B2(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function Oj(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Nv=F2,Ov=V2;var Ba=R(D(),1),Fv="Tabs",[Fj,gbe]=Ne(Fv,[fc]),U2=fc(),[_j,vS]=Fj(Fv),z2=Ha.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=Bn(s),[d,f]=je({prop:o,onChange:n,defaultProp:a??"",caller:Fv});return(0,Ba.jsx)(_j,{scope:r,baseId:Ae(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,Ba.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});z2.displayName=Fv;var G2="TabsList",W2=Ha.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=vS(G2,r),i=U2(r);return(0,Ba.jsx)(Nv,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,Ba.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});W2.displayName=G2;var q2="TabsTrigger",j2=Ha.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=vS(q2,r),s=U2(r),l=X2(i.baseId,o),u=Y2(i.baseId,o),c=o===i.value;return(0,Ba.jsx)(Ov,{asChild:!0,...s,focusable:!n,active:c,children:(0,Ba.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)})})})});j2.displayName=q2;var $2="TabsContent",K2=Ha.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=vS($2,r),l=X2(s.baseId,o),u=Y2(s.baseId,o),c=o===s.value,d=Ha.useRef(c);return Ha.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Ba.jsx)(st,{present:n||c,children:({present:f})=>(0,Ba.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})})});K2.displayName=$2;function X2(e,t){return`${e}-trigger-${t}`}function Y2(e,t){return`${e}-content-${t}`}var xS=z2,yS=W2,wS=j2,CS=K2;var Ua=R(D()),_v=yp.forwardRef(({vertical:e=!1,...t},r)=>(0,Ua.jsx)(xS,{ref:r,className:L("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));_v.displayName=xS.displayName;var Bj=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}}),Vv=yp.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,scrollable:n,...a},i)=>(0,Ua.jsx)(yS,{ref:i,className:L("moonui-theme",Bj({variant:t,orientation:r,fullWidth:o,scrollable:n,className:e})),...a}));Vv.displayName=yS.displayName;var Hj=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}}),pc=yp.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,Ua.jsxs)(wS,{ref:d,className:L("moonui-theme",Hj({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,Ua.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,Ua.jsx)("span",{className:"ml-2",children:o}),a&&(0,Ua.jsx)("span",{className:"ml-2",children:a})]}));pc.displayName=wS.displayName;var mc=yp.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,Ua.jsx)(CS,{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}));mc.displayName=CS.displayName;var Qi=R(E());var ea=R(D()),Uj=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"}}),zj=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"}}),Gj=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"}}),Wj=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"}}),za=Qi.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]=Qi.useState(u||c||[0]);Qi.useEffect(()=>{u!==void 0&&y(u)},[u]);let h=P=>s?s(P):`${Math.round(P*100)/100}`,v=(P,k,A)=>(P-k)/(A-k)*100,x=Qi.useRef(null),w=p.min||0,C=p.max||100,S=p.step||1,b=P=>{let k=P.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)});y(k),d&&d(k)},I=P=>{if(f)return;let k=x.current;if(!k)return;let A=k.getBoundingClientRect(),F=(P.clientX-A.left)/A.width,N=w+F*(C-w),H=Math.round(N/S)*S,O=Math.max(w,Math.min(C,H)),U=[...g];U[0]=O,b(U)},T=P=>k=>{if(f)return;k.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),M=Math.round(V/S)*S,J=Math.max(w,Math.min(C,M)),ae=[...g];ae[P]=J,b(ae)},F=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",F)};document.addEventListener("mousemove",A),document.addEventListener("mouseup",F)};return(0,ea.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,ea.jsx)("div",{className:L("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?(0,ea.jsx)("span",{children:h(g[0])}):(0,ea.jsxs)("span",{children:[h(g[0])," - ",h(g[g.length-1])]})}),(0,ea.jsxs)("div",{className:L("moonui-theme",Uj({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,ea.jsx)("div",{ref:x,className:L(zj({variant:r||n||"default"})),onClick:I,children:(0,ea.jsx)("div",{className:L(Gj({variant:o||n||"primary"})),style:{left:"0%",width:`${v(g[0],w,C)}%`}})}),g.map((P,k)=>(0,ea.jsx)("div",{className:L(Wj({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(k),"aria-label":`Thumb ${k+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":P,"aria-disabled":f},k))]})]})});za.displayName="Slider";var q=R(D()),Q2=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 Z2(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 J2(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function qj(e){let t=Z2(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 jj(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 J2(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var eO=["#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 SS({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=eO,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[m,g]=Ho.useState(!1),[y,h]=Ho.useState(o),[v,x]=Ho.useState(100),[w,C]=Ho.useState(!1),[S,b]=Ho.useState(o),I=Ho.useMemo(()=>qj(y)||{h:0,s:0,l:0},[y]),T=Ho.useMemo(()=>Z2(y)||{r:0,g:0,b:0},[y]);Ho.useEffect(()=>{h(o),b(o)},[o]);let P=O=>{h(O),b(O),n?.(O)},k=(O,U)=>{let V={...I,[O]:U},M=jj(V.h,V.s,V.l);P(M)},A=(O,U)=>{let V={...T,[O]:U},M=J2(V.r,V.g,V.b);P(M)},F=O=>{let U=O.target.value;b(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)(_a,{open:m,onOpenChange:g,children:[(0,q.jsx)(Va,{asChild:!0,children:(0,q.jsx)(_e,{variant:"outline",className:L(Q2({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)(Jn,{className:"w-80",align:"start",sideOffset:8,children:[(0,q.jsxs)(_v,{defaultValue:"picker",className:"w-full",children:[(0,q.jsxs)(Vv,{className:"grid w-full grid-cols-3",children:[(0,q.jsx)(pc,{value:"picker",children:"Picker"}),(0,q.jsx)(pc,{value:"sliders",children:"Sliders"}),(0,q.jsx)(pc,{value:"input",children:"Input"})]}),(0,q.jsxs)(mc,{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)(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: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)($r,{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)(za,{value:[I.h],onValueChange:([O])=>k("h",O),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)($r,{children:"Opacity"}),(0,q.jsxs)("div",{className:"flex items-center gap-3",children:[(0,q.jsx)(za,{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)(mc,{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)($r,{children:"Red"}),(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:T.r})]}),(0,q.jsx)(za,{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)($r,{children:"Green"}),(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:T.g})]}),(0,q.jsx)(za,{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)($r,{children:"Blue"}),(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:T.b})]}),(0,q.jsx)(za,{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)(mc,{value:"input",className:"space-y-4",children:[(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)($r,{children:"Hex Color"}),(0,q.jsxs)("div",{className:"flex gap-2",children:[(0,q.jsx)(gr,{value:S,onChange:F,placeholder:"#000000",className:"font-mono"}),(0,q.jsx)(_e,{size:"icon",variant:"outline",onClick:()=>P(S),children:(0,q.jsx)(ur,{className:"h-4 w-4"})})]})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)($r,{children:"RGB Values"}),(0,q.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,q.jsx)(gr,{type:"number",value:T.r,onChange:O=>A("r",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,q.jsx)(gr,{type:"number",value:T.g,onChange:O=>A("g",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,q.jsx)(gr,{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",Q2({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)(_e,{size:"icon",variant:"ghost",onClick:N,className:"h-8 w-8",children:(0,q.jsx)(Ra,{mode:"wait",children:w?(0,q.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,q.jsx)(ur,{className:"h-4 w-4 text-green-600"})},"check"):(0,q.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,q.jsx)(Fd,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,q.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,q.jsx)($r,{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 $j({value:e="#000000",onChange:t,colors:r=eO.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 Kj({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=Ho.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)($r,{children:"Start Color"}),(0,q.jsx)(SS,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,q.jsxs)("div",{className:"space-y-2",children:[(0,q.jsx)($r,{children:"End Color"}),(0,q.jsx)(SS,{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)($r,{children:"Angle"}),(0,q.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,q.jsx)(za,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var Ji=R(E());var tO=1,Xj=.9,Yj=.8,Qj=.17,bS=.1,RS=.999,Zj=.9999,Jj=.99,e$=/[\\\/_+.#"@\[\(\{&]/,t$=/[\\\/_+.#"@\[\(\{&]/g,r$=/[\s-]/,oO=/[\s-]/g;function IS(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?tO:Jj;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=IS(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=tO:e$.test(e.charAt(u-1))?(d*=Yj,p=e.slice(n,u-1).match(t$),p&&n>0&&(d*=Math.pow(RS,p.length))):r$.test(e.charAt(u-1))?(d*=Xj,m=e.slice(n,u-1).match(oO),m&&n>0&&(d*=Math.pow(RS,m.length))):(d*=Qj,n>0&&(d*=Math.pow(RS,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=Zj)),(d<bS&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=IS(e,t,r,o,u+1,a+2,i),f*bS>d&&(d=f*bS)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function rO(e){return e.toLowerCase().replace(oO," ")}function nO(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,IS(e,t,rO(e),rO(t),0,0,{})}var Qe=R(E(),1);var We=R(D(),1),Hv="Dialog",[aO,Qbe]=Ne(Hv),[o$,Sn]=aO(Hv),iO=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Qe.useRef(null),l=Qe.useRef(null),[u,c]=je({prop:o,defaultProp:n??!1,onChange:a,caller:Hv});return(0,We.jsx)(o$,{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:r})};iO.displayName=Hv;var sO="DialogTrigger",lO=Qe.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Sn(sO,r),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":TS(n.open),...o,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});lO.displayName=sO;var LS="DialogPortal",[n$,uO]=aO(LS,{forceMount:void 0}),cO=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Sn(LS,t);return(0,We.jsx)(n$,{scope:t,forceMount:r,children:Qe.Children.map(o,i=>(0,We.jsx)(st,{present:r||a.open,children:(0,We.jsx)(po,{asChild:!0,container:n,children:i})}))})};cO.displayName=LS;var Bv="DialogOverlay",dO=Qe.forwardRef((e,t)=>{let r=uO(Bv,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Sn(Bv,e.__scopeDialog);return a.modal?(0,We.jsx)(st,{present:o||a.open,children:(0,We.jsx)(i$,{...n,ref:t})}):null});dO.displayName=Bv;var a$=Zr("DialogOverlay.RemoveScroll"),i$=Qe.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Sn(Bv,r);return(0,We.jsx)(Fa,{as:a$,allowPinchZoom:!0,shards:[n.contentRef],children:(0,We.jsx)($.div,{"data-state":TS(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),vl="DialogContent",fO=Qe.forwardRef((e,t)=>{let r=uO(vl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Sn(vl,e.__scopeDialog);return(0,We.jsx)(st,{present:o||a.open,children:a.modal?(0,We.jsx)(s$,{...n,ref:t}):(0,We.jsx)(l$,{...n,ref:t})})});fO.displayName=vl;var s$=Qe.forwardRef((e,t)=>{let r=Sn(vl,e.__scopeDialog),o=Qe.useRef(null),n=de(t,r.contentRef,o);return Qe.useEffect(()=>{let a=o.current;if(a)return Ki(a)},[]),(0,We.jsx)(pO,{...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())})}),l$=Qe.forwardRef((e,t)=>{let r=Sn(vl,e.__scopeDialog),o=Qe.useRef(!1),n=Qe.useRef(!1);return(0,We.jsx)(pO,{...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()}})}),pO=Qe.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Sn(vl,r),l=Qe.useRef(null),u=de(t,l);return Gi(),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Aa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,We.jsx)(Oo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":TS(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(u$,{titleId:s.titleId}),(0,We.jsx)(d$,{contentRef:l,descriptionId:s.descriptionId})]})]})}),PS="DialogTitle",mO=Qe.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Sn(PS,r);return(0,We.jsx)($.h2,{id:n.titleId,...o,ref:t})});mO.displayName=PS;var gO="DialogDescription",hO=Qe.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Sn(gO,r);return(0,We.jsx)($.p,{id:n.descriptionId,...o,ref:t})});hO.displayName=gO;var vO="DialogClose",xO=Qe.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Sn(vO,r);return(0,We.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});xO.displayName=vO;function TS(e){return e?"open":"closed"}var yO="DialogTitleWarning",[Zbe,wO]=HR(yO,{contentName:vl,titleName:PS,docsSlug:"dialog"}),u$=({titleId:e})=>{let t=wO(yO),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
59
|
+
`)},PK=0,Xc=[];function O_(e){var t=it.useRef([]),r=it.useRef([0,0]),o=it.useRef(),n=it.useState(PK++)[0],a=it.useState(cm)[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=y_([e.lockRef.current],(e.shards||[]).map(N_),!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=it.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=qx(g),h=r.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=LR(R,S);if(!I)return!0;if(I?C=R:(C=R==="v"?"h":"v",I=LR(R,S)),!I)return!1;if(!o.current&&"changedTouches"in g&&(y||w)&&(o.current=C),!C)return!0;var L=o.current||C;return A_(L,x,g,L==="h"?y:w,!0)},[]),l=it.useCallback(function(g){var x=g;if(!(!Xc.length||Xc[Xc.length-1]!==a)){var v="deltaY"in x?D_(x):qx(x),h=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&RK(C.delta,v)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var y=(i.current.shards||[]).map(N_).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=it.useCallback(function(g,x,v,h){var y={name:g,delta:x,target:v,should:h,shadowParent:LK(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=it.useCallback(function(g){r.current=qx(g),o.current=void 0},[]),d=it.useCallback(function(g){u(g.type,D_(g),g.target,s(g,e.lockRef.current))},[]),f=it.useCallback(function(g){u(g.type,qx(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,jl),document.addEventListener("touchmove",l,jl),document.addEventListener("touchstart",c,jl),function(){Xc=Xc.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,jl),document.removeEventListener("touchmove",l,jl),document.removeEventListener("touchstart",c,jl)}},[]);var p=e.removeScrollBar,m=e.inert;return it.createElement(it.Fragment,null,m?it.createElement(a,{styles:IK(n)}):null,p?it.createElement(IR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function LK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var F_=yR(jx,O_);var __=$x.forwardRef(function(e,t){return $x.createElement(um,so({},e,{ref:t,sideCar:F_}))});__.classNames=um.classNames;var ii=__;var Et=b(D(),1),Kx="Popover",[V_,HLe]=Fe(Kx,[Zo]),fm=Zo(),[TK,xs]=V_(Kx),B_=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=fm(t),l=ct.useRef(null),[u,c]=ct.useState(!1),[d,f]=$e({prop:o,defaultProp:n??!1,onChange:a,caller:Kx});return(0,Et.jsx)(ni,{...s,children:(0,Et.jsx)(TK,{scope:t,contentId:Ne(),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})})};B_.displayName=Kx;var H_="PopoverAnchor",U_=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=xs(H_,r),a=fm(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ct.useEffect(()=>(i(),()=>s()),[i,s]),(0,Et.jsx)(ai,{...a,...o,ref:t})});U_.displayName=H_;var z_="PopoverTrigger",G_=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=xs(z_,r),a=fm(r),i=de(t,n.triggerRef),s=(0,Et.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":K_(n.open),...o,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Et.jsx)(ai,{asChild:!0,...a,children:s})});G_.displayName=z_;var TR="PopoverPortal",[kK,MK]=V_(TR,{forceMount:void 0}),EK=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=xs(TR,t);return(0,Et.jsx)(kK,{scope:t,forceMount:r,children:(0,Et.jsx)(lt,{present:r||a.open,children:(0,Et.jsx)(Ro,{asChild:!0,container:n,children:o})})})};EK.displayName=TR;var Yc="PopoverContent",W_=ct.forwardRef((e,t)=>{let r=MK(Yc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=xs(Yc,e.__scopePopover);return(0,Et.jsx)(lt,{present:o||a.open,children:a.modal?(0,Et.jsx)(DK,{...n,ref:t}):(0,Et.jsx)(NK,{...n,ref:t})})});W_.displayName=Yc;var AK=co("PopoverContent.RemoveScroll"),DK=ct.forwardRef((e,t)=>{let r=xs(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 vs(i)},[]),(0,Et.jsx)(ii,{as:AK,allowPinchZoom:!0,children:(0,Et.jsx)(j_,{...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})})})}),NK=ct.forwardRef((e,t)=>{let r=xs(Yc,e.__scopePopover),o=ct.useRef(!1),n=ct.useRef(!1);return(0,Et.jsx)(j_,{...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()}})}),j_=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=xs(Yc,r),p=fm(r);return fs(),(0,Et.jsx)(ri,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Et.jsx)(Ko,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Et.jsx)(gs,{"data-state":K_(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)"}})})})}),q_="PopoverClose",$_=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=xs(q_,r);return(0,Et.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});$_.displayName=q_;var OK="PopoverArrow",FK=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=fm(r);return(0,Et.jsx)(hs,{...n,...o,ref:t})});FK.displayName=OK;function K_(e){return e?"open":"closed"}var X_=B_,Y_=U_,Q_=G_;var kR=W_,Z_=$_;var ya=b(D()),eV=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"}}),wa=X_,Ca=Q_,VK=Y_,Vn=J_.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,ya.jsxs)(ya.Fragment,{children:[u&&(0,ya.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ya.jsx)(kR,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(eV({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Vn.displayName=kR.displayName;var BK=Z_,tV=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});tV.displayName="PopoverSeparator";var rV=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});rV.displayName="PopoverHeader";var oV=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});oV.displayName="PopoverFooter";var mm=b(M());var li=b(M(),1);var Xt=b(M(),1);var ys=b(D(),1),MR="rovingFocusGroup.onEntryFocus",HK={bubbles:!1,cancelable:!0},pm="RovingFocusGroup",[ER,nV,UK]=Jn(pm),[zK,Qc]=Fe(pm,[UK]),[GK,WK]=zK(pm),aV=Xt.forwardRef((e,t)=>(0,ys.jsx)(ER.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ys.jsx)(ER.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ys.jsx)(jK,{...e,ref:t})})}));aV.displayName=pm;var jK=Xt.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=Xt.useRef(null),p=de(t,f),m=ia(a),[g,x]=$e({prop:i,defaultProp:s??null,onChange:l,caller:pm}),[v,h]=Xt.useState(!1),y=nt(u),w=nV(r),C=Xt.useRef(!1),[S,R]=Xt.useState(0);return Xt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(MR,y),()=>I.removeEventListener(MR,y)},[y]),(0,ys.jsx)(GK,{scope:r,orientation:o,dir:m,loop:n,currentTabStopId:g,onItemFocus:Xt.useCallback(I=>x(I),[x]),onItemShiftTab:Xt.useCallback(()=>h(!0),[]),onFocusableItemAdd:Xt.useCallback(()=>R(I=>I+1),[]),onFocusableItemRemove:Xt.useCallback(()=>R(I=>I-1),[]),children:(0,ys.jsx)($.div,{tabIndex:v||S===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 L=!C.current;if(I.target===I.currentTarget&&L&&!v){let T=new CustomEvent(MR,HK);if(I.currentTarget.dispatchEvent(T),!T.defaultPrevented){let k=w().filter(O=>O.focusable),E=k.find(O=>O.active),F=k.find(O=>O.id===g),B=[E,F,...k].filter(Boolean).map(O=>O.ref.current);lV(B,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>h(!1))})})}),iV="RovingFocusGroupItem",sV=Xt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ne(),u=a||l,c=WK(iV,r),d=c.currentTabStopId===u,f=nV(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:g}=c;return Xt.useEffect(()=>{if(o)return p(),()=>m()},[o,p,m]),(0,ys.jsx)(ER.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,ys.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{o?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=KK(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?XK(y,w+1):y.slice(w+1)}setTimeout(()=>lV(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:g!=null}):i})})});sV.displayName=iV;var qK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $K(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KK(e,t,r){let o=$K(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return qK[o]}function lV(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function XK(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Xx=aV,Yx=sV;var si=b(D(),1),Qx="Tabs",[YK,s1e]=Fe(Qx,[Qc]),cV=Qc(),[QK,AR]=YK(Qx),dV=li.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=ia(s),[d,f]=$e({prop:o,onChange:n,defaultProp:a??"",caller:Qx});return(0,si.jsx)(QK,{scope:r,baseId:Ne(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,si.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});dV.displayName=Qx;var fV="TabsList",pV=li.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=AR(fV,r),i=cV(r);return(0,si.jsx)(Xx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,si.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});pV.displayName=fV;var mV="TabsTrigger",gV=li.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=AR(mV,r),s=cV(r),l=xV(i.baseId,o),u=yV(i.baseId,o),c=o===i.value;return(0,si.jsx)(Yx,{asChild:!0,...s,focusable:!n,active:c,children:(0,si.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)})})})});gV.displayName=mV;var hV="TabsContent",vV=li.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=AR(hV,r),l=xV(s.baseId,o),u=yV(s.baseId,o),c=o===s.value,d=li.useRef(c);return li.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,si.jsx)(lt,{present:n||c,children:({present:f})=>(0,si.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})})});vV.displayName=hV;function xV(e,t){return`${e}-trigger-${t}`}function yV(e,t){return`${e}-content-${t}`}var DR=dV,NR=pV,OR=gV,FR=vV;var ui=b(D()),gm=mm.forwardRef(({vertical:e=!1,...t},r)=>(0,ui.jsx)(DR,{ref:r,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));gm.displayName=DR.displayName;var JK=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}}),hm=mm.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,scrollable:n,...a},i)=>(0,ui.jsx)(NR,{ref:i,className:P("moonui-theme",JK({variant:t,orientation:r,fullWidth:o,scrollable:n,className:e})),...a}));hm.displayName=NR.displayName;var eX=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}}),ql=mm.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,ui.jsxs)(OR,{ref:d,className:P("moonui-theme",eX({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,ui.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,ui.jsx)("span",{className:"ml-2",children:o}),a&&(0,ui.jsx)("span",{className:"ml-2",children:a})]}));ql.displayName=OR.displayName;var $l=mm.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,ui.jsx)(FR,{ref:o,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),...r}));$l.displayName=FR.displayName;var ws=b(M());var Sa=b(D()),tX=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"}}),rX=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"}}),oX=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"}}),nX=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"}}),ba=ws.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,x]=ws.useState(u||c||[0]);ws.useEffect(()=>{u!==void 0&&x(u)},[u]);let v=k=>s?s(k):`${Math.round(k*100)/100}`,h=(k,E,F)=>(k-E)/(F-E)*100,y=ws.useRef(null),w=p.min||0,C=p.max||100,S=p.step||1,R=k=>{let E=k.map(F=>{if(S<1){let N=S.toString().split(".")[1]?.length||0;return Math.round(F*Math.pow(10,N))/Math.pow(10,N)}return Math.round(F)});x(E),d&&d(E)},I=k=>{if(f)return;let E=y.current;if(!E)return;let F=E.getBoundingClientRect(),N=(k.clientX-F.left)/F.width,B=w+N*(C-w),O=Math.round(B/S)*S,_=Math.max(w,Math.min(C,O)),H=[...g];H[0]=_,R(H)},L=k=>E=>{if(f)return;E.preventDefault();let F=B=>{let O=y.current;if(!O)return;let _=O.getBoundingClientRect(),H=(B.clientX-_.left)/_.width,A=w+H*(C-w),J=Math.round(A/S)*S,ae=Math.max(w,Math.min(C,J)),V=[...g];V[k]=ae,R(V)},N=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",N)},T=k=>E=>{if(f)return;let F=S*10,N=g[k],B;switch(E.key){case"ArrowRight":case"ArrowUp":B=N+S;break;case"ArrowLeft":case"ArrowDown":B=N-S;break;case"PageUp":B=N+F;break;case"PageDown":B=N-F;break;case"Home":B=w;break;case"End":B=C;break;default:return}E.preventDefault();let O=k>0?g[k-1]:w,_=k<g.length-1?g[k+1]:C,H=Math.max(O,Math.min(_,B)),A=[...g];A[k]=H,R(A)};return(0,Sa.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,Sa.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?(0,Sa.jsx)("span",{children:v(g[0])}):(0,Sa.jsxs)("span",{children:[v(g[0])," - ",v(g[g.length-1])]})}),(0,Sa.jsxs)("div",{className:P("moonui-theme",tX({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Sa.jsx)("div",{ref:y,className:P(rX({variant:r||n||"default"})),onClick:I,children:(0,Sa.jsx)("div",{className:P(oX({variant:o||n||"primary"})),style:{left:"0%",width:`${h(g[0],w,C)}%`}})}),g.map((k,E)=>(0,Sa.jsx)("div",{className:P(nX({variant:n||"primary",size:a})),style:{left:`${h(k,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:L(E),onKeyDown:T(E),"aria-label":`Thumb ${E+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":k,"aria-disabled":f},E))]})]})});ba.displayName="Slider";var j=b(D()),wV=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 CV(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 SV(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function aX(e){let t=CV(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 iX(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 SV(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var bV=["#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 Zx({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=bV,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[m,g]=Jo.useState(!1),[x,v]=Jo.useState(o),[h,y]=Jo.useState(100),[w,C]=Jo.useState(!1),[S,R]=Jo.useState(o),I=Jo.useMemo(()=>aX(x)||{h:0,s:0,l:0},[x]),L=Jo.useMemo(()=>CV(x)||{r:0,g:0,b:0},[x]);Jo.useEffect(()=>{v(o),R(o)},[o]);let T=O=>{v(O),R(O),n?.(O)},k=(O,_)=>{let H={...I,[O]:_},A=iX(H.h,H.s,H.l);T(A)},E=(O,_)=>{let H={...L,[O]:_},A=SV(H.r,H.g,H.b);T(A)},F=O=>{let _=O.target.value;R(_),/^#[0-9A-F]{6}$/i.test(_)&&T(_)},N=async()=>{try{let O=x;u==="rgb"?O=`rgb(${L.r}, ${L.g}, ${L.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)}},B=()=>u==="rgb"?`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:x;return(0,j.jsxs)(wa,{open:m,onOpenChange:g,children:[(0,j.jsx)(Ca,{asChild:!0,children:(0,j.jsx)(Ee,{variant:"outline",className:P(wV({size:t,shape:r}),"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)(Vn,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(gm,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(hm,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(ql,{value:"picker",children:"Picker"}),(0,j.jsx)(ql,{value:"sliders",children:"Sliders"}),(0,j.jsx)(ql,{value:"input",children:"Input"})]}),(0,j.jsxs)($l,{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)(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: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)(Br,{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)(ba,{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)(Br,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(ba,{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)($l,{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)(Br,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,j.jsx)(ba,{value:[L.r],onValueChange:([O])=>E("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)(Br,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,j.jsx)(ba,{value:[L.g],onValueChange:([O])=>E("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)(Br,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,j.jsx)(ba,{value:[L.b],onValueChange:([O])=>E("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)($l,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Br,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(lr,{value:S,onChange:F,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(Ee,{size:"icon",variant:"outline",onClick:()=>T(S),children:(0,j.jsx)(hr,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Br,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(lr,{type:"number",value:L.r,onChange:O=>E("r",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(lr,{type:"number",value:L.g,onChange:O=>E("g",parseInt(O.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(lr,{type:"number",value:L.b,onChange:O=>E("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",wV({shape:r})),style:{backgroundColor:x}}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:B()}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,j.jsx)(Ee,{size:"icon",variant:"ghost",onClick:N,className:"h-8 w-8",children:(0,j.jsx)(Ka,{mode:"wait",children:w?(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(hr,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(Ef,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(Br,{children:"Preset Colors"}),(0,j.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(O=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${O}`,"aria-pressed":x===O,className:P("h-7 w-7 rounded border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",x===O?"border-primary":"border-transparent"),style:{backgroundColor:O},onClick:()=>T(O)},O))})]})]})]})}function RV({value:e="#000000",onChange:t,colors:r=bV.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,j.jsx)("div",{className:P("moonui-theme","flex flex-wrap gap-2",o),children:r.map(i=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${i}`,"aria-pressed":e===i,className:P("rounded-full border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a[n],e===i?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:i},onClick:()=>t?.(i)},i))})}function IV({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=Jo.useState(e),a=(i,s)=>{let l={...o,[i]:s};n(l),t?.(l)};return(0,j.jsxs)("div",{className:P("moonui-theme","space-y-4",r),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.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)(Br,{children:"Start Color"}),(0,j.jsx)(Zx,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Br,{children:"End Color"}),(0,j.jsx)(Zx,{value:o.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)(Br,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,j.jsx)(ba,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var Ss=b(M());var PV=1,sX=.9,lX=.8,uX=.17,_R=.1,VR=.999,cX=.9999,dX=.99,fX=/[\\\/_+.#"@\[\(\{&]/,pX=/[\\\/_+.#"@\[\(\{&]/g,mX=/[\s-]/,TV=/[\s-]/g;function BR(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?PV:dX;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=BR(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=PV:fX.test(e.charAt(u-1))?(d*=lX,p=e.slice(n,u-1).match(pX),p&&n>0&&(d*=Math.pow(VR,p.length))):mX.test(e.charAt(u-1))?(d*=sX,m=e.slice(n,u-1).match(TV),m&&n>0&&(d*=Math.pow(VR,m.length))):(d*=uX,n>0&&(d*=Math.pow(VR,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=cX)),(d<_R&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=BR(e,t,r,o,u+1,a+2,i),f*_R>d&&(d=f*_R)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function LV(e){return e.toLowerCase().replace(TV," ")}function kV(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,BR(e,t,LV(e),LV(t),0,0,{})}var Ze=b(M(),1);var je=b(D(),1),ey="Dialog",[MV,G1e]=Fe(ey),[gX,Bn]=MV(ey),EV=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:ey});return(0,je.jsx)(gX,{scope:t,triggerRef:s,contentRef:l,contentId:Ne(),titleId:Ne(),descriptionId:Ne(),open:u,onOpenChange:c,onOpenToggle:Ze.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};EV.displayName=ey;var AV="DialogTrigger",DV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(AV,r),a=de(t,n.triggerRef);return(0,je.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":zR(n.open),...o,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});DV.displayName=AV;var HR="DialogPortal",[hX,NV]=MV(HR,{forceMount:void 0}),OV=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Bn(HR,t);return(0,je.jsx)(hX,{scope:t,forceMount:r,children:Ze.Children.map(o,i=>(0,je.jsx)(lt,{present:r||a.open,children:(0,je.jsx)(Ro,{asChild:!0,container:n,children:i})}))})};OV.displayName=HR;var Jx="DialogOverlay",FV=Ze.forwardRef((e,t)=>{let r=NV(Jx,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Bn(Jx,e.__scopeDialog);return a.modal?(0,je.jsx)(lt,{present:o||a.open,children:(0,je.jsx)(xX,{...n,ref:t})}):null});FV.displayName=Jx;var vX=co("DialogOverlay.RemoveScroll"),xX=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(Jx,r);return(0,je.jsx)(ii,{as:vX,allowPinchZoom:!0,shards:[n.contentRef],children:(0,je.jsx)($.div,{"data-state":zR(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Kl="DialogContent",_V=Ze.forwardRef((e,t)=>{let r=NV(Kl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Bn(Kl,e.__scopeDialog);return(0,je.jsx)(lt,{present:o||a.open,children:a.modal?(0,je.jsx)(yX,{...n,ref:t}):(0,je.jsx)(wX,{...n,ref:t})})});_V.displayName=Kl;var yX=Ze.forwardRef((e,t)=>{let r=Bn(Kl,e.__scopeDialog),o=Ze.useRef(null),n=de(t,r.contentRef,o);return Ze.useEffect(()=>{let a=o.current;if(a)return vs(a)},[]),(0,je.jsx)(VV,{...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())})}),wX=Ze.forwardRef((e,t)=>{let r=Bn(Kl,e.__scopeDialog),o=Ze.useRef(!1),n=Ze.useRef(!1);return(0,je.jsx)(VV,{...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()}})}),VV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Bn(Kl,r),l=Ze.useRef(null),u=de(t,l);return fs(),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(ri,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,je.jsx)(Ko,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":zR(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(CX,{titleId:s.titleId}),(0,je.jsx)(bX,{contentRef:l,descriptionId:s.descriptionId})]})]})}),UR="DialogTitle",BV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(UR,r);return(0,je.jsx)($.h2,{id:n.titleId,...o,ref:t})});BV.displayName=UR;var HV="DialogDescription",UV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(HV,r);return(0,je.jsx)($.p,{id:n.descriptionId,...o,ref:t})});UV.displayName=HV;var zV="DialogClose",GV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(zV,r);return(0,je.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});GV.displayName=zV;function zR(e){return e?"open":"closed"}var WV="DialogTitleWarning",[W1e,jV]=B1(WV,{contentName:Kl,titleName:UR,docsSlug:"dialog"}),CX=({titleId:e})=>{let t=jV(WV),r=`\`${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 Qe.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},c$="DialogDescriptionWarning",d$=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wO(c$).contentName}}.`;return Qe.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Uv=iO,CO=lO,zv=cO,wp=dO,Cp=fO,kS=mO,MS=hO,ES=xO;var te=R(E(),1);var Sp='[cmdk-group=""]',AS='[cmdk-group-items=""]',f$='[cmdk-group-heading=""]',RO='[cmdk-item=""]',bO=`${RO}:not([aria-disabled="true"])`,DS="cmdk-item-select",gc="data-value",p$=(e,t,r)=>nO(e,t,r),IO=te.createContext(void 0),bp=()=>te.useContext(IO),LO=te.createContext(void 0),NS=()=>te.useContext(LO),PO=te.createContext(void 0),TO=te.forwardRef((e,t)=>{let r=hc(()=>{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=hc(()=>new Set),n=hc(()=>new Map),a=hc(()=>new Map),i=hc(()=>new Set),s=kO(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:g=!1,vimBindings:y=!0,...h}=e,v=Ae(),x=Ae(),w=Ae(),C=te.useRef(null),S=R$();xl(()=>{if(c!==void 0){let _=c.trim();r.current.value=_,b.emit()}},[c]),xl(()=>{S(6,F)},[]);let b=te.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(),S(1,k);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(S(7,()=>{var he;r.current.selectedItemId=(he=N())==null?void 0:he.id,b.emit()}),re||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}}b.emit()}},emit:()=>{i.current.forEach(_=>_())}}),[]),I=te.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)),S(2,()=>{P(),b.emit()}))},item:(_,Y)=>(o.current.add(_),Y&&(n.current.has(Y)?n.current.get(Y).add(_):n.current.set(Y,new Set([_]))),S(3,()=>{A(),P(),r.current.value||k(),b.emit()}),()=>{a.current.delete(_),o.current.delete(_),r.current.filtered.items.delete(_);let re=N();S(4,()=>{A(),re?.getAttribute("id")===_&&k(),b.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:p$;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(AS);ce?ce.appendChild(X.parentElement===ce?X:X.closest(`${AS} > *`)):re.appendChild(X.parentElement===re?X:X.closest(`${AS} > *`))}),Y.sort((X,ce)=>ce[1]-X[1]).forEach(X=>{var ce;let z=(ce=C.current)==null?void 0:ce.querySelector(`${Sp}[${gc}="${encodeURIComponent(X[0])}"]`);z?.parentElement.appendChild(z)})}function k(){let _=H().find(re=>re.getAttribute("aria-disabled")!=="true"),Y=_?.getAttribute(gc);b.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(Sp))==null?void 0:Y.querySelector(f$))==null||re.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function N(){var _;return(_=C.current)==null?void 0:_.querySelector(`${RO}[aria-selected="true"]`)}function H(){var _;return Array.from(((_=C.current)==null?void 0:_.querySelectorAll(bO))||[])}function O(_){let Y=H()[_];Y&&b.setState("value",Y.getAttribute(gc))}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&&b.setState("value",z.getAttribute(gc))}function V(_){let Y=N(),re=Y?.closest(Sp),X;for(;re&&!X;)re=_>0?S$(re,Sp):b$(re,Sp),X=re?.querySelector(bO);X?b.setState("value",X.getAttribute(gc)):U(_)}let M=()=>O(H().length-1),J=_=>{_.preventDefault(),_.metaKey?M():_.altKey?V(1):U(1)},ae=_=>{_.preventDefault(),_.metaKey?O(0):_.altKey?V(-1):U(-1)};return te.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&&J(_);break}case"ArrowDown":{J(_);break}case"p":case"k":{y&&_.ctrlKey&&ae(_);break}case"ArrowUp":{ae(_);break}case"Home":{_.preventDefault(),O(0);break}case"End":{_.preventDefault(),M();break}case"Enter":{_.preventDefault();let X=N();if(X){let ce=new Event(DS);X.dispatchEvent(ce)}}}}},te.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:L$},l),Gv(e,_=>te.createElement(LO.Provider,{value:b},te.createElement(IO.Provider,{value:I},_))))}),m$=te.forwardRef((e,t)=>{var r,o;let n=Ae(),a=te.useRef(null),i=te.useContext(PO),s=bp(),l=kO(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;xl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=MO(n,a,[e.value,e.children,a],e.keywords),d=NS(),f=Zi(S=>S.value&&S.value===c.current),p=Zi(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(DS,m),()=>S.removeEventListener(DS,m)},[p,e.onSelect,e.disabled]);function m(){var S,b;g(),(b=(S=l.current).onSelect)==null||b.call(S,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 te.createElement($.div,{ref:Qr(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)}),g$=te.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=Ae(),s=te.useRef(null),l=te.useRef(null),u=Ae(),c=bp(),d=Zi(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);xl(()=>c.group(i),[]),MO(i,s,[e.value,e.heading,l]);let f=te.useMemo(()=>({id:i,forceMount:n}),[n]);return te.createElement($.div,{ref:Qr(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&te.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Gv(e,p=>te.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},te.createElement(PO.Provider,{value:f},p))))}),h$=te.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=te.useRef(null),a=Zi(i=>!i.search);return!r&&!a?null:te.createElement($.div,{ref:Qr(n,t),...o,"cmdk-separator":"",role:"separator"})}),v$=te.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=NS(),i=Zi(u=>u.search),s=Zi(u=>u.selectedItemId),l=bp();return te.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),te.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)}})}),x$=te.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=te.useRef(null),i=te.useRef(null),s=Zi(u=>u.selectedItemId),l=bp();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:Qr(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},Gv(e,u=>te.createElement("div",{ref:Qr(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),y$=te.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return te.createElement(Uv,{open:r,onOpenChange:o},te.createElement(zv,{container:i},te.createElement(wp,{"cmdk-overlay":"",className:n}),te.createElement(Cp,{"aria-label":e.label,"cmdk-dialog":"",className:a},te.createElement(TO,{ref:t,...s}))))}),w$=te.forwardRef((e,t)=>Zi(r=>r.filtered.count===0)?te.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),C$=te.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return te.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},Gv(e,i=>te.createElement("div",{"aria-hidden":!0},i)))}),Er=Object.assign(TO,{List:x$,Item:m$,Input:v$,Group:g$,Separator:h$,Dialog:y$,Empty:w$,Loading:C$});function S$(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function b$(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function kO(e){let t=te.useRef(e);return xl(()=>{t.current=e}),t}var xl=typeof window>"u"?te.useEffect:te.useLayoutEffect;function hc(e){let t=te.useRef();return t.current===void 0&&(t.current=e()),t}function Zi(e){let t=NS(),r=()=>e(t.snapshot());return te.useSyncExternalStore(t.subscribe,r,r)}function MO(e,t,r,o=[]){let n=te.useRef(),a=bp();return xl(()=>{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(gc,s),n.current=s}),n}var R$=()=>{let[e,t]=te.useState(),r=hc(()=>new Map);return xl(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function I$(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Gv({asChild:e,children:t},r){return e&&te.isValidElement(t)?te.cloneElement(I$(t),{ref:t.ref},r(t.props.children)):r(t)}var L$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var vc=R(E());var wt=R(D()),OS=Uv,P$=CO,T$=zv,k$=ES,M$=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"}}),EO=vc.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,wt.jsx)(wp,{ref:n,className:L("moonui-theme",M$({variant:t,animation:r}),e),...o}));EO.displayName=wp.displayName;var E$=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"}}),Wv=vc.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,wt.jsxs)(T$,{children:[(0,wt.jsx)(EO,{variant:s,animation:l,onClick:u?void 0:v}),(0,wt.jsxs)(Cp,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:L(E$({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,wt.jsxs)(FS,{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)(Nt,{className:"h-5 w-5 animate-spin text-primary"}),m&&(0,wt.jsx)(ur,{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)(Rp,{children:c}),d&&(0,wt.jsx)(_S,{children:d})]})]}),t,!u&&(0,wt.jsxs)(ES,{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,wt.jsx)(ao,{className:"h-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Wv.displayName=Cp.displayName;var FS=({className:e,...t})=>(0,wt.jsx)("div",{className:L("flex flex-col space-y-2 text-center sm:text-left",e),...t});FS.displayName="DialogHeader";var AO=({className:e,...t})=>(0,wt.jsx)("div",{className:L("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});AO.displayName="DialogFooter";var Rp=vc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)(kS,{ref:r,className:L("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));Rp.displayName=kS.displayName;var _S=vc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)(MS,{ref:r,className:L("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));_S.displayName=MS.displayName;var A$=vc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)("form",{ref:r,className:L("moonui-theme","flex flex-col gap-4",e),...t}));A$.displayName="DialogForm";var vr=R(D()),D$=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"}}),VS=Ji.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,vr.jsx)(Er,{ref:n,className:L("moonui-theme",D$({variant:t,size:r}),e),...o}));VS.displayName=Er.displayName;var N$=({children:e,commandClassName:t,...r})=>(0,vr.jsx)(OS,{...r,children:(0,vr.jsxs)(Wv,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,vr.jsx)(Rp,{className:"sr-only",children:"Command Menu"}),(0,vr.jsx)(VS,{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})]})}),DO=Ji.forwardRef(({className:e,...t},r)=>(0,vr.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,vr.jsx)(As,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,vr.jsx)(Er.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})]}));DO.displayName=Er.Input.displayName;var NO=Ji.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Er.List,{ref:r,className:L("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));NO.displayName=Er.List.displayName;var OO=Ji.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Er.Empty,{ref:r,className:L("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));OO.displayName=Er.Empty.displayName;var FO=Ji.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Er.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}));FO.displayName=Er.Group.displayName;var _O=Ji.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Er.Separator,{ref:r,className:L("moonui-theme","-mx-1 h-px bg-border",e),...t}));_O.displayName=Er.Separator.displayName;var VO=Ji.forwardRef(({className:e,...t},r)=>(0,vr.jsx)(Er.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}));VO.displayName=Er.Item.displayName;var BO=({className:e,...t})=>(0,vr.jsx)("span",{className:L("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});BO.displayName="CommandShortcut";var rb=R(E());var Pp=R(E(),1);function es(e,t){return typeof e=="function"?e(t):e}function mo(e,t){return r=>{t.setState(o=>({...o,[e]:es(r,o[e])}))}}function Kv(e){return e instanceof Function}function O$(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function F$(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 Ze.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},SX="DialogDescriptionWarning",bX=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jV(SX).contentName}}.`;return Ze.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},ty=EV,qV=DV,ry=OV,vm=FV,xm=_V,GR=BV,WR=UV,jR=GV;var te=b(M(),1);var ym='[cmdk-group=""]',qR='[cmdk-group-items=""]',RX='[cmdk-group-heading=""]',XV='[cmdk-item=""]',KV=`${XV}:not([aria-disabled="true"])`,$R="cmdk-item-select",Zc="data-value",IX=(e,t,r)=>kV(e,t,r),YV=te.createContext(void 0),wm=()=>te.useContext(YV),QV=te.createContext(void 0),KR=()=>te.useContext(QV),ZV=te.createContext(void 0),JV=te.forwardRef((e,t)=>{let r=Jc(()=>{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}}}),o=Jc(()=>new Set),n=Jc(()=>new Map),a=Jc(()=>new Map),i=Jc(()=>new Set),s=eB(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:g=!1,vimBindings:x=!0,...v}=e,h=Ne(),y=Ne(),w=Ne(),C=te.useRef(null),S=FX();Xl(()=>{if(c!==void 0){let V=c.trim();r.current.value=V,R.emit()}},[c]),Xl(()=>{S(6,F)},[]);let R=te.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>r.current,setState:(V,Y,re)=>{var X,ce,z,ne;if(!Object.is(r.current[V],Y)){if(r.current[V]=Y,V==="search")E(),T(),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;r.current.selectedItemId=(he=N())==null?void 0:he.id,R.emit()}),re||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,re)=>{var X;Y!==((X=a.current.get(V))==null?void 0:X.value)&&(a.current.set(V,{value:Y,keywords:re}),r.current.filtered.items.set(V,L(Y,re)),S(2,()=>{T(),R.emit()}))},item:(V,Y)=>(o.current.add(V),Y&&(n.current.has(Y)?n.current.get(Y).add(V):n.current.set(Y,new Set([V]))),S(3,()=>{E(),T(),r.current.value||k(),R.emit()}),()=>{a.current.delete(V),o.current.delete(V),r.current.filtered.items.delete(V);let re=N();S(4,()=>{E(),re?.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 L(V,Y){var re,X;let ce=(X=(re=s.current)==null?void 0:re.filter)!=null?X:IX;return V?ce(V,r.current.search,Y):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let V=r.current.filtered.items,Y=[];r.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 re=C.current;B().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(qR);ce?ce.appendChild(X.parentElement===ce?X:X.closest(`${qR} > *`)):re.appendChild(X.parentElement===re?X:X.closest(`${qR} > *`))}),Y.sort((X,ce)=>ce[1]-X[1]).forEach(X=>{var ce;let z=(ce=C.current)==null?void 0:ce.querySelector(`${ym}[${Zc}="${encodeURIComponent(X[0])}"]`);z?.parentElement.appendChild(z)})}function k(){let V=B().find(re=>re.getAttribute("aria-disabled")!=="true"),Y=V?.getAttribute(Zc);R.setState("value",Y||void 0)}function E(){var V,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=(V=a.current.get(z))==null?void 0:V.value)!=null?Y:"",he=(X=(re=a.current.get(z))==null?void 0:re.keywords)!=null?X:[],xe=L(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 V,Y,re;let X=N();X&&(((V=X.parentElement)==null?void 0:V.firstChild)===X&&((re=(Y=X.closest(ym))==null?void 0:Y.querySelector(RX))==null||re.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function N(){var V;return(V=C.current)==null?void 0:V.querySelector(`${XV}[aria-selected="true"]`)}function B(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(KV))||[])}function O(V){let Y=B()[V];Y&&R.setState("value",Y.getAttribute(Zc))}function _(V){var Y;let re=N(),X=B(),ce=X.findIndex(ne=>ne===re),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(Zc))}function H(V){let Y=N(),re=Y?.closest(ym),X;for(;re&&!X;)re=V>0?NX(re,ym):OX(re,ym),X=re?.querySelector(KV);X?R.setState("value",X.getAttribute(Zc)):_(V)}let A=()=>O(B().length-1),J=V=>{V.preventDefault(),V.metaKey?A():V.altKey?H(1):_(1)},ae=V=>{V.preventDefault(),V.metaKey?O(0):V.altKey?H(-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 re=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||re))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(),A();break}case"Enter":{V.preventDefault();let X=N();if(X){let ce=new Event($R);X.dispatchEvent(ce)}}}}},te.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:VX},l),oy(e,V=>te.createElement(QV.Provider,{value:R},te.createElement(YV.Provider,{value:I},V))))}),PX=te.forwardRef((e,t)=>{var r,o;let n=Ne(),a=te.useRef(null),i=te.useContext(ZV),s=wm(),l=eB(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;Xl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=tB(n,a,[e.value,e.children,a],e.keywords),d=KR(),f=Cs(S=>S.value&&S.value===c.current),p=Cs(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($R,m),()=>S.removeEventListener($R,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:uo(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)}),LX=te.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=Ne(),s=te.useRef(null),l=te.useRef(null),u=Ne(),c=wm(),d=Cs(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);Xl(()=>c.group(i),[]),tB(i,s,[e.value,e.heading,l]);let f=te.useMemo(()=>({id:i,forceMount:n}),[n]);return te.createElement($.div,{ref:uo(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&te.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),oy(e,p=>te.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},te.createElement(ZV.Provider,{value:f},p))))}),TX=te.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=te.useRef(null),a=Cs(i=>!i.search);return!r&&!a?null:te.createElement($.div,{ref:uo(n,t),...o,"cmdk-separator":"",role:"separator"})}),kX=te.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=KR(),i=Cs(u=>u.search),s=Cs(u=>u.selectedItemId),l=wm();return te.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),te.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)}})}),MX=te.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=te.useRef(null),i=te.useRef(null),s=Cs(u=>u.selectedItemId),l=wm();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:uo(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},oy(e,u=>te.createElement("div",{ref:uo(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),EX=te.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return te.createElement(ty,{open:r,onOpenChange:o},te.createElement(ry,{container:i},te.createElement(vm,{"cmdk-overlay":"",className:n}),te.createElement(xm,{"aria-label":e.label,"cmdk-dialog":"",className:a},te.createElement(JV,{ref:t,...s}))))}),AX=te.forwardRef((e,t)=>Cs(r=>r.filtered.count===0)?te.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),DX=te.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return te.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},oy(e,i=>te.createElement("div",{"aria-hidden":!0},i)))}),Ur=Object.assign(JV,{List:MX,Item:PX,Input:kX,Group:LX,Separator:TX,Dialog:EX,Empty:AX,Loading:DX});function NX(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function OX(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function eB(e){let t=te.useRef(e);return Xl(()=>{t.current=e}),t}var Xl=typeof window>"u"?te.useEffect:te.useLayoutEffect;function Jc(e){let t=te.useRef();return t.current===void 0&&(t.current=e()),t}function Cs(e){let t=KR(),r=()=>e(t.snapshot());return te.useSyncExternalStore(t.subscribe,r,r)}function tB(e,t,r,o=[]){let n=te.useRef(),a=wm();return Xl(()=>{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(Zc,s),n.current=s}),n}var FX=()=>{let[e,t]=te.useState(),r=Jc(()=>new Map);return Xl(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function _X(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function oy({asChild:e,children:t},r){return e&&te.isValidElement(t)?te.cloneElement(_X(t),{ref:t.ref},r(t.props.children)):r(t)}var VX={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var ed=b(M());var Ct=b(D()),ny=ty,rB=qV,BX=ry,oB=jR,HX=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"}}),nB=ed.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,Ct.jsx)(vm,{ref:n,className:P("moonui-theme",HX({variant:t,animation:r}),e),...o}));nB.displayName=vm.displayName;var UX=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"}}),Cm=ed.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,...x},v)=>{let h=()=>{g&&g()};return(0,Ct.jsxs)(BX,{children:[(0,Ct.jsx)(nB,{variant:s,animation:l,onClick:u?void 0:h}),(0,Ct.jsxs)(xm,{ref:v,onEscapeKeyDown:u?void 0:h,onInteractOutside:u?void 0:h,className:P(UX({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",m&&"border-success/40",e),...x,children:[(c||d||f)&&(0,Ct.jsxs)(ay,{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)(Vt,{className:"h-5 w-5 animate-spin text-primary"}),m&&(0,Ct.jsx)(hr,{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)(td,{children:c}),d&&(0,Ct.jsx)(iy,{children:d})]})]}),t,!u&&(0,Ct.jsxs)(jR,{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,Ct.jsx)(xo,{className:"h-4 w-4"}),(0,Ct.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Cm.displayName=xm.displayName;var ay=({className:e,...t})=>(0,Ct.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});ay.displayName="DialogHeader";var XR=({className:e,...t})=>(0,Ct.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});XR.displayName="DialogFooter";var td=ed.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)(GR,{ref:r,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));td.displayName=GR.displayName;var iy=ed.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)(WR,{ref:r,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));iy.displayName=WR.displayName;var aB=ed.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)("form",{ref:r,className:P("moonui-theme","flex flex-col gap-4",e),...t}));aB.displayName="DialogForm";var br=b(D()),zX=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"}}),sy=Ss.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,br.jsx)(Ur,{ref:n,className:P("moonui-theme",zX({variant:t,size:r}),e),...o}));sy.displayName=Ur.displayName;var iB=({children:e,commandClassName:t,...r})=>(0,br.jsx)(ny,{...r,children:(0,br.jsxs)(Cm,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,br.jsx)(td,{className:"sr-only",children:"Command Menu"}),(0,br.jsx)(sy,{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})]})}),YR=Ss.forwardRef(({className:e,...t},r)=>(0,br.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,br.jsx)(il,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,br.jsx)(Ur.Input,{ref:r,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})]}));YR.displayName=Ur.Input.displayName;var QR=Ss.forwardRef(({className:e,...t},r)=>(0,br.jsx)(Ur.List,{ref:r,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));QR.displayName=Ur.List.displayName;var ZR=Ss.forwardRef(({className:e,...t},r)=>(0,br.jsx)(Ur.Empty,{ref:r,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));ZR.displayName=Ur.Empty.displayName;var JR=Ss.forwardRef(({className:e,...t},r)=>(0,br.jsx)(Ur.Group,{ref:r,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}));JR.displayName=Ur.Group.displayName;var eI=Ss.forwardRef(({className:e,...t},r)=>(0,br.jsx)(Ur.Separator,{ref:r,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));eI.displayName=Ur.Separator.displayName;var tI=Ss.forwardRef(({className:e,...t},r)=>(0,br.jsx)(Ur.Item,{ref:r,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}));tI.displayName=Ur.Item.displayName;var rI=({className:e,...t})=>(0,br.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});rI.displayName="CommandShortcut";var SI=b(M());var Rm=b(M(),1);function bs(e,t){return typeof e=="function"?e(t):e}function Io(e,t){return r=>{t.setState(o=>({...o,[e]:bs(r,o[e])}))}}function dy(e){return e instanceof Function}function GX(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function WX(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`,`
|
|
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 _$(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 V$(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 xr="debugHeaders";function HO(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 B$={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 qv(t,[...s,...u,...l],e)},ge(e.options,xr,"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))),qv(t,r,e,"center")),ge(e.options,xr,"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 qv(t,a,e,"left")},ge(e.options,xr,"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 qv(t,a,e,"right")},ge(e.options,xr,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,xr,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,xr,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,xr,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,xr,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,xr,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,xr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,xr,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,xr,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,xr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,xr,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,xr,"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,xr,"getLeafHeaders"))}};function qv(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=HO(r,x,{id:[o,p,x.id,y?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(S=>S.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)=>HO(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 QS=(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:()=>F$(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=>_$(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},H$={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()}}},zO=(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))};zO.autoRemove=e=>bn(e);var GO=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};GO.autoRemove=e=>bn(e);var WO=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};WO.autoRemove=e=>bn(e);var qO=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};qO.autoRemove=e=>bn(e);var jO=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});jO.autoRemove=e=>bn(e)||!(e!=null&&e.length);var $O=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});$O.autoRemove=e=>bn(e)||!(e!=null&&e.length);var KO=(e,t,r)=>e.getValue(t)===r;KO.autoRemove=e=>bn(e);var XO=(e,t,r)=>e.getValue(t)==r;XO.autoRemove=e=>bn(e);var ZS=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};ZS.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]};ZS.autoRemove=e=>bn(e)||bn(e[0])&&bn(e[1]);var Ga={includesString:zO,includesStringSensitive:GO,equalsString:WO,arrIncludes:qO,arrIncludesAll:jO,arrIncludesSome:$O,equals:KO,weakEquals:XO,inNumberRange:ZS};function bn(e){return e==null||e===""}var U$={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:mo("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"?Ga.includesString:typeof o=="number"?Ga.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ga.equals:Array.isArray(o)?Ga.arrIncludes:Ga.weakEquals},e.getFilterFn=()=>{var r,o;return Kv(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:Ga[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=es(r,a?a.value:void 0);if(UO(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=es(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(UO(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 UO(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var z$=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),G$=(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},W$=(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},q$=(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]},j$=(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},$$=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!O$(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},K$=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),X$=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,Y$=(e,t)=>t.length,BS={sum:z$,min:G$,max:W$,extent:q$,mean:j$,median:$$,unique:K$,uniqueCount:X$,count:Y$},Q$={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:mo("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 BS.sum;if(Object.prototype.toString.call(o)==="[object Date]")return BS.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return Kv(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:BS[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 Z$(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 J$={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:mo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(r=>[Lp(t,r)],r=>r.findIndex(o=>o.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=Lp(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=Lp(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 Z$(a,r,o)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},HS=()=>({left:[],right:[]}),e9={getInitialState:e=>({columnPinning:HS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:mo("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?HS():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:HS())},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 t9(e){return e||(typeof document<"u"?document:null)}var jv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},US=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),r9={getDefaultColumnDef:()=>jv,getInitialState:e=>({columnSizing:{},columnSizingInfo:US(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:mo("columnSizing",e),onColumnSizingInfoChange:mo("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:jv.minSize,(o=a??e.columnDef.size)!=null?o:jv.size),(n=e.columnDef.maxSize)!=null?n:jv.maxSize)},e.getStart=me(r=>[r,Lp(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,Lp(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(),zS(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=zS(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(h,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(x=>{var w,C;let S=t.options.columnResizeDirection==="rtl"?-1:1,b=(v-((w=x?.startOffset)!=null?w:0))*S,I=Math.max(b/((C=x?.startSize)!=null?C:0),-.999999);return x.columnSizingStart.forEach(T=>{let[P,k]=T;u[P]=Math.round(Math.max(k+k*I,0)*100)/100}),{...x,deltaOffset:b,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=t9(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=o9()?{passive:!1}:!1;zS(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?US():(r=e.initialState.columnSizingInfo)!=null?r:US())},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}}},$v=null;function o9(){if(typeof $v=="boolean")return $v;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 $v=e,$v}function zS(e){return e.type==="touchstart"}var n9={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:mo("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 Lp(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var a9={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()}}},i9={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:mo("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=()=>Ga.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return Kv(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:Ga[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},s9={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:mo("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()}}}},jS=0,$S=10,GS=()=>({pageIndex:jS,pageSize:$S}),l9={getInitialState:e=>({...e,pagination:{...GS(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:mo("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=>es(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?GS():(n=e.initialState.pagination)!=null?n:GS())},e.setPageIndex=o=>{e.setPagination(n=>{let a=es(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?jS:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:jS)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?$S:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:$S)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,es(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=es(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}}},WS=()=>({top:[],bottom:[]}),u9={getInitialState:e=>({rowPinning:WS(),...e}),getDefaultOptions:e=>({onRowPinningChange:mo("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?WS():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:WS())},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"))}},c9={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:mo("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=>{KS(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?qS(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?qS(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?qS(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 KS(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return JS(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return XS(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return XS(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)}}}},KS=(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=>KS(e,s.id,r,o,n))};function qS(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=JS(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 JS(e,t){var r;return(r=t[e.id])!=null?r:!1}function XS(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()&&(JS(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=XS(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var YS=/([0-9]+)/gm,d9=(e,t,r)=>YO(ts(e.getValue(r)).toLowerCase(),ts(t.getValue(r)).toLowerCase()),f9=(e,t,r)=>YO(ts(e.getValue(r)),ts(t.getValue(r))),p9=(e,t,r)=>eb(ts(e.getValue(r)).toLowerCase(),ts(t.getValue(r)).toLowerCase()),m9=(e,t,r)=>eb(ts(e.getValue(r)),ts(t.getValue(r))),g9=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},h9=(e,t,r)=>eb(e.getValue(r),t.getValue(r));function eb(e,t){return e===t?0:e>t?1:-1}function ts(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function YO(e,t){let r=e.split(YS).filter(Boolean),o=t.split(YS).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 Ip={alphanumeric:d9,alphanumericCaseSensitive:f9,text:p9,textCaseSensitive:m9,datetime:g9,basic:h9},v9={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:mo("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 Ip.datetime;if(typeof a=="string"&&(o=!0,a.split(YS).length>1))return Ip.alphanumeric}return o?Ip.text:Ip.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 Kv(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:Ip[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())}},x9=[B$,n9,J$,e9,H$,U$,a9,i9,v9,Q$,s9,l9,u9,c9,r9];function QO(e){var t,r;let o=[...x9,...(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=es(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=V$(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 ZO(){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=QS(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 y9(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 w9(e,t,r){return r.options.filterFromLeafRows?C9(e,t,r):S9(e,t,r)}function C9(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=QS(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 S9(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=QS(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 JO(){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 w9(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function eF(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=y9({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 tF(){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,S=w===void 0;if(C||S){if(y==="first")return C?-1:1;if(y==="last")return C?1:-1;v=C&&S?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 tb(e,t){return e?b9(e)?Pp.createElement(e,t):e:null}function b9(e){return R9(e)||typeof e=="function"||I9(e)}function R9(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function I9(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function rF(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=Pp.useState(()=>({current:QO(t)})),[o,n]=Pp.useState(()=>r.current.initialState);return r.current.setOptions(a=>({...a,...e,state:{...o,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),r.current}var yr=R(E());var ct=R(D()),L9=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"}}),Xv=yr.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,...a},i)=>{let s=t==="striped",l=yr.Children.map(a.children,u=>{if(yr.isValidElement(u)&&u.type==="tbody"){let c=u.props;return yr.cloneElement(u,{className:L(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,ct.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,ct.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,ct.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,ct.jsx)("table",{ref:i,className:L(L9({variant:t,size:r}),o&&"opacity-70",e),...a,children:l})]})});Xv.displayName="Table";var Yv=yr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("thead",{ref:r,className:L("moonui-theme","[&_tr]:border-b",e),...t}));Yv.displayName="TableHeader";var Qv=yr.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=yr.Children.count(o)>0;return(0,ct.jsx)("tbody",{ref:a,className:L("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,ct.jsx)("tr",{children:(0,ct.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,ct.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,ct.jsx)("div",{className:"text-sm",children:r})})})})})});Qv.displayName="TableBody";var oF=yr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("tfoot",{ref:r,className:L("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));oF.displayName="TableFooter";var xc=yr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("tr",{ref:r,className:L("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));xc.displayName="TableRow";var Zv=yr.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,align:n="left",children:a,...i},s)=>{let l=()=>t?r==="asc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):r==="desc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,ct.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,ct.jsxs)("div",{className:L("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});Zv.displayName="TableHead";var Tp=yr.forwardRef(({className:e,align:t="left",...r},o)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,ct.jsx)("td",{ref:o,className:L("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});Tp.displayName="TableCell";var nF=yr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("caption",{ref:r,className:L("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));nF.displayName="TableCaption";var Me=R(D());function P9({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]=rb.useState([]),[d,f]=rb.useState(""),p=rF({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:ZO(),getPaginationRowModel:o?eF():void 0,getSortedRowModel:r?tF():void 0,getFilteredRowModel:n?JO():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Me.jsxs)("div",{className:L("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)(As,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Me.jsx)(gr,{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)(Xv,{children:[(0,Me.jsx)(Yv,{children:p.getHeaderGroups().map(m=>(0,Me.jsx)(xc,{children:m.headers.map(g=>(0,Me.jsx)(Zv,{children:g.isPlaceholder?null:(0,Me.jsxs)("div",{className:L("flex items-center gap-2",g.column.getCanSort()&&"cursor-pointer select-none"),onClick:g.column.getToggleSortingHandler(),children:[tb(g.column.columnDef.header,g.getContext()),r&&g.column.getCanSort()&&(0,Me.jsx)("div",{className:"ml-auto",children:g.column.getIsSorted()==="desc"?(0,Me.jsx)(iu,{className:"h-4 w-4"}):g.column.getIsSorted()==="asc"?(0,Me.jsx)(lu,{className:"h-4 w-4"}):(0,Me.jsx)(su,{className:"h-4 w-4 opacity-50"})})]})},g.id))},m.id))}),(0,Me.jsx)(Qv,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(m=>(0,Me.jsx)(xc,{"data-state":m.getIsSelected()&&"selected",children:m.getVisibleCells().map(g=>(0,Me.jsx)(Tp,{children:tb(g.column.columnDef.cell,g.getContext())},g.id))},m.id)):(0,Me.jsx)(xc,{children:(0,Me.jsx)(Tp,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(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)(_e,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Me.jsx)(nn,{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)(_e,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Me.jsx)(Lr,{className:"h-4 w-4"})]})]})]})]})}function T9(e){return({column:t})=>(0,Me.jsxs)(_e,{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)(iu,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Me.jsx)(lu,{className:"ml-2 h-4 w-4"}):(0,Me.jsx)(su,{className:"ml-2 h-4 w-4"})]})}var Ar=R(E());var ye=R(D()),k9={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},ob=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 aF({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,S]=Ar.useState(!1),[b,I]=Ar.useState(n);Ar.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&&S(!1)},P=H=>{H.stopPropagation(),T(void 0)},k=()=>{T(new Date)},A=H=>!!(l&&H<l||u&&H>u||c?.some(O=>O.toDateString()===H.toDateString())||d?.includes(H.getDay())),F=b&&ev(b)?gn(b,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)(_a,{open:C,onOpenChange:S,children:[(0,ye.jsx)(Va,{asChild:!0,children:(0,ye.jsxs)(_e,{variant:t==="ghost"?"ghost":"outline",className:L(ob({variant:t,size:r,state:o}),!F&&"text-muted-foreground",e),disabled:x||y,...w,children:[(0,ye.jsx)(Ra,{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&&!y&&!x&&(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: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)(Jn,{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,{...k9,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(ep,{mode:"single",selected:b,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)(_e,{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 M9({className:e,value:t,onChange:r,placeholder:o="Pick a date range",formatString:n="LLL dd, y",separator:a=" - ",...i}){let[s,l]=Ar.useState(!1),[u,c]=Ar.useState(t);Ar.useEffect(()=>{c(t)},[t]);let d=p=>{c(p),r?.(p),p?.from&&p?.to&&l(!1)},f=Ar.useMemo(()=>u?.from?u?.to?`${gn(u.from,n)}${a}${gn(u.to,n)}`:gn(u.from,n):null,[u,n,a]);return(0,ye.jsxs)(_a,{open:s,onOpenChange:l,children:[(0,ye.jsx)(Va,{asChild:!0,children:(0,ye.jsxs)(_e,{variant:i.variant==="ghost"?"ghost":"outline",className:L(ob({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)(Jn,{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)(ep,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})}function E9({value:e,onChange:t,formatString:r="PPP p",showTimePicker:o=!0,timeFormat:n="24",timeInterval:a=15,...i}){let[s,l]=Ar.useState(e),[u,c]=Ar.useState(e?gn(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=Ar.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",S=`${w}:${v} ${C}`;m.push({value:x,label:S})}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)(aF,{...i,value:s,onChange:d,formatString:"PPP",showTodayButton:!1}),o&&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)(Nd,{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 A9({value:e,onChange:t,placeholder:r="Pick a month",formatString:o="MMMM yyyy",...n}){let[a,i]=Ar.useState(!1),[s,l]=Ar.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?gn(e,o):null;return(0,ye.jsxs)(_a,{open:a,onOpenChange:i,children:[(0,ye.jsx)(Va,{asChild:!0,children:(0,ye.jsxs)(_e,{variant:n.variant==="default"?"outline":n.variant||"outline",className:L(ob({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)(Jn,{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)(_e,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,ye.jsx)(nn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:s.getFullYear()}),(0,ye.jsx)(_e,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,ye.jsx)(Lr,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((p,m)=>(0,ye.jsx)(_e,{variant:e&&e.getMonth()===m?"primary":"outline",size:"sm",onClick:()=>c(m),className:"h-8 text-xs",children:p.slice(0,3)},p))})]})})]})}var iF=R(E());var nb=R(D());function D9({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=iF.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,nb.jsx)("div",{className:L("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,nb.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 Wa=R(E());var Vt=R(E(),1);var le=R(E(),1);var we=R(D(),1),ab=["Enter"," "],N9=["ArrowDown","PageUp","Home"],lF=["ArrowUp","PageDown","End"],O9=[...N9,...lF],F9={ltr:[...ab,"ArrowRight"],rtl:[...ab,"ArrowLeft"]},_9={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ap="Menu",[Mp,V9,B9]=An(Ap),[yl,ib]=Ne(Ap,[B9,Bo,fc]),Dp=Bo(),uF=fc(),[cF,rs]=yl(Ap),[H9,Np]=yl(Ap),dF=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=Dp(t),[l,u]=le.useState(null),c=le.useRef(!1),d=ot(a),f=Bn(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)(Na,{...s,children:(0,we.jsx)(cF,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(H9,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};dF.displayName=Ap;var U9="MenuAnchor",sb=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Dp(r);return(0,we.jsx)(Oa,{...n,...o,ref:t})});sb.displayName=U9;var lb="MenuPortal",[z9,fF]=yl(lb,{forceMount:void 0}),pF=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=rs(lb,t);return(0,we.jsx)(z9,{scope:t,forceMount:r,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(po,{asChild:!0,container:n,children:o})})})};pF.displayName=lb;var Uo="MenuContent",[G9,ub]=yl(Uo),mF=le.forwardRef((e,t)=>{let r=fF(Uo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=rs(Uo,e.__scopeMenu),i=Np(Uo,e.__scopeMenu);return(0,we.jsx)(Mp.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:o||a.open,children:(0,we.jsx)(Mp.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(W9,{...n,ref:t}):(0,we.jsx)(q9,{...n,ref:t})})})})}),W9=le.forwardRef((e,t)=>{let r=rs(Uo,e.__scopeMenu),o=le.useRef(null),n=de(t,o);return le.useEffect(()=>{let a=o.current;if(a)return Ki(a)},[]),(0,we.jsx)(cb,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),q9=le.forwardRef((e,t)=>{let r=rs(Uo,e.__scopeMenu);return(0,we.jsx)(cb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),j9=Zr("MenuContent.ScrollLock"),cb=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=rs(Uo,r),h=Np(Uo,r),v=Dp(r),x=uF(r),w=V9(r),[C,S]=le.useState(null),b=le.useRef(null),I=de(t,b,y.onContentChange),T=le.useRef(0),P=le.useRef(""),k=le.useRef(0),A=le.useRef(null),F=le.useRef("right"),N=le.useRef(0),H=m?Fa:le.Fragment,O=m?{as:j9,allowPinchZoom:!0}:void 0,U=M=>{let J=P.current+M,ae=w().filter(z=>!z.disabled),_=document.activeElement,Y=ae.find(z=>z.ref.current===_)?.textValue,re=ae.map(z=>z.textValue),X=n7(re,J,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))})(J),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(T.current),[]),Gi();let V=le.useCallback(M=>F.current===A.current?.side&&i7(M,A.current?.area),[]);return(0,we.jsx)(G9,{scope:r,searchRef:P,onItemEnter:le.useCallback(M=>{V(M)&&M.preventDefault()},[V]),onItemLeave:le.useCallback(M=>{V(M)||(b.current?.focus(),S(null))},[V]),onTriggerLeave:le.useCallback(M=>{V(M)&&M.preventDefault()},[V]),pointerGraceTimerRef:k,onPointerGraceIntentChange:le.useCallback(M=>{A.current=M},[]),children:(0,we.jsx)(H,{...O,children:(0,we.jsx)(Aa,{asChild:!0,trapped:n,onMountAutoFocus:W(a,M=>{M.preventDefault(),b.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(Oo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(Nv,{asChild:!0,...x,dir:h.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:W(l,M=>{h.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(ji,{role:"menu","aria-orientation":"vertical","data-state":EF(y.open),"data-radix-menu-content":"",dir:h.dir,...v,...g,ref:I,style:{outline:"none",...g.style},onKeyDown:W(g.onKeyDown,M=>{let ae=M.target.closest("[data-radix-menu-content]")===M.currentTarget,_=M.ctrlKey||M.altKey||M.metaKey,Y=M.key.length===1;ae&&(M.key==="Tab"&&M.preventDefault(),!_&&Y&&U(M.key));let re=b.current;if(M.target!==re||!O9.includes(M.key))return;M.preventDefault();let ce=w().filter(z=>!z.disabled).map(z=>z.ref.current);lF.includes(M.key)&&ce.reverse(),r7(ce)}),onBlur:W(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(T.current),P.current="")}),onPointerMove:W(e.onPointerMove,Ep(M=>{let J=M.target,ae=N.current!==M.clientX;if(M.currentTarget.contains(J)&&ae){let _=M.clientX>N.current?"right":"left";F.current=_,N.current=M.clientX}}))})})})})})})});mF.displayName=Uo;var $9="MenuGroup",db=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{role:"group",...o,ref:t})});db.displayName=$9;var K9="MenuLabel",gF=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{...o,ref:t})});gF.displayName=K9;var Jv="MenuItem",sF="menu.itemSelect",tx=le.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=le.useRef(null),i=Np(Jv,e.__scopeMenu),s=ub(Jv,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(sF,{bubbles:!0,cancelable:!0});d.addEventListener(sF,p=>o?.(p),{once:!0}),nu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(hF,{...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===" "||ab.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});tx.displayName=Jv;var hF=le.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=ub(Jv,r),s=uF(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)(Mp.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,we.jsx)(Ov,{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,Ep(m=>{o?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Ep(m=>i.onItemLeave(m))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),X9="MenuCheckboxItem",vF=le.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,we.jsx)(SF,{scope:e.__scopeMenu,checked:r,children:(0,we.jsx)(tx,{role:"menuitemcheckbox","aria-checked":ex(r)?"mixed":r,...n,ref:t,"data-state":mb(r),onSelect:W(n.onSelect,()=>o?.(ex(r)?!0:!r),{checkForDefaultPrevented:!1})})})});vF.displayName=X9;var xF="MenuRadioGroup",[Y9,Q9]=yl(xF,{value:void 0,onValueChange:()=>{}}),yF=le.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=ot(o);return(0,we.jsx)(Y9,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,we.jsx)(db,{...n,ref:t})})});yF.displayName=xF;var wF="MenuRadioItem",CF=le.forwardRef((e,t)=>{let{value:r,...o}=e,n=Q9(wF,e.__scopeMenu),a=r===n.value;return(0,we.jsx)(SF,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(tx,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":mb(a),onSelect:W(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});CF.displayName=wF;var fb="MenuItemIndicator",[SF,Z9]=yl(fb,{checked:!1}),bF=le.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=Z9(fb,r);return(0,we.jsx)(st,{present:o||ex(a.checked)||a.checked===!0,children:(0,we.jsx)($.span,{...n,ref:t,"data-state":mb(a.checked)})})});bF.displayName=fb;var J9="MenuSeparator",RF=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});RF.displayName=J9;var e7="MenuArrow",IF=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Dp(r);return(0,we.jsx)($i,{...n,...o,ref:t})});IF.displayName=e7;var pb="MenuSub",[t7,LF]=yl(pb),PF=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=rs(pb,t),i=Dp(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=ot(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(Na,{...i,children:(0,we.jsx)(cF,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(t7,{scope:t,contentId:Ae(),triggerId:Ae(),trigger:s,onTriggerChange:l,children:r})})})};PF.displayName=pb;var kp="MenuSubTrigger",TF=le.forwardRef((e,t)=>{let r=rs(kp,e.__scopeMenu),o=Np(kp,e.__scopeMenu),n=LF(kp,e.__scopeMenu),a=ub(kp,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)(sb,{asChild:!0,...u,children:(0,we.jsx)(hF,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":EF(r.open),...e,ref:Qr(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Ep(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,Ep(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===" "||F9[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});TF.displayName=kp;var kF="MenuSubContent",MF=le.forwardRef((e,t)=>{let r=fF(Uo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=rs(Uo,e.__scopeMenu),i=Np(Uo,e.__scopeMenu),s=LF(kF,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(Mp.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:o||a.open,children:(0,we.jsx)(Mp.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(cb,{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=_9[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});MF.displayName=kF;function EF(e){return e?"open":"closed"}function ex(e){return e==="indeterminate"}function mb(e){return ex(e)?"indeterminate":e?"checked":"unchecked"}function r7(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function o7(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function n7(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=o7(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 a7(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 i7(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return a7(r,t)}function Ep(e){return t=>t.pointerType==="mouse"?e(t):void 0}var AF=dF,DF=sb,NF=pF,OF=mF,FF=db,_F=gF,VF=tx,BF=vF,HF=yF,UF=CF,zF=bF,GF=RF,WF=IF,qF=PF,jF=TF,$F=MF;var _t=R(D(),1),rx="DropdownMenu",[l7,mIe]=Ne(rx,[ib]),wr=ib(),[u7,KF]=l7(rx),XF=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=wr(t),u=Vt.useRef(null),[c,d]=je({prop:n,defaultProp:a??!1,onChange:i,caller:rx});return(0,_t.jsx)(u7,{scope:t,triggerId:Ae(),triggerRef:u,contentId:Ae(),open:c,onOpenChange:d,onOpenToggle:Vt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,_t.jsx)(AF,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};XF.displayName=rx;var YF="DropdownMenuTrigger",QF=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=KF(YF,r),i=wr(r);return(0,_t.jsx)(DF,{asChild:!0,...i,children:(0,_t.jsx)($.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...n,ref:Qr(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())})})})});QF.displayName=YF;var c7="DropdownMenuPortal",ZF=e=>{let{__scopeDropdownMenu:t,...r}=e,o=wr(t);return(0,_t.jsx)(NF,{...o,...r})};ZF.displayName=c7;var JF="DropdownMenuContent",e_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=KF(JF,r),a=wr(r),i=Vt.useRef(!1);return(0,_t.jsx)(OF,{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)"}})});e_.displayName=JF;var d7="DropdownMenuGroup",t_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(FF,{...n,...o,ref:t})});t_.displayName=d7;var f7="DropdownMenuLabel",r_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(_F,{...n,...o,ref:t})});r_.displayName=f7;var p7="DropdownMenuItem",o_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(VF,{...n,...o,ref:t})});o_.displayName=p7;var m7="DropdownMenuCheckboxItem",n_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(BF,{...n,...o,ref:t})});n_.displayName=m7;var g7="DropdownMenuRadioGroup",a_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(HF,{...n,...o,ref:t})});a_.displayName=g7;var h7="DropdownMenuRadioItem",i_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(UF,{...n,...o,ref:t})});i_.displayName=h7;var v7="DropdownMenuItemIndicator",s_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(zF,{...n,...o,ref:t})});s_.displayName=v7;var x7="DropdownMenuSeparator",l_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(GF,{...n,...o,ref:t})});l_.displayName=x7;var y7="DropdownMenuArrow",w7=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(WF,{...n,...o,ref:t})});w7.displayName=y7;var C7=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=wr(t),[s,l]=je({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,_t.jsx)(qF,{...i,open:s,onOpenChange:l,children:r})},S7="DropdownMenuSubTrigger",u_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)(jF,{...n,...o,ref:t})});u_.displayName=S7;var b7="DropdownMenuSubContent",c_=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wr(r);return(0,_t.jsx)($F,{...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)"}})});c_.displayName=b7;var d_=XF,f_=QF,gb=ZF,hb=e_,p_=t_,vb=r_,xb=o_,yb=n_,m_=a_,wb=i_,Cb=s_,Sb=l_;var g_=C7,bb=u_,Rb=c_;var Bt=R(D()),I7=d_,L7=f_,P7=p_,T7=gb,k7=g_,M7=m_,h_=Wa.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,Bt.jsxs)(bb,{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,Bt.jsx)(Lr,{className:"ml-auto h-4 w-4"})]}));h_.displayName=bb.displayName;var v_=Wa.forwardRef(({className:e,...t},r)=>(0,Bt.jsx)(Rb,{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}));v_.displayName=Rb.displayName;var x_=Wa.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,Bt.jsx)(gb,{children:(0,Bt.jsx)(hb,{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})}));x_.displayName=hb.displayName;var y_=Wa.forwardRef(({className:e,inset:t,...r},o)=>(0,Bt.jsx)(xb,{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}));y_.displayName=xb.displayName;var w_=Wa.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,Bt.jsxs)(yb,{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,Bt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bt.jsx)(Cb,{children:(0,Bt.jsx)(ur,{className:"h-4 w-4"})})}),t]}));w_.displayName=yb.displayName;var C_=Wa.forwardRef(({className:e,children:t,...r},o)=>(0,Bt.jsxs)(wb,{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,Bt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bt.jsx)(Cb,{children:(0,Bt.jsx)(ks,{className:"h-2 w-2 fill-current"})})}),t]}));C_.displayName=wb.displayName;var S_=Wa.forwardRef(({className:e,inset:t,...r},o)=>(0,Bt.jsx)(vb,{ref:o,className:L("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));S_.displayName=vb.displayName;var b_=Wa.forwardRef(({className:e,...t},r)=>(0,Bt.jsx)(Sb,{ref:r,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));b_.displayName=Sb.displayName;var R_=({className:e,...t})=>(0,Bt.jsx)("span",{className:L("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});R_.displayName="DropdownMenuShortcut";var go=R(E());var I_=R(E());var qa=R(D()),E7=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"}}),A7=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"}}),ox=I_.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,qa.jsxs)(qa.Fragment,{children:[s&&(0,qa.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,qa.jsx)("span",{className:L("text-sm font-medium text-muted-foreground",u),children:y})}),(0,qa.jsx)("div",{ref:p,className:L("moonui-theme",E7({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,qa.jsx)("div",{className:L(A7({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});ox.displayName="Progress";var ve=R(D()),D7=e=>e.startsWith("image/")?(0,ve.jsx)(Es,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(rf,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(Kd,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(Hd,{className:"h-4 w-4"}):(0,ve.jsx)(Ud,{className:"h-4 w-4"}),Ib=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]},N7=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,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: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:D7(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)(_e,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,ve.jsx)(ao,{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:Ib(o.size)}),a==="uploading"&&(0,ve.jsxs)(io,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Nt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(io,{variant:"success",className:"h-5",children:[(0,ve.jsx)(wi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(io,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(an,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(ox,{value:n,className:"h-1"})})]})]})},L_=go.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,go.useState)([]),[p,m]=(0,go.useState)(!1),[g,y]=(0,go.useState)(null),h=I=>I.size>r?`File size exceeds ${Ib(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,go.useCallback)(async I=>{let T=Array.from(I);if(y(null),d.length+T.length>o){y(`Maximum ${o} files allowed`);return}let P=[],k=[];if(T.forEach(F=>{let N=h(F);N?k.push(`${F.name}: ${N}`):P.push(F)}),k.length>0){y(k.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,go.useCallback)(I=>{if(I.preventDefault(),m(!1),n)return;let T=I.dataTransfer.files;T.length>0&&v(T)},[v,n]),w=(0,go.useCallback)(I=>{I.preventDefault(),n||m(!0)},[n]),C=(0,go.useCallback)(I=>{I.preventDefault(),m(!1)},[]),S=(0,go.useCallback)(I=>{let T=I.target.files;T&&T.length>0&&v(T),I.target.value=""},[v]),b=(0,go.useCallback)(I=>{f(T=>{let P=T.find(k=>k.id===I);return P?.preview&&URL.revokeObjectURL(P.preview),T.filter(k=>k.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)(Be.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: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)(tf,{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, ",Ib(r)," each"]})]}),(0,ve.jsx)(_e,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ra,{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)(an,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:g})]})}),(0,ve.jsx)(Ra,{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)(Ra,{children:d.map(I=>(0,ve.jsx)(N7,{uploadedFile:I,onRemove:b},I.id))})})]})})]})});L_.displayName="FileUpload";var P_=R(E());var wl=R(D()),T_=P_.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=Qu(0),d=Qu(0),f=o==="up"||o==="down",p=f?c:d,m=CC(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,S=!1;switch(o){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?r(!1):bC(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,wl.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,wl.jsx)(Be.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:L("absolute inset-0 bg-black/50",i)}),(0,wl.jsxs)(Be.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,wl.jsx)("div",{className:"flex justify-center p-2",children:(0,wl.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});T_.displayName="GestureDrawer";var os=R(E());var Ze=R(D());function O7({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,os.useState)(null),[s,l]=(0,os.useState)(!0);(0,os.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:L("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"})]}),r&&(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:L("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)(Ci,{className:"fill-current text-yellow-500",size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(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)(zd,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(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)(Ms,{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 BIe({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,os.useState)(null),[a,i]=(0,os.useState)(!0);(0,os.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)(_e,{variant:"outline",size:t,className:L("moonui-theme","group",e),asChild:!0,children:(0,Ze.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Ze.jsx)(Ci,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Ze.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(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(o)}),(0,Ze.jsx)(Bd,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var Cl=R(E());var Se=R(E(),1),ax=R(E(),1),Rn=R(E(),1),F7=Object.defineProperty,_7=Object.defineProperties,V7=Object.getOwnPropertyDescriptors,nx=Object.getOwnPropertySymbols,M_=Object.prototype.hasOwnProperty,E_=Object.prototype.propertyIsEnumerable,k_=(e,t,r)=>t in e?F7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B7=(e,t)=>{for(var r in t||(t={}))M_.call(t,r)&&k_(e,r,t[r]);if(nx)for(var r of nx(t))E_.call(t,r)&&k_(e,r,t[r]);return e},H7=(e,t)=>_7(e,V7(t)),U7=(e,t)=>{var r={};for(var o in e)M_.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&nx)for(var o of nx(e))t.indexOf(o)<0&&E_.call(e,o)&&(r[o]=e[o]);return r};function z7(e){let t=setTimeout(e,0),r=setTimeout(e,10),o=setTimeout(e,50);return[t,r,o]}function G7(e){let t=ax.useRef();return ax.useEffect(()=>{t.current=e}),t.current}var W7=18,A_=40,q7=`${A_}px`,j7=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function $7({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:o}){let[n,a]=Rn.useState(!1),[i,s]=Rn.useState(!1),[l,u]=Rn.useState(!1),c=Rn.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),d=Rn.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-W7,v=y;document.querySelectorAll(j7).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,r]);return Rn.useEffect(()=>{let f=e.current;if(!f||r==="none")return;function p(){let g=window.innerWidth-f.getBoundingClientRect().right;s(g>=A_)}p();let m=setInterval(p,1e3);return()=>{clearInterval(m)}},[e,r]),Rn.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:q7}}var Lb=Se.createContext({}),Pb=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=K7,render:g,children:y}=r,h=U7(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),v,x,w,C,S;let[b,I]=Se.useState(typeof h.defaultValue=="string"?h.defaultValue:""),T=o??b,P=G7(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),H=Se.useRef({value:T,onChange:k,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,(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;H.current.value!==ee.value&&H.current.onChange(ee.value),O.current.prev=[ee.selectionStart,ee.selectionEnd,ee.selectionDirection];function ze(){if(document.activeElement!==ee){_(null),re(null);return}let De=ee.selectionStart,Ct=ee.selectionEnd,kn=ee.selectionDirection,Sr=ee.maxLength,$o=ee.value,yo=O.current.prev,Ko=-1,Mn=-1,En;if($o.length!==0&&De!==null&&Ct!==null){let Mc=De===Ct,Ec=De===$o.length&&$o.length<Sr;if(Mc&&!Ec){let wo=De;if(wo===0)Ko=0,Mn=1,En="forward";else if(wo===Sr)Ko=wo-1,Mn=wo,En="backward";else if(Sr>1&&$o.length>1){let Ac=0;if(yo[0]!==null&&yo[1]!==null){En=wo<yo[1]?"backward":"forward";let Ex=yo[0]===yo[1]&&yo[0]<Sr;En==="backward"&&!Ex&&(Ac=-1)}Ko=Ac+wo,Mn=Ac+wo+1}}Ko!==-1&&Mn!==-1&&Ko!==Mn&&F.current.setSelectionRange(Ko,Mn,En)}let Yp=Ko!==-1?Ko:De,Ll=Mn!==-1?Mn:Ct,Ya=En??kn;_(Yp),re(Ll),O.current.prev=[Yp,Ll,Ya]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===ee&&J(!0),!document.getElementById("input-otp-style")){let De=document.createElement("style");if(De.id="input-otp-style",document.head.appendChild(De),De.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;";Op(De.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Op(De.sheet,`[data-input-otp]:autofill { ${Ct} }`),Op(De.sheet,`[data-input-otp]:-webkit-autofill { ${Ct} }`),Op(De.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; } }"),Op(De.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ke=()=>{ie&&ie.style.setProperty("--root-height",`${ee.clientHeight}px`)};Ke();let It=new ResizeObserver(Ke);return It.observe(ee),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),It.disconnect()}},[]);let[U,V]=Se.useState(!1),[M,J]=Se.useState(!1),[ae,_]=Se.useState(null),[Y,re]=Se.useState(null);Se.useEffect(()=>{z7(()=>{var ee,ie,ze,Ke;(ee=F.current)==null||ee.dispatchEvent(new Event("input"));let It=(ie=F.current)==null?void 0:ie.selectionStart,De=(ze=F.current)==null?void 0:ze.selectionEnd,Ct=(Ke=F.current)==null?void 0:Ke.selectionDirection;It!==null&&De!==null&&(_(It),re(De),O.current.prev=[It,De,Ct])})},[T,M]),Se.useEffect(()=>{P!==void 0&&T!==P&&P.length<a&&T.length===a&&c?.(T)},[a,c,P,T]);let X=$7({containerRef:N,inputRef:F,pushPasswordManagerStrategy:d,isFocused:M}),ce=Se.useCallback(ee=>{let ie=ee.currentTarget.value.slice(0,a);if(ie.length>0&&A&&!A.test(ie)){ee.preventDefault();return}typeof P=="string"&&ie.length<P.length&&document.dispatchEvent(new Event("selectionchange")),k(ie)},[a,k,P,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),_(ie),re(ze)}J(!0)},[a]),ne=Se.useCallback(ee=>{var ie,ze;let Ke=F.current;if(!f&&(!H.current.isIOS||!ee.clipboardData||!Ke))return;let It=ee.clipboardData.getData("text/plain"),De=f?f(It):It;ee.preventDefault();let Ct=(ie=F.current)==null?void 0:ie.selectionStart,kn=(ze=F.current)==null?void 0:ze.selectionEnd,Sr=(Ct!==kn?T.slice(0,Ct)+De+T.slice(kn):T.slice(0,Ct)+De+T.slice(Ct)).slice(0,a);if(Sr.length>0&&A&&!A.test(Sr))return;Ke.value=Sr,k(Sr);let $o=Math.min(Sr.length,a-1),yo=Sr.length;Ke.setSelectionRange($o,yo),_($o),re(yo)},[a,k,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",H7(B7({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:ee=>{var ie;ne(ee),(ie=h.onPaste)==null||ie.call(h,ee)},onChange:ce,onMouseOver:ee=>{var ie;V(!0),(ie=h.onMouseOver)==null||ie.call(h,ee)},onMouseLeave:ee=>{var ie;V(!1),(ie=h.onMouseLeave)==null||ie.call(h,ee)},onFocus:ee=>{var ie;z(),(ie=h.onFocus)==null||ie.call(h,ee)},onBlur:ee=>{var ie;J(!1),(ie=h.onBlur)==null||ie.call(h,ee)}})),[ce,z,ne,u,xe,a,Y,ae,h,A?.source,T]),K=Se.useMemo(()=>({slots:Array.from({length:a}).map((ee,ie)=>{var ze;let Ke=M&&ae!==null&&Y!==null&&(ae===Y&&ie===ae||ie>=ae&&ie<Y),It=T[ie]!==void 0?T[ie]:null,De=T[0]!==void 0?null:(ze=l?.[ie])!=null?ze:null;return{char:It,placeholderChar:De,isActive:Ke,hasFakeCaret:Ke&&It===null}}),isFocused:M,isHovering:!h.disabled&&U}),[M,U,a,Y,ae,h.disabled,T]),Ie=Se.useMemo(()=>g?g(K):Se.createElement(Lb.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)))});Pb.displayName="Input";function Op(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var K7=`
|
|
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 jX(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 qX(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 Rr="debugHeaders";function sB(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 $X={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 ly(t,[...s,...u,...l],e)},ge(e.options,Rr,"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))),ly(t,r,e,"center")),ge(e.options,Rr,"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 ly(t,a,e,"left")},ge(e.options,Rr,"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 ly(t,a,e,"right")},ge(e.options,Rr,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Rr,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Rr,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Rr,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Rr,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Rr,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Rr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Rr,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Rr,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Rr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Rr,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Rr,"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,Rr,"getLeafHeaders"))}};function ly(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(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=sB(r,y,{id:[o,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)=>sB(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,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 gI=(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:()=>WX(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=>jX(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},KX={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()}}},uB=(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))};uB.autoRemove=e=>Hn(e);var cB=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};cB.autoRemove=e=>Hn(e);var dB=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};dB.autoRemove=e=>Hn(e);var fB=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};fB.autoRemove=e=>Hn(e);var pB=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});pB.autoRemove=e=>Hn(e)||!(e!=null&&e.length);var mB=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});mB.autoRemove=e=>Hn(e)||!(e!=null&&e.length);var gB=(e,t,r)=>e.getValue(t)===r;gB.autoRemove=e=>Hn(e);var hB=(e,t,r)=>e.getValue(t)==r;hB.autoRemove=e=>Hn(e);var hI=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};hI.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]};hI.autoRemove=e=>Hn(e)||Hn(e[0])&&Hn(e[1]);var ci={includesString:uB,includesStringSensitive:cB,equalsString:dB,arrIncludes:fB,arrIncludesAll:pB,arrIncludesSome:mB,equals:gB,weakEquals:hB,inNumberRange:hI};function Hn(e){return e==null||e===""}var XX={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Io("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"?ci.includesString:typeof o=="number"?ci.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?ci.equals:Array.isArray(o)?ci.arrIncludes:ci.weakEquals},e.getFilterFn=()=>{var r,o;return dy(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:ci[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=bs(r,a?a.value:void 0);if(lB(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=bs(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(lB(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 lB(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var YX=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),QX=(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},ZX=(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},JX=(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]},eY=(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},tY=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!GX(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},rY=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),oY=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,nY=(e,t)=>t.length,oI={sum:YX,min:QX,max:ZX,extent:JX,mean:eY,median:tY,unique:rY,uniqueCount:oY,count:nY},aY={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:Io("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 oI.sum;if(Object.prototype.toString.call(o)==="[object Date]")return oI.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return dy(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:oI[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 iY(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 sY={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Io("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(r=>[bm(t,r)],r=>r.findIndex(o=>o.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=bm(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=bm(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 iY(a,r,o)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},nI=()=>({left:[],right:[]}),lY={getInitialState:e=>({columnPinning:nI(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Io("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?nI():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:nI())},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 uY(e){return e||(typeof document<"u"?document:null)}var uy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},aI=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),cY={getDefaultColumnDef:()=>uy,getInitialState:e=>({columnSizing:{},columnSizingInfo:aI(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Io("columnSizing",e),onColumnSizingInfoChange:Io("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:uy.minSize,(o=a??e.columnDef.size)!=null?o:uy.size),(n=e.columnDef.maxSize)!=null?n:uy.maxSize)},e.getStart=me(r=>[r,bm(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,bm(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(),iI(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[o.id,o.getSize()]],l=iI(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(L=>{let[T,k]=L;u[T]=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=uY(r),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=dY()?{passive:!1}:!1;iI(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: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?aI():(r=e.initialState.columnSizingInfo)!=null?r:aI())},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}}},cy=null;function dY(){if(typeof cy=="boolean")return cy;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 cy=e,cy}function iI(e){return e.type==="touchstart"}var fY={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Io("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 bm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var pY={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()}}},mY={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Io("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=()=>ci.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return dy(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:ci[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},gY={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Io("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()}}}},cI=0,dI=10,sI=()=>({pageIndex:cI,pageSize:dI}),hY={getInitialState:e=>({...e,pagination:{...sI(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Io("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=>bs(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?sI():(n=e.initialState.pagination)!=null?n:sI())},e.setPageIndex=o=>{e.setPagination(n=>{let a=bs(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?cI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:cI)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?dI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:dI)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,bs(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=bs(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}}},lI=()=>({top:[],bottom:[]}),vY={getInitialState:e=>({rowPinning:lI(),...e}),getDefaultOptions:e=>({onRowPinningChange:Io("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?lI():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:lI())},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"))}},xY={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Io("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=>{fI(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?uI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?uI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?uI(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 fI(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return vI(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return pI(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return pI(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)}}}},fI=(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=>fI(e,s.id,r,o,n))};function uI(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=vI(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 vI(e,t){var r;return(r=t[e.id])!=null?r:!1}function pI(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()&&(vI(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=pI(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var mI=/([0-9]+)/gm,yY=(e,t,r)=>vB(Rs(e.getValue(r)).toLowerCase(),Rs(t.getValue(r)).toLowerCase()),wY=(e,t,r)=>vB(Rs(e.getValue(r)),Rs(t.getValue(r))),CY=(e,t,r)=>xI(Rs(e.getValue(r)).toLowerCase(),Rs(t.getValue(r)).toLowerCase()),SY=(e,t,r)=>xI(Rs(e.getValue(r)),Rs(t.getValue(r))),bY=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},RY=(e,t,r)=>xI(e.getValue(r),t.getValue(r));function xI(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 vB(e,t){let r=e.split(mI).filter(Boolean),o=t.split(mI).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 Sm={alphanumeric:yY,alphanumericCaseSensitive:wY,text:CY,textCaseSensitive:SY,datetime:bY,basic:RY},IY={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Io("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 Sm.datetime;if(typeof a=="string"&&(o=!0,a.split(mI).length>1))return Sm.alphanumeric}return o?Sm.text:Sm.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 dy(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:Sm[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())}},PY=[$X,fY,sY,lY,KX,XX,pY,mY,IY,aY,gY,hY,vY,xY,cY];function xB(e){var t,r;let o=[...PY,...(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=bs(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=qX(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 yB(){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=gI(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 LY(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 TY(e,t,r){return r.options.filterFromLeafRows?kY(e,t,r):MY(e,t,r)}function kY(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=gI(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 MY(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=gI(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 wB(){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,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 TY(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function CB(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=LY({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 SB(){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],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(r.rows),flatRows:n,rowsById:r.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function yI(e,t){return e?EY(e)?Rm.createElement(e,t):e:null}function EY(e){return AY(e)||typeof e=="function"||DY(e)}function AY(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function DY(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function bB(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=Rm.useState(()=>({current:xB(t)})),[o,n]=Rm.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 Ir=b(M());var dt=b(D()),NY=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"}}),Im=Ir.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,...a},i)=>{let s=t==="striped",l=Ir.Children.map(a.children,u=>{if(Ir.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Ir.cloneElement(u,{className:P(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:P(NY({variant:t,size:r}),o&&"opacity-70",e),...a,children:l})]})});Im.displayName="Table";var Pm=Ir.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("thead",{ref:r,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Pm.displayName="TableHeader";var Lm=Ir.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=Ir.Children.count(o)>0;return(0,dt.jsx)("tbody",{ref:a,className:P("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})})})})})});Lm.displayName="TableBody";var wI=Ir.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("tfoot",{ref:r,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));wI.displayName="TableFooter";var Yl=Ir.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("tr",{ref:r,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Yl.displayName="TableRow";var Tm=Ir.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: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?o:void 0,...i,children:t||n!=="left"?(0,dt.jsxs)("div",{className:P("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});Tm.displayName="TableHead";var rd=Ir.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:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});rd.displayName="TableCell";var CI=Ir.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("caption",{ref:r,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));CI.displayName="TableCaption";var Ae=b(D());function RB({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]=SI.useState([]),[d,f]=SI.useState(""),p=bB({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:yB(),getPaginationRowModel:o?CB():void 0,getSortedRowModel:r?SB():void 0,getFilteredRowModel:n?wB():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Ae.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Ae.jsx)("div",{className:"flex items-center",children:(0,Ae.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ae.jsx)(il,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ae.jsx)(lr,{placeholder:i,value:d,onChange:m=>f(m.target.value),className:"pl-8"})]})}),(0,Ae.jsx)("div",{className:"rounded-md border",children:(0,Ae.jsxs)(Im,{children:[(0,Ae.jsx)(Pm,{children:p.getHeaderGroups().map(m=>(0,Ae.jsx)(Yl,{children:m.headers.map(g=>(0,Ae.jsx)(Tm,{children:g.isPlaceholder?null:(0,Ae.jsxs)("div",{className:P("flex items-center gap-2",g.column.getCanSort()&&"cursor-pointer select-none"),onClick:g.column.getToggleSortingHandler(),children:[yI(g.column.columnDef.header,g.getContext()),r&&g.column.getCanSort()&&(0,Ae.jsx)("div",{className:"ml-auto",children:g.column.getIsSorted()==="desc"?(0,Ae.jsx)(Wu,{className:"h-4 w-4"}):g.column.getIsSorted()==="asc"?(0,Ae.jsx)(qu,{className:"h-4 w-4"}):(0,Ae.jsx)(ju,{className:"h-4 w-4 opacity-50"})})]})},g.id))},m.id))}),(0,Ae.jsx)(Lm,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(m=>(0,Ae.jsx)(Yl,{"data-state":m.getIsSelected()&&"selected",children:m.getVisibleCells().map(g=>(0,Ae.jsx)(rd,{children:yI(g.column.columnDef.cell,g.getContext())},g.id))},m.id)):(0,Ae.jsx)(Yl,{children:(0,Ae.jsx)(rd,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Ae.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ae.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Ae.jsxs)("div",{className:"space-x-2",children:[(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Ae.jsx)(bn,{className:"h-4 w-4"}),"Previous"]}),(0,Ae.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Ae.jsx)(Or,{className:"h-4 w-4"})]})]})]})]})}function IB(e){return({column:t})=>(0,Ae.jsxs)(Ee,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Ae.jsx)(Wu,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ae.jsx)(qu,{className:"ml-2 h-4 w-4"}):(0,Ae.jsx)(ju,{className:"ml-2 h-4 w-4"})]})}var zr=b(M());var ye=b(D()),OY={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},bI=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 RI({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:x=!1,showTodayButton:v=!0,calendarProps:h,disabled:y,...w}){let[C,S]=zr.useState(!1),[R,I]=zr.useState(n);zr.useEffect(()=>{I(n)},[n]);let L=B=>{let O=Array.isArray(B)?B[0]:B&&typeof B=="object"&&"from"in B?B.from:B;I(O),a?.(O),O&&S(!1)},T=B=>{B.stopPropagation(),L(void 0)},k=()=>{L(new Date)},E=B=>!!(l&&B<l||u&&B>u||c?.some(O=>O.toDateString()===B.toDateString())||d?.includes(B.getDay())),F=R&&gx(R)?jo(R,s):null,N=m||(0,ye.jsx)(tl,{className:"h-4 w-4"});return(0,ye.jsx)("div",{className:"moonui-theme",children:(0,ye.jsxs)(wa,{open:C,onOpenChange:S,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{variant:t==="ghost"?"ghost":"outline",className:P(bI({variant:t,size:r,state:o}),!F&&"text-muted-foreground",e),disabled:y||x,...w,children:[(0,ye.jsx)(Ka,{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&&!x&&!y&&(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:T,role:"button",tabIndex:0,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),T(B))},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)(Vn,{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,{...OY,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Bc,{mode:"single",selected:R,onSelect:L,disabled:E,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)(Ee,{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 PB({className:e,value:t,onChange:r,placeholder:o="Pick a date range",formatString:n="LLL dd, y",separator:a=" - ",...i}){let[s,l]=zr.useState(!1),[u,c]=zr.useState(t);zr.useEffect(()=>{c(t)},[t]);let d=p=>{c(p),r?.(p),p?.from&&p?.to&&l(!1)},f=zr.useMemo(()=>u?.from?u?.to?`${jo(u.from,n)}${a}${jo(u.to,n)}`:jo(u.from,n):null,[u,n,a]);return(0,ye.jsxs)(wa,{open:s,onOpenChange:l,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{variant:i.variant==="ghost"?"ghost":"outline",className:P(bI({variant:i.variant,size:i.size,state:i.state}),!f&&"text-muted-foreground",e),disabled:i.disabled||i.readOnly,children:[(0,ye.jsx)(tl,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:f||o})]})}),(0,ye.jsx)(Vn,{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)(Bc,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})}function LB({value:e,onChange:t,formatString:r="PPP p",showTimePicker:o=!0,timeFormat:n="24",timeInterval:a=15,...i}){let[s,l]=zr.useState(e),[u,c]=zr.useState(e?jo(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=zr.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)(RI,{...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)(kf,{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 TB({value:e,onChange:t,placeholder:r="Pick a month",formatString:o="MMMM yyyy",...n}){let[a,i]=zr.useState(!1),[s,l]=zr.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?jo(e,o):null;return(0,ye.jsxs)(wa,{open:a,onOpenChange:i,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{variant:n.variant==="default"?"outline":n.variant||"outline",className:P(bI({variant:n.variant,size:n.size,state:n.state}),!f&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[(0,ye.jsx)(tl,{className:"mr-2 h-4 w-4"}),f||r]})}),(0,ye.jsx)(Vn,{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)(Ee,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,ye.jsx)(bn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:s.getFullYear()}),(0,ye.jsx)(Ee,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,ye.jsx)(Or,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((p,m)=>(0,ye.jsx)(Ee,{variant:e&&e.getMonth()===m?"primary":"outline",size:"sm",onClick:()=>c(m),className:"h-8 text-xs",children:p.slice(0,3)},p))})]})})]})}var kB=b(M());var II=b(D());function MB({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=kB.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,II.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,II.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:r(f,p)},o(f)))})}var di=b(M());var zt=b(M(),1);var le=b(M(),1);var we=b(D(),1),PI=["Enter"," "],FY=["ArrowDown","PageUp","Home"],AB=["ArrowUp","PageDown","End"],_Y=[...FY,...AB],VY={ltr:[...PI,"ArrowRight"],rtl:[...PI,"ArrowLeft"]},BY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Am="Menu",[Mm,HY,UY]=Jn(Am),[Ql,LI]=Fe(Am,[UY,Zo,Qc]),Dm=Zo(),DB=Qc(),[NB,Is]=Ql(Am),[zY,Nm]=Ql(Am),OB=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=Dm(t),[l,u]=le.useState(null),c=le.useRef(!1),d=nt(a),f=ia(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)(ni,{...s,children:(0,we.jsx)(NB,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(zY,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};OB.displayName=Am;var GY="MenuAnchor",TI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Dm(r);return(0,we.jsx)(ai,{...n,...o,ref:t})});TI.displayName=GY;var kI="MenuPortal",[WY,FB]=Ql(kI,{forceMount:void 0}),_B=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=Is(kI,t);return(0,we.jsx)(WY,{scope:t,forceMount:r,children:(0,we.jsx)(lt,{present:r||a.open,children:(0,we.jsx)(Ro,{asChild:!0,container:n,children:o})})})};_B.displayName=kI;var en="MenuContent",[jY,MI]=Ql(en),VB=le.forwardRef((e,t)=>{let r=FB(en,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Is(en,e.__scopeMenu),i=Nm(en,e.__scopeMenu);return(0,we.jsx)(Mm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(lt,{present:o||a.open,children:(0,we.jsx)(Mm.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(qY,{...n,ref:t}):(0,we.jsx)($Y,{...n,ref:t})})})})}),qY=le.forwardRef((e,t)=>{let r=Is(en,e.__scopeMenu),o=le.useRef(null),n=de(t,o);return le.useEffect(()=>{let a=o.current;if(a)return vs(a)},[]),(0,we.jsx)(EI,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),$Y=le.forwardRef((e,t)=>{let r=Is(en,e.__scopeMenu);return(0,we.jsx)(EI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),KY=co("MenuContent.ScrollLock"),EI=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,x=Is(en,r),v=Nm(en,r),h=Dm(r),y=DB(r),w=HY(r),[C,S]=le.useState(null),R=le.useRef(null),I=de(t,R,x.onContentChange),L=le.useRef(0),T=le.useRef(""),k=le.useRef(0),E=le.useRef(null),F=le.useRef("right"),N=le.useRef(0),B=m?ii:le.Fragment,O=m?{as:KY,allowPinchZoom:!0}:void 0,_=A=>{let J=T.current+A,ae=w().filter(z=>!z.disabled),V=document.activeElement,Y=ae.find(z=>z.ref.current===V)?.textValue,re=ae.map(z=>z.textValue),X=iQ(re,J,Y),ce=ae.find(z=>z.textValue===X)?.ref.current;(function z(ne){T.current=ne,window.clearTimeout(L.current),ne!==""&&(L.current=window.setTimeout(()=>z(""),1e3))})(J),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(L.current),[]),fs();let H=le.useCallback(A=>F.current===E.current?.side&&lQ(A,E.current?.area),[]);return(0,we.jsx)(jY,{scope:r,searchRef:T,onItemEnter:le.useCallback(A=>{H(A)&&A.preventDefault()},[H]),onItemLeave:le.useCallback(A=>{H(A)||(R.current?.focus(),S(null))},[H]),onTriggerLeave:le.useCallback(A=>{H(A)&&A.preventDefault()},[H]),pointerGraceTimerRef:k,onPointerGraceIntentChange:le.useCallback(A=>{E.current=A},[]),children:(0,we.jsx)(B,{...O,children:(0,we.jsx)(ri,{asChild:!0,trapped:n,onMountAutoFocus:W(a,A=>{A.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(Ko,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(Xx,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:W(l,A=>{v.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(gs,{role:"menu","aria-orientation":"vertical","data-state":tH(x.open),"data-radix-menu-content":"",dir:v.dir,...h,...g,ref:I,style:{outline:"none",...g.style},onKeyDown:W(g.onKeyDown,A=>{let ae=A.target.closest("[data-radix-menu-content]")===A.currentTarget,V=A.ctrlKey||A.altKey||A.metaKey,Y=A.key.length===1;ae&&(A.key==="Tab"&&A.preventDefault(),!V&&Y&&_(A.key));let re=R.current;if(A.target!==re||!_Y.includes(A.key))return;A.preventDefault();let ce=w().filter(z=>!z.disabled).map(z=>z.ref.current);AB.includes(A.key)&&ce.reverse(),nQ(ce)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:W(e.onPointerMove,Em(A=>{let J=A.target,ae=N.current!==A.clientX;if(A.currentTarget.contains(J)&&ae){let V=A.clientX>N.current?"right":"left";F.current=V,N.current=A.clientX}}))})})})})})})});VB.displayName=en;var XY="MenuGroup",AI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{role:"group",...o,ref:t})});AI.displayName=XY;var YY="MenuLabel",BB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{...o,ref:t})});BB.displayName=YY;var fy="MenuItem",EB="menu.itemSelect",my=le.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=le.useRef(null),i=Nm(fy,e.__scopeMenu),s=MI(fy,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(EB,{bubbles:!0,cancelable:!0});d.addEventListener(EB,p=>o?.(p),{once:!0}),zu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(HB,{...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===" "||PI.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});my.displayName=fy;var HB=le.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=MI(fy,r),s=DB(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)(Mm.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,we.jsx)(Yx,{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,Em(m=>{o?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Em(m=>i.onItemLeave(m))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),QY="MenuCheckboxItem",UB=le.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,we.jsx)(qB,{scope:e.__scopeMenu,checked:r,children:(0,we.jsx)(my,{role:"menuitemcheckbox","aria-checked":py(r)?"mixed":r,...n,ref:t,"data-state":OI(r),onSelect:W(n.onSelect,()=>o?.(py(r)?!0:!r),{checkForDefaultPrevented:!1})})})});UB.displayName=QY;var zB="MenuRadioGroup",[ZY,JY]=Ql(zB,{value:void 0,onValueChange:()=>{}}),GB=le.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=nt(o);return(0,we.jsx)(ZY,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,we.jsx)(AI,{...n,ref:t})})});GB.displayName=zB;var WB="MenuRadioItem",jB=le.forwardRef((e,t)=>{let{value:r,...o}=e,n=JY(WB,e.__scopeMenu),a=r===n.value;return(0,we.jsx)(qB,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(my,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":OI(a),onSelect:W(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});jB.displayName=WB;var DI="MenuItemIndicator",[qB,eQ]=Ql(DI,{checked:!1}),$B=le.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=eQ(DI,r);return(0,we.jsx)(lt,{present:o||py(a.checked)||a.checked===!0,children:(0,we.jsx)($.span,{...n,ref:t,"data-state":OI(a.checked)})})});$B.displayName=DI;var tQ="MenuSeparator",KB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});KB.displayName=tQ;var rQ="MenuArrow",XB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Dm(r);return(0,we.jsx)(hs,{...n,...o,ref:t})});XB.displayName=rQ;var NI="MenuSub",[oQ,YB]=Ql(NI),QB=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=Is(NI,t),i=Dm(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)(ni,{...i,children:(0,we.jsx)(NB,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(oQ,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:s,onTriggerChange:l,children:r})})})};QB.displayName=NI;var km="MenuSubTrigger",ZB=le.forwardRef((e,t)=>{let r=Is(km,e.__scopeMenu),o=Nm(km,e.__scopeMenu),n=YB(km,e.__scopeMenu),a=MI(km,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)(TI,{asChild:!0,...u,children:(0,we.jsx)(HB,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":tH(r.open),...e,ref:uo(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Em(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,Em(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.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===" "||VY[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});ZB.displayName=km;var JB="MenuSubContent",eH=le.forwardRef((e,t)=>{let r=FB(en,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Is(en,e.__scopeMenu),i=Nm(en,e.__scopeMenu),s=YB(JB,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(Mm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(lt,{present:o||a.open,children:(0,we.jsx)(Mm.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(EI,{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=BY[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});eH.displayName=JB;function tH(e){return e?"open":"closed"}function py(e){return e==="indeterminate"}function OI(e){return py(e)?"indeterminate":e?"checked":"unchecked"}function nQ(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function aQ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function iQ(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=aQ(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 sQ(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 lQ(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return sQ(r,t)}function Em(e){return t=>t.pointerType==="mouse"?e(t):void 0}var rH=OB,oH=TI,nH=_B,aH=VB,iH=AI,sH=BB,lH=my,uH=UB,cH=GB,dH=jB,fH=$B,pH=KB,mH=XB,gH=QB,hH=ZB,vH=eH;var Ut=b(D(),1),gy="DropdownMenu",[cQ,ike]=Fe(gy,[LI]),Pr=LI(),[dQ,xH]=cQ(gy),yH=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Pr(t),u=zt.useRef(null),[c,d]=$e({prop:n,defaultProp:a??!1,onChange:i,caller:gy});return(0,Ut.jsx)(dQ,{scope:t,triggerId:Ne(),triggerRef:u,contentId:Ne(),open:c,onOpenChange:d,onOpenToggle:zt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Ut.jsx)(rH,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};yH.displayName=gy;var wH="DropdownMenuTrigger",CH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=xH(wH,r),i=Pr(r);return(0,Ut.jsx)(oH,{asChild:!0,...i,children:(0,Ut.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:uo(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())})})})});CH.displayName=wH;var fQ="DropdownMenuPortal",SH=e=>{let{__scopeDropdownMenu:t,...r}=e,o=Pr(t);return(0,Ut.jsx)(nH,{...o,...r})};SH.displayName=fQ;var bH="DropdownMenuContent",RH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=xH(bH,r),a=Pr(r),i=zt.useRef(!1);return(0,Ut.jsx)(aH,{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)"}})});RH.displayName=bH;var pQ="DropdownMenuGroup",IH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(iH,{...n,...o,ref:t})});IH.displayName=pQ;var mQ="DropdownMenuLabel",PH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(sH,{...n,...o,ref:t})});PH.displayName=mQ;var gQ="DropdownMenuItem",LH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(lH,{...n,...o,ref:t})});LH.displayName=gQ;var hQ="DropdownMenuCheckboxItem",TH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(uH,{...n,...o,ref:t})});TH.displayName=hQ;var vQ="DropdownMenuRadioGroup",kH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(cH,{...n,...o,ref:t})});kH.displayName=vQ;var xQ="DropdownMenuRadioItem",MH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(dH,{...n,...o,ref:t})});MH.displayName=xQ;var yQ="DropdownMenuItemIndicator",EH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(fH,{...n,...o,ref:t})});EH.displayName=yQ;var wQ="DropdownMenuSeparator",AH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(pH,{...n,...o,ref:t})});AH.displayName=wQ;var CQ="DropdownMenuArrow",SQ=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(mH,{...n,...o,ref:t})});SQ.displayName=CQ;var bQ=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=Pr(t),[s,l]=$e({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Ut.jsx)(gH,{...i,open:s,onOpenChange:l,children:r})},RQ="DropdownMenuSubTrigger",DH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(hH,{...n,...o,ref:t})});DH.displayName=RQ;var IQ="DropdownMenuSubContent",NH=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Pr(r);return(0,Ut.jsx)(vH,{...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)"}})});NH.displayName=IQ;var OH=yH,FH=CH,FI=SH,_I=RH,_H=IH,VI=PH,BI=LH,HI=TH,VH=kH,UI=MH,zI=EH,GI=AH;var BH=bQ,WI=DH,jI=NH;var Gt=b(D()),HH=OH,UH=FH,zH=_H,GH=FI,WH=BH,jH=VH,qI=di.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,Gt.jsxs)(WI,{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),...o,children:[r,(0,Gt.jsx)(Or,{className:"ml-auto h-4 w-4"})]}));qI.displayName=WI.displayName;var $I=di.forwardRef(({className:e,...t},r)=>(0,Gt.jsx)(jI,{ref:r,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}));$I.displayName=jI.displayName;var KI=di.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,Gt.jsx)(FI,{children:(0,Gt.jsx)(_I,{ref:o,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),...r})}));KI.displayName=_I.displayName;var XI=di.forwardRef(({className:e,inset:t,...r},o)=>(0,Gt.jsx)(BI,{ref:o,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),...r}));XI.displayName=BI.displayName;var YI=di.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,Gt.jsxs)(HI,{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:r,...o,children:[(0,Gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gt.jsx)(zI,{children:(0,Gt.jsx)(hr,{className:"h-4 w-4"})})}),t]}));YI.displayName=HI.displayName;var QI=di.forwardRef(({className:e,children:t,...r},o)=>(0,Gt.jsxs)(UI,{ref:o,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),...r,children:[(0,Gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gt.jsx)(zI,{children:(0,Gt.jsx)(rl,{className:"h-2 w-2 fill-current"})})}),t]}));QI.displayName=UI.displayName;var ZI=di.forwardRef(({className:e,inset:t,...r},o)=>(0,Gt.jsx)(VI,{ref:o,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));ZI.displayName=VI.displayName;var JI=di.forwardRef(({className:e,...t},r)=>(0,Gt.jsx)(GI,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));JI.displayName=GI.displayName;var eP=({className:e,...t})=>(0,Gt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});eP.displayName="DropdownMenuShortcut";var Po=b(M());var qH=b(M());var fi=b(D()),$H=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"}}),LQ=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"}}),Om=qH.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,x=l||`${Math.round(g)}%`;return(0,fi.jsxs)(fi.Fragment,{children:[s&&(0,fi.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,fi.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,fi.jsx)("div",{ref:p,className:P("moonui-theme",$H({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,fi.jsx)("div",{className:P(LQ({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});Om.displayName="Progress";var ve=b(D()),TQ=e=>e.startsWith("image/")?(0,ve.jsx)(nl,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(Zf,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(Gf,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(Of,{className:"h-4 w-4"}):(0,ve.jsx)(Ff,{className:"h-4 w-4"}),tP=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]},kQ=({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:TQ(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)(Ee,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,ve.jsx)(xo,{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:tP(o.size)}),a==="uploading"&&(0,ve.jsxs)(eo,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Vt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(eo,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Gi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(eo,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(Rn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(Om,{value:n,className:"h-1"})})]})]})},rP=Po.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,Po.useState)([]),[p,m]=(0,Po.useState)(!1),[g,x]=(0,Po.useState)(null),v=I=>I.size>r?`File size exceeds ${tP(r)}`:e!=="*"&&!e.split(",").some(L=>{let T=L.trim();return T.includes("*")?I.type.startsWith(T.replace("*","")):I.type===T})?"File type not supported":null,h=(0,Po.useCallback)(async I=>{let L=Array.from(I);if(x(null),d.length+L.length>o){x(`Maximum ${o} files allowed`);return}let T=[],k=[];if(L.forEach(F=>{let N=v(F);N?k.push(`${F.name}: ${N}`):T.push(F)}),k.length>0){x(k.join(", "));return}let E=T.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,...E]);for(let F of E){let N=0,B=setInterval(()=>{N+=15+F.file.size%10,N>=100?(N=100,clearInterval(B),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(T)}catch(F){console.error("Upload failed:",F),f(N=>N.map(B=>E.some(O=>O.id===B.id)?{...B,status:"error"}:B))}},[d.length,o,r,e,i]),y=(0,Po.useCallback)(I=>{if(I.preventDefault(),m(!1),n)return;let L=I.dataTransfer.files;L.length>0&&h(L)},[h,n]),w=(0,Po.useCallback)(I=>{I.preventDefault(),n||m(!0)},[n]),C=(0,Po.useCallback)(I=>{I.preventDefault(),m(!1)},[]),S=(0,Po.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&h(L),I.target.value=""},[h]),R=(0,Po.useCallback)(I=>{f(L=>{let T=L.find(k=>k.id===I);return T?.preview&&URL.revokeObjectURL(T.preview),L.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)(He.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)(Qf,{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, ",tP(r)," each"]})]}),(0,ve.jsx)(Ee,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ka,{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)(Rn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:g})]})}),(0,ve.jsx)(Ka,{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)(Ka,{children:d.map(I=>(0,ve.jsx)(kQ,{uploadedFile:I,onRemove:R},I.id))})})]})})]})});rP.displayName="FileUpload";var KH=b(M());var Zl=b(D()),oP=KH.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=Nc(0),d=Nc(0),f=o==="up"||o==="down",p=f?c:d,m=gb(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(o){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?r(!1):vb(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(o){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},v=()=>f?{y:0}:{x:0};return t?(0,Zl.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,Zl.jsx)(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,Zl.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: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":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,Zl.jsx)("div",{className:"flex justify-center p-2",children:(0,Zl.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});oP.displayName="GestureDrawer";var Ps=b(M());var Je=b(D());function XH({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,Ps.useState)(null),[s,l]=(0,Ps.useState)(!0);(0,Ps.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:P("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:P("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)(Wi,{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)(_f,{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)(ol,{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 MQ({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,Ps.useState)(null),[a,i]=(0,Ps.useState)(!0);(0,Ps.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)(Ee,{variant:"outline",size:t,className:P("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)(Wi,{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)(Nf,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var Jl=b(M());var Se=b(M(),1),vy=b(M(),1),Un=b(M(),1),EQ=Object.defineProperty,AQ=Object.defineProperties,DQ=Object.getOwnPropertyDescriptors,hy=Object.getOwnPropertySymbols,QH=Object.prototype.hasOwnProperty,ZH=Object.prototype.propertyIsEnumerable,YH=(e,t,r)=>t in e?EQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NQ=(e,t)=>{for(var r in t||(t={}))QH.call(t,r)&&YH(e,r,t[r]);if(hy)for(var r of hy(t))ZH.call(t,r)&&YH(e,r,t[r]);return e},OQ=(e,t)=>AQ(e,DQ(t)),FQ=(e,t)=>{var r={};for(var o in e)QH.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&hy)for(var o of hy(e))t.indexOf(o)<0&&ZH.call(e,o)&&(r[o]=e[o]);return r};function _Q(e){let t=setTimeout(e,0),r=setTimeout(e,10),o=setTimeout(e,50);return[t,r,o]}function VQ(e){let t=vy.useRef();return vy.useEffect(()=>{t.current=e}),t.current}var BQ=18,JH=40,HQ=`${JH}px`,UQ=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function zQ({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:o}){let[n,a]=Un.useState(!1),[i,s]=Un.useState(!1),[l,u]=Un.useState(!1),c=Un.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),d=Un.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||r==="none")return;let m=f,g=m.getBoundingClientRect().left+m.offsetWidth,x=m.getBoundingClientRect().top+m.offsetHeight/2,v=g-BQ,h=x;document.querySelectorAll(UQ).length===0&&document.elementFromPoint(v,h)===f||(a(!0),u(!0))},[e,t,l,r]);return Un.useEffect(()=>{let f=e.current;if(!f||r==="none")return;function p(){let g=window.innerWidth-f.getBoundingClientRect().right;s(g>=JH)}p();let m=setInterval(p,1e3);return()=>{clearInterval(m)}},[e,r]),Un.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),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(m),clearTimeout(g),clearTimeout(x)}},[t,o,r,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:HQ}}var nP=Se.createContext({}),aP=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=GQ,render:g,children:x}=r,v=FQ(r,["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:""),L=o??R,T=VQ(L),k=Se.useCallback(ee=>{n?.(ee),I(ee)},[n]),E=Se.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),F=Se.useRef(null),N=Se.useRef(null),B=Se.useRef({value:L,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;B.current.value!==ee.value&&B.current.onChange(ee.value),O.current.prev=[ee.selectionStart,ee.selectionEnd,ee.selectionDirection];function Ge(){if(document.activeElement!==ee){V(null),re(null);return}let Oe=ee.selectionStart,St=ee.selectionEnd,Xn=ee.selectionDirection,Mr=ee.maxLength,fn=ee.value,Eo=O.current.prev,pn=-1,Yn=-1,Qn;if(fn.length!==0&&Oe!==null&&St!==null){let bd=Oe===St,Rd=Oe===fn.length&&fn.length<Mr;if(bd&&!Rd){let Ao=Oe;if(Ao===0)pn=0,Yn=1,Qn="forward";else if(Ao===Mr)pn=Ao-1,Yn=Ao,Qn="backward";else if(Mr>1&&fn.length>1){let Id=0;if(Eo[0]!==null&&Eo[1]!==null){Qn=Ao<Eo[1]?"backward":"forward";let i0=Eo[0]===Eo[1]&&Eo[0]<Mr;Qn==="backward"&&!i0&&(Id=-1)}pn=Id+Ao,Yn=Id+Ao+1}}pn!==-1&&Yn!==-1&&pn!==Yn&&F.current.setSelectionRange(pn,Yn,Qn)}let ng=pn!==-1?pn:Oe,cu=Yn!==-1?Yn:St,wi=Qn??Xn;V(ng),re(cu),O.current.prev=[ng,cu,wi]}if(document.addEventListener("selectionchange",Ge,{capture:!0}),Ge(),document.activeElement===ee&&J(!0),!document.getElementById("input-otp-style")){let Oe=document.createElement("style");if(Oe.id="input-otp-style",document.head.appendChild(Oe),Oe.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;";Fm(Oe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Fm(Oe.sheet,`[data-input-otp]:autofill { ${St} }`),Fm(Oe.sheet,`[data-input-otp]:-webkit-autofill { ${St} }`),Fm(Oe.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; } }"),Fm(Oe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Xe=()=>{ie&&ie.style.setProperty("--root-height",`${ee.clientHeight}px`)};Xe();let Tt=new ResizeObserver(Xe);return Tt.observe(ee),()=>{document.removeEventListener("selectionchange",Ge,{capture:!0}),Tt.disconnect()}},[]);let[_,H]=Se.useState(!1),[A,J]=Se.useState(!1),[ae,V]=Se.useState(null),[Y,re]=Se.useState(null);Se.useEffect(()=>{_Q(()=>{var ee,ie,Ge,Xe;(ee=F.current)==null||ee.dispatchEvent(new Event("input"));let Tt=(ie=F.current)==null?void 0:ie.selectionStart,Oe=(Ge=F.current)==null?void 0:Ge.selectionEnd,St=(Xe=F.current)==null?void 0:Xe.selectionDirection;Tt!==null&&Oe!==null&&(V(Tt),re(Oe),O.current.prev=[Tt,Oe,St])})},[L,A]),Se.useEffect(()=>{T!==void 0&&L!==T&&T.length<a&&L.length===a&&c?.(L)},[a,c,T,L]);let X=zQ({containerRef:N,inputRef:F,pushPasswordManagerStrategy:d,isFocused:A}),ce=Se.useCallback(ee=>{let ie=ee.currentTarget.value.slice(0,a);if(ie.length>0&&E&&!E.test(ie)){ee.preventDefault();return}typeof T=="string"&&ie.length<T.length&&document.dispatchEvent(new Event("selectionchange")),k(ie)},[a,k,T,E]),z=Se.useCallback(()=>{var ee;if(F.current){let ie=Math.min(F.current.value.length,a-1),Ge=F.current.value.length;(ee=F.current)==null||ee.setSelectionRange(ie,Ge),V(ie),re(Ge)}J(!0)},[a]),ne=Se.useCallback(ee=>{var ie,Ge;let Xe=F.current;if(!f&&(!B.current.isIOS||!ee.clipboardData||!Xe))return;let Tt=ee.clipboardData.getData("text/plain"),Oe=f?f(Tt):Tt;ee.preventDefault();let St=(ie=F.current)==null?void 0:ie.selectionStart,Xn=(Ge=F.current)==null?void 0:Ge.selectionEnd,Mr=(St!==Xn?L.slice(0,St)+Oe+L.slice(Xn):L.slice(0,St)+Oe+L.slice(St)).slice(0,a);if(Mr.length>0&&E&&!E.test(Mr))return;Xe.value=Mr,k(Mr);let fn=Math.min(Mr.length,a-1),Eo=Mr.length;Xe.setSelectionRange(fn,Eo),V(fn),re(Eo)},[a,k,E,L]),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",OQ(NQ({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":Y,inputMode:u,pattern:E?.source,"aria-placeholder":l,style:xe,maxLength:a,value:L,ref:F,onPaste:ee=>{var ie;ne(ee),(ie=v.onPaste)==null||ie.call(v,ee)},onChange:ce,onMouseOver:ee=>{var ie;H(!0),(ie=v.onMouseOver)==null||ie.call(v,ee)},onMouseLeave:ee=>{var ie;H(!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,E?.source,L]),K=Se.useMemo(()=>({slots:Array.from({length:a}).map((ee,ie)=>{var Ge;let Xe=A&&ae!==null&&Y!==null&&(ae===Y&&ie===ae||ie>=ae&&ie<Y),Tt=L[ie]!==void 0?L[ie]:null,Oe=L[0]!==void 0?null:(Ge=l?.[ie])!=null?Ge:null;return{char:Tt,placeholderChar:Oe,isActive:Xe,hasFakeCaret:Xe&&Tt===null}}),isFocused:A,isHovering:!v.disabled&&_}),[A,_,a,Y,ae,v.disabled,L]),Ie=Se.useMemo(()=>g?g(K):Se.createElement(nP.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)))});aP.displayName="Input";function Fm(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var GQ=`
|
|
67
67
|
[data-input-otp] {
|
|
68
68
|
--nojs-bg: white !important;
|
|
69
69
|
--nojs-fg: black !important;
|
|
@@ -82,9 +82,31 @@ 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
|
-
}`,X7="^\\d+$",Y7="^[a-zA-Z]+$",Q7="^[a-zA-Z0-9]+$";var ja=R(D()),D_=Cl.forwardRef(({className:e,containerClassName:t,...r},o)=>(0,ja.jsx)(Pb,{ref:o,containerClassName:L("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:L("disabled:cursor-not-allowed",e),...r}));D_.displayName="InputOTP";var N_=Cl.forwardRef(({className:e,...t},r)=>(0,ja.jsx)("div",{ref:r,className:L("flex items-center",e),...t}));N_.displayName="InputOTPGroup";var O_=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}}),F_=Cl.forwardRef(({index:e,className:t,...r},o)=>{let a=Cl.useContext(Lb)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,ja.jsxs)("div",{ref:o,"data-active":l?"":void 0,className:L(O_({isActive:!!l}),t),...r,children:[i,s&&(0,ja.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,ja.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});F_.displayName="InputOTPSlot";var __=Cl.forwardRef(({className:e,...t},r)=>(0,ja.jsx)("div",{ref:r,role:"separator",className:L("text-muted-foreground",e),...t,children:(0,ja.jsx)(Vd,{"aria-hidden":"true"})}));__.displayName="InputOTPSeparator";var yc=R(E());var Ce=R(D());function V_({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,yc.useState)(!1),[s,l]=(0,yc.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)(io,{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)(uu,{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)(du,{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)(_e,{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)(pu,{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 Z7({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,yc.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,yc.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)(io,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(du,{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)(io,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(pu,{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)(_e,{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)(V_,{componentName:r||t,className:o,children:n||e})}return(0,Ce.jsx)("div",{className:o,children:e})}function J7({className:e}){return(0,Ce.jsxs)(io,{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)(uu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function eK({className:e}){return(0,Ce.jsx)(io,{variant:"outline",className:L("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var B_=R(E());var jt=R(D());function Tb({className:e,variant:t="default",showText:r=!0,...o}){let n=B_.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,jt.jsxs)("div",{className:L("flex items-center gap-2",e),children:[(0,jt.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,jt.jsxs)("defs",{children:[t==="gradient"&&(0,jt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,jt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,jt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,jt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,jt.jsxs)("mask",{id:i,children:[(0,jt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,jt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,jt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(0,jt.jsxs)("span",{className:"text-xl font-bold",children:[(0,jt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,jt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function rLe({className:e,variant:t="default",...r}){return(0,jt.jsx)(Tb,{showText:!1,className:e,variant:t,...r})}function oLe({className:e,variant:t="default",showText:r=!0,...o}){return(0,jt.jsx)(Tb,{className:L("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var kb=R(E());var Dr=R(D()),H_=({className:e,...t})=>(0,Dr.jsx)("nav",{role:"navigation","aria-label":"pagination",className:L("moonui-theme","mx-auto flex w-full justify-center",e),...t});H_.displayName="Pagination";var U_=kb.forwardRef(({className:e,...t},r)=>(0,Dr.jsx)("ul",{ref:r,className:L("moonui-theme","flex flex-row items-center gap-1",e),...t}));U_.displayName="PaginationContent";var z_=kb.forwardRef(({className:e,...t},r)=>(0,Dr.jsx)("li",{ref:r,className:L("moonui-theme","",e),...t}));z_.displayName="PaginationItem";var ix=({className:e,isActive:t,size:r="icon",...o})=>(0,Dr.jsx)("a",{"aria-current":t?"page":void 0,className:L(Mg({variant:t?"outline":"ghost",size:r}),e),...o});ix.displayName="PaginationLink";var G_=({className:e,...t})=>(0,Dr.jsxs)(ix,{"aria-label":"Go to previous page",size:"md",className:L("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Dr.jsx)(nn,{className:"h-4 w-4"}),(0,Dr.jsx)("span",{children:"Previous"})]});G_.displayName="PaginationPrevious";var W_=({className:e,...t})=>(0,Dr.jsxs)(ix,{"aria-label":"Go to next page",size:"md",className:L("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Dr.jsx)("span",{children:"Next"}),(0,Dr.jsx)(Lr,{className:"h-4 w-4"})]});W_.displayName="PaginationNext";var q_=({className:e,...t})=>(0,Dr.jsxs)("span",{"aria-hidden":!0,className:L("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Dr.jsx)(Un,{className:"h-4 w-4"}),(0,Dr.jsx)("span",{className:"sr-only",children:"More pages"})]});q_.displayName="PaginationEllipsis";var Bp=R(E());var is=R(E());var Z=R(E(),1),_b=R(yi(),1);function Mb(e,[t,r]){return Math.min(r,Math.max(t,e))}var j_=R(E(),1);var $_=R(D(),1),Eb=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"}),tK="VisuallyHidden",Fp=j_.forwardRef((e,t)=>(0,$_.jsx)($.span,{...e,ref:t,style:{...Eb,...e.style}}));Fp.displayName=tK;var K_=Fp;var fe=R(D(),1),oK=[" ","Enter","ArrowUp","ArrowDown"],nK=[" ","Enter"],Sl="Select",[lx,ux,aK]=An(Sl),[wc,DLe]=Ne(Sl,[aK,Bo]),cx=Bo(),[iK,ns]=wc(Sl),[sK,lK]=wc(Sl),X_=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=cx(t),[y,h]=Z.useState(null),[v,x]=Z.useState(null),[w,C]=Z.useState(!1),S=Bn(u),[b,I]=je({prop:o,defaultProp:n??!1,onChange:a,caller:Sl}),[T,P]=je({prop:i,defaultProp:s,onChange:l,caller:Sl}),k=Z.useRef(null),A=y?m||!!y.closest("form"):!0,[F,N]=Z.useState(new Set),H=Array.from(F).map(O=>O.props.value).join(";");return(0,fe.jsx)(Na,{...g,children:(0,fe.jsxs)(iK,{required:p,scope:t,trigger:y,onTriggerChange:h,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ae(),value:T,onValueChange:P,open:b,onOpenChange:I,dir:S,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(lx.Provider,{scope:t,children:(0,fe.jsx)(sK,{scope:e.__scopeSelect,onNativeOptionAdd:Z.useCallback(O=>{N(U=>new Set(U).add(O))},[]),onNativeOptionRemove:Z.useCallback(O=>{N(U=>{let V=new Set(U);return V.delete(O),V})},[]),children:r})}),A?(0,fe.jsxs)(wV,{"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]})})};X_.displayName=Sl;var Y_="SelectTrigger",Q_=Z.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=cx(r),i=ns(Y_,r),s=i.disabled||o,l=de(t,i.onTriggerChange),u=ux(r),c=Z.useRef("touch"),[d,f,p]=SV(g=>{let y=u().filter(x=>!x.disabled),h=y.find(x=>x.value===i.value),v=bV(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)(Oa,{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":CV(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===" ")&&oK.includes(g.key)&&(m(),g.preventDefault())})})})});Q_.displayName=Y_;var Z_="SelectValue",J_=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=ns(Z_,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return Fe(()=>{u(c)},[u,c]),(0,fe.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:CV(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});J_.displayName=Z_;var uK="SelectIcon",eV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,fe.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});eV.displayName=uK;var cK="SelectPortal",tV=e=>(0,fe.jsx)(po,{asChild:!0,...e});tV.displayName=cK;var bl="SelectContent",rV=Z.forwardRef((e,t)=>{let r=ns(bl,e.__scopeSelect),[o,n]=Z.useState();if(Fe(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?_b.createPortal((0,fe.jsx)(oV,{scope:e.__scopeSelect,children:(0,fe.jsx)(lx.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(nV,{...e,ref:t})});rV.displayName=bl;var In=10,[oV,as]=wc(bl),dK="SelectContentImpl",fK=Zr("SelectContent.RemoveScroll"),nV=Z.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=ns(bl,r),[x,w]=Z.useState(null),[C,S]=Z.useState(null),b=de(t,z=>w(z)),[I,T]=Z.useState(null),[P,k]=Z.useState(null),A=ux(r),[F,N]=Z.useState(!1),H=Z.useRef(!1);Z.useEffect(()=>{if(x)return Ki(x)},[x]),Gi();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]),U=Z.useCallback(()=>O([I,x]),[O,I,x]);Z.useEffect(()=>{F&&U()},[F,U]);let{onOpenChange:V,triggerPointerDownPosRef:M}=v;Z.useEffect(()=>{if(x){let z={x:0,y:0},ne=xe=>{z={x:Math.abs(Math.round(xe.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(M.current?.y??0))}},he=xe=>{z.x<=10&&z.y<=10?xe.preventDefault():x.contains(xe.target)||V(!1),document.removeEventListener("pointermove",ne),M.current=null};return M.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,M]),Z.useEffect(()=>{let z=()=>V(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[V]);let[J,ae]=SV(z=>{let ne=A().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=bV(ne,z,he);xe&&setTimeout(()=>xe.ref.current.focus())}),_=Z.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=Z.useCallback(()=>x?.focus(),[x]),re=Z.useCallback((z,ne,he)=>{let xe=!H.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&k(z)},[v.value]),X=o==="popper"?Ab:aV,ce=X===Ab?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y}:{};return(0,fe.jsx)(oV,{scope:r,content:x,viewport:C,onViewportChange:S,itemRefCallback:_,selectedItem:I,onItemLeave:Y,itemTextRefCallback:re,focusSelectedItem:U,selectedItemText:P,position:o,isPositioned:F,searchRef:J,children:(0,fe.jsx)(Fa,{as:fK,allowPinchZoom:!0,children:(0,fe.jsx)(Aa,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:W(n,z=>{v.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:(0,fe.jsx)(Oo,{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:b,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()}})})})})})})});nV.displayName=dK;var pK="SelectItemAlignedPosition",aV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=ns(bl,r),i=as(bl,r),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,b=>c(b)),f=ux(r),p=Z.useRef(!1),m=Z.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:h,focusSelectedItem:v}=i,x=Z.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&y&&h){let b=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=b.left-K,ee=b.width+Ie,ie=Math.max(ee,I.width),ze=window.innerWidth-In,Ke=Mb(K,[In,Math.max(In,ze-ie)]);s.style.minWidth=ee+"px",s.style.left=Ke+"px"}else{let pe=I.right-P.right,K=window.innerWidth-T.right-pe,Ie=window.innerWidth-b.right-K,ee=b.width+Ie,ie=Math.max(ee,I.width),ze=window.innerWidth-In,Ke=Mb(K,[In,Math.max(In,ze-ie)]);s.style.minWidth=ee+"px",s.style.right=Ke+"px"}let k=f(),A=window.innerHeight-In*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),M=H+O+F+V+U,J=Math.min(y.offsetHeight*5,M),ae=window.getComputedStyle(g),_=parseInt(ae.paddingTop,10),Y=parseInt(ae.paddingBottom,10),re=b.top+b.height/2-In,X=A-re,ce=y.offsetHeight/2,z=y.offsetTop+ce,ne=H+O+z,he=M-ne;if(ne<=re){let pe=k.length>0&&y===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+U),ee=ne+Ie;s.style.height=ee+"px"}else{let pe=k.length>0&&y===k[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=`${In}px 0`,s.style.minHeight=J+"px",s.style.maxHeight=A+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,y,h,a.dir,o]);Fe(()=>x(),[x]);let[w,C]=Z.useState();Fe(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let S=Z.useCallback(b=>{b&&m.current===!0&&(x(),v?.(),m.current=!1)},[x,v]);return(0,fe.jsx)(gK,{scope:r,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}})})})});aV.displayName=pK;var mK="SelectPopperPosition",Ab=Z.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=In,...a}=e,i=cx(r);return(0,fe.jsx)(ji,{...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)"}})});Ab.displayName=mK;var[gK,Vb]=wc(bl,{}),Db="SelectViewport",iV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=as(Db,r),i=Vb(Db,r),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:o}),(0,fe.jsx)(lx.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-In*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})})})]})});iV.displayName=Db;var sV="SelectGroup",[hK,vK]=wc(sV),lV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Ae();return(0,fe.jsx)(hK,{scope:r,id:n,children:(0,fe.jsx)($.div,{role:"group","aria-labelledby":n,...o,ref:t})})});lV.displayName=sV;var uV="SelectLabel",cV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=vK(uV,r);return(0,fe.jsx)($.div,{id:n.id,...o,ref:t})});cV.displayName=uV;var sx="SelectItem",[xK,dV]=wc(sx),fV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=ns(sx,r),l=as(sx,r),u=s.value===o,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),m=de(t,v=>l.itemRefCallback?.(v,o,n)),g=Ae(),y=Z.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)(xK,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:Z.useCallback(v=>{d(x=>x||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(lx.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===" "||(nK.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});fV.displayName=sx;var _p="SelectItemText",pV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=ns(_p,r),s=as(_p,r),l=dV(_p,r),u=lK(_p,r),[c,d]=Z.useState(null),f=de(t,h=>d(h),l.onItemTextChange,h=>s.itemTextRefCallback?.(h,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:y}=u;return Fe(()=>(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?_b.createPortal(a.children,i.valueNode):null]})});pV.displayName=_p;var mV="SelectItemIndicator",gV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return dV(mV,r).isSelected?(0,fe.jsx)($.span,{"aria-hidden":!0,...o,ref:t}):null});gV.displayName=mV;var Nb="SelectScrollUpButton",hV=Z.forwardRef((e,t)=>{let r=as(Nb,e.__scopeSelect),o=Vb(Nb,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Fe(()=>{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)(xV,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});hV.displayName=Nb;var Ob="SelectScrollDownButton",vV=Z.forwardRef((e,t)=>{let r=as(Ob,e.__scopeSelect),o=Vb(Ob,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Fe(()=>{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)(xV,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});vV.displayName=Ob;var xV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=as("SelectScrollButton",r),i=Z.useRef(null),s=ux(r),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),Fe(()=>{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()})})}),yK="SelectSeparator",yV=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,fe.jsx)($.div,{"aria-hidden":!0,...o,ref:t})});yV.displayName=yK;var Fb="SelectArrow",wK=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=cx(r),a=ns(Fb,r),i=as(Fb,r);return a.open&&i.position==="popper"?(0,fe.jsx)($i,{...n,...o,ref:t}):null});wK.displayName=Fb;var CK="SelectBubbleInput",wV=Z.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=Z.useRef(null),a=de(o,n),i=rc(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,{...r,style:{...Eb,...r.style},ref:a,defaultValue:t})});wV.displayName=CK;function CV(e){return e===""||e===void 0}function SV(e){let t=ot(e),r=Z.useRef(""),o=Z.useRef(0),n=Z.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=Z.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function bV(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=SK(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 SK(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var RV=X_,Bb=Q_,IV=J_,LV=eV,PV=tV,Hb=rV,TV=iV,kV=lV,Ub=cV,zb=fV,MV=pV,EV=gV,Gb=hV,Wb=vV,qb=yV;var qe=R(D()),Cc=RV;Cc.displayName="Select";var RK=kV,Vp=IV,Sc=is.forwardRef(({className:e,children:t,variant:r="standard",size:o="md",error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,qe.jsxs)(Bb,{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,qe.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,qe.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,qe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qe.jsx)(Nt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,qe.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,qe.jsx)(LV,{asChild:!0,children:l?(0,qe.jsx)("span",{className:"opacity-60",children:l}):(0,qe.jsx)(Hn,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Sc.displayName=Bb.displayName;var jb=is.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(Gb,{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,qe.jsx)(Dd,{className:"h-4 w-4"})}));jb.displayName=Gb.displayName;var $b=is.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(Wb,{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,qe.jsx)(Hn,{className:"h-4 w-4"})}));$b.displayName=Wb.displayName;var bc=is.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,qe.jsx)(PV,{children:(0,qe.jsxs)(Hb,{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,qe.jsx)(jb,{}),(0,qe.jsx)(TV,{className:L("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,qe.jsx)($b,{})]})}));bc.displayName=Hb.displayName;var AV=is.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(Ub,{ref:r,className:L("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));AV.displayName=Ub.displayName;var Nr=is.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,qe.jsxs)(zb,{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,qe.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qe.jsx)(EV,{children:a||(0,qe.jsx)(ur,{className:"h-4 w-4"})})}),(0,qe.jsx)(MV,{children:t}),n&&(0,qe.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Nr.displayName=zb.displayName;var DV=is.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(qb,{ref:r,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));DV.displayName=qb.displayName;var $t=R(D()),IK=[{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"}],NV=(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}},LK=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},OV=Bp.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=IK,size:s,...l},u)=>{let[c,d]=Bp.useState(o),[f,p]=Bp.useState(t),m=i.find(v=>v.code===c)||i[0],g=v=>{let x=v.target.value.replace(/\D/g,""),w=LK(c),C=x.slice(0,w),S=NV(C,c);p(C),r?.(C,c),v.target.value=S},y=v=>{d(v),r?.(f,v)},h=NV(f,c);return(0,$t.jsxs)("div",{className:L("relative flex gap-2",e),children:[a&&(0,$t.jsxs)(Cc,{value:c,onValueChange:y,children:[(0,$t.jsx)(Sc,{className:"w-[120px]",children:(0,$t.jsx)(Vp,{children:(0,$t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$t.jsx)("span",{children:m.flag}),(0,$t.jsx)("span",{children:m.code})]})})}),(0,$t.jsx)(bc,{children:i.map(v=>(0,$t.jsx)(Nr,{value:v.code,children:(0,$t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$t.jsx)("span",{children:v.flag}),(0,$t.jsx)("span",{children:v.code}),(0,$t.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,$t.jsxs)("div",{className:"relative flex-1",children:[(0,$t.jsx)(gr,{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,$t.jsx)(Xd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});OV.displayName="PhoneInput";var zo=R(E());var ho=R(D()),PK=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"}}),FV=zo.createContext({}),_V=zo.forwardRef(({className:e,value:t,onValueChange:r,disabled:o,name:n,...a},i)=>(0,ho.jsx)(FV.Provider,{value:{value:t,onValueChange:r,disabled:o,name:n},children:(0,ho.jsx)("div",{ref:i,role:"radiogroup",className:L("moonui-theme","grid gap-2",e),...a})}));_V.displayName="RadioGroup";var Kb=zo.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=zo.useContext(FV),c=zo.useId(),d=n||c,f=u.value===a,p=m=>{u.onValueChange&&u.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,ho.jsxs)("div",{className:"relative flex items-center",children:[(0,ho.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,ho.jsx)("label",{htmlFor:d,className:L(PK({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,ho.jsx)("span",{className:L("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,ho.jsx)(ks,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Kb.displayName="RadioGroupItem";var Xb=zo.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,ho.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}));Xb.displayName="RadioLabel";var VV=zo.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=zo.useId(),i=e||a;return(0,ho.jsxs)("div",{className:"flex items-center",children:[(0,ho.jsx)(Kb,{ref:n,id:i,...o}),(0,ho.jsx)(Xb,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});VV.displayName="RadioItemWithLabel";var $a=R(D());function TK({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,$a.jsxs)("div",{className:L("border border-input rounded-md",o),children:[(0,$a.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,$a.jsxs)("div",{className:"flex gap-1",children:[(0,$a.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,$a.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,$a.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,$a.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 tR=R(E());var se=R(E(),1);var GV=R(E(),1),BK=R(yi(),1);var tr=R(E(),1);var HV=R(E(),1);function BV(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kK(...e){return t=>{let r=!1,o=e.map(n=>{let a=BV(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():BV(e[n],null)}}}}function Ka(...e){return HV.useCallback(kK(...e),e)}function zV(e){let t=tr.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];UV(n)&&typeof dx=="function"&&(n=dx(n._payload)),tr.Children.forEach(n,f=>{if(NK(f)){s=!0;let p=f,m="child"in p.props?p.props.child:p.props.children;UV(m)&&typeof dx=="function"&&(m=dx(m._payload)),i=EK(p,m),l.push(i?.props?.children)}else l.push(f)}),i?i=tr.cloneElement(i,void 0,l):!s&&tr.Children.count(n)===1&&tr.isValidElement(n)&&(i=n);let u=i?DK(i):void 0,c=Ka(o,u);if(!i){if(n||n===0)throw new Error(s?VK(e):_K(e));return n}let d=AK(a,i.props??{});return i.type!==tr.Fragment&&(d.ref=o?c:u),tr.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var MK=Symbol.for("radix.slottable");var EK=(e,t)=>{if("child"in e.props){let r=e.props.child;return tr.isValidElement(r)?tr.cloneElement(r,void 0,e.props.children(r.props.children)):null}return tr.isValidElement(t)?t:null};function AK(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 DK(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 NK(e){return tr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MK}var OK=Symbol.for("react.lazy");function UV(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===OK&&"_payload"in e&&FK(e._payload)}function FK(e){return typeof e=="object"&&e!==null&&"then"in e}var _K=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,VK=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,dx=tr[" use ".trim().toString()];var WV=R(D(),1),HK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rc=HK.reduce((e,t)=>{let r=zV(`Primitive.${t}`),o=GV.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,WV.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var rr=R(E(),1);var qV=R(E(),1),Hp=globalThis?.document?qV.useLayoutEffect:()=>{};var $V=R(E(),1);function UK(e,t){return $V.useReducer((r,o)=>t[r][o]??r,e)}var Ic=e=>{let{present:t,children:r}=e,o=zK(t),n=typeof r=="function"?r({present:o.isPresent}):rr.Children.only(r),a=GK(o.ref,WK(n));return typeof r=="function"||o.isPresent?rr.cloneElement(n,{ref:a}):null};Ic.displayName="Presence";function zK(e){let[t,r]=rr.useState(),o=rr.useRef(null),n=rr.useRef(e),a=rr.useRef("none"),i=rr.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=UK(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return rr.useEffect(()=>{l==="mounted"?(a.current=i.current??Up(o.current),i.current=void 0):a.current="none"},[l]),Hp(()=>{let c=o.current,d=n.current;if(d!==e){let p=a.current,m=Up(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]),Hp(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=m=>{let y=Up(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=Up(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:rr.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,i.current=Up(d)}else o.current=null;r(c)},[])}}function jV(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GK(...e){let t=rr.useRef(e);return t.current=e,rr.useCallback(r=>{let o=t.current,n=!1,a=o.map(i=>{let s=jV(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():jV(o[i],null)}}},[])}function Up(e){return e?.animationName||"none"}function WK(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 Xa=R(E(),1),KV=R(D(),1);function XV(e,t=[]){let r=[];function o(a,i){let s=Xa.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=Xa.useMemo(()=>m,Object.values(m));return(0,KV.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=Xa.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=>Xa.createContext(i));return function(s){let l=s?.[e]||a;return Xa.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,qK(n,...t)]}function qK(...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 Xa.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Lc=R(E(),1);function ss(e){let t=Lc.useRef(e);return Lc.useEffect(()=>{t.current=e}),Lc.useMemo(()=>(...r)=>t.current?.(...r),[])}var fx=R(E(),1),jK=R(D(),1),$K=fx.createContext(void 0);function YV(e){let t=fx.useContext($K);return e||t||"ltr"}function QV(e,[t,r]){return Math.min(r,Math.max(t,e))}var iPe=!!(typeof window<"u"&&window.document&&window.document.createElement);function ls(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var JV=R(E(),1),Oe=R(D(),1);function KK(e,t){return JV.useReducer((r,o)=>t[r][o]??r,e)}var Yb="ScrollArea",[eB,vPe]=XV(Yb),[XK,Go]=eB(Yb),tB=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,S]=se.useState(!1),[b,I]=se.useState(!1),T=Ka(t,l),P=YV(n);return(0,Oe.jsx)(XK,{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:S,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:b,onScrollbarYEnabledChange:I,onCornerWidthChange:v,onCornerHeightChange:w,children:(0,Oe.jsx)(Rc.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}})})});tB.displayName=Yb;var rB="ScrollAreaViewport",oB=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=Go(rB,r),s=se.useRef(null),l=Ka(t,s,i.onViewportChange);return(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(YK,{nonce:n}),(0,Oe.jsx)(Rc.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Oe.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});oB.displayName=rB;var YK=se.memo(({nonce:e})=>(0,Oe.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),ta="ScrollAreaScrollbar",gx=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Go(ta,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,Oe.jsx)(QK,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,Oe.jsx)(ZK,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,Oe.jsx)(nB,{...o,ref:t,forceMount:r}):n.type==="always"?(0,Oe.jsx)(Qb,{...o,ref:t,"data-state":"visible"}):null});gx.displayName=ta;var QK=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Go(ta,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,Oe.jsx)(Ic,{present:r||a,children:(0,Oe.jsx)(nB,{"data-state":a?"visible":"hidden",...o,ref:t})})}),ZK=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Go(ta,e.__scopeScrollArea),a=e.orientation==="horizontal",i=vx(()=>l("SCROLL_END"),100),[s,l]=KK("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,Oe.jsx)(Ic,{present:r||s!=="hidden",children:(0,Oe.jsx)(Qb,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:ls(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ls(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),nB=se.forwardRef((e,t)=>{let r=Go(ta,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=vx(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return Pc(r.viewport,l),Pc(r.content,l),(0,Oe.jsx)(Ic,{present:o||a,children:(0,Oe.jsx)(Qb,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Qb=se.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=Go(ta,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=lB(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 nX(f,i.current,s,p)}return r==="horizontal"?(0,Oe.jsx)(JK,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=ZV(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,Oe.jsx)(eX,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=ZV(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}),JK=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=Go(ta,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=Ka(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Oe.jsx)(iB,{"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":hx(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),cB(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:mx(i.paddingLeft),paddingEnd:mx(i.paddingRight)}})}})}),eX=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=Go(ta,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=Ka(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Oe.jsx)(iB,{"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":hx(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),cB(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:mx(i.paddingTop),paddingEnd:mx(i.paddingBottom)}})}})}),[tX,aB]=eB(ta),iB=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=Go(ta,r),[m,g]=se.useState(null),y=Ka(t,g),h=se.useRef(null),v=se.useRef(""),x=p.viewport,w=o.content-o.viewport,C=ss(c),S=ss(l),b=vx(d,10);function I(T){if(h.current){let P=T.clientX-h.current.left,k=T.clientY-h.current.top;u({x:P,y:k})}}return se.useEffect(()=>{let T=P=>{let k=P.target;m?.contains(k)&&C(P,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[x,m,w,C]),se.useEffect(S,[o,S]),Pc(m,b),Pc(p.content,b),(0,Oe.jsx)(tX,{scope:r,scrollbar:m,hasThumb:n,onThumbChange:ss(a),onThumbPointerUp:ss(i),onThumbPositionChange:S,onThumbPointerDown:ss(s),children:(0,Oe.jsx)(Rc.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:ls(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:ls(e.onPointerMove,I),onPointerUp:ls(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})})})}),px="ScrollAreaThumb",Zb=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=aB(px,e.__scopeScrollArea);return(0,Oe.jsx)(Ic,{present:r||n.hasThumb,children:(0,Oe.jsx)(rX,{ref:t,...o})})}),rX=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=Go(px,r),i=aB(px,r),{onThumbPositionChange:s}=i,l=Ka(t,i.onThumbChange),u=se.useRef(void 0),c=vx(()=>{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=aX(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,Oe.jsx)(Rc.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:ls(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:ls(e.onPointerUp,i.onThumbPointerUp)})});Zb.displayName=px;var Jb="ScrollAreaCorner",sB=se.forwardRef((e,t)=>{let r=Go(Jb,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,Oe.jsx)(oX,{...e,ref:t}):null});sB.displayName=Jb;var oX=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=Go(Jb,r),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return Pc(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),Pc(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,Oe.jsx)(Rc.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 mx(e){return e?parseInt(e,10):0}function lB(e,t){let r=e/t;return isNaN(r)?0:r}function hx(e){let t=lB(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function nX(e,t,r,o="ltr"){let n=hx(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 uB([l,u],d)(e)}function ZV(e,t,r="ltr"){let o=hx(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=QV(e,l);return uB([0,i],[0,s])(u)}function uB(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 cB(e,t){return e>0&&e<t}var aX=(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 vx(e,t){let r=ss(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 Pc(e,t){let r=ss(t);Hp(()=>{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 eR=tB,dB=oB;var fB=sB;var us=R(D()),pB=tR.forwardRef(({className:e,children:t,...r},o)=>(0,us.jsxs)(eR,{ref:o,className:L("relative overflow-hidden",e),...r,children:[(0,us.jsx)(dB,{className:"h-full w-full rounded-[inherit]",children:t}),(0,us.jsx)(rR,{}),(0,us.jsx)(fB,{})]}));pB.displayName=eR.displayName;var rR=tR.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,us.jsx)(gx,{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,us.jsx)(Zb,{className:"relative flex-1 rounded-full bg-border"})}));rR.displayName=gx.displayName;var Ln=R(E());var zp=R(D()),mB=(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},gB={duration:.5,ease:[.25,.46,.45,.94]},hB=Ln.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=Ln.useMemo(()=>c||mB(t,n),[t,n,c]),v=Ln.useMemo(()=>({...gB,duration:o,delay:r+l}),[o,r,l]),x=Ln.useMemo(()=>({once:y,amount:a,...m}),[y,a,m]);return d?(0,zp.jsx)(Be.div,{ref:g,initial:"hidden",whileInView:"visible",viewport:x,variants:h,transition:v,className:L(u),style:f,id:p,children:e}):(0,zp.jsx)("div",{ref:g,className:u,style:f,id:p,children:e})});hB.displayName="ScrollReveal";var vB=Ln.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=Ln.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,zp.jsx)(Be.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:L(r),style:o,id:n,children:e})});vB.displayName="ScrollRevealContainer";var xB=Ln.forwardRef(({children:e,direction:t="up",duration:r=.5,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Ln.useMemo(()=>a||mB(t,o),[t,o,a]),c=Ln.useMemo(()=>({...gB,duration:r}),[r]);return(0,zp.jsx)(Be.div,{ref:l,variants:u,transition:c,className:L(n),style:i,id:s,children:e})});xB.displayName="ScrollRevealItem";var bB=R(E());var wB=R(E(),1);var CB=R(D(),1),sX="Separator",yB="horizontal",lX=["horizontal","vertical"],SB=wB.forwardRef((e,t)=>{let{decorative:r,orientation:o=yB,...n}=e,a=uX(o)?o:yB,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,CB.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});SB.displayName=sX;function uX(e){return lX.includes(e)}var oR=SB;var RB=R(D()),dX=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"}}),Wo=bB.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,RB.jsx)(oR,{ref:i,decorative:n,orientation:t||void 0,className:L(dX({orientation:t,variant:r,size:o}),e),...a}));Wo.displayName=oR.displayName;var Je=R(E());var UB=R(E());var _B=R(E(),1);var MPe=!!(typeof window<"u"&&window.document&&window.document.createElement);function IB(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var qo=R(E(),1);var LB=R(E(),1),PB=globalThis?.document?LB.useLayoutEffect:()=>{};var xx=R(E(),1);var fX=qo[" useInsertionEffect ".trim().toString()]||PB;function TB({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=pX({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=qo.useRef(e!==void 0);qo.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=qo.useCallback(c=>{if(s){let d=mX(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function pX({defaultProp:e,onChange:t}){let[r,o]=qo.useState(e),n=qo.useRef(r),a=qo.useRef(t);return fX(()=>{a.current=t},[t]),qo.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function mX(e){return typeof e=="function"}var NPe=Symbol("RADIX:SYNC_STATE");var NB=R(E(),1),IX=R(yi(),1);var or=R(E(),1);var MB=R(E(),1);function kB(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gX(...e){return t=>{let r=!1,o=e.map(n=>{let a=kB(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():kB(e[n],null)}}}}function EB(...e){return MB.useCallback(gX(...e),e)}function DB(e){let t=or.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];AB(n)&&typeof yx=="function"&&(n=yx(n._payload)),or.Children.forEach(n,f=>{if(wX(f)){s=!0;let p=f,m="child"in p.props?p.props.child:p.props.children;AB(m)&&typeof yx=="function"&&(m=yx(m._payload)),i=vX(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?yX(i):void 0,c=EB(o,u);if(!i){if(n||n===0)throw new Error(s?RX(e):bX(e));return n}let d=xX(a,i.props??{});return i.type!==or.Fragment&&(d.ref=o?c:u),or.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var hX=Symbol.for("radix.slottable");var vX=(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 xX(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 yX(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 wX(e){return or.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hX}var CX=Symbol.for("react.lazy");function AB(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===CX&&"_payload"in e&&SX(e._payload)}function SX(e){return typeof e=="object"&&e!==null&&"then"in e}var bX=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,RX=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,yx=or[" use ".trim().toString()];var OB=R(D(),1),LX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],FB=LX.reduce((e,t)=>{let r=DB(`Primitive.${t}`),o=NB.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,OB.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var VB=R(D(),1),BB="Toggle",HB=_B.forwardRef((e,t)=>{let{pressed:r,defaultPressed:o,onPressedChange:n,...a}=e,[i,s]=TB({prop:r,onChange:n,defaultProp:o??!1,caller:BB});return(0,VB.jsx)(FB.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:IB(e.onClick,()=>{e.disabled||s(!i)})})});HB.displayName=BB;var nR=HB;var GB=R(D()),zB=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"}}),wx=UB.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,GB.jsx)(nR,{ref:n,className:L("moonui-theme",zB({variant:t,size:r,className:e})),...o}));wx.displayName=nR.displayName;var bx=R(E());var Re=R(E(),1);var kt=R(D(),1),[Cx,n1e]=Ne("Tooltip",[Bo]),Sx=Bo(),WB="TooltipProvider",TX=700,aR="tooltip.open",[kX,sR]=Cx(WB),qB=e=>{let{__scopeTooltip:t,delayDuration:r=TX,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,kt.jsx)(kX,{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})};qB.displayName=WB;var Gp="Tooltip",[MX,Wp]=Cx(Gp),jB=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=sR(Gp,e.__scopeTooltip),u=Sx(t),[c,d]=Re.useState(null),f=Ae(),p=Re.useRef(0),m=i??l.disableHoverableContent,g=s??l.delayDuration,y=Re.useRef(!1),[h,v]=je({prop:o,defaultProp:n??!1,onChange:b=>{b?(l.onOpen(),document.dispatchEvent(new CustomEvent(aR))):l.onClose(),a?.(b)},caller:Gp}),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]),S=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,kt.jsx)(Na,{...u,children:(0,kt.jsx)(MX,{scope:t,contentId:f,open:h,stateAttribute:x,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:r})})};jB.displayName=Gp;var iR="TooltipTrigger",$B=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Wp(iR,r),a=sR(iR,r),i=Sx(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,kt.jsx)(Oa,{asChild:!0,...i,children:(0,kt.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)})})});$B.displayName=iR;var lR="TooltipPortal",[EX,AX]=Cx(lR,{forceMount:void 0}),DX=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Wp(lR,t);return(0,kt.jsx)(EX,{scope:t,forceMount:r,children:(0,kt.jsx)(st,{present:r||a.open,children:(0,kt.jsx)(po,{asChild:!0,container:n,children:o})})})};DX.displayName=lR;var Tc="TooltipContent",KB=Re.forwardRef((e,t)=>{let r=AX(Tc,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Wp(Tc,e.__scopeTooltip);return(0,kt.jsx)(st,{present:o||i.open,children:i.disableHoverableContent?(0,kt.jsx)(XB,{side:n,...a,ref:t}):(0,kt.jsx)(NX,{side:n,...a,ref:t})})}),NX=Re.forwardRef((e,t)=>{let r=Wp(Tc,e.__scopeTooltip),o=sR(Tc,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=VX(h,y.getBoundingClientRect()),x=BX(h,v),w=HX(g.getBoundingClientRect()),C=zX([...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=!UX(h,i);v?f():x&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,c,i,u,f]),(0,kt.jsx)(XB,{...e,ref:a})}),[OX,FX]=Cx(Gp,{isInside:!1}),_X=WR("TooltipContent"),XB=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Wp(Tc,r),u=Sx(r),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(aR,c),()=>document.removeEventListener(aR,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,kt.jsx)(Oo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,kt.jsxs)(ji,{"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,kt.jsx)(_X,{children:o}),(0,kt.jsx)(OX,{scope:r,isInside:!0,children:(0,kt.jsx)(K_,{id:l.contentId,role:"tooltip",children:n||o})})]})})});KB.displayName=Tc;var YB="TooltipArrow",QB=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Sx(r);return FX(YB,r).isInside?null:(0,kt.jsx)($i,{...n,...o,ref:t})});QB.displayName=YB;function VX(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 BX(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 HX(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 UX(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 zX(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),GX(t)}function GX(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 ZB=qB,JB=jB,eH=$B;var uR=KB,cR=QB;var cs=R(D()),dR=ZB,qX=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"}}),Rx=JB,Ix=eH,tH=bx.forwardRef(({className:e,...t},r)=>(0,cs.jsx)(cR,{ref:r,className:L("moonui-theme","fill-current",e),...t}));tH.displayName=cR.displayName;var qp=bx.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,cs.jsxs)(uR,{ref:i,sideOffset:n,className:L("moonui-theme",qX({variant:t,size:r}),e),...a,children:[a.children,o&&(0,cs.jsx)(tH,{})]}));qp.displayName=uR.displayName;var jX=bx.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,cs.jsxs)(Rx,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,cs.jsx)(Ix,{asChild:!0,children:e}),(0,cs.jsx)(qp,{ref:m,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));jX.displayName="SimpleTooltip";var G=R(D()),Ht=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,G.jsxs)(Rx,{children:[(0,G.jsx)(Ix,{asChild:!0,children:(0,G.jsx)(wx,{pressed:r,onPressedChange:()=>o(),disabled:n,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(qp,{children:(0,G.jsx)("p",{children:t})})]}),$X=({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))}),rH=Je.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,Je.useState)(e),[p,m]=(0,Je.useState)(!1),[g,y]=(0,Je.useState)(e),[h,v]=(0,Je.useState)(null),x=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}),b=(0,Je.useCallback)(M=>{f(M),t?.(M)},[t]),I=(0,Je.useCallback)(()=>{let M=window.getSelection();return M&&M.rangeCount>0?M.getRangeAt(0):null},[]),T=(0,Je.useCallback)(M=>{if(!M)return;let J=window.getSelection();J&&(J.removeAllRanges(),J.addRange(M))},[]),P=(0,Je.useCallback)((M,J)=>{if(o)return;x.current&&x.current.focus();let ae=I();if(document.execCommand(M,!1,J)||console.warn(`Command '${M}' failed to execute`),x.current){let Y=x.current.innerHTML;b(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")}),x.current&&x.current.focus()},[o,I,b]),k=(0,Je.useCallback)(M=>{let J=M.currentTarget.innerHTML;b(J)},[b]),A=(0,Je.useCallback)(M=>{if(M.ctrlKey||M.metaKey)switch(M.key){case"b":M.preventDefault(),P("bold");break;case"i":M.preventDefault(),P("italic");break;case"u":M.preventDefault(),P("underline");break;case"z":M.preventDefault(),M.shiftKey?P("redo"):P("undo");break}M.key==="Tab"&&(M.preventDefault(),P("insertHTML"," "))},[P]),F=(0,Je.useCallback)(()=>{let M=prompt("Enter URL:");M&&P("createLink",M)},[P]),N=(0,Je.useCallback)(()=>{let M=prompt("Enter image URL:");M&&P("insertImage",M)},[P]),H=(0,Je.useCallback)(M=>{P("formatBlock",`<h${M}>`)},[P]),O=(0,Je.useCallback)(M=>{let J=window.getSelection();if(J&&J.rangeCount>0){let ae=J.getRangeAt(0),_=document.createElement("span");_.style.color=M;try{ae.surroundContents(_)}catch{P("foreColor",M)}if(x.current){let Y=x.current.innerHTML;b(Y)}}},[P,b]),U=M=>{if(typeof window>"u")return M.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let J=document.createElement("div");return J.innerHTML=M,J.textContent||J.innerText||""};Je.default.useEffect(()=>{x.current&&d&&d!==x.current.innerHTML&&(x.current.innerHTML=d)},[d]),Je.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),y(e))},[e,d]);let V=s&&(0,G.jsx)(dR,{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)(Ht,{icon:(0,G.jsx)(Ad,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>P("bold"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Gd,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>P("italic"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Jd,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>P("underline"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Zd,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>P("strikeThrough"),disabled:o})]}),(0,G.jsx)(Wo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(Cc,{onValueChange:M=>{M.startsWith("h")?H(M.substring(1)):M==="normal"?P("formatBlock","p"):P("fontSize",M)},disabled:o,children:[(0,G.jsx)(Sc,{className:"w-24 h-8",children:(0,G.jsx)(Vp,{placeholder:"Size"})}),(0,G.jsxs)(bc,{children:[(0,G.jsx)(Nr,{value:"1",children:"Small"}),(0,G.jsx)(Nr,{value:"3",children:"Normal"}),(0,G.jsx)(Nr,{value:"5",children:"Large"}),(0,G.jsx)(Nr,{value:"7",children:"X-Large"}),(0,G.jsx)(Wo,{className:"my-1"}),(0,G.jsx)(Nr,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Nr,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Nr,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Nr,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Nr,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Nr,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(Wo,{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)(Ht,{icon:(0,G.jsx)(Td,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>P("justifyLeft"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Ld,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>P("justifyCenter"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(kd,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>P("justifyRight"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Pd,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>P("justifyFull"),disabled:o})]}),(0,G.jsx)(Wo,{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)(Ht,{icon:(0,G.jsx)(jd,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>P("insertUnorderedList"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(qd,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>P("insertOrderedList"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Yd,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>P("formatBlock","blockquote"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Od,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>P("formatBlock","pre"),disabled:o})]}),(0,G.jsx)(Wo,{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)(Ht,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>P("outdent"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>P("indent"),disabled:o})]}),(0,G.jsx)(Wo,{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)(Ht,{icon:(0,G.jsx)(Wd,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:F,disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Es,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:o})]}),(0,G.jsx)(Wo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(_a,{children:[(0,G.jsx)(Va,{asChild:!0,children:(0,G.jsx)(_e,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,G.jsx)(fu,{className:"h-3 w-3"})})}),(0,G.jsx)(Jn,{className:"w-auto p-0",children:(0,G.jsx)($X,{onColorSelect:O})})]}),(0,G.jsx)(Wo,{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)(Ht,{icon:(0,G.jsx)(ef,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>P("undo"),disabled:o}),(0,G.jsx)(Ht,{icon:(0,G.jsx)(Qd,{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)(Wo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(Ht,{icon:p?(0,G.jsx)(zr,{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?b(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)(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:M=>y(M.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)(Be.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:k,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)(KX,{content:d})})]})});rH.displayName="SimpleEditor";var KX=({content:e})=>{let[t,r]=(0,Je.useState)(0);return(0,Je.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 jp=R(E());var Kt=R(D()),oH=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"}}),ds=jp.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,Kt.jsx)(Be.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,Kt.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?Be.div:"div";return(0,Kt.jsx)(C,{ref:p,className:L("moonui-theme",oH({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?eA:{},...w})});ds.displayName="Skeleton";var fR=jp.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,Kt.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,Kt.jsx)(ds,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));fR.displayName="SkeletonText";var pR=jp.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,Kt.jsx)(ds,{ref:a,variant:r,animation:o,shape:"circle",className:L("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));pR.displayName="SkeletonAvatar";var nH=jp.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Kt.jsxs)("div",{ref:s,className:L("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Kt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Kt.jsx)(pR,{size:"2.5rem",variant:n,animation:a}),(0,Kt.jsxs)("div",{className:"flex-1",children:[(0,Kt.jsx)(ds,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Kt.jsx)(ds,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Kt.jsx)(fR,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,Kt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Kt.jsx)(ds,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Kt.jsx)(ds,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));nH.displayName="SkeletonCard";var kc=R(E());var iH=R(D()),aH=kc.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=kc.useState(0),[c,d]=kc.useState(0),[f,p]=kc.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,iH.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})});aH.displayName="SwipeableCard";var pH=R(E());var Pn=R(E(),1);var Rl=R(D(),1),Lx="Switch",[XX,D1e]=Ne(Lx),[YX,QX]=XX(Lx),sH=Pn.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]=Pn.useState(null),m=de(t,x=>p(x)),g=Pn.useRef(!1),y=f?c||!!f.closest("form"):!0,[h,v]=je({prop:n,defaultProp:a??!1,onChange:u,caller:Lx});return(0,Rl.jsxs)(YX,{scope:r,checked:h,disabled:s,children:[(0,Rl.jsx)($.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":dH(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,Rl.jsx)(cH,{control:f,bubbles:!g.current,name:o,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});sH.displayName=Lx;var lH="SwitchThumb",uH=Pn.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=QX(lH,r);return(0,Rl.jsx)($.span,{"data-state":dH(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});uH.displayName=lH;var ZX="SwitchBubbleInput",cH=Pn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=Pn.useRef(null),s=de(i,a),l=rc(r),u=oc(t);return Pn.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,Rl.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}})});cH.displayName=ZX;function dH(e){return e?"checked":"unchecked"}var mR=sH,fH=uH;var ra=R(D()),mH=pH.forwardRef(({className:e,size:t="md",variant:r="primary",loading:o,leftIcon:n,rightIcon:a,description:i,...s},l)=>(0,ra.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,ra.jsx)("span",{className:"text-muted-foreground",children:n}),(0,ra.jsxs)(mR,{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,ra.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ra.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,ra.jsx)(fH,{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,ra.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,ra.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));mH.displayName=mR.displayName;var $p=R(E());var oa=R(D()),gH=$p.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]=$p.useState(""),[p,m]=$p.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,oa.jsxs)("div",{className:"relative",children:[(0,oa.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,oa.jsxs)(io,{variant:o,className:"gap-1 pr-1.5",children:[(0,oa.jsx)("span",{className:"text-xs",children:v}),!l&&(0,oa.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,oa.jsx)(ao,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},x)),(0,oa.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,oa.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});gH.displayName="TagsInput";var vo=R(E());var na=R(D()),eY=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}}),hH=vo.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=vo.useRef(null),[x,w]=vo.useState(p||m||"");vo.useImperativeHandle(h,()=>v.current);let C=vo.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]);vo.useEffect(()=>{C()},[x,C]),vo.useEffect(()=>{p!==void 0&&w(p)},[p]);let S=A=>{w(A.target.value),g?.(A)},b=String(x).length,I=c&&(f!==void 0||b>0),T=typeof a=="string"?a:void 0,P=typeof i=="string"?i:void 0,k=T||P;return(0,na.jsxs)("div",{className:L("moonui-theme","space-y-1.5 w-full",t),children:[(0,na.jsxs)("div",{className:"relative",children:[(0,na.jsx)("textarea",{ref:v,className:L(eY({variant:o,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?`${y.id||""}-error`:P?`${y.id||""}-success`:void 0,...y}),s&&(0,na.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,na.jsx)(Nt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,na.jsxs)("div",{className:"flex items-center justify-between",children:[k&&(0,na.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,na.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[b,f!==void 0&&` / ${f}`]})]})]})});hH.displayName="Textarea";var Tn=R(E());var be=R(E(),1),xH=R(yi(),1);var Ue=R(D(),1),yR="ToastProvider",[wR,tY,rY]=An("Toast"),[yH,tTe]=Ne("Toast",[rY]),[oY,Tx]=yH(yR),wH=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 \`${yR}\`. Expected non-empty \`string\`.`),(0,Ue.jsx)(wR.Provider,{scope:t,children:(0,Ue.jsx)(oY,{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})})};wH.displayName=yR;var CH="ToastViewport",nY=["F8"],hR="toast.viewportPause",vR="toast.viewportResume",SH=be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=nY,label:n="Notifications ({hotkey})",...a}=e,i=Tx(CH,r),s=tY(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 S=new CustomEvent(hR);h.dispatchEvent(S),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){let S=new CustomEvent(vR);h.dispatchEvent(S),i.isClosePausedRef.current=!1}},w=S=>{!y.contains(S.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,...vY(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,S=v.shiftKey;if(v.target===y&&S){u.current?.focus();return}let T=g({tabbingDirection:S?"backwards":"forwards"}),P=T.findIndex(k=>k===C);gR(T.slice(P+1))?v.preventDefault():S?u.current?.focus():c.current?.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[s,g]),(0,Ue.jsxs)(DD,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,Ue.jsx)(xR,{ref:u,onFocusFromOutsideViewport:()=>{let y=g({tabbingDirection:"forwards"});gR(y)}}),(0,Ue.jsx)(wR.Slot,{scope:r,children:(0,Ue.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,Ue.jsx)(xR,{ref:c,onFocusFromOutsideViewport:()=>{let y=g({tabbingDirection:"backwards"});gR(y)}})]})});SH.displayName=CH;var bH="ToastFocusProxy",xR=be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Tx(bH,r);return(0,Ue.jsx)(Fp,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});xR.displayName=bH;var Kp="Toast",aY="toast.swipeStart",iY="toast.swipeMove",sY="toast.swipeCancel",lY="toast.swipeEnd",RH=be.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=je({prop:o,defaultProp:n??!0,onChange:a,caller:Kp});return(0,Ue.jsx)(st,{present:r||s,children:(0,Ue.jsx)(dY,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:ot(e.onPause),onResume:ot(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)})})})});RH.displayName=Kp;var[uY,cY]=yH(Kp,{onClose(){}}),dY=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=Tx(Kp,r),[y,h]=be.useState(null),v=de(t,N=>h(N)),x=be.useRef(null),w=be.useRef(null),C=n||g.duration,S=be.useRef(0),b=be.useRef(C),I=be.useRef(0),{onToastAdd:T,onToastRemove:P}=g,k=ot(()=>{y?.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 H=()=>{A(b.current),u?.()},O=()=>{let U=new Date().getTime()-S.current;b.current=b.current-U,window.clearTimeout(I.current),l?.()};return N.addEventListener(hR,O),N.addEventListener(vR,H),()=>{N.removeEventListener(hR,O),N.removeEventListener(vR,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?EH(y):null,[y]);return g.viewport?(0,Ue.jsxs)(Ue.Fragment,{children:[F&&(0,Ue.jsx)(fY,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:F}),(0,Ue.jsx)(uY,{scope:r,onClose:k,children:xH.createPortal((0,Ue.jsx)(wR.ItemSlot,{scope:r,children:(0,Ue.jsx)(AD,{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: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,k()))}),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),M=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,J=V?M(0,H):0,ae=V?0:M(0,O),_=N.pointerType==="touch"?10:2,Y={x:J,y:ae},re={originalEvent:N,delta:Y};U?(w.current=Y,Px(iY,d,re,{discrete:!1})):vH(Y,g.swipeDirection,_)?(w.current=Y,Px(aY,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};vH(H,g.swipeDirection,g.swipeThreshold)?Px(lY,p,V,{discrete:!0}):Px(sY,f,V,{discrete:!0}),U.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),fY=e=>{let{__scopeToast:t,children:r,...o}=e,n=Tx(Kp,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return gY(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,Ue.jsx)(po,{asChild:!0,children:(0,Ue.jsx)(Fp,{...o,children:a&&(0,Ue.jsxs)(Ue.Fragment,{children:[n.label," ",r]})})})},pY="ToastTitle",IH=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,Ue.jsx)($.div,{...o,ref:t})});IH.displayName=pY;var mY="ToastDescription",LH=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,Ue.jsx)($.div,{...o,ref:t})});LH.displayName=mY;var PH="ToastAction",TH=be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,Ue.jsx)(MH,{altText:r,asChild:!0,children:(0,Ue.jsx)(CR,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${PH}\`. Expected non-empty \`string\`.`),null)});TH.displayName=PH;var kH="ToastClose",CR=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=cY(kH,r);return(0,Ue.jsx)(MH,{asChild:!0,children:(0,Ue.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,n.onClose)})})});CR.displayName=kH;var MH=be.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,Ue.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function EH(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),hY(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(...EH(o))}}),t}function Px(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?nu(n,a):n.dispatchEvent(a)}var vH=(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 gY(e=()=>{}){let t=ot(e);Fe(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function hY(e){return e.nodeType===e.ELEMENT_NODE}function vY(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 gR(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var AH=wH,SR=SH,bR=RH,RR=IH,IR=LH,LR=TH,PR=CR;var Cr=R(D()),NH=AH,kR=Tn.forwardRef(({className:e,...t},r)=>(0,Cr.jsx)(SR,{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}));kR.displayName=SR.displayName;var yY=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"}}),MR=Tn.forwardRef(({className:e,variant:t,...r},o)=>(0,Cr.jsx)(bR,{ref:o,className:L("moonui-theme",yY({variant:t}),e),...r}));MR.displayName=bR.displayName;var OH=Tn.forwardRef(({className:e,...t},r)=>(0,Cr.jsx)(LR,{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}));OH.displayName=LR.displayName;var ER=Tn.forwardRef(({className:e,...t},r)=>(0,Cr.jsx)(PR,{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,Cr.jsx)(ao,{className:"h-4 w-4"})}));ER.displayName=PR.displayName;var AR=Tn.forwardRef(({className:e,...t},r)=>(0,Cr.jsx)(RR,{ref:r,className:L("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));AR.displayName=RR.displayName;var DR=Tn.forwardRef(({className:e,...t},r)=>(0,Cr.jsx)(IR,{ref:r,className:L("moonui-theme","text-sm opacity-90",e),...t}));DR.displayName=IR.displayName;var wY=5,CY=1e6,TR=new Map,DH=e=>{if(TR.has(e))return;let t=setTimeout(()=>{TR.delete(e),Xp({type:"REMOVE_TOAST",toastId:e})},CY);TR.set(e,t)},SY=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,wY)};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?DH(r):e.toasts.forEach(o=>{DH(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}},kx=[],Mx={toasts:[]},bY=0;function Xp(e){Mx=SY(Mx,e),kx.forEach(t=>{t(Mx)})}function FH({...e}){let t=`toast-${Date.now()}-${++bY}`,r=n=>Xp({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>Xp({type:"DISMISS_TOAST",toastId:t});return Xp({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function _H(){let[e,t]=Tn.useState(Mx);return Tn.useEffect(()=>(kx.push(t),()=>{let r=kx.indexOf(t);r>-1&&kx.splice(r,1)}),[e]),{...e,toast:FH,dismiss:r=>Xp({type:"DISMISS_TOAST",toastId:r})}}function RY(){let{toasts:e}=_H();return(0,Cr.jsxs)(NH,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,Cr.jsxs)(MR,{variant:a,open:i,onOpenChange:s,...l,children:[(0,Cr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,Cr.jsx)(AR,{children:r}),o&&(0,Cr.jsx)(DR,{children:o})]}),n,(0,Cr.jsx)(ER,{})]},t)}),(0,Cr.jsx)(kR,{})]})}var VH=R(E());var UH=R(D()),BH=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"}}),HH=VH.forwardRef(({className:e,size:t,children:r,...o},n)=>(0,UH.jsx)("kbd",{ref:n,className:L("moonui-theme",BH({size:t}),e),...o,children:r}));HH.displayName="Kbd";var jo=R(E());var xo=R(D()),zH=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"}}),IY={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},GH=jo.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=IY[l??"md"],m=i==="half"?.5:1,g=t!==void 0,[y,h]=jo.useState(r??0),v=g?t??0:y,[x,w]=jo.useState(null),C=x!==null?x:v,S=jo.useCallback(P=>{a||(g||h(P),o?.(P))},[a,g,o]),b=jo.useCallback(P=>{if(a)return;let k=null;switch(P.key){case"ArrowRight":case"ArrowUp":k=Math.min(n,v+m);break;case"ArrowLeft":case"ArrowDown":k=Math.max(m,v-m);break;case"Home":k=m;break;case"End":k=n;break;default:return}P.preventDefault(),S(k)},[a,n,v,m,S]),I=P=>{if(jo.isValidElement(s)){let k=s;return jo.cloneElement(k,{className:L(p,"shrink-0",P&&"fill-current",k.props?.className)})}return(0,xo.jsx)(Ci,{className:L(p,"shrink-0",P&&"fill-current"),"aria-hidden":"true"})},T=Array.from({length:n},(P,k)=>k+1);return(0,xo.jsx)("div",{ref:d,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":a||void 0,tabIndex:a?void 0:0,onKeyDown:b,onMouseLeave:()=>w(null),className:L(zH({size:l}),e),...c,children:T.map(P=>{let k=Math.max(0,Math.min(1,C-(P-1))),A=P-.5;return(0,xo.jsxs)("span",{"data-slot":"rating-star",className:L("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,xo.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,xo.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,xo.jsxs)(xo.Fragment,{children:[(0,xo.jsx)("button",{type:"button",role:"radio","aria-checked":v===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,xo.jsx)("button",{type:"button",role:"radio","aria-checked":v===P,"aria-label":`${P} stars`,tabIndex:-1,onClick:()=>S(P),onMouseEnter:()=>w(P),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,xo.jsx)("button",{type:"button",role:"radio","aria-checked":v===P,"aria-label":`${P} ${P===1?"star":"stars"}`,tabIndex:-1,onClick:()=>S(P),onMouseEnter:()=>w(P),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},P)})})});GH.displayName="Rating";var WH=R(E());var Il=R(D()),qH=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"}}),LY={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},jH=WH.forwardRef(({className:e,size:t,variant:r="default",label:o="Loading",...n},a)=>(0,Il.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:L("moonui-theme inline-flex items-center justify-center",e),...n,children:[r==="dots"?(0,Il.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,Il.jsx)("span",{className:L("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",LY[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,Il.jsx)("span",{className:L(qH({size:t})),"aria-hidden":"true"}),(0,Il.jsx)("span",{className:"sr-only",children:o})]}));jH.displayName="Spinner";export{m5 as Accordion,K1 as AccordionContent,j1 as AccordionItem,$1 as AccordionTrigger,Q1 as Alert,J1 as AlertDescription,Z1 as AlertTitle,tT as AspectRatio,pw as Avatar,mw as AvatarFallback,hT as AvatarGroup,gT as AvatarImage,io as Badge,xT as Breadcrumb,gw as BreadcrumbEllipsis,wT as BreadcrumbItem,ST as BreadcrumbLink,yT as BreadcrumbList,bT as BreadcrumbPage,CT as BreadcrumbSeparator,_e as Button,rA as Card,GA as CardCVCInput,iA as CardContent,aA as CardDescription,zA as CardExpiryInput,sA as CardFooter,oA as CardHeader,UA as CardNumberInput,nA as CardTitle,WA as CardZipInput,tD as Carousel,oD as CarouselContent,aD as CarouselItem,sD as CarouselNext,iD as CarouselPrevious,OC as Checkbox,gD as CheckboxGroup,cv as CheckboxLabel,hD as CheckboxWithLabel,Dq as Collapsible,yD as CollapsibleContent,xD as CollapsibleTrigger,SS as ColorPicker,VS as Command,N$ as CommandDialog,OO as CommandEmpty,FO as CommandGroup,DO as CommandInput,VO as CommandItem,NO as CommandList,_O as CommandSeparator,BO as CommandShortcut,aF as DatePicker,M9 as DateRangePicker,E9 as DateTimePicker,OS as Dialog,k$ as DialogClose,Wv as DialogContent,_S as DialogDescription,AO as DialogFooter,A$ as DialogForm,FS as DialogHeader,Rp as DialogTitle,P$ as DialogTrigger,D9 as DraggableList,I7 as DropdownMenu,w_ as DropdownMenuCheckboxItem,x_ as DropdownMenuContent,P7 as DropdownMenuGroup,y_ as DropdownMenuItem,S_ as DropdownMenuLabel,T7 as DropdownMenuPortal,M7 as DropdownMenuRadioGroup,C_ as DropdownMenuRadioItem,b_ as DropdownMenuSeparator,R_ as DropdownMenuShortcut,k7 as DropdownMenuSub,v_ as DropdownMenuSubContent,h_ as DropdownMenuSubTrigger,L7 as DropdownMenuTrigger,L_ as FileUpload,eK as FreeBadge,T_ as GestureDrawer,BIe as GitHubStarButton,O7 as GitHubStars,Kj as GradientPicker,gr as Input,D_ as InputOTP,N_ as InputOTPGroup,__ as InputOTPSeparator,F_ as InputOTPSlot,HH as Kbd,$r as Label,V_ as LockedComponent,A9 as MonthPicker,Tb as MoonLogo,oLe as MoonLogoAnimated,rLe as MoonLogoIcon,m5 as MoonUIAccordion,K1 as MoonUIAccordionContent,j1 as MoonUIAccordionItem,$1 as MoonUIAccordionTrigger,Q1 as MoonUIAlert,J1 as MoonUIAlertDescription,Z1 as MoonUIAlertTitle,tT as MoonUIAspectRatio,pw as MoonUIAvatar,mw as MoonUIAvatarFallback,hT as MoonUIAvatarGroup,gT as MoonUIAvatarImage,io as MoonUIBadge,xT as MoonUIBreadcrumb,gw as MoonUIBreadcrumbEllipsis,wT as MoonUIBreadcrumbItem,ST as MoonUIBreadcrumbLink,yT as MoonUIBreadcrumbList,bT as MoonUIBreadcrumbPage,CT as MoonUIBreadcrumbSeparator,_e as MoonUIButton,ep as MoonUICalendar,rA as MoonUICard,GA as MoonUICardCVCInput,iA as MoonUICardContent,aA as MoonUICardDescription,zA as MoonUICardExpiryInput,sA as MoonUICardFooter,oA as MoonUICardHeader,UA as MoonUICardNumberInput,nA as MoonUICardTitle,WA as MoonUICardZipInput,tD as MoonUICarousel,oD as MoonUICarouselContent,aD as MoonUICarouselItem,sD as MoonUICarouselNext,iD as MoonUICarouselPrevious,OC as MoonUICheckbox,gD as MoonUICheckboxGroup,cv as MoonUICheckboxLabel,hD as MoonUICheckboxWithLabel,Dq as MoonUICollapsible,yD as MoonUICollapsibleContent,xD as MoonUICollapsibleTrigger,SS as MoonUIColorPicker,VS as MoonUICommand,N$ as MoonUICommandDialog,OO as MoonUICommandEmpty,FO as MoonUICommandGroup,DO as MoonUICommandInput,VO as MoonUICommandItem,NO as MoonUICommandList,_O as MoonUICommandSeparator,BO as MoonUICommandShortcut,P9 as MoonUIDataTableBasic,aF as MoonUIDatePicker,M9 as MoonUIDateRangePicker,E9 as MoonUIDateTimePicker,OS as MoonUIDialog,k$ as MoonUIDialogClose,Wv as MoonUIDialogContent,_S as MoonUIDialogDescription,AO as MoonUIDialogFooter,FS as MoonUIDialogHeader,Rp as MoonUIDialogTitle,P$ as MoonUIDialogTrigger,D9 as MoonUIDraggableList,I7 as MoonUIDropdownMenu,w_ as MoonUIDropdownMenuCheckboxItem,x_ as MoonUIDropdownMenuContent,P7 as MoonUIDropdownMenuGroup,y_ as MoonUIDropdownMenuItem,S_ as MoonUIDropdownMenuLabel,T7 as MoonUIDropdownMenuPortal,M7 as MoonUIDropdownMenuRadioGroup,C_ as MoonUIDropdownMenuRadioItem,b_ as MoonUIDropdownMenuSeparator,R_ as MoonUIDropdownMenuShortcut,k7 as MoonUIDropdownMenuSub,v_ as MoonUIDropdownMenuSubContent,h_ as MoonUIDropdownMenuSubTrigger,L7 as MoonUIDropdownMenuTrigger,L_ as MoonUIFileUpload,eK as MoonUIFreeBadge,T_ as MoonUIGestureDrawer,O7 as MoonUIGitHubStars,Kj as MoonUIGradientPicker,gr as MoonUIInput,D_ as MoonUIInputOTP,N_ as MoonUIInputOTPGroup,__ as MoonUIInputOTPSeparator,F_ as MoonUIInputOTPSlot,HH as MoonUIKbd,$r as MoonUILabel,V_ as MoonUILockedComponent,A9 as MoonUIMonthPicker,Tb as MoonUIMoonLogo,H_ as MoonUIPagination,U_ as MoonUIPaginationContent,q_ as MoonUIPaginationEllipsis,z_ as MoonUIPaginationItem,ix as MoonUIPaginationLink,W_ as MoonUIPaginationNext,G_ as MoonUIPaginationPrevious,OV as MoonUIPhoneInput,_a as MoonUIPopover,Jn as MoonUIPopoverContent,Va as MoonUIPopoverTrigger,J7 as MoonUIProBadge,Z7 as MoonUIProComponentWrapper,ox as MoonUIProgress,_V as MoonUIRadioGroup,Kb as MoonUIRadioGroupItem,VV as MoonUIRadioItemWithLabel,Xb as MoonUIRadioLabel,GH as MoonUIRating,TK as MoonUIRichTextEditor,pB as MoonUIScrollArea,rR as MoonUIScrollBar,hB as MoonUIScrollReveal,vB as MoonUIScrollRevealContainer,xB as MoonUIScrollRevealItem,Cc as MoonUISelect,bc as MoonUISelectContent,RK as MoonUISelectGroup,Nr as MoonUISelectItem,AV as MoonUISelectLabel,$b as MoonUISelectScrollDownButton,jb as MoonUISelectScrollUpButton,DV as MoonUISelectSeparator,Sc as MoonUISelectTrigger,Vp as MoonUISelectValue,Wo as MoonUISeparator,$j as MoonUISimpleColorPicker,rH as MoonUISimpleEditor,ds as MoonUISkeleton,pR as MoonUISkeletonAvatar,nH as MoonUISkeletonCard,fR as MoonUISkeletonText,za as MoonUISlider,jH as MoonUISpinner,aH as MoonUISwipeableCard,mH as MoonUISwitch,Xv as MoonUITable,Qv as MoonUITableBody,nF as MoonUITableCaption,Tp as MoonUITableCell,oF as MoonUITableFooter,Zv as MoonUITableHead,Yv as MoonUITableHeader,xc as MoonUITableRow,_v as MoonUITabs,mc as MoonUITabsContent,Vv as MoonUITabsList,pc as MoonUITabsTrigger,gH as MoonUITagsInput,hH as MoonUITextarea,MR as MoonUIToast,OH as MoonUIToastAction,ER as MoonUIToastClose,DR as MoonUIToastDescription,NH as MoonUIToastProvider,AR as MoonUIToastTitle,kR as MoonUIToastViewport,RY as MoonUIToaster,wx as MoonUIToggle,Rx as MoonUITooltip,qp as MoonUITooltipContent,dR as MoonUITooltipProvider,Ix as MoonUITooltipTrigger,H_ as Pagination,U_ as PaginationContent,q_ as PaginationEllipsis,z_ as PaginationItem,ix as PaginationLink,W_ as PaginationNext,G_ as PaginationPrevious,fu as Palette,OV as PhoneInput,Pg as Pipette,_a as Popover,XSe as PopoverAnchor,YSe as PopoverClose,Jn as PopoverContent,Ij as PopoverFooter,Rj as PopoverHeader,bj as PopoverSeparator,Va as PopoverTrigger,J7 as ProBadge,Z7 as ProComponentWrapper,ox as Progress,Y7 as REGEXP_ONLY_CHARS,X7 as REGEXP_ONLY_DIGITS,Q7 as REGEXP_ONLY_DIGITS_AND_CHARS,_V as RadioGroup,Kb as RadioGroupItem,VV as RadioItemWithLabel,Xb as RadioLabel,GH as Rating,TK as RichTextEditor,pB as ScrollArea,rR as ScrollBar,hB as ScrollReveal,vB as ScrollRevealContainer,xB as ScrollRevealItem,Cc as Select,bc as SelectContent,RK as SelectGroup,Nr as SelectItem,AV as SelectLabel,$b as SelectScrollDownButton,jb as SelectScrollUpButton,DV as SelectSeparator,Sc as SelectTrigger,Vp as SelectValue,Wo as Separator,$j as SimpleColorPicker,rH as SimpleEditor,jX as SimpleTooltip,ds as Skeleton,pR as SkeletonAvatar,nH as SkeletonCard,fR as SkeletonText,za as Slider,jH as Spinner,aH as SwipeableCard,mH as Switch,Xv as Table,Qv as TableBody,nF as TableCaption,Tp as TableCell,oF as TableFooter,Zv as TableHead,Yv as TableHeader,xc as TableRow,_v as Tabs,mc as TabsContent,Vv as TabsList,pc as TabsTrigger,gH as TagsInput,hH as Textarea,MR as Toast,OH as ToastAction,ER as ToastClose,DR as ToastDescription,NH as ToastProvider,AR as ToastTitle,kR as ToastViewport,RY as Toaster,wx as Toggle,Rx as Tooltip,tH as TooltipArrow,qp as TooltipContent,dR as TooltipProvider,Ix as TooltipTrigger,h5 as aspectRatioVariants,vT as badgeVariants,Mg as buttonVariants,rD as carouselContentVariants,nD as carouselItemVariants,L as cn,Nq as collapsibleContentVariants,vD as collapsibleTriggerVariants,gn as format,O_ as inputOTPSlotVariants,BH as kbdVariants,vT as moonUIBadgeVariants,Mg as moonUIButtonVariants,rD as moonUICarouselContentVariants,nD as moonUICarouselItemVariants,T9 as moonUICreateSortableHeader,O_ as moonUIInputOTPSlotVariants,BH as moonUIKbdVariants,zH as moonUIRatingVariants,oH as moonUISkeletonVariants,qH as moonUISpinnerVariants,zB as moonUIToggleVariants,Sj as popoverContentVariants,E7 as progressVariants,zH as ratingVariants,dX as separatorVariants,oH as skeletonVariants,qH as spinnerVariants,FH as toast,zB as toggleVariants,qX as tooltipVariants,lp as useCarousel,_H as useToast};
|
|
85
|
+
}`,eU="^\\d+$",tU="^[a-zA-Z]+$",rU="^[a-zA-Z0-9]+$";var pi=b(D()),iP=Jl.forwardRef(({className:e,containerClassName:t,...r},o)=>(0,pi.jsx)(aP,{ref:o,containerClassName:P("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:P("disabled:cursor-not-allowed",e),...r}));iP.displayName="InputOTP";var sP=Jl.forwardRef(({className:e,...t},r)=>(0,pi.jsx)("div",{ref:r,className:P("flex items-center",e),...t}));sP.displayName="InputOTPGroup";var lP=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}}),uP=Jl.forwardRef(({index:e,className:t,...r},o)=>{let a=Jl.useContext(nP)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,pi.jsxs)("div",{ref:o,"data-active":l?"":void 0,className:P(lP({isActive:!!l}),t),...r,children:[i,s&&(0,pi.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,pi.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});uP.displayName="InputOTPSlot";var cP=Jl.forwardRef(({className:e,...t},r)=>(0,pi.jsx)("div",{ref:r,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,pi.jsx)(Df,{"aria-hidden":"true"})}));cP.displayName="InputOTPSeparator";var od=b(M());var Ce=b(D());function dP({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,od.useState)(!1),[s,l]=(0,od.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:P("relative group cursor-pointer transition-all duration-300",r),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)(eo,{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)(Xu,{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)(Ee,{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 oU({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,od.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,od.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",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:P("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)(eo,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Xu,{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",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)(eo,{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)(Ee,{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)(dP,{componentName:r||t,className:o,children:n||e})}return(0,Ce.jsx)("div",{className:o,children:e})}function nU({className:e}){return(0,Ce.jsxs)(eo,{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 aU({className:e}){return(0,Ce.jsx)(eo,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var iU=b(M());var Yt=b(D());function xy({className:e,variant:t="default",showText:r=!0,...o}){let n=iU.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Yt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Yt.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,Yt.jsxs)("defs",{children:[t==="gradient"&&(0,Yt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Yt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Yt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Yt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Yt.jsxs)("mask",{id:i,children:[(0,Yt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Yt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Yt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(0,Yt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Yt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Yt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function WQ({className:e,variant:t="default",...r}){return(0,Yt.jsx)(xy,{showText:!1,className:e,variant:t,...r})}function jQ({className:e,variant:t="default",showText:r=!0,...o}){return(0,Yt.jsx)(xy,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var fP=b(M());var Gr=b(D()),pP=({className:e,...t})=>(0,Gr.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});pP.displayName="Pagination";var mP=fP.forwardRef(({className:e,...t},r)=>(0,Gr.jsx)("ul",{ref:r,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));mP.displayName="PaginationContent";var gP=fP.forwardRef(({className:e,...t},r)=>(0,Gr.jsx)("li",{ref:r,className:P("moonui-theme","",e),...t}));gP.displayName="PaginationItem";var _m=({className:e,isActive:t,size:r="icon",...o})=>(0,Gr.jsx)("a",{"aria-current":t?"page":void 0,className:P(op({variant:t?"outline":"ghost",size:r}),e),...o});_m.displayName="PaginationLink";var hP=({className:e,...t})=>(0,Gr.jsxs)(_m,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Gr.jsx)(bn,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:"Previous"})]});hP.displayName="PaginationPrevious";var vP=({className:e,...t})=>(0,Gr.jsxs)(_m,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Gr.jsx)("span",{children:"Next"}),(0,Gr.jsx)(Or,{className:"h-4 w-4"})]});vP.displayName="PaginationNext";var xP=({className:e,...t})=>(0,Gr.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Gr.jsx)(la,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{className:"sr-only",children:"More pages"})]});xP.displayName="PaginationEllipsis";var Hm=b(M());var ks=b(M());var Z=b(M(),1),PP=b(Va(),1);function yP(e,[t,r]){return Math.min(r,Math.max(t,e))}var sU=b(M(),1);var lU=b(D(),1),wP=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"}),qQ="VisuallyHidden",Vm=sU.forwardRef((e,t)=>(0,lU.jsx)($.span,{...e,ref:t,style:{...wP,...e.style}}));Vm.displayName=qQ;var uU=Vm;var fe=b(D(),1),KQ=[" ","Enter","ArrowUp","ArrowDown"],XQ=[" ","Enter"],eu="Select",[wy,Cy,YQ]=Jn(eu),[nd,SMe]=Fe(eu,[YQ,Zo]),Sy=Zo(),[QQ,Ls]=nd(eu),[ZQ,JQ]=nd(eu),cU=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=Sy(t),[x,v]=Z.useState(null),[h,y]=Z.useState(null),[w,C]=Z.useState(!1),S=ia(u),[R,I]=$e({prop:o,defaultProp:n??!1,onChange:a,caller:eu}),[L,T]=$e({prop:i,defaultProp:s,onChange:l,caller:eu}),k=Z.useRef(null),E=x?m||!!x.closest("form"):!0,[F,N]=Z.useState(new Set),B=Array.from(F).map(O=>O.props.value).join(";");return(0,fe.jsx)(ni,{...g,children:(0,fe.jsxs)(QQ,{required:p,scope:t,trigger:x,onTriggerChange:v,valueNode:h,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ne(),value:L,onValueChange:T,open:R,onOpenChange:I,dir:S,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(wy.Provider,{scope:t,children:(0,fe.jsx)(ZQ,{scope:e.__scopeSelect,onNativeOptionAdd:Z.useCallback(O=>{N(_=>new Set(_).add(O))},[]),onNativeOptionRemove:Z.useCallback(O=>{N(_=>{let H=new Set(_);return H.delete(O),H})},[]),children:r})}),E?(0,fe.jsxs)(OU,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:L,onChange:O=>T(O.target.value),disabled:f,form:m,children:[L===void 0?(0,fe.jsx)("option",{value:""}):null,Array.from(F)]},B):null]})})};cU.displayName=eu;var dU="SelectTrigger",fU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=Sy(r),i=Ls(dU,r),s=i.disabled||o,l=de(t,i.onTriggerChange),u=Cy(r),c=Z.useRef("touch"),[d,f,p]=_U(g=>{let x=u().filter(y=>!y.disabled),v=x.find(y=>y.value===i.value),h=VU(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)(ai,{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":FU(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===" ")&&KQ.includes(g.key)&&(m(),g.preventDefault())})})})});fU.displayName=dU;var pU="SelectValue",mU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=Ls(pU,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:FU(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});mU.displayName=pU;var eZ="SelectIcon",gU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,fe.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});gU.displayName=eZ;var tZ="SelectPortal",hU=e=>(0,fe.jsx)(Ro,{asChild:!0,...e});hU.displayName=tZ;var tu="SelectContent",vU=Z.forwardRef((e,t)=>{let r=Ls(tu,e.__scopeSelect),[o,n]=Z.useState();if(Ve(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?PP.createPortal((0,fe.jsx)(xU,{scope:e.__scopeSelect,children:(0,fe.jsx)(wy.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(yU,{...e,ref:t})});vU.displayName=tu;var zn=10,[xU,Ts]=nd(tu),rZ="SelectContentImpl",oZ=co("SelectContent.RemoveScroll"),yU=Z.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:x,...v}=e,h=Ls(tu,r),[y,w]=Z.useState(null),[C,S]=Z.useState(null),R=de(t,z=>w(z)),[I,L]=Z.useState(null),[T,k]=Z.useState(null),E=Cy(r),[F,N]=Z.useState(!1),B=Z.useRef(!1);Z.useEffect(()=>{if(y)return vs(y)},[y]),fs();let O=Z.useCallback(z=>{let[ne,...he]=E().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},[E,C]),_=Z.useCallback(()=>O([I,y]),[O,I,y]);Z.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:H,triggerPointerDownPosRef:A}=h;Z.useEffect(()=>{if(y){let z={x:0,y:0},ne=xe=>{z={x:Math.abs(Math.round(xe.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(A.current?.y??0))}},he=xe=>{z.x<=10&&z.y<=10?xe.preventDefault():y.contains(xe.target)||H(!1),document.removeEventListener("pointermove",ne),A.current=null};return A.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,H,A]),Z.useEffect(()=>{let z=()=>H(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[H]);let[J,ae]=_U(z=>{let ne=E().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=VU(ne,z,he);xe&&setTimeout(()=>xe.ref.current.focus())}),V=Z.useCallback((z,ne,he)=>{let xe=!B.current&&!he;(h.value!==void 0&&h.value===ne||xe)&&(L(z),xe&&(B.current=!0))},[h.value]),Y=Z.useCallback(()=>y?.focus(),[y]),re=Z.useCallback((z,ne,he)=>{let xe=!B.current&&!he;(h.value!==void 0&&h.value===ne||xe)&&k(z)},[h.value]),X=o==="popper"?CP:wU,ce=X===CP?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x}:{};return(0,fe.jsx)(xU,{scope:r,content:y,viewport:C,onViewportChange:S,itemRefCallback:V,selectedItem:I,onItemLeave:Y,itemTextRefCallback:re,focusSelectedItem:_,selectedItemText:T,position:o,isPositioned:F,searchRef:J,children:(0,fe.jsx)(ii,{as:oZ,allowPinchZoom:!0,children:(0,fe.jsx)(ri,{asChild:!0,trapped:h.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:W(n,z=>{h.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:(0,fe.jsx)(Ko,{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=E().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()}})})})})})})});yU.displayName=rZ;var nZ="SelectItemAlignedPosition",wU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=Ls(tu,r),i=Ts(tu,r),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,R=>c(R)),f=Cy(r),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(),L=a.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(a.dir!=="rtl"){let pe=T.left-I.left,K=L.left-pe,Ie=R.left-K,ee=R.width+Ie,ie=Math.max(ee,I.width),Ge=window.innerWidth-zn,Xe=yP(K,[zn,Math.max(zn,Ge-ie)]);s.style.minWidth=ee+"px",s.style.left=Xe+"px"}else{let pe=I.right-T.right,K=window.innerWidth-L.right-pe,Ie=window.innerWidth-R.right-K,ee=R.width+Ie,ie=Math.max(ee,I.width),Ge=window.innerWidth-zn,Xe=yP(K,[zn,Math.max(zn,Ge-ie)]);s.style.minWidth=ee+"px",s.style.right=Xe+"px"}let k=f(),E=window.innerHeight-zn*2,F=g.scrollHeight,N=window.getComputedStyle(u),B=parseInt(N.borderTopWidth,10),O=parseInt(N.paddingTop,10),_=parseInt(N.borderBottomWidth,10),H=parseInt(N.paddingBottom,10),A=B+O+F+H+_,J=Math.min(x.offsetHeight*5,A),ae=window.getComputedStyle(g),V=parseInt(ae.paddingTop,10),Y=parseInt(ae.paddingBottom,10),re=R.top+R.height/2-zn,X=E-re,ce=x.offsetHeight/2,z=x.offsetTop+ce,ne=B+O+z,he=A-ne;if(ne<=re){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(re,B+g.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",g.scrollTop=ne-re+g.offsetTop}s.style.margin=`${zn}px 0`,s.style.minHeight=J+"px",s.style.maxHeight=E+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,x,v,a.dir,o]);Ve(()=>y(),[y]);let[w,C]=Z.useState();Ve(()=>{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)(iZ,{scope:r,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}})})})});wU.displayName=nZ;var aZ="SelectPopperPosition",CP=Z.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=zn,...a}=e,i=Sy(r);return(0,fe.jsx)(gs,{...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)"}})});CP.displayName=aZ;var[iZ,LP]=nd(tu,{}),SP="SelectViewport",CU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=Ts(SP,r),i=LP(SP,r),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:o}),(0,fe.jsx)(wy.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-zn*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})})})]})});CU.displayName=SP;var SU="SelectGroup",[sZ,lZ]=nd(SU),bU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Ne();return(0,fe.jsx)(sZ,{scope:r,id:n,children:(0,fe.jsx)($.div,{role:"group","aria-labelledby":n,...o,ref:t})})});bU.displayName=SU;var RU="SelectLabel",IU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=lZ(RU,r);return(0,fe.jsx)($.div,{id:n.id,...o,ref:t})});IU.displayName=RU;var yy="SelectItem",[uZ,PU]=nd(yy),LU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=Ls(yy,r),l=Ts(yy,r),u=s.value===o,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),m=de(t,h=>l.itemRefCallback?.(h,o,n)),g=Ne(),x=Z.useRef("touch"),v=()=>{n||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,fe.jsx)(uZ,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:Z.useCallback(h=>{d(y=>y||(h?.textContent??"").trim())},[]),children:(0,fe.jsx)(wy.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,()=>{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===" "||(XQ.includes(h.key)&&v(),h.key===" "&&h.preventDefault())})})})})});LU.displayName=yy;var Bm="SelectItemText",TU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=Ls(Bm,r),s=Ts(Bm,r),l=PU(Bm,r),u=JQ(Bm,r),[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 Ve(()=>(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?PP.createPortal(a.children,i.valueNode):null]})});TU.displayName=Bm;var kU="SelectItemIndicator",MU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return PU(kU,r).isSelected?(0,fe.jsx)($.span,{"aria-hidden":!0,...o,ref:t}):null});MU.displayName=kU;var bP="SelectScrollUpButton",EU=Z.forwardRef((e,t)=>{let r=Ts(bP,e.__scopeSelect),o=LP(bP,e.__scopeSelect),[n,a]=Z.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)(DU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});EU.displayName=bP;var RP="SelectScrollDownButton",AU=Z.forwardRef((e,t)=>{let r=Ts(RP,e.__scopeSelect),o=LP(RP,e.__scopeSelect),[n,a]=Z.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)(DU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});AU.displayName=RP;var DU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Ts("SelectScrollButton",r),i=Z.useRef(null),s=Cy(r),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.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()})})}),cZ="SelectSeparator",NU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,fe.jsx)($.div,{"aria-hidden":!0,...o,ref:t})});NU.displayName=cZ;var IP="SelectArrow",dZ=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Sy(r),a=Ls(IP,r),i=Ts(IP,r);return a.open&&i.position==="popper"?(0,fe.jsx)(hs,{...n,...o,ref:t}):null});dZ.displayName=IP;var fZ="SelectBubbleInput",OU=Z.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=Z.useRef(null),a=de(o,n),i=Uc(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,{...r,style:{...wP,...r.style},ref:a,defaultValue:t})});OU.displayName=fZ;function FU(e){return e===""||e===void 0}function _U(e){let t=nt(e),r=Z.useRef(""),o=Z.useRef(0),n=Z.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=Z.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function VU(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=pZ(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 pZ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var BU=cU,TP=fU,HU=mU,UU=gU,zU=hU,kP=vU,GU=CU,WU=bU,MP=IU,EP=LU,jU=TU,qU=MU,AP=EU,DP=AU,NP=NU;var qe=b(D()),ru=BU;ru.displayName="Select";var $U=WU,ad=HU,ou=ks.forwardRef(({className:e,children:t,variant:r="standard",size:o="md",error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,qe.jsxs)(TP,{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",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,qe.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,qe.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,qe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qe.jsx)(Vt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,qe.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,qe.jsx)(UU,{asChild:!0,children:l?(0,qe.jsx)("span",{className:"opacity-60",children:l}):(0,qe.jsx)(sa,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));ou.displayName=TP.displayName;var by=ks.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(AP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,qe.jsx)(Tf,{className:"h-4 w-4"})}));by.displayName=AP.displayName;var Ry=ks.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(DP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,qe.jsx)(sa,{className:"h-4 w-4"})}));Ry.displayName=DP.displayName;var nu=ks.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,qe.jsx)(zU,{children:(0,qe.jsxs)(kP,{ref:s,side:o,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"],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,qe.jsx)(by,{}),(0,qe.jsx)(GU,{className:P("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,qe.jsx)(Ry,{})]})}));nu.displayName=kP.displayName;var OP=ks.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(MP,{ref:r,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));OP.displayName=MP.displayName;var Lr=ks.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,qe.jsxs)(EP,{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",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,qe.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qe.jsx)(qU,{children:a||(0,qe.jsx)(hr,{className:"h-4 w-4"})})}),(0,qe.jsx)(jU,{children:t}),n&&(0,qe.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Lr.displayName=EP.displayName;var FP=ks.forwardRef(({className:e,...t},r)=>(0,qe.jsx)(NP,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));FP.displayName=NP.displayName;var Qt=b(D()),gZ=[{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"}],KU=(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}},hZ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},_P=Hm.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=gZ,size:s,...l},u)=>{let[c,d]=Hm.useState(o),[f,p]=Hm.useState(t),m=i.find(h=>h.code===c)||i[0],g=h=>{let y=h.target.value.replace(/\D/g,""),w=hZ(c),C=y.slice(0,w),S=KU(C,c);p(C),r?.(C,c),h.target.value=S},x=h=>{d(h),r?.(f,h)},v=KU(f,c);return(0,Qt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Qt.jsxs)(ru,{value:c,onValueChange:x,children:[(0,Qt.jsx)(ou,{className:"w-[120px]",children:(0,Qt.jsx)(ad,{children:(0,Qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qt.jsx)("span",{children:m.flag}),(0,Qt.jsx)("span",{children:m.code})]})})}),(0,Qt.jsx)(nu,{children:i.map(h=>(0,Qt.jsx)(Lr,{value:h.code,children:(0,Qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qt.jsx)("span",{children:h.flag}),(0,Qt.jsx)("span",{children:h.code}),(0,Qt.jsx)("span",{className:"text-muted-foreground",children:h.name})]})},h.code))})]}),(0,Qt.jsxs)("div",{className:"relative flex-1",children:[(0,Qt.jsx)(lr,{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,Qt.jsx)(Wf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});_P.displayName="PhoneInput";var Tr=b(M());var Lo=b(D()),vZ=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"}}),XU=Tr.createContext({}),VP=Tr.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,disabled:n,name:a,...i},s)=>{let[l,u]=Tr.useState(r),c=t!==void 0,d=c?t:l,f=Tr.useCallback(p=>{c||u(p),o?.(p)},[c,o]);return(0,Lo.jsx)(XU.Provider,{value:{value:d,onValueChange:f,disabled:n,name:a},children:(0,Lo.jsx)("div",{ref:s,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...i})})});VP.displayName="RadioGroup";var Iy=Tr.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=Tr.useContext(XU),c=Tr.useId(),d=n||c,f=u.value===a,p=m=>{u.onValueChange&&u.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,Lo.jsxs)("div",{className:"relative flex items-center",children:[(0,Lo.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||u.disabled,name:u.name,onChange:p,className:"peer sr-only",...s}),(0,Lo.jsx)("label",{htmlFor:d,className:P(vZ({variant:t,size:r}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-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,Lo.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,Lo.jsx)(rl,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Iy.displayName="RadioGroupItem";var Py=Tr.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,Lo.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));Py.displayName="RadioLabel";var BP=Tr.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=Tr.useId(),i=e||a;return(0,Lo.jsxs)("div",{className:"flex items-center",children:[(0,Lo.jsx)(Iy,{ref:n,id:i,...o}),(0,Lo.jsx)(Py,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});BP.displayName="RadioItemWithLabel";var mi=b(D());function YU({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,mi.jsxs)("div",{className:P("border border-input rounded-md",o),children:[(0,mi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,mi.jsxs)("div",{className:"flex gap-1",children:[(0,mi.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,mi.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,mi.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,mi.jsx)("textarea",{value:e,onChange:a,placeholder:r,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 jP=b(M());var se=b(M(),1);var t3=b(M(),1),TZ=b(Va(),1);var ur=b(M(),1);var ZU=b(M(),1);function QU(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xZ(...e){return t=>{let r=!1,o=e.map(n=>{let a=QU(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():QU(e[n],null)}}}}function gi(...e){return ZU.useCallback(xZ(...e),e)}function e3(e){let t=ur.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];JU(n)&&typeof Ly=="function"&&(n=Ly(n._payload)),ur.Children.forEach(n,f=>{if(bZ(f)){s=!0;let p=f,m="child"in p.props?p.props.child:p.props.children;JU(m)&&typeof Ly=="function"&&(m=Ly(m._payload)),i=wZ(p,m),l.push(i?.props?.children)}else l.push(f)}),i?i=ur.cloneElement(i,void 0,l):!s&&ur.Children.count(n)===1&&ur.isValidElement(n)&&(i=n);let u=i?SZ(i):void 0,c=gi(o,u);if(!i){if(n||n===0)throw new Error(s?LZ(e):PZ(e));return n}let d=CZ(a,i.props??{});return i.type!==ur.Fragment&&(d.ref=o?c:u),ur.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var yZ=Symbol.for("radix.slottable");var wZ=(e,t)=>{if("child"in e.props){let r=e.props.child;return ur.isValidElement(r)?ur.cloneElement(r,void 0,e.props.children(r.props.children)):null}return ur.isValidElement(t)?t:null};function CZ(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 SZ(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 bZ(e){return ur.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yZ}var RZ=Symbol.for("react.lazy");function JU(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RZ&&"_payload"in e&&IZ(e._payload)}function IZ(e){return typeof e=="object"&&e!==null&&"then"in e}var PZ=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,LZ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Ly=ur[" use ".trim().toString()];var r3=b(D(),1),kZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],id=kZ.reduce((e,t)=>{let r=e3(`Primitive.${t}`),o=t3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,r3.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var cr=b(M(),1);var o3=b(M(),1),Um=globalThis?.document?o3.useLayoutEffect:()=>{};var a3=b(M(),1);function MZ(e,t){return a3.useReducer((r,o)=>t[r][o]??r,e)}var sd=e=>{let{present:t,children:r}=e,o=EZ(t),n=typeof r=="function"?r({present:o.isPresent}):cr.Children.only(r),a=AZ(o.ref,DZ(n));return typeof r=="function"||o.isPresent?cr.cloneElement(n,{ref:a}):null};sd.displayName="Presence";function EZ(e){let[t,r]=cr.useState(),o=cr.useRef(null),n=cr.useRef(e),a=cr.useRef("none"),i=cr.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=MZ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return cr.useEffect(()=>{l==="mounted"?(a.current=i.current??zm(o.current),i.current=void 0):a.current="none"},[l]),Um(()=>{let c=o.current,d=n.current;if(d!==e){let p=a.current,m=zm(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]),Um(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=m=>{let x=zm(o.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=zm(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:cr.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,i.current=zm(d)}else o.current=null;r(c)},[])}}function n3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function AZ(...e){let t=cr.useRef(e);return t.current=e,cr.useCallback(r=>{let o=t.current,n=!1,a=o.map(i=>{let s=n3(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():n3(o[i],null)}}},[])}function zm(e){return e?.animationName||"none"}function DZ(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 hi=b(M(),1),i3=b(D(),1);function s3(e,t=[]){let r=[];function o(a,i){let s=hi.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,x=hi.useMemo(()=>m,Object.values(m));return(0,i3.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=hi.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=r.map(i=>hi.createContext(i));return function(s){let l=s?.[e]||a;return hi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,NZ(n,...t)]}function NZ(...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 hi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var ld=b(M(),1);function Ms(e){let t=ld.useRef(e);return ld.useEffect(()=>{t.current=e}),ld.useMemo(()=>(...r)=>t.current?.(...r),[])}var Ty=b(M(),1),OZ=b(D(),1),FZ=Ty.createContext(void 0);function l3(e){let t=Ty.useContext(FZ);return e||t||"ltr"}function u3(e,[t,r]){return Math.min(r,Math.max(t,e))}var XMe=!!(typeof window<"u"&&window.document&&window.document.createElement);function Es(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var d3=b(M(),1),_e=b(D(),1);function _Z(e,t){return d3.useReducer((r,o)=>t[r][o]??r,e)}var HP="ScrollArea",[f3,iEe]=s3(HP),[VZ,tn]=f3(HP),p3=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,x]=se.useState(null),[v,h]=se.useState(0),[y,w]=se.useState(0),[C,S]=se.useState(!1),[R,I]=se.useState(!1),L=gi(t,l),T=l3(n);return(0,_e.jsx)(VZ,{scope:r,type:o,dir:T,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,_e.jsx)(id.div,{dir:T,...i,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});p3.displayName=HP;var m3="ScrollAreaViewport",g3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=tn(m3,r),s=se.useRef(null),l=gi(t,s,i.onViewportChange);return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(BZ,{nonce:n}),(0,_e.jsx)(id.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})})]})});g3.displayName=m3;var BZ=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),Ra="ScrollAreaScrollbar",Ey=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=tn(Ra,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)(HZ,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,_e.jsx)(UZ,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,_e.jsx)(h3,{...o,ref:t,forceMount:r}):n.type==="always"?(0,_e.jsx)(UP,{...o,ref:t,"data-state":"visible"}):null});Ey.displayName=Ra;var HZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=tn(Ra,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)(sd,{present:r||a,children:(0,_e.jsx)(h3,{"data-state":a?"visible":"hidden",...o,ref:t})})}),UZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=tn(Ra,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Dy(()=>l("SCROLL_END"),100),[s,l]=_Z("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)(sd,{present:r||s!=="hidden",children:(0,_e.jsx)(UP,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:Es(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Es(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),h3=se.forwardRef((e,t)=>{let r=tn(Ra,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=Dy(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return ud(r.viewport,l),ud(r.content,l),(0,_e.jsx)(sd,{present:o||a,children:(0,_e.jsx)(UP,{"data-state":a?"visible":"hidden",...n,ref:t})})}),UP=se.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=tn(Ra,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=w3(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 $Z(f,i.current,s,p)}return r==="horizontal"?(0,_e.jsx)(zZ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=c3(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)(GZ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=c3(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}),zZ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=tn(Ra,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=gi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(x3,{"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":Ay(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),S3(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:My(i.paddingLeft),paddingEnd:My(i.paddingRight)}})}})}),GZ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=tn(Ra,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=gi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(x3,{"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":Ay(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),S3(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:My(i.paddingTop),paddingEnd:My(i.paddingBottom)}})}})}),[WZ,v3]=f3(Ra),x3=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=tn(Ra,r),[m,g]=se.useState(null),x=gi(t,g),v=se.useRef(null),h=se.useRef(""),y=p.viewport,w=o.content-o.viewport,C=Ms(c),S=Ms(l),R=Dy(d,10);function I(L){if(v.current){let T=L.clientX-v.current.left,k=L.clientY-v.current.top;u({x:T,y:k})}}return se.useEffect(()=>{let L=T=>{let k=T.target;m?.contains(k)&&C(T,w)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[y,m,w,C]),se.useEffect(S,[o,S]),ud(m,R),ud(p.content,R),(0,_e.jsx)(WZ,{scope:r,scrollbar:m,hasThumb:n,onThumbChange:Ms(a),onThumbPointerUp:Ms(i),onThumbPositionChange:S,onThumbPointerDown:Ms(s),children:(0,_e.jsx)(id.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Es(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),v.current=m.getBoundingClientRect(),h.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(L))}),onPointerMove:Es(e.onPointerMove,I),onPointerUp:Es(e.onPointerUp,L=>{let T=L.target;T.hasPointerCapture(L.pointerId)&&T.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=h.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),ky="ScrollAreaThumb",zP=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=v3(ky,e.__scopeScrollArea);return(0,_e.jsx)(sd,{present:r||n.hasThumb,children:(0,_e.jsx)(jZ,{ref:t,...o})})}),jZ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=tn(ky,r),i=v3(ky,r),{onThumbPositionChange:s}=i,l=gi(t,i.onThumbChange),u=se.useRef(void 0),c=Dy(()=>{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=KZ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,_e.jsx)(id.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:Es(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:Es(e.onPointerUp,i.onThumbPointerUp)})});zP.displayName=ky;var GP="ScrollAreaCorner",y3=se.forwardRef((e,t)=>{let r=tn(GP,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,_e.jsx)(qZ,{...e,ref:t}):null});y3.displayName=GP;var qZ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=tn(GP,r),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return ud(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),ud(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)(id.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 My(e){return e?parseInt(e,10):0}function w3(e,t){let r=e/t;return isNaN(r)?0:r}function Ay(e){let t=w3(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function $Z(e,t,r,o="ltr"){let n=Ay(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 C3([l,u],d)(e)}function c3(e,t,r="ltr"){let o=Ay(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=u3(e,l);return C3([0,i],[0,s])(u)}function C3(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 S3(e,t){return e>0&&e<t}var KZ=(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 Dy(e,t){let r=Ms(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 ud(e,t){let r=Ms(t);Um(()=>{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 WP=p3,b3=g3;var R3=y3;var As=b(D()),qP=jP.forwardRef(({className:e,children:t,...r},o)=>(0,As.jsxs)(WP,{ref:o,className:P("relative overflow-hidden",e),...r,children:[(0,As.jsx)(b3,{className:"h-full w-full rounded-[inherit]",children:t}),(0,As.jsx)(Ny,{}),(0,As.jsx)(R3,{})]}));qP.displayName=WP.displayName;var Ny=jP.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,As.jsx)(Ey,{ref:o,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),...r,children:(0,As.jsx)(zP,{className:"relative flex-1 rounded-full bg-border"})}));Ny.displayName=Ey.displayName;var Gn=b(M());var Gm=b(D()),I3=(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},P3={duration:.5,ease:[.25,.46,.45,.94]},$P=Gn.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 x=s!==void 0?s:i,v=Gn.useMemo(()=>c||I3(t,n),[t,n,c]),h=Gn.useMemo(()=>({...P3,duration:o,delay:r+l}),[o,r,l]),y=Gn.useMemo(()=>({once:x,amount:a,...m}),[x,a,m]);return d?(0,Gm.jsx)(He.div,{ref:g,initial:"hidden",whileInView:"visible",viewport:y,variants:v,transition:h,className:P(u),style:f,id:p,children:e}):(0,Gm.jsx)("div",{ref:g,className:u,style:f,id:p,children:e})});$P.displayName="ScrollReveal";var KP=Gn.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=Gn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,Gm.jsx)(He.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(r),style:o,id:n,children:e})});KP.displayName="ScrollRevealContainer";var XP=Gn.forwardRef(({children:e,direction:t="up",duration:r=.5,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Gn.useMemo(()=>a||I3(t,o),[t,o,a]),c=Gn.useMemo(()=>({...P3,duration:r}),[r]);return(0,Gm.jsx)(He.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});XP.displayName="ScrollRevealItem";var E3=b(M());var T3=b(M(),1);var k3=b(D(),1),YZ="Separator",L3="horizontal",QZ=["horizontal","vertical"],M3=T3.forwardRef((e,t)=>{let{decorative:r,orientation:o=L3,...n}=e,a=ZZ(o)?o:L3,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,k3.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});M3.displayName=YZ;function ZZ(e){return QZ.includes(e)}var YP=M3;var D3=b(D()),A3=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"}}),To=E3.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,D3.jsx)(YP,{ref:i,decorative:n,orientation:t||void 0,className:P(A3({orientation:t,variant:r,size:o}),e),...a}));To.displayName=YP.displayName;var et=b(M());var oz=b(M());var tz=b(M(),1);var eJ=Object.defineProperty,cd=(e,t)=>eJ(e,"name",{value:t,configurable:!0}),N3=!!(typeof window<"u"&&window.document&&window.document.createElement);function ZP(e,t,{checkForDefaultPrevented:r=!0}={}){return cd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}cd(ZP,"composeEventHandlers");function tJ(e){if(!N3)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}cd(tJ,"getOwnerWindow");function QP(e){if(!N3)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}cd(QP,"getOwnerDocument");function O3(e,t=!1){let{activeElement:r}=QP(e);if(!r?.nodeName)return null;if(F3(r)&&r.contentDocument)return O3(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=QP(r).getElementById(o);if(n)return n}}return r}cd(O3,"getActiveElement");function F3(e){return e.tagName==="IFRAME"}cd(F3,"isFrame");var rn=b(M(),1);var dd=!1;var _3=b(M(),1),Oy=globalThis?.document?_3.useLayoutEffect:()=>{};var Wn=b(M(),1);var fd=b(M(),1),rJ=Object.defineProperty,oJ=(e,t)=>rJ(e,"name",{value:t,configurable:!0}),V3=fd[" useEffectEvent ".trim().toString()],B3=fd[" useInsertionEffect ".trim().toString()];function JP(e){if(typeof V3=="function")return V3(e);let t=fd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof B3=="function"?B3(()=>{t.current=e}):Oy(()=>{t.current=e}),fd.useMemo(()=>(...r)=>t.current?.(...r),[])}oJ(JP,"useEffectEvent");var nJ=Object.defineProperty,Wm=(e,t)=>nJ(e,"name",{value:t,configurable:!0}),aJ=rn[" useInsertionEffect ".trim().toString()]||Oy;function eL({prop:e,defaultProp:t,onChange:r=Wm(()=>{},"onChange"),caller:o}){let[n,a,i]=U3({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(dd){let c=rn.useRef(e!==void 0);rn.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=rn.useCallback(c=>{if(s){let d=z3(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}Wm(eL,"useControllableState");function U3({defaultProp:e,onChange:t}){let[r,o]=rn.useState(e),n=rn.useRef(r),a=rn.useRef(t);return aJ(()=>{a.current=t},[t]),rn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}Wm(U3,"useUncontrolledState");function z3(e){return typeof e=="function"}Wm(z3,"isFunction");var H3=Symbol("RADIX:SYNC_STATE");function iJ(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=JP(i);if(dd){let x=Wn.useRef(n!==void 0);Wn.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=[{...r,state:a}];o&&c.push(o);let[d,f]=Wn.useReducer((x,v)=>{if(v.type===H3)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=Wn.useRef(p);Wn.useEffect(()=>{m.current!==p&&(m.current=p,l||u(p))},[p,m,l]);let g=Wn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Wn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:H3,state:n})},[n,d.state,l]),[g,f]}Wm(iJ,"useControllableStateReducer");var Q3=b(M(),1),Z3=b(Va(),1);var Pt=b(M(),1);var G3=b(M(),1),sJ=Object.defineProperty,rL=(e,t)=>sJ(e,"name",{value:t,configurable:!0});function tL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}rL(tL,"setRef");function W3(...e){return t=>{let r=!1,o=e.map(n=>{let a=tL(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():tL(e[n],null)}}}}rL(W3,"composeRefs");function oL(...e){return G3.useCallback(W3(...e),e)}rL(oL,"useComposedRefs");var cJ=b(D(),1),lJ=Object.defineProperty,on=(e,t)=>lJ(e,"name",{value:t,configurable:!0}),uJ=on((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";dd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=j3(a,n))}return{...e,...r}},"mergeProps");function j3(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}on(j3,"concatAriaDescribedby");var q3=Pt.createContext(uJ);q3.displayName="SlotContext";function aL(e){let t=Pt.forwardRef((r,o)=>{let n=Pt.useContext(q3),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];nL(a)&&typeof Fy=="function"&&(a=Fy(a._payload)),Pt.Children.forEach(a,m=>{if(X3(m)){u=!0;let g=m,x="child"in g.props?g.props.child:g.props.children;nL(x)&&typeof Fy=="function"&&(x=Fy(x._payload)),l=fJ(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?K3(l):void 0,f=oL(o,d);if(!l){if(a||a===0)throw new Error(u?gJ(e):mJ(e));return a}let p=i(s,l.props??{});return l.type!==Pt.Fragment&&(p.ref=o?f:d),Pt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}on(aL,"createSlot");var $3=Symbol.for("radix.slottable");function dJ(e){let t=on(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=$3,t}on(dJ,"createSlottable");var fJ=on((e,t)=>{if("child"in e.props){let r=e.props.child;return Pt.isValidElement(r)?Pt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Pt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function K3(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)}on(K3,"getElementRef");function X3(e){return Pt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$3}on(X3,"isSlottable");var pJ=Symbol.for("react.lazy");function nL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===pJ&&"_payload"in e&&Y3(e._payload)}on(nL,"isLazyComponent");function Y3(e){return typeof e=="object"&&e!==null&&"then"in e}on(Y3,"isPromiseLike");var mJ=on(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),gJ=on(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Fy=Pt[" use ".trim().toString()];var J3=b(D(),1),hJ=Object.defineProperty,vJ=(e,t)=>hJ(e,"name",{value:t,configurable:!0}),xJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ez=xJ.reduce((e,t)=>{let r=aL(`Primitive.${t}`),o=Q3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,J3.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function yJ(e,t){e&&Z3.flushSync(()=>e.dispatchEvent(t))}vJ(yJ,"dispatchDiscreteCustomEvent");var rz=b(D(),1),wJ=Object.defineProperty,CJ=(e,t)=>wJ(e,"name",{value:t,configurable:!0}),SJ="Toggle",jm=tz.forwardRef(CJ(function(t,r){let{pressed:o,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=eL({prop:o,onChange:a,defaultProp:n??!1,caller:SJ});return(0,rz.jsx)(ez.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:r,onClick:ZP(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var nz=b(D()),qm=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"}}),$m=oz.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,nz.jsx)(jm,{ref:n,className:P("moonui-theme",qm({variant:t,size:r,className:e})),...o}));$m.displayName=jm.displayName;var By=b(M());var Re=b(M(),1);var At=b(D(),1),[_y,ZEe]=Fe("Tooltip",[Zo]),Vy=Zo(),az="TooltipProvider",RJ=700,iL="tooltip.open",[IJ,lL]=_y(az),iz=e=>{let{__scopeTooltip:t,delayDuration:r=RJ,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,At.jsx)(IJ,{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})};iz.displayName=az;var Km="Tooltip",[PJ,Xm]=_y(Km),sz=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=lL(Km,e.__scopeTooltip),u=Vy(t),[c,d]=Re.useState(null),f=Ne(),p=Re.useRef(0),m=i??l.disableHoverableContent,g=s??l.delayDuration,x=Re.useRef(!1),[v,h]=$e({prop:o,defaultProp:n??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(iL))):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,At.jsx)(ni,{...u,children:(0,At.jsx)(PJ,{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:r})})};sz.displayName=Km;var sL="TooltipTrigger",lz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Xm(sL,r),a=lL(sL,r),i=Vy(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,At.jsx)(ai,{asChild:!0,...i,children:(0,At.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)})})});lz.displayName=sL;var uL="TooltipPortal",[LJ,TJ]=_y(uL,{forceMount:void 0}),kJ=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Xm(uL,t);return(0,At.jsx)(LJ,{scope:t,forceMount:r,children:(0,At.jsx)(lt,{present:r||a.open,children:(0,At.jsx)(Ro,{asChild:!0,container:n,children:o})})})};kJ.displayName=uL;var pd="TooltipContent",uz=Re.forwardRef((e,t)=>{let r=TJ(pd,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Xm(pd,e.__scopeTooltip);return(0,At.jsx)(lt,{present:o||i.open,children:i.disableHoverableContent?(0,At.jsx)(cz,{side:n,...a,ref:t}):(0,At.jsx)(MJ,{side:n,...a,ref:t})})}),MJ=Re.forwardRef((e,t)=>{let r=Xm(pd,e.__scopeTooltip),o=lL(pd,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 x=m.currentTarget,v={x:m.clientX,y:m.clientY},h=NJ(v,x.getBoundingClientRect()),y=OJ(v,h),w=FJ(g.getBoundingClientRect()),C=VJ([...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=!_J(v,i);h?f():y&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,c,i,u,f]),(0,At.jsx)(cz,{...e,ref:a})}),[EJ,AJ]=_y(Km,{isInside:!1}),DJ=G1("TooltipContent"),cz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Xm(pd,r),u=Vy(r),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(iL,c),()=>document.removeEventListener(iL,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,At.jsx)(Ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,At.jsxs)(gs,{"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,At.jsx)(DJ,{children:o}),(0,At.jsx)(EJ,{scope:r,isInside:!0,children:(0,At.jsx)(uU,{id:l.contentId,role:"tooltip",children:n||o})})]})})});uz.displayName=pd;var dz="TooltipArrow",fz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Vy(r);return AJ(dz,r).isInside?null:(0,At.jsx)(hs,{...n,...o,ref:t})});fz.displayName=dz;function NJ(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 OJ(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 FJ(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 _J(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 VJ(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),BJ(t)}function BJ(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 pz=iz,mz=sz,gz=lz;var cL=uz,dL=fz;var Ds=b(D()),Hy=pz,hz=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"}}),Ym=mz,Qm=gz,fL=By.forwardRef(({className:e,...t},r)=>(0,Ds.jsx)(dL,{ref:r,className:P("moonui-theme","fill-current",e),...t}));fL.displayName=dL.displayName;var md=By.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,Ds.jsxs)(cL,{ref:i,sideOffset:n,className:P("moonui-theme",hz({variant:t,size:r}),e),...a,children:[a.children,o&&(0,Ds.jsx)(fL,{})]}));md.displayName=cL.displayName;var vz=By.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)(Ym,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,Ds.jsx)(Qm,{asChild:!0,children:e}),(0,Ds.jsx)(md,{ref:m,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));vz.displayName="SimpleTooltip";var G=b(D()),Wt=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,G.jsxs)(Ym,{children:[(0,G.jsx)(Qm,{asChild:!0,children:(0,G.jsx)($m,{pressed:r,onPressedChange:()=>o(),disabled:n,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(md,{children:(0,G.jsx)("p",{children:t})})]}),UJ=({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))}),pL=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,x]=(0,et.useState)(e),[v,h]=(0,et.useState)(null),y=et.default.useRef(null),w=et.default.useRef(null),[C,S]=(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}),R=(0,et.useCallback)(A=>{f(A),t?.(A)},[t]),I=(0,et.useCallback)(()=>{let A=window.getSelection();return A&&A.rangeCount>0?A.getRangeAt(0):null},[]),L=(0,et.useCallback)(A=>{if(!A)return;let J=window.getSelection();J&&(J.removeAllRanges(),J.addRange(A))},[]),T=(0,et.useCallback)((A,J)=>{if(o)return;y.current&&y.current.focus();let ae=I();if(document.execCommand(A,!1,J)||console.warn(`Command '${A}' 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()},[o,I,R]),k=(0,et.useCallback)(A=>{let J=A.currentTarget.innerHTML;R(J)},[R]),E=(0,et.useCallback)(A=>{if(A.ctrlKey||A.metaKey)switch(A.key){case"b":A.preventDefault(),T("bold");break;case"i":A.preventDefault(),T("italic");break;case"u":A.preventDefault(),T("underline");break;case"z":A.preventDefault(),A.shiftKey?T("redo"):T("undo");break}A.key==="Tab"&&(A.preventDefault(),T("insertHTML"," "))},[T]),F=(0,et.useCallback)(()=>{let A=prompt("Enter URL:");A&&T("createLink",A)},[T]),N=(0,et.useCallback)(()=>{let A=prompt("Enter image URL:");A&&T("insertImage",A)},[T]),B=(0,et.useCallback)(A=>{T("formatBlock",`<h${A}>`)},[T]),O=(0,et.useCallback)(A=>{let J=window.getSelection();if(J&&J.rangeCount>0){let ae=J.getRangeAt(0),V=document.createElement("span");V.style.color=A;try{ae.surroundContents(V)}catch{T("foreColor",A)}if(y.current){let Y=y.current.innerHTML;R(Y)}}},[T,R]),_=A=>{if(typeof window>"u")return A.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let J=document.createElement("div");return J.innerHTML=A,J.textContent||J.innerText||""};et.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),et.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let H=s&&(0,G.jsx)(Hy,{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)(Wt,{icon:(0,G.jsx)(Lf,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Vf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Xf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Kf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(ru,{onValueChange:A=>{A.startsWith("h")?B(A.substring(1)):A==="normal"?T("formatBlock","p"):T("fontSize",A)},disabled:o,children:[(0,G.jsx)(ou,{className:"w-24 h-8",children:(0,G.jsx)(ad,{placeholder:"Size"})}),(0,G.jsxs)(nu,{children:[(0,G.jsx)(Lr,{value:"1",children:"Small"}),(0,G.jsx)(Lr,{value:"3",children:"Normal"}),(0,G.jsx)(Lr,{value:"5",children:"Large"}),(0,G.jsx)(Lr,{value:"7",children:"X-Large"}),(0,G.jsx)(To,{className:"my-1"}),(0,G.jsx)(Lr,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Lr,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Lr,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Lr,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Lr,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Lr,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(To,{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)(Wt,{icon:(0,G.jsx)(bf,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Cf,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Rf,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Sf,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:o})]}),(0,G.jsx)(To,{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)(Wt,{icon:(0,G.jsx)(Uf,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Hf,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(qf,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Mf,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:o})]}),(0,G.jsx)(To,{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)(Wt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:o})]}),(0,G.jsx)(To,{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)(Wt,{icon:(0,G.jsx)(Bf,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:F,disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(nl,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(wa,{children:[(0,G.jsx)(Ca,{asChild:!0,children:(0,G.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,G.jsx)(al,{className:"h-3 w-3"})})}),(0,G.jsx)(Vn,{className:"w-auto p-0",children:(0,G.jsx)(UJ,{onColorSelect:O})})]}),(0,G.jsx)(To,{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)(Wt,{icon:(0,G.jsx)(Yf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:o}),(0,G.jsx)(Wt,{icon:(0,G.jsx)($f,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:o})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(Wt,{icon:p?(0,G.jsx)(Jr,{className:"h-3 w-3"}):(0,G.jsx)(ol,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?R(g):x(d),m(!p)},disabled:o})]})]})});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",o&&"opacity-50 cursor-not-allowed",n),...u,children:[H,(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:A=>x(A.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:y,contentEditable:!o,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:E,"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)(zJ,{content:d})})]})});pL.displayName="SimpleEditor";var zJ=({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 Zm=b(M());var Zt=b(D()),mL=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"}}),vi=Zm.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:x,onAnimationStart:v,onAnimationEnd:h,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,Zt.jsx)(He.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,Zt.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?He.div:"div";return(0,Zt.jsx)(C,{ref:p,className:P("moonui-theme",mL({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?B2:{},...w})});vi.displayName="Skeleton";var Uy=Zm.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,Zt.jsx)("div",{ref:u,className:P("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,Zt.jsx)(vi,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));Uy.displayName="SkeletonText";var zy=Zm.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,Zt.jsx)(vi,{ref:a,variant:r,animation:o,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));zy.displayName="SkeletonAvatar";var gL=Zm.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Zt.jsxs)("div",{ref:s,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Zt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Zt.jsx)(zy,{size:"2.5rem",variant:n,animation:a}),(0,Zt.jsxs)("div",{className:"flex-1",children:[(0,Zt.jsx)(vi,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Zt.jsx)(vi,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Zt.jsx)(Uy,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,Zt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Zt.jsx)(vi,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Zt.jsx)(vi,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));gL.displayName="SkeletonCard";var gd=b(M());var xz=b(D()),hL=gd.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=gd.useState(0),[c,d]=gd.useState(0),[f,p]=gd.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&&o?o():v<0&&r&&r()),p(!1),d(0),u(0)};return(0,xz.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})});hL.displayName="SwipeableCard";var Iz=b(M());var jn=b(M(),1);var au=b(D(),1),Gy="Switch",[GJ,LAe]=Fe(Gy),[WJ,jJ]=GJ(Gy),yz=jn.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]=jn.useState(null),m=de(t,y=>p(y)),g=jn.useRef(!1),x=f?c||!!f.closest("form"):!0,[v,h]=$e({prop:n,defaultProp:a??!1,onChange:u,caller:Gy});return(0,au.jsxs)(WJ,{scope:r,checked:v,disabled:s,children:[(0,au.jsx)($.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":bz(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,au.jsx)(Sz,{control:f,bubbles:!g.current,name:o,value:l,checked:v,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});yz.displayName=Gy;var wz="SwitchThumb",Cz=jn.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=jJ(wz,r);return(0,au.jsx)($.span,{"data-state":bz(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});Cz.displayName=wz;var qJ="SwitchBubbleInput",Sz=jn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=jn.useRef(null),s=de(i,a),l=Uc(r),u=zc(t);return jn.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,au.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}})});Sz.displayName=qJ;function bz(e){return e?"checked":"unchecked"}var vL=yz,Rz=Cz;var Ia=b(D()),xL=Iz.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)(vL,{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",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)(Rz,{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,Ia.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Ia.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));xL.displayName=vL.displayName;var Jm=b(M());var Pa=b(D()),yL=Jm.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]=Jm.useState(""),[p,m]=Jm.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(r&&e.length>=r){m(`Maximum ${r} tags allowed`),setTimeout(()=>m(""),2e3);return}t([...e,h]),f(""),m("")}},v=h=>{l||t(e.filter((y,w)=>w!==h))};return(0,Pa.jsxs)("div",{className:"relative",children:[(0,Pa.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,Pa.jsxs)(eo,{variant:o,className:"gap-1 pr-1.5",children:[(0,Pa.jsx)("span",{className:"text-xs",children:h}),!l&&(0,Pa.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,Pa.jsx)(xo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},y)),(0,Pa.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,Pa.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});yL.displayName="TagsInput";var ko=b(M());var La=b(D()),KJ=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}}),wL=ko.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,...x},v)=>{let h=ko.useRef(null),[y,w]=ko.useState(p||m||"");ko.useImperativeHandle(v,()=>h.current);let C=ko.useCallback(()=>{let E=h.current;if(!E||!l)return;E.style.height="auto";let F=E.scrollHeight;u&&F>u?(E.style.height=`${u}px`,E.style.overflowY="auto"):(E.style.height=`${F}px`,E.style.overflowY="hidden")},[l,u]);ko.useEffect(()=>{C()},[y,C]),ko.useEffect(()=>{p!==void 0&&w(p)},[p]);let S=E=>{w(E.target.value),g?.(E)},R=String(y).length,I=c&&(f!==void 0||R>0),L=typeof a=="string"?a:void 0,T=typeof i=="string"?i:void 0,k=L||T;return(0,La.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)("textarea",{ref:h,className:P(KJ({variant:o,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":L?`${x.id||""}-error`:T?`${x.id||""}-success`:void 0,...x}),s&&(0,La.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,La.jsx)(Vt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,La.jsxs)("div",{className:"flex items-center justify-between",children:[k&&(0,La.jsx)("p",{className:P("text-xs transition-all",L&&"text-error",T&&"text-success",r),id:L?`${x.id||""}-error`:T?`${x.id||""}-success`:void 0,children:L||T}),I&&(0,La.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[R,f!==void 0&&` / ${f}`]})]})]})});wL.displayName="Textarea";var qn=b(M());var be=b(M(),1),Lz=b(Va(),1);var ze=b(D(),1),IL="ToastProvider",[PL,XJ,YJ]=Jn("Toast"),[Tz,XAe]=Fe("Toast",[YJ]),[QJ,jy]=Tz(IL),kz=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 \`${IL}\`. Expected non-empty \`string\`.`),(0,ze.jsx)(PL.Provider,{scope:t,children:(0,ze.jsx)(QJ,{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})})};kz.displayName=IL;var Mz="ToastViewport",ZJ=["F8"],SL="toast.viewportPause",bL="toast.viewportResume",Ez=be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=ZJ,label:n="Notifications ({hotkey})",...a}=e,i=jy(Mz,r),s=XJ(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 x=v=>{o.length!==0&&o.every(y=>v[y]||v.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),be.useEffect(()=>{let x=l.current,v=d.current;if(m&&x&&v){let h=()=>{if(!i.isClosePausedRef.current){let S=new CustomEvent(SL);v.dispatchEvent(S),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let S=new CustomEvent(bL);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,...dee(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 L=g({tabbingDirection:S?"backwards":"forwards"}),T=L.findIndex(k=>k===C);CL(L.slice(T+1))?h.preventDefault():S?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[s,g]),(0,ze.jsxs)(ZO,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,ze.jsx)(RL,{ref:u,onFocusFromOutsideViewport:()=>{let x=g({tabbingDirection:"forwards"});CL(x)}}),(0,ze.jsx)(PL.Slot,{scope:r,children:(0,ze.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,ze.jsx)(RL,{ref:c,onFocusFromOutsideViewport:()=>{let x=g({tabbingDirection:"backwards"});CL(x)}})]})});Ez.displayName=Mz;var Az="ToastFocusProxy",RL=be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=jy(Az,r);return(0,ze.jsx)(Vm,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});RL.displayName=Az;var eg="Toast",JJ="toast.swipeStart",eee="toast.swipeMove",tee="toast.swipeCancel",ree="toast.swipeEnd",Dz=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:eg});return(0,ze.jsx)(lt,{present:r||s,children:(0,ze.jsx)(aee,{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)})})})});Dz.displayName=eg;var[oee,nee]=Tz(eg,{onClose(){}}),aee=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=jy(eg,r),[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:L,onToastRemove:T}=g,k=nt(()=>{x?.contains(document.activeElement)&&g.viewport?.focus(),i()}),E=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 B=()=>{E(R.current),u?.()},O=()=>{let _=new Date().getTime()-S.current;R.current=R.current-_,window.clearTimeout(I.current),l?.()};return N.addEventListener(SL,O),N.addEventListener(bL,B),()=>{N.removeEventListener(SL,O),N.removeEventListener(bL,B)}}},[g.viewport,C,l,u,E]),be.useEffect(()=>{a&&!g.isClosePausedRef.current&&E(C)},[a,C,g.isClosePausedRef,E]),be.useEffect(()=>(L(),()=>T()),[L,T]);let F=be.useMemo(()=>x?Hz(x):null,[x]);return g.viewport?(0,ze.jsxs)(ze.Fragment,{children:[F&&(0,ze.jsx)(iee,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:F}),(0,ze.jsx)(oee,{scope:r,onClose:k,children:Lz.createPortal((0,ze.jsx)(PL.ItemSlot,{scope:r,children:(0,ze.jsx)(QO,{asChild:!0,onEscapeKeyDown:W(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||k(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,ze.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 B=N.clientX-y.current.x,O=N.clientY-y.current.y,_=!!w.current,H=["left","right"].includes(g.swipeDirection),A=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,J=H?A(0,B):0,ae=H?0:A(0,O),V=N.pointerType==="touch"?10:2,Y={x:J,y:ae},re={originalEvent:N,delta:Y};_?(w.current=Y,Wy(eee,d,re,{discrete:!1})):Pz(Y,g.swipeDirection,V)?(w.current=Y,Wy(JJ,c,re,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(B)>V||Math.abs(O)>V)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,N=>{let B=w.current,O=N.target;if(O.hasPointerCapture(N.pointerId)&&O.releasePointerCapture(N.pointerId),w.current=null,y.current=null,B){let _=N.currentTarget,H={originalEvent:N,delta:B};Pz(B,g.swipeDirection,g.swipeThreshold)?Wy(ree,p,H,{discrete:!0}):Wy(tee,f,H,{discrete:!0}),_.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),iee=e=>{let{__scopeToast:t,children:r,...o}=e,n=jy(eg,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return uee(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,ze.jsx)(Ro,{asChild:!0,children:(0,ze.jsx)(Vm,{...o,children:a&&(0,ze.jsxs)(ze.Fragment,{children:[n.label," ",r]})})})},see="ToastTitle",Nz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)($.div,{...o,ref:t})});Nz.displayName=see;var lee="ToastDescription",Oz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)($.div,{...o,ref:t})});Oz.displayName=lee;var Fz="ToastAction",_z=be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,ze.jsx)(Bz,{altText:r,asChild:!0,children:(0,ze.jsx)(LL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fz}\`. Expected non-empty \`string\`.`),null)});_z.displayName=Fz;var Vz="ToastClose",LL=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=nee(Vz,r);return(0,ze.jsx)(Bz,{asChild:!0,children:(0,ze.jsx)($.button,{type:"button",...o,ref:t,onClick:W(e.onClick,n.onClose)})})});LL.displayName=Vz;var Bz=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 Hz(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),cee(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(...Hz(o))}}),t}function Wy(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?zu(n,a):n.dispatchEvent(a)}var Pz=(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 uee(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 cee(e){return e.nodeType===e.ELEMENT_NODE}function dee(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 CL(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Uz=kz,TL=Ez,kL=Dz,ML=Nz,EL=Oz,AL=_z,DL=LL;var kr=b(D()),OL=Uz,Ky=qn.forwardRef(({className:e,...t},r)=>(0,kr.jsx)(TL,{ref:r,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}));Ky.displayName=TL.displayName;var pee=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"}}),Xy=qn.forwardRef(({className:e,variant:t,...r},o)=>(0,kr.jsx)(kL,{ref:o,className:P("moonui-theme",pee({variant:t}),e),...r}));Xy.displayName=kL.displayName;var FL=qn.forwardRef(({className:e,...t},r)=>(0,kr.jsx)(AL,{ref:r,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}));FL.displayName=AL.displayName;var Yy=qn.forwardRef(({className:e,...t},r)=>(0,kr.jsx)(DL,{ref:r,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,kr.jsx)(xo,{className:"h-4 w-4"})}));Yy.displayName=DL.displayName;var Qy=qn.forwardRef(({className:e,...t},r)=>(0,kr.jsx)(ML,{ref:r,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Qy.displayName=ML.displayName;var Zy=qn.forwardRef(({className:e,...t},r)=>(0,kr.jsx)(EL,{ref:r,className:P("moonui-theme","text-sm opacity-90",e),...t}));Zy.displayName=EL.displayName;var mee=5,gee=1e6,NL=new Map,zz=e=>{if(NL.has(e))return;let t=setTimeout(()=>{NL.delete(e),tg({type:"REMOVE_TOAST",toastId:e})},gee);NL.set(e,t)},hee=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,mee)};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?zz(r):e.toasts.forEach(o=>{zz(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}},qy=[],$y={toasts:[]},vee=0;function tg(e){$y=hee($y,e),qy.forEach(t=>{t($y)})}function _L({...e}){let t=`toast-${Date.now()}-${++vee}`,r=n=>tg({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>tg({type:"DISMISS_TOAST",toastId:t});return tg({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function VL(){let[e,t]=qn.useState($y);return qn.useEffect(()=>(qy.push(t),()=>{let r=qy.indexOf(t);r>-1&&qy.splice(r,1)}),[e]),{...e,toast:_L,dismiss:r=>tg({type:"DISMISS_TOAST",toastId:r})}}function Gz(){let{toasts:e}=VL();return(0,kr.jsxs)(OL,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,kr.jsxs)(Xy,{variant:a,open:i,onOpenChange:s,...l,children:[(0,kr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,kr.jsx)(Qy,{children:r}),o&&(0,kr.jsx)(Zy,{children:o})]}),n,(0,kr.jsx)(Yy,{})]},t)}),(0,kr.jsx)(Ky,{})]})}var Wz=b(M());var jz=b(D()),BL=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"}}),HL=Wz.forwardRef(({className:e,size:t,children:r,...o},n)=>(0,jz.jsx)("kbd",{ref:n,className:P("moonui-theme",BL({size:t}),e),...o,children:r}));HL.displayName="Kbd";var nn=b(M());var Mo=b(D()),UL=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"}}),xee={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},zL=nn.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=xee[l??"md"],m=i==="half"?.5:1,g=t!==void 0,[x,v]=nn.useState(r??0),h=g?t??0:x,[y,w]=nn.useState(null),C=y!==null?y:h,S=nn.useCallback(T=>{a||(g||v(T),o?.(T))},[a,g,o]),R=nn.useCallback(T=>{if(a)return;let k=null;switch(T.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}T.preventDefault(),S(k)},[a,n,h,m,S]),I=T=>{if(nn.isValidElement(s)){let k=s;return nn.cloneElement(k,{className:P(p,"shrink-0",T&&"fill-current",k.props?.className)})}return(0,Mo.jsx)(Wi,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:n},(T,k)=>k+1);return(0,Mo.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(UL({size:l}),e),...c,children:L.map(T=>{let k=Math.max(0,Math.min(1,C-(T-1))),E=T-.5;return(0,Mo.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,Mo.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,Mo.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,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)("button",{type:"button",role:"radio","aria-checked":h===E,"aria-label":`${E} stars`,tabIndex:-1,onClick:()=>S(E),onMouseEnter:()=>w(E),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,Mo.jsx)("button",{type:"button",role:"radio","aria-checked":h===T,"aria-label":`${T} stars`,tabIndex:-1,onClick:()=>S(T),onMouseEnter:()=>w(T),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,Mo.jsx)("button",{type:"button",role:"radio","aria-checked":h===T,"aria-label":`${T} ${T===1?"star":"stars"}`,tabIndex:-1,onClick:()=>S(T),onMouseEnter:()=>w(T),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},T)})})});zL.displayName="Rating";var qz=b(M());var iu=b(D()),GL=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"}}),yee={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},WL=qz.forwardRef(({className:e,size:t,variant:r="default",label:o="Loading",...n},a)=>(0,iu.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[r==="dots"?(0,iu.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,iu.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",yee[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,iu.jsx)("span",{className:P(GL({size:t})),"aria-hidden":"true"}),(0,iu.jsx)("span",{className:"sr-only",children:o})]}));WL.displayName="Spinner";var Ns=b(M());var $z=b(D()),jL=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}}),qL=Ns.forwardRef(({className:e,orientation:t,attached:r,size:o,variant:n,children:a,...i},s)=>{let u=o!==void 0||n!==void 0?Ns.Children.map(a,c=>{if(!Ns.isValidElement(c)||c.type!==Ee)return c;let d=c.props;return Ns.cloneElement(c,{size:d.size??o,variant:d.variant??n})}):a;return(0,$z.jsx)("div",{ref:s,role:"group",className:P(jL({orientation:t,attached:r}),e),...i,children:u})});qL.displayName="ButtonGroup";var uu=b(M());var jr=b(M(),1);var sn=b(M(),1),$L=b(D(),1),wee=Object.defineProperty,an=(e,t)=>wee(e,"name",{value:t,configurable:!0});function Cee(e,t){let r=sn.createContext(t);r.displayName=e+"Context";let o=an(a=>{let{children:i,...s}=a,l=sn.useMemo(()=>s,Object.values(s));return(0,$L.jsx)(r.Provider,{value:l,children:i})},"Provider");o.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=sn.useContext(r);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return an(n,"useContext"),[o,n]}an(Cee,"createContext");function xi(e,t=[]){let r=[];function o(a,i){let s=sn.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=an(d=>{let{scope:f,children:p,...m}=d,g=f?.[e]?.[l]||s,x=sn.useMemo(()=>m,Object.values(m));return(0,$L.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=sn.useContext(g);if(x)return x;if(i!==void 0)return i;if(!m)throw new Error(`\`${d}\` must be used within \`${a}\``)}return an(c,"useContext"),[u,c]}an(o,"createContext");let n=an(()=>{let a=r.map(i=>sn.createContext(i));return an(function(s){let l=s?.[e]||a;return sn.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[o,Kz(n,...t)]}an(xi,"createContextScope");function Kz(...e){let t=e[0];if(e.length===1)return t;let r=an(()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return an(function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return sn.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return r.scopeName=t.scopeName,r}an(Kz,"composeContextScopes");var o4=b(M(),1),n4=b(Va(),1);var Lt=b(M(),1);var Xz=b(M(),1),See=Object.defineProperty,XL=(e,t)=>See(e,"name",{value:t,configurable:!0});function KL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}XL(KL,"setRef");function Yz(...e){return t=>{let r=!1,o=e.map(n=>{let a=KL(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():KL(e[n],null)}}}}XL(Yz,"composeRefs");function ln(...e){return Xz.useCallback(Yz(...e),e)}XL(ln,"useComposedRefs");var hd=!1;var Iee=b(D(),1),bee=Object.defineProperty,un=(e,t)=>bee(e,"name",{value:t,configurable:!0}),Ree=un((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";hd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=Qz(a,n))}return{...e,...r}},"mergeProps");function Qz(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}un(Qz,"concatAriaDescribedby");var Zz=Lt.createContext(Ree);Zz.displayName="SlotContext";function yi(e){let t=Lt.forwardRef((r,o)=>{let n=Lt.useContext(Zz),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];YL(a)&&typeof Jy=="function"&&(a=Jy(a._payload)),Lt.Children.forEach(a,m=>{if(t4(m)){u=!0;let g=m,x="child"in g.props?g.props.child:g.props.children;YL(x)&&typeof Jy=="function"&&(x=Jy(x._payload)),l=Lee(g,x),c.push(l?.props?.children)}else c.push(m)}),l?l=Lt.cloneElement(l,void 0,c):!u&&Lt.Children.count(a)===1&&Lt.isValidElement(a)&&(l=a);let d=l?e4(l):void 0,f=ln(o,d);if(!l){if(a||a===0)throw new Error(u?Mee(e):kee(e));return a}let p=i(s,l.props??{});return l.type!==Lt.Fragment&&(p.ref=o?f:d),Lt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}un(yi,"createSlot");var Jz=Symbol.for("radix.slottable");function Pee(e){let t=un(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Jz,t}un(Pee,"createSlottable");var Lee=un((e,t)=>{if("child"in e.props){let r=e.props.child;return Lt.isValidElement(r)?Lt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Lt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function e4(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)}un(e4,"getElementRef");function t4(e){return Lt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jz}un(t4,"isSlottable");var Tee=Symbol.for("react.lazy");function YL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Tee&&"_payload"in e&&r4(e._payload)}un(YL,"isLazyComponent");function r4(e){return typeof e=="object"&&e!==null&&"then"in e}un(r4,"isPromiseLike");var kee=un(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Mee=un(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Jy=Lt[" use ".trim().toString()];var a4=b(D(),1),Eee=Object.defineProperty,Aee=(e,t)=>Eee(e,"name",{value:t,configurable:!0}),Dee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vd=Dee.reduce((e,t)=>{let r=yi(`Primitive.${t}`),o=o4.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,a4.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Nee(e,t){e&&n4.flushSync(()=>e.dispatchEvent(t))}Aee(Nee,"dispatchDiscreteCustomEvent");var er=b(M(),1);var Oee=Object.defineProperty,xd=(e,t)=>Oee(e,"name",{value:t,configurable:!0}),i4=!!(typeof window<"u"&&window.document&&window.document.createElement);function Os(e,t,{checkForDefaultPrevented:r=!0}={}){return xd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}xd(Os,"composeEventHandlers");function Fee(e){if(!i4)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}xd(Fee,"getOwnerWindow");function QL(e){if(!i4)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}xd(QL,"getOwnerDocument");function s4(e,t=!1){let{activeElement:r}=QL(e);if(!r?.nodeName)return null;if(l4(r)&&r.contentDocument)return s4(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=QL(r).getElementById(o);if(n)return n}}return r}xd(s4,"getActiveElement");function l4(e){return e.tagName==="IFRAME"}xd(l4,"isFrame");var $n=b(M(),1);var e0=b(D(),1),lo=b(M(),1);var su=b(D(),1);var _ee=Object.defineProperty,Jt=(e,t)=>_ee(e,"name",{value:t,configurable:!0});function e1(e){let t=e+"CollectionProvider",[r,o]=xi(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=Jt(g=>{let{scope:x,children:v}=g,h=$n.useRef(null),y=$n.useRef(new Map).current;return(0,e0.jsx)(n,{scope:x,itemMap:y,collectionRef:h,children:v})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=yi(s),u=$n.forwardRef((g,x)=>{let{scope:v,children:h}=g,y=a(s,v),w=ln(x,y.collectionRef);return(0,e0.jsx)(l,{ref:w,children:h})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=yi(c),p=$n.forwardRef((g,x)=>{let{scope:v,children:h,...y}=g,w=$n.useRef(null),C=ln(x,w),S=a(c,v);return $n.useEffect(()=>(S.itemMap.set(w,{ref:w,...y}),()=>void S.itemMap.delete(w))),(0,e0.jsx)(f,{[d]:"",ref:C,children:h})});p.displayName=c;function m(g){let x=a(e+"CollectionConsumer",g);return $n.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 Jt(m,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},m,o]}Jt(e1,"createCollection");var u4=new WeakMap,Dt,cn,ZL=(cn=class extends Map{constructor(r){super(r);s0(this,Dt,void 0);ig(this,Dt,[...super.keys()]),u4.set(this,!0)}set(r,o){return u4.get(this)&&(this.has(r)?tr(this,Dt)[tr(this,Dt).indexOf(r)]=r:tr(this,Dt).push(r)),super.set(r,o),this}insert(r,o,n){let a=this.has(o),i=tr(this,Dt).length,s=t1(r),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(o,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...tr(this,Dt)],f,p=!1;for(let m=l;m<c;m++)if(l===m){let g=d[m];d[m]===o&&(g=d[m+1]),a&&this.delete(o),f=this.get(g),this.set(o,n)}else{!p&&d[m-1]===o&&(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(r,o,n){let a=new cn(this);return a.insert(r,o,n),a}before(r){let o=tr(this,Dt).indexOf(r)-1;if(!(o<0))return this.entryAt(o)}setBefore(r,o,n){let a=tr(this,Dt).indexOf(r);return a===-1?this:this.insert(a,o,n)}after(r){let o=tr(this,Dt).indexOf(r);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(r,o,n){let a=tr(this,Dt).indexOf(r);return a===-1?this:this.insert(a+1,o,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ig(this,Dt,[]),super.clear()}delete(r){let o=super.delete(r);return o&&tr(this,Dt).splice(tr(this,Dt).indexOf(r),1),o}deleteAt(r){let o=this.keyAt(r);return o!==void 0?this.delete(o):!1}at(r){let o=t0(tr(this,Dt),r);if(o!==void 0)return this.get(o)}entryAt(r){let o=t0(tr(this,Dt),r);if(o!==void 0)return[o,this.get(o)]}indexOf(r){return tr(this,Dt).indexOf(r)}keyAt(r){return t0(tr(this,Dt),r)}from(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return a;n++}}findIndex(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return n;n++}return-1}filter(r,o){let n=[],a=0;for(let i of this)Reflect.apply(r,o,[i,a,this])&&n.push(i),a++;return new cn(n)}map(r,o){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(r,o,[i,a,this])]),a++;return new cn(n)}reduce(...r){let[o,n]=r,a=0,i=n??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(o,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[o,n]=r,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(o,this,[a,s,i,this])}return a}toSorted(r){let o=[...this.entries()].sort(r);return new cn(o)}toReversed(){let r=new cn;for(let o=this.size-1;o>=0;o--){let n=this.keyAt(o),a=this.get(n);r.set(n,a)}return r}toSpliced(...r){let o=[...this.entries()];return o.splice(...r),new cn(o)}slice(r,o){let n=new cn,a=this.size-1;if(r===void 0)return n;r<0&&(r=r+this.size),o!==void 0&&o>0&&(a=o-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(r,o){let n=0;for(let a of this){if(!Reflect.apply(r,o,[a,n,this]))return!1;n++}return!0}some(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return!0;n++}return!1}},Dt=new WeakMap,Jt(cn,"OrderedDict"),cn);function t0(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=c4(e,t);return r===-1?void 0:e[r]}Jt(t0,"at");function c4(e,t){let r=e.length,o=t1(t),n=o>=0?o:r+o;return n<0||n>=r?-1:n}Jt(c4,"toSafeIndex");function t1(e){return e!==e||e===0?0:Math.trunc(e)}Jt(t1,"toSafeInteger");function Vee(e){let t=e+"CollectionProvider",[r,o]=xi(t),[n,a]=r(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new ZL,setItemMap:Jt(()=>{},"setItemMap")}),i=Jt(({state:y,...w})=>y?(0,su.jsx)(l,{...w,state:y}):(0,su.jsx)(s,{...w}),"CollectionProvider");i.displayName=t;let s=Jt(y=>{let w=x();return(0,su.jsx)(l,{...y,state:w})},"CollectionInit");s.displayName=t+"Init";let l=Jt(y=>{let{scope:w,children:C,state:S}=y,R=lo.useRef(null),[I,L]=lo.useState(null),T=ln(R,L),[k,E]=S;return lo.useEffect(()=>{if(!I)return;let F=p4(()=>{});return F.observe(I,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[I]),(0,su.jsx)(n,{scope:w,itemMap:k,setItemMap:E,collectionRef:T,collectionRefObject:R,collectionElement:I,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=yi(u),d=lo.forwardRef((y,w)=>{let{scope:C,children:S}=y,R=a(u,C),I=ln(w,R.collectionRef);return(0,su.jsx)(c,{ref:I,children:S})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",m=yi(f),g=lo.forwardRef((y,w)=>{let{scope:C,children:S,...R}=y,I=lo.useRef(null),[L,T]=lo.useState(null),k=ln(w,I,T),E=a(f,C),{setItemMap:F}=E,N=lo.useRef(R);d4(N.current,R)||(N.current=R);let B=N.current;return lo.useEffect(()=>{let O=B;return F(_=>L?_.has(L)?_.set(L,{...O,element:L}).toSorted(JL):(_.set(L,{...O,element:L}),_.toSorted(JL)):_),()=>{F(_=>!L||!_.has(L)?_:(_.delete(L),new ZL(_)))}},[L,B,F]),(0,su.jsx)(m,{[p]:"",ref:k,children:S})});g.displayName=f;function x(){return lo.useState(new ZL)}Jt(x,"useInitCollection");function v(y){let{itemMap:w}=a(e+"CollectionConsumer",y);return w}return Jt(v,"useCollection"),[{Provider:i,Slot:d,ItemSlot:g},{createCollectionScope:o,useCollection:v,useInitCollection:x}]}Jt(Vee,"createCollection");function d4(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}Jt(d4,"shallowEqual");function f4(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Jt(f4,"isElementPreceding");function JL(e,t){return!e[1].element||!t[1].element?0:f4(e[1].element,t[1].element)?-1:1}Jt(JL,"sortByDocumentPosition");function p4(e){return new MutationObserver(r=>{for(let o of r)if(o.type==="childList"){e();return}})}Jt(p4,"getChildListObserver");var r1=b(M(),1);var m4=b(M(),1),Fs=globalThis?.document?m4.useLayoutEffect:()=>{};var Bee=Object.defineProperty,Hee=(e,t)=>Bee(e,"name",{value:t,configurable:!0}),Uee=r1[" useId ".trim().toString()]||(()=>{}),zee=0;function o1(e){let[t,r]=r1.useState(Uee());return Fs(()=>{e||r(o=>o??String(zee++))},[e]),e||(t?`radix-${t}`:"")}Hee(o1,"useId");var yd=b(M(),1),Gee=Object.defineProperty,Wee=(e,t)=>Gee(e,"name",{value:t,configurable:!0});function n1(e){let t=yd.useRef(e);return yd.useEffect(()=>{t.current=e}),yd.useMemo(()=>(...r)=>t.current?.(...r),[])}Wee(n1,"useCallbackRef");var dn=b(M(),1);var Kn=b(M(),1);var wd=b(M(),1),jee=Object.defineProperty,qee=(e,t)=>jee(e,"name",{value:t,configurable:!0}),g4=wd[" useEffectEvent ".trim().toString()],h4=wd[" useInsertionEffect ".trim().toString()];function a1(e){if(typeof g4=="function")return g4(e);let t=wd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof h4=="function"?h4(()=>{t.current=e}):Fs(()=>{t.current=e}),wd.useMemo(()=>(...r)=>t.current?.(...r),[])}qee(a1,"useEffectEvent");var $ee=Object.defineProperty,rg=(e,t)=>$ee(e,"name",{value:t,configurable:!0}),Kee=dn[" useInsertionEffect ".trim().toString()]||Fs;function Cd({prop:e,defaultProp:t,onChange:r=rg(()=>{},"onChange"),caller:o}){let[n,a,i]=x4({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(hd){let c=dn.useRef(e!==void 0);dn.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=dn.useCallback(c=>{if(s){let d=y4(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}rg(Cd,"useControllableState");function x4({defaultProp:e,onChange:t}){let[r,o]=dn.useState(e),n=dn.useRef(r),a=dn.useRef(t);return Kee(()=>{a.current=t},[t]),dn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}rg(x4,"useUncontrolledState");function y4(e){return typeof e=="function"}rg(y4,"isFunction");var v4=Symbol("RADIX:SYNC_STATE");function Xee(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=a1(i);if(hd){let x=Kn.useRef(n!==void 0);Kn.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=[{...r,state:a}];o&&c.push(o);let[d,f]=Kn.useReducer((x,v)=>{if(v.type===v4)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=Kn.useRef(p);Kn.useEffect(()=>{m.current!==p&&(m.current=p,l||u(p))},[p,m,l]);let g=Kn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Kn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:v4,state:n})},[n,d.state,l]),[g,f]}rg(Xee,"useControllableStateReducer");var r0=b(M(),1),Zee=b(D(),1),Yee=Object.defineProperty,Qee=(e,t)=>Yee(e,"name",{value:t,configurable:!0}),Jee=r0.createContext(void 0);function og(e){let t=r0.useContext(Jee);return e||t||"ltr"}Qee(og,"useDirection");var tte=b(M(),1),o0=b(M(),1),ete=Object.defineProperty,s1=(e,t)=>ete(e,"name",{value:t,configurable:!0}),i1=!1;function w4(){let[e,t]=o0.useState(i1);return o0.useEffect(()=>{i1||(i1=!0,t(!0))},[]),e}s1(w4,"useIsHydrated");var C4=tte[" useSyncExternalStore ".trim().toString()];function S4(){return()=>{}}s1(S4,"subscribe");function b4(){return C4(S4,()=>!0,()=>!1)}s1(b4,"useIsHydratedModern");var R4=typeof C4=="function"?b4:w4;var _s=b(D(),1),rte=Object.defineProperty,lu=(e,t)=>rte(e,"name",{value:t,configurable:!0}),l1="rovingFocusGroup.onEntryFocus",ote={bubbles:!1,cancelable:!0},n0="RovingFocusGroup",[u1,I4,nte]=e1(n0),[ate,c1]=xi(n0,[nte]),[ite,ste]=ate(n0),P4=er.forwardRef(lu(function(t,r){return(0,_s.jsx)(u1.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,_s.jsx)(u1.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,_s.jsx)(lte,{...t,ref:r})})})},"RovingFocusGroup")),lte=er.forwardRef(lu(function(t,r){let{__scopeRovingFocusGroup:o,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=er.useRef(null),m=ln(r,p),g=og(i),[x,v]=Cd({prop:s,defaultProp:l??null,onChange:u,caller:n0}),[h,y]=er.useState(!1),w=n1(c),C=I4(o),S=er.useRef(!1),[R,I]=er.useState(0);return er.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(l1,w),()=>L.removeEventListener(l1,w)},[w]),(0,_s.jsx)(ite,{scope:o,orientation:n,dir:g,loop:a,currentTabStopId:x,onItemFocus:er.useCallback(L=>v(L),[v]),onItemShiftTab:er.useCallback(()=>y(!0),[]),onFocusableItemAdd:er.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:er.useCallback(()=>I(L=>L-1),[]),children:(0,_s.jsx)(vd.div,{tabIndex:h||R===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:Os(t.onMouseDown,()=>{S.current=!0}),onFocus:Os(t.onFocus,L=>{let T=!S.current;if(L.target===L.currentTarget&&T&&!h){let k=new CustomEvent(l1,ote);if(L.currentTarget.dispatchEvent(k),!k.defaultPrevented){let E=C().filter(_=>_.focusable),F=E.find(_=>_.active),N=E.find(_=>_.id===x),O=[F,N,...E].filter(Boolean).map(_=>_.ref.current);d1(O,d)}}S.current=!1}),onBlur:Os(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),ute="RovingFocusGroupItem",L4=er.forwardRef(lu(function(t,r){let{__scopeRovingFocusGroup:o,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=o1(),c=i||u,d=ste(ute,o),f=d.currentTabStopId===c,p=I4(o),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:x}=d,v=R4();return Fs(()=>{if(!(!v||!n))return m(),()=>g()},[v,n,m,g]),er.useEffect(()=>{if(!(v||!n))return m(),()=>g()},[v,n,m,g]),(0,_s.jsx)(u1.ItemSlot,{scope:o,id:c,focusable:n,active:a,children:(0,_s.jsx)(vd.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:r,onMouseDown:Os(t.onMouseDown,h=>{n?d.onItemFocus(c):h.preventDefault()}),onFocus:Os(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:Os(t.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let y=k4(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?M4(C,S+1):C.slice(S+1)}setTimeout(()=>d1(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),cte={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}lu(T4,"getDirectionAwareKey");function k4(e,t,r){let o=T4(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return cte[o]}lu(k4,"getFocusIntent");function d1(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}lu(d1,"focusFirst");function M4(e,t){return e.map((r,o)=>e[(t+o)%e.length])}lu(M4,"wrapArray");var Wr=b(D(),1),fte=Object.defineProperty,Vs=(e,t)=>fte(e,"name",{value:t,configurable:!0}),Sd="ToggleGroup",[A4,sNe]=xi(Sd,[c1]),D4=c1(),N4=jr.forwardRef(Vs(function(t,r){let{type:o,...n}=t;if(o==="single")return(0,Wr.jsx)(pte,{role:"radiogroup",...n,ref:r});if(o==="multiple")return(0,Wr.jsx)(mte,{role:"toolbar",...n,ref:r});throw new Error(`Missing prop \`type\` expected on \`${Sd}\``)},"ToggleGroup")),[O4,F4]=A4(Sd),pte=jr.forwardRef(Vs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=Vs(()=>{},"onValueChange"),...i}=t,[s,l]=Cd({prop:o,defaultProp:n??"",onChange:a,caller:Sd});return(0,Wr.jsx)(O4,{scope:t.__scopeToggleGroup,type:"single",value:jr.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:jr.useCallback(()=>l(""),[l]),children:(0,Wr.jsx)(_4,{...i,ref:r})})},"ToggleGroupImplSingle")),mte=jr.forwardRef(Vs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=Vs(()=>{},"onValueChange"),...i}=t,[s,l]=Cd({prop:o,defaultProp:n??[],onChange:a,caller:Sd}),u=jr.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=jr.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,Wr.jsx)(O4,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,Wr.jsx)(_4,{...i,ref:r})})},"ToggleGroupImplMultiple")),[gte,hte]=A4(Sd),_4=jr.forwardRef(Vs(function(t,r){let{__scopeToggleGroup:o,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=D4(o),d=og(s),f={dir:d,...u};return(0,Wr.jsx)(gte,{scope:o,rovingFocus:a,disabled:n,children:a?(0,Wr.jsx)(P4,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,Wr.jsx)(vd.div,{...f,ref:r})}):(0,Wr.jsx)(vd.div,{...f,ref:r})})},"ToggleGroupImpl")),f1="ToggleGroupItem",V4=jr.forwardRef(Vs(function(t,r){let o=F4(f1,t.__scopeToggleGroup),n=hte(f1,t.__scopeToggleGroup),a=D4(t.__scopeToggleGroup),i=o.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=jr.useRef(null);return n.rovingFocus?(0,Wr.jsx)(L4,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,Wr.jsx)(E4,{...l,ref:r})}):(0,Wr.jsx)(E4,{...l,ref:r})},"ToggleGroupItem")),E4=jr.forwardRef(Vs(function(t,r){let{__scopeToggleGroup:o,value:n,...a}=t,i=F4(f1,o),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,Wr.jsx)(jm,{...l,...a,ref:r,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var a0=b(D()),B4=uu.createContext({size:"default",variant:"default"}),p1=uu.forwardRef(({className:e,variant:t,size:r,children:o,...n},a)=>(0,a0.jsx)(N4,{ref:a,className:P("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...n,children:(0,a0.jsx)(B4.Provider,{value:{variant:t,size:r},children:o})}));p1.displayName="ToggleGroup";var m1=uu.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>{let i=uu.useContext(B4);return(0,a0.jsx)(V4,{ref:a,className:P(qm({variant:i.variant??r,size:i.size??o}),e),...n,children:t})});m1.displayName="ToggleGroupItem";
|
|
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
|
+
|
|
88
110
|
scheduler/cjs/scheduler.production.min.js:
|
|
89
111
|
(**
|
|
90
112
|
* @license React
|