function NR(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function Tx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ts(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Cx={exports:{}},ud={},Ox={exports:{}},rt={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Cs=Symbol.for("react.element"),jR=Symbol.for("react.portal"),AR=Symbol.for("react.fragment"),MR=Symbol.for("react.strict_mode"),IR=Symbol.for("react.profiler"),DR=Symbol.for("react.provider"),LR=Symbol.for("react.context"),FR=Symbol.for("react.forward_ref"),VR=Symbol.for("react.suspense"),zR=Symbol.for("react.memo"),BR=Symbol.for("react.lazy"),Am=Symbol.iterator;function WR(e){return e===null||typeof e!="object"?null:(e=Am&&e[Am]||e["@@iterator"],typeof e=="function"?e:null)}var Sx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Px=Object.assign,kx={};function Vi(e,t,r){this.props=e,this.context=t,this.refs=kx,this.updater=r||Sx}Vi.prototype.isReactComponent={};Vi.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")};Vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ex(){}Ex.prototype=Vi.prototype;function Ph(e,t,r){this.props=e,this.context=t,this.refs=kx,this.updater=r||Sx}var kh=Ph.prototype=new Ex;kh.constructor=Ph;Px(kh,Vi.prototype);kh.isPureReactComponent=!0;var Mm=Array.isArray,Rx=Object.prototype.hasOwnProperty,Eh={current:null},Nx={key:!0,ref:!0,__self:!0,__source:!0};function jx(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Rx.call(t,n)&&!Nx.hasOwnProperty(n)&&(o[n]=t[n]);var c=arguments.length-2;if(c===1)o.children=r;else if(1>>1,Q=U[K];if(0>>1;Ko(ae,H))neo(me,ae)?(U[K]=me,U[ne]=H,K=ne):(U[K]=ae,U[se]=H,K=se);else if(neo(me,H))U[K]=me,U[ne]=H,K=ne;else break e}}return B}function o(U,B){var H=U.sortIndex-B.sortIndex;return H!==0?H:U.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var p=[],g=[],v=1,_=null,O=3,C=!1,T=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u(U){for(var B=r(g);B!==null;){if(B.callback===null)n(g);else if(B.startTime<=U)n(g),B.sortIndex=B.expirationTime,t(p,B);else break;B=r(g)}}function s(U){if(x=!1,u(U),!T)if(r(p)!==null)T=!0,G(h);else{var B=r(g);B!==null&&X(s,B.startTime-U)}}function h(U,B){T=!1,x&&(x=!1,d(E),E=-1),C=!0;var H=O;try{for(u(B),_=r(p);_!==null&&(!(_.expirationTime>B)||U&&!N());){var K=_.callback;if(typeof K=="function"){_.callback=null,O=_.priorityLevel;var Q=K(_.expirationTime<=B);B=e.unstable_now(),typeof Q=="function"?_.callback=Q:_===r(p)&&n(p),u(B)}else n(p);_=r(p)}if(_!==null)var oe=!0;else{var se=r(g);se!==null&&X(s,se.startTime-B),oe=!1}return oe}finally{_=null,O=H,C=!1}}var m=!1,w=null,E=-1,k=5,P=-1;function N(){return!(e.unstable_now()-PU||125K?(U.sortIndex=H,t(g,U),r(p)===null&&U===r(g)&&(x?(d(E),E=-1):x=!0,X(s,H-K))):(U.sortIndex=Q,t(p,U),T||C||(T=!0,G(h))),U},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(U){var B=O;return function(){var H=O;O=B;try{return U.apply(this,arguments)}finally{O=H}}}})(Dx);Ix.exports=Dx;var ZR=Ix.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Lx=A,Vr=ZR;function ye(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kp=Object.prototype.hasOwnProperty,eN=/^[: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]*$/,Dm={},Lm={};function tN(e){return Kp.call(Lm,e)?!0:Kp.call(Dm,e)?!1:eN.test(e)?Lm[e]=!0:(Dm[e]=!0,!1)}function rN(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nN(e,t,r,n){if(t===null||typeof t>"u"||rN(e,t,r,n))return!0;if(n)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 mr(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var or={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){or[e]=new mr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];or[t]=new mr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){or[e]=new mr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){or[e]=new mr(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){or[e]=new mr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){or[e]=new mr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){or[e]=new mr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){or[e]=new mr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){or[e]=new mr(e,5,!1,e.toLowerCase(),null,!1,!1)});var jh=/[\-:]([a-z])/g;function Ah(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(jh,Ah);or[t]=new mr(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(jh,Ah);or[t]=new mr(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(jh,Ah);or[t]=new mr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){or[e]=new mr(e,1,!1,e.toLowerCase(),null,!1,!1)});or.xlinkHref=new mr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){or[e]=new mr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mh(e,t,r,n){var o=or.hasOwnProperty(t)?or[t]:null;(o!==null?o.type!==0:n||!(2c||o[i]!==a[c]){var p=` `+o[i].replace(" at new "," at ");return e.displayName&&p.includes("")&&(p=p.replace("",e.displayName)),p}while(1<=i&&0<=c);break}}}finally{Gf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pl(e):""}function oN(e){switch(e.tag){case 5:return Pl(e.type);case 16:return Pl("Lazy");case 13:return Pl("Suspense");case 19:return Pl("SuspenseList");case 0:case 2:case 15:return e=Kf(e.type,!1),e;case 11:return e=Kf(e.type.render,!1),e;case 1:return e=Kf(e.type,!0),e;default:return""}}function Jp(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 Za:return"Fragment";case Ja:return"Portal";case Yp:return"Profiler";case Ih:return"StrictMode";case Xp:return"Suspense";case Qp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zx:return(e.displayName||"Context")+".Consumer";case Vx:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lh:return t=e.displayName||null,t!==null?t:Jp(e.type)||"Memo";case So:t=e._payload,e=e._init;try{return Jp(e(t))}catch{}}return null}function aN(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 Jp(t);case 8:return t===Ih?"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 $o(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function iN(e){var t=Wx(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function su(e){e._valueTracker||(e._valueTracker=iN(e))}function Hx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Wx(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function fc(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 Zp(e,t){var r=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Vm(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=$o(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ux(e,t){t=t.checked,t!=null&&Mh(e,"checked",t,!1)}function e0(e,t){Ux(e,t);var r=$o(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?t0(e,t.type,r):t.hasOwnProperty("defaultValue")&&t0(e,t.type,$o(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zm(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="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 t0(e,t,r){(t!=="number"||fc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var kl=Array.isArray;function fi(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=uu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Il={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},lN=["Webkit","ms","Moz","O"];Object.keys(Il).forEach(function(e){lN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Il[t]=Il[e]})});function Kx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Il.hasOwnProperty(e)&&Il[e]?(""+t).trim():t+"px"}function Yx(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=Kx(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var sN=Lt({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 o0(e,t){if(t){if(sN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ye(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ye(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ye(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ye(62))}}function a0(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 i0=null;function Fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var l0=null,pi=null,hi=null;function Hm(e){if(e=Ps(e)){if(typeof l0!="function")throw Error(ye(280));var t=e.stateNode;t&&(t=hd(t),l0(e.stateNode,e.type,t))}}function Xx(e){pi?hi?hi.push(e):hi=[e]:pi=e}function Qx(){if(pi){var e=pi,t=hi;if(hi=pi=null,Hm(e),t)for(e=0;e>>=0,e===0?32:31-(yN(e)/wN|0)|0}var cu=64,du=4194304;function El(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 bc(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var c=i&~o;c!==0?n=El(c):(a&=i,a!==0&&(n=El(a)))}else i=r&~o,i!==0?n=El(i):a!==0&&(n=El(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Os(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=r}function CN(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 n=e.eventTimes;for(e=e.expirationTimes;0=Ll),Jm=String.fromCharCode(32),Zm=!1;function v_(e,t){switch(e){case"keyup":return JN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ei=!1;function ej(e,t){switch(e){case"compositionend":return m_(t);case"keypress":return t.which!==32?null:(Zm=!0,Jm);case"textInput":return e=t.data,e===Jm&&Zm?null:e;default:return null}}function tj(e,t){if(ei)return e==="compositionend"||!qh&&v_(e,t)?(e=g_(),Fu=Hh=No=null,ei=!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)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ny(r)}}function __(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?__(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T_(){for(var e=window,t=fc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fc(e.document)}return t}function Gh(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 cj(e){var t=T_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&__(r.ownerDocument.documentElement,r)){if(n!==null&&Gh(r)){if(t=n.start,e=n.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 o=r.textContent.length,a=Math.min(n.start,o);n=n.end===void 0?a:Math.min(n.end,o),!e.extend&&a>n&&(o=n,n=a,a=o),o=oy(r,a);var i=oy(r,n);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>n?(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=document.documentMode,ti=null,p0=null,Vl=null,h0=!1;function ay(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;h0||ti==null||ti!==fc(n)||(n=ti,"selectionStart"in n&&Gh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Vl&&rs(Vl,n)||(Vl=n,n=yc(p0,"onSelect"),0oi||(e.current=w0[oi],w0[oi]=null,oi--)}function wt(e,t){oi++,w0[oi]=e.current,e.current=t}var qo={},fr=Yo(qo),Pr=Yo(!1),wa=qo;function Oi(e,t){var r=e.type.contextTypes;if(!r)return qo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function kr(e){return e=e.childContextTypes,e!=null}function xc(){Tt(Pr),Tt(fr)}function fy(e,t,r){if(fr.current!==qo)throw Error(ye(168));wt(fr,t),wt(Pr,r)}function j_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ye(108,aN(e)||"Unknown",o));return Lt({},r,n)}function _c(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qo,wa=fr.current,wt(fr,e),wt(Pr,Pr.current),!0}function py(e,t,r){var n=e.stateNode;if(!n)throw Error(ye(169));r?(e=j_(e,t,wa),n.__reactInternalMemoizedMergedChildContext=e,Tt(Pr),Tt(fr),wt(fr,e)):Tt(Pr),wt(Pr,r)}var Un=null,gd=!1,sp=!1;function A_(e){Un===null?Un=[e]:Un.push(e)}function _j(e){gd=!0,A_(e)}function Xo(){if(!sp&&Un!==null){sp=!0;var e=0,t=gt;try{var r=Un;for(gt=1;e>=i,o-=i,$n=1<<32-vn(t)+o|r<E?(k=w,w=null):k=w.sibling;var P=O(d,w,u[E],s);if(P===null){w===null&&(w=k);break}e&&w&&P.alternate===null&&t(d,w),l=a(P,l,E),m===null?h=P:m.sibling=P,m=P,w=k}if(E===u.length)return r(d,w),kt&&ca(d,E),h;if(w===null){for(;EE?(k=w,w=null):k=w.sibling;var N=O(d,w,P.value,s);if(N===null){w===null&&(w=k);break}e&&w&&N.alternate===null&&t(d,w),l=a(N,l,E),m===null?h=N:m.sibling=N,m=N,w=k}if(P.done)return r(d,w),kt&&ca(d,E),h;if(w===null){for(;!P.done;E++,P=u.next())P=_(d,P.value,s),P!==null&&(l=a(P,l,E),m===null?h=P:m.sibling=P,m=P);return kt&&ca(d,E),h}for(w=n(d,w);!P.done;E++,P=u.next())P=C(w,d,E,P.value,s),P!==null&&(e&&P.alternate!==null&&w.delete(P.key===null?E:P.key),l=a(P,l,E),m===null?h=P:m.sibling=P,m=P);return e&&w.forEach(function(j){return t(d,j)}),kt&&ca(d,E),h}function b(d,l,u,s){if(typeof u=="object"&&u!==null&&u.type===Za&&u.key===null&&(u=u.props.children),typeof u=="object"&&u!==null){switch(u.$$typeof){case lu:e:{for(var h=u.key,m=l;m!==null;){if(m.key===h){if(h=u.type,h===Za){if(m.tag===7){r(d,m.sibling),l=o(m,u.props.children),l.return=d,d=l;break e}}else if(m.elementType===h||typeof h=="object"&&h!==null&&h.$$typeof===So&&wy(h)===m.type){r(d,m.sibling),l=o(m,u.props),l.ref=yl(d,m,u),l.return=d,d=l;break e}r(d,m);break}else t(d,m);m=m.sibling}u.type===Za?(l=ma(u.props.children,d.mode,s,u.key),l.return=d,d=l):(s=qu(u.type,u.key,u.props,null,d.mode,s),s.ref=yl(d,l,u),s.return=d,d=s)}return i(d);case Ja:e:{for(m=u.key;l!==null;){if(l.key===m)if(l.tag===4&&l.stateNode.containerInfo===u.containerInfo&&l.stateNode.implementation===u.implementation){r(d,l.sibling),l=o(l,u.children||[]),l.return=d,d=l;break e}else{r(d,l);break}else t(d,l);l=l.sibling}l=bp(u,d.mode,s),l.return=d,d=l}return i(d);case So:return m=u._init,b(d,l,m(u._payload),s)}if(kl(u))return T(d,l,u,s);if(hl(u))return x(d,l,u,s);mu(d,u)}return typeof u=="string"&&u!==""||typeof u=="number"?(u=""+u,l!==null&&l.tag===6?(r(d,l.sibling),l=o(l,u),l.return=d,d=l):(r(d,l),l=gp(u,d.mode,s),l.return=d,d=l),i(d)):r(d,l)}return b}var Pi=B_(!0),W_=B_(!1),ks={},In=Yo(ks),is=Yo(ks),ls=Yo(ks);function ha(e){if(e===ks)throw Error(ye(174));return e}function rg(e,t){switch(wt(ls,t),wt(is,e),wt(In,ks),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:n0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=n0(t,e)}Tt(In),wt(In,t)}function ki(){Tt(In),Tt(is),Tt(ls)}function H_(e){ha(ls.current);var t=ha(In.current),r=n0(t,e.type);t!==r&&(wt(is,e),wt(In,r))}function ng(e){is.current===e&&(Tt(In),Tt(is))}var At=Yo(0);function kc(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 up=[];function og(){for(var e=0;er?r:4,e(!0);var n=cp.transition;cp.transition={};try{e(!1),t()}finally{gt=r,cp.transition=n}}function a1(){return an().memoizedState}function Sj(e,t,r){var n=zo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},i1(e))l1(t,r);else if(r=L_(e,t,r,n),r!==null){var o=br();mn(r,e,n,o),s1(r,t,n)}}function Pj(e,t,r){var n=zo(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(i1(e))l1(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,c=a(i,r);if(o.hasEagerState=!0,o.eagerState=c,xn(c,i)){var p=t.interleaved;p===null?(o.next=o,eg(t)):(o.next=p.next,p.next=o),t.interleaved=o;return}}catch{}finally{}r=L_(e,t,o,n),r!==null&&(o=br(),mn(r,e,n,o),s1(r,t,n))}}function i1(e){var t=e.alternate;return e===It||t!==null&&t===It}function l1(e,t){zl=Ec=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function s1(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zh(e,r)}}var Rc={readContext:on,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},kj={readContext:on,useCallback:function(e,t){return jn().memoizedState=[e,t===void 0?null:t],e},useContext:on,useEffect:_y,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wu(4194308,4,e1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wu(4,2,e,t)},useMemo:function(e,t){var r=jn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=jn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Sj.bind(null,It,e),[n.memoizedState,e]},useRef:function(e){var t=jn();return e={current:e},t.memoizedState=e},useState:xy,useDebugValue:ug,useDeferredValue:function(e){return jn().memoizedState=e},useTransition:function(){var e=xy(!1),t=e[0];return e=Oj.bind(null,e[1]),jn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=It,o=jn();if(kt){if(r===void 0)throw Error(ye(407));r=r()}else{if(r=t(),Zt===null)throw Error(ye(349));_a&30||q_(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,_y(K_.bind(null,n,a,e),[e]),n.flags|=2048,cs(9,G_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=jn(),t=Zt.identifierPrefix;if(kt){var r=qn,n=$n;r=(n&~(1<<32-vn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ss++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[An]=t,e[as]=n,v1(e,t,!1,!1),t.stateNode=e;e:{switch(i=a0(r,n),r){case"dialog":xt("cancel",e),xt("close",e),o=n;break;case"iframe":case"object":case"embed":xt("load",e),o=n;break;case"video":case"audio":for(o=0;oRi&&(t.flags|=128,n=!0,wl(a,!1),t.lanes=4194304)}else{if(!n)if(e=kc(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!kt)return lr(t),null}else 2*Vt()-a.renderingStartTime>Ri&&r!==1073741824&&(t.flags|=128,n=!0,wl(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=Vt(),t.sibling=null,r=At.current,wt(At,n?r&1|2:r&1),t):(lr(t),null);case 22:case 23:return gg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ar&1073741824&&(lr(t),t.subtreeFlags&6&&(t.flags|=8192)):lr(t),null;case 24:return null;case 25:return null}throw Error(ye(156,t.tag))}function Dj(e,t){switch(Yh(t),t.tag){case 1:return kr(t.type)&&xc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ki(),Tt(Pr),Tt(fr),og(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ng(t),null;case 13:if(Tt(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ye(340));Si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Tt(At),null;case 4:return ki(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return gg(),null;case 24:return null;default:return null}}var wu=!1,cr=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function si(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ft(e,t,n)}else r.current=null}function j0(e,t,r){try{r()}catch(n){Ft(e,t,n)}}var Ny=!1;function Fj(e,t){if(g0=vc,e=T_(),Gh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,c=-1,p=-1,g=0,v=0,_=e,O=null;t:for(;;){for(var C;_!==r||o!==0&&_.nodeType!==3||(c=i+o),_!==a||n!==0&&_.nodeType!==3||(p=i+n),_.nodeType===3&&(i+=_.nodeValue.length),(C=_.firstChild)!==null;)O=_,_=C;for(;;){if(_===e)break t;if(O===r&&++g===o&&(c=i),O===a&&++v===n&&(p=i),(C=_.nextSibling)!==null)break;_=O,O=_.parentNode}_=C}r=c===-1||p===-1?null:{start:c,end:p}}else r=null}r=r||{start:0,end:0}}else r=null;for(b0={focusedElem:e,selectionRange:r},vc=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var T=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(T!==null){var x=T.memoizedProps,b=T.memoizedState,d=t.stateNode,l=d.getSnapshotBeforeUpdate(t.elementType===t.type?x:dn(t.type,x),b);d.__reactInternalSnapshotBeforeUpdate=l}break;case 3:var u=t.stateNode.containerInfo;u.nodeType===1?u.textContent="":u.nodeType===9&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ye(163))}}catch(s){Ft(t,t.return,s)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return T=Ny,Ny=!1,T}function Bl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&j0(t,r,a)}o=o.next}while(o!==n)}}function md(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 n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function A0(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 w1(e){var t=e.alternate;t!==null&&(e.alternate=null,w1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[An],delete t[as],delete t[y0],delete t[wj],delete t[xj])),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 x1(e){return e.tag===5||e.tag===3||e.tag===4}function jy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||x1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function M0(e,t,r){var n=e.tag;if(n===5||n===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=wc));else if(n!==4&&(e=e.child,e!==null))for(M0(e,t,r),e=e.sibling;e!==null;)M0(e,t,r),e=e.sibling}function I0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(I0(e,t,r),e=e.sibling;e!==null;)I0(e,t,r),e=e.sibling}var rr=null,fn=!1;function _o(e,t,r){for(r=r.child;r!==null;)_1(e,t,r),r=r.sibling}function _1(e,t,r){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(cd,r)}catch{}switch(r.tag){case 5:cr||si(r,t);case 6:var n=rr,o=fn;rr=null,_o(e,t,r),rr=n,fn=o,rr!==null&&(fn?(e=rr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):rr.removeChild(r.stateNode));break;case 18:rr!==null&&(fn?(e=rr,r=r.stateNode,e.nodeType===8?lp(e.parentNode,r):e.nodeType===1&&lp(e,r),es(e)):lp(rr,r.stateNode));break;case 4:n=rr,o=fn,rr=r.stateNode.containerInfo,fn=!0,_o(e,t,r),rr=n,fn=o;break;case 0:case 11:case 14:case 15:if(!cr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&j0(r,t,i),o=o.next}while(o!==n)}_o(e,t,r);break;case 1:if(!cr&&(si(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(c){Ft(r,t,c)}_o(e,t,r);break;case 21:_o(e,t,r);break;case 22:r.mode&1?(cr=(n=cr)||r.memoizedState!==null,_o(e,t,r),cr=n):_o(e,t,r);break;default:_o(e,t,r)}}function Ay(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Lj),t.forEach(function(n){var o=Gj.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function un(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=i),n&=~a}if(n=o,n=Vt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*zj(n/1960))-n,10e?16:e,jo===null)var n=!1;else{if(e=jo,jo=null,Ac=0,ut&6)throw Error(ye(331));var o=ut;for(ut|=4,Ne=e.current;Ne!==null;){var a=Ne,i=a.child;if(Ne.flags&16){var c=a.deletions;if(c!==null){for(var p=0;pVt()-pg?va(e,0):fg|=r),Er(e,t)}function R1(e,t){t===0&&(e.mode&1?(t=du,du<<=1,!(du&130023424)&&(du=4194304)):t=1);var r=br();e=Zn(e,t),e!==null&&(Os(e,t,r),Er(e,r))}function qj(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),R1(e,r)}function Gj(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ye(314))}n!==null&&n.delete(t),R1(e,r)}var N1;N1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pr.current)Or=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Or=!1,Mj(e,t,r);Or=!!(e.flags&131072)}else Or=!1,kt&&t.flags&1048576&&M_(t,Cc,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Hu(e,t),e=t.pendingProps;var o=Oi(t,fr.current);bi(t,r),o=ig(null,t,n,e,o,r);var a=lg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kr(n)?(a=!0,_c(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,tg(t),o.updater=bd,t.stateNode=o,o._reactInternals=t,O0(t,n,e,r),t=k0(null,t,n,!0,a,r)):(t.tag=0,kt&&a&&Kh(t),gr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Hu(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Yj(n),e=dn(n,e),o){case 0:t=P0(null,t,n,e,r);break e;case 1:t=ky(null,t,n,e,r);break e;case 11:t=Sy(null,t,n,e,r);break e;case 14:t=Py(null,t,n,dn(n.type,e),r);break e}throw Error(ye(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:dn(n,o),P0(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:dn(n,o),ky(e,t,n,o,r);case 3:e:{if(h1(t),e===null)throw Error(ye(387));n=t.pendingProps,a=t.memoizedState,o=a.element,F_(e,t),Pc(t,n,null,r);var i=t.memoizedState;if(n=i.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Ei(Error(ye(423)),t),t=Ey(e,t,n,r,o);break e}else if(n!==o){o=Ei(Error(ye(424)),t),t=Ey(e,t,n,r,o);break e}else for(Mr=Lo(t.stateNode.containerInfo.firstChild),Ir=t,kt=!0,hn=null,r=W_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Si(),n===o){t=eo(e,t,r);break e}gr(e,t,n,r)}t=t.child}return t;case 5:return H_(t),e===null&&_0(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,v0(n,o)?i=null:a!==null&&v0(n,a)&&(t.flags|=32),p1(e,t),gr(e,t,i,r),t.child;case 6:return e===null&&_0(t),null;case 13:return g1(e,t,r);case 4:return rg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Pi(t,null,n,r):gr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:dn(n,o),Sy(e,t,n,o,r);case 7:return gr(e,t,t.pendingProps,r),t.child;case 8:return gr(e,t,t.pendingProps.children,r),t.child;case 12:return gr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,wt(Oc,n._currentValue),n._currentValue=i,a!==null)if(xn(a.value,i)){if(a.children===o.children&&!Pr.current){t=eo(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var c=a.dependencies;if(c!==null){i=a.child;for(var p=c.firstContext;p!==null;){if(p.context===n){if(a.tag===1){p=Kn(-1,r&-r),p.tag=2;var g=a.updateQueue;if(g!==null){g=g.shared;var v=g.pending;v===null?p.next=p:(p.next=v.next,v.next=p),g.pending=p}}a.lanes|=r,p=a.alternate,p!==null&&(p.lanes|=r),T0(a.return,r,t),c.lanes|=r;break}p=p.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(ye(341));i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),T0(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}gr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,bi(t,r),o=on(o),n=n(o),t.flags|=1,gr(e,t,n,r),t.child;case 14:return n=t.type,o=dn(n,t.pendingProps),o=dn(n.type,o),Py(e,t,n,o,r);case 15:return d1(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:dn(n,o),Hu(e,t),t.tag=1,kr(n)?(e=!0,_c(t)):e=!1,bi(t,r),z_(t,n,o),O0(t,n,o,r),k0(null,t,n,!0,e,r);case 19:return b1(e,t,r);case 22:return f1(e,t,r)}throw Error(ye(156,t.tag))};function j1(e,t){return o_(e,t)}function Kj(e,t,r,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,r,n){return new Kj(e,t,r,n)}function vg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yj(e){if(typeof e=="function")return vg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Lh)return 14}return 2}function Bo(e,t){var r=e.alternate;return r===null?(r=en(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 qu(e,t,r,n,o,a){var i=2;if(n=e,typeof e=="function")vg(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Za:return ma(r.children,o,a,t);case Ih:i=8,o|=8;break;case Yp:return e=en(12,r,t,o|2),e.elementType=Yp,e.lanes=a,e;case Xp:return e=en(13,r,t,o),e.elementType=Xp,e.lanes=a,e;case Qp:return e=en(19,r,t,o),e.elementType=Qp,e.lanes=a,e;case Bx:return wd(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vx:i=10;break e;case zx:i=9;break e;case Dh:i=11;break e;case Lh:i=14;break e;case So:i=16,n=null;break e}throw Error(ye(130,e==null?e:typeof e,""))}return t=en(i,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function ma(e,t,r,n){return e=en(7,e,n,t),e.lanes=r,e}function wd(e,t,r,n){return e=en(22,e,n,t),e.elementType=Bx,e.lanes=r,e.stateNode={isHidden:!1},e}function gp(e,t,r){return e=en(6,e,null,t),e.lanes=r,e}function bp(e,t,r){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xj(e,t,r,n,o){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=Xf(0),this.expirationTimes=Xf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xf(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function mg(e,t,r,n,o,a,i,c,p){return e=new Xj(e,t,r,c,p),t===1?(t=1,a===!0&&(t|=8)):t=0,a=en(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},tg(a),e}function Qj(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(D1)}catch(e){console.error(e)}}D1(),Mx.exports=Br;var to=Mx.exports,By=to;Gp.createRoot=By.createRoot,Gp.hydrateRoot=By.hydrateRoot;/** * @remix-run/router v1.10.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function _g(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nA(){return Math.random().toString(36).substr(2,8)}function Hy(e,t){return{usr:e.state,key:e.key,idx:t}}function z0(e,t,r,n){return r===void 0&&(r=null),fs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wi(t):t,{state:r,key:t&&t.key||n||nA()})}function Dc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Wi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function oA(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,c=Ao.Pop,p=null,g=v();g==null&&(g=0,i.replaceState(fs({},i.state,{idx:g}),""));function v(){return(i.state||{idx:null}).idx}function _(){c=Ao.Pop;let b=v(),d=b==null?null:b-g;g=b,p&&p({action:c,location:x.location,delta:d})}function O(b,d){c=Ao.Push;let l=z0(x.location,b,d);r&&r(l,b),g=v()+1;let u=Hy(l,g),s=x.createHref(l);try{i.pushState(u,"",s)}catch(h){if(h instanceof DOMException&&h.name==="DataCloneError")throw h;o.location.assign(s)}a&&p&&p({action:c,location:x.location,delta:1})}function C(b,d){c=Ao.Replace;let l=z0(x.location,b,d);r&&r(l,b),g=v();let u=Hy(l,g),s=x.createHref(l);i.replaceState(u,"",s),a&&p&&p({action:c,location:x.location,delta:0})}function T(b){let d=o.location.origin!=="null"?o.location.origin:o.location.href,l=typeof b=="string"?b:Dc(b);return Dt(d,"No window.location.(origin|href) available to create URL for href: "+l),new URL(l,d)}let x={get action(){return c},get location(){return e(o,i)},listen(b){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Wy,_),p=b,()=>{o.removeEventListener(Wy,_),p=null}},createHref(b){return t(o,b)},createURL:T,encodeLocation(b){let d=T(b);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:O,replace:C,go(b){return i.go(b)}};return x}var Uy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Uy||(Uy={}));function aA(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Wi(t):t,o=ps(n.pathname||"/",r);if(o==null)return null;let a=L1(e);iA(a);let i=null;for(let c=0;i==null&&c{let p={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};p.relativePath.startsWith("/")&&(Dt(p.relativePath.startsWith(n),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(n.length));let g=Wo([n,p.relativePath]),v=r.concat(p);a.children&&a.children.length>0&&(Dt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),L1(a.children,t,v,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:pA(g,a.index),routesMeta:v})};return e.forEach((a,i)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))o(a,i);else for(let p of F1(a.path))o(a,i,p)}),t}function F1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=F1(n.join("/")),c=[];return c.push(...i.map(p=>p===""?a:[a,p].join("/"))),o&&c.push(...i),c.map(p=>e.startsWith("/")&&p===""?"/":p)}function iA(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:hA(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const lA=/^:\w+$/,sA=3,uA=2,cA=1,dA=10,fA=-2,$y=e=>e==="*";function pA(e,t){let r=e.split("/"),n=r.length;return r.some($y)&&(n+=fA),t&&(n+=uA),r.filter(o=>!$y(o)).reduce((o,a)=>o+(lA.test(a)?sA:a===""?cA:dA),n)}function hA(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function gA(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i{if(v==="*"){let O=c[_]||"";i=a.slice(0,a.length-O.length).replace(/(.)\/+$/,"$1")}return g[v]=mA(c[_]||"",v),g},{}),pathname:a,pathnameBase:i,pattern:e}}function bA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),_g(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,c)=>(n.push(c),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function vA(e){try{return decodeURI(e)}catch(t){return _g(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mA(e,t){try{return decodeURIComponent(e)}catch(r){return _g(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function ps(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function yA(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Wi(e):e;return{pathname:r?r.startsWith("/")?r:wA(r,t):t,search:_A(n),hash:TA(o)}}function wA(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function vp(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Tg(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Cg(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=Wi(e):(o=fs({},e),Dt(!o.pathname||!o.pathname.includes("?"),vp("?","pathname","search",o)),Dt(!o.pathname||!o.pathname.includes("#"),vp("#","pathname","hash",o)),Dt(!o.search||!o.search.includes("#"),vp("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,c;if(n||i==null)c=r;else{let _=t.length-1;if(i.startsWith("..")){let O=i.split("/");for(;O[0]==="..";)O.shift(),_-=1;o.pathname=O.join("/")}c=_>=0?t[_]:"/"}let p=yA(o,c),g=i&&i!=="/"&&i.endsWith("/"),v=(a||i===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(g||v)&&(p.pathname+="/"),p}const Wo=e=>e.join("/").replace(/\/\/+/g,"/"),xA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_A=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,TA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function CA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const V1=["post","put","patch","delete"];new Set(V1);const OA=["get",...V1];new Set(OA);/** * React Router v6.17.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.pathnameBase)),i=A.useRef(!1);return W1(()=>{i.current=!0}),A.useCallback(function(p,g){if(g===void 0&&(g={}),!i.current)return;if(typeof p=="number"){r.go(p);return}let v=Cg(p,JSON.parse(a),o,g.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:Wo([t,v.pathname])),(g.replace?r.replace:r.push)(v,g.state,g)},[t,r,a,o,e])}function Pd(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=A.useContext(Qo),{pathname:o}=Aa(),a=JSON.stringify(Tg(n).map(i=>i.pathnameBase));return A.useMemo(()=>Cg(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function kA(e,t){return EA(e,t)}function EA(e,t,r){Hi()||Dt(!1);let{navigator:n}=A.useContext(ja),{matches:o}=A.useContext(Qo),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let p=Aa(),g;if(t){var v;let x=typeof t=="string"?Wi(t):t;c==="/"||(v=x.pathname)!=null&&v.startsWith(c)||Dt(!1),g=x}else g=p;let _=g.pathname||"/",O=c==="/"?_:_.slice(c.length)||"/",C=aA(e,{pathname:O}),T=MA(C&&C.map(x=>Object.assign({},x,{params:Object.assign({},i,x.params),pathname:Wo([c,n.encodeLocation?n.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:Wo([c,n.encodeLocation?n.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r);return t&&T?A.createElement(Sd.Provider,{value:{location:Lc({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Ao.Pop}},T):T}function RA(){let e=FA(),t=CA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:o},r):null,a)}const NA=A.createElement(RA,null);class jA extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?A.createElement(Qo.Provider,{value:this.props.routeContext},A.createElement(B1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function AA(e){let{routeContext:t,match:r,children:n}=e,o=A.useContext(Od);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(Qo.Provider,{value:t},n)}function MA(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let c=a.findIndex(p=>p.route.id&&(i==null?void 0:i[p.route.id]));c>=0||Dt(!1),a=a.slice(0,Math.min(a.length,c+1))}return a.reduceRight((c,p,g)=>{let v=p.route.id?i==null?void 0:i[p.route.id]:null,_=null;r&&(_=p.route.errorElement||NA);let O=t.concat(a.slice(0,g+1)),C=()=>{let T;return v?T=_:p.route.Component?T=A.createElement(p.route.Component,null):p.route.element?T=p.route.element:T=c,A.createElement(AA,{match:p,routeContext:{outlet:c,matches:O,isDataRoute:r!=null},children:T})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?A.createElement(jA,{location:r.location,revalidation:r.revalidation,component:_,error:v,children:C(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):C()},null)}var U1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(U1||{}),Fc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Fc||{});function IA(e){let t=A.useContext(Od);return t||Dt(!1),t}function DA(e){let t=A.useContext(z1);return t||Dt(!1),t}function LA(e){let t=A.useContext(Qo);return t||Dt(!1),t}function $1(e){let t=LA(),r=t.matches[t.matches.length-1];return r.route.id||Dt(!1),r.route.id}function FA(){var e;let t=A.useContext(B1),r=DA(Fc.UseRouteError),n=$1(Fc.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function VA(){let{router:e}=IA(U1.UseNavigateStable),t=$1(Fc.UseNavigateStable),r=A.useRef(!1);return W1(()=>{r.current=!0}),A.useCallback(function(o,a){a===void 0&&(a={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Lc({fromRouteId:t},a)))},[e,t])}function zA(e){let{to:t,replace:r,state:n,relative:o}=e;Hi()||Dt(!1);let{matches:a}=A.useContext(Qo),{pathname:i}=Aa(),c=H1(),p=Cg(t,Tg(a).map(v=>v.pathnameBase),i,o==="path"),g=JSON.stringify(p);return A.useEffect(()=>c(JSON.parse(g),{replace:r,state:n,relative:o}),[c,g,o,r,n]),null}function mi(e){Dt(!1)}function BA(e){let{basename:t="/",children:r=null,location:n,navigationType:o=Ao.Pop,navigator:a,static:i=!1}=e;Hi()&&Dt(!1);let c=t.replace(/^\/*/,"/"),p=A.useMemo(()=>({basename:c,navigator:a,static:i}),[c,a,i]);typeof n=="string"&&(n=Wi(n));let{pathname:g="/",search:v="",hash:_="",state:O=null,key:C="default"}=n,T=A.useMemo(()=>{let x=ps(g,c);return x==null?null:{location:{pathname:x,search:v,hash:_,state:O,key:C},navigationType:o}},[c,g,v,_,O,C,o]);return T==null?null:A.createElement(ja.Provider,{value:p},A.createElement(Sd.Provider,{children:r,value:T}))}function Og(e){let{children:t,location:r}=e;return kA(W0(t),r)}new Promise(()=>{});function W0(e,t){t===void 0&&(t=[]);let r=[];return A.Children.forEach(e,(n,o)=>{if(!A.isValidElement(n))return;let a=[...t,o];if(n.type===A.Fragment){r.push.apply(r,W0(n.props.children,a));return}n.type!==mi&&Dt(!1),!n.props.index||!n.props.children||Dt(!1);let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=W0(n.props.children,a)),r.push(i)}),r}/** * React Router DOM v6.17.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}function WA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HA(e,t){return e.button===0&&(!t||t==="_self")&&!WA(e)}const UA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],$A=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],qA=A.createContext({isTransitioning:!1}),GA="startTransition",qy=Nh[GA];function KA(e){let{basename:t,children:r,future:n,window:o}=e,a=A.useRef();a.current==null&&(a.current=rA({window:o,v5Compat:!0}));let i=a.current,[c,p]=A.useState({action:i.action,location:i.location}),{v7_startTransition:g}=n||{},v=A.useCallback(_=>{g&&qy?qy(()=>p(_)):p(_)},[p,g]);return A.useLayoutEffect(()=>i.listen(v),[i,v]),A.createElement(BA,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:i})}const YA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zc=A.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:a,replace:i,state:c,target:p,to:g,preventScrollReset:v,unstable_viewTransition:_}=t,O=q1(t,UA),{basename:C}=A.useContext(ja),T,x=!1;if(typeof g=="string"&&XA.test(g)&&(T=g,YA))try{let u=new URL(window.location.href),s=g.startsWith("//")?new URL(u.protocol+g):new URL(g),h=ps(s.pathname,C);s.origin===u.origin&&h!=null?g=h+s.search+s.hash:x=!0}catch{}let b=SA(g,{relative:o}),d=ZA(g,{replace:i,state:c,target:p,preventScrollReset:v,relative:o,unstable_viewTransition:_});function l(u){n&&n(u),u.defaultPrevented||d(u)}return A.createElement("a",Vc({},O,{href:T||b,onClick:x||a?n:l,ref:r,target:p}))}),QA=A.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:o=!1,className:a="",end:i=!1,style:c,to:p,unstable_viewTransition:g,children:v}=t,_=q1(t,$A),O=Pd(p,{relative:_.relative}),C=Aa(),T=A.useContext(z1),{navigator:x}=A.useContext(ja),b=T!=null&&eM(O)&&g===!0,d=x.encodeLocation?x.encodeLocation(O).pathname:O.pathname,l=C.pathname,u=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;o||(l=l.toLowerCase(),u=u?u.toLowerCase():null,d=d.toLowerCase());let s=l===d||!i&&l.startsWith(d)&&l.charAt(d.length)==="/",h=u!=null&&(u===d||!i&&u.startsWith(d)&&u.charAt(d.length)==="/"),m={isActive:s,isPending:h,isTransitioning:b},w=s?n:void 0,E;typeof a=="function"?E=a(m):E=[a,s?"active":null,h?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let k=typeof c=="function"?c(m):c;return A.createElement(zc,Vc({},_,{"aria-current":w,className:E,ref:r,style:k,to:p,unstable_viewTransition:g}),typeof v=="function"?v(m):v)});var H0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(H0||(H0={}));var Gy;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Gy||(Gy={}));function JA(e){let t=A.useContext(Od);return t||Dt(!1),t}function ZA(e,t){let{target:r,replace:n,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:c}=t===void 0?{}:t,p=H1(),g=Aa(),v=Pd(e,{relative:i});return A.useCallback(_=>{if(HA(_,r)){_.preventDefault();let O=n!==void 0?n:Dc(g)===Dc(v);p(e,{replace:O,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:c})}},[g,p,v,n,o,r,e,a,i,c])}function eM(e,t){t===void 0&&(t={});let r=A.useContext(qA);r==null&&Dt(!1);let{basename:n}=JA(H0.useViewTransitionState),o=Pd(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=ps(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ps(r.nextLocation.pathname,n)||r.nextLocation.pathname;return B0(o.pathname,i)!=null||B0(o.pathname,a)!=null}function tM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M3 6.75A.75.75 0 013.75 6h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 6.75zM3 12a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 12zm0 5.25a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const rM=A.forwardRef(tM),nM=rM;function oM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M5.25 9a6.75 6.75 0 0113.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 01-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 11-7.48 0 24.585 24.585 0 01-4.831-1.244.75.75 0 01-.298-1.205A8.217 8.217 0 005.25 9.75V9zm4.502 8.9a2.25 2.25 0 104.496 0 25.057 25.057 0 01-4.496 0z",clipRule:"evenodd"}))}const aM=A.forwardRef(oM),iM=aM;function lM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zM12.75 6a.75.75 0 00-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 000-1.5h-3.75V6z",clipRule:"evenodd"}))}const sM=A.forwardRef(lM),mp=sM;function uM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 00-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 00-2.282.819l-.922 1.597a1.875 1.875 0 00.432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 000 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 00-.432 2.385l.922 1.597a1.875 1.875 0 002.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 002.28-.819l.923-1.597a1.875 1.875 0 00-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 000-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 00-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 00-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 00-1.85-1.567h-1.843zM12 15.75a3.75 3.75 0 100-7.5 3.75 3.75 0 000 7.5z",clipRule:"evenodd"}))}const cM=A.forwardRef(uM),G1=cM;function dM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{d:"M4.5 3.75a3 3 0 00-3 3v.75h21v-.75a3 3 0 00-3-3h-15z"}),A.createElement("path",{fillRule:"evenodd",d:"M22.5 9.75h-21v7.5a3 3 0 003 3h15a3 3 0 003-3v-7.5zm-18 3.75a.75.75 0 01.75-.75h6a.75.75 0 010 1.5h-6a.75.75 0 01-.75-.75zm.75 2.25a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z",clipRule:"evenodd"}))}const fM=A.forwardRef(dM),pM=fM;function hM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{d:"M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z"}))}const gM=A.forwardRef(hM),bM=gM;function vM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M2.625 6.75a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0A.75.75 0 018.25 6h12a.75.75 0 010 1.5h-12a.75.75 0 01-.75-.75zM2.625 12a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zM7.5 12a.75.75 0 01.75-.75h12a.75.75 0 010 1.5h-12A.75.75 0 017.5 12zm-4.875 5.25a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0a.75.75 0 01.75-.75h12a.75.75 0 010 1.5h-12a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const mM=A.forwardRef(vM),yM=mM;function wM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{d:"M11.644 1.59a.75.75 0 01.712 0l9.75 5.25a.75.75 0 010 1.32l-9.75 5.25a.75.75 0 01-.712 0l-9.75-5.25a.75.75 0 010-1.32l9.75-5.25z"}),A.createElement("path",{d:"M3.265 10.602l7.668 4.129a2.25 2.25 0 002.134 0l7.668-4.13 1.37.739a.75.75 0 010 1.32l-9.75 5.25a.75.75 0 01-.71 0l-9.75-5.25a.75.75 0 010-1.32l1.37-.738z"}),A.createElement("path",{d:"M10.933 19.231l-7.668-4.13-1.37.739a.75.75 0 000 1.32l9.75 5.25c.221.12.489.12.71 0l9.75-5.25a.75.75 0 000-1.32l-1.37-.738-7.668 4.13a2.25 2.25 0 01-2.134-.001z"}))}const xM=A.forwardRef(wM),_M=xM;function TM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0021.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 003.065 7.097A9.716 9.716 0 0012 21.75a9.716 9.716 0 006.685-2.653zm-12.54-1.285A7.486 7.486 0 0112 15a7.486 7.486 0 015.855 2.812A8.224 8.224 0 0112 20.25a8.224 8.224 0 01-5.855-2.438zM15.75 9a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z",clipRule:"evenodd"}))}const CM=A.forwardRef(TM),Ky=CM;function OM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M12 6.75a5.25 5.25 0 016.775-5.025.75.75 0 01.313 1.248l-3.32 3.319c.063.475.276.934.641 1.299.365.365.824.578 1.3.64l3.318-3.319a.75.75 0 011.248.313 5.25 5.25 0 01-5.472 6.756c-1.018-.086-1.87.1-2.309.634L7.344 21.3A3.298 3.298 0 112.7 16.657l8.684-7.151c.533-.44.72-1.291.634-2.309A5.342 5.342 0 0112 6.75zM4.117 19.125a.75.75 0 01.75-.75h.008a.75.75 0 01.75.75v.008a.75.75 0 01-.75.75h-.008a.75.75 0 01-.75-.75v-.008z",clipRule:"evenodd"}),A.createElement("path",{d:"M10.076 8.64l-2.201-2.2V4.874a.75.75 0 00-.364-.643l-3.75-2.25a.75.75 0 00-.916.113l-.75.75a.75.75 0 00-.113.916l2.25 3.75a.75.75 0 00.643.364h1.564l2.062 2.062 1.575-1.297z"}),A.createElement("path",{fillRule:"evenodd",d:"M12.556 17.329l4.183 4.182a3.375 3.375 0 004.773-4.773l-3.306-3.305a6.803 6.803 0 01-1.53.043c-.394-.034-.682-.006-.867.042a.589.589 0 00-.167.063l-3.086 3.748zm3.414-1.36a.75.75 0 011.06 0l1.875 1.876a.75.75 0 11-1.06 1.06L15.97 17.03a.75.75 0 010-1.06z",clipRule:"evenodd"}))}const SM=A.forwardRef(OM),PM=SM;var pe={},K1={},Y1={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],o=0;oe&&(t=0,n=r,r=new Map)}return{get:function(a){var i=r.get(a);return i!==void 0?i:(i=n.get(a))!==void 0?(o(a,i),i):void 0},set:function(a,i){r.has(a)?r.set(a,i):o(a,i)}}}function RM(e){var t=e.separator||":";return function(r){for(var n=0,o=[],a=0,i=0;i1?t-1:0),n=1;np.length)&&(g=p.length);for(var v=0,_=new Array(g);vb.length)&&(d=b.length);for(var l=0,u=new Array(d);ll.length)&&(u=l.length);for(var s=0,h=new Array(u);sl.length)&&(u=l.length);for(var s=0,h=new Array(u);sw.length)&&(E=w.length);for(var k=0,P=new Array(E);ks.length)&&(h=s.length);for(var m=0,w=new Array(h);md.length)&&(l=d.length);for(var u=0,s=new Array(l);uh.length)&&(m=h.length);for(var w=0,E=new Array(m);wu.length)&&(s=u.length);for(var h=0,m=new Array(s);hC.length)&&(T=C.length);for(var x=0,b=new Array(T);xx.length)&&(b=x.length);for(var d=0,l=new Array(b);d"u"?c[g]=i.cloneUnlessOtherwiseSpecified(p,i):i.isMergeableObject(p)?c[g]=(0,t.default)(o[g],p,i):o.indexOf(p)===-1&&c.push(p)}),c}})(mC);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,T){for(var x in T)Object.defineProperty(C,x,{enumerable:!0,get:T[x]})}t(e,{MaterialTailwindTheme:function(){return v},ThemeProvider:function(){return _},useTheme:function(){return O}});var r=g(A),n=c(Fe),o=c(ar),a=c(Pg),i=c(mC);function c(C){return C&&C.__esModule?C:{default:C}}function p(C){if(typeof WeakMap!="function")return null;var T=new WeakMap,x=new WeakMap;return(p=function(b){return b?x:T})(C)}function g(C,T){if(!T&&C&&C.__esModule)return C;if(C===null||typeof C!="object"&&typeof C!="function")return{default:C};var x=p(T);if(x&&x.has(C))return x.get(C);var b={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in C)if(l!=="default"&&Object.prototype.hasOwnProperty.call(C,l)){var u=d?Object.getOwnPropertyDescriptor(C,l):null;u&&(u.get||u.set)?Object.defineProperty(b,l,u):b[l]=C[l]}return b.default=C,x&&x.set(C,b),b}var v=(0,r.createContext)(a.default);v.displayName="MaterialTailwindThemeProvider";function _(C){var T=C.value,x=T===void 0?a.default:T,b=C.children,d=(0,o.default)(a.default,x,{arrayMerge:i.default});return r.default.createElement(v.Provider,{value:d},b)}var O=function(){return(0,r.useContext)(v)};_.propTypes={value:n.default.instanceOf(Object),children:n.default.node.isRequired}})(Ae);var Ed={},Ns={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(O,C){for(var T in C)Object.defineProperty(O,T,{enumerable:!0,get:C[T]})}t(e,{propTypesOpen:function(){return a},propTypesIcon:function(){return i},propTypesAnimate:function(){return c},propTypesDisabled:function(){return p},propTypesClassName:function(){return g},propTypesValue:function(){return v},propTypesChildren:function(){return _}});var r=o(Fe),n=Ct;function o(O){return O&&O.__esModule?O:{default:O}}var a=r.default.bool.isRequired,i=r.default.node,c=n.propTypesAnimation,p=r.default.bool,g=r.default.string,v=r.default.instanceOf(Object).isRequired,_=r.default.node.isRequired})(Ns);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(p,g){for(var v in g)Object.defineProperty(p,v,{enumerable:!0,get:g[v]})}t(e,{AccordionContext:function(){return a},useAccordion:function(){return i},AccordionContextProvider:function(){return c}});var r=o(A),n=Ns;function o(p){return p&&p.__esModule?p:{default:p}}var a=r.default.createContext(null);a.displayName="MaterialTailwind.AccordionContext";function i(){var p=r.default.useContext(a);if(!p)throw new Error("useAccordion() must be used within an Accordion. It happens when you use AccordionHeader or AccordionBody components outside the Accordion component.");return p}var c=function(p){var g=p.value,v=p.children;return r.default.createElement(a.Provider,{value:g},v)};c.propTypes={value:n.propTypesValue,children:n.propTypesChildren},c.displayName="MaterialTailwind.AccordionContextProvider"})(Ed);var yC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{AccordionHeader:function(){return T},default:function(){return x}});var r=_(A),n=_($e),o=Le,a=_(Ie),i=Ed,c=Ae,p=Ns;function g(b,d,l){return d in b?Object.defineProperty(b,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):b[d]=l,b}function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.className,u=b.children,s=O(b,["className","children"]),h=(0,i.useAccordion)(),m=h.open,w=h.icon,E=h.disabled,k=(0,c.useTheme)().accordion,P=k.styles.base;l=l??"";var N=(0,o.twMerge)((0,n.default)((0,a.default)(P.header.initial),g({},(0,a.default)(P.header.active),m)),l),j=(0,n.default)((0,a.default)(P.header.icon));return r.default.createElement("button",v({},s,{ref:d,type:"button",disabled:E,className:N}),u,r.default.createElement("span",{className:j},w??(m?r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},r.default.createElement("path",{fillRule:"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"})):r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},r.default.createElement("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})))))});T.propTypes={className:p.propTypesClassName,children:p.propTypesChildren},T.displayName="MaterialTailwind.AccordionHeader";var x=T})(yC);var wC={},er={},G0=function(e,t){return G0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},G0(e,t)};function xC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");G0(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Wc=function(){return Wc=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;c--)(i=e[c])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function TC(e,t){return function(r,n){t(r,n,e)}}function CC(e,t,r,n,o,a){function i(d){if(d!==void 0&&typeof d!="function")throw new TypeError("Function expected");return d}for(var c=n.kind,p=c==="getter"?"get":c==="setter"?"set":"value",g=!t&&e?n.static?e:e.prototype:null,v=t||(g?Object.getOwnPropertyDescriptor(g,n.name):{}),_,O=!1,C=r.length-1;C>=0;C--){var T={};for(var x in n)T[x]=x==="access"?{}:n[x];for(var x in n.access)T.access[x]=n.access[x];T.addInitializer=function(d){if(O)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(d||null))};var b=(0,r[C])(c==="accessor"?{get:v.get,set:v.set}:v[p],T);if(c==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(_=i(b.get))&&(v.get=_),(_=i(b.set))&&(v.set=_),(_=i(b.init))&&o.unshift(_)}else(_=i(b))&&(c==="field"?o.unshift(_):v[p]=_)}g&&Object.defineProperty(g,n.name,v),O=!0}function OC(e,t,r){for(var n=arguments.length>2,o=0;o0&&a[a.length-1])&&(g[0]===6||g[0]===2)){r=0;continue}if(g[0]===3&&(!a||g[1]>a[0]&&g[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Hg(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(c){i={error:c}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}function jC(){for(var e=[],t=0;t1||p(C,x)})},T&&(o[C]=T(o[C])))}function p(C,T){try{g(n[C](T))}catch(x){O(a[0][3],x)}}function g(C){C.value instanceof ji?Promise.resolve(C.value.v).then(v,_):O(a[0][2],C)}function v(C){p("next",C)}function _(C){p("throw",C)}function O(C,T){C(T),a.shift(),a.length&&p(a[0][0],a[0][1])}}function DC(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(i){return(r=!r)?{value:ji(e[o](i)),done:!1}:a?a(i):i}:a}}function LC(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Hc=="function"?Hc(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(i){return new Promise(function(c,p){i=e[a](i),o(c,p,i.done,i.value)})}}function o(a,i,c,p){Promise.resolve(p).then(function(g){a({value:g,done:c})},i)}}function FC(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var lI=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},K0=function(e){return K0=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},K0(e)};function VC(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=K0(e),n=0;nr=>Math.max(Math.min(r,t),e),Ul=e=>e%1?Number(e.toFixed(5)):e,gs=/(-)?([\d]*\.?[\d])+/g,Y0=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,pI=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function js(e){return typeof e=="string"}const As={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ug=Object.assign(Object.assign({},As),{transform:XC(0,1)}),hI=Object.assign(Object.assign({},As),{default:1}),Ms=e=>({test:t=>js(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gI=Ms("deg"),yi=Ms("%"),bI=Ms("px"),vI=Ms("vh"),mI=Ms("vw"),yI=Object.assign(Object.assign({},yi),{parse:e=>yi.parse(e)/100,transform:e=>yi.transform(e*100)}),$g=(e,t)=>r=>!!(js(r)&&pI.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),QC=(e,t,r)=>n=>{if(!js(n))return n;const[o,a,i,c]=n.match(gs);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:c!==void 0?parseFloat(c):1}},Nl={test:$g("hsl","hue"),parse:QC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+yi.transform(Ul(t))+", "+yi.transform(Ul(r))+", "+Ul(Ug.transform(n))+")"},wI=XC(0,255),Ku=Object.assign(Object.assign({},As),{transform:e=>Math.round(wI(e))}),ci={test:$g("rgb","red"),parse:QC("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Ku.transform(e)+", "+Ku.transform(t)+", "+Ku.transform(r)+", "+Ul(Ug.transform(n))+")"};function xI(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const X0={test:$g("#"),parse:xI,transform:ci.transform},qg={test:e=>ci.test(e)||X0.test(e)||Nl.test(e),parse:e=>ci.test(e)?ci.parse(e):Nl.test(e)?Nl.parse(e):X0.parse(e),transform:e=>js(e)?e:e.hasOwnProperty("red")?ci.transform(e):Nl.transform(e)},JC="${c}",ZC="${n}";function _I(e){var t,r,n,o;return isNaN(e)&&js(e)&&((r=(t=e.match(gs))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match(Y0))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function eO(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(Y0);n&&(r=n.length,e=e.replace(Y0,JC),t.push(...n.map(qg.parse)));const o=e.match(gs);return o&&(e=e.replace(gs,ZC),t.push(...o.map(As.parse))),{values:t,numColors:r,tokenised:e}}function tO(e){return eO(e).values}function rO(e){const{values:t,numColors:r,tokenised:n}=eO(e),o=t.length;return a=>{let i=n;for(let c=0;ctypeof e=="number"?0:e;function CI(e){const t=tO(e);return rO(e)(t.map(TI))}const nO={test:_I,parse:tO,createTransformer:rO,getAnimatableNone:CI},OI=new Set(["brightness","contrast","saturate","opacity"]);function SI(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(gs)||[];if(!n)return e;const o=r.replace(n,"");let a=OI.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}const PI=/([a-z-]*)\(.*?\)/g,kI=Object.assign(Object.assign({},nO),{getAnimatableNone:e=>{const t=e.match(PI);return t?t.map(SI).join(" "):e}});Gt.alpha=Ug;Gt.color=qg;Gt.complex=nO;Gt.degrees=gI;Gt.filter=kI;Gt.hex=X0;Gt.hsla=Nl;Gt.number=As;Gt.percent=yi;Gt.progressPercentage=yI;Gt.px=bI;Gt.rgbUnit=Ku;Gt.rgba=ci;Gt.scale=hI;Gt.vh=vI;Gt.vw=mI;var Be={},La={};Object.defineProperty(La,"__esModule",{value:!0});const oO=1/60*1e3,EI=typeof performance<"u"?()=>performance.now():()=>Date.now(),aO=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(EI()),oO);function RI(e){let t=[],r=[],n=0,o=!1,a=!1;const i=new WeakSet,c={schedule:(p,g=!1,v=!1)=>{const _=v&&o,O=_?t:r;return g&&i.add(p),O.indexOf(p)===-1&&(O.push(p),_&&o&&(n=t.length)),p},cancel:p=>{const g=r.indexOf(p);g!==-1&&r.splice(g,1),i.delete(p)},process:p=>{if(o){a=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let g=0;g(e[t]=RI(()=>bs=!0),e),{}),jI=Is.reduce((e,t)=>{const r=Nd[t];return e[t]=(n,o=!1,a=!1)=>(bs||DI(),r.schedule(n,o,a)),e},{}),AI=Is.reduce((e,t)=>(e[t]=Nd[t].cancel,e),{}),MI=Is.reduce((e,t)=>(e[t]=()=>Nd[t].process(wi),e),{}),II=e=>Nd[e].process(wi),iO=e=>{bs=!1,wi.delta=Q0?oO:Math.max(Math.min(e-wi.timestamp,NI),1),wi.timestamp=e,J0=!0,Is.forEach(II),J0=!1,bs&&(Q0=!1,aO(iO))},DI=()=>{bs=!0,Q0=!0,J0||aO(iO)},LI=()=>wi;La.cancelSync=AI;La.default=jI;La.flushSync=MI;La.getFrameData=LI;Object.defineProperty(Be,"__esModule",{value:!0});var lO=GC,Ai=YC,gn=Gt,jd=La;function FI(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var VI=FI(jd);const vs=(e,t,r)=>Math.min(Math.max(r,e),t),yp=.001,zI=.01,Zy=10,BI=.05,WI=1;function HI({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,a;Ai.warning(e<=Zy*1e3,"Spring duration must be 10 seconds or less");let i=1-t;i=vs(BI,WI,i),e=vs(zI,Zy,e/1e3),i<1?(o=g=>{const v=g*i,_=v*e,O=v-r,C=Z0(g,i),T=Math.exp(-_);return yp-O/C*T},a=g=>{const _=g*i*e,O=_*r+r,C=Math.pow(i,2)*Math.pow(g,2)*e,T=Math.exp(-_),x=Z0(Math.pow(g,2),i);return(-o(g)+yp>0?-1:1)*((O-C)*T)/x}):(o=g=>{const v=Math.exp(-g*e),_=(g-r)*e+1;return-yp+v*_},a=g=>{const v=Math.exp(-g*e),_=(r-g)*(e*e);return v*_});const c=5/e,p=$I(o,a,c);if(e=e*1e3,isNaN(p))return{stiffness:100,damping:10,duration:e};{const g=Math.pow(p,2)*n;return{stiffness:g,damping:i*2*Math.sqrt(n*g),duration:e}}}const UI=12;function $I(e,t,r){let n=r;for(let o=1;oe[r]!==void 0)}function KI(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ew(e,GI)&&ew(e,qI)){const r=HI(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Ad(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,a=lO.__rest(e,["from","to","restSpeed","restDelta"]);const i={done:!1,value:t};let{stiffness:c,damping:p,mass:g,velocity:v,duration:_,isResolvedFromDuration:O}=KI(a),C=tw,T=tw;function x(){const b=v?-(v/1e3):0,d=r-t,l=p/(2*Math.sqrt(c*g)),u=Math.sqrt(c/g)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),l<1){const s=Z0(u,l);C=h=>{const m=Math.exp(-l*u*h);return r-m*((b+l*u*d)/s*Math.sin(s*h)+d*Math.cos(s*h))},T=h=>{const m=Math.exp(-l*u*h);return l*u*m*(Math.sin(s*h)*(b+l*u*d)/s+d*Math.cos(s*h))-m*(Math.cos(s*h)*(b+l*u*d)-s*d*Math.sin(s*h))}}else if(l===1)C=s=>r-Math.exp(-u*s)*(d+(b+u*d)*s);else{const s=u*Math.sqrt(l*l-1);C=h=>{const m=Math.exp(-l*u*h),w=Math.min(s*h,300);return r-m*((b+l*u*d)*Math.sinh(w)+s*d*Math.cosh(w))/s}}}return x(),{next:b=>{const d=C(b);if(O)i.done=b>=_;else{const l=T(b)*1e3,u=Math.abs(l)<=n,s=Math.abs(r-d)<=o;i.done=u&&s}return i.value=i.done?r:d,i},flipTarget:()=>{v=-v,[t,r]=[r,t],x()}}}Ad.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const tw=e=>0,Gg=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Md=(e,t,r)=>-r*e+r*t+e;function wp(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 rw({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{const c=r<.5?r*(1+t):r+t-r*t,p=2*r-c;o=wp(p,c,e+1/3),a=wp(p,c,e),i=wp(p,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}const YI=(e,t,r)=>{const n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},XI=[gn.hex,gn.rgba,gn.hsla],nw=e=>XI.find(t=>t.test(e)),ow=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,Kg=(e,t)=>{let r=nw(e),n=nw(t);Ai.invariant(!!r,ow(e)),Ai.invariant(!!n,ow(t));let o=r.parse(e),a=n.parse(t);r===gn.hsla&&(o=rw(o),r=gn.rgba),n===gn.hsla&&(a=rw(a),n=gn.rgba);const i=Object.assign({},o);return c=>{for(const p in i)p!=="alpha"&&(i[p]=YI(o[p],a[p],c));return i.alpha=Md(o.alpha,a.alpha,c),r.transform(i)}},QI={x:0,y:0,z:0},eh=e=>typeof e=="number",JI=(e,t)=>r=>t(e(r)),Yg=(...e)=>e.reduce(JI);function sO(e,t){return eh(e)?r=>Md(e,t,r):gn.color.test(e)?Kg(e,t):Xg(e,t)}const uO=(e,t)=>{const r=[...e],n=r.length,o=e.map((a,i)=>sO(a,t[i]));return a=>{for(let i=0;i{const r=Object.assign(Object.assign({},e),t),n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=sO(e[o],t[o]));return o=>{for(const a in n)r[a]=n[a](o);return r}};function aw(e){const t=gn.complex.parse(e),r=t.length;let n=0,o=0,a=0;for(let i=0;i{const r=gn.complex.createTransformer(t),n=aw(e),o=aw(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?Yg(uO(n.parsed,o.parsed),r):(Ai.warning(!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.`),i=>`${i>0?t:e}`)},e4=(e,t)=>r=>Md(e,t,r);function t4(e){if(typeof e=="number")return e4;if(typeof e=="string")return gn.color.test(e)?Kg:Xg;if(Array.isArray(e))return uO;if(typeof e=="object")return ZI}function r4(e,t,r){const n=[],o=r||t4(e[0]),a=e.length-1;for(let i=0;ir(Gg(e,t,n))}function o4(e,t){const r=e.length,n=r-1;return o=>{let a=0,i=!1;if(o<=e[0]?i=!0:o>=e[n]&&(a=n-1,i=!0),!i){let p=1;for(;po||p===n);p++);a=p-1}const c=Gg(e[a],e[a+1],o);return t[a](c)}}function Qg(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const a=e.length;Ai.invariant(a===t.length,"Both input and output ranges must be the same length"),Ai.invariant(!n||!Array.isArray(n)||n.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const i=r4(t,n,o),c=a===2?n4(e,i):o4(e,i);return r?p=>c(vs(e[0],e[a-1],p)):c}const Ds=e=>t=>1-e(1-t),Id=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cO=e=>t=>Math.pow(t,e),Jg=e=>t=>t*t*((e+1)*t-e),dO=e=>{const t=Jg(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},fO=1.525,a4=4/11,i4=8/11,l4=9/10,pO=e=>e,Zg=cO(2),s4=Ds(Zg),hO=Id(Zg),gO=e=>1-Math.sin(Math.acos(e)),bO=Ds(gO),u4=Id(bO),eb=Jg(fO),c4=Ds(eb),d4=Id(eb),f4=dO(fO),p4=4356/361,h4=35442/1805,g4=16061/1805,Uc=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Uc(1-e*2)):.5*Uc(e*2-1)+.5;function m4(e,t){return e.map(()=>t||hO).splice(0,e.length-1)}function y4(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function w4(e,t){return e.map(r=>r*t)}function $l({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){const a={done:!1,value:e},i=Array.isArray(t)?t:[e,t],c=w4(n&&n.length===i.length?n:y4(i),o);function p(){return Qg(c,i,{ease:Array.isArray(r)?r:m4(i,r)})}let g=p();return{next:v=>(a.value=g(v),a.done=v>=o,a),flipTarget:()=>{i.reverse(),g=p()}}}function vO({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:t};let c=r*e;const p=t+c,g=a===void 0?p:a(p);return g!==p&&(c=g-t),{next:v=>{const _=-c*Math.exp(-v/n);return i.done=!(_>o||_<-o),i.value=i.done?g:g+_,i},flipTarget:()=>{}}}const iw={keyframes:$l,spring:Ad,decay:vO};function x4(e){if(Array.isArray(e.to))return $l;if(iw[e.type])return iw[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?$l:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Ad:$l}function mO(e,t,r=0){return e-t-r}function _4(e,t,r=0,n=!0){return n?mO(t+-e,t,r):t-(e-t)+r}function T4(e,t,r,n){return n?e>=t+r:e<=-r}const C4=e=>{const t=({delta:r})=>e(r);return{start:()=>VI.default.update(t,!0),stop:()=>jd.cancelSync.update(t)}};function yO(e){var t,r,{from:n,autoplay:o=!0,driver:a=C4,elapsed:i=0,repeat:c=0,repeatType:p="loop",repeatDelay:g=0,onPlay:v,onStop:_,onComplete:O,onRepeat:C,onUpdate:T}=e,x=lO.__rest(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=x,d,l=0,u=x.duration,s,h=!1,m=!0,w;const E=x4(x);!((r=(t=E).needsInterpolation)===null||r===void 0)&&r.call(t,n,b)&&(w=Qg([0,100],[n,b],{clamp:!1}),n=0,b=100);const k=E(Object.assign(Object.assign({},x),{from:n,to:b}));function P(){l++,p==="reverse"?(m=l%2===0,i=_4(i,u,g,m)):(i=mO(i,u,g),p==="mirror"&&k.flipTarget()),h=!1,C&&C()}function N(){d.stop(),O&&O()}function j(F){if(m||(F=-F),i+=F,!h){const W=k.next(Math.max(0,i));s=W.value,w&&(s=w(s)),h=m?W.done:i<=0}T==null||T(s),h&&(l===0&&(u??(u=i)),l{_==null||_(),d.stop()}}}function wO(e,t){return t?e*(1e3/t):0}function O4({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:c=10,restDelta:p=1,modifyTarget:g,driver:v,onUpdate:_,onComplete:O,onStop:C}){let T;function x(u){return r!==void 0&&un}function b(u){return r===void 0?n:n===void 0||Math.abs(r-u){var h;_==null||_(s),(h=u.onUpdate)===null||h===void 0||h.call(u,s)},onComplete:O,onStop:C}))}function l(u){d(Object.assign({type:"spring",stiffness:i,damping:c,restDelta:p},u))}if(x(e))l({from:e,velocity:t,to:b(e)});else{let u=o*t+e;typeof g<"u"&&(u=g(u));const s=b(u),h=s===r?-1:1;let m,w;const E=k=>{m=w,w=k,t=wO(k-m,jd.getFrameData().delta),(h===1&&k>s||h===-1&&kT==null?void 0:T.stop()}}const xO=e=>e*180/Math.PI,S4=(e,t=QI)=>xO(Math.atan2(t.y-e.y,t.x-e.x)),P4=(e,t)=>{let r=!0;return t===void 0&&(t=e,r=!1),n=>r?n-e+t:(e=n,r=!0,t)},k4=e=>e,tb=(e=k4)=>(t,r,n)=>{const o=r-n,a=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?r+a:r-a},E4=tb(),R4=tb(Math.sqrt),_O=e=>e*Math.PI/180,$c=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),th=e=>$c(e)&&e.hasOwnProperty("z"),Tu=(e,t)=>Math.abs(e-t);function N4(e,t){if(eh(e)&&eh(t))return Tu(e,t);if($c(e)&&$c(t)){const r=Tu(e.x,t.x),n=Tu(e.y,t.y),o=th(e)&&th(t)?Tu(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}const j4=(e,t,r)=>(t=_O(t),{x:r*Math.cos(t)+e.x,y:r*Math.sin(t)+e.y}),TO=(e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),CO=(e,t,r,n=0)=>TO(e+r*(t-e)/Math.max(n,r)),A4=(e=50)=>{let t=0,r=0;return n=>{const o=jd.getFrameData().timestamp,a=o!==r?o-r:0,i=a?CO(t,n,a,e):t;return r=o,t=i,i}},M4=e=>{if(typeof e=="number")return t=>Math.round(t/e)*e;{let t=0;const r=e.length;return n=>{let o=Math.abs(e[0]-n);for(t=1;to)return e[t-1];if(t===r-1)return a;o=i}}}};function I4(e,t){return e/(1e3/t)}const D4=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e},OO=(e,t)=>1-3*t+3*e,SO=(e,t)=>3*t-6*e,PO=e=>3*e,qc=(e,t,r)=>((OO(t,r)*e+SO(t,r))*e+PO(t))*e,kO=(e,t,r)=>3*OO(t,r)*e*e+2*SO(t,r)*e+PO(t),L4=1e-7,F4=10;function V4(e,t,r,n,o){let a,i,c=0;do i=t+(r-t)/2,a=qc(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>L4&&++c=B4?W4(i,_,e,r):O===0?_:V4(i,c,c+Cu,e,r)}return i=>i===0||i===1?i:qc(a(i),t,n)}const U4=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return vs(0,1,o/e)};Be.angle=S4;Be.animate=yO;Be.anticipate=f4;Be.applyOffset=P4;Be.attract=E4;Be.attractExpo=R4;Be.backIn=eb;Be.backInOut=d4;Be.backOut=c4;Be.bounceIn=b4;Be.bounceInOut=v4;Be.bounceOut=Uc;Be.circIn=gO;Be.circInOut=u4;Be.circOut=bO;Be.clamp=vs;Be.createAnticipate=dO;Be.createAttractor=tb;Be.createBackIn=Jg;Be.createExpoIn=cO;Be.cubicBezier=H4;Be.decay=vO;Be.degreesToRadians=_O;Be.distance=N4;Be.easeIn=Zg;Be.easeInOut=hO;Be.easeOut=s4;Be.inertia=O4;Be.interpolate=Qg;Be.isPoint=$c;Be.isPoint3D=th;Be.keyframes=$l;Be.linear=pO;Be.mirrorEasing=Id;Be.mix=Md;Be.mixColor=Kg;Be.mixComplex=Xg;Be.pipe=Yg;Be.pointFromVector=j4;Be.progress=Gg;Be.radiansToDegrees=xO;Be.reverseEasing=Ds;Be.smooth=A4;Be.smoothFrame=CO;Be.snap=M4;Be.spring=Ad;Be.steps=U4;Be.toDecimal=TO;Be.velocityPerFrame=I4;Be.velocityPerSecond=wO;Be.wrap=D4;class $4{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const xp=new WeakMap;function rb(e){return xp.has(e)||xp.set(e,{transforms:[],values:new Map}),xp.get(e)}function q4(e,t){return e.has(t)||e.set(t,new $4),e.get(t)}function EO(e,t){e.indexOf(t)===-1&&e.push(t)}function RO(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const NO=(e,t,r)=>Math.min(Math.max(r,e),t),Cr={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},ro=e=>typeof e=="number",ms=e=>Array.isArray(e)&&!ro(e[0]),G4=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function jO(e,t){return ms(e)?e[G4(0,e.length,t)]:e}const nb=(e,t,r)=>-r*e+r*t+e,ob=()=>{},Yn=e=>e,Dd=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function ab(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=Dd(0,t,n);e.push(nb(r,1,o))}}function ib(e){const t=[0];return ab(t,e-1),t}function AO(e,t=ib(e.length),r=Yn){const n=e.length,o=n-t.length;return o>0&&ab(t,o),a=>{let i=0;for(;iArray.isArray(e)&&ro(e[0]),Gc=e=>typeof e=="object"&&!!e.createAnimation,K4=e=>typeof e=="function",lb=e=>typeof e=="string",ya={ms:e=>e*1e3,s:e=>e/1e3};function IO(e,t){return t?e*(1e3/t):0}const Y4=["","X","Y","Z"],X4=["translate","scale","rotate","skew"],Mi={x:"translateX",y:"translateY",z:"translateZ"},lw={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},Q4={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:lw,scale:{syntax:"",initialValue:1,toDefaultUnit:Yn},skew:lw},Ii=new Map,Ld=e=>`--motion-${e}`,Kc=["x","y","z"];X4.forEach(e=>{Y4.forEach(t=>{Kc.push(e+t),Ii.set(Ld(e+t),Q4[e])})});const J4=(e,t)=>Kc.indexOf(e)-Kc.indexOf(t),Z4=new Set(Kc),Fd=e=>Z4.has(e),eD=(e,t)=>{Mi[t]&&(t=Mi[t]);const{transforms:r}=rb(e);EO(r,t),e.style.transform=DO(r)},DO=e=>e.sort(J4).reduce(tD,"").trim(),tD=(e,t)=>`${e} ${t}(var(${Ld(t)}))`,rh=e=>e.startsWith("--"),sw=new Set;function rD(e){if(!sw.has(e)){sw.add(e);try{const{syntax:t,initialValue:r}=Ii.has(e)?Ii.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const LO=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,nD=1e-7,oD=12;function aD(e,t,r,n,o){let a,i,c=0;do i=t+(r-t)/2,a=LO(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>nD&&++caD(a,0,1,e,r);return a=>a===0||a===1?a:LO(o(a),t,n)}const iD=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return NO(0,1,o/e)},lD={ease:jl(.25,.1,.25,1),"ease-in":jl(.42,0,1,1),"ease-in-out":jl(.42,0,.58,1),"ease-out":jl(0,0,.58,1)},sD=/\((.*?)\)/;function nh(e){if(K4(e))return e;if(MO(e))return jl(...e);const t=lD[e];if(t)return t;if(e.startsWith("steps")){const r=sD.exec(e);if(r){const n=r[1].split(",");return iD(parseFloat(n[0]),n[1].trim())}}return Yn}class uD{constructor(t,r=[0,1],{easing:n,duration:o=Cr.duration,delay:a=Cr.delay,endDelay:i=Cr.endDelay,repeat:c=Cr.repeat,offset:p,direction:g="normal",autoplay:v=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Yn,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((O,C)=>{this.resolve=O,this.reject=C}),n=n||Cr.easing,Gc(n)){const O=n.createAnimation(r);n=O.easing,r=O.keyframes||r,o=O.duration||o}this.repeat=c,this.easing=ms(n)?Yn:nh(n),this.updateDuration(o);const _=AO(r,p,ms(n)?n.map(nh):Yn);this.tick=O=>{var C;a=a;let T=0;this.pauseTime!==void 0?T=this.pauseTime:T=(O-this.startTime)*this.rate,this.t=T,T/=1e3,T=Math.max(T-a,0),this.playState==="finished"&&this.pauseTime===void 0&&(T=this.totalDuration);const x=T/this.duration;let b=Math.floor(x),d=x%1;!d&&x>=1&&(d=1),d===1&&b--;const l=b%2;(g==="reverse"||g==="alternate"&&l||g==="alternate-reverse"&&!l)&&(d=1-d);const u=T>=this.totalDuration?1:Math.min(d,1),s=_(this.easing(u));t(s),this.pauseTime===void 0&&(this.playState==="finished"||T>=this.totalDuration+i)?(this.playState="finished",(C=this.resolve)===null||C===void 0||C.call(this,s)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},v&&this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const uw=e=>MO(e)?cD(e):e,cD=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,cw=e=>document.createElement("div").animate(e,{duration:.001}),dw={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{cw({opacity:[1]})}catch{return!1}return!0},finished:()=>!!cw({opacity:[0,1]}).finished},_p={},Xu={};for(const e in dw)Xu[e]=()=>(_p[e]===void 0&&(_p[e]=dw[e]()),_p[e]);function dD(e,t){for(let r=0;rArray.isArray(e)?e:[e];function Yc(e){return Mi[e]&&(e=Mi[e]),Fd(e)?Ld(e):e}const di={get:(e,t)=>{t=Yc(t);let r=rh(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Ii.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=Yc(t),rh(t)?e.style.setProperty(t,r):e.style[t]=r}};function VO(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function fD(){return window.__MOTION_DEV_TOOLS_RECORD}function Vd(e,t,r,n={}){const o=fD(),a=n.record!==!1&&o;let i,{duration:c=Cr.duration,delay:p=Cr.delay,endDelay:g=Cr.endDelay,repeat:v=Cr.repeat,easing:_=Cr.easing,direction:O,offset:C,allowWebkitAcceleration:T=!1}=n;const x=rb(e);let b=Xu.waapi();const d=Fd(t);d&&eD(e,t);const l=Yc(t),u=q4(x.values,l),s=Ii.get(l);return VO(u.animation,!(Gc(_)&&u.generator)&&n.record!==!1),()=>{const h=()=>{var w,E;return(E=(w=di.get(e,l))!==null&&w!==void 0?w:s==null?void 0:s.initialValue)!==null&&E!==void 0?E:0};let m=dD(FO(r),h);if(Gc(_)){const w=_.createAnimation(m,h,d,l,u);_=w.easing,w.keyframes!==void 0&&(m=w.keyframes),w.duration!==void 0&&(c=w.duration)}if(rh(l)&&(Xu.cssRegisterProperty()?rD(l):b=!1),b){s&&(m=m.map(k=>ro(k)?s.toDefaultUnit(k):k)),m.length===1&&(!Xu.partialKeyframes()||a)&&m.unshift(h());const w={delay:ya.ms(p),duration:ya.ms(c),endDelay:ya.ms(g),easing:ms(_)?void 0:uw(_),direction:O,iterations:v+1,fill:"both"};i=e.animate({[l]:m,offset:C,easing:ms(_)?_.map(uw):void 0},w),i.finished||(i.finished=new Promise((k,P)=>{i.onfinish=k,i.oncancel=P}));const E=m[m.length-1];i.finished.then(()=>{di.set(e,l,E),i.cancel()}).catch(ob),T||(i.playbackRate=1.000001)}else if(d){m=m.map(E=>typeof E=="string"?parseFloat(E):E),m.length===1&&m.unshift(parseFloat(h()));const w=E=>{s&&(E=s.toDefaultUnit(E)),di.set(e,l,E)};i=new uD(w,m,Object.assign(Object.assign({},n),{duration:c,easing:_}))}else{const w=m[m.length-1];di.set(e,l,s&&ro(w)?s.toDefaultUnit(w):w)}return a&&o(e,t,m,{duration:c,delay:p,easing:_,repeat:v,offset:C},"motion-one"),u.setAnimation(i),i}}const sb=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function zd(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const pD=e=>e(),ub=(e,t,r=Cr.duration)=>new Proxy({animations:e.map(pD).filter(Boolean),duration:r,options:t},gD),hD=e=>e.animations[0],gD={get:(e,t)=>{const r=hD(e);switch(t){case"duration":return e.duration;case"currentTime":return ya.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(bD)).catch(ob)),e.finished;case"stop":return()=>{e.animations.forEach(n=>VO(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=ya.ms(r);case"currentTime":case"playbackRate":for(let n=0;ne.finished;function vD(e=.1,{start:t=0,from:r=0,easing:n}={}){return(o,a)=>{const i=ro(r)?r:mD(r,a),c=Math.abs(i-o);let p=e*c;if(n){const g=a*e;p=nh(n)(p/g)*g}return t+p}}function mD(e,t){if(e==="first")return 0;{const r=t-1;return e==="last"?r:r/2}}function zO(e,t,r){return typeof e=="function"?e(t,r):e}function yD(e,t,r={}){e=zd(e);const n=e.length,o=[];for(let a=0;at&&o.atVd(...a)).filter(Boolean);return ub(o,t,(r=n[0])===null||r===void 0?void 0:r[3].duration)}function CD(e,t={}){var{defaultOptions:r={}}=t,n=$i(t,["defaultOptions"]);const o=[],a=new Map,i={},c=new Map;let p=0,g=0,v=0;for(let _=0;_"0",X);N=U.easing,U.keyframes!==void 0&&(E=U.keyframes),U.duration!==void 0&&(P=U.duration)}const j=zO(x.delay,u,l)||0,D=g+j,F=D+P;let{offset:W=ib(E.length)}=k;W.length===1&&W[0]===0&&(W[1]=1);const G=length-E.length;G>0&&ab(W,G),E.length===1&&E.unshift(null),xD(w,E,N,W,D,F),b=Math.max(j+P,b),v=Math.max(F,v)}}p=g,g+=b}return a.forEach((_,O)=>{for(const C in _){const T=_[C];T.sort(_D);const x=[],b=[],d=[];for(let l=0;lt/(2*Math.sqrt(e*r));function ED(e,t,r){return e=t||e>t&&r<=t}const BO=({stiffness:e=xi.stiffness,damping:t=xi.damping,mass:r=xi.mass,from:n=0,to:o=1,velocity:a=0,restSpeed:i,restDistance:c}={})=>{a=a?ya.s(a):0;const p={done:!1,hasReachedTarget:!1,current:n,target:o},g=o-n,v=Math.sqrt(e/r)/1e3,_=kD(e,t,r),O=Math.abs(g)<5;i||(i=O?.01:2),c||(c=O?.005:.5);let C;if(_<1){const T=v*Math.sqrt(1-_*_);C=x=>o-Math.exp(-_*v*x)*((-a+_*v*g)/T*Math.sin(T*x)+g*Math.cos(T*x))}else C=T=>o-Math.exp(-v*T)*(g+(-a+v*g)*T);return T=>{p.current=C(T);const x=T===0?a:cb(C,T,p.current),b=Math.abs(x)<=i,d=Math.abs(o-p.current)<=c;return p.done=b&&d,p.hasReachedTarget=ED(n,o,p.current),p}},RD=({from:e=0,velocity:t=0,power:r=.8,decay:n=.325,bounceDamping:o,bounceStiffness:a,changeTarget:i,min:c,max:p,restDistance:g=.5,restSpeed:v})=>{n=ya.ms(n);const _={hasReachedTarget:!1,done:!1,current:e,target:e},O=w=>c!==void 0&&wp,C=w=>c===void 0?p:p===void 0||Math.abs(c-w)-T*Math.exp(-w/n),l=w=>b+d(w),u=w=>{const E=d(w),k=l(w);_.done=Math.abs(E)<=g,_.current=_.done?b:k};let s,h;const m=w=>{O(_.current)&&(s=w,h=BO({from:_.current,to:C(_.current),velocity:cb(l,w,_.current),damping:o,stiffness:a,restDistance:g,restSpeed:v}))};return m(0),w=>{let E=!1;return!h&&s===void 0&&(E=!0,u(w),m(w)),s!==void 0&&w>s?(_.hasReachedTarget=!0,h(w-s)):(_.hasReachedTarget=!1,!E&&u(w),_)}},Tp=10,ND=1e4;function jD(e,t=Yn){let r,n=Tp,o=e(0);const a=[t(o.current)];for(;!o.done&&n{const n=new Map,o=(i=0,c=100,p=0,g=!1)=>{const v=`${i}-${c}-${p}-${g}`;return n.has(v)||n.set(v,e(Object.assign({from:i,to:c,velocity:p,restSpeed:g?.05:2,restDistance:g?.01:.5},r))),n.get(v)},a=i=>(t.has(i)||t.set(i,jD(i)),t.get(i));return{createAnimation:(i,c,p,g,v)=>{var _,O;let C;const T=i.length;if(p&&T<=2&&i.every(AD)){const b=i[T-1],d=T===1?null:i[0];let l=0,u=0;const s=v==null?void 0:v.generator;if(s){const{animation:w,generatorStartTime:E}=v,k=(w==null?void 0:w.startTime)||E||0,P=(w==null?void 0:w.currentTime)||performance.now()-k,N=s(P).current;u=(_=d)!==null&&_!==void 0?_:N,(T===1||T===2&&i[0]===null)&&(l=cb(j=>s(j).current,P,N))}else u=(O=d)!==null&&O!==void 0?O:parseFloat(c());const h=o(u,b,l,g==null?void 0:g.includes("scale")),m=a(h);C=Object.assign(Object.assign({},m),{easing:"linear"}),v&&(v.generator=h,v.generatorStartTime=performance.now())}else C={easing:"ease",duration:a(o(0,100)).overshootDuration};return C}}}}const AD=e=>typeof e!="string",MD=WO(BO),ID=WO(RD),DD={any:0,all:1};function HO(e,t,{root:r,margin:n,amount:o="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const a=zd(e),i=new WeakMap,c=g=>{g.forEach(v=>{const _=i.get(v.target);if(v.isIntersecting!==!!_)if(v.isIntersecting){const O=t(v);typeof O=="function"?i.set(v.target,O):p.unobserve(v.target)}else _&&(_(v),i.delete(v.target))})},p=new IntersectionObserver(c,{root:r,rootMargin:n,threshold:typeof o=="number"?o:DD[o]});return a.forEach(g=>p.observe(g)),()=>p.disconnect()}const Qu=new WeakMap;let Co;function LD(e,t){if(t){const{inlineSize:r,blockSize:n}=t[0];return{width:r,height:n}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function FD({target:e,contentRect:t,borderBoxSize:r}){var n;(n=Qu.get(e))===null||n===void 0||n.forEach(o=>{o({target:e,contentSize:t,get size(){return LD(e,r)}})})}function VD(e){e.forEach(FD)}function zD(){typeof ResizeObserver>"u"||(Co=new ResizeObserver(VD))}function BD(e,t){Co||zD();const r=zd(e);return r.forEach(n=>{let o=Qu.get(n);o||(o=new Set,Qu.set(n,o)),o.add(t),Co==null||Co.observe(n)}),()=>{r.forEach(n=>{const o=Qu.get(n);o==null||o.delete(t),o!=null&&o.size||Co==null||Co.unobserve(n)})}}const Ju=new Set;let ql;function WD(){ql=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Ju.forEach(r=>r(t))},window.addEventListener("resize",ql)}function HD(e){return Ju.add(e),ql||WD(),()=>{Ju.delete(e),!Ju.size&&ql&&(ql=void 0)}}function UO(e,t){return typeof e=="function"?HD(e):BD(e,t)}const UD=50,pw=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),$D=()=>({time:0,x:pw(),y:pw()}),qD={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function hw(e,t,r,n){const o=r[t],{length:a,position:i}=qD[t],c=o.current,p=r.time;o.current=e["scroll"+i],o.scrollLength=e["scroll"+a]-e["client"+a],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=Dd(0,o.scrollLength,o.current);const g=n-p;o.velocity=g>UD?0:IO(o.current-c,g)}function GD(e,t,r){hw(e,"x",t,r),hw(e,"y",t,r),t.time=r}function KD(e,t){let r={x:0,y:0},n=e;for(;n&&n!==t;)if(n instanceof HTMLElement)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;else if(n instanceof SVGGraphicsElement&&"getBBox"in n){const{top:o,left:a}=n.getBBox();for(r.x+=a,r.y+=o;n&&n.tagName!=="svg";)n=n.parentNode}return r}const $O={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},oh={start:0,center:.5,end:1};function gw(e,t,r=0){let n=0;if(oh[e]!==void 0&&(e=oh[e]),lb(e)){const o=parseFloat(e);e.endsWith("px")?n=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?n=o/100*document.documentElement.clientWidth:e.endsWith("vh")?n=o/100*document.documentElement.clientHeight:e=o}return ro(e)&&(n=t*e),r+n}const YD=[0,0];function XD(e,t,r,n){let o=Array.isArray(e)?e:YD,a=0,i=0;return ro(e)?o=[e,e]:lb(e)&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,oh[e]?e:"0"]),a=gw(o[0],r,n),i=gw(o[1],t),a-i}const QD={x:0,y:0};function JD(e,t,r){let{offset:n=$O.All}=r;const{target:o=e,axis:a="y"}=r,i=a==="y"?"height":"width",c=o!==e?KD(o,e):QD,p=o===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:o.clientWidth,height:o.clientHeight},g={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let v=!t[a].interpolate;const _=n.length;for(let O=0;O<_;O++){const C=XD(n[O],g[i],p[i],c[a]);!v&&C!==t[a].interpolatorOffsets[O]&&(v=!0),t[a].offset[O]=C}v&&(t[a].interpolate=AO(ib(_),t[a].offset),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=t[a].interpolate(t[a].current)}function ZD(e,t=e,r){if(r.x.targetOffset=0,r.y.targetOffset=0,t!==e){let n=t;for(;n&&n!=e;)r.x.targetOffset+=n.offsetLeft,r.y.targetOffset+=n.offsetTop,n=n.offsetParent}r.x.targetLength=t===e?t.scrollWidth:t.clientWidth,r.y.targetLength=t===e?t.scrollHeight:t.clientHeight,r.x.containerLength=e.clientWidth,r.y.containerLength=e.clientHeight}function eL(e,t,r,n={}){const o=n.axis||"y";return{measure:()=>ZD(e,n.target,r),update:a=>{GD(e,r,a),(n.offset||n.target)&&JD(e,r,n)},notify:typeof t=="function"?()=>t(r):tL(t,r[o])}}function tL(e,t){return e.pause(),e.forEachNative((r,{easing:n})=>{var o,a;if(r.updateDuration)n||(r.easing=Yn),r.updateDuration(1);else{const i={duration:1e3};n||(i.easing="linear"),(a=(o=r.effect)===null||o===void 0?void 0:o.updateTiming)===null||a===void 0||a.call(o,i)}}),()=>{e.currentTime=t.progress}}const _l=new WeakMap,bw=new WeakMap,Cp=new WeakMap,vw=e=>e===document.documentElement?window:e;function rL(e,t={}){var{container:r=document.documentElement}=t,n=$i(t,["container"]);let o=Cp.get(r);o||(o=new Set,Cp.set(r,o));const a=$D(),i=eL(r,e,a,n);if(o.add(i),!_l.has(r)){const g=()=>{const _=performance.now();for(const O of o)O.measure();for(const O of o)O.update(_);for(const O of o)O.notify()};_l.set(r,g);const v=vw(r);window.addEventListener("resize",g,{passive:!0}),r!==document.documentElement&&bw.set(r,UO(r,g)),v.addEventListener("scroll",g,{passive:!0})}const c=_l.get(r),p=requestAnimationFrame(c);return()=>{var g;typeof e!="function"&&e.stop(),cancelAnimationFrame(p);const v=Cp.get(r);if(!v||(v.delete(i),v.size))return;const _=_l.get(r);_l.delete(r),_&&(vw(r).removeEventListener("scroll",_),(g=bw.get(r))===null||g===void 0||g(),window.removeEventListener("resize",_))}}function nL(e,t){return typeof e!=typeof t?!0:Array.isArray(e)&&Array.isArray(t)?!oL(e,t):e!==t}function oL(e,t){const r=t.length;if(r!==e.length)return!1;for(let n=0;ne.getDepth()-t.getDepth(),uL=e=>e.animateUpdates(),yw=e=>e.next(),ww=(e,t)=>new CustomEvent(e,{detail:{target:t}});function ah(e,t,r){e.dispatchEvent(new CustomEvent(t,{detail:{originalEvent:r}}))}function xw(e,t,r){e.dispatchEvent(new CustomEvent(t,{detail:{originalEntry:r}}))}const cL={isActive:e=>!!e.inView,subscribe:(e,{enable:t,disable:r},{inViewOptions:n={}})=>{const{once:o}=n,a=$i(n,["once"]);return HO(e,i=>{if(t(),xw(e,"viewenter",i),!o)return c=>{r(),xw(e,"viewleave",c)}},a)}},_w=(e,t,r)=>n=>{n.pointerType&&n.pointerType!=="mouse"||(r(),ah(e,t,n))},dL={isActive:e=>!!e.hover,subscribe:(e,{enable:t,disable:r})=>{const n=_w(e,"hoverstart",t),o=_w(e,"hoverend",r);return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",o),()=>{e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",o)}}},fL={isActive:e=>!!e.press,subscribe:(e,{enable:t,disable:r})=>{const n=a=>{r(),ah(e,"pressend",a),window.removeEventListener("pointerup",n)},o=a=>{t(),ah(e,"pressstart",a),window.addEventListener("pointerup",n)};return e.addEventListener("pointerdown",o),()=>{e.removeEventListener("pointerdown",o),window.removeEventListener("pointerup",n)}}},Zu={inView:cL,hover:dL,press:fL},Tw=["initial","animate",...Object.keys(Zu),"exit"],ih=new WeakMap;function pL(e={},t){let r,n=t?t.getDepth()+1:0;const o={initial:!0,animate:!0},a={},i={};for(const x of Tw)i[x]=typeof e[x]=="string"?e[x]:t==null?void 0:t.getContext()[x];const c=e.initial===!1?"animate":"initial";let p=mw(e[c]||i[c],e.variants)||{},g=$i(p,["transition"]);const v=Object.assign({},g);function*_(){var x,b;const d=g;g={};const l={};for(const w of Tw){if(!o[w])continue;const E=mw(e[w]);if(E)for(const k in E)k!=="transition"&&(g[k]=E[k],l[k]=sb((b=(x=E.transition)!==null&&x!==void 0?x:e.transition)!==null&&b!==void 0?b:{},k))}const u=new Set([...Object.keys(g),...Object.keys(d)]),s=[];u.forEach(w=>{var E;g[w]===void 0&&(g[w]=v[w]),nL(d[w],g[w])&&((E=v[w])!==null&&E!==void 0||(v[w]=di.get(r,w)),s.push(Vd(r,w,g[w],l[w])))}),yield;const h=s.map(w=>w()).filter(Boolean);if(!h.length)return;const m=g;r.dispatchEvent(ww("motionstart",m)),Promise.all(h.map(w=>w.finished)).then(()=>{r.dispatchEvent(ww("motioncomplete",m))}).catch(ob)}const O=(x,b)=>()=>{o[x]=b,Op(T)},C=()=>{for(const x in Zu){const b=Zu[x].isActive(e),d=a[x];b&&!d?a[x]=Zu[x].subscribe(r,{enable:O(x,!0),disable:O(x,!1)},e):!b&&d&&(d(),delete a[x])}},T={update:x=>{r&&(e=x,C(),Op(T))},setActive:(x,b)=>{r&&(o[x]=b,Op(T))},animateUpdates:_,getDepth:()=>n,getTarget:()=>g,getOptions:()=>e,getContext:()=>i,mount:x=>(r=x,ih.set(r,T),C(),()=>{ih.delete(r),lL(T);for(const b in a)a[b]()}),isMounted:()=>!!r};return T}function qO(e){const t={},r=[];for(let n in e){const o=e[n];Fd(n)&&(Mi[n]&&(n=Mi[n]),r.push(n),n=Ld(n));let a=Array.isArray(o)?o[0]:o;const i=Ii.get(n);i&&(a=ro(o)?i.toDefaultUnit(o):o),t[n]=a}return r.length&&(t.transform=DO(r)),t}const hL=e=>`-${e.toLowerCase()}`,gL=e=>e.replace(/[A-Z]/g,hL);function bL(e={}){const t=qO(e);let r="";for(const n in t)r+=n.startsWith("--")?n:gL(n),r+=`: ${t[n]}; `;return r}const vL=Object.freeze(Object.defineProperty({__proto__:null,ScrollOffset:$O,animate:yD,animateStyle:Vd,createMotionState:pL,createStyleString:bL,createStyles:qO,getAnimationData:rb,getStyleName:Yc,glide:ID,inView:HO,mountedStates:ih,resize:UO,scroll:rL,spring:MD,stagger:vD,style:di,timeline:TD,withControls:ub},Symbol.toStringTag,{value:"Module"})),mL=Ts(vL);function yL(e){var t={};return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var wL=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xL=yL(function(e){return wL.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const _L=Object.freeze(Object.defineProperty({__proto__:null,default:xL},Symbol.toStringTag,{value:"Module"})),TL=Ts(_L);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=GC,r=A,n=YC,o=Gt,a=Be,i=La,c=mL;function p(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}function g(f){if(f&&f.__esModule)return f;var y=Object.create(null);return f&&Object.keys(f).forEach(function(S){if(S!=="default"){var R=Object.getOwnPropertyDescriptor(f,S);Object.defineProperty(y,S,R.get?R:{enumerable:!0,get:function(){return f[S]}})}}),y.default=f,Object.freeze(y)}var v=g(r),_=p(r),O=p(i),C="production",T=typeof process>"u"||process.env===void 0?C:"production",x=function(f){return{isEnabled:function(y){return f.some(function(S){return!!y[S]})}}},b={measureLayout:x(["layout","layoutId","drag"]),animation:x(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:x(["exit"]),drag:x(["drag","dragControls"]),focus:x(["whileFocus"]),hover:x(["whileHover","onHoverStart","onHoverEnd"]),tap:x(["whileTap","onTap","onTapStart","onTapCancel"]),pan:x(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:x(["whileInView","onViewportEnter","onViewportLeave"])};function d(f){for(var y in f)f[y]!==null&&(y==="projectionNodeConstructor"?b.projectionNodeConstructor=f[y]:b[y].Component=f[y])}var l=r.createContext({strict:!1}),u=Object.keys(b),s=u.length;function h(f,y,S){var R=[],M=r.useContext(l);if(!y)return null;T!=="production"&&S&&M.strict&&n.invariant(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var V=0;V"u")return y;var S=new Map;return new Proxy(y,{get:function(R,M){return S.has(M)||S.set(M,y(M)),S.get(M)}})}var He=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function ue(f){return typeof f!="string"||f.includes("-")?!1:!!(He.indexOf(f)>-1||/[A-Z]/.test(f))}var be={};function Se(f){Object.assign(be,f)}var Re=["","X","Y","Z"],ve=["translate","scale","rotate","skew"],Pe=["transformPerspective","x","y","z"];ve.forEach(function(f){return Re.forEach(function(y){return Pe.push(f+y)})});function it(f,y){return Pe.indexOf(f)-Pe.indexOf(y)}var vt=new Set(Pe);function ft(f){return vt.has(f)}var ee=new Set(["originX","originY","originZ"]);function he(f){return ee.has(f)}function Te(f,y){var S=y.layout,R=y.layoutId;return ft(f)||he(f)||(S||R!==void 0)&&(!!be[f]||f==="opacity")}var We=function(f){return!!(f!==null&&typeof f=="object"&&f.getVelocity)},ct={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function lt(f,y,S,R){var M=f.transform,V=f.transformKeys,z=y.enableHardwareAcceleration,L=z===void 0?!0:z,$=y.allowTransformNone,q=$===void 0?!0:$,Y="";V.sort(it);for(var J=!1,Z=V.length,te=0;te"u"?qk:$k;q($,L.current,y,z)}var Uk={some:0,all:1};function $k(f,y,S,R){var M=R.root,V=R.margin,z=R.amount,L=z===void 0?"some":z,$=R.once;r.useEffect(function(){if(f){var q={root:M==null?void 0:M.current,rootMargin:V,threshold:typeof L=="number"?L:Uk[L]},Y=function(J){var Z,te=J.isIntersecting;if(y.isInView!==te&&(y.isInView=te,!($&&!te&&y.hasEnteredView))){te&&(y.hasEnteredView=!0),(Z=S.animationState)===null||Z===void 0||Z.setActive(e.AnimationType.InView,te);var re=S.getProps(),le=te?re.onViewportEnter:re.onViewportLeave;le==null||le(J)}};return Wk(S.getInstance(),q,Y)}},[f,M,V,L])}function qk(f,y,S,R){var M=R.fallback,V=M===void 0?!0:M;r.useEffect(function(){!f||!V||(T!=="production"&&ff(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var z;y.hasEnteredView=!0;var L=S.getProps().onViewportEnter;L==null||L(null),(z=S.animationState)===null||z===void 0||z.setActive(e.AnimationType.InView,!0)}))},[f])}var go=function(f){return function(y){return f(y),null}},Jb={inView:go(Hk),tap:go(Fk),focus:go(Bt),hover:go(Lk)},Gk=0,Kk=function(){return Gk++},Zb=function(){return de(Kk)};function gf(){var f=r.useContext(k);if(f===null)return[!0,null];var y=f.isPresent,S=f.onExitComplete,R=f.register,M=Zb();r.useEffect(function(){return R(M)},[]);var V=function(){return S==null?void 0:S(M)};return!y&&S?[!1,V]:[!0]}function Yk(){return Xk(r.useContext(k))}function Xk(f){return f===null?!0:f.isPresent}function ev(f,y){if(!Array.isArray(y))return!1;var S=y.length;if(S!==f.length)return!1;for(var R=0;R-1&&f.splice(S,1)}function uE(f,y,S){var R=t.__read(f),M=R.slice(0),V=y<0?M.length+y:y;if(V>=0&&VDe&&Gr,xo=Array.isArray(Pt)?Pt:[Pt],Kr=xo.reduce(V,{});pr===!1&&(Kr={});var fl=st.prevResolvedValues,Ga=fl===void 0?{}:fl,ou=t.__assign(t.__assign({},Ga),Kr),Ka=function(Ue){wo=!0,xe.delete(Ue),st.needsAnimating[Ue]=!0};for(var wr in ou){var ht=Kr[wr],je=Ga[wr];ke.hasOwnProperty(wr)||(ht!==je?ln(ht)&&ln(je)?!ev(ht,je)||yo?Ka(wr):st.protectedKeys[wr]=!0:ht!==void 0?Ka(wr):xe.add(wr):ht!==void 0&&xe.has(wr)?Ka(wr):st.protectedKeys[wr]=!0)}st.prevProp=Pt,st.prevResolvedValues=Kr,st.isActive&&(ke=t.__assign(t.__assign({},ke),Kr)),M&&f.blockInitialAnimation&&(wo=!1),wo&&!jr&&le.push.apply(le,t.__spreadArray([],t.__read(xo.map(function(Ue){return{animation:Ue,options:t.__assign({type:et},Y)}})),!1))},Ye=0;Ye<_E;Ye++)Ge(Ye);if(R=t.__assign({},ke),xe.size){var Qe={};xe.forEach(function(yt){var et=f.getBaseTarget(yt);et!==void 0&&(Qe[yt]=et)}),le.push({animation:Qe})}var bt=!!le.length;return M&&te.initial===!1&&!f.manuallyAnimateOnMount&&(bt=!1),M=!1,bt?y(le):Promise.resolve()}function q(Y,J,Z){var te;if(S[Y].isActive===J)return Promise.resolve();(te=f.variantChildren)===null||te===void 0||te.forEach(function(xe){var ke;return(ke=xe.animationState)===null||ke===void 0?void 0:ke.setActive(Y,J)}),S[Y].isActive=J;var re=$(Z,Y);for(var le in S)S[le].protectedKeys={};return re}return{isAnimated:z,animateChanges:$,setActive:q,setAnimateFunction:L,getState:function(){return S}}}function OE(f,y){return typeof y=="string"?y!==f:H(y)?!ev(y,f):!1}function la(f){return f===void 0&&(f=!1),{isActive:f,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function SE(){var f;return f={},f[e.AnimationType.Animate]=la(!0),f[e.AnimationType.InView]=la(),f[e.AnimationType.Hover]=la(),f[e.AnimationType.Tap]=la(),f[e.AnimationType.Drag]=la(),f[e.AnimationType.Focus]=la(),f[e.AnimationType.Exit]=la(),f}var Ef={animation:go(function(f){var y=f.visualElement,S=f.animate;y.animationState||(y.animationState=CE(y)),ta(S)&&r.useEffect(function(){return S.subscribe(y)},[S])}),exit:go(function(f){var y=f.custom,S=f.visualElement,R=t.__read(gf(),2),M=R[0],V=R[1],z=r.useContext(k);r.useEffect(function(){var L,$;S.isPresent=M;var q=(L=S.animationState)===null||L===void 0?void 0:L.setActive(e.AnimationType.Exit,!M,{custom:($=z==null?void 0:z.custom)!==null&&$!==void 0?$:y});!M&&(q==null||q.then(V))},[M])})},pv=function(){function f(y,S,R){var M=this,V=R===void 0?{}:R,z=V.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(M.lastMoveEvent&&M.lastMoveEventInfo){var Z=Nf(M.lastMoveEventInfo,M.history),te=M.startEvent!==null,re=a.distance(Z.offset,{x:0,y:0})>=3;if(!(!te&&!re)){var le=Z.point,xe=i.getFrameData().timestamp;M.history.push(t.__assign(t.__assign({},le),{timestamp:xe}));var ke=M.handlers,De=ke.onStart,Ge=ke.onMove;te||(De&&De(M.lastMoveEvent,Z),M.startEvent=M.lastMoveEvent),Ge&&Ge(M.lastMoveEvent,Z)}}},this.handlePointerMove=function(Z,te){if(M.lastMoveEvent=Z,M.lastMoveEventInfo=Rf(te,M.transformPagePoint),Nt(Z)&&Z.buttons===0){M.handlePointerUp(Z,te);return}O.default.update(M.updatePoint,!0)},this.handlePointerUp=function(Z,te){M.end();var re=M.handlers,le=re.onEnd,xe=re.onSessionEnd,ke=Nf(Rf(te,M.transformPagePoint),M.history);M.startEvent&&le&&le(Z,ke),xe&&xe(Z,ke)},!(kn(y)&&y.touches.length>1)){this.handlers=S,this.transformPagePoint=z;var L=uf(y),$=Rf(L,this.transformPagePoint),q=$.point,Y=i.getFrameData().timestamp;this.history=[t.__assign(t.__assign({},q),{timestamp:Y})];var J=S.onSessionStart;J&&J(y,Nf($,this.history)),this.removeListeners=a.pipe(aa(window,"pointermove",this.handlePointerMove),aa(window,"pointerup",this.handlePointerUp),aa(window,"pointercancel",this.handlePointerUp))}}return f.prototype.updateHandlers=function(y){this.handlers=y},f.prototype.end=function(){this.removeListeners&&this.removeListeners(),i.cancelSync.update(this.updatePoint)},f}();function Rf(f,y){return y?{point:y(f.point)}:f}function hv(f,y){return{x:f.x-y.x,y:f.y-y.y}}function Nf(f,y){var S=f.point;return{point:S,delta:hv(S,gv(y)),offset:hv(S,PE(y)),velocity:kE(y,.1)}}function PE(f){return f[0]}function gv(f){return f[f.length-1]}function kE(f,y){if(f.length<2)return{x:0,y:0};for(var S=f.length-1,R=null,M=gv(f);S>=0&&(R=f[S],!(M.timestamp-R.timestamp>Ks(y)));)S--;if(!R)return{x:0,y:0};var V=(M.timestamp-R.timestamp)/1e3;if(V===0)return{x:0,y:0};var z={x:(M.x-R.x)/V,y:(M.y-R.y)/V};return z.x===1/0&&(z.x=0),z.y===1/0&&(z.y=0),z}function En(f){return f.max-f.min}function bv(f,y,S){return y===void 0&&(y=0),S===void 0&&(S=.01),a.distance(f,y)M&&(f=S?a.mix(M,f,S.max):Math.min(f,M)),f}function wv(f,y,S){return{min:y!==void 0?f.min+y:void 0,max:S!==void 0?f.max+S-(f.max-f.min):void 0}}function NE(f,y){var S=y.top,R=y.left,M=y.bottom,V=y.right;return{x:wv(f.x,R,V),y:wv(f.y,S,M)}}function xv(f,y){var S,R=y.min-f.min,M=y.max-f.max;return y.max-y.minR?S=a.progress(y.min,y.max-R,f.min):R>M&&(S=a.progress(f.min,f.max-M,y.min)),a.clamp(0,1,S)}function ME(f,y){var S={};return y.min!==void 0&&(S.min=y.min-f.min),y.max!==void 0&&(S.max=y.max-f.min),S}var jf=.35;function IE(f){return f===void 0&&(f=jf),f===!1?f=0:f===!0&&(f=jf),{x:_v(f,"left","right"),y:_v(f,"top","bottom")}}function _v(f,y,S){return{min:Tv(f,y),max:Tv(f,S)}}function Tv(f,y){var S;return typeof f=="number"?f:(S=f[y])!==null&&S!==void 0?S:0}var Cv=function(){return{translate:0,scale:1,origin:0,originPoint:0}},cl=function(){return{x:Cv(),y:Cv()}},Ov=function(){return{min:0,max:0}},Xt=function(){return{x:Ov(),y:Ov()}};function Rn(f){return[f("x"),f("y")]}function Sv(f){var y=f.top,S=f.left,R=f.right,M=f.bottom;return{x:{min:S,max:R},y:{min:y,max:M}}}function DE(f){var y=f.x,S=f.y;return{top:S.min,right:y.max,bottom:S.max,left:y.min}}function LE(f,y){if(!y)return f;var S=y({x:f.left,y:f.top}),R=y({x:f.right,y:f.bottom});return{top:S.y,left:S.x,bottom:R.y,right:R.x}}function Af(f){return f===void 0||f===1}function Pv(f){var y=f.scale,S=f.scaleX,R=f.scaleY;return!Af(y)||!Af(S)||!Af(R)}function bo(f){return Pv(f)||kv(f.x)||kv(f.y)||f.z||f.rotate||f.rotateX||f.rotateY}function kv(f){return f&&f!=="0%"}function Qs(f,y,S){var R=f-S,M=y*R;return S+M}function Ev(f,y,S,R,M){return M!==void 0&&(f=Qs(f,M,R)),Qs(f,S,R)+y}function Mf(f,y,S,R,M){y===void 0&&(y=0),S===void 0&&(S=1),f.min=Ev(f.min,y,S,R,M),f.max=Ev(f.max,y,S,R,M)}function Rv(f,y){var S=y.x,R=y.y;Mf(f.x,S.translate,S.scale,S.originPoint),Mf(f.y,R.translate,R.scale,R.originPoint)}function FE(f,y,S,R){var M,V;R===void 0&&(R=!1);var z=S.length;if(z){y.x=y.y=1;for(var L,$,q=0;qy?S="y":Math.abs(f.x)>y&&(S="x"),S}function $E(f){var y=f.dragControls,S=f.visualElement,R=de(function(){return new HE(S)});r.useEffect(function(){return y&&y.subscribe(R)},[R,y]),r.useEffect(function(){return R.addListeners()},[R])}function qE(f){var y=f.onPan,S=f.onPanStart,R=f.onPanEnd,M=f.onPanSessionStart,V=f.visualElement,z=y||S||R||M,L=r.useRef(null),$=r.useContext(m).transformPagePoint,q={onSessionStart:M,onStart:S,onMove:y,onEnd:function(J,Z){L.current=null,R&&R(J,Z)}};r.useEffect(function(){L.current!==null&&L.current.updateHandlers(q)});function Y(J){L.current=new pv(J,q,{transformPagePoint:$})}qs(V,"pointerdown",z&&Y),Gs(function(){return L.current&&L.current.end()})}var Av={pan:go(qE),drag:go($E)},Zs=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function GE(){var f=Zs.map(function(){return new il}),y={},S={clearAllListeners:function(){return f.forEach(function(R){return R.clear()})},updatePropListeners:function(R){Zs.forEach(function(M){var V,z="on"+M,L=R[z];(V=y[M])===null||V===void 0||V.call(y),L&&(y[M]=S[z](L))})}};return f.forEach(function(R,M){S["on"+Zs[M]]=function(V){return R.add(V)},S["notify"+Zs[M]]=function(){for(var V=[],z=0;z=0?window.pageYOffset:null,q=o2(y,f,L);return V.length&&V.forEach(function(Y){var J=t.__read(Y,2),Z=J[0],te=J[1];f.getValue(Z).set(te)}),f.syncRender(),$!==null&&window.scrollTo({top:$}),{target:q,transitionEnd:R}}else return{target:y,transitionEnd:R}};function i2(f,y,S,R){return e2(y)?a2(f,y,S,R):{target:y,transitionEnd:R}}var l2=function(f,y,S,R){var M=JE(f,y,R);return y=M.target,R=M.transitionEnd,i2(f,y,S,R)};function s2(f){return window.getComputedStyle(f)}var Wv={treeType:"dom",readValueFromInstance:function(f,y){if(ft(y)){var S=vf(y);return S&&S.default||0}else{var R=s2(f);return(mt(y)?R.getPropertyValue(y):R[y])||0}},sortNodePosition:function(f,y){return f.compareDocumentPosition(y)&2?1:-1},getBaseTarget:function(f,y){var S;return(S=f.style)===null||S===void 0?void 0:S[y]},measureViewportBox:function(f,y){var S=y.transformPagePoint;return jv(f,S)},resetTransform:function(f,y,S){var R=S.transformTemplate;y.style.transform=R?R({},""):"none",f.scheduleRender()},restoreTransform:function(f,y){f.style.transform=y.style.transform},removeValueFromRenderState:function(f,y){var S=y.vars,R=y.style;delete S[f],delete R[f]},makeTargetAnimatable:function(f,y,S,R){var M=S.transformValues;R===void 0&&(R=!0);var V=y.transition,z=y.transitionEnd,L=t.__rest(y,["transition","transitionEnd"]),$=dv(L,V||{},f);if(M&&(z&&(z=M(z)),L&&(L=M(L)),$&&($=M($))),R){Sf(f,L,$);var q=l2(f,L,$,z);z=q.transitionEnd,L=q.target}return t.__assign({transition:V,transitionEnd:z},L)},scrapeMotionValuesFromProps:Yt,build:function(f,y,S,R,M){f.isVisible!==void 0&&(y.style.visibility=f.isVisible?"visible":"hidden"),io(y,S,R,M.transformTemplate)},render:zt},u2=eu(Wv),c2=eu(t.__assign(t.__assign({},Wv),{getBaseTarget:function(f,y){return f[y]},readValueFromInstance:function(f,y){var S;return ft(y)?((S=vf(y))===null||S===void 0?void 0:S.default)||0:(y=Rt.has(y)?y:pt(y),f.getAttribute(y))},scrapeMotionValuesFromProps:$r,build:function(f,y,S,R,M){fo(y,S,R,M.transformTemplate)},render:Nr})),Lf=function(f,y){return ue(f)?c2(y,{enableHardwareAcceleration:!1}):u2(y,{enableHardwareAcceleration:!0})};function Hv(f,y){return y.max===y.min?0:f/(y.max-y.min)*100}var dl={correct:function(f,y){if(!y.target)return f;if(typeof f=="string")if(o.px.test(f))f=parseFloat(f);else return f;var S=Hv(f,y.target.x),R=Hv(f,y.target.y);return"".concat(S,"% ").concat(R,"%")}},Uv="_$css",d2={correct:function(f,y){var S=y.treeScale,R=y.projectionDelta,M=f,V=f.includes("var("),z=[];V&&(f=f.replace(Iv,function(le){return z.push(le),Uv}));var L=o.complex.parse(f);if(L.length>5)return M;var $=o.complex.createTransformer(f),q=typeof L[0]!="number"?1:0,Y=R.x.scale*S.x,J=R.y.scale*S.y;L[0+q]/=Y,L[1+q]/=J;var Z=a.mix(Y,J,.5);typeof L[2+q]=="number"&&(L[2+q]/=Z),typeof L[3+q]=="number"&&(L[3+q]/=Z);var te=$(L);if(V){var re=0;te=te.replace(Uv,function(){var le=z[re];return re++,le})}return te}},f2=function(f){t.__extends(y,f);function y(){return f!==null&&f.apply(this,arguments)||this}return y.prototype.componentDidMount=function(){var S=this,R=this.props,M=R.visualElement,V=R.layoutGroup,z=R.switchLayoutGroup,L=R.layoutId,$=M.projection;Se(h2),$&&(V!=null&&V.group&&V.group.add($),z!=null&&z.register&&L&&z.register($),$.root.didUpdate(),$.addEventListener("animationComplete",function(){S.safeToRemove()}),$.setOptions(t.__assign(t.__assign({},$.options),{onExitComplete:function(){return S.safeToRemove()}}))),Oe.hasEverUpdated=!0},y.prototype.getSnapshotBeforeUpdate=function(S){var R=this,M=this.props,V=M.layoutDependency,z=M.visualElement,L=M.drag,$=M.isPresent,q=z.projection;return q&&(q.isPresent=$,L||S.layoutDependency!==V||V===void 0?q.willUpdate():this.safeToRemove(),S.isPresent!==$&&($?q.promote():q.relegate()||O.default.postRender(function(){var Y;!((Y=q.getStack())===null||Y===void 0)&&Y.members.length||R.safeToRemove()}))),null},y.prototype.componentDidUpdate=function(){var S=this.props.visualElement.projection;S&&(S.root.didUpdate(),!S.currentAnimation&&S.isLead()&&this.safeToRemove())},y.prototype.componentWillUnmount=function(){var S=this.props,R=S.visualElement,M=S.layoutGroup,V=S.switchLayoutGroup,z=R.projection;z&&(z.scheduleCheckAfterUnmount(),M!=null&&M.group&&M.group.remove(z),V!=null&&V.deregister&&V.deregister(z))},y.prototype.safeToRemove=function(){var S=this.props.safeToRemove;S==null||S()},y.prototype.render=function(){return null},y}(_.default.Component);function p2(f){var y=t.__read(gf(),2),S=y[0],R=y[1],M=r.useContext(_e);return _.default.createElement(f2,t.__assign({},f,{layoutGroup:M,switchLayoutGroup:r.useContext(Ee),isPresent:S,safeToRemove:R}))}var h2={borderRadius:t.__assign(t.__assign({},dl),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:dl,borderTopRightRadius:dl,borderBottomLeftRadius:dl,borderBottomRightRadius:dl,boxShadow:d2},$v={measureLayout:p2};function qv(f,y,S){S===void 0&&(S={});var R=We(f)?f:qr(f);return xf("",R,y,S),{stop:function(){return R.stop()},isAnimating:function(){return R.isAnimating()}}}var Gv=["TopLeft","TopRight","BottomLeft","BottomRight"],g2=Gv.length,Kv=function(f){return typeof f=="string"?parseFloat(f):f},Yv=function(f){return typeof f=="number"||o.px.test(f)};function b2(f,y,S,R,M,V){var z,L,$,q;M?(f.opacity=a.mix(0,(z=S.opacity)!==null&&z!==void 0?z:1,v2(R)),f.opacityExit=a.mix((L=y.opacity)!==null&&L!==void 0?L:1,0,m2(R))):V&&(f.opacity=a.mix(($=y.opacity)!==null&&$!==void 0?$:1,(q=S.opacity)!==null&&q!==void 0?q:1,R));for(var Y=0;Yy?1:S(a.progress(f,y,R))}}function Jv(f,y){f.min=y.min,f.max=y.max}function sn(f,y){Jv(f.x,y.x),Jv(f.y,y.y)}function Zv(f,y,S,R,M){return f-=y,f=Qs(f,1/S,R),M!==void 0&&(f=Qs(f,1/M,R)),f}function y2(f,y,S,R,M,V,z){if(y===void 0&&(y=0),S===void 0&&(S=1),R===void 0&&(R=.5),V===void 0&&(V=f),z===void 0&&(z=f),o.percent.test(y)){y=parseFloat(y);var L=a.mix(z.min,z.max,y/100);y=L-z.min}if(typeof y=="number"){var $=a.mix(V.min,V.max,R);f===V&&($-=y),f.min=Zv(f.min,y,S,$,M),f.max=Zv(f.max,y,S,$,M)}}function em(f,y,S,R,M){var V=t.__read(S,3),z=V[0],L=V[1],$=V[2];y2(f,y[z],y[L],y[$],y.scale,R,M)}var w2=["x","scaleX","originX"],x2=["y","scaleY","originY"];function tm(f,y,S,R){em(f.x,y,w2,S==null?void 0:S.x,R==null?void 0:R.x),em(f.y,y,x2,S==null?void 0:S.y,R==null?void 0:R.y)}function rm(f){return f.translate===0&&f.scale===1}function nm(f){return rm(f.x)&&rm(f.y)}function om(f,y){return f.x.min===y.x.min&&f.x.max===y.x.max&&f.y.min===y.y.min&&f.y.max===y.y.max}var _2=function(){function f(){this.members=[]}return f.prototype.add=function(y){_f(this.members,y),y.scheduleRender()},f.prototype.remove=function(y){if(Tf(this.members,y),y===this.prevLead&&(this.prevLead=void 0),y===this.lead){var S=this.members[this.members.length-1];S&&this.promote(S)}},f.prototype.relegate=function(y){var S=this.members.findIndex(function(z){return y===z});if(S===0)return!1;for(var R,M=S;M>=0;M--){var V=this.members[M];if(V.isPresent!==!1){R=V;break}}return R?(this.promote(R),!0):!1},f.prototype.promote=function(y,S){var R,M=this.lead;if(y!==M&&(this.prevLead=M,this.lead=y,y.show(),M)){M.instance&&M.scheduleRender(),y.scheduleRender(),y.resumeFrom=M,S&&(y.resumeFrom.preserveOpacity=!0),M.snapshot&&(y.snapshot=M.snapshot,y.snapshot.latestValues=M.animationValues||M.latestValues,y.snapshot.isShared=!0),!((R=y.root)===null||R===void 0)&&R.isUpdating&&(y.isLayoutDirty=!0);var V=y.options.crossfade;V===!1&&M.hide()}},f.prototype.exitAnimationComplete=function(){this.members.forEach(function(y){var S,R,M,V,z;(R=(S=y.options).onExitComplete)===null||R===void 0||R.call(S),(z=(M=y.resumingFrom)===null||M===void 0?void 0:(V=M.options).onExitComplete)===null||z===void 0||z.call(V)})},f.prototype.scheduleRender=function(){this.members.forEach(function(y){y.instance&&y.scheduleRender(!1)})},f.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},f}(),T2="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function am(f,y,S){var R=f.x.translate/y.x,M=f.y.translate/y.y,V="translate3d(".concat(R,"px, ").concat(M,"px, 0) ");if(V+="scale(".concat(1/y.x,", ").concat(1/y.y,") "),S){var z=S.rotate,L=S.rotateX,$=S.rotateY;z&&(V+="rotate(".concat(z,"deg) ")),L&&(V+="rotateX(".concat(L,"deg) ")),$&&(V+="rotateY(".concat($,"deg) "))}var q=f.x.scale*y.x,Y=f.y.scale*y.y;return V+="scale(".concat(q,", ").concat(Y,")"),V===T2?"none":V}var C2=function(f,y){return f.depth-y.depth},im=function(){function f(){this.children=[],this.isDirty=!1}return f.prototype.add=function(y){_f(this.children,y),this.isDirty=!0},f.prototype.remove=function(y){Tf(this.children,y),this.isDirty=!0},f.prototype.forEach=function(y){this.isDirty&&this.children.sort(C2),this.isDirty=!1,this.children.forEach(y)},f}(),lm=1e3;function sm(f){var y=f.attachResizeListener,S=f.defaultParent,R=f.measureScroll,M=f.checkIsScrollRoot,V=f.resetTransform;return function(){function z(L,$,q){var Y=this;$===void 0&&($={}),q===void 0&&(q=S==null?void 0:S()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){Y.isUpdating&&(Y.isUpdating=!1,Y.clearAllSnapshots())},this.updateProjection=function(){Y.nodes.forEach(R2),Y.nodes.forEach(N2)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=L,this.latestValues=$,this.root=q?q.root||q:this,this.path=q?t.__spreadArray(t.__spreadArray([],t.__read(q.path),!1),[q],!1):[],this.parent=q,this.depth=q?q.depth+1:0,L&&this.root.registerPotentialNode(L,this);for(var J=0;J=0;R--)if(f.path[R].instance){S=f.path[R];break}var M=S&&S!==f.root?S.instance:document,V=M.querySelector('[data-projection-id="'.concat(y,'"]'));V&&f.mount(V,!0)}function fm(f){f.min=Math.round(f.min),f.max=Math.round(f.max)}function pm(f){fm(f.x),fm(f.y)}var F2=sm({attachResizeListener:function(f,y){return na(f,"resize",y)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),sa={current:void 0},Ff=sm({measureScroll:function(f){return{x:f.scrollLeft,y:f.scrollTop}},defaultParent:function(){if(!sa.current){var f=new F2(0,{});f.mount(window),f.setOptions({layoutScroll:!0}),sa.current=f}return sa.current},resetTransform:function(f,y){f.style.transform=y??"none"},checkIsScrollRoot:function(f){return window.getComputedStyle(f).position==="fixed"}}),hm=t.__assign(t.__assign(t.__assign(t.__assign({},Ef),Jb),Av),$v),Vf=nt(function(f,y){return ol(f,y,hm,Lf,Ff)});function V2(f){return dt(ol(f,{forwardMotionProps:!1},hm,Lf,Ff))}var z2=nt(ol);function gm(){var f=r.useRef(!1);return N(function(){return f.current=!0,function(){f.current=!1}},[]),f}function ru(){var f=gm(),y=t.__read(r.useState(0),2),S=y[0],R=y[1],M=r.useCallback(function(){f.current&&R(S+1)},[S]),V=r.useCallback(function(){return O.default.postRender(M)},[M]);return[V,S]}var zf=function(f){var y=f.children,S=f.initial,R=f.isPresent,M=f.onExitComplete,V=f.custom,z=f.presenceAffectsLayout,L=de(B2),$=Zb(),q=r.useMemo(function(){return{id:$,initial:S,isPresent:R,custom:V,onExitComplete:function(Y){var J,Z;L.set(Y,!0);try{for(var te=t.__values(L.values()),re=te.next();!re.done;re=te.next()){var le=re.value;if(!le)return}}catch(xe){J={error:xe}}finally{try{re&&!re.done&&(Z=te.return)&&Z.call(te)}finally{if(J)throw J.error}}M==null||M()},register:function(Y){return L.set(Y,!1),function(){return L.delete(Y)}}}},z?void 0:[R]);return r.useMemo(function(){L.forEach(function(Y,J){return L.set(J,!1)})},[R]),v.useEffect(function(){!R&&!L.size&&(M==null||M())},[R]),v.createElement(k.Provider,{value:q},y)};function B2(){return new Map}var qa=function(f){return f.key||""};function W2(f,y){f.forEach(function(S){var R=qa(S);y.set(R,S)})}function H2(f){var y=[];return r.Children.forEach(f,function(S){r.isValidElement(S)&&y.push(S)}),y}var U2=function(f){var y=f.children,S=f.custom,R=f.initial,M=R===void 0?!0:R,V=f.onExitComplete,z=f.exitBeforeEnter,L=f.presenceAffectsLayout,$=L===void 0?!0:L,q=t.__read(ru(),1),Y=q[0],J=r.useContext(_e).forceRender;J&&(Y=J);var Z=gm(),te=H2(y),re=te,le=new Set,xe=r.useRef(re),ke=r.useRef(new Map).current,De=r.useRef(!0);if(N(function(){De.current=!1,W2(te,ke),xe.current=re}),Gs(function(){De.current=!0,ke.clear(),le.clear()}),De.current)return v.createElement(v.Fragment,null,re.map(function(et){return v.createElement(zf,{key:qa(et),isPresent:!0,initial:M?void 0:!1,presenceAffectsLayout:$},et)}));re=t.__spreadArray([],t.__read(re),!1);for(var Ge=xe.current.map(qa),Ye=te.map(qa),Qe=Ge.length,bt=0;bt1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),v.createElement(v.Fragment,null,le.size?re:re.map(function(et){return r.cloneElement(et)}))},bm=r.createContext(null),$2=function(f){return!f.isLayoutDirty&&f.willUpdate(!1)};function vm(){var f=new Set,y=new WeakMap,S=function(){return f.forEach($2)};return{add:function(R){f.add(R),y.set(R,R.addEventListener("willUpdate",S))},remove:function(R){var M;f.delete(R),(M=y.get(R))===null||M===void 0||M(),y.delete(R),S()},dirty:S}}var mm=function(f){return f===!0},q2=function(f){return mm(f===!0)||f==="id"},ym=function(f){var y,S,R=f.children,M=f.id,V=f.inheritId,z=f.inherit,L=z===void 0?!0:z;V!==void 0&&(L=V);var $=r.useContext(_e),q=r.useContext(bm),Y=t.__read(ru(),2),J=Y[0],Z=Y[1],te=r.useRef(null),re=(y=$.id)!==null&&y!==void 0?y:q;te.current===null&&(q2(L)&&re&&(M=M?re+"-"+M:re),te.current={id:M,group:mm(L)&&(S=$==null?void 0:$.group)!==null&&S!==void 0?S:vm()});var le=r.useMemo(function(){return t.__assign(t.__assign({},te.current),{forceRender:J})},[Z]);return v.createElement(_e.Provider,{value:le},R)},G2=0,K2=function(f){var y=f.children;return v.useEffect(function(){n.warning(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),v.createElement(ym,{id:de(function(){return"asl-".concat(G2++)})},y)};function Y2(f){var y=f.children,S=f.isValidProp,R=t.__rest(f,["children","isValidProp"]);S&&uo(S),R=t.__assign(t.__assign({},r.useContext(m)),R),R.isStatic=de(function(){return R.isStatic});var M=r.useMemo(function(){return R},[JSON.stringify(R.transition),R.transformPagePoint,R.reducedMotion]);return v.createElement(m.Provider,{value:M},y)}function X2(f){var y=f.children,S=f.features,R=f.strict,M=R===void 0?!1:R,V=t.__read(r.useState(!Bf(S)),2),z=V[1],L=r.useRef(void 0);if(!Bf(S)){var $=S.renderer,q=t.__rest(S,["renderer"]);L.current=$,d(q)}return r.useEffect(function(){Bf(S)&&S().then(function(Y){var J=Y.renderer,Z=t.__rest(Y,["renderer"]);d(Z),L.current=J,z(!0)})},[]),v.createElement(l.Provider,{value:{renderer:L.current,strict:M}},y)}function Bf(f){return typeof f=="function"}var wm=r.createContext(null);function Q2(f,y,S,R){if(!R)return f;var M=f.findIndex(function(Y){return Y.value===y});if(M===-1)return f;var V=R>0?1:-1,z=f[M+V];if(!z)return f;var L=f[M],$=z.layout,q=a.mix($.min,$.max,.5);return V===1&&L.layout.max+S>q||V===-1&&L.layout.min+S.001?1/f:ER},jm=!1;function RR(f){var y=mo(1),S=mo(1),R=E();n.invariant(!!(f||R),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),n.warning(jm,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),jm=!0,f?(y=f.scaleX||y,S=f.scaleY||S):R&&(y=R.getValue("scaleX",1),S=R.getValue("scaleY",1));var M=nu(y,Nm),V=nu(S,Nm);return{scaleX:M,scaleY:V}}e.AnimatePresence=U2,e.AnimateSharedLayout=K2,e.DeprecatedLayoutGroupContext=bm,e.DragControls=Em,e.FlatTree=im,e.LayoutGroup=ym,e.LayoutGroupContext=_e,e.LazyMotion=X2,e.MotionConfig=Y2,e.MotionConfigContext=m,e.MotionContext=w,e.MotionValue=sv,e.PresenceContext=k,e.Reorder=sR,e.SwitchLayoutGroupContext=Ee,e.addPointerEvent=aa,e.addScaleCorrector=Se,e.animate=qv,e.animateVisualElement=Xs,e.animationControls=Pm,e.animations=Ef,e.calcLength=En,e.checkTargetForNewValues=Sf,e.createBox=Xt,e.createDomMotionComponent=V2,e.createMotionComponent=dt,e.domAnimation=Om,e.domMax=uR,e.filterProps=za,e.isBrowser=P,e.isDragActive=df,e.isMotionValue=We,e.isValidMotionProp=yr,e.m=z2,e.makeUseVisualState=Ua,e.motion=Vf,e.motionValue=qr,e.resolveMotionValue=ra,e.transform=xm,e.useAnimation=mR,e.useAnimationControls=km,e.useAnimationFrame=Sm,e.useCycle=yR,e.useDeprecatedAnimatedState=kR,e.useDeprecatedInvertedScale=RR,e.useDomEvent=St,e.useDragControls=_R,e.useElementScroll=hR,e.useForceUpdate=ru,e.useInView=wR,e.useInstantLayoutTransition=Rm,e.useInstantTransition=CR,e.useIsPresent=Yk,e.useIsomorphicLayoutEffect=N,e.useMotionTemplate=cR,e.useMotionValue=mo,e.usePresence=gf,e.useReducedMotion=W,e.useReducedMotionConfig=G,e.useResetProjection=OR,e.useScroll=Wf,e.useSpring=dR,e.useTime=vR,e.useTransform=nu,e.useUnmountEffect=Gs,e.useVelocity=fR,e.useViewportScroll=gR,e.useVisualElementContext=E,e.visualElement=eu,e.wrapHandler=cf})(er);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{AccordionBody:function(){return x},default:function(){return b}});var r=O(A),n=er,o=O($e),a=O(ar),i=O(Ie),c=Le,p=Ed,g=Ae,v=Ns;function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.className,s=d.children,h=C(d,["className","children"]),m=(0,p.useAccordion)(),w=m.open,E=m.animate,k=(0,g.useTheme)().accordion,P=k.styles.base;u=u??"";var N=(0,c.twMerge)((0,o.default)((0,i.default)(P.body)),u),j={unmount:{height:"0px",transition:{duration:.2,times:[.4,0,.2,1]}},mount:{height:"auto",transition:{duration:.2,times:[.4,0,.2,1]}}},D={unmount:{transition:{duration:.3,ease:"linear"}},mount:{transition:{duration:.3,ease:"linear"}}},F=(0,a.default)(D,E);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(n.m.div,{className:"overflow-hidden",initial:"unmount",exit:"unmount",animate:w?"mount":"unmount",variants:j},r.default.createElement(n.m.div,_({},h,{ref:l,className:N,initial:"unmount",exit:"unmount",animate:w?"mount":"unmount",variants:F}),s)))});x.propTypes={className:v.propTypesClassName,children:v.propTypesChildren},x.displayName="MaterialTailwind.AccordionBody";var b=x})(wC);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Accordion:function(){return b},AccordionHeader:function(){return g.AccordionHeader},AccordionBody:function(){return v.AccordionBody},useAccordion:function(){return c.useAccordion},default:function(){return d}});var r=C(A),n=C($e),o=Le,a=C(Ie),i=Ae,c=Ed,p=Ns,g=yC,v=wC;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.open,h=l.icon,m=l.animate,w=l.className,E=l.disabled,k=l.children,P=T(l,["open","icon","animate","className","disabled","children"]),N=(0,i.useTheme)().accordion,j=N.defaultProps,D=N.styles.base;h=h??j.icon,m=m??j.animate,w=w??j.className,E=E??j.disabled;var F=(0,o.twMerge)((0,n.default)((0,a.default)(D.container),_({},(0,a.default)(D.disabled),E)),w),W=r.default.useMemo(function(){return{open:s,icon:h,animate:m,disabled:E}},[s,h,m,E]);return r.default.createElement(c.AccordionContextProvider,{value:W},r.default.createElement("div",O({},P,{ref:u,className:F}),k))});b.propTypes={open:p.propTypesOpen,icon:p.propTypesIcon,animate:p.propTypesAnimate,disabled:p.propTypesDisabled,className:p.propTypesClassName,children:p.propTypesChildren},b.displayName="MaterialTailwind.Accordion";var d=Object.assign(b,{Header:g.AccordionHeader,Body:v.AccordionBody})})(K1);var GO={},Et={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o,a){var i=n.findIndex(function(c){return c===o});return i>=0?o:a}var r=t})(Et);var Bd={},qi=class{constructor(){this.x=0,this.y=0,this.z=0}findFurthestPoint(t,r,n,o,a,i){return this.x=t-n>r/2?0:r,this.y=o-i>a/2?0:a,this.z=Math.hypot(this.x-(t-n),this.y-(o-i)),this.z}appyStyles(t,r,n,o,a){t.classList.add("ripple"),t.style.backgroundColor=r==="dark"?"rgba(0,0,0, 0.2)":"rgba(255,255,255, 0.3)",t.style.borderRadius="50%",t.style.pointerEvents="none",t.style.position="absolute",t.style.left=a.clientX-n.left-o+"px",t.style.top=a.clientY-n.top-o+"px",t.style.width=t.style.height=o*2+"px"}applyAnimation(t){t.animate([{transform:"scale(0)",opacity:1},{transform:"scale(1.5)",opacity:0}],{duration:500,easing:"linear"})}create(t,r){const n=t.currentTarget;n.style.position="relative",n.style.overflow="hidden";const o=n.getBoundingClientRect(),a=this.findFurthestPoint(t.clientX,n.offsetWidth,o.left,t.clientY,n.offsetHeight,o.top),i=document.createElement("span");this.appyStyles(i,r,o,a,t),this.applyAnimation(i),n.appendChild(i),setTimeout(()=>i.remove(),500)}};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{IconButton:function(){return x},default:function(){return b}});var r=O(A),n=O(Fe),o=O(qi),a=O($e),i=Le,c=O(Et),p=O(Ie),g=Ae,v=Ma;function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.variant,s=d.size,h=d.color,m=d.ripple,w=d.className,E=d.children;d.fullWidth;var k=C(d,["variant","size","color","ripple","className","children","fullWidth"]),P=(0,g.useTheme)().iconButton,N=P.valid,j=P.defaultProps,D=P.styles,F=D.base,W=D.variants,G=D.sizes;u=u??j.variant,s=s??j.size,h=h??j.color,m=m??j.ripple,w=w??j.className;var X=m!==void 0&&new o.default,U=(0,p.default)(F),B=(0,p.default)(W[(0,c.default)(N.variants,u,"filled")][(0,c.default)(N.colors,h,"gray")]),H=(0,p.default)(G[(0,c.default)(N.sizes,s,"md")]),K=(0,i.twMerge)((0,a.default)(U,H,B),w);return r.default.createElement("button",_({},k,{ref:l,className:K,type:k.type||"button",onMouseDown:function(Q){var oe=k==null?void 0:k.onMouseDown;return m&&X.create(Q,(u==="filled"||u==="gradient")&&h!=="white"?"light":"dark"),typeof oe=="function"&&oe(Q)}}),r.default.createElement("span",{className:"absolute top-1/2 left-1/2 transform -translate-y-1/2 -translate-x-1/2"},E))});x.propTypes={variant:n.default.oneOf(v.propTypesVariant),size:n.default.oneOf(v.propTypesSize),color:n.default.oneOf(v.propTypesColor),ripple:v.propTypesRipple,className:v.propTypesClassName,children:v.propTypesChildren},x.displayName="MaterialTailwind.IconButton";var b=x})(Bd);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,s){for(var h in s)Object.defineProperty(u,h,{enumerable:!0,get:s[h]})}t(e,{Alert:function(){return d},default:function(){return l}});var r=T(A),n=T(Fe),o=er,a=T($e),i=T(ar),c=Le,p=T(Et),g=T(Ie),v=Ae,_=kg,O=T(Bd);function C(){return C=Object.assign||function(u){for(var s=1;s=0)&&Object.prototype.propertyIsEnumerable.call(u,m)&&(h[m]=u[m])}return h}function b(u,s){if(u==null)return{};var h={},m=Object.keys(u),w,E;for(E=0;E=0)&&(h[w]=u[w]);return h}var d=r.default.forwardRef(function(u,s){var h=u.variant,m=u.color,w=u.icon,E=u.open,k=u.action,P=u.onClose,N=u.animate,j=u.className,D=u.children,F=x(u,["variant","color","icon","open","action","onClose","animate","className","children"]),W=(0,v.useTheme)().alert,G=W.defaultProps,X=W.valid,U=W.styles,B=U.base,H=U.variants;h=h??G.variant,m=m??G.color,j=j??G.className,N=N??G.animate,E=E??G.open,k=k??G.action,P=P??G.onClose;var K=(0,g.default)(B.alert),Q=(0,g.default)(B.action),oe=(0,g.default)(H[(0,p.default)(X.variants,h,"filled")][(0,p.default)(X.colors,m,"gray")]),se=(0,c.twMerge)((0,a.default)(K,oe),j),ae=(0,a.default)(Q),ne={unmount:{opacity:0},mount:{opacity:1}},me=(0,i.default)(ne,N),fe=r.default.createElement("div",{className:"shrink-0"},w),ie=o.AnimatePresence;return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(ie,null,E&&r.default.createElement(o.m.div,C({},F,{ref:s,role:"alert",className:"".concat(se," flex"),initial:"unmount",exit:"unmount",animate:E?"mount":"unmount",variants:me}),w&&fe,r.default.createElement("div",{className:"".concat(w?"ml-3":""," mr-12")},D),P&&!k&&r.default.createElement(O.default,{onClick:P,size:"sm",variant:"text",color:h==="outlined"||h==="ghost"?m:"white",className:ae},r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"h-6 w-6",strokeWidth:2},r.default.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))),k||null)))});d.propTypes={variant:n.default.oneOf(_.propTypesVariant),color:n.default.oneOf(_.propTypesColor),icon:_.propTypesIcon,open:_.propTypesOpen,action:_.propTypesAction,onClose:_.propTypesOnClose,animate:_.propTypesAnimate,className:_.propTypesClassName,children:_.propTypesChildren},d.displayName="MaterialTailwind.Alert";var l=d})(GO);var KO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{Avatar:function(){return x},default:function(){return b}});var r=O(A),n=O(Fe),o=O($e),a=Le,i=O(Et),c=O(Ie),p=Ae,g=Eg;function v(d,l,u){return l in d?Object.defineProperty(d,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[l]=u,d}function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.variant,s=d.size,h=d.className,m=d.color,w=d.withBorder,E=C(d,["variant","size","className","color","withBorder"]),k=(0,p.useTheme)().avatar,P=k.valid,N=k.defaultProps,j=k.styles,D=j.base,F=j.variants,W=j.sizes,G=j.borderColor;u=u??N.variant,s=s??N.size,h=h??N.className,w=w??N.withBorder,m=m??N.color;var X=(0,c.default)(F[(0,i.default)(P.variants,u,"rounded")]),U=(0,c.default)(W[(0,i.default)(P.sizes,s,"md")]),B=(0,c.default)(G[(0,i.default)(P.colors,m,"gray")]),H,K=(0,a.twMerge)((0,o.default)((0,c.default)(D.initial),X,U,(H={},v(H,(0,c.default)(D.withBorder),w),v(H,B,w),H)),h);return r.default.createElement("img",_({},E,{ref:l,className:K}))});x.propTypes={variant:n.default.oneOf(g.propTypesVariant),size:n.default.oneOf(g.propTypesSize),className:g.propTypesClassName,withBorder:g.propTypesWithBorder,color:n.default.oneOf(g.propTypesColor)},x.displayName="MaterialTailwind.Avatar";var b=x})(KO);var YO={},XO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(p,g){for(var v in g)Object.defineProperty(p,v,{enumerable:!0,get:g[v]})}t(e,{propTypesSeparator:function(){return o},propTypesFullWidth:function(){return a},propTypesClassName:function(){return i},propTypesChildren:function(){return c}});var r=n(Fe);function n(p){return p&&p.__esModule?p:{default:p}}var o=r.default.node,a=r.default.bool,i=r.default.string,c=r.default.node.isRequired})(XO);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{Breadcrumbs:function(){return x},default:function(){return b}});var r=O(A),n=v($e),o=Le,a=v(Ie),i=Ae,c=XO;function p(d,l,u){return l in d?Object.defineProperty(d,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[l]=u,d}function g(){return g=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=(0,r.forwardRef)(function(d,l){var u=d.separator,s=d.fullWidth,h=d.className,m=d.children,w=C(d,["separator","fullWidth","className","children"]),E=(0,i.useTheme)().breadcrumbs,k=E.defaultProps,P=E.styles.base;u=u??k.separator,s=s??k.fullWidth,h=h??k.className;var N=(0,n.default)((0,a.default)(P.root.initial),p({},(0,a.default)(P.root.fullWidth),s)),j=(0,o.twMerge)((0,n.default)((0,a.default)(P.list)),h),D=(0,n.default)((0,a.default)(P.item.initial)),F=(0,n.default)((0,a.default)(P.separator));return r.default.createElement("nav",{"aria-label":"breadcrumb",className:N},r.default.createElement("ol",g({},w,{ref:l,className:j}),r.Children.map(m,function(W,G){if((0,r.isValidElement)(W)){var X;return r.default.createElement("li",{className:(0,n.default)(D,p({},(0,a.default)(P.item.disabled),W==null||(X=W.props)===null||X===void 0?void 0:X.disabled))},W,G!==r.Children.count(m)-1&&r.default.createElement("span",{className:F},u))}return null})))});x.propTypes={separator:c.propTypesSeparator,fullWidth:c.propTypesFullWidth,className:c.propTypesClassName,children:c.propTypesChildren},x.displayName="MaterialTailwind.Breadcrumbs";var b=x})(YO);var QO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Button:function(){return b},default:function(){return d}});var r=C(A),n=C(Fe),o=C(qi),a=C($e),i=Le,c=C(Et),p=C(Ie),g=Ae,v=Ma;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.variant,h=l.size,m=l.color,w=l.fullWidth,E=l.ripple,k=l.className,P=l.children,N=T(l,["variant","size","color","fullWidth","ripple","className","children"]),j=(0,g.useTheme)().button,D=j.valid,F=j.defaultProps,W=j.styles,G=W.base,X=W.variants,U=W.sizes;s=s??F.variant,h=h??F.size,m=m??F.color,w=w??F.fullWidth,E=E??F.ripple,k=k??F.className;var B=E!==void 0&&new o.default,H=(0,p.default)(G.initial),K=(0,p.default)(X[(0,c.default)(D.variants,s,"filled")][(0,c.default)(D.colors,m,"gray")]),Q=(0,p.default)(U[(0,c.default)(D.sizes,h,"md")]),oe=(0,i.twMerge)((0,a.default)(H,Q,K,_({},(0,p.default)(G.fullWidth),w)),k);return r.default.createElement("button",O({},N,{ref:u,className:oe,type:N.type||"button",onMouseDown:function(se){var ae=N==null?void 0:N.onMouseDown;return E&&B.create(se,(s==="filled"||s==="gradient")&&m!=="white"?"light":"dark"),typeof ae=="function"&&ae(se)}}),P)});b.propTypes={variant:n.default.oneOf(v.propTypesVariant),size:n.default.oneOf(v.propTypesSize),color:n.default.oneOf(v.propTypesColor),fullWidth:v.propTypesFullWidth,ripple:v.propTypesRipple,className:v.propTypesClassName,children:v.propTypesChildren},b.displayName="MaterialTailwind.Button";var d=b})(QO);var JO={},ZO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{CardHeader:function(){return x},default:function(){return b}});var r=O(A),n=O(Fe),o=O($e),a=Le,i=O(Et),c=O(Ie),p=Ae,g=Ia;function v(d,l,u){return l in d?Object.defineProperty(d,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[l]=u,d}function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.variant,s=d.color,h=d.shadow,m=d.floated,w=d.className,E=d.children,k=C(d,["variant","color","shadow","floated","className","children"]),P=(0,p.useTheme)().cardHeader,N=P.defaultProps,j=P.styles,D=P.valid,F=j.base,W=j.variants;u=u??N.variant,s=s??N.color,h=h??N.shadow,m=m??N.floated,w=w??N.className;var G=(0,c.default)(F.initial),X=(0,c.default)(W[(0,i.default)(D.variants,u,"filled")][(0,i.default)(D.colors,s,"white")]),U=(0,a.twMerge)((0,o.default)(G,X,v({},(0,c.default)(F.shadow),h),v({},(0,c.default)(F.floated),m)),w);return r.default.createElement("div",_({},k,{ref:l,className:U}),E)});x.propTypes={variant:n.default.oneOf(g.propTypesVariant),color:n.default.oneOf(g.propTypesColor),shadow:g.propTypesShadow,floated:g.propTypesFloated,className:g.propTypesClassName,children:g.propTypesChildren},x.displayName="MaterialTailwind.CardHeader";var b=x})(ZO);var eS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(T,x){for(var b in x)Object.defineProperty(T,b,{enumerable:!0,get:x[b]})}t(e,{CardBody:function(){return O},default:function(){return C}});var r=g(A),n=g($e),o=Le,a=g(Ie),i=Ae,c=Ia;function p(){return p=Object.assign||function(T){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(T,d)&&(b[d]=T[d])}return b}function _(T,x){if(T==null)return{};var b={},d=Object.keys(T),l,u;for(u=0;u=0)&&(b[l]=T[l]);return b}var O=r.default.forwardRef(function(T,x){var b=T.className,d=T.children,l=v(T,["className","children"]),u=(0,i.useTheme)().cardBody,s=u.defaultProps,h=u.styles.base;b=b??s.className;var m=(0,o.twMerge)((0,n.default)((0,a.default)(h)),b);return r.default.createElement("div",p({},l,{ref:x,className:m}),d)});O.propTypes={className:c.propTypesClassName,children:c.propTypesChildren},O.displayName="MaterialTailwind.CardBody";var C=O})(eS);var tS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,b){for(var d in b)Object.defineProperty(x,d,{enumerable:!0,get:b[d]})}t(e,{CardFooter:function(){return C},default:function(){return T}});var r=v(A),n=v($e),o=Le,a=v(Ie),i=Ae,c=Ia;function p(x,b,d){return b in x?Object.defineProperty(x,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):x[b]=d,x}function g(){return g=Object.assign||function(x){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(x,l)&&(d[l]=x[l])}return d}function O(x,b){if(x==null)return{};var d={},l=Object.keys(x),u,s;for(s=0;s=0)&&(d[u]=x[u]);return d}var C=r.default.forwardRef(function(x,b){var d=x.divider,l=x.className,u=x.children,s=_(x,["divider","className","children"]),h=(0,i.useTheme)().cardFooter,m=h.defaultProps,w=h.styles.base;l=l??m.className,d=d??m.divider;var E=(0,o.twMerge)((0,n.default)((0,a.default)(w.initial),p({},(0,a.default)(w.divider),d)),l);return r.default.createElement("div",g({},s,{ref:b,className:E}),u)});C.propTypes={divider:c.propTypesDivider,className:c.propTypesClassName,children:c.propTypesChildren},C.displayName="MaterialTailwind.CardFooter";var T=C})(tS);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{Card:function(){return l},CardHeader:function(){return g.CardHeader},CardBody:function(){return v.CardBody},CardFooter:function(){return _.CardFooter},default:function(){return u}});var r=x(A),n=x(Fe),o=x($e),a=Le,i=x(Et),c=x(Ie),p=Ae,g=ZO,v=eS,_=tS,O=Ia;function C(s,h,m){return h in s?Object.defineProperty(s,h,{value:m,enumerable:!0,configurable:!0,writable:!0}):s[h]=m,s}function T(){return T=Object.assign||function(s){for(var h=1;h=0)&&Object.prototype.propertyIsEnumerable.call(s,w)&&(m[w]=s[w])}return m}function d(s,h){if(s==null)return{};var m={},w=Object.keys(s),E,k;for(k=0;k=0)&&(m[E]=s[E]);return m}var l=r.default.forwardRef(function(s,h){var m=s.variant,w=s.color,E=s.shadow,k=s.className,P=s.children,N=b(s,["variant","color","shadow","className","children"]),j=(0,p.useTheme)().card,D=j.defaultProps,F=j.styles,W=j.valid,G=F.base,X=F.variants;m=m??D.variant,w=w??D.color,E=E??D.shadow,k=k??D.className;var U=(0,c.default)(G.initial),B=(0,c.default)(X[(0,i.default)(W.variants,m,"filled")][(0,i.default)(W.colors,w,"white")]),H=(0,a.twMerge)((0,o.default)(U,B,C({},(0,c.default)(G.shadow),E)),k);return r.default.createElement("div",T({},N,{ref:h,className:H}),P)});l.propTypes={variant:n.default.oneOf(O.propTypesVariant),color:n.default.oneOf(O.propTypesColor),shadow:O.propTypesShadow,className:O.propTypesClassName,children:O.propTypesChildren},l.displayName="MaterialTailwind.Card";var u=Object.assign(l,{Header:g.CardHeader,Body:v.CardBody,Footer:_.CardFooter})})(JO);var rS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Checkbox:function(){return b},default:function(){return d}});var r=C(A),n=C(Fe),o=C(qi),a=C($e),i=Le,c=C(Et),p=C(Ie),g=Ae,v=Da;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.color,h=l.label,m=l.icon,w=l.ripple,E=l.className,k=l.disabled,P=l.containerProps,N=l.labelProps,j=l.iconProps,D=l.inputRef,F=T(l,["color","label","icon","ripple","className","disabled","containerProps","labelProps","iconProps","inputRef"]),W=(0,g.useTheme)().checkbox,G=W.defaultProps,X=W.valid,U=W.styles,B=U.base,H=U.colors,K=r.default.useId();s=s??G.color,h=h??G.label,m=m??G.icon,w=w??G.ripple,E=E??G.className,k=k??G.disabled,P=P??G.containerProps,N=N??G.labelProps,j=j??G.iconProps;var Q=w!==void 0&&new o.default,oe=(0,a.default)((0,p.default)(B.root),_({},(0,p.default)(B.disabled),k)),se=(0,i.twMerge)((0,a.default)((0,p.default)(B.container)),P==null?void 0:P.className),ae=(0,i.twMerge)((0,a.default)((0,p.default)(B.input),(0,p.default)(H[(0,c.default)(X.colors,s,"gray")])),E),ne=(0,i.twMerge)((0,a.default)((0,p.default)(B.label)),N==null?void 0:N.className),me=(0,i.twMerge)((0,a.default)((0,p.default)(B.icon)),j==null?void 0:j.className);return r.default.createElement("div",{ref:u,className:oe},r.default.createElement("label",O({},P,{className:se,htmlFor:F.id||K,onMouseDown:function(fe){var ie=P==null?void 0:P.onMouseDown;return w&&Q.create(fe,"dark"),typeof ie=="function"&&ie(fe)}}),r.default.createElement("input",O({},F,{ref:D,type:"checkbox",disabled:k,className:ae,id:F.id||K})),r.default.createElement("span",{className:me},m||r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:1},r.default.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))),h&&r.default.createElement("label",O({},N,{className:ne,htmlFor:F.id||K}),h))});b.propTypes={color:n.default.oneOf(v.propTypesColor),label:v.propTypesLabel,icon:v.propTypesIcon,ripple:v.propTypesRipple,className:v.propTypesClassName,disabled:v.propTypesDisabled,containerProps:v.propTypesObject,labelProps:v.propTypesObject},b.displayName="MaterialTailwind.Checkbox";var d=b})(rS);var nS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,s){for(var h in s)Object.defineProperty(u,h,{enumerable:!0,get:s[h]})}t(e,{Chip:function(){return d},default:function(){return l}});var r=T(A),n=T(Fe),o=er,a=T($e),i=T(ar),c=Le,p=T(Et),g=T(Ie),v=Ae,_=Dg,O=T(Bd);function C(){return C=Object.assign||function(u){for(var s=1;s=0)&&Object.prototype.propertyIsEnumerable.call(u,m)&&(h[m]=u[m])}return h}function b(u,s){if(u==null)return{};var h={},m=Object.keys(u),w,E;for(E=0;E=0)&&(h[w]=u[w]);return h}var d=r.default.forwardRef(function(u,s){var h=u.variant,m=u.size,w=u.color,E=u.icon,k=u.open,P=u.onClose,N=u.action,j=u.animate,D=u.className,F=u.value,W=x(u,["variant","size","color","icon","open","onClose","action","animate","className","value"]),G=(0,v.useTheme)().chip,X=G.defaultProps,U=G.valid,B=G.styles,H=B.base,K=B.variants,Q=B.sizes;h=h??X.variant,m=m??X.size,w=w??X.color,D=D??X.className,j=j??X.animate,k=k??X.open,N=N??X.action,P=P??X.onClose;var oe=(0,g.default)(H.chip),se=(0,g.default)(H.action),ae=(0,g.default)(H.icon),ne=(0,g.default)(K[(0,p.default)(U.variants,h,"filled")][(0,p.default)(U.colors,w,"gray")]),me=(0,g.default)(Q[(0,p.default)(U.sizes,m,"md")].chip),fe=(0,g.default)(Q[(0,p.default)(U.sizes,m,"md")].action),ie=(0,g.default)(Q[(0,p.default)(U.sizes,m,"md")].icon),ge=(0,c.twMerge)((0,a.default)(oe,ne,me),D),de=(0,a.default)(se,fe),Oe=(0,a.default)(ae,ie),Me=(0,a.default)({"ml-4":E&&m==="sm","ml-[18px]":E&&m==="md","ml-5":E&&m==="lg","mr-5":P}),Ce={unmount:{opacity:0},mount:{opacity:1}},_e=(0,i.default)(Ce,j),Ee=r.default.createElement("div",{className:Oe},E),Ke=o.AnimatePresence;return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(Ke,null,k&&r.default.createElement(o.m.div,C({},W,{ref:s,className:ge,initial:"unmount",exit:"unmount",animate:k?"mount":"unmount",variants:_e}),E&&Ee,r.default.createElement("span",{className:Me},F),P&&!N&&r.default.createElement(O.default,{onClick:P,size:"sm",variant:"text",color:h==="outlined"||h==="ghost"?w:"white",className:de},r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:(0,a.default)({"h-3.5 w-3.5":m==="sm","h-4 w-4":m==="md","h-5 w-5":m==="lg"}),strokeWidth:2},r.default.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))),N||null)))});d.propTypes={variant:n.default.oneOf(_.propTypesVariant),size:n.default.oneOf(_.propTypesSize),color:n.default.oneOf(_.propTypesColor),icon:_.propTypesIcon,open:_.propTypesOpen,onClose:_.propTypesOnClose,action:_.propTypesAction,animate:_.propTypesAnimate,className:_.propTypesClassName,value:_.propTypesValue},d.displayName="MaterialTailwind.Chip";var l=d})(nS);var oS={},CL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xa=new WeakMap,Ou=new WeakMap,Su={},Sp=0,aS=function(e){return e&&(e.host||aS(e.parentNode))},OL=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=aS(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},SL=function(e,t,r,n){var o=OL(t,Array.isArray(e)?e:[e]);Su[r]||(Su[r]=new WeakMap);var a=Su[r],i=[],c=new Set,p=new Set(o),g=function(_){!_||c.has(_)||(c.add(_),g(_.parentNode))};o.forEach(g);var v=function(_){!_||p.has(_)||Array.prototype.forEach.call(_.children,function(O){if(c.has(O))v(O);else try{var C=O.getAttribute(n),T=C!==null&&C!=="false",x=(Xa.get(O)||0)+1,b=(a.get(O)||0)+1;Xa.set(O,x),a.set(O,b),i.push(O),x===1&&T&&Ou.set(O,!0),b===1&&O.setAttribute(r,"true"),T||O.setAttribute(n,"true")}catch(d){console.error("aria-hidden: cannot operate on ",O,d)}})};return v(t),c.clear(),Sp++,function(){i.forEach(function(_){var O=Xa.get(_)-1,C=a.get(_)-1;Xa.set(_,O),a.set(_,C),O||(Ou.has(_)||_.removeAttribute(n),Ou.delete(_)),C||_.removeAttribute(r)}),Sp--,Sp||(Xa=new WeakMap,Xa=new WeakMap,Ou=new WeakMap,Su={})}},PL=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||CL(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),SL(n,o,r,"aria-hidden")):function(){return null}};/*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var kL=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],lh=kL.join(","),iS=typeof Element>"u",ys=iS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xc=!iS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Qc=function e(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),a=o===""||o==="true",i=a||r&&t&&e(t.parentNode);return i},EL=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},RL=function(t,r,n){if(Qc(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(lh));return r&&ys.call(t,lh)&&o.unshift(t),o=o.filter(n),o},NL=function e(t,r,n){for(var o=[],a=Array.from(t);a.length;){var i=a.shift();if(!Qc(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),p=c.length?c:i.children,g=e(p,!0,n);n.flatten?o.push.apply(o,g):o.push({scopeParent:i,candidates:g})}else{var v=ys.call(i,lh);v&&n.filter(i)&&(r||!t.includes(i))&&o.push(i);var _=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),O=!Qc(_,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(_&&O){var C=e(_===!0?i.children:_.children,!0,n);n.flatten?o.push.apply(o,C):o.push({scopeParent:i,candidates:C})}else a.unshift.apply(a,i.children)}}return o},lS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},sS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EL(t))&&!lS(t)?0:t.tabIndex},jL=function(t,r){var n=sS(t);return n<0&&r&&!lS(t)?0:n},AL=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},uS=function(t){return t.tagName==="INPUT"},ML=function(t){return uS(t)&&t.type==="hidden"},IL=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},DL=function(t,r){for(var n=0;nsummary:first-of-type"),i=a?t.parentElement:t;if(ys.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var c=t;t;){var p=t.parentElement,g=Xc(t);if(p&&!p.shadowRoot&&o(p)===!0)return Cw(t);t.assignedSlot?t=t.assignedSlot:!p&&g!==t.ownerDocument?t=g.host:t=p}t=c}if(zL(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Cw(t);return!1},WL=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n=0)},$L=function e(t){var r=[],n=[];return t.forEach(function(o,a){var i=!!o.scopeParent,c=i?o.scopeParent:o,p=jL(c,i),g=i?e(o.candidates):c;p===0?i?r.push.apply(r,g):r.push(c):n.push({documentOrder:a,tabIndex:p,item:o,isScope:i,content:g})}),n.sort(AL).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(r)},Jc=function(t,r){r=r||{};var n;return r.getShadowRoot?n=NL([t],r.includeContainer,{filter:Ow.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:UL}):n=RL(t,r.includeContainer,Ow.bind(null,r)),$L(n)};const cS=["top","right","bottom","left"],Sw=["start","end"],Pw=cS.reduce((e,t)=>e.concat(t,t+"-"+Sw[0],t+"-"+Sw[1]),[]),_n=Math.min,dr=Math.max,Zc=Math.round,Pu=Math.floor,Dn=e=>({x:e,y:e}),qL={left:"right",right:"left",bottom:"top",top:"bottom"},GL={start:"end",end:"start"};function sh(e,t,r){return dr(e,_n(t,r))}function Tn(e,t){return typeof e=="function"?e(t):e}function zr(e){return e.split("-")[0]}function yn(e){return e.split("-")[1]}function db(e){return e==="x"?"y":"x"}function fb(e){return e==="y"?"height":"width"}const KL=new Set(["top","bottom"]);function bn(e){return KL.has(zr(e))?"y":"x"}function pb(e){return db(bn(e))}function dS(e,t,r){r===void 0&&(r=!1);const n=yn(e),o=pb(e),a=fb(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=td(i)),[i,td(i)]}function YL(e){const t=td(e);return[ed(e),t,ed(t)]}function ed(e){return e.replace(/start|end/g,t=>GL[t])}const kw=["left","right"],Ew=["right","left"],XL=["top","bottom"],QL=["bottom","top"];function JL(e,t,r){switch(e){case"top":case"bottom":return r?t?Ew:kw:t?kw:Ew;case"left":case"right":return t?XL:QL;default:return[]}}function ZL(e,t,r,n){const o=yn(e);let a=JL(zr(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ed)))),a}function td(e){return e.replace(/left|right|bottom|top/g,t=>qL[t])}function e3(e){return{top:0,right:0,bottom:0,left:0,...e}}function hb(e){return typeof e!="number"?e3(e):{top:e,right:e,bottom:e,left:e}}function Di(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Rw(e,t,r){let{reference:n,floating:o}=e;const a=bn(t),i=pb(t),c=fb(i),p=zr(t),g=a==="y",v=n.x+n.width/2-o.width/2,_=n.y+n.height/2-o.height/2,O=n[c]/2-o[c]/2;let C;switch(p){case"top":C={x:v,y:n.y-o.height};break;case"bottom":C={x:v,y:n.y+n.height};break;case"right":C={x:n.x+n.width,y:_};break;case"left":C={x:n.x-o.width,y:_};break;default:C={x:n.x,y:n.y}}switch(yn(t)){case"start":C[i]-=O*(r&&g?-1:1);break;case"end":C[i]+=O*(r&&g?-1:1);break}return C}const t3=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,c=a.filter(Boolean),p=await(i.isRTL==null?void 0:i.isRTL(t));let g=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:v,y:_}=Rw(g,n,p),O=n,C={},T=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:c,middlewareData:p}=t,{element:g,padding:v=0}=Tn(e,t)||{};if(g==null)return{};const _=hb(v),O={x:r,y:n},C=pb(o),T=fb(C),x=await i.getDimensions(g),b=C==="y",d=b?"top":"left",l=b?"bottom":"right",u=b?"clientHeight":"clientWidth",s=a.reference[T]+a.reference[C]-O[C]-a.floating[T],h=O[C]-a.reference[C],m=await(i.getOffsetParent==null?void 0:i.getOffsetParent(g));let w=m?m[u]:0;(!w||!await(i.isElement==null?void 0:i.isElement(m)))&&(w=c.floating[u]||a.floating[T]);const E=s/2-h/2,k=w/2-x[T]/2-1,P=_n(_[d],k),N=_n(_[l],k),j=P,D=w-x[T]-N,F=w/2-x[T]/2+E,W=sh(j,F,D),G=!p.arrow&&yn(o)!=null&&F!==W&&a.reference[T]/2-(Fyn(o)===e),...r.filter(o=>yn(o)!==e)]:r.filter(o=>zr(o)===o)).filter(o=>e?yn(o)===e||(t?ed(o)!==o:!1):!0)}const o3=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,o;const{rects:a,middlewareData:i,placement:c,platform:p,elements:g}=t,{crossAxis:v=!1,alignment:_,allowedPlacements:O=Pw,autoAlignment:C=!0,...T}=Tn(e,t),x=_!==void 0||O===Pw?n3(_||null,C,O):O,b=await Oa(t,T),d=((r=i.autoPlacement)==null?void 0:r.index)||0,l=x[d];if(l==null)return{};const u=dS(l,a,await(p.isRTL==null?void 0:p.isRTL(g.floating)));if(c!==l)return{reset:{placement:x[0]}};const s=[b[zr(l)],b[u[0]],b[u[1]]],h=[...((n=i.autoPlacement)==null?void 0:n.overflows)||[],{placement:l,overflows:s}],m=x[d+1];if(m)return{data:{index:d+1,overflows:h},reset:{placement:m}};const w=h.map(P=>{const N=yn(P.placement);return[P.placement,N&&v?P.overflows.slice(0,2).reduce((j,D)=>j+D,0):P.overflows[0],P.overflows]}).sort((P,N)=>P[1]-N[1]),k=((o=w.filter(P=>P[2].slice(0,yn(P[0])?2:3).every(N=>N<=0))[0])==null?void 0:o[0])||w[0][0];return k!==c?{data:{index:d+1,overflows:h},reset:{placement:k}}:{}}}},a3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:p,elements:g}=t,{mainAxis:v=!0,crossAxis:_=!0,fallbackPlacements:O,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:x=!0,...b}=Tn(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const d=zr(o),l=bn(c),u=zr(c)===c,s=await(p.isRTL==null?void 0:p.isRTL(g.floating)),h=O||(u||!x?[td(c)]:YL(c)),m=T!=="none";!O&&m&&h.push(...ZL(c,x,T,s));const w=[c,...h],E=await Oa(t,b),k=[];let P=((n=a.flip)==null?void 0:n.overflows)||[];if(v&&k.push(E[d]),_){const F=dS(o,i,s);k.push(E[F[0]],E[F[1]])}if(P=[...P,{placement:o,overflows:k}],!k.every(F=>F<=0)){var N,j;const F=(((N=a.flip)==null?void 0:N.index)||0)+1,W=w[F];if(W&&(!(_==="alignment"?l!==bn(W):!1)||P.every(U=>bn(U.placement)===l?U.overflows[0]>0:!0)))return{data:{index:F,overflows:P},reset:{placement:W}};let G=(j=P.filter(X=>X.overflows[0]<=0).sort((X,U)=>X.overflows[1]-U.overflows[1])[0])==null?void 0:j.placement;if(!G)switch(C){case"bestFit":{var D;const X=(D=P.filter(U=>{if(m){const B=bn(U.placement);return B===l||B==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(B=>B>0).reduce((B,H)=>B+H,0)]).sort((U,B)=>U[1]-B[1])[0])==null?void 0:D[0];X&&(G=X);break}case"initialPlacement":G=c;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function Nw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jw(e){return cS.some(t=>e[t]>=0)}const i3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Tn(e,t);switch(n){case"referenceHidden":{const a=await Oa(t,{...o,elementContext:"reference"}),i=Nw(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:jw(i)}}}case"escaped":{const a=await Oa(t,{...o,altBoundary:!0}),i=Nw(a,r.floating);return{data:{escapedOffsets:i,escaped:jw(i)}}}default:return{}}}}};function fS(e){const t=_n(...e.map(a=>a.left)),r=_n(...e.map(a=>a.top)),n=dr(...e.map(a=>a.right)),o=dr(...e.map(a=>a.bottom));return{x:t,y:r,width:n-t,height:o-r}}function l3(e){const t=e.slice().sort((o,a)=>o.y-a.y),r=[];let n=null;for(let o=0;on.height/2?r.push([a]):r[r.length-1].push(a),n=a}return r.map(o=>Di(fS(o)))}const s3=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:a,strategy:i}=t,{padding:c=2,x:p,y:g}=Tn(e,t),v=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(n.reference))||[]),_=l3(v),O=Di(fS(v)),C=hb(c);function T(){if(_.length===2&&_[0].left>_[1].right&&p!=null&&g!=null)return _.find(b=>p>b.left-C.left&&pb.top-C.top&&g=2){if(bn(r)==="y"){const P=_[0],N=_[_.length-1],j=zr(r)==="top",D=P.top,F=N.bottom,W=j?P.left:N.left,G=j?P.right:N.right,X=G-W,U=F-D;return{top:D,bottom:F,left:W,right:G,width:X,height:U,x:W,y:D}}const b=zr(r)==="left",d=dr(..._.map(P=>P.right)),l=_n(..._.map(P=>P.left)),u=_.filter(P=>b?P.left===l:P.right===d),s=u[0].top,h=u[u.length-1].bottom,m=l,w=d,E=w-m,k=h-s;return{top:s,bottom:h,left:m,right:w,width:E,height:k,x:m,y:s}}return O}const x=await a.getElementRects({reference:{getBoundingClientRect:T},floating:n.floating,strategy:i});return o.reference.x!==x.reference.x||o.reference.y!==x.reference.y||o.reference.width!==x.reference.width||o.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}},pS=new Set(["left","top"]);async function u3(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=zr(r),c=yn(r),p=bn(r)==="y",g=pS.has(i)?-1:1,v=a&&p?-1:1,_=Tn(t,e);let{mainAxis:O,crossAxis:C,alignmentAxis:T}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return c&&typeof T=="number"&&(C=c==="end"?T*-1:T),p?{x:C*v,y:O*g}:{x:O*g,y:C*v}}const c3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:c}=t,p=await u3(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+p.x,y:a+p.y,data:{...p,placement:i}}}}},d3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:b=>{let{x:d,y:l}=b;return{x:d,y:l}}},...p}=Tn(e,t),g={x:r,y:n},v=await Oa(t,p),_=bn(zr(o)),O=db(_);let C=g[O],T=g[_];if(a){const b=O==="y"?"top":"left",d=O==="y"?"bottom":"right",l=C+v[b],u=C-v[d];C=sh(l,C,u)}if(i){const b=_==="y"?"top":"left",d=_==="y"?"bottom":"right",l=T+v[b],u=T-v[d];T=sh(l,T,u)}const x=c.fn({...t,[O]:C,[_]:T});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[O]:a,[_]:i}}}}}},f3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:p=!0,crossAxis:g=!0}=Tn(e,t),v={x:r,y:n},_=bn(o),O=db(_);let C=v[O],T=v[_];const x=Tn(c,t),b=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(p){const u=O==="y"?"height":"width",s=a.reference[O]-a.floating[u]+b.mainAxis,h=a.reference[O]+a.reference[u]-b.mainAxis;Ch&&(C=h)}if(g){var d,l;const u=O==="y"?"width":"height",s=pS.has(zr(o)),h=a.reference[_]-a.floating[u]+(s&&((d=i.offset)==null?void 0:d[_])||0)+(s?0:b.crossAxis),m=a.reference[_]+a.reference[u]+(s?0:((l=i.offset)==null?void 0:l[_])||0)-(s?b.crossAxis:0);Tm&&(T=m)}return{[O]:C,[_]:T}}}},p3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:p=()=>{},...g}=Tn(e,t),v=await Oa(t,g),_=zr(o),O=yn(o),C=bn(o)==="y",{width:T,height:x}=a.floating;let b,d;_==="top"||_==="bottom"?(b=_,d=O===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(d=_,b=O==="end"?"top":"bottom");const l=x-v.top-v.bottom,u=T-v.left-v.right,s=_n(x-v[b],l),h=_n(T-v[d],u),m=!t.middlewareData.shift;let w=s,E=h;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=u),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(w=l),m&&!O){const P=dr(v.left,0),N=dr(v.right,0),j=dr(v.top,0),D=dr(v.bottom,0);C?E=T-2*(P!==0||N!==0?P+N:dr(v.left,v.right)):w=x-2*(j!==0||D!==0?j+D:dr(v.top,v.bottom))}await p({...t,availableWidth:E,availableHeight:w});const k=await i.getDimensions(c.floating);return T!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function Wd(){return typeof window<"u"}function Gi(e){return hS(e)?(e.nodeName||"").toLowerCase():"#document"}function Dr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zn(e){var t;return(t=(hS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hS(e){return Wd()?e instanceof Node||e instanceof Dr(e).Node:!1}function Cn(e){return Wd()?e instanceof Element||e instanceof Dr(e).Element:!1}function Fn(e){return Wd()?e instanceof HTMLElement||e instanceof Dr(e).HTMLElement:!1}function Aw(e){return!Wd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dr(e).ShadowRoot}const h3=new Set(["inline","contents"]);function Ls(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=On(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!h3.has(o)}const g3=new Set(["table","td","th"]);function b3(e){return g3.has(Gi(e))}const v3=[":popover-open",":modal"];function Hd(e){return v3.some(t=>{try{return e.matches(t)}catch{return!1}})}const m3=["transform","translate","scale","rotate","perspective"],y3=["transform","translate","scale","rotate","perspective","filter"],w3=["paint","layout","strict","content"];function gb(e){const t=bb(),r=Cn(e)?On(e):e;return m3.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||y3.some(n=>(r.willChange||"").includes(n))||w3.some(n=>(r.contain||"").includes(n))}function x3(e){let t=Go(e);for(;Fn(t)&&!Li(t);){if(gb(t))return t;if(Hd(t))return null;t=Go(t)}return null}function bb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _3=new Set(["html","body","#document"]);function Li(e){return _3.has(Gi(e))}function On(e){return Dr(e).getComputedStyle(e)}function Ud(e){return Cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Go(e){if(Gi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Aw(e)&&e.host||zn(e);return Aw(t)?t.host:t}function gS(e){const t=Go(e);return Li(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fn(t)&&Ls(t)?t:gS(t)}function Xn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=gS(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Dr(o);if(a){const c=uh(i);return t.concat(i,i.visualViewport||[],Ls(o)?o:[],c&&r?Xn(c):[])}return t.concat(o,Xn(o,[],r))}function uh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bS(e){const t=On(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Fn(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,c=Zc(r)!==a||Zc(n)!==i;return c&&(r=a,n=i),{width:r,height:n,$:c}}function vb(e){return Cn(e)?e:e.contextElement}function _i(e){const t=vb(e);if(!Fn(t))return Dn(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=bS(t);let i=(a?Zc(r.width):r.width)/n,c=(a?Zc(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const T3=Dn(0);function vS(e){const t=Dr(e);return!bb()||!t.visualViewport?T3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function C3(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Dr(e)?!1:t}function Sa(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=vb(e);let i=Dn(1);t&&(n?Cn(n)&&(i=_i(n)):i=_i(e));const c=C3(a,r,n)?vS(a):Dn(0);let p=(o.left+c.x)/i.x,g=(o.top+c.y)/i.y,v=o.width/i.x,_=o.height/i.y;if(a){const O=Dr(a),C=n&&Cn(n)?Dr(n):n;let T=O,x=uh(T);for(;x&&n&&C!==T;){const b=_i(x),d=x.getBoundingClientRect(),l=On(x),u=d.left+(x.clientLeft+parseFloat(l.paddingLeft))*b.x,s=d.top+(x.clientTop+parseFloat(l.paddingTop))*b.y;p*=b.x,g*=b.y,v*=b.x,_*=b.y,p+=u,g+=s,T=Dr(x),x=uh(T)}}return Di({width:v,height:_,x:p,y:g})}function $d(e,t){const r=Ud(e).scrollLeft;return t?t.left+r:Sa(zn(e)).left+r}function mS(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-$d(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function O3(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=zn(n),c=t?Hd(t.floating):!1;if(n===i||c&&a)return r;let p={scrollLeft:0,scrollTop:0},g=Dn(1);const v=Dn(0),_=Fn(n);if((_||!_&&!a)&&((Gi(n)!=="body"||Ls(i))&&(p=Ud(n)),Fn(n))){const C=Sa(n);g=_i(n),v.x=C.x+n.clientLeft,v.y=C.y+n.clientTop}const O=i&&!_&&!a?mS(i,p):Dn(0);return{width:r.width*g.x,height:r.height*g.y,x:r.x*g.x-p.scrollLeft*g.x+v.x+O.x,y:r.y*g.y-p.scrollTop*g.y+v.y+O.y}}function S3(e){return Array.from(e.getClientRects())}function P3(e){const t=zn(e),r=Ud(e),n=e.ownerDocument.body,o=dr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=dr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+$d(e);const c=-r.scrollTop;return On(n).direction==="rtl"&&(i+=dr(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:c}}const Mw=25;function k3(e,t){const r=Dr(e),n=zn(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,c=0,p=0;if(o){a=o.width,i=o.height;const v=bb();(!v||v&&t==="fixed")&&(c=o.offsetLeft,p=o.offsetTop)}const g=$d(n);if(g<=0){const v=n.ownerDocument,_=v.body,O=getComputedStyle(_),C=v.compatMode==="CSS1Compat"&&parseFloat(O.marginLeft)+parseFloat(O.marginRight)||0,T=Math.abs(n.clientWidth-_.clientWidth-C);T<=Mw&&(a-=T)}else g<=Mw&&(a+=g);return{width:a,height:i,x:c,y:p}}const E3=new Set(["absolute","fixed"]);function R3(e,t){const r=Sa(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Fn(e)?_i(e):Dn(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,p=o*a.x,g=n*a.y;return{width:i,height:c,x:p,y:g}}function Iw(e,t,r){let n;if(t==="viewport")n=k3(e,r);else if(t==="document")n=P3(zn(e));else if(Cn(t))n=R3(t,r);else{const o=vS(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Di(n)}function yS(e,t){const r=Go(e);return r===t||!Cn(r)||Li(r)?!1:On(r).position==="fixed"||yS(r,t)}function N3(e,t){const r=t.get(e);if(r)return r;let n=Xn(e,[],!1).filter(c=>Cn(c)&&Gi(c)!=="body"),o=null;const a=On(e).position==="fixed";let i=a?Go(e):e;for(;Cn(i)&&!Li(i);){const c=On(i),p=gb(i);!p&&c.position==="fixed"&&(o=null),(a?!p&&!o:!p&&c.position==="static"&&!!o&&E3.has(o.position)||Ls(i)&&!p&&yS(e,i))?n=n.filter(v=>v!==i):o=c,i=Go(i)}return t.set(e,n),n}function j3(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Hd(t)?[]:N3(t,this._c):[].concat(r),n],c=i[0],p=i.reduce((g,v)=>{const _=Iw(t,v,o);return g.top=dr(_.top,g.top),g.right=_n(_.right,g.right),g.bottom=_n(_.bottom,g.bottom),g.left=dr(_.left,g.left),g},Iw(t,c,o));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function A3(e){const{width:t,height:r}=bS(e);return{width:t,height:r}}function M3(e,t,r){const n=Fn(t),o=zn(t),a=r==="fixed",i=Sa(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const p=Dn(0);function g(){p.x=$d(o)}if(n||!n&&!a)if((Gi(t)!=="body"||Ls(o))&&(c=Ud(t)),n){const C=Sa(t,!0,a,t);p.x=C.x+t.clientLeft,p.y=C.y+t.clientTop}else o&&g();a&&!n&&o&&g();const v=o&&!n&&!a?mS(o,c):Dn(0),_=i.left+c.scrollLeft-p.x-v.x,O=i.top+c.scrollTop-p.y-v.y;return{x:_,y:O,width:i.width,height:i.height}}function Pp(e){return On(e).position==="static"}function Dw(e,t){if(!Fn(e)||On(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return zn(e)===r&&(r=r.ownerDocument.body),r}function wS(e,t){const r=Dr(e);if(Hd(e))return r;if(!Fn(e)){let o=Go(e);for(;o&&!Li(o);){if(Cn(o)&&!Pp(o))return o;o=Go(o)}return r}let n=Dw(e,t);for(;n&&b3(n)&&Pp(n);)n=Dw(n,t);return n&&Li(n)&&Pp(n)&&!gb(n)?r:n||x3(e)||r}const I3=async function(e){const t=this.getOffsetParent||wS,r=this.getDimensions,n=await r(e.floating);return{reference:M3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function D3(e){return On(e).direction==="rtl"}const xS={convertOffsetParentRelativeRectToViewportRelativeRect:O3,getDocumentElement:zn,getClippingRect:j3,getOffsetParent:wS,getElementRects:I3,getClientRects:S3,getDimensions:A3,getScale:_i,isElement:Cn,isRTL:D3};function _S(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function L3(e,t){let r=null,n;const o=zn(e);function a(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function i(c,p){c===void 0&&(c=!1),p===void 0&&(p=1),a();const g=e.getBoundingClientRect(),{left:v,top:_,width:O,height:C}=g;if(c||t(),!O||!C)return;const T=Pu(_),x=Pu(o.clientWidth-(v+O)),b=Pu(o.clientHeight-(_+C)),d=Pu(v),u={rootMargin:-T+"px "+-x+"px "+-b+"px "+-d+"px",threshold:dr(0,_n(1,p))||1};let s=!0;function h(m){const w=m[0].intersectionRatio;if(w!==p){if(!s)return i();w?i(!1,w):n=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!_S(g,e.getBoundingClientRect())&&i(),s=!1}try{r=new IntersectionObserver(h,{...u,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,u)}r.observe(e)}return i(!0),a}function F3(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:p=!1}=n,g=vb(e),v=o||a?[...g?Xn(g):[],...Xn(t)]:[];v.forEach(d=>{o&&d.addEventListener("scroll",r,{passive:!0}),a&&d.addEventListener("resize",r)});const _=g&&c?L3(g,r):null;let O=-1,C=null;i&&(C=new ResizeObserver(d=>{let[l]=d;l&&l.target===g&&C&&(C.unobserve(t),cancelAnimationFrame(O),O=requestAnimationFrame(()=>{var u;(u=C)==null||u.observe(t)})),r()}),g&&!p&&C.observe(g),C.observe(t));let T,x=p?Sa(e):null;p&&b();function b(){const d=Sa(e);x&&!_S(x,d)&&r(),x=d,T=requestAnimationFrame(b)}return r(),()=>{var d;v.forEach(l=>{o&&l.removeEventListener("scroll",r),a&&l.removeEventListener("resize",r)}),_==null||_(),(d=C)==null||d.disconnect(),C=null,p&&cancelAnimationFrame(T)}}const ec=Oa,TS=c3,V3=o3,z3=d3,B3=a3,W3=p3,H3=i3,Lw=r3,U3=s3,$3=f3,CS=(e,t,r)=>{const n=new Map,o={platform:xS,...r},a={...o.platform,_c:n};return t3(e,t,{...o,platform:a})},q3=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?Lw({element:t.current,padding:r}).fn(o):{}:t?Lw({element:t,padding:r}).fn(o):{}}}};var tc=typeof document<"u"?A.useLayoutEffect:A.useEffect;function rd(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,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!rd(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!rd(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Fw(e){const t=A.useRef(e);return tc(()=>{t.current=e}),t}function G3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:a,open:i}=e,[c,p]=A.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=A.useState(n);rd(g,n)||v(n);const _=A.useRef(null),O=A.useRef(null),C=A.useRef(c),T=Fw(a),x=Fw(o),[b,d]=A.useState(null),[l,u]=A.useState(null),s=A.useCallback(P=>{_.current!==P&&(_.current=P,d(P))},[]),h=A.useCallback(P=>{O.current!==P&&(O.current=P,u(P))},[]),m=A.useCallback(()=>{if(!_.current||!O.current)return;const P={placement:t,strategy:r,middleware:g};x.current&&(P.platform=x.current),CS(_.current,O.current,P).then(N=>{const j={...N,isPositioned:!0};w.current&&!rd(C.current,j)&&(C.current=j,to.flushSync(()=>{p(j)}))})},[g,t,r,x]);tc(()=>{i===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[i]);const w=A.useRef(!1);tc(()=>(w.current=!0,()=>{w.current=!1}),[]),tc(()=>{if(b&&l){if(T.current)return T.current(b,l,m);m()}},[b,l,m,T]);const E=A.useMemo(()=>({reference:_,floating:O,setReference:s,setFloating:h}),[s,h]),k=A.useMemo(()=>({reference:b,floating:l}),[b,l]);return A.useMemo(()=>({...c,update:m,refs:E,elements:k,reference:s,floating:h}),[c,m,E,k,s,h])}var Mt=typeof document<"u"?A.useLayoutEffect:A.useEffect;let kp=!1,K3=0;const Vw=()=>"floating-ui-"+K3++;function Y3(){const[e,t]=A.useState(()=>kp?Vw():void 0);return Mt(()=>{e==null&&t(Vw())},[]),A.useEffect(()=>{kp||(kp=!0)},[]),e}const X3=Nh["useId".toString()],ws=X3||Y3;function OS(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const SS=A.createContext(null),PS=A.createContext(null),Ki=()=>{var e;return((e=A.useContext(SS))==null?void 0:e.id)||null},Fa=()=>A.useContext(PS),Q3=e=>{const t=ws(),r=Fa(),n=Ki(),o=e||n;return Mt(()=>{const a={id:t,parentId:o};return r==null||r.addNode(a),()=>{r==null||r.removeNode(a)}},[r,t,o]),t},J3=e=>{let{children:t,id:r}=e;const n=Ki();return A.createElement(SS.Provider,{value:A.useMemo(()=>({id:r,parentId:n}),[r,n])},t)},Z3=e=>{let{children:t}=e;const r=A.useRef([]),n=A.useCallback(i=>{r.current=[...r.current,i]},[]),o=A.useCallback(i=>{r.current=r.current.filter(c=>c!==i)},[]),a=A.useState(()=>OS())[0];return A.createElement(PS.Provider,{value:A.useMemo(()=>({nodesRef:r,addNode:n,removeNode:o,events:a}),[r,n,o,a])},t)};function Sr(e){return(e==null?void 0:e.ownerDocument)||document}function mb(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kS(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function yb(e){return Sr(e).defaultView||window}function tn(e){return e?e instanceof yb(e).Element:!1}function Pa(e){return e?e instanceof yb(e).HTMLElement:!1}function eF(e){if(typeof ShadowRoot>"u")return!1;const t=yb(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ES(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(mb())||t.test(kS()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function RS(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function ch(){return/apple/i.test(navigator.vendor)}function NS(){return mb().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function nd(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function rn(e){const t=A.useRef(e);return Mt(()=>{t.current=e}),t}const zw="data-floating-ui-safe-polygon";function rc(e,t,r){return r&&!nd(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const tF=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:a=!1,restMs:i=0,move:c=!0}=t===void 0?{}:t;const{open:p,onOpenChange:g,dataRef:v,events:_,elements:{domReference:O,floating:C},refs:T}=e,x=Fa(),b=Ki(),d=rn(o),l=rn(n),u=A.useRef(),s=A.useRef(),h=A.useRef(),m=A.useRef(),w=A.useRef(!0),E=A.useRef(!1),k=A.useRef(()=>{}),P=A.useCallback(()=>{var F;const W=(F=v.current.openEvent)==null?void 0:F.type;return(W==null?void 0:W.includes("mouse"))&&W!=="mousedown"},[v]);A.useEffect(()=>{if(!r)return;function F(){clearTimeout(s.current),clearTimeout(m.current),w.current=!0}return _.on("dismiss",F),()=>{_.off("dismiss",F)}},[r,_]),A.useEffect(()=>{if(!r||!d.current||!p)return;function F(){P()&&g(!1)}const W=Sr(C).documentElement;return W.addEventListener("mouseleave",F),()=>{W.removeEventListener("mouseleave",F)}},[C,p,g,r,d,v,P]);const N=A.useCallback(function(F){F===void 0&&(F=!0);const W=rc(l.current,"close",u.current);W&&!h.current?(clearTimeout(s.current),s.current=setTimeout(()=>g(!1),W)):F&&(clearTimeout(s.current),g(!1))},[l,g]),j=A.useCallback(()=>{k.current(),h.current=void 0},[]),D=A.useCallback(()=>{if(E.current){const F=Sr(T.floating.current).body;F.style.pointerEvents="",F.removeAttribute(zw),E.current=!1}},[T]);return A.useEffect(()=>{if(!r)return;function F(){return v.current.openEvent?["click","mousedown"].includes(v.current.openEvent.type):!1}function W(U){if(clearTimeout(s.current),w.current=!1,a&&!nd(u.current)||i>0&&rc(l.current,"open")===0)return;v.current.openEvent=U;const B=rc(l.current,"open",u.current);B?s.current=setTimeout(()=>{g(!0)},B):g(!0)}function G(U){if(F())return;k.current();const B=Sr(C);if(clearTimeout(m.current),d.current){clearTimeout(s.current),h.current=d.current({...e,tree:x,x:U.clientX,y:U.clientY,onClose(){D(),j(),N()}});const H=h.current;B.addEventListener("mousemove",H),k.current=()=>{B.removeEventListener("mousemove",H)};return}N()}function X(U){F()||d.current==null||d.current({...e,tree:x,x:U.clientX,y:U.clientY,onClose(){j(),N()}})(U)}if(tn(O)){const U=O;return p&&U.addEventListener("mouseleave",X),C==null||C.addEventListener("mouseleave",X),c&&U.addEventListener("mousemove",W,{once:!0}),U.addEventListener("mouseenter",W),U.addEventListener("mouseleave",G),()=>{p&&U.removeEventListener("mouseleave",X),C==null||C.removeEventListener("mouseleave",X),c&&U.removeEventListener("mousemove",W),U.removeEventListener("mouseenter",W),U.removeEventListener("mouseleave",G)}}},[O,C,r,e,a,i,c,N,j,D,g,p,x,l,d,v]),Mt(()=>{var F;if(r&&p&&(F=d.current)!=null&&F.__options.blockPointerEvents&&P()){const X=Sr(C).body;if(X.setAttribute(zw,""),X.style.pointerEvents="none",E.current=!0,tn(O)&&C){var W,G;const U=O,B=x==null||(W=x.nodesRef.current.find(H=>H.id===b))==null||(G=W.context)==null?void 0:G.elements.floating;return B&&(B.style.pointerEvents=""),U.style.pointerEvents="auto",C.style.pointerEvents="auto",()=>{U.style.pointerEvents="",C.style.pointerEvents=""}}}},[r,p,b,C,O,x,d,v,P]),Mt(()=>{p||(u.current=void 0,j(),D())},[p,j,D]),A.useEffect(()=>()=>{j(),clearTimeout(s.current),clearTimeout(m.current),D()},[r,j,D]),A.useMemo(()=>{if(!r)return{};function F(W){u.current=W.pointerType}return{reference:{onPointerDown:F,onPointerEnter:F,onMouseMove(){p||i===0||(clearTimeout(m.current),m.current=setTimeout(()=>{w.current||g(!0)},i))}},floating:{onMouseEnter(){clearTimeout(s.current)},onMouseLeave(){_.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),N(!1)}}}},[_,r,i,p,g,N])},jS=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),AS=()=>A.useContext(jS),rF=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,a]=A.useReducer((p,g)=>({...p,...g}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),i=A.useRef(null),c=A.useCallback(p=>{a({currentId:p})},[]);return Mt(()=>{o.currentId?i.current===null?i.current=o.currentId:a({isInstantPhase:!0}):(a({isInstantPhase:!1}),i.current=null)},[o.currentId]),A.createElement(jS.Provider,{value:A.useMemo(()=>({...o,setState:a,setCurrentId:c}),[o,a,c])},t)},nF=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:a,setCurrentId:i,initialDelay:c,setState:p,timeoutMs:g}=AS();A.useEffect(()=>{a&&(p({delay:{open:1,close:rc(c,"close")}}),a!==o&&n(!1))},[o,n,p,a,c]),A.useEffect(()=>{function v(){n(!1),p({delay:c,currentId:null})}if(!r&&a===o)if(g){const _=window.setTimeout(v,g);return()=>{clearTimeout(_)}}else v()},[r,p,a,o,n,c,g]),A.useEffect(()=>{r&&i(o)},[r,i,o])};function xs(){return xs=Object.assign||function(e){for(var t=1;te==null?void 0:e.focus({preventScroll:r});o?a():Bw=requestAnimationFrame(a)}function oF(e,t){var r;let n=[],o=(r=e.find(a=>a.id===t))==null?void 0:r.parentId;for(;o;){const a=e.find(i=>i.id===o);o=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function Gl(e,t){let r=e.filter(o=>{var a;return o.parentId===t&&((a=o.context)==null?void 0:a.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var a;return(a=n)==null?void 0:a.some(i=>{var c;return o.parentId===i.id&&((c=o.context)==null?void 0:c.open)})})||[],r=r.concat(n);return r}function qd(e){return"composedPath"in e?e.composedPath()[0]:e.target}const aF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function MS(e){return Pa(e)&&e.matches(aF)}function Xr(e){e.preventDefault(),e.stopPropagation()}const od=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function IS(e,t){const r=Jc(e,od());t==="prev"&&r.reverse();const n=r.indexOf(ka(Sr(e)));return r.slice(n+1)[0]}function DS(){return IS(document.body,"next")}function LS(){return IS(document.body,"prev")}function Kl(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!_r(r,n)}function iF(e){Jc(e,od()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function lF(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const sF=Nh["useInsertionEffect".toString()],uF=sF||(e=>e());function Yi(e){const t=A.useRef(()=>{});return uF(()=>{t.current=e}),A.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o(ch()&&a("button"),document.addEventListener("keydown",Ww),()=>{document.removeEventListener("keydown",Ww)}),[]),A.createElement("span",xs({},t,{ref:r,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,"data-floating-ui-focus-guard":"",style:wb,onFocus:i=>{ch()&&NS()&&!cF(i)?(i.persist(),xb=window.setTimeout(()=>{n(i)},50)):n(i)}}))}),FS=A.createContext(null),VS=function(e){let{id:t,enabled:r=!0}=e===void 0?{}:e;const[n,o]=A.useState(null),a=ws(),i=zS();return Mt(()=>{if(!r)return;const c=t?document.getElementById(t):null;if(c)c.setAttribute("data-floating-ui-portal",""),o(c);else{const p=document.createElement("div");t!==""&&(p.id=t||a),p.setAttribute("data-floating-ui-portal",""),o(p);const g=(i==null?void 0:i.portalNode)||document.body;return g.appendChild(p),()=>{g.removeChild(p)}}},[t,i,a,r]),n},dF=e=>{let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e;const a=VS({id:r,enabled:!n}),[i,c]=A.useState(null),p=A.useRef(null),g=A.useRef(null),v=A.useRef(null),_=A.useRef(null),O=!!i&&!i.modal&&!!(n||a)&&o;return A.useEffect(()=>{if(!a||!o||i!=null&&i.modal)return;function C(T){a&&Kl(T)&&(T.type==="focusin"?lF:iF)(a)}return a.addEventListener("focusin",C,!0),a.addEventListener("focusout",C,!0),()=>{a.removeEventListener("focusin",C,!0),a.removeEventListener("focusout",C,!0)}},[a,o,i==null?void 0:i.modal]),A.createElement(FS.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:v,afterInsideRef:_,portalNode:a,setFocusManagerState:c}),[o,a])},O&&a&&A.createElement(ad,{"data-type":"outside",ref:p,onFocus:C=>{if(Kl(C,a)){var T;(T=v.current)==null||T.focus()}else{const x=LS()||(i==null?void 0:i.refs.domReference.current);x==null||x.focus()}}}),O&&a&&A.createElement("span",{"aria-owns":a.id,style:wb}),n?to.createPortal(t,n):a?to.createPortal(t,a):null,O&&a&&A.createElement(ad,{"data-type":"outside",ref:g,onFocus:C=>{if(Kl(C,a)){var T;(T=_.current)==null||T.focus()}else{const x=DS()||(i==null?void 0:i.refs.domReference.current);x==null||x.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1))}}}))},zS=()=>A.useContext(FS),fF=A.forwardRef(function(t,r){return A.createElement("button",xs({},t,{type:"button",ref:r,tabIndex:-1,style:wb}))});function pF(e){let{context:t,children:r,order:n=["content"],guards:o=!0,initialFocus:a=0,returnFocus:i=!0,modal:c=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:g=!0}=e;const{refs:v,nodeId:_,onOpenChange:O,events:C,dataRef:T,elements:{domReference:x,floating:b}}=t,d=rn(n),l=Fa(),u=zS(),[s,h]=A.useState(null),m=typeof a=="number"&&a<0,w=A.useRef(null),E=A.useRef(null),k=A.useRef(!1),P=A.useRef(null),N=A.useRef(!1),j=u!=null,D=x&&x.getAttribute("role")==="combobox"&&MS(x),F=A.useCallback(function(U){return U===void 0&&(U=b),U?Jc(U,od()):[]},[b]),W=A.useCallback(U=>{const B=F(U);return d.current.map(H=>x&&H==="reference"?x:b&&H==="floating"?b:B).filter(Boolean).flat()},[x,b,d,F]);A.useEffect(()=>{if(!c)return;function U(H){if(H.key==="Tab"){F().length===0&&!D&&Xr(H);const K=W(),Q=qd(H);d.current[0]==="reference"&&Q===x&&(Xr(H),H.shiftKey?Oo(K[K.length-1]):Oo(K[1])),d.current[1]==="floating"&&Q===b&&H.shiftKey&&(Xr(H),Oo(K[0]))}}const B=Sr(b);return B.addEventListener("keydown",U),()=>{B.removeEventListener("keydown",U)}},[x,b,c,d,v,D,F,W]),A.useEffect(()=>{if(!g)return;function U(){N.current=!0,setTimeout(()=>{N.current=!1})}function B(H){const K=H.relatedTarget,Q=!(_r(x,K)||_r(b,K)||_r(K,b)||_r(u==null?void 0:u.portalNode,K)||K!=null&&K.hasAttribute("data-floating-ui-focus-guard")||l&&(Gl(l.nodesRef.current,_).find(oe=>{var se,ae;return _r((se=oe.context)==null?void 0:se.elements.floating,K)||_r((ae=oe.context)==null?void 0:ae.elements.domReference,K)})||oF(l.nodesRef.current,_).find(oe=>{var se,ae;return((se=oe.context)==null?void 0:se.elements.floating)===K||((ae=oe.context)==null?void 0:ae.elements.domReference)===K})));K&&Q&&!N.current&&K!==P.current&&(k.current=!0,setTimeout(()=>O(!1)))}if(b&&Pa(x))return x.addEventListener("focusout",B),x.addEventListener("pointerdown",U),!c&&b.addEventListener("focusout",B),()=>{x.removeEventListener("focusout",B),x.removeEventListener("pointerdown",U),!c&&b.removeEventListener("focusout",B)}},[x,b,c,_,l,u,O,g]),A.useEffect(()=>{var U;const B=Array.from((u==null||(U=u.portalNode)==null?void 0:U.querySelectorAll("[data-floating-ui-portal]"))||[]);function H(){return[w.current,E.current].filter(Boolean)}if(b&&c){const K=[b,...B,...H()],Q=PL(d.current.includes("reference")||D?K.concat(x||[]):K);return()=>{Q()}}},[x,b,c,d,u,D]),A.useEffect(()=>{if(c&&!o&&b){const U=[],B=od(),H=Jc(Sr(b).body,B),K=W(),Q=H.filter(oe=>!K.includes(oe));return Q.forEach((oe,se)=>{U[se]=oe.getAttribute("tabindex"),oe.setAttribute("tabindex","-1")}),()=>{Q.forEach((oe,se)=>{const ae=U[se];ae==null?oe.removeAttribute("tabindex"):oe.setAttribute("tabindex",ae)})}}},[b,c,o,W]),Mt(()=>{if(!b)return;const U=Sr(b);let B=i,H=!1;const K=ka(U),Q=T.current;P.current=K;const oe=W(b),se=(typeof a=="number"?oe[a]:a.current)||b;!m&&Oo(se,{preventScroll:se===b});function ae(ne){if(ne.type==="escapeKey"&&v.domReference.current&&(P.current=v.domReference.current),["referencePress","escapeKey"].includes(ne.type))return;const me=ne.data.returnFocus;typeof me=="object"?(B=!0,H=me.preventScroll):B=me}return C.on("dismiss",ae),()=>{if(C.off("dismiss",ae),_r(b,ka(U))&&v.domReference.current&&(P.current=v.domReference.current),B&&Pa(P.current)&&!k.current)if(!v.domReference.current||N.current)Oo(P.current,{cancelPrevious:!1,preventScroll:H});else{var ne;Q.__syncReturnFocus=!0,(ne=P.current)==null||ne.focus({preventScroll:H}),setTimeout(()=>{delete Q.__syncReturnFocus})}}},[b,W,a,i,T,v,C,m]),Mt(()=>{if(u)return u.setFocusManagerState({...t,modal:c,closeOnFocusOut:g}),()=>{u.setFocusManagerState(null)}},[u,c,g,t]),Mt(()=>{if(m||!b)return;function U(){h(F().length)}if(U(),typeof MutationObserver=="function"){const B=new MutationObserver(U);return B.observe(b,{childList:!0,subtree:!0}),()=>{B.disconnect()}}},[b,F,m,v]);const G=o&&(j||c)&&!D;function X(U){return p&&c?A.createElement(fF,{ref:U==="start"?w:E,onClick:()=>O(!1)},typeof p=="string"?p:"Dismiss"):null}return A.createElement(A.Fragment,null,G&&A.createElement(ad,{"data-type":"inside",ref:u==null?void 0:u.beforeInsideRef,onFocus:U=>{if(c){const H=W();Oo(n[0]==="reference"?H[0]:H[H.length-1])}else if(u!=null&&u.preserveTabOrder&&u.portalNode)if(k.current=!1,Kl(U,u.portalNode)){const H=DS()||x;H==null||H.focus()}else{var B;(B=u.beforeOutsideRef.current)==null||B.focus()}}}),D?null:X("start"),A.cloneElement(r,s===0||n.includes("floating")?{tabIndex:0}:{}),X("end"),G&&A.createElement(ad,{"data-type":"inside",ref:u==null?void 0:u.afterInsideRef,onFocus:U=>{if(c)Oo(W()[0]);else if(u!=null&&u.preserveTabOrder&&u.portalNode)if(k.current=!0,Kl(U,u.portalNode)){const H=LS()||x;H==null||H.focus()}else{var B;(B=u.afterOutsideRef.current)==null||B.focus()}}}))}const ku="data-floating-ui-scroll-lock",hF=A.forwardRef(function(t,r){let{lockScroll:n=!1,...o}=t;return Mt(()=>{var a,i;if(!n||document.body.hasAttribute(ku))return;document.body.setAttribute(ku,"");const g=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",v=window.innerWidth-document.documentElement.clientWidth;if(!/iP(hone|ad|od)|iOS/.test(mb()))return Object.assign(document.body.style,{overflow:"hidden",[g]:v+"px"}),()=>{document.body.removeAttribute(ku),Object.assign(document.body.style,{overflow:"",[g]:""})};const _=((a=window.visualViewport)==null?void 0:a.offsetLeft)||0,O=((i=window.visualViewport)==null?void 0:i.offsetTop)||0,C=window.pageXOffset,T=window.pageYOffset;return Object.assign(document.body.style,{position:"fixed",overflow:"hidden",top:-(T-Math.floor(O))+"px",left:-(C-Math.floor(_))+"px",right:"0",[g]:v+"px"}),()=>{Object.assign(document.body.style,{position:"",overflow:"",top:"",left:"",right:"",[g]:""}),document.body.removeAttribute(ku),window.scrollTo(C,T)}},[n]),A.createElement("div",xs({ref:r},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Hw(e){return Pa(e.target)&&e.target.tagName==="BUTTON"}function Uw(e){return MS(e)}const gF=function(e,t){let{open:r,onOpenChange:n,dataRef:o,elements:{domReference:a}}=e,{enabled:i=!0,event:c="click",toggle:p=!0,ignoreMouse:g=!1,keyboardHandlers:v=!0}=t===void 0?{}:t;const _=A.useRef();return A.useMemo(()=>i?{reference:{onPointerDown(O){_.current=O.pointerType},onMouseDown(O){O.button===0&&(nd(_.current,!0)&&g||c!=="click"&&(r?p&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")&&n(!1):(O.preventDefault(),n(!0)),o.current.openEvent=O.nativeEvent))},onClick(O){if(!o.current.__syncReturnFocus){if(c==="mousedown"&&_.current){_.current=void 0;return}nd(_.current,!0)&&g||(r?p&&(!o.current.openEvent||o.current.openEvent.type==="click")&&n(!1):n(!0),o.current.openEvent=O.nativeEvent)}},onKeyDown(O){_.current=void 0,v&&(Hw(O)||(O.key===" "&&!Uw(a)&&O.preventDefault(),O.key==="Enter"&&(r?p&&n(!1):n(!0))))},onKeyUp(O){v&&(Hw(O)||Uw(a)||O.key===" "&&(r?p&&n(!1):n(!0)))}}}:{},[i,o,c,g,v,a,p,r,n])};function nc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}const bF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},vF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mF=function(e){var t,r;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(t=e.escapeKey)!=null?t:!0,outsidePressBubbles:typeof e=="boolean"?e:(r=e.outsidePress)!=null?r:!0}},yF=function(e,t){let{open:r,onOpenChange:n,events:o,nodeId:a,elements:{reference:i,domReference:c,floating:p},dataRef:g}=e,{enabled:v=!0,escapeKey:_=!0,outsidePress:O=!0,outsidePressEvent:C="pointerdown",referencePress:T=!1,referencePressEvent:x="pointerdown",ancestorScroll:b=!1,bubbles:d=!0}=t===void 0?{}:t;const l=Fa(),u=Ki()!=null,s=Yi(typeof O=="function"?O:()=>!1),h=typeof O=="function"?s:O,m=A.useRef(!1),{escapeKeyBubbles:w,outsidePressBubbles:E}=mF(d);return A.useEffect(()=>{if(!r||!v)return;g.current.__escapeKeyBubbles=w,g.current.__outsidePressBubbles=E;function k(F){if(F.key==="Escape"){const W=l?Gl(l.nodesRef.current,a):[];if(W.length>0){let G=!0;if(W.forEach(X=>{var U;if((U=X.context)!=null&&U.open&&!X.context.dataRef.current.__escapeKeyBubbles){G=!1;return}}),!G)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function P(F){const W=m.current;if(m.current=!1,W||typeof h=="function"&&!h(F))return;const G=qd(F);if(Pa(G)&&p){const B=p.ownerDocument.defaultView||window,H=G.scrollWidth>G.clientWidth,K=G.scrollHeight>G.clientHeight;let Q=K&&F.offsetX>G.clientWidth;if(K&&B.getComputedStyle(G).direction==="rtl"&&(Q=F.offsetX<=G.offsetWidth-G.clientWidth),Q||H&&F.offsetY>G.clientHeight)return}const X=l&&Gl(l.nodesRef.current,a).some(B=>{var H;return nc(F,(H=B.context)==null?void 0:H.elements.floating)});if(nc(F,p)||nc(F,c)||X)return;const U=l?Gl(l.nodesRef.current,a):[];if(U.length>0){let B=!0;if(U.forEach(H=>{var K;if((K=H.context)!=null&&K.open&&!H.context.dataRef.current.__outsidePressBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:u?{preventScroll:!0}:ES(F)||RS(F)}}),n(!1)}function N(){n(!1)}const j=Sr(p);_&&j.addEventListener("keydown",k),h&&j.addEventListener(C,P);let D=[];return b&&(tn(c)&&(D=Xn(c)),tn(p)&&(D=D.concat(Xn(p))),!tn(i)&&i&&i.contextElement&&(D=D.concat(Xn(i.contextElement)))),D=D.filter(F=>{var W;return F!==((W=j.defaultView)==null?void 0:W.visualViewport)}),D.forEach(F=>{F.addEventListener("scroll",N,{passive:!0})}),()=>{_&&j.removeEventListener("keydown",k),h&&j.removeEventListener(C,P),D.forEach(F=>{F.removeEventListener("scroll",N)})}},[g,p,c,i,_,h,C,o,l,a,r,n,b,v,w,E,u]),A.useEffect(()=>{m.current=!1},[h,C]),A.useMemo(()=>v?{reference:{[bF[x]]:()=>{T&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[vF[C]]:()=>{m.current=!0}}}:{},[v,o,T,C,x,n])},wF=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:a,refs:i,elements:{floating:c,domReference:p}}=e,{enabled:g=!0,keyboardOnly:v=!0}=t===void 0?{}:t;const _=A.useRef(""),O=A.useRef(!1),C=A.useRef();return A.useEffect(()=>{if(!g)return;const x=Sr(c).defaultView||window;function b(){!r&&Pa(p)&&p===ka(Sr(p))&&(O.current=!0)}return x.addEventListener("blur",b),()=>{x.removeEventListener("blur",b)}},[c,p,r,g]),A.useEffect(()=>{if(!g)return;function T(x){(x.type==="referencePress"||x.type==="escapeKey")&&(O.current=!0)}return a.on("dismiss",T),()=>{a.off("dismiss",T)}},[a,g]),A.useEffect(()=>()=>{clearTimeout(C.current)},[]),A.useMemo(()=>g?{reference:{onPointerDown(T){let{pointerType:x}=T;_.current=x,O.current=!!(x&&v)},onMouseLeave(){O.current=!1},onFocus(T){var x;O.current||T.type==="focus"&&((x=o.current.openEvent)==null?void 0:x.type)==="mousedown"&&o.current.openEvent&&nc(o.current.openEvent,p)||(o.current.openEvent=T.nativeEvent,n(!0))},onBlur(T){O.current=!1;const x=T.relatedTarget,b=tn(x)&&x.hasAttribute("data-floating-ui-focus-guard")&&x.getAttribute("data-type")==="outside";C.current=setTimeout(()=>{_r(i.floating.current,x)||_r(p,x)||b||n(!1)})}}}:{},[g,v,p,i,o,n])};let $w=!1;const _b="ArrowUp",Gd="ArrowDown",Fi="ArrowLeft",Fs="ArrowRight";function Eu(e,t,r){return Math.floor(e/t)!==r}function Tl(e,t){return t<0||t>=e.current.length}function ur(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:a=1}=t===void 0?{}:t;const i=e.current;let c=r;do{var p,g;c=c+(n?-a:a)}while(c>=0&&c<=i.length-1&&(o?o.includes(c):i[c]==null||(p=i[c])!=null&&p.hasAttribute("disabled")||((g=i[c])==null?void 0:g.getAttribute("aria-disabled"))==="true"));return c}function Kd(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function qw(e,t){return Kd(t,e===_b||e===Gd,e===Fi||e===Fs)}function Ep(e,t,r){return Kd(t,e===Gd,r?e===Fi:e===Fs)||e==="Enter"||e==" "||e===""}function xF(e,t,r){return Kd(t,r?e===Fi:e===Fs,e===Gd)}function _F(e,t,r){return Kd(t,r?e===Fs:e===Fi,e===_b)}function Rp(e,t){return ur(e,{disabledIndices:t})}function Gw(e,t){return ur(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}const TF=function(e,t){let{open:r,onOpenChange:n,refs:o,elements:{domReference:a}}=e,{listRef:i,activeIndex:c,onNavigate:p=()=>{},enabled:g=!0,selectedIndex:v=null,allowEscape:_=!1,loop:O=!1,nested:C=!1,rtl:T=!1,virtual:x=!1,focusItemOnOpen:b="auto",focusItemOnHover:d=!0,openOnArrowKeyDown:l=!0,disabledIndices:u=void 0,orientation:s="vertical",cols:h=1,scrollItemIntoView:m=!0}=t===void 0?{listRef:{current:[]},activeIndex:null,onNavigate:()=>{}}:t;const w=Ki(),E=Fa(),k=Yi(p),P=A.useRef(b),N=A.useRef(v??-1),j=A.useRef(null),D=A.useRef(!0),F=A.useRef(k),W=A.useRef(r),G=A.useRef(!1),X=A.useRef(!1),U=rn(u),B=rn(r),H=rn(m),[K,Q]=A.useState(),oe=A.useCallback(function(ne,me,fe){fe===void 0&&(fe=!1);const ie=ne.current[me.current];x?Q(ie==null?void 0:ie.id):Oo(ie,{preventScroll:!0,sync:NS()&&ch()?$w||G.current:!1}),requestAnimationFrame(()=>{const ge=H.current;ge&&ie&&(fe||!D.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))})},[x,H]);Mt(()=>{document.createElement("div").focus({get preventScroll(){return $w=!0,!1}})},[]),Mt(()=>{g&&(r?P.current&&v!=null&&(X.current=!0,k(v)):W.current&&(N.current=-1,F.current(null)))},[g,r,v,k]),Mt(()=>{if(g&&r)if(c==null){if(G.current=!1,v!=null)return;W.current&&(N.current=-1,oe(i,N)),!W.current&&P.current&&(j.current!=null||P.current===!0&&j.current==null)&&(N.current=j.current==null||Ep(j.current,s,T)||C?Rp(i,U.current):Gw(i,U.current),k(N.current))}else Tl(i,c)||(N.current=c,oe(i,N,X.current),X.current=!1)},[g,r,c,v,C,i,s,T,k,oe,U]),Mt(()=>{if(g&&W.current&&!r){var ne,me;const fe=E==null||(ne=E.nodesRef.current.find(ie=>ie.id===w))==null||(me=ne.context)==null?void 0:me.elements.floating;fe&&!_r(fe,ka(Sr(fe)))&&fe.focus({preventScroll:!0})}},[g,r,E,w]),Mt(()=>{j.current=null,F.current=k,W.current=r});const se=c!=null,ae=A.useMemo(()=>{function ne(fe){if(!r)return;const ie=i.current.indexOf(fe);ie!==-1&&k(ie)}return{onFocus(fe){let{currentTarget:ie}=fe;ne(ie)},onClick:fe=>{let{currentTarget:ie}=fe;return ie.focus({preventScroll:!0})},...d&&{onMouseMove(fe){let{currentTarget:ie}=fe;ne(ie)},onPointerLeave(){if(D.current&&(N.current=-1,oe(i,N),to.flushSync(()=>k(null)),!x)){var fe;(fe=o.floating.current)==null||fe.focus({preventScroll:!0})}}}}},[r,o,oe,d,i,k,x]);return A.useMemo(()=>{if(!g)return{};const ne=U.current;function me(de){if(D.current=!1,G.current=!0,!B.current&&de.currentTarget===o.floating.current)return;if(C&&_F(de.key,s,T)){Xr(de),n(!1),Pa(a)&&a.focus();return}const Oe=N.current,Me=Rp(i,ne),Ce=Gw(i,ne);if(de.key==="Home"&&(N.current=Me,k(N.current)),de.key==="End"&&(N.current=Ce,k(N.current)),h>1){const _e=N.current;if(de.key===_b){if(Xr(de),_e===-1)N.current=Ce;else if(N.current=ur(i,{startingIndex:_e,amount:h,decrement:!0,disabledIndices:ne}),O&&(_e-hEe?Ze:Ze-h}Tl(i,N.current)&&(N.current=_e),k(N.current)}if(de.key===Gd&&(Xr(de),_e===-1?N.current=Me:(N.current=ur(i,{startingIndex:_e,amount:h,disabledIndices:ne}),O&&_e+h>Ce&&(N.current=ur(i,{startingIndex:_e%h-h,amount:h,disabledIndices:ne}))),Tl(i,N.current)&&(N.current=_e),k(N.current)),s==="both"){const Ee=Math.floor(_e/h);de.key===Fs&&(Xr(de),_e%h!==h-1?(N.current=ur(i,{startingIndex:_e,disabledIndices:ne}),O&&Eu(N.current,h,Ee)&&(N.current=ur(i,{startingIndex:_e-_e%h-1,disabledIndices:ne}))):O&&(N.current=ur(i,{startingIndex:_e-_e%h-1,disabledIndices:ne})),Eu(N.current,h,Ee)&&(N.current=_e)),de.key===Fi&&(Xr(de),_e%h!==0?(N.current=ur(i,{startingIndex:_e,disabledIndices:ne,decrement:!0}),O&&Eu(N.current,h,Ee)&&(N.current=ur(i,{startingIndex:_e+(h-_e%h),decrement:!0,disabledIndices:ne}))):O&&(N.current=ur(i,{startingIndex:_e+(h-_e%h),decrement:!0,disabledIndices:ne})),Eu(N.current,h,Ee)&&(N.current=_e));const Ke=Math.floor(Ce/h)===Ee;Tl(i,N.current)&&(O&&Ke?N.current=de.key===Fi?Ce:ur(i,{startingIndex:_e-_e%h-1,disabledIndices:ne}):N.current=_e),k(N.current);return}}if(qw(de.key,s)){if(Xr(de),r&&!x&&ka(de.currentTarget.ownerDocument)===de.currentTarget){N.current=Ep(de.key,s,T)?Me:Ce,k(N.current);return}Ep(de.key,s,T)?O?N.current=Oe>=Ce?_&&Oe!==i.current.length?-1:Me:ur(i,{startingIndex:Oe,disabledIndices:ne}):N.current=Math.min(Ce,ur(i,{startingIndex:Oe,disabledIndices:ne})):O?N.current=Oe<=Me?_&&Oe!==-1?i.current.length:Ce:ur(i,{startingIndex:Oe,decrement:!0,disabledIndices:ne}):N.current=Math.max(Me,ur(i,{startingIndex:Oe,decrement:!0,disabledIndices:ne})),Tl(i,N.current)?k(null):k(N.current)}}function fe(de){b==="auto"&&ES(de.nativeEvent)&&(P.current=!0)}function ie(de){P.current=b,b==="auto"&&RS(de.nativeEvent)&&(P.current=!0)}const ge=x&&r&&se&&{"aria-activedescendant":K};return{reference:{...ge,onKeyDown(de){D.current=!1;const Oe=de.key.indexOf("Arrow")===0;if(x&&r)return me(de);if(!r&&!l&&Oe)return;if((Oe||de.key==="Enter"||de.key===" "||de.key==="")&&(j.current=de.key),C){xF(de.key,s,T)&&(Xr(de),r?(N.current=Rp(i,ne),k(N.current)):n(!0));return}qw(de.key,s)&&(v!=null&&(N.current=v),Xr(de),!r&&l?n(!0):me(de),r&&k(N.current))},onFocus(){r&&k(null)},onPointerDown:ie,onMouseDown:fe,onClick:fe},floating:{"aria-orientation":s==="both"?void 0:s,...ge,onKeyDown:me,onPointerMove(){D.current=!0}},item:ae}},[a,o,K,U,B,i,g,s,T,x,r,se,C,v,l,_,h,O,b,k,n,ae])};function CF(e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}const OF=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const a=ws(),i=ws();return A.useMemo(()=>{const c={id:a,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?a:void 0},floating:c}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?a:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:i}},floating:{...c,...o==="menu"&&{"aria-labelledby":i}}}:{}},[n,o,r,a,i])},Kw=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());function SF(e,t){const[r,n]=A.useState(e);return e&&!r&&n(!0),A.useEffect(()=>{if(!e){const o=setTimeout(()=>n(!1),t);return()=>clearTimeout(o)}},[e,t]),r}function BS(e,t){let{open:r,elements:{floating:n}}=e,{duration:o=250}=t===void 0?{}:t;const i=(typeof o=="number"?o:o.close)||0,[c,p]=A.useState(!1),[g,v]=A.useState("unmounted"),_=SF(r,i);return Mt(()=>{c&&!_&&v("unmounted")},[c,_]),Mt(()=>{if(n)if(r){v("initial");const O=requestAnimationFrame(()=>{v("open")});return()=>{cancelAnimationFrame(O)}}else p(!0),v("close")},[r,n]),{isMounted:_,status:g}}function PF(e,t){let{initial:r={opacity:0},open:n,close:o,common:a,duration:i=250}=t===void 0?{}:t;const c=e.placement,p=c.split("-")[0],[g,v]=A.useState({}),{isMounted:_,status:O}=BS(e,{duration:i}),C=rn(r),T=rn(n),x=rn(o),b=rn(a),d=typeof i=="number",l=(d?i:i.open)||0,u=(d?i:i.close)||0;return Mt(()=>{const s={side:p,placement:c},h=C.current,m=x.current,w=T.current,E=b.current,k=typeof h=="function"?h(s):h,P=typeof m=="function"?m(s):m,N=typeof E=="function"?E(s):E,j=(typeof w=="function"?w(s):w)||Object.keys(k).reduce((D,F)=>(D[F]="",D),{});if(O==="initial"&&v(D=>({transitionProperty:D.transitionProperty,...N,...k})),O==="open"&&v({transitionProperty:Object.keys(j).map(Kw).join(","),transitionDuration:l+"ms",...N,...j}),O==="close"){const D=P||k;v({transitionProperty:Object.keys(D).map(Kw).join(","),transitionDuration:u+"ms",...N,...D})}},[p,c,u,x,C,T,b,l,O]),{isMounted:_,styles:g}}const kF=function(e,t){var r;let{open:n,dataRef:o}=e,{listRef:a,activeIndex:i,onMatch:c=()=>{},enabled:p=!0,findMatch:g=null,resetMs:v=1e3,ignoreKeys:_=[],selectedIndex:O=null}=t===void 0?{listRef:{current:[]},activeIndex:null}:t;const C=A.useRef(),T=A.useRef(""),x=A.useRef((r=O??i)!=null?r:-1),b=A.useRef(null),d=Yi(c),l=rn(g),u=rn(_);return Mt(()=>{n&&(clearTimeout(C.current),b.current=null,T.current="")},[n]),Mt(()=>{if(n&&T.current===""){var s;x.current=(s=O??i)!=null?s:-1}},[n,O,i]),A.useMemo(()=>{if(!p)return{};function s(h){const m=qd(h.nativeEvent);if(tn(m)&&(ka(Sr(m))!==h.currentTarget&&m.closest('[role="dialog"],[role="menu"],[role="listbox"],[role="tree"],[role="grid"]')!==h.currentTarget))return;T.current.length>0&&T.current[0]!==" "&&(o.current.typing=!0,h.key===" "&&Xr(h));const w=a.current;if(w==null||u.current.includes(h.key)||h.key.length!==1||h.ctrlKey||h.metaKey||h.altKey)return;w.every(D=>{var F,W;return D?((F=D[0])==null?void 0:F.toLocaleLowerCase())!==((W=D[1])==null?void 0:W.toLocaleLowerCase()):!0})&&T.current===h.key&&(T.current="",x.current=b.current),T.current+=h.key,clearTimeout(C.current),C.current=setTimeout(()=>{T.current="",x.current=b.current,o.current.typing=!1},v);const k=x.current,P=[...w.slice((k||0)+1),...w.slice(0,(k||0)+1)],N=l.current?l.current(P,T.current):P.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(T.current.toLocaleLowerCase()))===0),j=N?w.indexOf(N):-1;j!==-1&&(d(j),b.current=j)}return{reference:{onKeyDown:s},floating:{onKeyDown:s}}},[p,o,a,v,u,l,d])};function Yw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const EF=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:c=4,referenceOverflowThreshold:p=0,scrollRef:g,...v}=e,{rects:_,elements:{floating:O}}=t,C=r.current[i];if(!C)return{};const T={...t,...await TS(-C.offsetTop-_.reference.height/2-C.offsetHeight/2-a).fn(t)},x=(g==null?void 0:g.current)||O,b=await ec(Yw(T,x.scrollHeight),v),d=await ec(T,{...v,elementContext:"reference"}),l=Math.max(0,b.top),u=T.y+l,s=Math.max(0,x.scrollHeight-l-Math.max(0,b.bottom));return x.style.maxHeight=s+"px",x.scrollTop=l,o&&(x.offsetHeight=-p||d.bottom>=-p?to.flushSync(()=>o(!0)):to.flushSync(()=>o(!1))),n&&(n.current=await ec(Yw({...T,y:u},x.offsetHeight),v)),{y:u}}}),RF=(e,t)=>{let{open:r,elements:n}=e,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:c}=t;const p=Yi(c),g=A.useRef(!1),v=A.useRef(null),_=A.useRef(null);return A.useEffect(()=>{if(!o)return;function O(T){if(T.ctrlKey||!C||a.current==null)return;const x=T.deltaY,b=a.current.top>=-.5,d=a.current.bottom>=-.5,l=C.scrollHeight-C.clientHeight,u=x<0?-1:1,s=x<0?"max":"min";C.scrollHeight<=C.clientHeight||(!b&&x>0||!d&&x<0?(T.preventDefault(),to.flushSync(()=>{p(h=>h+Math[s](x,l*u))})):/firefox/i.test(kS())&&(C.scrollTop+=x))}const C=(i==null?void 0:i.current)||n.floating;if(r&&C)return C.addEventListener("wheel",O),requestAnimationFrame(()=>{v.current=C.scrollTop,a.current!=null&&(_.current={...a.current})}),()=>{v.current=null,_.current=null,C.removeEventListener("wheel",O)}},[o,r,n.floating,a,i,p]),A.useMemo(()=>o?{floating:{onKeyDown(){g.current=!0},onWheel(){g.current=!1},onPointerMove(){g.current=!1},onScroll(){const O=(i==null?void 0:i.current)||n.floating;if(!(!a.current||!O||!g.current)){if(v.current!==null){const C=O.scrollTop-v.current;(a.current.bottom<-.5&&C<-1||a.current.top<-.5&&C>1)&&to.flushSync(()=>p(T=>T+C))}requestAnimationFrame(()=>{v.current=O.scrollTop})}}}}:{},[o,a,n.floating,i,p])};function NF(e,t){const[r,n]=e;let o=!1;const a=t.length;for(let i=0,c=a-1;i=n!=_>=n&&r<=(v-p)*(n-g)/(_-g)+p&&(o=!o)}return o}function jF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function AF(e){let{restMs:t=0,buffer:r=.5,blockPointerEvents:n=!1}=e===void 0?{}:e,o,a=!1,i=!1;const c=p=>{let{x:g,y:v,placement:_,elements:O,onClose:C,nodeId:T,tree:x}=p;return function(d){function l(){clearTimeout(o),C()}if(clearTimeout(o),!O.domReference||!O.floating||_==null||g==null||v==null)return;const{clientX:u,clientY:s}=d,h=[u,s],m=qd(d),w=d.type==="mouseleave",E=_r(O.floating,m),k=_r(O.domReference,m),P=O.domReference.getBoundingClientRect(),N=O.floating.getBoundingClientRect(),j=_.split("-")[0],D=g>N.right-N.width/2,F=v>N.bottom-N.height/2,W=jF(h,P);if(E&&(i=!0),k&&(i=!1),k&&!w){i=!0;return}if(w&&tn(d.relatedTarget)&&_r(O.floating,d.relatedTarget)||x&&Gl(x.nodesRef.current,T).some(B=>{let{context:H}=B;return H==null?void 0:H.open}))return;if(j==="top"&&v>=P.bottom-1||j==="bottom"&&v<=P.top+1||j==="left"&&g>=P.right-1||j==="right"&&g<=P.left+1)return l();let G=[];switch(j){case"top":G=[[N.left,P.top+1],[N.left,N.bottom-1],[N.right,N.bottom-1],[N.right,P.top+1]],a=u>=N.left&&u<=N.right&&s>=N.top&&s<=P.top+1;break;case"bottom":G=[[N.left,N.top+1],[N.left,P.bottom-1],[N.right,P.bottom-1],[N.right,N.top+1]],a=u>=N.left&&u<=N.right&&s>=P.bottom-1&&s<=N.bottom;break;case"left":G=[[N.right-1,N.bottom],[N.right-1,N.top],[P.left+1,N.top],[P.left+1,N.bottom]],a=u>=N.left&&u<=P.left+1&&s>=N.top&&s<=N.bottom;break;case"right":G=[[P.right-1,N.bottom],[P.right-1,N.top],[N.left+1,N.top],[N.left+1,N.bottom]],a=u>=P.right-1&&u<=N.right&&s>=N.top&&s<=N.bottom;break}function X(B){let[H,K]=B;const Q=N.width>P.width,oe=N.height>P.height;switch(j){case"top":{const se=[Q?H+r/2:D?H+r*4:H-r*4,K+r+1],ae=[Q?H-r/2:D?H+r*4:H-r*4,K+r+1],ne=[[N.left,D||Q?N.bottom-r:N.top],[N.right,D?Q?N.bottom-r:N.top:N.bottom-r]];return[se,ae,...ne]}case"bottom":{const se=[Q?H+r/2:D?H+r*4:H-r*4,K-r],ae=[Q?H-r/2:D?H+r*4:H-r*4,K-r],ne=[[N.left,D||Q?N.top+r:N.bottom],[N.right,D?Q?N.top+r:N.bottom:N.top+r]];return[se,ae,...ne]}case"left":{const se=[H+r+1,oe?K+r/2:F?K+r*4:K-r*4],ae=[H+r+1,oe?K-r/2:F?K+r*4:K-r*4];return[...[[F||oe?N.right-r:N.left,N.top],[F?oe?N.right-r:N.left:N.right-r,N.bottom]],se,ae]}case"right":{const se=[H-r,oe?K+r/2:F?K+r*4:K-r*4],ae=[H-r,oe?K-r/2:F?K+r*4:K-r*4],ne=[[F||oe?N.left+r:N.right,N.top],[F?oe?N.left+r:N.right:N.left+r,N.bottom]];return[se,ae,...ne]}}}const U=a?G:X([g,v]);if(!a){if(i&&!W)return l();NF([u,s],U)?t&&!i&&(o=setTimeout(l,t)):l()}}};return c.__options={blockPointerEvents:n},c}function MF(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=G3(e),a=Fa(),i=A.useRef(null),c=A.useRef({}),p=A.useState(()=>OS())[0],[g,v]=A.useState(null),_=A.useCallback(d=>{const l=tn(d)?{getBoundingClientRect:()=>d.getBoundingClientRect(),contextElement:d}:d;o.refs.setReference(l)},[o.refs]),O=A.useCallback(d=>{(tn(d)||d===null)&&(i.current=d,v(d)),(tn(o.refs.reference.current)||o.refs.reference.current===null||d!==null&&!tn(d))&&o.refs.setReference(d)},[o.refs]),C=A.useMemo(()=>({...o.refs,setReference:O,setPositionReference:_,domReference:i}),[o.refs,O,_]),T=A.useMemo(()=>({...o.elements,domReference:g}),[o.elements,g]),x=Yi(r),b=A.useMemo(()=>({...o,refs:C,elements:T,dataRef:c,nodeId:n,events:p,open:t,onOpenChange:x}),[o,n,p,t,x,C,T]);return Mt(()=>{const d=a==null?void 0:a.nodesRef.current.find(l=>l.id===n);d&&(d.context=b)}),A.useMemo(()=>({...o,context:b,refs:C,reference:O,positionReference:_}),[o,C,b,O,_])}function Np(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(i=>{let[c,p]=i;if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof p=="function"){var g;(g=n.get(c))==null||g.push(p),o[c]=function(){for(var v,_=arguments.length,O=new Array(_),C=0;C<_;C++)O[C]=arguments[C];(v=n.get(c))==null||v.forEach(T=>T(...O))}}}else o[c]=p}),o),{})}}const IF=function(e){e===void 0&&(e=[]);const t=e,r=A.useCallback(a=>Np(a,e,"reference"),t),n=A.useCallback(a=>Np(a,e,"floating"),t),o=A.useCallback(a=>Np(a,e,"item"),e.map(a=>a==null?void 0:a.item));return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])},DF=Object.freeze(Object.defineProperty({__proto__:null,FloatingDelayGroup:rF,FloatingFocusManager:pF,FloatingNode:J3,FloatingOverlay:hF,FloatingPortal:dF,FloatingTree:Z3,arrow:q3,autoPlacement:V3,autoUpdate:F3,computePosition:CS,detectOverflow:ec,flip:B3,getOverflowAncestors:Xn,hide:H3,inline:U3,inner:EF,limitShift:$3,offset:TS,platform:xS,safePolygon:AF,shift:z3,size:W3,useClick:gF,useDelayGroup:nF,useDelayGroupContext:AS,useDismiss:yF,useFloating:MF,useFloatingNodeId:Q3,useFloatingParentNodeId:Ki,useFloatingPortalNode:VS,useFloatingTree:Fa,useFocus:wF,useHover:tF,useId:ws,useInnerOffset:RF,useInteractions:IF,useListNavigation:TF,useMergeRefs:CF,useRole:OF,useTransitionStatus:BS,useTransitionStyles:PF,useTypeahead:kF},Symbol.toStringTag,{value:"Module"})),Kt=Ts(DF);var WS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(T,x){for(var b in x)Object.defineProperty(T,b,{enumerable:!0,get:x[b]})}t(e,{DialogHeader:function(){return O},default:function(){return C}});var r=g(A),n=g($e),o=Le,a=g(Ie),i=Ae,c=Ui;function p(){return p=Object.assign||function(T){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(T,d)&&(b[d]=T[d])}return b}function _(T,x){if(T==null)return{};var b={},d=Object.keys(T),l,u;for(u=0;u=0)&&(b[l]=T[l]);return b}var O=r.default.forwardRef(function(T,x){var b=T.className,d=T.children,l=v(T,["className","children"]),u=(0,i.useTheme)().dialogHeader,s=u.defaultProps,h=u.styles.base;b=b??s.className;var m=(0,o.twMerge)((0,n.default)((0,a.default)(h)),b);return r.default.createElement("div",p({},l,{ref:x,className:m}),d)});O.propTypes={className:c.propTypesClassName,children:c.propTypesChildren},O.displayName="MaterialTailwind.DialogHeader";var C=O})(WS);var HS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,b){for(var d in b)Object.defineProperty(x,d,{enumerable:!0,get:b[d]})}t(e,{DialogBody:function(){return C},default:function(){return T}});var r=v(A),n=v($e),o=Le,a=v(Ie),i=Ae,c=Ui;function p(x,b,d){return b in x?Object.defineProperty(x,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):x[b]=d,x}function g(){return g=Object.assign||function(x){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(x,l)&&(d[l]=x[l])}return d}function O(x,b){if(x==null)return{};var d={},l=Object.keys(x),u,s;for(s=0;s=0)&&(d[u]=x[u]);return d}var C=r.default.forwardRef(function(x,b){var d=x.divider,l=x.className,u=x.children,s=_(x,["divider","className","children"]),h=(0,i.useTheme)().dialogBody,m=h.defaultProps,w=h.styles.base;l=l??m.className;var E=(0,o.twMerge)((0,n.default)((0,a.default)(w.initial),p({},(0,a.default)(w.divider),d)),l);return r.default.createElement("div",g({},s,{ref:b,className:E}),u)});C.propTypes={divider:c.propTypesDivider,className:c.propTypesClassName,children:c.propTypesChildren},C.displayName="MaterialTailwind.DialogBody";var T=C})(HS);var US={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(T,x){for(var b in x)Object.defineProperty(T,b,{enumerable:!0,get:x[b]})}t(e,{DialogFooter:function(){return O},default:function(){return C}});var r=g(A),n=g($e),o=Le,a=g(Ie),i=Ae,c=Ui;function p(){return p=Object.assign||function(T){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(T,d)&&(b[d]=T[d])}return b}function _(T,x){if(T==null)return{};var b={},d=Object.keys(T),l,u;for(u=0;u=0)&&(b[l]=T[l]);return b}var O=r.default.forwardRef(function(T,x){var b=T.className,d=T.children,l=v(T,["className","children"]),u=(0,i.useTheme)().dialogFooter,s=u.defaultProps,h=u.styles.base;b=b??s.className;var m=(0,o.twMerge)((0,n.default)((0,a.default)(h)),b);return r.default.createElement("div",p({},l,{ref:x,className:m}),d)});O.propTypes={className:c.propTypesClassName,children:c.propTypesChildren},O.displayName="MaterialTailwind.DialogFooter";var C=O})(US);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(P,N){for(var j in N)Object.defineProperty(P,j,{enumerable:!0,get:N[j]})}t(e,{Dialog:function(){return E},DialogHeader:function(){return C.DialogHeader},DialogBody:function(){return T.DialogBody},DialogFooter:function(){return x.DialogFooter},default:function(){return k}});var r=l(A),n=l(Fe),o=Kt,a=er,i=l($e),c=l(ar),p=Le,g=l(Et),v=l(Ie),_=Ae,O=Ui,C=WS,T=HS,x=US;function b(P,N,j){return N in P?Object.defineProperty(P,N,{value:j,enumerable:!0,configurable:!0,writable:!0}):P[N]=j,P}function d(){return d=Object.assign||function(P){for(var N=1;N=0)&&Object.prototype.propertyIsEnumerable.call(P,D)&&(j[D]=P[D])}return j}function w(P,N){if(P==null)return{};var j={},D=Object.keys(P),F,W;for(W=0;W=0)&&(j[F]=P[F]);return j}var E=r.default.forwardRef(function(P,N){var j=P.open,D=P.handler,F=P.size,W=P.dismiss,G=P.animate,X=P.className,U=P.children,B=m(P,["open","handler","size","dismiss","animate","className","children"]),H=(0,_.useTheme)().dialog,K=H.defaultProps,Q=H.valid,oe=H.styles,se=oe.base,ae=oe.sizes;D=D??void 0,F=F??K.size,W=W??K.dismiss,G=G??K.animate,X=X??K.className;var ne=(0,i.default)((0,v.default)(se.backdrop)),me=(0,p.twMerge)((0,i.default)((0,v.default)(se.container),(0,v.default)(ae[(0,g.default)(Q.sizes,F,"md")])),X),fe={unmount:{opacity:0,y:-50,transition:{duration:.3}},mount:{opacity:1,y:0,transition:{duration:.3}}},ie={unmount:{opacity:0,transition:{delay:.2}},mount:{opacity:1}},ge=(0,c.default)(fe,G),de=(0,o.useFloating)({open:j,onOpenChange:D}),Oe=de.floating,Me=de.context,Ce=(0,o.useId)(),_e="".concat(Ce,"-label"),Ee="".concat(Ce,"-description"),Ke=(0,o.useInteractions)([(0,o.useClick)(Me),(0,o.useRole)(Me),(0,o.useDismiss)(Me,W)]).getFloatingProps,Ze=(0,o.useMergeRefs)([N,Oe]),dt=a.AnimatePresence;return r.default.createElement(a.LazyMotion,{features:a.domAnimation},r.default.createElement(o.FloatingPortal,null,r.default.createElement(dt,null,j&&r.default.createElement(o.FloatingOverlay,{style:{zIndex:9999},lockScroll:!0},r.default.createElement(o.FloatingFocusManager,{context:Me},r.default.createElement(a.m.div,{className:F==="xxl"?"":ne,initial:"unmount",exit:"unmount",animate:j?"mount":"unmount",variants:ie,transition:{duration:.2}},r.default.createElement(a.m.div,d({},Ke(h(u({},B),{ref:Ze,className:me,"aria-labelledby":_e,"aria-describedby":Ee})),{initial:"unmount",exit:"unmount",animate:j?"mount":"unmount",variants:ge}),U)))))))});E.propTypes={open:O.propTypesOpen,handler:O.propTypesHandler,size:n.default.oneOf(O.propTypesSize),dismiss:O.propTypesDismiss,animate:O.propTypesAnimate,className:O.propTypesClassName,children:O.propTypesChildren},E.displayName="MaterialTailwind.Dialog";var k=Object.assign(E,{Header:C.DialogHeader,Body:T.DialogBody,Footer:x.DialogFooter})})(oS);var $S={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{Input:function(){return T},default:function(){return x}});var r=_(A),n=_(Fe),o=_($e),a=_(Et),i=_(Ie),c=Ae,p=Es;function g(b,d,l){return d in b?Object.defineProperty(b,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):b[d]=l,b}function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.variant,u=b.color,s=b.size,h=b.label,m=b.error,w=b.success,E=b.icon,k=b.containerProps,P=b.labelProps,N=b.className,j=b.shrink,D=b.inputRef,F=O(b,["variant","color","size","label","error","success","icon","containerProps","labelProps","className","shrink","inputRef"]),W=(0,c.useTheme)().input,G=W.defaultProps,X=W.valid,U=W.styles,B=U.base,H=U.variants;l=l??G.variant,s=s??G.size,u=u??G.color,h=h??G.label,P=P??G.labelProps,k=k??G.containerProps,N=N??G.className,j=j??G.shrink,E=E??G.icon;var K=H[(0,a.default)(X.variants,l,"outlined")],Q=K.sizes[(0,a.default)(X.sizes,s,"md")],oe=(0,i.default)(K.error.input),se=(0,i.default)(K.success.input),ae=(0,i.default)(K.shrink.input),ne=(0,i.default)(K.colors.input[(0,a.default)(X.colors,u,"gray")]),me=(0,i.default)(K.error.label),fe=(0,i.default)(K.success.label),ie=(0,i.default)(K.shrink.label),ge=(0,i.default)(K.colors.label[(0,a.default)(X.colors,u,"gray")]),de=(0,o.default)((0,i.default)(B.container),(0,i.default)(Q.container),k==null?void 0:k.className),Oe=(0,o.default)((0,i.default)(B.input),(0,i.default)(K.base.input),(0,i.default)(Q.input),g({},(0,i.default)(K.base.inputWithIcon),E),g({},ne,!m&&!w),g({},oe,m),g({},se,w),g({},ae,j),N),Me=(0,o.default)((0,i.default)(B.label),(0,i.default)(K.base.label),(0,i.default)(Q.label),g({},ge,!m&&!w),g({},me,m),g({},fe,w),g({},ie,j),P==null?void 0:P.className),Ce=(0,o.default)((0,i.default)(B.icon),(0,i.default)(K.base.icon),(0,i.default)(Q.icon)),_e=(0,o.default)((0,i.default)(B.asterisk));return r.default.createElement("div",v({},k,{ref:d,className:de}),E&&r.default.createElement("div",{className:Ce},E),r.default.createElement("input",v({},F,{ref:D,className:Oe,placeholder:(F==null?void 0:F.placeholder)||" "})),r.default.createElement("label",v({},P,{className:Me}),h," ",F.required?r.default.createElement("span",{className:_e},"*"):""))});T.propTypes={variant:n.default.oneOf(p.propTypesVariant),size:n.default.oneOf(p.propTypesSize),color:n.default.oneOf(p.propTypesColor),label:p.propTypesLabel,error:p.propTypesError,success:p.propTypesSuccess,icon:p.propTypesIcon,labelProps:p.propTypesLabelProps,containerProps:p.propTypesContainerProps,shrink:p.propTypesShrink,className:p.propTypesClassName},T.displayName="MaterialTailwind.Input";var x=T})($S);var qS={},Vs={},Xi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{propTypesOpen:function(){return g},propTypesHandler:function(){return v},propTypesPlacement:function(){return _},propTypesOffset:function(){return O},propTypesDismiss:function(){return C},propTypesAnimate:function(){return T},propTypesLockScroll:function(){return x},propTypesDisabled:function(){return b},propTypesClassName:function(){return d},propTypesChildren:function(){return l},propTypesContextValue:function(){return u}});var r=a(Fe),n=Ct;function o(s,h,m){return h in s?Object.defineProperty(s,h,{value:m,enumerable:!0,configurable:!0,writable:!0}):s[h]=m,s}function a(s){return s&&s.__esModule?s:{default:s}}function i(s){for(var h=1;hl.length)&&(u=l.length);for(var s=0,h=new Array(u);s=0)&&Object.prototype.propertyIsEnumerable.call(x,l)&&(d[l]=x[l])}return d}function O(x,b){if(x==null)return{};var d={},l=Object.keys(x),u,s;for(s=0;s=0)&&(d[u]=x[u]);return d}var C=r.default.forwardRef(function(x,b){var d=x.children,l=_(x,["children"]),u=(0,o.useMenu)(),s=u.getReferenceProps,h=u.reference,m=u.nested,w=(0,n.useMergeRefs)([b,h]);return r.default.cloneElement(d,p({},s(p(v(p({},l),{ref:w,onClick:function(k){k.stopPropagation()}}),m&&{role:"menuitem"}))))});C.propTypes={children:a.propTypesChildren},C.displayName="MaterialTailwind.MenuHandler";var T=C})(KS);var YS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{MenuList:function(){return x},default:function(){return b}});var r=O(A),n=Kt,o=er,a=O($e),i=Le,c=O(Ie),p=Ae,g=Vs,v=Xi;function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.children,s=d.className,h=C(d,["children","className"]),m=(0,p.useTheme)().menu,w=m.styles.base,E=(0,g.useMenu)(),k=E.open,P=E.handler,N=E.strategy,j=E.x,D=E.y,F=E.floating,W=E.listItemsRef,G=E.getFloatingProps,X=E.getItemProps,U=E.appliedAnimation,B=E.lockScroll,H=E.context,K=E.activeIndex,Q=E.tree,oe=E.allowHover,se=E.internalAllowHover,ae=E.setActiveIndex,ne=E.nested;s=s??"";var me=(0,i.twMerge)((0,a.default)((0,c.default)(w.menu)),s),fe=(0,n.useMergeRefs)([l,F]),ie=o.AnimatePresence,ge=r.default.createElement(o.m.div,_({},h,{ref:fe,style:{position:N,top:D??0,left:j??0},className:me},G({onKeyDown:function(Oe){Oe.key==="Tab"&&(P(!1),Oe.shiftKey&&Oe.preventDefault())}}),{initial:"unmount",exit:"unmount",animate:k?"mount":"unmount",variants:U}),r.default.Children.map(u,function(de,Oe){return r.default.isValidElement(de)&&r.default.cloneElement(de,X({tabIndex:K===Oe?0:-1,role:"menuitem",className:de.props.className,ref:function(Ce){W.current[Oe]=Ce},onClick:function(Ce){if(de.props.onClick){var _e,Ee;(Ee=(_e=de.props).onClick)===null||Ee===void 0||Ee.call(_e,Ce)}Q==null||Q.events.emit("click")},onMouseEnter:function(){(oe&&k||se&&k)&&ae(Oe)}}))}));return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(n.FloatingPortal,null,r.default.createElement(ie,null,k&&r.default.createElement(r.default.Fragment,null,B?r.default.createElement(n.FloatingOverlay,{lockScroll:!0},r.default.createElement(n.FloatingFocusManager,{context:H,modal:!ne,initialFocus:ne?-1:0,returnFocus:!ne,visuallyHiddenDismiss:!0},ge)):r.default.createElement(n.FloatingFocusManager,{context:H,modal:!ne,initialFocus:ne?-1:0,returnFocus:!ne,visuallyHiddenDismiss:!0},ge)))))});x.propTypes={className:v.propTypesClassName,children:v.propTypesChildren},x.displayName="MaterialTailwind.MenuList";var b=x})(YS);var XS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,b){for(var d in b)Object.defineProperty(x,d,{enumerable:!0,get:b[d]})}t(e,{MenuItem:function(){return C},default:function(){return T}});var r=v(A),n=v($e),o=Le,a=v(Ie),i=Ae,c=Xi;function p(x,b,d){return b in x?Object.defineProperty(x,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):x[b]=d,x}function g(){return g=Object.assign||function(x){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(x,l)&&(d[l]=x[l])}return d}function O(x,b){if(x==null)return{};var d={},l=Object.keys(x),u,s;for(s=0;s=0)&&(d[u]=x[u]);return d}var C=r.default.forwardRef(function(x,b){var d=x.className,l=d===void 0?"":d,u=x.disabled,s=u===void 0?!1:u,h=x.children,m=_(x,["className","disabled","children"]),w=(0,i.useTheme)().menu,E=w.styles.base,k=(0,o.twMerge)((0,n.default)((0,a.default)(E.item.initial),p({},(0,a.default)(E.item.disabled),s)),l);return r.default.createElement("button",g({},m,{ref:b,role:"menuitem",className:k}),h)});C.propTypes={className:c.propTypesClassName,disabled:c.propTypesDisabled,children:c.propTypesChildren},C.displayName="MaterialTailwind.MenuItem";var T=C})(XS);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,T){for(var x in T)Object.defineProperty(C,x,{enumerable:!0,get:T[x]})}t(e,{Menu:function(){return _},MenuHandler:function(){return i.MenuHandler},MenuList:function(){return c.MenuList},MenuItem:function(){return p.MenuItem},useMenu:function(){return o.useMenu},default:function(){return O}});var r=v(A),n=Kt,o=Vs,a=GS,i=KS,c=YS,p=XS;function g(){return g=Object.assign||function(C){for(var T=1;T=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.open,s=d.animate,h=d.className,m=d.children,w=C(d,["open","animate","className","children"]),E;console.error(` will be deprecated in the future versions of @material-tailwind/react use instead. More details: https://www.material-tailwind.com/docs/react/collapse `);var k=r.default.useRef(null),P=(0,g.useTheme)().navbar,N=P.styles,j=N.base.mobileNav;s=s??{},h=h??"";var D=(0,c.twMerge)((0,i.default)((0,p.default)(j)),h),F={unmount:{height:0,opacity:0,transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}},mount:{opacity:1,height:"".concat((E=k.current)===null||E===void 0?void 0:E.scrollHeight,"px"),transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}}},W=(0,a.default)(F,s),G=n.AnimatePresence,X=(0,o.useMergeRefs)([l,k]);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(G,null,r.default.createElement(n.m.div,_({},w,{ref:X,className:D,initial:"unmount",exit:"unmount",animate:u?"mount":"unmount",variants:W}),m)))});x.displayName="MaterialTailwind.MobileNav",x.propTypes={open:v.propTypesOpen,animate:v.propTypesAnimate,className:v.propTypesClassName,children:v.propTypesChildren};var b=x})(JS);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Navbar:function(){return b},MobileNav:function(){return g.MobileNav},default:function(){return d}});var r=C(A),n=C(Fe),o=C($e),a=Le,i=C(Et),c=C(Ie),p=Ae,g=JS,v=kd;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.variant,h=l.color,m=l.shadow,w=l.blurred,E=l.fullWidth,k=l.className,P=l.children,N=T(l,["variant","color","shadow","blurred","fullWidth","className","children"]),j=(0,p.useTheme)().navbar,D=j.defaultProps,F=j.valid,W=j.styles,G=W.base,X=W.variants;s=s??D.variant,h=h??D.color,m=m??D.shadow,w=w??D.blurred,E=E??D.fullWidth,k=k??D.className;var U,B=(0,o.default)((0,c.default)(G.navbar.initial),(U={},_(U,(0,c.default)(G.navbar.shadow),m),_(U,(0,c.default)(G.navbar.blurred),w&&h==="white"),_(U,(0,c.default)(G.navbar.fullWidth),E),U)),H=(0,o.default)((0,c.default)(X[(0,i.default)(F.variants,s,"filled")][(0,i.default)(F.colors,h,"white")])),K=(0,a.twMerge)((0,o.default)(B,H),k);return r.default.createElement("nav",O({},N,{ref:u,className:K}),P)});b.propTypes={variant:n.default.oneOf(v.propTypesVariant),color:n.default.oneOf(v.propTypesColor),shadow:v.propTypesShadow,blurred:v.propTypesBlurred,fullWidth:v.propTypesFullWidth,className:v.propTypesClassName,children:v.propTypesChildren},b.displayName="MaterialTailwind.Navbar";var d=Object.assign(b,{MobileNav:g.MobileNav})})(QS);var ZS={},Yd={},Qi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{propTypesOpen:function(){return a},propTypesHandler:function(){return i},propTypesPlacement:function(){return c},propTypesOffset:function(){return p},propTypesDismiss:function(){return g},propTypesAnimate:function(){return v},propTypesContent:function(){return _},propTypesInteractive:function(){return O},propTypesClassName:function(){return C},propTypesChildren:function(){return T},propTypesContextValue:function(){return x}});var r=o(Fe),n=Ct;function o(b){return b&&b.__esModule?b:{default:b}}var a=r.default.bool,i=r.default.func,c=n.propTypesPlacements,p=n.propTypesOffsetType,g=n.propTypesDismissType,v=n.propTypesAnimation,_=r.default.node,O=r.default.bool,C=r.default.string,T=r.default.node.isRequired,x=r.default.shape({open:r.default.bool.isRequired,strategy:r.default.oneOf(["fixed","absolute"]).isRequired,x:r.default.number,y:r.default.number,context:r.default.instanceOf(Object).isRequired,reference:r.default.func.isRequired,floating:r.default.func.isRequired,getReferenceProps:r.default.func.isRequired,getFloatingProps:r.default.func.isRequired,appliedAnimation:v.isRequired,labelId:r.default.string.isRequired,descriptionId:r.default.string.isRequired}).isRequired})(Qi);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(p,g){for(var v in g)Object.defineProperty(p,v,{enumerable:!0,get:g[v]})}t(e,{PopoverContext:function(){return a},usePopover:function(){return i},PopoverContextProvider:function(){return c}});var r=o(A),n=Qi;function o(p){return p&&p.__esModule?p:{default:p}}var a=r.default.createContext(null);a.displayName="MaterialTailwind.PopoverContext";function i(){var p=r.default.useContext(a);if(!p)throw new Error("usePopover() must be used within a Popover. It happens when you use PopoverHandler or PopoverContent components outside the Popover component.");return p}var c=function(p){var g=p.value,v=p.children;return r.default.createElement(a.Provider,{value:g},v)};c.propTypes={value:n.propTypesContextValue,children:n.propTypesChildren},c.displayName="MaterialTailwind.PopoverContextProvider"})(Yd);var eP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,b){for(var d in b)Object.defineProperty(x,d,{enumerable:!0,get:b[d]})}t(e,{PopoverHandler:function(){return C},default:function(){return T}});var r=c(A),n=Kt,o=Yd,a=Qi;function i(x,b,d){return b in x?Object.defineProperty(x,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):x[b]=d,x}function c(x){return x&&x.__esModule?x:{default:x}}function p(x){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(x,l)&&(d[l]=x[l])}return d}function O(x,b){if(x==null)return{};var d={},l=Object.keys(x),u,s;for(s=0;s=0)&&(d[u]=x[u]);return d}var C=r.default.forwardRef(function(x,b){var d=x.children,l=_(x,["children"]),u=(0,o.usePopover)(),s=u.getReferenceProps,h=u.reference,m=(0,n.useMergeRefs)([b,h]);return r.default.cloneElement(d,p({},s(v(p({},l),{ref:m}))))});C.propTypes={children:a.propTypesChildren},C.displayName="MaterialTailwind.PopoverHandler";var T=C})(eP);var tP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(h,m){for(var w in m)Object.defineProperty(h,w,{enumerable:!0,get:m[w]})}t(e,{PopoverContent:function(){return u},default:function(){return s}});var r=C(A),n=Kt,o=er,a=C($e),i=Le,c=C(Ie),p=Ae,g=Yd,v=Qi;function _(h,m,w){return m in h?Object.defineProperty(h,m,{value:w,enumerable:!0,configurable:!0,writable:!0}):h[m]=w,h}function O(){return O=Object.assign||function(h){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(h,E)&&(w[E]=h[E])}return w}function l(h,m){if(h==null)return{};var w={},E=Object.keys(h),k,P;for(P=0;P=0)&&(w[k]=h[k]);return w}var u=r.default.forwardRef(function(h,m){var w=h.children,E=h.className,k=d(h,["children","className"]),P=(0,p.useTheme)().popover,N=P.defaultProps,j=P.styles.base,D=(0,g.usePopover)(),F=D.open,W=D.strategy,G=D.x,X=D.y,U=D.context,B=D.floating,H=D.getFloatingProps,K=D.appliedAnimation,Q=D.labelId,oe=D.descriptionId;E=E??N.className;var se=(0,i.twMerge)((0,a.default)((0,c.default)(j)),E),ae=(0,n.useMergeRefs)([m,B]),ne=o.AnimatePresence;return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(n.FloatingPortal,null,r.default.createElement(ne,null,F&&r.default.createElement(n.FloatingFocusManager,{context:U},r.default.createElement(o.m.div,O({},H(b(T({},k),{ref:ae,className:se,style:{position:W,top:X??"",left:G??""},"aria-labelledby":Q,"aria-describedby":oe})),{initial:"unmount",exit:"unmount",animate:F?"mount":"unmount",variants:K}),w)))))});u.propTypes={className:v.propTypesClassName,children:v.propTypesChildren},u.displayName="MaterialTailwind.PopoverContent";var s=u})(tP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{Popover:function(){return l},PopoverHandler:function(){return g.PopoverHandler},PopoverContent:function(){return v.PopoverContent},usePopover:function(){return c.usePopover},default:function(){return u}});var r=C(A),n=C(Fe),o=Kt,a=C(ar),i=Ae,c=Yd,p=Qi,g=eP,v=tP;function _(s,h){(h==null||h>s.length)&&(h=s.length);for(var m=0,w=new Array(h);m=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.variant,s=d.color,h=d.size,m=d.value,w=d.label,E=d.className,k=d.barProps,P=C(d,["variant","color","size","value","label","className","barProps"]),N=(0,p.useTheme)().progress,j=N.defaultProps,D=N.valid,F=N.styles,W=F.base,G=F.variants,X=F.sizes;u=u??j.variant,s=s??j.color,h=h??j.size,w=w??j.label,E=E??j.className,k=k??j.barProps;var U=(0,c.default)(G[(0,i.default)(D.variants,u,"filled")][(0,i.default)(D.colors,s,"gray")]),B=(0,c.default)(X[(0,i.default)(D.sizes,h,"md")].container.initial),H=(0,o.default)((0,c.default)(W.container.initial),B),K=(0,c.default)(X[(0,i.default)(D.sizes,h,"md")].container.withLabel),Q=(0,o.default)((0,c.default)(W.container.withLabel),K),oe=(0,c.default)(X[(0,i.default)(D.sizes,h,"md")].bar),se=(0,o.default)((0,c.default)(W.bar),oe),ae=(0,a.twMerge)((0,o.default)(H,v({},Q,w)),E),ne=(0,a.twMerge)((0,o.default)(se,U),k==null?void 0:k.className);return r.default.createElement("div",_({},P,{ref:l,className:ae}),r.default.createElement("div",_({},k,{className:ne,style:{width:"".concat(m,"%")}}),w&&"".concat(m,"% ").concat(typeof w=="string"?w:"")))});x.propTypes={variant:n.default.oneOf(g.propTypesVariant),color:n.default.oneOf(g.propTypesColor),size:n.default.oneOf(g.propTypesSize),value:g.propTypesValue,label:g.propTypesLabel,barProps:g.propTypesBarProps,className:g.propTypesClassName},x.displayName="MaterialTailwind.Progress";var b=x})(rP);var nP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Radio:function(){return b},default:function(){return d}});var r=C(A),n=C(Fe),o=C(qi),a=C($e),i=Le,c=C(Et),p=C(Ie),g=Ae,v=Da;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.color,h=l.label,m=l.icon,w=l.ripple,E=l.className,k=l.disabled,P=l.containerProps,N=l.labelProps,j=l.iconProps,D=l.inputRef,F=T(l,["color","label","icon","ripple","className","disabled","containerProps","labelProps","iconProps","inputRef"]),W=(0,g.useTheme)().radio,G=W.defaultProps,X=W.valid,U=W.styles,B=U.base,H=U.colors,K=r.default.useId();s=s??G.color,h=h??G.label,m=m??G.icon,w=w??G.ripple,E=E??G.className,k=k??G.disabled,P=P??G.containerProps,N=N??G.labelProps,j=j??G.iconProps;var Q=w!==void 0&&new o.default,oe=(0,a.default)((0,p.default)(B.root),_({},(0,p.default)(B.disabled),k)),se=(0,i.twMerge)((0,a.default)((0,p.default)(B.container)),P==null?void 0:P.className),ae=(0,i.twMerge)((0,a.default)((0,p.default)(B.input),(0,p.default)(H[(0,c.default)(X.colors,s,"gray")])),E),ne=(0,i.twMerge)((0,a.default)((0,p.default)(B.label)),N==null?void 0:N.className),me=(0,a.default)((0,a.default)((0,p.default)(B.icon)),H[(0,c.default)(X.colors,s,"gray")].color,j==null?void 0:j.className);return r.default.createElement("div",{ref:u,className:oe},r.default.createElement("label",O({},P,{className:se,htmlFor:F.id||K,onMouseDown:function(fe){var ie=P==null?void 0:P.onMouseDown;return w&&Q.create(fe,"dark"),typeof ie=="function"&&ie(fe)}}),r.default.createElement("input",O({},F,{ref:D,type:"radio",disabled:k,className:ae,id:F.id||K})),r.default.createElement("span",{className:me},m||r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 16 16",fill:"currentColor"},r.default.createElement("circle",{"data-name":"ellipse",cx:"8",cy:"8",r:"8"})))),h&&r.default.createElement("label",O({},N,{className:ne,htmlFor:F.id||K}),h))});b.propTypes={color:n.default.oneOf(v.propTypesColor),label:v.propTypesLabel,icon:v.propTypesIcon,ripple:v.propTypesRipple,className:v.propTypesClassName,disabled:v.propTypesDisabled,containerProps:v.propTypesObject,labelProps:v.propTypesObject},b.displayName="MaterialTailwind.Radio";var d=b})(nP);var oP={},Tb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,_){for(var O in _)Object.defineProperty(v,O,{enumerable:!0,get:_[O]})}t(e,{SelectContext:function(){return i},useSelect:function(){return c},usePrevious:function(){return p},SelectContextProvider:function(){return g}});var r=a(A),n=er,o=Rs;function a(v){return v&&v.__esModule?v:{default:v}}var i=r.default.createContext(null);i.displayName="MaterialTailwind.SelectContext";function c(){var v=r.default.useContext(i);if(v===null)throw new Error("useSelect() must be used within a Select. It happens when you use SelectOption component outside the Select component.");return v}function p(v){var _=r.default.useRef();return(0,n.useIsomorphicLayoutEffect)(function(){_.current=v},[v]),_.current}var g=function(v){var _=v.value,O=v.children;return r.default.createElement(i.Provider,{value:_},O)};g.propTypes={value:o.propTypesContextValue,children:o.propTypesChildren},g.displayName="MaterialTailwind.SelectContextProvider"})(Tb);var aP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{SelectOption:function(){return T},default:function(){return x}});var r=_(A),n=_($e),o=Le,a=_(Ie),i=Ae,c=Tb,p=Rs;function g(b,d,l){return d in b?Object.defineProperty(b,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):b[d]=l,b}function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=function(b){var d=function(){U(m),K(s),H(!1),oe(null)},l=function(Oe){(Oe.key==="Enter"||Oe.key===" "&&!ae.current.typing)&&(Oe.preventDefault(),d())},u=b.value,s=u===void 0?"":u,h=b.index,m=h===void 0?0:h,w=b.disabled,E=w===void 0?!1:w,k=b.className,P=k===void 0?"":k,N=b.children,j=O(b,["value","index","disabled","className","children"]),D=(0,i.useTheme)().select,F=D.styles,W=F.base,G=(0,c.useSelect)(),X=G.selectedIndex,U=G.setSelectedIndex,B=G.listRef,H=G.setOpen,K=G.onChange,Q=G.activeIndex,oe=G.setActiveIndex,se=G.getItemProps,ae=G.dataRef,ne=(0,a.default)(W.option.initial),me=(0,a.default)(W.option.active),fe=(0,a.default)(W.option.disabled),ie,ge=(0,o.twMerge)((0,n.default)(ne,(ie={},g(ie,me,X===m),g(ie,fe,E),ie)),P??"");return r.default.createElement("li",v({},j,{role:"option",ref:function(de){return B.current[m]=de},className:ge,disabled:E,tabIndex:Q===m?0:1,"aria-selected":Q===m&&X===m,"data-selected":X===m},se({onClick:function(de){var Oe=j==null?void 0:j.onClick;typeof Oe=="function"&&(Oe(de),d()),d()},onKeyDown:function(de){var Oe=j==null?void 0:j.onKeyDown;typeof Oe=="function"&&(Oe(de),l(de)),l(de)}})),N)};T.propTypes={value:p.propTypesValue,index:p.propTypesIndex,disabled:p.propTypesDisabled,className:p.propTypesClassName,children:p.propTypesChildren},T.displayName="MaterialTailwind.SelectOption";var x=T})(aP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(B,H){for(var K in H)Object.defineProperty(B,K,{enumerable:!0,get:H[K]})}t(e,{Select:function(){return X},Option:function(){return T.SelectOption},useSelect:function(){return O.useSelect},usePrevious:function(){return O.usePrevious},default:function(){return U}});var r=s(A),n=s(Fe),o=Kt,a=er,i=s($e),c=Le,p=s(ar),g=s(Et),v=s(Ie),_=Ae,O=Tb,C=Rs,T=aP;function x(B,H){(H==null||H>B.length)&&(H=B.length);for(var K=0,Q=new Array(H);K=0)&&Object.prototype.propertyIsEnumerable.call(B,Q)&&(K[Q]=B[Q])}return K}function D(B,H){if(B==null)return{};var K={},Q=Object.keys(B),oe,se;for(se=0;se=0)&&(K[oe]=B[oe]);return K}function F(B,H){return b(B)||m(B,H)||G(B,H)||w()}function W(B){return d(B)||h(B)||G(B)||E()}function G(B,H){if(B){if(typeof B=="string")return x(B,H);var K=Object.prototype.toString.call(B).slice(8,-1);if(K==="Object"&&B.constructor&&(K=B.constructor.name),K==="Map"||K==="Set")return Array.from(K);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return x(B,H)}}var X=r.default.forwardRef(function(B,H){var K=B.variant,Q=B.color,oe=B.size,se=B.label,ae=B.error,ne=B.success,me=B.arrow,fe=B.value,ie=B.onChange,ge=B.selected,de=B.offset,Oe=B.dismiss,Me=B.animate,Ce=B.lockScroll,_e=B.labelProps,Ee=B.menuProps,Ke=B.className,Ze=B.disabled,dt=B.name,at=B.children,nt=B.containerProps,He=j(B,["variant","color","size","label","error","success","arrow","value","onChange","selected","offset","dismiss","animate","lockScroll","labelProps","menuProps","className","disabled","name","children","containerProps"]),ue,be=(0,_.useTheme)().select,Se=be.defaultProps,Re=be.valid,ve=be.styles,Pe=ve.base,it=ve.variants,vt=F(r.default.useState("close"),2),ft=vt[0],ee=vt[1];K=K??Se.variant,Q=Q??Se.color,oe=oe??Se.size,se=se??Se.label,ae=ae??Se.error,ne=ne??Se.success,me=me??Se.arrow,fe=fe??Se.value,ie=ie??Se.onChange,ge=ge??Se.selected,de=de??Se.offset,Oe=Oe??Se.dismiss,Me=Me??Se.animate,_e=_e??Se.labelProps,Ee=Ee??Se.menuProps;var he;nt=(he=(0,p.default)(nt,(Se==null?void 0:Se.containerProps)||{}))!==null&&he!==void 0?he:Se.containerProps,Ke=Ke??Se.className;var Te=r.default.useRef([]),We,ct=r.default.useRef(W((We=r.default.Children.map(at,function(St){var Bt=St.props;return Bt==null?void 0:Bt.value}))!==null&&We!==void 0?We:[])),lt=F(r.default.useState(!1),2),qe=lt[0],mt=lt[1],Ot=F(r.default.useState(null),2),Rr=Ot[0],ao=Ot[1],io=F(r.default.useState(0),2),tr=io[0],lo=io[1],Hr=F(r.default.useState(!1),2),so=Hr[0],Pn=Hr[1],Zo=(0,O.usePrevious)(Rr),yr=(0,o.useFloating)({placement:"bottom-start",open:qe,onOpenChange:mt,whileElementsMounted:o.autoUpdate,middleware:[(0,o.offset)(5),(0,o.flip)({padding:10}),(0,o.size)({apply:function(Bt){var Nt=Bt.rects,kn=Bt.elements,oa,ho;Object.assign(kn==null||(oa=kn.floating)===null||oa===void 0?void 0:oa.style,{width:"".concat(Nt==null||(ho=Nt.reference)===null||ho===void 0?void 0:ho.width,"px"),zIndex:99})},padding:20})]}),Bn=yr.x,uo=yr.y,za=yr.strategy,co=yr.refs,Ur=yr.context;r.default.useEffect(function(){lo(Math.max(0,ct.current.indexOf(fe)+1))},[fe]);var Ba=co.floating,ea=(0,o.useInteractions)([(0,o.useClick)(Ur),(0,o.useRole)(Ur,{role:"listbox"}),(0,o.useDismiss)(Ur,k({},Oe)),(0,o.useListNavigation)(Ur,{listRef:Te,activeIndex:Rr,selectedIndex:tr,onNavigate:ao,loop:!0}),(0,o.useTypeahead)(Ur,{listRef:ct,activeIndex:Rr,selectedIndex:tr,onMatch:qe?ao:lo})]),Wa=ea.getReferenceProps,fo=ea.getFloatingProps,po=ea.getItemProps;(0,a.useIsomorphicLayoutEffect)(function(){var St=Ba.current;if(qe&&so&&St){var Bt=Rr!=null?Te.current[Rr]:tr!=null?Te.current[tr]:null;if(Bt&&Zo!=null){var Nt,kn,oa=(kn=(Nt=Te.current[Zo])===null||Nt===void 0?void 0:Nt.offsetHeight)!==null&&kn!==void 0?kn:0,ho=St.offsetHeight,al=Bt.offsetTop,$s=al+oa;alho+St.scrollTop&&(St.scrollTop+=$s-ho-St.scrollTop+5)}}},[qe,so,Zo,Rr]);var we=r.default.useMemo(function(){return{selectedIndex:tr,setSelectedIndex:lo,listRef:Te,setOpen:mt,onChange:ie||function(){},activeIndex:Rr,setActiveIndex:ao,getItemProps:po,dataRef:Ur.dataRef}},[tr,ie,Rr,po,Ur.dataRef]);r.default.useEffect(function(){ee(qe?"open":!qe&&tr||!qe&&fe?"withValue":"close")},[qe,fe,tr,ge]);var Ve=it[(0,g.default)(Re.variants,K,"outlined")],ze=Ve.sizes[(0,g.default)(Re.sizes,oe,"md")],Je=Ve.error.select,pt=Ve.success.select,zt=Ve.colors.select[(0,g.default)(Re.colors,Q,"gray")],Rt=Ve.error.label,Nr=Ve.success.label,Yt=Ve.colors.label[(0,g.default)(Re.colors,Q,"gray")],$r=Ve.states[ft],ta=(0,i.default)((0,v.default)(Pe.container),(0,v.default)(ze.container),nt==null?void 0:nt.className),ln=(0,c.twMerge)((0,i.default)((0,v.default)(Pe.select),(0,v.default)(Ve.base.select),(0,v.default)($r.select),(0,v.default)(ze.select),l({},(0,v.default)(zt[ft]),!ae&&!ne),l({},(0,v.default)(Je.initial),ae),l({},(0,v.default)(Je.states[ft]),ae),l({},(0,v.default)(pt.initial),ne),l({},(0,v.default)(pt.states[ft]),ne)),Ke),rl,Us=(0,c.twMerge)((0,i.default)((0,v.default)(Pe.label),(0,v.default)(Ve.base.label),(0,v.default)($r.label),(0,v.default)(ze.label.initial),(0,v.default)(ze.label.states[ft]),l({},(0,v.default)(Yt[ft]),!ae&&!ne),l({},(0,v.default)(Rt.initial),ae),l({},(0,v.default)(Rt.states[ft]),ae),l({},(0,v.default)(Nr.initial),ne),l({},(0,v.default)(Nr.states[ft]),ne)),(rl=_e.className)!==null&&rl!==void 0?rl:""),ra=(0,i.default)((0,v.default)(Pe.arrow.initial),l({},(0,v.default)(Pe.arrow.active),qe)),Ha,Ua=(0,c.twMerge)((0,i.default)((0,v.default)(Pe.menu)),(Ha=Ee.className)!==null&&Ha!==void 0?Ha:""),nl=(0,i.default)("absolute top-2/4 -translate-y-2/4",K==="outlined"?"left-3 pt-0.5":"left-0 pt-3"),lf={unmount:{opacity:0,transformOrigin:"top",transform:"scale(0.95)",transition:{duration:.2,times:[.4,0,.2,1]}},mount:{opacity:1,transformOrigin:"top",transform:"scale(1)",transition:{duration:.2,times:[.4,0,.2,1]}}},sf=(0,p.default)(lf,Me),ol=a.AnimatePresence;r.default.useEffect(function(){fe&&!ie&&console.error("Warning: You provided a `value` prop to a select component without an `onChange` handler. This will render a read-only select. If the field should be mutable use `onChange` handler with `value` together.")},[fe,ie]);var na=r.default.createElement(o.FloatingFocusManager,{context:Ur,modal:!1},r.default.createElement(a.m.ul,u({},fo(N(k({},Ee),{ref:co.setFloating,role:"listbox",className:Ua,style:{position:za,top:uo??0,left:Bn??0,overflow:"auto"},onPointerEnter:function(Bt){var Nt=Ee==null?void 0:Ee.onPointerEnter;typeof Nt=="function"&&(Nt(Bt),Pn(!1)),Pn(!1)},onPointerMove:function(Bt){var Nt=Ee==null?void 0:Ee.onPointerMove;typeof Nt=="function"&&(Nt(Bt),Pn(!1)),Pn(!1)},onKeyDown:function(Bt){var Nt=Ee==null?void 0:Ee.onKeyDown;typeof Nt=="function"&&(Nt(Bt),Pn(!0)),Pn(!0)}})),{initial:"unmount",exit:"unmount",animate:qe?"mount":"unmount",variants:sf}),r.default.Children.map(at,function(St,Bt){var Nt;return r.default.isValidElement(St)&&r.default.cloneElement(St,N(k({},St.props),{index:((Nt=St.props)===null||Nt===void 0?void 0:Nt.index)||Bt+1,id:"material-tailwind-select-".concat(Bt)}))})));return r.default.createElement(O.SelectContextProvider,{value:we},r.default.createElement("div",u({},nt,{ref:H,className:ta}),r.default.createElement("button",u({type:"button"},Wa(N(k({},He),{ref:co.setReference,className:ln,disabled:Ze,name:dt}))),typeof ge=="function"?r.default.createElement("span",{className:nl},ge(at[tr-1],tr-1)):fe&&!ie?r.default.createElement("span",{className:nl},fe):r.default.createElement("span",u({},(ue=at[tr-1])===null||ue===void 0?void 0:ue.props,{className:nl})),r.default.createElement("div",{className:ra},me??r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},r.default.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})))),r.default.createElement("label",u({},_e,{className:Us}),se),r.default.createElement(a.LazyMotion,{features:a.domAnimation},r.default.createElement(ol,null,qe&&r.default.createElement(r.default.Fragment,null,Ce?r.default.createElement(o.FloatingOverlay,{lockScroll:!0},na):na)))))});X.propTypes={variant:n.default.oneOf(C.propTypesVariant),color:n.default.oneOf(C.propTypesColor),size:n.default.oneOf(C.propTypesSize),label:C.propTypesLabel,error:C.propTypesError,success:C.propTypesSuccess,arrow:C.propTypesArrow,value:C.propTypesValue,onChange:C.propTypesOnChange,selected:C.propTypesSelected,offset:C.propTypesOffset,dismiss:C.propTypesDismiss,animate:C.propTypesAnimate,lockScroll:C.propTypesLockScroll,labelProps:C.propTypesLabelProps,menuProps:C.propTypesMenuProps,className:C.propTypesClassName,disabled:C.propTypesDisabled,name:C.propTypesName,children:C.propTypesChildren,containerProps:C.propTypesContainerProps},X.displayName="MaterialTailwind.Select";var U=Object.assign(X,{Option:T.SelectOption})})(oP);var iP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Switch:function(){return b},default:function(){return d}});var r=C(A),n=C(Fe),o=C(qi),a=C($e),i=Le,c=C(Et),p=C(Ie),g=Ae,v=Da;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.color,h=l.label,m=l.ripple,w=l.className,E=l.disabled,k=l.containerProps,P=l.circleProps,N=l.labelProps,j=l.inputRef,D=T(l,["color","label","ripple","className","disabled","containerProps","circleProps","labelProps","inputRef"]),F=(0,g.useTheme)(),W=F.switch,G=W.defaultProps,X=W.valid,U=W.styles,B=U.base,H=U.colors,K=r.default.useId();s=s??G.color,m=m??G.ripple,w=w??G.className,E=E??G.disabled,k=k??G.containerProps,N=N??G.labelProps,P=P??G.circleProps;var Q=m!==void 0&&new o.default,oe=(0,a.default)((0,p.default)(B.root),_({},(0,p.default)(B.disabled),E)),se=(0,i.twMerge)((0,a.default)((0,p.default)(B.container)),k==null?void 0:k.className),ae=(0,i.twMerge)((0,a.default)((0,p.default)(B.input),(0,p.default)(H[(0,c.default)(X.colors,s,"gray")])),w),ne=(0,i.twMerge)((0,a.default)((0,p.default)(B.circle),H[(0,c.default)(X.colors,s,"gray")].circle,H[(0,c.default)(X.colors,s,"gray")].before),P==null?void 0:P.className),me=(0,a.default)((0,p.default)(B.ripple)),fe=(0,i.twMerge)((0,a.default)((0,p.default)(B.label)),N==null?void 0:N.className);return r.default.createElement("div",{ref:u,className:oe},r.default.createElement("div",O({},k,{className:se}),r.default.createElement("input",O({},D,{ref:j,type:"checkbox",disabled:E,id:D.id||K,className:ae})),r.default.createElement("label",O({},P,{htmlFor:D.id||K,className:ne}),m&&r.default.createElement("div",{className:me,onMouseDown:function(ie){var ge=k==null?void 0:k.onMouseDown;return m&&Q.create(ie,"dark"),typeof ge=="function"&&ge(ie)}}))),h&&r.default.createElement("label",O({},N,{htmlFor:D.id||K,className:fe}),h))});b.propTypes={color:n.default.oneOf(v.propTypesColor),label:v.propTypesLabel,ripple:v.propTypesRipple,className:v.propTypesClassName,disabled:v.propTypesDisabled,containerProps:v.propTypesObject,labelProps:v.propTypesObject,circleProps:v.propTypesObject},b.displayName="MaterialTailwind.Switch";var d=b})(iP);var lP={},Ji={},Va={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,T){for(var x in T)Object.defineProperty(C,x,{enumerable:!0,get:T[x]})}t(e,{propTypesId:function(){return a},propTypesValue:function(){return i},propTypesAnimate:function(){return c},propTypesDisabled:function(){return p},propTypesClassName:function(){return g},propTypesOrientation:function(){return v},propTypesIndicator:function(){return _},propTypesChildren:function(){return O}});var r=o(Fe),n=Ct;function o(C){return C&&C.__esModule?C:{default:C}}var a=r.default.string,i=r.default.oneOfType([r.default.string,r.default.number]).isRequired,c=n.propTypesAnimation,p=r.default.bool,g=r.default.string,v=r.default.oneOf(["horizontal","vertical"]),_=r.default.instanceOf(Object),O=r.default.node.isRequired})(Va);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(k,P){for(var N in P)Object.defineProperty(k,N,{enumerable:!0,get:P[N]})}t(e,{TabsContext:function(){return b},useTabs:function(){return d},TabsContextProvider:function(){return l},setId:function(){return u},setActive:function(){return s},setAnimation:function(){return h},setIndicator:function(){return m},setIsInitial:function(){return w},setOrientation:function(){return E}});var r=c(A),n=Va;function o(k,P){(P==null||P>k.length)&&(P=k.length);for(var N=0,j=new Array(P);N=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.value,s=d.className,h=d.activeClassName,m=d.disabled,w=d.children,E=C(d,["value","className","activeClassName","disabled","children"]),k=(0,c.useTheme)(),P=k.tab,N=P.defaultProps,j=P.styles.base,D=(0,p.useTabs)(),F=D.state,W=D.dispatch,G=F.id,X=F.active,U=F.indicatorProps;s=s??N.className,h=h??N.activeClassName,m=m??N.disabled;var B,H=(0,a.twMerge)((0,o.default)((0,i.default)(j.tab.initial),(B={},v(B,(0,i.default)(j.tab.disabled),m),v(B,h,X===u),B)),s),K,Q=(0,a.twMerge)((0,o.default)((0,i.default)(j.indicator)),(K=U==null?void 0:U.className)!==null&&K!==void 0?K:"");return r.default.createElement("li",_({},E,{ref:l,role:"tab",className:H,onClick:function(oe){var se=E==null?void 0:E.onClick;typeof se=="function"&&((0,p.setActive)(W,u),(0,p.setIsInitial)(W,!1),se(oe)),(0,p.setIsInitial)(W,!1),(0,p.setActive)(W,u)},"data-value":u}),r.default.createElement("div",{className:"z-20 text-inherit"},w),X===u&&r.default.createElement(n.motion.div,_({},U,{transition:{duration:.5},className:Q,layoutId:G})))});x.propTypes={value:g.propTypesValue,className:g.propTypesClassName,disabled:g.propTypesDisabled,children:g.propTypesChildren},x.displayName="MaterialTailwind.Tab";var b=x})(sP);var uP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{TabsBody:function(){return x},default:function(){return b}});var r=O(A),n=er,o=O(ar),a=O($e),i=Le,c=O(Ie),p=Ae,g=Ji,v=Va;function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.animate,s=d.className,h=d.children,m=C(d,["animate","className","children"]),w=(0,p.useTheme)().tabsBody,E=w.defaultProps,k=w.styles.base,P=(0,g.useTabs)().dispatch;s=s??E.className,u=u??E.animate;var N=(0,i.twMerge)((0,a.default)((0,c.default)(k)),s),j=r.default.useMemo(function(){return{initial:{opacity:0,position:"absolute",top:"0",left:"0",zIndex:1,transition:{duration:0}},unmount:{opacity:0,position:"absolute",top:"0",left:"0",zIndex:1,transition:{duration:.5,times:[.4,0,.2,1]}},mount:{opacity:1,position:"relative",zIndex:2,transition:{duration:.5,times:[.4,0,.2,1]}}}},[]),D=r.default.useMemo(function(){return(0,o.default)(j,u)},[u,j]);return(0,n.useIsomorphicLayoutEffect)(function(){(0,g.setAnimation)(P,D)},[D,P]),r.default.createElement("div",_({},m,{ref:l,className:N}),h)});x.propTypes={animate:v.propTypesAnimate,className:v.propTypesClassName,children:v.propTypesChildren},x.displayName="MaterialTailwind.TabsBody";var b=x})(uP);var cP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{TabsHeader:function(){return T},default:function(){return x}});var r=_(A),n=_($e),o=Le,a=_(Ie),i=Ae,c=Ji,p=Va;function g(b,d,l){return d in b?Object.defineProperty(b,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):b[d]=l,b}function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.indicatorProps,u=b.className,s=b.children,h=O(b,["indicatorProps","className","children"]),m=(0,i.useTheme)().tabsHeader,w=m.defaultProps,E=m.styles,k=(0,c.useTabs)(),P=k.state,N=k.dispatch,j=P.orientation;r.default.useEffect(function(){(0,c.setIndicator)(N,l)},[N,l]),u=u??w.className;var D=(0,o.twMerge)((0,n.default)((0,a.default)(E.base),g({},E[j]&&(0,a.default)(E[j]),j)),u);return r.default.createElement("nav",null,r.default.createElement("ul",v({},h,{ref:d,role:"tablist",className:D}),s))});T.propTypes={indicatorProps:p.propTypesIndicator,className:p.propTypesClassName,children:p.propTypesChildren},T.displayName="MaterialTailwind.TabsHeader";var x=T})(cP);var dP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{TabPanel:function(){return T},default:function(){return x}});var r=_(A),n=er,o=_($e),a=Le,i=_(Ie),c=Ae,p=Ji,g=Va;function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.value,u=b.className,s=b.children,h=O(b,["value","className","children"]),m=(0,c.useTheme)().tabPanel,w=m.defaultProps,E=m.styles.base,k=(0,p.useTabs)().state,P=k.active,N=k.appliedAnimation,j=k.isInitial;u=u??w.className;var D=(0,a.twMerge)((0,o.default)((0,i.default)(E)),u),F=n.AnimatePresence;return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(F,{exitBeforeEnter:!0},r.default.createElement(n.m.div,v({},h,{ref:d,role:"tabpanel",className:D,initial:"unmount",exit:"unmount",animate:P===l?"mount":j?"initial":"unmount",variants:N,"data-value":l}),s)))});T.propTypes={value:g.propTypesValue,className:g.propTypesClassName,children:g.propTypesChildren},T.displayName="MaterialTailwind.TabPanel";var x=T})(dP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{Tabs:function(){return l},Tab:function(){return p.Tab},TabsBody:function(){return g.TabsBody},TabsHeader:function(){return v.TabsHeader},TabPanel:function(){return _.TabPanel},useTabs:function(){return c.useTabs},default:function(){return u}});var r=x(A),n=x($e),o=Le,a=x(Ie),i=Ae,c=Ji,p=sP,g=uP,v=cP,_=dP,O=Va;function C(s,h,m){return h in s?Object.defineProperty(s,h,{value:m,enumerable:!0,configurable:!0,writable:!0}):s[h]=m,s}function T(){return T=Object.assign||function(s){for(var h=1;h=0)&&Object.prototype.propertyIsEnumerable.call(s,w)&&(m[w]=s[w])}return m}function d(s,h){if(s==null)return{};var m={},w=Object.keys(s),E,k;for(k=0;k=0)&&(m[E]=s[E]);return m}var l=r.default.forwardRef(function(s,h){var m=s.value,w=s.className,E=s.orientation,k=s.children,P=b(s,["value","className","orientation","children"]),N=(0,i.useTheme)().tabs,j=N.defaultProps,D=N.styles,F=r.default.useId();w=w??j.className,E=E??j.orientation;var W=(0,o.twMerge)((0,n.default)((0,a.default)(D.base),C({},D[E]&&(0,a.default)(D[E]),E)),w);return r.default.createElement(c.TabsContextProvider,{id:F,value:m,orientation:E},r.default.createElement("div",T({},P,{ref:h,className:W}),k))});l.propTypes={id:O.propTypesId,value:O.propTypesValue,className:O.propTypesClassName,orientation:O.propTypesOrientation,children:O.propTypesChildren},l.displayName="MaterialTailwind.Tabs";var u=Object.assign(l,{Tab:p.Tab,Body:g.TabsBody,Header:v.TabsHeader,Panel:_.TabPanel})})(lP);var fP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{Textarea:function(){return T},default:function(){return x}});var r=_(A),n=_(Fe),o=_($e),a=_(Et),i=_(Ie),c=Ae,p=Es;function g(b,d,l){return d in b?Object.defineProperty(b,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):b[d]=l,b}function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.variant,u=b.color,s=b.size,h=b.label,m=b.error,w=b.success,E=b.resize,k=b.labelProps,P=b.containerProps,N=b.shrink,j=b.className,D=O(b,["variant","color","size","label","error","success","resize","labelProps","containerProps","shrink","className"]),F=(0,c.useTheme)().textarea,W=F.defaultProps,G=F.valid,X=F.styles,U=X.base,B=X.variants;l=l??W.variant,s=s??W.size,u=u??W.color,h=h??W.label,k=k??W.labelProps,P=P??W.containerProps,N=N??W.shrink,j=j??W.className;var H=B[(0,a.default)(G.variants,l,"outlined")],K=(0,i.default)(H.error.textarea),Q=(0,i.default)(H.success.textarea),oe=(0,i.default)(H.shrink.textarea),se=(0,i.default)(H.colors.textarea[(0,a.default)(G.colors,u,"gray")]),ae=(0,i.default)(H.error.label),ne=(0,i.default)(H.success.label),me=(0,i.default)(H.shrink.label),fe=(0,i.default)(H.colors.label[(0,a.default)(G.colors,u,"gray")]),ie=(0,o.default)((0,i.default)(U.container),P==null?void 0:P.className),ge=(0,o.default)((0,i.default)(U.textarea),(0,i.default)(H.base.textarea),(0,i.default)(H.sizes[(0,a.default)(G.sizes,s,"md")].textarea),g({},se,!m&&!w),g({},K,m),g({},Q,w),g({},oe,N),E?"":"!resize-none",j),de=(0,o.default)((0,i.default)(U.label),(0,i.default)(H.base.label),(0,i.default)(H.sizes[(0,a.default)(G.sizes,s,"md")].label),g({},fe,!m&&!w),g({},ae,m),g({},ne,w),g({},me,N),k==null?void 0:k.className);return r.default.createElement("div",{ref:d,className:ie},r.default.createElement("textarea",v({},D,{className:ge,placeholder:(D==null?void 0:D.placeholder)||" "})),r.default.createElement("label",{className:de},h))});T.propTypes={variant:n.default.oneOf(p.propTypesVariant),size:n.default.oneOf(p.propTypesSize),color:n.default.oneOf(p.propTypesColor),label:p.propTypesLabel,error:p.propTypesError,success:p.propTypesSuccess,resize:p.propTypesResize,labelProps:p.propTypesLabelProps,containerProps:p.propTypesContainerProps,shrink:p.propTypesShrink,className:p.propTypesClassName},T.displayName="MaterialTailwind.Textarea";var x=T})(fP);var pP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(j,D){for(var F in D)Object.defineProperty(j,F,{enumerable:!0,get:D[F]})}t(e,{Tooltip:function(){return P},default:function(){return N}});var r=b(A),n=b(Fe),o=Kt,a=er,i=b($e),c=Le,p=b(ar),g=b(Ie),v=Ae,_=Qi;function O(j,D){(D==null||D>j.length)&&(D=j.length);for(var F=0,W=new Array(D);F=0)&&Object.prototype.propertyIsEnumerable.call(j,W)&&(F[W]=j[W])}return F}function w(j,D){if(j==null)return{};var F={},W=Object.keys(j),G,X;for(X=0;X=0)&&(F[G]=j[G]);return F}function E(j,D){return C(j)||d(j,D)||k(j,D)||l()}function k(j,D){if(j){if(typeof j=="string")return O(j,D);var F=Object.prototype.toString.call(j).slice(8,-1);if(F==="Object"&&j.constructor&&(F=j.constructor.name),F==="Map"||F==="Set")return Array.from(F);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return O(j,D)}}var P=r.default.forwardRef(function(j,D){var F=j.open,W=j.handler,G=j.content,X=j.interactive,U=j.placement,B=j.offset,H=j.dismiss,K=j.animate,Q=j.className,oe=j.children,se=m(j,["open","handler","content","interactive","placement","offset","dismiss","animate","className","children"]),ae=(0,v.useTheme)().tooltip,ne=ae.defaultProps,me=ae.styles.base,fe=E(r.default.useState(!1),2),ie=fe[0],ge=fe[1];F=F??ie,W=W??ge,X=X??ne.interactive,U=U??ne.placement,B=B??ne.offset,H=H??ne.dismiss,K=K??ne.animate,Q=Q??ne.className;var de=(0,c.twMerge)((0,i.default)((0,g.default)(me)),Q),Oe={unmount:{opacity:0},mount:{opacity:1}},Me=(0,p.default)(Oe,K),Ce=(0,o.useFloating)({open:F,onOpenChange:W,middleware:[(0,o.offset)(B),(0,o.flip)(),(0,o.shift)()],placement:U}),_e=Ce.x,Ee=Ce.y,Ke=Ce.reference,Ze=Ce.floating,dt=Ce.strategy,at=Ce.refs,nt=Ce.update,He=Ce.context,ue=(0,o.useInteractions)([(0,o.useClick)(He,{enabled:X}),(0,o.useFocus)(He),(0,o.useHover)(He),(0,o.useRole)(He,{role:"tooltip"}),(0,o.useDismiss)(He,H)]),be=ue.getReferenceProps,Se=ue.getFloatingProps;r.default.useEffect(function(){if(at.reference.current&&at.floating.current&&F)return(0,o.autoUpdate)(at.reference.current,at.floating.current,nt)},[F,nt,at.reference,at.floating]);var Re=(0,o.useMergeRefs)([D,Ze]),ve=(0,o.useMergeRefs)([D,Ke]),Pe=a.AnimatePresence;return r.default.createElement(r.default.Fragment,null,typeof oe=="string"?r.default.createElement("span",x({},be({ref:ve})),oe):r.default.cloneElement(oe,u({},be(h(u({},oe==null?void 0:oe.props),{ref:ve})))),r.default.createElement(a.LazyMotion,{features:a.domAnimation},r.default.createElement(o.FloatingPortal,null,r.default.createElement(Pe,null,F&&r.default.createElement(a.m.div,x({},Se(h(u({},se),{ref:Re,className:de,style:{position:dt,top:Ee??"",left:_e??""}})),{initial:"unmount",exit:"unmount",animate:F?"mount":"unmount",variants:Me}),G)))))});P.propTypes={open:_.propTypesOpen,handler:_.propTypesHandler,content:_.propTypesContent,interactive:_.propTypesInteractive,placement:n.default.oneOf(_.propTypesPlacement),offset:_.propTypesOffset,dismiss:_.propTypesDismiss,animate:_.propTypesAnimate,className:_.propTypesClassName,children:_.propTypesChildren},P.displayName="MaterialTailwind.Tooltip";var N=P})(pP);var hP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,s){for(var h in s)Object.defineProperty(u,h,{enumerable:!0,get:s[h]})}t(e,{Typography:function(){return d},default:function(){return l}});var r=_(A),n=_(Fe),o=_($e),a=Le,i=_(Et),c=_(Ie),p=Ae,g=Fg;function v(u,s,h){return s in u?Object.defineProperty(u,s,{value:h,enumerable:!0,configurable:!0,writable:!0}):u[s]=h,u}function _(u){return u&&u.__esModule?u:{default:u}}function O(u){for(var s=1;s=0)&&Object.prototype.propertyIsEnumerable.call(u,m)&&(h[m]=u[m])}return h}function b(u,s){if(u==null)return{};var h={},m=Object.keys(u),w,E;for(E=0;E=0)&&(h[w]=u[w]);return h}var d=r.default.forwardRef(function(u,s){var h=u.variant,m=u.color,w=u.textGradient,E=u.as,k=u.className,P=u.children,N=x(u,["variant","color","textGradient","as","className","children"]),j=(0,p.useTheme)().typography,D=j.defaultProps,F=j.valid,W=j.styles,G=W.variants,X=W.colors,U=W.textGradient;h=h??D.variant,m=m??D.color,w=w||D.textGradient,E=E??void 0,k=k??D.className;var B=(0,c.default)(G[(0,i.default)(F.variants,h,"paragraph")]),H=X[(0,i.default)(F.colors,m,"inherit")],K=(0,c.default)(U),Q=(0,a.twMerge)((0,o.default)(B,v({},H.color,!w),v({},K,w),v({},H.gradient,w)),k),oe;switch(h){case"h1":oe=r.default.createElement(E||"h1",T(O({},N),{ref:s,className:Q}),P);break;case"h2":oe=r.default.createElement(E||"h2",T(O({},N),{ref:s,className:Q}),P);break;case"h3":oe=r.default.createElement(E||"h3",T(O({},N),{ref:s,className:Q}),P);break;case"h4":oe=r.default.createElement(E||"h4",T(O({},N),{ref:s,className:Q}),P);break;case"h5":oe=r.default.createElement(E||"h5",T(O({},N),{ref:s,className:Q}),P);break;case"h6":oe=r.default.createElement(E||"h6",T(O({},N),{ref:s,className:Q}),P);break;case"lead":oe=r.default.createElement(E||"p",T(O({},N),{ref:s,className:Q}),P);break;case"paragraph":oe=r.default.createElement(E||"p",T(O({},N),{ref:s,className:Q}),P);break;case"small":oe=r.default.createElement(E||"p",T(O({},N),{ref:s,className:Q}),P);break;default:oe=r.default.createElement(E||"p",T(O({},N),{ref:s,className:Q}),P);break}return oe});d.propTypes={variant:n.default.oneOf(g.propTypesVariant),color:n.default.oneOf(g.propTypesColor),as:g.propTypesAs,textGradient:g.propTypesTextGradient,className:g.propTypesClassName,children:g.propTypesChildren},d.displayName="MaterialTailwind.Typography";var l=d})(hP);var gP={},bP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(g,v){for(var _ in v)Object.defineProperty(g,_,{enumerable:!0,get:v[_]})}t(e,{propTypesClassName:function(){return a},propTypesChildren:function(){return i},propTypesOpen:function(){return c},propTypesAnimate:function(){return p}});var r=o(Fe),n=Ct;function o(g){return g&&g.__esModule?g:{default:g}}var a=r.default.string,i=r.default.node.isRequired,c=r.default.bool.isRequired,p=n.propTypesAnimation})(bP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{Collapse:function(){return x},default:function(){return b}});var r=O(A),n=er,o=Kt,a=O(ar),i=O($e),c=Le,p=O(Ie),g=Ae,v=bP;function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.open,s=d.animate,h=d.className,m=d.children,w=C(d,["open","animate","className","children"]),E=r.default.useRef(null),k=(0,g.useTheme)().collapse,P=k.styles,N=P.base;s=s??{},h=h??"";var j=(0,c.twMerge)((0,i.default)((0,p.default)(N)),h),D={unmount:{height:"0px",transition:{duration:.3,times:[.4,0,.2,1]}},mount:{height:"auto",transition:{duration:.3,times:[.4,0,.2,1]}}},F=(0,a.default)(D,s),W=n.AnimatePresence,G=(0,o.useMergeRefs)([l,E]);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(W,null,r.default.createElement(n.m.div,_({},w,{ref:G,className:j,initial:"unmount",exit:"unmount",animate:u?"mount":"unmount",variants:F}),m)))});x.displayName="MaterialTailwind.Collapse",x.propTypes={open:v.propTypesOpen,animate:v.propTypesAnimate,className:v.propTypesClassName,children:v.propTypesChildren};var b=x})(gP);var vP={},zs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(g,v){for(var _ in v)Object.defineProperty(g,_,{enumerable:!0,get:v[_]})}t(e,{propTypesClassName:function(){return o},propTypesDisabled:function(){return a},propTypesSelected:function(){return i},propTypesRipple:function(){return c},propTypesChildren:function(){return p}});var r=n(Fe);function n(g){return g&&g.__esModule?g:{default:g}}var o=r.default.string,a=r.default.bool,i=r.default.bool,c=r.default.bool,p=r.default.node.isRequired})(zs);var mP={},Cb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(T,x){for(var b in x)Object.defineProperty(T,b,{enumerable:!0,get:x[b]})}t(e,{ListItemPrefix:function(){return O},default:function(){return C}});var r=g(A),n=Ae,o=g($e),a=Le,i=g(Ie),c=zs;function p(){return p=Object.assign||function(T){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(T,d)&&(b[d]=T[d])}return b}function _(T,x){if(T==null)return{};var b={},d=Object.keys(T),l,u;for(u=0;u=0)&&(b[l]=T[l]);return b}var O=r.default.forwardRef(function(T,x){var b=T.className,d=T.children,l=v(T,["className","children"]),u=(0,n.useTheme)().list,s=u.styles.base,h=(0,a.twMerge)((0,o.default)((0,i.default)(s.itemPrefix)),b);return r.default.createElement("div",p({},l,{ref:x,className:h}),d)});O.propTypes={className:c.propTypesClassName,children:c.propTypesChildren},O.displayName="MaterialTailwind.ListItemPrefix";var C=O})(Cb);var Ob={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(T,x){for(var b in x)Object.defineProperty(T,b,{enumerable:!0,get:x[b]})}t(e,{ListItemSuffix:function(){return O},default:function(){return C}});var r=g(A),n=Ae,o=g($e),a=Le,i=g(Ie),c=zs;function p(){return p=Object.assign||function(T){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(T,d)&&(b[d]=T[d])}return b}function _(T,x){if(T==null)return{};var b={},d=Object.keys(T),l,u;for(u=0;u=0)&&(b[l]=T[l]);return b}var O=r.default.forwardRef(function(T,x){var b=T.className,d=T.children,l=v(T,["className","children"]),u=(0,n.useTheme)().list,s=u.styles.base,h=(0,a.twMerge)((0,o.default)((0,i.default)(s.itemSuffix)),b);return r.default.createElement("div",p({},l,{ref:x,className:h}),d)});O.propTypes={className:c.propTypesClassName,children:c.propTypesChildren},O.displayName="MaterialTailwind.ListItemSuffix";var C=O})(Ob);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{ListItem:function(){return b},ListItemPrefix:function(){return g.ListItemPrefix},ListItemSuffix:function(){return v.ListItemSuffix},default:function(){return d}});var r=C(A),n=Ae,o=C(qi),a=C($e),i=Le,c=C(Ie),p=zs,g=Cb,v=Ob;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.className,h=l.disabled,m=l.selected,w=l.ripple,E=l.children,k=T(l,["className","disabled","selected","ripple","children"]),P=(0,n.useTheme)().list,N=P.defaultProps,j=P.styles.base;w=w??N.ripple;var D=w!==void 0&&new o.default,F,W=(0,i.twMerge)((0,a.default)((0,c.default)(j.item.initial),(F={},_(F,(0,c.default)(j.item.disabled),h),_(F,(0,c.default)(j.item.selected),m&&!h),F)),s);return r.default.createElement("div",O({},k,{ref:u,role:"button",tabIndex:0,className:W,onMouseDown:function(G){var X=k==null?void 0:k.onMouseDown;return w&&D.create(G,"dark"),typeof X=="function"&&X(G)}}),E)});b.propTypes={className:p.propTypesClassName,selected:p.propTypesSelected,disabled:p.propTypesDisabled,ripple:p.propTypesRipple,children:p.propTypesChildren},b.displayName="MaterialTailwind.ListItem";var d=Object.assign(b,{Prefix:g.ListItemPrefix,Suffix:v.ListItemSuffix})})(mP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{List:function(){return x},ListItem:function(){return p.ListItem},ListItemPrefix:function(){return g.ListItemPrefix},ListItemSuffix:function(){return v.ListItemSuffix},default:function(){return b}});var r=O(A),n=Ae,o=O($e),a=Le,i=O(Ie),c=zs,p=mP,g=Cb,v=Ob;function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.className,s=d.children,h=C(d,["className","children"]),m=(0,n.useTheme)().list,w=m.defaultProps,E=m.styles.base;u=u??w.className;var k=(0,a.twMerge)((0,o.default)((0,i.default)(E.list)),u);return r.default.createElement("nav",_({},h,{ref:l,className:k}),s)});x.propTypes={className:c.propTypesClassName,children:c.propTypesChildren},x.displayName="MaterialTailwind.List";var b=Object.assign(x,{Item:p.ListItem,ItemPrefix:g.ListItemPrefix,ItemSuffix:v.ListItemSuffix})})(vP);var yP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,l){for(var u in l)Object.defineProperty(d,u,{enumerable:!0,get:l[u]})}t(e,{ButtonGroup:function(){return x},default:function(){return b}});var r=O(A),n=O(Fe),o=O($e),a=Le,i=O(Et),c=O(Ie),p=Ae,g=Ma;function v(d,l,u){return l in d?Object.defineProperty(d,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[l]=u,d}function _(){return _=Object.assign||function(d){for(var l=1;l=0)&&Object.prototype.propertyIsEnumerable.call(d,s)&&(u[s]=d[s])}return u}function T(d,l){if(d==null)return{};var u={},s=Object.keys(d),h,m;for(m=0;m=0)&&(u[h]=d[h]);return u}var x=r.default.forwardRef(function(d,l){var u=d.variant,s=d.size,h=d.color,m=d.fullWidth,w=d.ripple,E=d.className,k=d.children,P=C(d,["variant","size","color","fullWidth","ripple","className","children"]),N=(0,p.useTheme)().buttonGroup,j=N.defaultProps,D=N.styles,F=N.valid,W=D.base,G=D.dividerColor;u=u??j.variant,s=s??j.size,h=h??j.color,w=w??j.ripple,m=m??j.fullWidth,E=E??j.className;var X,U=(0,a.twMerge)((0,o.default)((0,c.default)(W.initial),(X={},v(X,(0,c.default)(W.fullWidth),m),v(X,"divide-x",u!=="outlined"),v(X,(0,c.default)(G[(0,i.default)(F.colors,h,"gray")]),u!=="outlined"),X)),E);return r.default.createElement("div",_({},P,{ref:l,className:U}),r.default.Children.map(k,function(B,H){var K;return r.default.isValidElement(B)&&r.default.cloneElement(B,{variant:u,size:s,color:h,ripple:w,fullWidth:m,className:(0,a.twMerge)((0,o.default)({"rounded-r-none":H!==r.default.Children.count(k)-1,"border-r-0":H!==r.default.Children.count(k)-1,"rounded-l-none":H!==0}),(K=B.props)===null||K===void 0?void 0:K.className)})}))});x.propTypes={variant:n.default.oneOf(g.propTypesVariant),size:n.default.oneOf(g.propTypesSize),color:n.default.oneOf(g.propTypesColor),fullWidth:g.propTypesFullWidth,ripple:g.propTypesRipple,className:g.propTypesClassName,children:g.propTypesChildren},x.displayName="MaterialTailwind.ButtonGroup";var b=x})(yP);var wP={},xP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(T,x){for(var b in x)Object.defineProperty(T,b,{enumerable:!0,get:x[b]})}t(e,{propTypesClassName:function(){return o},propTypesPrevArrow:function(){return a},propTypesNextArrow:function(){return i},propTypesNavigation:function(){return c},propTypesAutoplay:function(){return p},propTypesAutoplayDelay:function(){return g},propTypesTransition:function(){return v},propTypesLoop:function(){return _},propTypesChildren:function(){return O},propTypesSlideRef:function(){return C}});var r=n(Fe);function n(T){return T&&T.__esModule?T:{default:T}}var o=r.default.string,a=r.default.func,i=r.default.func,c=r.default.func,p=r.default.bool,g=r.default.number,v=r.default.object,_=r.default.bool,O=r.default.node.isRequired,C=r.default.oneOfType([r.default.func,r.default.shape({current:r.default.any})])})(xP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,w){for(var E in w)Object.defineProperty(m,E,{enumerable:!0,get:w[E]})}t(e,{Carousel:function(){return s},default:function(){return h}});var r=C(A),n=er,o=Kt,a=C($e),i=Le,c=C(Ie),p=Ae,g=xP;function v(m,w){(w==null||w>m.length)&&(w=m.length);for(var E=0,k=new Array(w);E=0)&&Object.prototype.propertyIsEnumerable.call(m,k)&&(E[k]=m[k])}return E}function d(m,w){if(m==null)return{};var E={},k=Object.keys(m),P,N;for(N=0;N=0)&&(E[P]=m[P]);return E}function l(m,w){return _(m)||T(m,w)||u(m,w)||x()}function u(m,w){if(m){if(typeof m=="string")return v(m,w);var E=Object.prototype.toString.call(m).slice(8,-1);if(E==="Object"&&m.constructor&&(E=m.constructor.name),E==="Map"||E==="Set")return Array.from(E);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return v(m,w)}}var s=r.default.forwardRef(function(m,w){var E=m.children,k=m.prevArrow,P=m.nextArrow,N=m.navigation,j=m.autoplay,D=m.autoplayDelay,F=m.transition,W=m.loop,G=m.className,X=m.slideRef,U=b(m,["children","prevArrow","nextArrow","navigation","autoplay","autoplayDelay","transition","loop","className","slideRef"]),B=(0,p.useTheme)().carousel,H=B.defaultProps,K=B.styles.base,Q=(0,n.useMotionValue)(0),oe=r.default.useRef(null),se=l(r.default.useState(0),2),ae=se[0],ne=se[1],me=r.default.Children.toArray(E);G=G??H.className,k=k??H.prevArrow,P=P??H.nextArrow,N=N??H.navigation,j=j??H.autoplay,D=D??H.autoplayDelay,F=F??H.transition,W=W??H.loop;var fe=(0,i.twMerge)((0,a.default)((0,c.default)(K.carousel)),G),ie=(0,i.twMerge)((0,a.default)((0,c.default)(K.slide))),ge=r.default.useCallback(function(){var Ce;return-ae*(((Ce=oe.current)===null||Ce===void 0?void 0:Ce.clientWidth)||0)},[ae]),de=r.default.useCallback(function(){var Ce=W?0:ae;ne(ae+1===me.length?Ce:ae+1)},[ae,W,me.length]),Oe=function(){var Ce=W?me.length-1:0;ne(ae-1<0?Ce:ae-1)};r.default.useEffect(function(){var Ce=(0,n.animate)(Q,ge(),F);return Ce.stop},[ge,ae,Q,F]),r.default.useEffect(function(){window.addEventListener("resize",function(){(0,n.animate)(Q,ge(),F)})},[ge,F,Q]),r.default.useEffect(function(){if(j){var Ce=setInterval(function(){return de()},D);return function(){return clearInterval(Ce)}}},[j,de,D]);var Me=(0,o.useMergeRefs)([oe,w]);return r.default.createElement("div",O({},U,{ref:Me,className:fe}),me.map(function(Ce,_e){return r.default.createElement(n.LazyMotion,{key:_e,features:n.domAnimation},r.default.createElement(n.m.div,{ref:X,className:ie,style:{x:Q,left:"".concat(_e*100,"%"),right:"".concat(_e*100,"%")}},Ce))}),k&&k({loop:W,handlePrev:Oe,activeIndex:ae,firstIndex:ae===0}),P&&P({loop:W,handleNext:de,activeIndex:ae,lastIndex:ae===me.length-1}),N&&N({setActiveIndex:ne,activeIndex:ae,length:me.length}))});s.propTypes={className:g.propTypesClassName,children:g.propTypesChildren,nextArrow:g.propTypesNextArrow,prevArrow:g.propTypesPrevArrow,navigation:g.propTypesNavigation,autoplay:g.propTypesAutoplay,autoplayDelay:g.propTypesAutoplayDelay,transition:g.propTypesTransition,loop:g.propTypesLoop,slideRef:g.propTypesSlideRef},s.displayName="MaterialTailwind.Carousel";var h=s})(wP);var _P={},TP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{propTypesOpen:function(){return a},propTypesSize:function(){return i},propTypesOverlay:function(){return c},propTypesChildren:function(){return p},propTypesPlacement:function(){return g},propTypesOverlayProps:function(){return v},propTypesClassName:function(){return _},propTypesOnClose:function(){return O},propTypesDismiss:function(){return C},propTypesTransition:function(){return T},propTypesOverlayRef:function(){return x}});var r=o(Fe),n=Ct;function o(b){return b&&b.__esModule?b:{default:b}}var a=r.default.bool.isRequired,i=r.default.number,c=r.default.bool,p=r.default.node.isRequired,g=["top","right","bottom","left"],v=r.default.object,_=r.default.string,O=r.default.func,C=n.propTypesDismissType,T=r.default.object,x=r.default.oneOfType([r.default.func,r.default.shape({current:r.default.any})])})(TP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{Drawer:function(){return l},default:function(){return u}});var r=T(A),n=T(Fe),o=er,a=Kt,i=T(ar),c=T($e),p=Le,g=T(Ie),v=Ae,_=TP;function O(s,h,m){return h in s?Object.defineProperty(s,h,{value:m,enumerable:!0,configurable:!0,writable:!0}):s[h]=m,s}function C(){return C=Object.assign||function(s){for(var h=1;h=0)&&Object.prototype.propertyIsEnumerable.call(s,w)&&(m[w]=s[w])}return m}function d(s,h){if(s==null)return{};var m={},w=Object.keys(s),E,k;for(k=0;k=0)&&(m[E]=s[E]);return m}var l=r.default.forwardRef(function(s,h){var m=s.open,w=s.size,E=s.overlay,k=s.children,P=s.placement,N=s.overlayProps,j=s.className,D=s.onClose,F=s.dismiss,W=s.transition,G=s.overlayRef,X=b(s,["open","size","overlay","children","placement","overlayProps","className","onClose","dismiss","transition","overlayRef"]),U=(0,v.useTheme)().drawer,B=U.defaultProps,H=U.styles.base,K=(0,o.useAnimation)();w=w??B.size,E=E??B.overlay,P=P??B.placement,j=j??B.className,N=N??B.overlayProps,D=D??B.onClose;var Q;F=(Q=(0,i.default)(B.dismiss,F||{}))!==null&&Q!==void 0?Q:B.dismiss,W=W??B.transition;var oe=(0,p.twMerge)((0,c.default)((0,g.default)(H.drawer),{"top-0 right-0":P==="right","bottom-0 left-0":P==="bottom","top-0 left-0":P==="top"||P==="left"}),j),se=(0,p.twMerge)((0,c.default)((0,g.default)(H.overlay)),N==null?void 0:N.className),ae=(0,a.useFloating)({open:m,onOpenChange:D}).context,ne=(0,a.useInteractions)([(0,a.useDismiss)(ae,F)]).getFloatingProps;r.default.useEffect(function(){K.start(m?"open":"close")},[m,K,P]);var me={open:{x:0,y:0},close:{x:P==="left"?-w:P==="right"?w:0,y:P==="top"?-w:P==="bottom"?w:0}},fe={unmount:{opacity:0,transition:{delay:.3}},mount:{opacity:1}};return r.default.createElement(r.default.Fragment,null,r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(o.AnimatePresence,null,E&&m&&r.default.createElement(o.m.div,{ref:G,className:se,initial:"unmount",exit:"unmount",animate:m?"mount":"unmount",variants:fe,transition:{duration:.3}})),r.default.createElement(o.m.div,C({},ne(x({ref:h},X)),{className:oe,style:{maxWidth:P==="left"||P==="right"?w:"100%",maxHeight:P==="top"||P==="bottom"?w:"100%",height:P==="left"||P==="right"?"100vh":"100%"},initial:"close",animate:K,variants:me,transition:W}),k)))});l.propTypes={open:_.propTypesOpen,size:_.propTypesSize,overlay:_.propTypesOverlay,children:_.propTypesChildren,placement:n.default.oneOf(_.propTypesPlacement),overlayProps:_.propTypesOverlayProps,className:_.propTypesClassName,onClose:_.propTypesOnClose,dismiss:_.propTypesDismiss,transition:_.propTypesTransition,overlayRef:_.propTypesOverlayRef},l.displayName="MaterialTailwind.Drawer";var u=l})(_P);var CP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Badge:function(){return b},default:function(){return d}});var r=C(A),n=C(Fe),o=C(ar),a=C($e),i=Le,c=C(Et),p=C(Ie),g=Ae,v=Vg;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.color,h=l.invisible,m=l.withBorder,w=l.overlap,E=l.placement,k=l.className,P=l.content,N=l.children,j=l.containerProps,D=l.containerRef,F=T(l,["color","invisible","withBorder","overlap","placement","className","content","children","containerProps","containerRef"]),W=(0,g.useTheme)().badge,G=W.valid,X=W.defaultProps,U=W.styles,B=U.base,H=U.placements,K=U.colors;s=s??X.color,h=h??X.invisible,m=m??X.withBorder,w=w??X.overlap,E=E??X.placement;var Q;k=(Q=(0,a.default)(k,X.className))!==null&&Q!==void 0?Q:X.className;var oe;j=(oe=(0,o.default)(j,X.containerProps||{}))!==null&&oe!==void 0?oe:X.containerProps;var se=(0,p.default)(B.badge.initial),ae=(0,p.default)(B.badge.withBorder),ne=(0,p.default)(B.badge.withContent),me=(0,p.default)(K[(0,c.default)(G.colors,s,"red")]),fe=(0,p.default)(H[(0,c.default)(G.placements,E,"top-end")][(0,c.default)(G.overlaps,w,"square")]),ie,ge=(0,i.twMerge)((0,a.default)(se,fe,me,(ie={},_(ie,ae,m),_(ie,ne,P),ie)),k),de=(0,i.twMerge)((0,a.default)((0,p.default)(B.container),j==null?void 0:j.className));return r.default.createElement("div",O({ref:D},j,{className:de}),N,!h&&r.default.createElement("span",O({},F,{ref:u,className:ge}),P))});b.propTypes={color:n.default.oneOf(v.propTypesColor),invisible:v.propTypesInvisible,withBorder:v.propTypesWithBorder,overlap:n.default.oneOf(v.propTypesOverlap),className:v.propTypesClassName,content:v.propTypesContent,children:v.propTypesChildren,placement:n.default.oneOf(v.propTypesPlacement),containerProps:v.propTypesContainerProps,containerRef:v.propTypesContainerRef},b.displayName="MaterialTailwind.Badge";var d=b})(CP);var OP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(P,N){for(var j in N)Object.defineProperty(P,j,{enumerable:!0,get:N[j]})}t(e,{Rating:function(){return E},default:function(){return k}});var r=T(A),n=T(Fe),o=T($e),a=Le,i=T(Et),c=T(Ie),p=Ae,g=zg;function v(P,N){(N==null||N>P.length)&&(N=P.length);for(var j=0,D=new Array(N);j=0)&&Object.prototype.propertyIsEnumerable.call(P,D)&&(j[D]=P[D])}return j}function s(P,N){if(P==null)return{};var j={},D=Object.keys(P),F,W;for(W=0;W=0)&&(j[F]=P[F]);return j}function h(P,N){return _(P)||b(P,N)||w(P,N)||d()}function m(P){return O(P)||x(P)||w(P)||l()}function w(P,N){if(P){if(typeof P=="string")return v(P,N);var j=Object.prototype.toString.call(P).slice(8,-1);if(j==="Object"&&P.constructor&&(j=P.constructor.name),j==="Map"||j==="Set")return Array.from(j);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return v(P,N)}}var E=r.default.forwardRef(function(P,N){var j=P.count,D=P.value,F=P.ratedIcon,W=P.unratedIcon,G=P.ratedColor,X=P.unratedColor,U=P.className,B=P.onChange,H=P.readonly,K=u(P,["count","value","ratedIcon","unratedIcon","ratedColor","unratedColor","className","onChange","readonly"]),Q,oe,se=(0,p.useTheme)().rating,ae=se.valid,ne=se.defaultProps,me=se.styles,fe=me.base,ie=me.colors;j=j??ne.count,D=D??ne.value,F=F??ne.ratedIcon,F=F??ne.ratedIcon,W=W??ne.unratedIcon,G=G??ne.ratedColor,X=X??ne.unratedColor,U=U??ne.className,B=B??ne.onChange,H=H??ne.readonly;var ge=h(r.default.useState(function(){return m(Array(D).fill("rated")).concat(m(Array(j-D).fill("un_rated")))}),2),de=ge[0],Oe=ge[1],Me=h(r.default.useState(function(){return m(Array(j).fill("un_rated"))}),2),Ce=Me[0],_e=Me[1],Ee=h(r.default.useState(!1),2),Ke=Ee[0],Ze=Ee[1],dt=(0,c.default)(ie[(0,i.default)(ae.colors,G,"yellow")]),at=(0,c.default)(ie[(0,i.default)(ae.colors,X,"blue-gray")]),nt=(0,a.twMerge)((0,o.default)((0,c.default)(fe.rating),U)),He=(0,c.default)(fe.icon),ue=F,be=W,Se=r.default.isValidElement(F)&&r.default.cloneElement(ue,{className:(0,a.twMerge)((0,o.default)(He,dt,ue==null||(Q=ue.props)===null||Q===void 0?void 0:Q.className))}),Re=r.default.isValidElement(F)&&r.default.cloneElement(be,{className:(0,a.twMerge)((0,o.default)(He,at,be==null||(oe=be.props)===null||oe===void 0?void 0:oe.className))}),ve=!r.default.isValidElement(F)&&r.default.createElement(F,{className:(0,a.twMerge)((0,o.default)(He,dt))}),Pe=!r.default.isValidElement(F)&&r.default.createElement(W,{className:(0,a.twMerge)((0,o.default)(He,at))}),it=function(vt){return vt.map(function(ft,ee){return r.default.createElement("span",{key:ee,onClick:function(){if(!H){var he=de.map(function(Te,We){return We<=ee?"rated":"un_rated"});Oe(he),B&&typeof B=="function"&&B(he.filter(function(Te){return Te==="rated"}).length)}},onMouseEnter:function(){if(!H){var he=Ce.map(function(Te,We){return We<=ee?"rated":"un_rated"});Ze(!0),_e(he)}},onMouseLeave:function(){return!H&&Ze(!1)}},r.default.isValidElement(ft==="rated"?F:W)?ft==="rated"?Se:Re:ft==="rated"?ve:Pe)})};return r.default.createElement("div",C({},K,{ref:N,className:nt}),it(Ke?Ce:de))});E.propTypes={count:g.propTypesCount,value:g.propTypesValue,ratedIcon:g.propTypesRatedIcon,unratedIcon:g.propTypesUnratedIcon,ratedColor:n.default.oneOf(g.propTypesColor),unratedColor:n.default.oneOf(g.propTypesColor),className:g.propTypesClassName,onChange:g.propTypesOnChange,readonly:g.propTypesReadonly},E.displayName="MaterialTailwind.Rating";var k=E})(OP);var SP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,E){for(var k in E)Object.defineProperty(w,k,{enumerable:!0,get:E[k]})}t(e,{Slider:function(){return h},default:function(){return m}});var r=T(A),n=T(Fe),o=T(ar),a=T($e),i=Le,c=T(Et),p=T(Ie),g=Ae,v=Bg;function _(w,E){(E==null||E>w.length)&&(E=w.length);for(var k=0,P=new Array(E);k=0)&&Object.prototype.propertyIsEnumerable.call(w,P)&&(k[P]=w[P])}return k}function l(w,E){if(w==null)return{};var k={},P=Object.keys(w),N,j;for(j=0;j=0)&&(k[N]=w[N]);return k}function u(w,E){return O(w)||x(w,E)||s(w,E)||b()}function s(w,E){if(w){if(typeof w=="string")return _(w,E);var k=Object.prototype.toString.call(w).slice(8,-1);if(k==="Object"&&w.constructor&&(k=w.constructor.name),k==="Map"||k==="Set")return Array.from(k);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return _(w,E)}}var h=r.default.forwardRef(function(w,E){var k=w.color,P=w.size,N=w.className,j=w.trackClassName,D=w.thumbClassName,F=w.barClassName,W=w.value,G=w.defaultValue,X=w.onChange,U=w.min,B=w.max,H=w.step,K=w.inputRef,Q=w.inputProps,oe=d(w,["color","size","className","trackClassName","thumbClassName","barClassName","value","defaultValue","onChange","min","max","step","inputRef","inputProps"]),se=(0,g.useTheme)().slider,ae=se.valid,ne=se.defaultProps,me=se.styles,fe=me.base,ie=me.sizes,ge=me.colors,de=u(r.default.useState(G||0),2),Oe=de[0],Me=de[1];r.default.useMemo(function(){G&&Me(G)},[G]),k=k??ne.color,P=P??ne.size,U=U??ne.min,B=B??ne.max,H=H??ne.step;var Ce;N=(Ce=(0,a.default)(ne.className,N))!==null&&Ce!==void 0?Ce:ne.className;var _e;D=(_e=(0,a.default)(ne.thumbClassName,D))!==null&&_e!==void 0?_e:ne.thumbClassName;var Ee;j=(Ee=(0,a.default)(ne.trackClassName,j))!==null&&Ee!==void 0?Ee:ne.trackClassName;var Ke;F=(Ke=(0,a.default)(ne.barClassName,F))!==null&&Ke!==void 0?Ke:ne.barClassName;var Ze;Q=(Ze=(0,o.default)(Q,(ne==null?void 0:ne.inputProps)||{}))!==null&&Ze!==void 0?Ze:ne.inputProps;var dt=(0,i.twMerge)((0,a.default)((0,p.default)(fe.container),(0,p.default)(ge[(0,c.default)(ae.colors,k,"gray")]),(0,p.default)(ie[(0,c.default)(ae.sizes,P,"md")].container),N)),at=(0,i.twMerge)((0,a.default)((0,p.default)(fe.bar),F)),nt=(0,a.default)((0,p.default)(fe.track),(0,p.default)(ie[(0,c.default)(ae.sizes,P,"md")].track)),He=(0,a.default)((0,p.default)(fe.thumb),(0,p.default)(ie[(0,c.default)(ae.sizes,P,"md")].thumb)),ue=(0,a.default)((0,p.default)(fe.slider),(0,i.twMerge)(nt,j),(0,i.twMerge)(He,D));return r.default.createElement("div",C({},oe,{ref:E,className:dt}),r.default.createElement("label",{className:at,style:{width:"".concat(W||Oe,"%")}}),r.default.createElement("input",C({ref:K,type:"range",max:B,min:U,step:H,className:ue},W?{value:W}:null,{defaultValue:G,onChange:function(be){return X?X(be):Me(Number(be.target.value))}})))});h.propTypes={color:n.default.oneOf(v.propTypesColor),size:n.default.oneOf(v.propTypesSize),className:v.propTypesClassName,trackClassName:v.propTypesTrackClassName,thumbClassName:v.propTypesThumbClassName,barClassName:v.propTypesBarClassName,defaultValue:v.propTypesDefaultValue,value:v.propTypesValue,onChange:v.propTypesOnChange,min:v.propTypesMin,max:v.propTypesMax,step:v.propTypesStep,inputRef:v.propTypesInputRef,inputProps:v.propTypesInputProps},h.displayName="MaterialTailwind.Slider";var m=h})(SP);var PP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Spinner:function(){return b},default:function(){return d}});var r=_(Fe),n=C(A),o=_($e),a=Le,i=_(Et),c=_(Ie),p=Ae,g=Wg;function v(){return v=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=(0,n.forwardRef)(function(l,u){var s=l.color,h=l.className,m=T(l,["color","className"]),w=(0,p.useTheme)().spinner,E=w.defaultProps,k=w.valid,P=w.styles,N=P.base,j=P.colors;s=s??E.color;var D;h=(D=(0,o.default)(E.className,h))!==null&&D!==void 0?D:E.className;var F=(0,c.default)(j[(0,i.default)(k.colors,s,"gray")]),W=(0,a.twMerge)((0,o.default)((0,c.default)(N)),h),G,X;return n.default.createElement("svg",v({},m,{ref:u,className:W,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:(G=m==null?void 0:m.width)!==null&&G!==void 0?G:24,height:(X=m==null?void 0:m.height)!==null&&X!==void 0?X:24}),n.default.createElement("path",{d:"M32 3C35.8083 3 39.5794 3.75011 43.0978 5.20749C46.6163 6.66488 49.8132 8.80101 52.5061 11.4939C55.199 14.1868 57.3351 17.3837 58.7925 20.9022C60.2499 24.4206 61 28.1917 61 32C61 35.8083 60.2499 39.5794 58.7925 43.0978C57.3351 46.6163 55.199 49.8132 52.5061 52.5061C49.8132 55.199 46.6163 57.3351 43.0978 58.7925C39.5794 60.2499 35.8083 61 32 61C28.1917 61 24.4206 60.2499 20.9022 58.7925C17.3837 57.3351 14.1868 55.199 11.4939 52.5061C8.801 49.8132 6.66487 46.6163 5.20749 43.0978C3.7501 39.5794 3 35.8083 3 32C3 28.1917 3.75011 24.4206 5.2075 20.9022C6.66489 17.3837 8.80101 14.1868 11.4939 11.4939C14.1868 8.80099 17.3838 6.66487 20.9022 5.20749C24.4206 3.7501 28.1917 3 32 3L32 3Z",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),n.default.createElement("path",{d:"M32 3C36.5778 3 41.0906 4.08374 45.1692 6.16256C49.2477 8.24138 52.7762 11.2562 55.466 14.9605C58.1558 18.6647 59.9304 22.9531 60.6448 27.4748C61.3591 31.9965 60.9928 36.6232 59.5759 40.9762",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",className:F}))});b.propTypes={color:r.default.oneOf(g.propTypesColor),className:g.propTypesClassName},b.displayName="MaterialTailwind.Spinner";var d=b})(PP);var kP={},Bs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(h,m){for(var w in m)Object.defineProperty(h,w,{enumerable:!0,get:m[w]})}t(e,{useTimelineItem:function(){return l},TimelineItem:function(){return u},default:function(){return s}});var r=v(A),n=Le,o=v(Ie),a=Ae,i=oo;function c(h,m){(m==null||m>h.length)&&(m=h.length);for(var w=0,E=new Array(m);w=0)&&Object.prototype.propertyIsEnumerable.call(h,E)&&(w[E]=h[E])}return w}function T(h,m){if(h==null)return{};var w={},E=Object.keys(h),k,P;for(P=0;P=0)&&(w[k]=h[k]);return w}function x(h,m){return p(h)||_(h,m)||b(h,m)||O()}function b(h,m){if(h){if(typeof h=="string")return c(h,m);var w=Object.prototype.toString.call(h).slice(8,-1);if(w==="Object"&&h.constructor&&(w=h.constructor.name),w==="Map"||w==="Set")return Array.from(w);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return c(h,m)}}var d=r.default.createContext(0);d.displayName="MaterialTailwind.TimelineItemContext";function l(){var h=r.default.useContext(d);if(!h)throw new Error("useTimelineItemContext() must be used within a TimelineItem. It happens when you use TimelineIcon, TimelineConnector or TimelineBody components outside the TimelineItem component.");return h}var u=r.default.forwardRef(function(h,m){var w=h.className,E=h.children,k=C(h,["className","children"]),P=(0,a.useTheme)().timelineItem,N=P.styles,j=N.base,D=x(r.default.useState(0),2),F=D[0],W=D[1],G=r.default.useMemo(function(){return[F,W]},[F,W]),X=(0,n.twMerge)((0,o.default)(j),w);return r.default.createElement(d.Provider,{value:G},r.default.createElement("li",g({ref:m},k,{className:X}),E))});u.propTypes={className:i.propTypeClassName,children:i.propTypeChildren.isRequired},u.displayName="MaterialTailwind.TimelineItem";var s=u})(Bs);var EP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,E){for(var k in E)Object.defineProperty(w,k,{enumerable:!0,get:E[k]})}t(e,{TimelineIcon:function(){return h},default:function(){return m}});var r=T(A),n=T(Fe),o=Kt,a=Le,i=T(Et),c=T(Ie),p=Ae,g=Bs,v=oo;function _(w,E){(E==null||E>w.length)&&(E=w.length);for(var k=0,P=new Array(E);k=0)&&Object.prototype.propertyIsEnumerable.call(w,P)&&(k[P]=w[P])}return k}function l(w,E){if(w==null)return{};var k={},P=Object.keys(w),N,j;for(j=0;j=0)&&(k[N]=w[N]);return k}function u(w,E){return O(w)||x(w,E)||s(w,E)||b()}function s(w,E){if(w){if(typeof w=="string")return _(w,E);var k=Object.prototype.toString.call(w).slice(8,-1);if(k==="Object"&&w.constructor&&(k=w.constructor.name),k==="Map"||k==="Set")return Array.from(k);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return _(w,E)}}var h=r.default.forwardRef(function(w,E){var k=w.color,P=w.variant,N=w.className,j=w.children,D=d(w,["color","variant","className","children"]),F=(0,p.useTheme)().timelineIcon,W=F.styles,G=F.valid,X=W.base,U=W.variants,B=u((0,g.useTimelineItem)(),2),H=B[1],K=r.default.useRef(null),Q=(0,o.useMergeRefs)([E,K]);r.default.useEffect(function(){var ae=K.current;if(ae){var ne=ae.getBoundingClientRect().width;return H(ne),function(){H(0)}}},[H,N,j]);var oe=(0,c.default)(U[(0,i.default)(G.variants,P,"filled")][(0,i.default)(G.colors,k,"gray")]),se=(0,a.twMerge)((0,c.default)(X),oe,N);return r.default.createElement("span",C({ref:Q},D,{className:se}),j)});h.propTypes={children:v.propTypeChildren,className:v.propTypeClassName,color:n.default.oneOf(v.propTypeColor),variant:n.default.oneOf(v.propTypeVariant)},h.displayName="MaterialTailwind.TimelineIcon";var m=h})(EP);var RP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{TimelineHeader:function(){return l},default:function(){return u}});var r=_(A),n=Le,o=_(Ie),a=Ae,i=Bs,c=oo;function p(s,h){(h==null||h>s.length)&&(h=s.length);for(var m=0,w=new Array(h);m=0)&&Object.prototype.propertyIsEnumerable.call(s,w)&&(m[w]=s[w])}return m}function x(s,h){if(s==null)return{};var m={},w=Object.keys(s),E,k;for(k=0;k=0)&&(m[E]=s[E]);return m}function b(s,h){return g(s)||O(s,h)||d(s,h)||C()}function d(s,h){if(s){if(typeof s=="string")return p(s,h);var m=Object.prototype.toString.call(s).slice(8,-1);if(m==="Object"&&s.constructor&&(m=s.constructor.name),m==="Map"||m==="Set")return Array.from(m);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return p(s,h)}}var l=r.default.forwardRef(function(s,h){var m=s.className,w=s.children,E=T(s,["className","children"]),k=(0,a.useTheme)().timelineBody,P=k.styles,N=P.base,j=b((0,i.useTimelineItem)(),1),D=j[0],F=(0,n.twMerge)((0,o.default)(N),m);return r.default.createElement("div",v({},E,{ref:h,className:F}),r.default.createElement("span",{className:"pointer-events-none invisible h-full flex-shrink-0",style:{width:"".concat(D,"px")}}),r.default.createElement("div",null,w))});l.propTypes={children:c.propTypeChildren,className:c.propTypeClassName},l.displayName="MaterialTailwind.TimelineHeader";var u=l})(RP);var NP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,T){for(var x in T)Object.defineProperty(C,x,{enumerable:!0,get:T[x]})}t(e,{TimelineHeader:function(){return _},default:function(){return O}});var r=p(A),n=Le,o=p(Ie),a=Ae,i=oo;function c(){return c=Object.assign||function(C){for(var T=1;T=0)&&Object.prototype.propertyIsEnumerable.call(C,b)&&(x[b]=C[b])}return x}function v(C,T){if(C==null)return{};var x={},b=Object.keys(C),d,l;for(l=0;l=0)&&(x[d]=C[d]);return x}var _=r.default.forwardRef(function(C,T){var x=C.className,b=C.children,d=g(C,["className","children"]),l=(0,a.useTheme)().timelineHeader,u=l.styles,s=u.base,h=(0,n.twMerge)((0,o.default)(s),x);return r.default.createElement("div",c({},d,{ref:T,className:h}),b)});_.propTypes={children:i.propTypeChildren,className:i.propTypeClassName},_.displayName="MaterialTailwind.TimelineHeader";var O=_})(NP);var jP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,h){for(var m in h)Object.defineProperty(s,m,{enumerable:!0,get:h[m]})}t(e,{TimelineConnector:function(){return l},default:function(){return u}});var r=_(A),n=Le,o=_(Ie),a=Ae,i=Bs,c=oo;function p(s,h){(h==null||h>s.length)&&(h=s.length);for(var m=0,w=new Array(h);m=0)&&Object.prototype.propertyIsEnumerable.call(s,w)&&(m[w]=s[w])}return m}function x(s,h){if(s==null)return{};var m={},w=Object.keys(s),E,k;for(k=0;k=0)&&(m[E]=s[E]);return m}function b(s,h){return g(s)||O(s,h)||d(s,h)||C()}function d(s,h){if(s){if(typeof s=="string")return p(s,h);var m=Object.prototype.toString.call(s).slice(8,-1);if(m==="Object"&&s.constructor&&(m=s.constructor.name),m==="Map"||m==="Set")return Array.from(m);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return p(s,h)}}var l=r.default.forwardRef(function(s,h){var m=s.className,w=s.children,E=T(s,["className","children"]),k,P=(0,a.useTheme)().timelineConnector,N=P.styles,j=N.base,D=b((0,i.useTimelineItem)(),1),F=D[0],W=(0,o.default)(j.line),G=(0,n.twMerge)((0,o.default)(j.container),m);return r.default.createElement("span",v({},E,{ref:h,className:G,style:{top:"".concat(F,"px"),width:"".concat(F,"px"),opacity:F?1:0,height:"calc(100% - ".concat(F,"px)")}}),w&&r.default.isValidElement(w)?r.default.cloneElement(w,{className:(0,n.twMerge)(W,(k=w.props)===null||k===void 0?void 0:k.className)}):r.default.createElement("span",{className:W}))});l.propTypes={children:c.propTypeChildren,className:c.propTypeClassName},l.displayName="MaterialTailwind.TimelineConnector";var u=l})(jP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Timeline:function(){return b},TimelineItem:function(){return c.default},TimelineIcon:function(){return p.default},TimelineBody:function(){return g.default},TimelineHeader:function(){return v.default},TimelineConnector:function(){return _.default},default:function(){return d}});var r=C(A),n=Le,o=C(Ie),a=Ae,i=oo,c=C(Bs),p=C(EP),g=C(RP),v=C(NP),_=C(jP);function O(){return O=Object.assign||function(l){for(var u=1;u=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.className,h=l.children,m=T(l,["className","children"]),w=(0,a.useTheme)().timeline,E=w.styles,k=E.base,P=(0,n.twMerge)((0,o.default)(k),s);return r.default.createElement("ul",O({ref:u},m,{className:P}),h)});b.propTypes={className:i.propTypeClassName,children:i.propTypeChildren},b.displayName="MaterialTailwind.Timeline";var d=Object.assign(b,{Item:c.default,Icon:p.default,Header:v.default,Body:g.default,Connector:_.default})})(kP);var AP={},MP={},Sb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(g,v){for(var _ in v)Object.defineProperty(g,_,{enumerable:!0,get:v[_]})}t(e,{propTypesActiveStep:function(){return o},propTypesIsLastStep:function(){return a},propTypesIsFirstStep:function(){return i},propTypesChildren:function(){return c},propTypesClassName:function(){return p}});var r=n(Fe);function n(g){return g&&g.__esModule?g:{default:g}}var o=r.default.number,a=r.default.func,i=r.default.func,c=r.default.node,p=r.default.string})(Sb);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,T){for(var x in T)Object.defineProperty(C,x,{enumerable:!0,get:T[x]})}t(e,{Step:function(){return _},default:function(){return O}});var r=p(A),n=Le,o=p(Ie),a=Ae,i=Sb;function c(){return c=Object.assign||function(C){for(var T=1;T=0)&&Object.prototype.propertyIsEnumerable.call(C,b)&&(x[b]=C[b])}return x}function v(C,T){if(C==null)return{};var x={},b=Object.keys(C),d,l;for(l=0;l=0)&&(x[d]=C[d]);return x}var _=r.default.forwardRef(function(C,T){var x=C.className;C.activeClassName,C.completedClassName;var b=C.children,d=g(C,["className","activeClassName","completedClassName","children"]),l=(0,a.useTheme)().step,u=l.styles.base,s=(0,n.twMerge)((0,o.default)(u.initial),x);return r.default.createElement("div",c({},d,{ref:T,className:s}),b)});_.propTypes={className:i.propTypesClassName,activeClassName:i.propTypesClassName,completedClassName:i.propTypesClassName,children:i.propTypesChildren},_.displayName="MaterialTailwind.Step";var O=_})(MP);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(k,P){for(var N in P)Object.defineProperty(k,N,{enumerable:!0,get:P[N]})}t(e,{Stepper:function(){return w},Step:function(){return c.default},default:function(){return E}});var r=C(A),n=Kt,o=Le,a=C(Ie),i=Ae,c=C(MP),p=Sb;function g(k,P){(P==null||P>k.length)&&(P=k.length);for(var N=0,j=new Array(P);N=0)&&Object.prototype.propertyIsEnumerable.call(k,j)&&(N[j]=k[j])}return N}function s(k,P){if(k==null)return{};var N={},j=Object.keys(k),D,F;for(F=0;F=0)&&(N[D]=k[D]);return N}function h(k,P){return v(k)||T(k,P)||m(k,P)||x()}function m(k,P){if(k){if(typeof k=="string")return g(k,P);var N=Object.prototype.toString.call(k).slice(8,-1);if(N==="Object"&&k.constructor&&(N=k.constructor.name),N==="Map"||N==="Set")return Array.from(N);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return g(k,P)}}var w=r.default.forwardRef(function(k,P){var N=k.activeStep,j=k.isFirstStep,D=k.isLastStep,F=k.className,W=k.lineClassName,G=k.activeLineClassName,X=k.children,U=u(k,["activeStep","isFirstStep","isLastStep","className","lineClassName","activeLineClassName","children"]),B=(0,i.useTheme)(),H=B.stepper,K=B.step,Q=H.styles.base,oe=K.styles,se=oe.base,ae=r.default.useRef(null),ne=h(r.default.useState(0),2),me=ne[0],fe=ne[1],ie=N===0,ge=Array.isArray(X)&&N===X.length-1,de=Array.isArray(X)&&N>X.length-1;r.default.useEffect(function(){if(ae.current){var Ze=X,dt=ae.current.getBoundingClientRect().width,at=dt/(Ze.length-1);fe(at)}},[X]);var Oe=r.default.useMemo(function(){if(!de)return me*N},[N,de,me]);(0,n.useMergeRefs)([P,ae]);var Me=(0,o.twMerge)((0,a.default)(Q.stepper),F),Ce=(0,o.twMerge)((0,a.default)(Q.line.initial),W),_e=(0,o.twMerge)(Ce,(0,a.default)(Q.line.active),G),Ee=(0,a.default)(se.active),Ke=(0,a.default)(se.completed);return r.default.useEffect(function(){D&&typeof D=="function"&&D(ge),j&&typeof j=="function"&&j(ie)},[j,ie,D,ge]),r.default.createElement("div",O({},U,{ref:ae,className:Me}),r.default.createElement("div",{className:Ce}),r.default.createElement("div",{className:_e,style:{width:"".concat(Oe,"px")}}),Array.isArray(X)?X.map(function(Ze,dt){var at,nt;return r.default.cloneElement(Ze,l(b({key:dt},Ze.props),{className:(0,o.twMerge)(Ze.props.className,dt===N?(0,o.twMerge)(Ee,(at=Ze.props)===null||at===void 0?void 0:at.activeClassName):dt=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.children,u=O(b,["children"]),s,h=(0,o.useSpeedDial)(),m=h.getReferenceProps,w=h.refs,E=(0,n.useMergeRefs)([d,w.setReference]);return r.default.cloneElement(l,g({},m(_(g({},u),{ref:E,className:(0,a.twMerge)(l==null||(s=l.props)===null||s===void 0?void 0:s.className,u==null?void 0:u.className)}))))});T.propTypes={children:i.propTypesChildren},T.displayName="MaterialTailwind.SpeedDialHandler";var x=T}(Ap)),Ap}var Mp={},Qw;function FF(){return Qw||(Qw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{SpeedDialContent:function(){return T},default:function(){return x}});var r=_(A),n=er,o=Kt,a=Pb(),i=Ae,c=Le,p=_(Ie),g=Ws;function v(){return v=Object.assign||function(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,u)&&(l[u]=b[u])}return l}function C(b,d){if(b==null)return{};var l={},u=Object.keys(b),s,h;for(h=0;h=0)&&(l[s]=b[s]);return l}var T=r.default.forwardRef(function(b,d){var l=b.children,u=b.className,s=O(b,["children","className"]),h=(0,i.useTheme)(),m=h.speedDialContent.styles,w=(0,a.useSpeedDial)(),E=w.x,k=w.y,P=w.refs,N=w.open,j=w.strategy,D=w.getFloatingProps,F=w.animation,W=(0,o.useMergeRefs)([d,P.setFloating]),G=(0,c.twMerge)((0,p.default)(m),u),X=n.AnimatePresence;return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(X,null,N&&r.default.createElement("div",v({},s,{ref:W,className:G,style:{position:j,top:k??0,left:E??0}},D()),r.default.Children.map(l,function(U){return r.default.createElement(n.m.div,{initial:"unmount",exit:"unmount",animate:N?"mount":"unmount",variants:F},U)}))))});T.propTypes={children:g.propTypesChildren,className:g.propTypesClassName},T.displayName="MaterialTailwind.SpeedDialContent";var x=T}(Mp)),Mp}var IP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,T){for(var x in T)Object.defineProperty(C,x,{enumerable:!0,get:T[x]})}t(e,{SpeedDialAction:function(){return _},default:function(){return O}});var r=p(A),n=Ae,o=Le,a=p(Ie),i=Ws;function c(){return c=Object.assign||function(C){for(var T=1;T=0)&&Object.prototype.propertyIsEnumerable.call(C,b)&&(x[b]=C[b])}return x}function v(C,T){if(C==null)return{};var x={},b=Object.keys(C),d,l;for(l=0;l=0)&&(x[d]=C[d]);return x}var _=r.default.forwardRef(function(C,T){var x=C.className,b=C.children,d=g(C,["className","children"]),l=(0,n.useTheme)(),u=l.speedDialAction.styles,s=(0,o.twMerge)((0,a.default)(u),x);return r.default.createElement("button",c({},d,{ref:T,className:s}),b)});_.propTypes={children:i.propTypesChildren,className:i.propTypesClassName},_.displayName="SpeedDialAction";var O=_})(IP);var Jw;function Pb(){return Jw||(Jw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(h,m){for(var w in m)Object.defineProperty(h,w,{enumerable:!0,get:m[w]})}t(e,{SpeedDialContext:function(){return d},useSpeedDial:function(){return l},SpeedDial:function(){return u},SpeedDialHandler:function(){return c.default},SpeedDialContent:function(){return p.default},SpeedDialAction:function(){return g.default},default:function(){return s}});var r=O(A),n=Kt,o=Ae,a=O(ar),i=Ws,c=O(LF()),p=O(FF()),g=O(IP);function v(h,m){(m==null||m>h.length)&&(m=h.length);for(var w=0,E=new Array(m);w.");return h}function u(h){var m=h.open,w=h.handler,E=h.placement,k=h.offset,P=h.dismiss,N=h.animate,j=h.children,D=(0,o.useTheme)(),F=D.speedDial.defaultProps,W=x(r.default.useState(!1),2),G=W[0],X=W[1];m=m??G,w=w??X,E=E??F.placement,k=k??F.offset,P=P??F.dismiss,N=N??F.animate;var U={unmount:{opacity:0,transform:"scale(0.5)",transition:{duration:.2,times:[.4,0,.2,1]}},mount:{opacity:1,transform:"scale(1)",transition:{duration:.2,times:[.4,0,.2,1]}}},B=(0,a.default)(U,N),H=(0,n.useFloatingNodeId)(),K=(0,n.useFloating)({open:m,nodeId:H,placement:E,onOpenChange:w,whileElementsMounted:n.autoUpdate,middleware:[(0,n.offset)(k),(0,n.flip)(),(0,n.shift)()]}),Q=K.x,oe=K.y,se=K.strategy,ae=K.refs,ne=K.context,me=(0,n.useInteractions)([(0,n.useHover)(ne,{handleClose:(0,n.safePolygon)()}),(0,n.useDismiss)(ne,P)]),fe=me.getReferenceProps,ie=me.getFloatingProps,ge=r.default.useMemo(function(){return{x:Q,y:oe,strategy:se,refs:ae,open:m,context:ne,getReferenceProps:fe,getFloatingProps:ie,animation:B}},[ne,ie,fe,ae,se,Q,oe,m,B]);return r.default.createElement(d.Provider,{value:ge},r.default.createElement("div",{className:"group"},r.default.createElement(n.FloatingNode,{id:H},j)))}u.propTypes={open:i.propTypesOpen,handler:i.propTypesHanlder,placement:i.propTypesPlacement,offset:i.propTypesOffset,dismiss:i.propTypesDismiss,className:i.propTypesClassName,children:i.propTypesChildren,animate:i.propTypesAnimate},u.displayName="MaterialTailwind.SpeedDial";var s=Object.assign(u,{Handler:c.default,Content:p.default,Action:g.default})}(jp)),jp}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),t(K1,e),t(GO,e),t(KO,e),t(YO,e),t(QO,e),t(JO,e),t(rS,e),t(nS,e),t(oS,e),t(Bd,e),t($S,e),t(qS,e),t(QS,e),t(ZS,e),t(rP,e),t(nP,e),t(oP,e),t(iP,e),t(lP,e),t(fP,e),t(pP,e),t(hP,e),t(gP,e),t(vP,e),t(yP,e),t(wP,e),t(_P,e),t(CP,e),t(OP,e),t(SP,e),t(PP,e),t(kP,e),t(AP,e),t(Pb(),e),t(Ae,e),t(Pg,e);function t(r,n){return Object.keys(r).forEach(function(o){o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:function(){return r[o]}})}),r}})(pe);function VF({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const zF=A.forwardRef(VF),DP=zF,kb=Ln.createContext(null);kb.displayName="MaterialTailwindContext";function BF(e,t){switch(t.type){case"OPEN_SIDENAV":return{...e,openSidenav:t.value};case"SIDENAV_TYPE":return{...e,sidenavType:t.value};case"SIDENAV_COLOR":return{...e,sidenavColor:t.value};case"TRANSPARENT_NAVBAR":return{...e,transparentNavbar:t.value};case"FIXED_NAVBAR":return{...e,fixedNavbar:t.value};case"OPEN_CONFIGURATOR":return{...e,openConfigurator:t.value};default:throw new Error(`Unhandled action type: ${t.type}`)}}function Eb({children:e}){const t={openSidenav:!1,sidenavColor:"gray",sidenavType:"white",transparentNavbar:!0,fixedNavbar:!0,openConfigurator:!1},[r,n]=Ln.useReducer(BF,t),o=Ln.useMemo(()=>[r,n],[r,n]);return I.jsx(kb.Provider,{value:o,children:e})}function Xd(){const e=Ln.useContext(kb);if(!e)throw new Error("useMaterialTailwindController should be used inside the MaterialTailwindControllerProvider.");return e}Eb.displayName="/src/context/index.jsx";Eb.propTypes={children:Gn.node.isRequired};const LP=(e,t)=>e({type:"OPEN_SIDENAV",value:t}),Ip=(e,t)=>e({type:"SIDENAV_TYPE",value:t}),WF=(e,t)=>e({type:"SIDENAV_COLOR",value:t}),HF=(e,t)=>e({type:"FIXED_NAVBAR",value:t}),Rb=(e,t)=>e({type:"OPEN_CONFIGURATOR",value:t});function Qd({brandImg:e,brandName:t,routes:r}){const[n,o]=Xd(),{sidenavColor:a,sidenavType:i,openSidenav:c}=n,p={dark:"bg-gradient-to-br from-gray-800 to-gray-900",white:"bg-white shadow-sm",transparent:"bg-transparent"};return I.jsxs("aside",{className:`${p[i]} ${c?"translate-x-0":"-translate-x-80"} fixed inset-0 z-50 my-4 ml-4 h-[calc(100vh-32px)] w-72 rounded-xl transition-transform duration-300 xl:translate-x-0 border border-blue-gray-100`,children:[I.jsxs("div",{className:"relative",children:[I.jsx(zc,{to:"/",className:"py-6 px-8 text-center",children:I.jsx(pe.Typography,{variant:"h6",color:i==="dark"?"white":"blue-gray",children:t})}),I.jsx(pe.IconButton,{variant:"text",color:"white",size:"sm",ripple:!1,className:"absolute right-0 top-0 grid rounded-br-none rounded-tl-none xl:hidden",onClick:()=>LP(o,!1),children:I.jsx(DP,{strokeWidth:2.5,className:"h-5 w-5 text-white"})})]}),I.jsx("div",{className:"m-4",children:r.map(({layout:g,title:v,pages:_},O)=>I.jsxs("ul",{className:"mb-4 flex flex-col gap-1",children:[v&&I.jsx("li",{className:"mx-3.5 mt-4 mb-2",children:I.jsx(pe.Typography,{variant:"small",color:i==="dark"?"white":"blue-gray",className:"font-black uppercase opacity-75",children:v})}),_.map(({icon:C,name:T,path:x})=>I.jsx("li",{children:I.jsx(QA,{to:`/${g}${x}`,children:({isActive:b})=>I.jsxs(pe.Button,{variant:b?"gradient":"text",color:b?a:i==="dark"?"white":"blue-gray",className:"flex items-center gap-4 px-4 capitalize",fullWidth:!0,children:[C,I.jsx(pe.Typography,{color:"inherit",className:"font-medium capitalize",children:T})]})})},T))]},O))})]})}Qd.defaultProps={brandImg:"/img/logo-ct.png",brandName:"Material Tailwind React"};Qd.propTypes={brandImg:Gn.string,brandName:Gn.string,routes:Gn.arrayOf(Gn.object).isRequired};Qd.displayName="/src/widgets/layout/sidnave.jsx";function FP(){const[e,t]=Xd(),{fixedNavbar:r,openSidenav:n}=e,{pathname:o}=Aa(),[a,i]=o.split("/").filter(c=>c!=="");return I.jsx(pe.Navbar,{color:r?"white":"transparent",className:`rounded-xl transition-all ${r?"sticky top-4 z-40 py-3 shadow-md shadow-blue-gray-500/5":"px-0 py-1"}`,fullWidth:!0,blurred:r,children:I.jsxs("div",{className:"flex flex-col-reverse justify-between gap-6 md:flex-row md:items-center",children:[I.jsxs("div",{className:"capitalize",children:[I.jsxs(pe.Breadcrumbs,{className:`bg-transparent p-0 transition-all ${r?"mt-1":""}`,children:[I.jsx(zc,{to:`/${a}`,children:I.jsx(pe.Typography,{variant:"small",color:"blue-gray",className:"font-normal opacity-50 transition-all hover:text-blue-500 hover:opacity-100",children:a})}),I.jsx(pe.Typography,{variant:"small",color:"blue-gray",className:"font-normal",children:i})]}),I.jsx(pe.Typography,{variant:"h6",color:"blue-gray",children:i})]}),I.jsxs("div",{className:"flex items-center",children:[I.jsx(pe.IconButton,{variant:"text",color:"blue-gray",className:"grid xl:hidden",onClick:()=>LP(t,!n),children:I.jsx(nM,{strokeWidth:3,className:"h-6 w-6 text-blue-gray-500"})}),I.jsxs(zc,{to:"/auth/sign-in",children:[I.jsxs(pe.Button,{variant:"text",color:"blue-gray",className:"hidden items-center gap-1 px-4 xl:flex normal-case",children:[I.jsx(Ky,{className:"h-5 w-5 text-blue-gray-500"}),"Sign In"]}),I.jsx(pe.IconButton,{variant:"text",color:"blue-gray",className:"grid xl:hidden",children:I.jsx(Ky,{className:"h-5 w-5 text-blue-gray-500"})})]}),I.jsxs(pe.Menu,{children:[I.jsx(pe.MenuHandler,{children:I.jsx(pe.IconButton,{variant:"text",color:"blue-gray",children:I.jsx(iM,{className:"h-5 w-5 text-blue-gray-500"})})}),I.jsxs(pe.MenuList,{className:"w-max border-0",children:[I.jsxs(pe.MenuItem,{className:"flex items-center gap-3",children:[I.jsx(pe.Avatar,{src:"https://demos.creative-tim.com/material-dashboard/assets/img/team-2.jpg",alt:"item-1",size:"sm",variant:"circular"}),I.jsxs("div",{children:[I.jsxs(pe.Typography,{variant:"small",color:"blue-gray",className:"mb-1 font-normal",children:[I.jsx("strong",{children:"New message"})," from Laur"]}),I.jsxs(pe.Typography,{variant:"small",color:"blue-gray",className:"flex items-center gap-1 text-xs font-normal opacity-60",children:[I.jsx(mp,{className:"h-3.5 w-3.5"})," 13 minutes ago"]})]})]}),I.jsxs(pe.MenuItem,{className:"flex items-center gap-4",children:[I.jsx(pe.Avatar,{src:"https://demos.creative-tim.com/material-dashboard/assets/img/small-logos/logo-spotify.svg",alt:"item-1",size:"sm",variant:"circular"}),I.jsxs("div",{children:[I.jsxs(pe.Typography,{variant:"small",color:"blue-gray",className:"mb-1 font-normal",children:[I.jsx("strong",{children:"New album"})," by Travis Scott"]}),I.jsxs(pe.Typography,{variant:"small",color:"blue-gray",className:"flex items-center gap-1 text-xs font-normal opacity-60",children:[I.jsx(mp,{className:"h-3.5 w-3.5"})," 1 day ago"]})]})]}),I.jsxs(pe.MenuItem,{className:"flex items-center gap-4",children:[I.jsx("div",{className:"grid h-9 w-9 place-items-center rounded-full bg-gradient-to-tr from-blue-gray-800 to-blue-gray-900",children:I.jsx(pM,{className:"h-4 w-4 text-white"})}),I.jsxs("div",{children:[I.jsx(pe.Typography,{variant:"small",color:"blue-gray",className:"mb-1 font-normal",children:"Payment successfully completed"}),I.jsxs(pe.Typography,{variant:"small",color:"blue-gray",className:"flex items-center gap-1 text-xs font-normal opacity-60",children:[I.jsx(mp,{className:"h-3.5 w-3.5"})," 2 days ago"]})]})]})]})]}),I.jsx(pe.IconButton,{variant:"text",color:"blue-gray",onClick:()=>Rb(t,!0),children:I.jsx(G1,{className:"h-5 w-5 text-blue-gray-500"})})]})]})})}FP.displayName="/src/widgets/layout/dashboard-navbar.jsx";function UF(e,t){t=Math.pow(10,t);const r=["K","M","B","T"];for(let o=r.length-1;o>=0;o--){var n=Math.pow(10,(o+1)*3);if(n<=e){e=Math.round(e*t/n)/t,e==1e3&&o{fetch("https://api.github.com/repos/creativetimofficial/material-tailwind-dashboard-react").then(g=>g.json()).then(g=>c(UF(g.stargazers_count,1)))},[]),I.jsxs("aside",{className:`fixed top-0 right-0 z-50 h-screen w-96 bg-white px-2.5 shadow-lg transition-transform duration-300 ${r?"translate-x-0":"translate-x-96"}`,children:[I.jsxs("div",{className:"flex items-start justify-between px-6 pt-8 pb-6",children:[I.jsxs("div",{children:[I.jsx(pe.Typography,{variant:"h5",color:"blue-gray",children:"Dashboard Configurator"}),I.jsx(pe.Typography,{className:"font-normal text-blue-gray-600",children:"See our dashboard options."})]}),I.jsx(pe.IconButton,{variant:"text",color:"blue-gray",onClick:()=>Rb(t,!1),children:I.jsx(DP,{strokeWidth:2.5,className:"h-5 w-5"})})]}),I.jsxs("div",{className:"py-4 px-6",children:[I.jsxs("div",{className:"mb-12",children:[I.jsx(pe.Typography,{variant:"h6",color:"blue-gray",children:"Sidenav Colors"}),I.jsx("div",{className:"mt-3 flex items-center gap-2",children:Object.keys(p).map(g=>I.jsx("span",{className:`h-6 w-6 cursor-pointer rounded-full border bg-gradient-to-br transition-transform hover:scale-105 ${p[g]} ${n===g?"border-black":"border-transparent"}`,onClick:()=>WF(t,g)},g))})]}),I.jsxs("div",{className:"mb-12",children:[I.jsx(pe.Typography,{variant:"h6",color:"blue-gray",children:"Sidenav Types"}),I.jsx(pe.Typography,{variant:"small",color:"gray",children:"Choose between 3 different sidenav types."}),I.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[I.jsx(pe.Button,{variant:o==="dark"?"gradient":"outlined",onClick:()=>Ip(t,"dark"),children:"Dark"}),I.jsx(pe.Button,{variant:o==="transparent"?"gradient":"outlined",onClick:()=>Ip(t,"transparent"),children:"Transparent"}),I.jsx(pe.Button,{variant:o==="white"?"gradient":"outlined",onClick:()=>Ip(t,"white"),children:"White"})]})]}),I.jsxs("div",{className:"mb-12",children:[I.jsx("hr",{}),I.jsxs("div",{className:"flex items-center justify-between py-5",children:[I.jsx(pe.Typography,{variant:"h6",color:"blue-gray",children:"Navbar Fixed"}),I.jsx(pe.Switch,{id:"navbar-fixed",value:a,onChange:()=>HF(t,!a)})]}),I.jsx("hr",{}),I.jsxs("div",{className:"my-8 flex flex-col gap-4",children:[I.jsx("a",{href:"https://www.creative-tim.com/product/material-tailwind-dashboard-react?rel=mtdr",target:"_black",children:I.jsx(pe.Button,{variant:"gradient",fullWidth:!0,children:"Free Download"})}),I.jsx("a",{href:"https://www.material-tailwind.com/docs/react/installation?rel=mtdr",target:"_black",children:I.jsx(pe.Button,{variant:"outlined",color:"blue-gray",fullWidth:!0,children:"View Documentation"})}),I.jsx("a",{href:"https://www.material-tailwind.com/blocks/react?rel=mtdr",target:"_black",children:I.jsx(pe.Button,{variant:"outlined",color:"blue-gray",fullWidth:!0,children:"Material Tailwind PRO"})})]}),I.jsxs("a",{className:"mx-auto flex items-center justify-center gap-2",href:"https://github.com/creativetimofficial/material-tailwind-dashboard-react",target:"_blank",rel:"noreferrer",children:[I.jsx(pe.Chip,{value:`${i} - Stars`,icon:I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"mt-px ml-1.5 h-4 w-4",children:I.jsx("path",{fillRule:"evenodd",d:"M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401z",clipRule:"evenodd"})}),className:"bg-blue-gray-900 px-4"}),I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:I.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})]})]}),I.jsxs("div",{className:"text-center",children:[I.jsx(pe.Typography,{variant:"h6",color:"blue-gray",children:"Thank you for sharing ❤️"}),I.jsxs("div",{className:"mt-4 flex justify-center gap-2",children:[I.jsxs(pe.Button,{variant:"gradient",className:"flex items-center gap-2",children:[I.jsx("i",{className:"fa-brands fa-twitter text-white"}),"Tweet"]}),I.jsxs(pe.Button,{variant:"gradient",className:"flex items-center gap-2",children:[I.jsx("i",{className:"fa-brands fa-facebook text-white"}),"Share"]})]})]})]})]})}VP.displayName="/src/widgets/layout/configurator.jsx";function zP({brandName:e,brandLink:t,routes:r}){const n=new Date().getFullYear();return I.jsx("footer",{className:"py-2",children:I.jsx("div",{className:"flex w-full flex-wrap items-center justify-center gap-6 px-2 md:justify-between",children:I.jsxs(pe.Typography,{variant:"small",className:"font-normal text-inherit",children:["© ",n,", made with"," ",I.jsx(bM,{className:"-mt-0.5 inline-block h-3.5 w-3.5 text-red-600"})," by"," ",I.jsx("a",{href:t,target:"_blank",className:"transition-colors hover:text-blue-500 font-bold",children:e})," ","for a better web."]})})})}zP.displayName="/src/widgets/layout/footer.jsx";Gn.string,Gn.arrayOf(Gn.object).isRequired,Gn.node;function BP(e,t){return function(){return e.apply(t,arguments)}}const{toString:$F}=Object.prototype,{getPrototypeOf:Nb}=Object,Jd=(e=>t=>{const r=$F.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Sn=e=>(e=e.toLowerCase(),t=>Jd(t)===e),Zd=e=>t=>typeof t===e,{isArray:Zi}=Array,_s=Zd("undefined");function qF(e){return e!==null&&!_s(e)&&e.constructor!==null&&!_s(e.constructor)&&Lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const WP=Sn("ArrayBuffer");function GF(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&WP(e.buffer),t}const KF=Zd("string"),Lr=Zd("function"),HP=Zd("number"),ef=e=>e!==null&&typeof e=="object",YF=e=>e===!0||e===!1,oc=e=>{if(Jd(e)!=="object")return!1;const t=Nb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},XF=Sn("Date"),QF=Sn("File"),JF=Sn("Blob"),ZF=Sn("FileList"),e6=e=>ef(e)&&Lr(e.pipe),t6=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Lr(e.append)&&((t=Jd(e))==="formdata"||t==="object"&&Lr(e.toString)&&e.toString()==="[object FormData]"))},r6=Sn("URLSearchParams"),[n6,o6,a6,i6]=["ReadableStream","Request","Response","Headers"].map(Sn),l6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hs(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Zi(e))for(n=0,o=e.length;n0;)if(o=r[n],t===o.toLowerCase())return o;return null}const ga=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),$P=e=>!_s(e)&&e!==ga;function fh(){const{caseless:e}=$P(this)&&this||{},t={},r=(n,o)=>{const a=e&&UP(t,o)||o;oc(t[a])&&oc(n)?t[a]=fh(t[a],n):oc(n)?t[a]=fh({},n):Zi(n)?t[a]=n.slice():t[a]=n};for(let n=0,o=arguments.length;n(Hs(t,(o,a)=>{r&&Lr(o)?e[a]=BP(o,r):e[a]=o},{allOwnKeys:n}),e),u6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),c6=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},d6=(e,t,r,n)=>{let o,a,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Nb(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},f6=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},p6=e=>{if(!e)return null;if(Zi(e))return e;let t=e.length;if(!HP(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},h6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Nb(Uint8Array)),g6=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},b6=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},v6=Sn("HTMLFormElement"),m6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Zw=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),y6=Sn("RegExp"),qP=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Hs(r,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(n[a]=i||o)}),Object.defineProperties(e,n)},w6=e=>{qP(e,(t,r)=>{if(Lr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Lr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},x6=(e,t)=>{const r={},n=o=>{o.forEach(a=>{r[a]=!0})};return Zi(e)?n(e):n(String(e).split(t)),r},_6=()=>{},T6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Dp="abcdefghijklmnopqrstuvwxyz",ex="0123456789",GP={DIGIT:ex,ALPHA:Dp,ALPHA_DIGIT:Dp+Dp.toUpperCase()+ex},C6=(e=16,t=GP.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function O6(e){return!!(e&&Lr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const S6=e=>{const t=new Array(10),r=(n,o)=>{if(ef(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const a=Zi(n)?[]:{};return Hs(n,(i,c)=>{const p=r(i,o+1);!_s(p)&&(a[c]=p)}),t[o]=void 0,a}}return n};return r(e,0)},P6=Sn("AsyncFunction"),k6=e=>e&&(ef(e)||Lr(e))&&Lr(e.then)&&Lr(e.catch),KP=((e,t)=>e?setImmediate:t?((r,n)=>(ga.addEventListener("message",({source:o,data:a})=>{o===ga&&a===r&&n.length&&n.shift()()},!1),o=>{n.push(o),ga.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Lr(ga.postMessage)),E6=typeof queueMicrotask<"u"?queueMicrotask.bind(ga):typeof process<"u"&&process.nextTick||KP,ce={isArray:Zi,isArrayBuffer:WP,isBuffer:qF,isFormData:t6,isArrayBufferView:GF,isString:KF,isNumber:HP,isBoolean:YF,isObject:ef,isPlainObject:oc,isReadableStream:n6,isRequest:o6,isResponse:a6,isHeaders:i6,isUndefined:_s,isDate:XF,isFile:QF,isBlob:JF,isRegExp:y6,isFunction:Lr,isStream:e6,isURLSearchParams:r6,isTypedArray:h6,isFileList:ZF,forEach:Hs,merge:fh,extend:s6,trim:l6,stripBOM:u6,inherits:c6,toFlatObject:d6,kindOf:Jd,kindOfTest:Sn,endsWith:f6,toArray:p6,forEachEntry:g6,matchAll:b6,isHTMLForm:v6,hasOwnProperty:Zw,hasOwnProp:Zw,reduceDescriptors:qP,freezeMethods:w6,toObjectSet:x6,toCamelCase:m6,noop:_6,toFiniteNumber:T6,findKey:UP,global:ga,isContextDefined:$P,ALPHABET:GP,generateString:C6,isSpecCompliantForm:O6,toJSONObject:S6,isAsyncFn:P6,isThenable:k6,setImmediate:KP,asap:E6};function Xe(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ce.inherits(Xe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ce.toJSONObject(this.config),code:this.code,status:this.status}}});const YP=Xe.prototype,XP={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{XP[e]={value:e}});Object.defineProperties(Xe,XP);Object.defineProperty(YP,"isAxiosError",{value:!0});Xe.from=(e,t,r,n,o,a)=>{const i=Object.create(YP);return ce.toFlatObject(e,i,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),Xe.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const R6=null;function ph(e){return ce.isPlainObject(e)||ce.isArray(e)}function QP(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function tx(e,t,r){return e?e.concat(t).map(function(o,a){return o=QP(o),!r&&a?"["+o+"]":o}).join(r?".":""):t}function N6(e){return ce.isArray(e)&&!e.some(ph)}const j6=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function tf(e,t,r){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ce.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,b){return!ce.isUndefined(b[x])});const n=r.metaTokens,o=r.visitor||v,a=r.dots,i=r.indexes,p=(r.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(t);if(!ce.isFunction(o))throw new TypeError("visitor must be a function");function g(T){if(T===null)return"";if(ce.isDate(T))return T.toISOString();if(!p&&ce.isBlob(T))throw new Xe("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(T)||ce.isTypedArray(T)?p&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function v(T,x,b){let d=T;if(T&&!b&&typeof T=="object"){if(ce.endsWith(x,"{}"))x=n?x:x.slice(0,-2),T=JSON.stringify(T);else if(ce.isArray(T)&&N6(T)||(ce.isFileList(T)||ce.endsWith(x,"[]"))&&(d=ce.toArray(T)))return x=QP(x),d.forEach(function(u,s){!(ce.isUndefined(u)||u===null)&&t.append(i===!0?tx([x],s,a):i===null?x:x+"[]",g(u))}),!1}return ph(T)?!0:(t.append(tx(b,x,a),g(T)),!1)}const _=[],O=Object.assign(j6,{defaultVisitor:v,convertValue:g,isVisitable:ph});function C(T,x){if(!ce.isUndefined(T)){if(_.indexOf(T)!==-1)throw Error("Circular reference detected in "+x.join("."));_.push(T),ce.forEach(T,function(d,l){(!(ce.isUndefined(d)||d===null)&&o.call(t,d,ce.isString(l)?l.trim():l,x,O))===!0&&C(d,x?x.concat(l):[l])}),_.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return C(e),t}function rx(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function jb(e,t){this._pairs=[],e&&tf(e,this,t)}const JP=jb.prototype;JP.append=function(t,r){this._pairs.push([t,r])};JP.toString=function(t){const r=t?function(n){return t.call(this,n,rx)}:rx;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function A6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ZP(e,t,r){if(!t)return e;const n=r&&r.encode||A6,o=r&&r.serialize;let a;if(o?a=o(t,r):a=ce.isURLSearchParams(t)?t.toString():new jb(t,r).toString(n),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class M6{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ce.forEach(this.handlers,function(n){n!==null&&t(n)})}}const nx=M6,ek={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},I6=typeof URLSearchParams<"u"?URLSearchParams:jb,D6=typeof FormData<"u"?FormData:null,L6=typeof Blob<"u"?Blob:null,F6={isBrowser:!0,classes:{URLSearchParams:I6,FormData:D6,Blob:L6},protocols:["http","https","file","blob","url","data"]},Ab=typeof window<"u"&&typeof document<"u",hh=typeof navigator=="object"&&navigator||void 0,V6=Ab&&(!hh||["ReactNative","NativeScript","NS"].indexOf(hh.product)<0),z6=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),B6=Ab&&window.location.href||"http://localhost",W6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ab,hasStandardBrowserEnv:V6,hasStandardBrowserWebWorkerEnv:z6,navigator:hh,origin:B6},Symbol.toStringTag,{value:"Module"})),Fr={...W6,...F6};function H6(e,t){return tf(e,new Fr.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,a){return Fr.isNode&&ce.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function U6(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $6(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n=r.length;return i=!i&&ce.isArray(o)?o.length:i,p?(ce.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!c):((!o[i]||!ce.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],a)&&ce.isArray(o[i])&&(o[i]=$6(o[i])),!c)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const r={};return ce.forEachEntry(e,(n,o)=>{t(U6(n),o,r,0)}),r}return null}function q6(e,t,r){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Mb={transitional:ek,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,a=ce.isObject(t);if(a&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return o?JSON.stringify(tk(t)):t;if(ce.isArrayBuffer(t)||ce.isBuffer(t)||ce.isStream(t)||ce.isFile(t)||ce.isBlob(t)||ce.isReadableStream(t))return t;if(ce.isArrayBufferView(t))return t.buffer;if(ce.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return H6(t,this.formSerializer).toString();if((c=ce.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return tf(c?{"files[]":t}:t,p&&new p,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),q6(t)):t}],transformResponse:[function(t){const r=this.transitional||Mb.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(ce.isResponse(t)||ce.isReadableStream(t))return t;if(t&&ce.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?Xe.from(c,Xe.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fr.classes.FormData,Blob:Fr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(["delete","get","head","post","put","patch"],e=>{Mb.headers[e]={}});const Ib=Mb,G6=ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),K6=e=>{const t={};let r,n,o;return e&&e.split(` `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&G6[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},ox=Symbol("internals");function Cl(e){return e&&String(e).trim().toLowerCase()}function ac(e){return e===!1||e==null?e:ce.isArray(e)?e.map(ac):String(e)}function Y6(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const X6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Lp(e,t,r,n,o){if(ce.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!ce.isString(t)){if(ce.isString(n))return t.indexOf(n)!==-1;if(ce.isRegExp(n))return n.test(t)}}function Q6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function J6(e,t){const r=ce.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,i){return this[n].call(this,t,o,a,i)},configurable:!0})})}class rf{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(c,p,g){const v=Cl(p);if(!v)throw new Error("header name must be a non-empty string");const _=ce.findKey(o,v);(!_||o[_]===void 0||g===!0||g===void 0&&o[_]!==!1)&&(o[_||p]=ac(c))}const i=(c,p)=>ce.forEach(c,(g,v)=>a(g,v,p));if(ce.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(ce.isString(t)&&(t=t.trim())&&!X6(t))i(K6(t),r);else if(ce.isHeaders(t))for(const[c,p]of t.entries())a(p,c,n);else t!=null&&a(r,t,n);return this}get(t,r){if(t=Cl(t),t){const n=ce.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return Y6(o);if(ce.isFunction(r))return r.call(this,o,n);if(ce.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cl(t),t){const n=ce.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Lp(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(i){if(i=Cl(i),i){const c=ce.findKey(n,i);c&&(!r||Lp(n,n[c],c,r))&&(delete n[c],o=!0)}}return ce.isArray(t)?t.forEach(a):a(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const a=r[n];(!t||Lp(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const r=this,n={};return ce.forEach(this,(o,a)=>{const i=ce.findKey(n,a);if(i){r[i]=ac(o),delete r[a];return}const c=t?Q6(a):String(a).trim();c!==a&&delete r[a],r[c]=ac(o),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ce.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&ce.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[ox]=this[ox]={accessors:{}}).accessors,o=this.prototype;function a(i){const c=Cl(i);n[c]||(J6(o,i),n[c]=!0)}return ce.isArray(t)?t.forEach(a):a(t),this}}rf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(rf.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ce.freezeMethods(rf);const wn=rf;function Fp(e,t){const r=this||Ib,n=t||r,o=wn.from(n.headers);let a=n.data;return ce.forEach(e,function(c){a=c.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function rk(e){return!!(e&&e.__CANCEL__)}function el(e,t,r){Xe.call(this,e??"canceled",Xe.ERR_CANCELED,t,r),this.name="CanceledError"}ce.inherits(el,Xe,{__CANCEL__:!0});function nk(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Xe("Request failed with status code "+r.status,[Xe.ERR_BAD_REQUEST,Xe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Z6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eV(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(p){const g=Date.now(),v=n[a];i||(i=g),r[o]=p,n[o]=g;let _=a,O=0;for(;_!==o;)O+=r[_++],_=_%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),g-i{r=v,o=null,a&&(clearTimeout(a),a=null),e.apply(null,g)};return[(...g)=>{const v=Date.now(),_=v-r;_>=n?i(g,v):(o=g,a||(a=setTimeout(()=>{a=null,i(o)},n-_)))},()=>o&&i(o)]}const id=(e,t,r=3)=>{let n=0;const o=eV(50,250);return tV(a=>{const i=a.loaded,c=a.lengthComputable?a.total:void 0,p=i-n,g=o(p),v=i<=c;n=i;const _={loaded:i,total:c,progress:c?i/c:void 0,bytes:p,rate:g||void 0,estimated:g&&c&&v?(c-i)/g:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(_)},r)},ax=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ix=e=>(...t)=>ce.asap(()=>e(...t)),rV=Fr.hasStandardBrowserEnv?function(){const t=Fr.navigator&&/(msie|trident)/i.test(Fr.navigator.userAgent),r=document.createElement("a");let n;function o(a){let i=a;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(i){const c=ce.isString(i)?o(i):i;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),nV=Fr.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const i=[e+"="+encodeURIComponent(t)];ce.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),ce.isString(n)&&i.push("path="+n),ce.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function aV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ok(e,t){return e&&!oV(t)?aV(e,t):t}const lx=e=>e instanceof wn?{...e}:e;function Ea(e,t){t=t||{};const r={};function n(g,v,_){return ce.isPlainObject(g)&&ce.isPlainObject(v)?ce.merge.call({caseless:_},g,v):ce.isPlainObject(v)?ce.merge({},v):ce.isArray(v)?v.slice():v}function o(g,v,_){if(ce.isUndefined(v)){if(!ce.isUndefined(g))return n(void 0,g,_)}else return n(g,v,_)}function a(g,v){if(!ce.isUndefined(v))return n(void 0,v)}function i(g,v){if(ce.isUndefined(v)){if(!ce.isUndefined(g))return n(void 0,g)}else return n(void 0,v)}function c(g,v,_){if(_ in t)return n(g,v);if(_ in e)return n(void 0,g)}const p={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(g,v)=>o(lx(g),lx(v),!0)};return ce.forEach(Object.keys(Object.assign({},e,t)),function(v){const _=p[v]||o,O=_(e[v],t[v],v);ce.isUndefined(O)&&_!==c||(r[v]=O)}),r}const ak=e=>{const t=Ea({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:c}=t;t.headers=i=wn.from(i),t.url=ZP(ok(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let p;if(ce.isFormData(r)){if(Fr.hasStandardBrowserEnv||Fr.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((p=i.getContentType())!==!1){const[g,...v]=p?p.split(";").map(_=>_.trim()).filter(Boolean):[];i.setContentType([g||"multipart/form-data",...v].join("; "))}}if(Fr.hasStandardBrowserEnv&&(n&&ce.isFunction(n)&&(n=n(t)),n||n!==!1&&rV(t.url))){const g=o&&a&&nV.read(a);g&&i.set(o,g)}return t},iV=typeof XMLHttpRequest<"u",lV=iV&&function(e){return new Promise(function(r,n){const o=ak(e);let a=o.data;const i=wn.from(o.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:g}=o,v,_,O,C,T;function x(){C&&C(),T&&T(),o.cancelToken&&o.cancelToken.unsubscribe(v),o.signal&&o.signal.removeEventListener("abort",v)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function d(){if(!b)return;const u=wn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),h={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:u,config:e,request:b};nk(function(w){r(w),x()},function(w){n(w),x()},h),b=null}"onloadend"in b?b.onloadend=d:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(d)},b.onabort=function(){b&&(n(new Xe("Request aborted",Xe.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new Xe("Network Error",Xe.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let s=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const h=o.transitional||ek;o.timeoutErrorMessage&&(s=o.timeoutErrorMessage),n(new Xe(s,h.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,e,b)),b=null},a===void 0&&i.setContentType(null),"setRequestHeader"in b&&ce.forEach(i.toJSON(),function(s,h){b.setRequestHeader(h,s)}),ce.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),c&&c!=="json"&&(b.responseType=o.responseType),g&&([O,T]=id(g,!0),b.addEventListener("progress",O)),p&&b.upload&&([_,C]=id(p),b.upload.addEventListener("progress",_),b.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(v=u=>{b&&(n(!u||u.type?new el(null,e,b):u),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(v),o.signal&&(o.signal.aborted?v():o.signal.addEventListener("abort",v)));const l=Z6(o.url);if(l&&Fr.protocols.indexOf(l)===-1){n(new Xe("Unsupported protocol "+l+":",Xe.ERR_BAD_REQUEST,e));return}b.send(a||null)})},sV=(e,t)=>{let r=new AbortController,n;const o=function(p){if(!n){n=!0,i();const g=p instanceof Error?p:this.reason;r.abort(g instanceof Xe?g:new el(g instanceof Error?g.message:g))}};let a=t&&setTimeout(()=>{o(new Xe(`timeout ${t} of ms exceeded`,Xe.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(p=>{p&&(p.removeEventListener?p.removeEventListener("abort",o):p.unsubscribe(o))}),e=null)};e.forEach(p=>p&&p.addEventListener&&p.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=i,[c,()=>{a&&clearTimeout(a),a=null}]},uV=sV,cV=function*(e,t){let r=e.byteLength;if(!t||r{const a=dV(e,t,o);let i=0,c,p=g=>{c||(c=!0,n&&n(g))};return new ReadableStream({async pull(g){try{const{done:v,value:_}=await a.next();if(v){p(),g.close();return}let O=_.byteLength;if(r){let C=i+=O;r(C)}g.enqueue(new Uint8Array(_))}catch(v){throw p(v),v}},cancel(g){return p(g),a.return()}},{highWaterMark:2})},nf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ik=nf&&typeof ReadableStream=="function",gh=nf&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lk=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fV=ik&&lk(()=>{let e=!1;const t=new Request(Fr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ux=64*1024,bh=ik&&lk(()=>ce.isReadableStream(new Response("").body)),ld={stream:bh&&(e=>e.body)};nf&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ld[t]&&(ld[t]=ce.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Xe(`Response type '${t}' is not supported`,Xe.ERR_NOT_SUPPORT,n)})})})(new Response);const pV=async e=>{if(e==null)return 0;if(ce.isBlob(e))return e.size;if(ce.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(ce.isArrayBufferView(e)||ce.isArrayBuffer(e))return e.byteLength;if(ce.isURLSearchParams(e)&&(e=e+""),ce.isString(e))return(await gh(e)).byteLength},hV=async(e,t)=>{const r=ce.toFiniteNumber(e.getContentLength());return r??pV(t)},gV=nf&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:a,timeout:i,onDownloadProgress:c,onUploadProgress:p,responseType:g,headers:v,withCredentials:_="same-origin",fetchOptions:O}=ak(e);g=g?(g+"").toLowerCase():"text";let[C,T]=o||a||i?uV([o,a],i):[],x,b;const d=()=>{!x&&setTimeout(()=>{C&&C.unsubscribe()}),x=!0};let l;try{if(p&&fV&&r!=="get"&&r!=="head"&&(l=await hV(v,n))!==0){let w=new Request(t,{method:"POST",body:n,duplex:"half"}),E;if(ce.isFormData(n)&&(E=w.headers.get("content-type"))&&v.setContentType(E),w.body){const[k,P]=ax(l,id(ix(p)));n=sx(w.body,ux,k,P,gh)}}ce.isString(_)||(_=_?"include":"omit");const u="credentials"in Request.prototype;b=new Request(t,{...O,signal:C,method:r.toUpperCase(),headers:v.normalize().toJSON(),body:n,duplex:"half",credentials:u?_:void 0});let s=await fetch(b);const h=bh&&(g==="stream"||g==="response");if(bh&&(c||h)){const w={};["status","statusText","headers"].forEach(N=>{w[N]=s[N]});const E=ce.toFiniteNumber(s.headers.get("content-length")),[k,P]=c&&ax(E,id(ix(c),!0))||[];s=new Response(sx(s.body,ux,k,()=>{P&&P(),h&&d()},gh),w)}g=g||"text";let m=await ld[ce.findKey(ld,g)||"text"](s,e);return!h&&d(),T&&T(),await new Promise((w,E)=>{nk(w,E,{data:m,headers:wn.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:b})})}catch(u){throw d(),u&&u.name==="TypeError"&&/fetch/i.test(u.message)?Object.assign(new Xe("Network Error",Xe.ERR_NETWORK,e,b),{cause:u.cause||u}):Xe.from(u,u&&u.code,e,b)}}),vh={http:R6,xhr:lV,fetch:gV};ce.forEach(vh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cx=e=>`- ${e}`,bV=e=>ce.isFunction(e)||e===null||e===!1,sk={getAdapter:e=>{e=ce.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let a=0;a`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since : `+a.map(cx).join(` `):" "+cx(a[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:vh};function Vp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new el(null,e)}function dx(e){return Vp(e),e.headers=wn.from(e.headers),e.data=Fp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sk.getAdapter(e.adapter||Ib.adapter)(e).then(function(n){return Vp(e),n.data=Fp.call(e,e.transformResponse,n),n.headers=wn.from(n.headers),n},function(n){return rk(n)||(Vp(e),n&&n.response&&(n.response.data=Fp.call(e,e.transformResponse,n.response),n.response.headers=wn.from(n.response.headers))),Promise.reject(n)})}const uk="1.7.5",Db={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Db[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const fx={};Db.transitional=function(t,r,n){function o(a,i){return"[Axios v"+uk+"] Transitional option '"+a+"'"+i+(n?". "+n:"")}return(a,i,c)=>{if(t===!1)throw new Xe(o(i," has been removed"+(r?" in "+r:"")),Xe.ERR_DEPRECATED);return r&&!fx[i]&&(fx[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,c):!0}};function vV(e,t,r){if(typeof e!="object")throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const c=e[a],p=c===void 0||i(c,a,e);if(p!==!0)throw new Xe("option "+a+" must be "+p,Xe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Xe("Unknown option "+a,Xe.ERR_BAD_OPTION)}}const mh={assertOptions:vV,validators:Db},To=mh.validators;class sd{constructor(t){this.defaults=t,this.interceptors={request:new nx,response:new nx}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ea(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:a}=r;n!==void 0&&mh.assertOptions(n,{silentJSONParsing:To.transitional(To.boolean),forcedJSONParsing:To.transitional(To.boolean),clarifyTimeoutError:To.transitional(To.boolean)},!1),o!=null&&(ce.isFunction(o)?r.paramsSerializer={serialize:o}:mh.assertOptions(o,{encode:To.function,serialize:To.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=a&&ce.merge(a.common,a[r.method]);a&&ce.forEach(["delete","get","head","post","put","patch","common"],T=>{delete a[T]}),r.headers=wn.concat(i,a);const c=[];let p=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(p=p&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const g=[];this.interceptors.response.forEach(function(x){g.push(x.fulfilled,x.rejected)});let v,_=0,O;if(!p){const T=[dx.bind(this),void 0];for(T.unshift.apply(T,c),T.push.apply(T,g),O=T.length,v=Promise.resolve(r);_{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(c=>{n.subscribe(c),a=c}).then(o);return i.cancel=function(){n.unsubscribe(a)},i},t(function(a,i,c){n.reason||(n.reason=new el(a,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Lb(function(o){t=o}),cancel:t}}}const mV=Lb;function yV(e){return function(r){return e.apply(null,r)}}function wV(e){return ce.isObject(e)&&e.isAxiosError===!0}const yh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yh).forEach(([e,t])=>{yh[t]=e});const xV=yh;function ck(e){const t=new ic(e),r=BP(ic.prototype.request,t);return ce.extend(r,ic.prototype,t,{allOwnKeys:!0}),ce.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ck(Ea(e,o))},r}const Ut=ck(Ib);Ut.Axios=ic;Ut.CanceledError=el;Ut.CancelToken=mV;Ut.isCancel=rk;Ut.VERSION=uk;Ut.toFormData=tf;Ut.AxiosError=Xe;Ut.Cancel=Ut.CanceledError;Ut.all=function(t){return Promise.all(t)};Ut.spread=yV;Ut.isAxiosError=wV;Ut.mergeConfig=Ea;Ut.AxiosHeaders=wn;Ut.formToJSON=e=>tk(ce.isHTMLForm(e)?new FormData(e):e);Ut.getAdapter=sk.getAdapter;Ut.HttpStatusCode=xV;Ut.default=Ut;const jt=Ut,Vn=Object.create(null);Vn.open="0";Vn.close="1";Vn.ping="2";Vn.pong="3";Vn.message="4";Vn.upgrade="5";Vn.noop="6";const lc=Object.create(null);Object.keys(Vn).forEach(e=>{lc[Vn[e]]=e});const wh={type:"error",data:"parser error"},dk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fk=typeof ArrayBuffer=="function",pk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Fb=({type:e,data:t},r,n)=>dk&&t instanceof Blob?r?n(t):px(t,n):fk&&(t instanceof ArrayBuffer||pk(t))?r?n(t):px(new Blob([t]),n):n(Vn[e]+(t||"")),px=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function hx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let zp;function _V(e,t){if(dk&&e.data instanceof Blob)return e.data.arrayBuffer().then(hx).then(t);if(fk&&(e.data instanceof ArrayBuffer||pk(e.data)))return t(hx(e.data));Fb(e,!1,r=>{zp||(zp=new TextEncoder),t(zp.encode(r))})}const gx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Al=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,n,o=0,a,i,c,p;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const g=new ArrayBuffer(t),v=new Uint8Array(g);for(n=0;n>4,v[o++]=(i&15)<<4|c>>2,v[o++]=(c&3)<<6|p&63;return g},CV=typeof ArrayBuffer=="function",Vb=(e,t)=>{if(typeof e!="string")return{type:"message",data:hk(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:OV(e.substring(1),t)}:lc[r]?e.length>1?{type:lc[r],data:e.substring(1)}:{type:lc[r]}:wh},OV=(e,t)=>{if(CV){const r=TV(e);return hk(r,t)}else return{base64:!0,data:e}},hk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},gk=String.fromCharCode(30),SV=(e,t)=>{const r=e.length,n=new Array(r);let o=0;e.forEach((a,i)=>{Fb(a,!1,c=>{n[i]=c,++o===r&&t(n.join(gk))})})},PV=(e,t)=>{const r=e.split(gk),n=[];for(let o=0;o{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}let Bp;function Ru(e){return e.reduce((t,r)=>t+r.length,0)}function Nu(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let o=0;oMath.pow(2,53-32)-1){c.enqueue(wh);break}o=v*Math.pow(2,32)+g.getUint32(4),n=3}else{if(Ru(r)e){c.enqueue(wh);break}}}})}const bk=4;function Ht(e){if(e)return RV(e)}function RV(e){for(var t in Ht.prototype)e[t]=Ht.prototype[t];return e}Ht.prototype.on=Ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ht.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ht.prototype.off=Ht.prototype.removeListener=Ht.prototype.removeAllListeners=Ht.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;otypeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),Zr=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),NV="arraybuffer";function vk(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}const jV=Zr.setTimeout,AV=Zr.clearTimeout;function af(e,t){t.useNativeTimers?(e.setTimeoutFn=jV.bind(Zr),e.clearTimeoutFn=AV.bind(Zr)):(e.setTimeoutFn=Zr.setTimeout.bind(Zr),e.clearTimeoutFn=Zr.clearTimeout.bind(Zr))}const MV=1.33;function IV(e){return typeof e=="string"?DV(e):Math.ceil((e.byteLength||e.size)*MV)}function DV(e){let t=0,r=0;for(let n=0,o=e.length;n=57344?r+=3:(n++,r+=4);return r}function mk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function LV(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function FV(e){let t={},r=e.split("&");for(let n=0,o=r.length;n{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};PV(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,SV(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=mk()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let yk=!1;try{yk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const BV=yk;function WV(){}class HV extends zV{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}let Ti=class sc extends Ht{constructor(t,r,n){super(),this.createRequest=t,af(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=vk(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=sc.requestsCount++,sc.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=WV,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete sc.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Ti.requestsCount=0;Ti.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bx);else if(typeof addEventListener=="function"){const e="onpagehide"in Zr?"pagehide":"unload";addEventListener(e,bx,!1)}}function bx(){for(let e in Ti.requests)Ti.requests.hasOwnProperty(e)&&Ti.requests[e].abort()}const UV=function(){const e=wk({xdomain:!1});return e&&e.responseType!==null}();class $V extends HV{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=UV&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ti(wk,this.uri(),t)}}function wk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||BV))return new XMLHttpRequest}catch{}if(!t)try{return new Zr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const xk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class qV extends zb{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,n=xk?{}:vk(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{try{this.doWrite(n,a)}catch{}o&&of(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=mk()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const Wp=Zr.WebSocket||Zr.MozWebSocket;class GV extends qV{createSocket(t,r,n){return xk?new Wp(t,r,n):r?new Wp(t,r):new Wp(t)}doWrite(t,r){this.ws.send(r)}}class KV extends zb{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=EV(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=kV();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{n.read().then(({done:c,value:p})=>{c||(this.onPacket(p),a())}).catch(c=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r{o&&of(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const YV={websocket:GV,webtransport:KV,polling:$V},XV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QV=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xh(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=XV.exec(e||""),a={},i=14;for(;i--;)a[QV[i]]=o[i]||"";return r!=-1&&n!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=JV(a,a.path),a.queryKey=ZV(a,a.query),a}function JV(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function ZV(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,a){o&&(r[o]=a)}),r}const _h=typeof addEventListener=="function"&&typeof removeEventListener=="function",uc=[];_h&&addEventListener("offline",()=>{uc.forEach(e=>e())},!1);class Uo extends Ht{constructor(t,r){if(super(),this.binaryType=NV,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=xh(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=xh(r.host).host);af(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FV(this.opts.query)),_h&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},uc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=bk,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Uo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Uo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,of(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:t,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Uo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),_h&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=uc.indexOf(this._offlineEventListener);n!==-1&&uc.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}Uo.protocol=bk;class ez extends Uo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",_=>{if(!n)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Uo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(v(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const O=new Error("probe error");O.transport=r.name,this.emitReserved("upgradeError",O)}}))};function a(){n||(n=!0,v(),r.close(),r=null)}const i=_=>{const O=new Error("probe error: "+_);O.transport=r.name,a(),this.emitReserved("upgradeError",O)};function c(){i("transport closed")}function p(){i("socket closed")}function g(_){r&&_.name!==r.name&&a()}const v=()=>{r.removeListener("open",o),r.removeListener("error",i),r.removeListener("close",c),this.off("close",p),this.off("upgrading",g)};r.once("open",o),r.once("error",i),r.once("close",c),this.once("close",p),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let n=0;nYV[o]).filter(o=>!!o)),super(t,n)}};function rz(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=xh(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+t,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const nz=typeof ArrayBuffer=="function",oz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_k=Object.prototype.toString,az=typeof Blob=="function"||typeof Blob<"u"&&_k.call(Blob)==="[object BlobConstructor]",iz=typeof File=="function"||typeof File<"u"&&_k.call(File)==="[object FileConstructor]";function Bb(e){return nz&&(e instanceof ArrayBuffer||oz(e))||az&&e instanceof Blob||iz&&e instanceof File}function cc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r=0&&e.num{delete this.acks[t];for(let c=0;c{this.io.clearTimeoutFn(a),r.apply(this,c)};i.withError=!0,this.acks[t]=i}emitWithAck(t,...r){return new Promise((n,o)=>{const a=(i,c)=>i?o(i):n(c);a.withError=!0,r.push(a),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ot.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ot.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ot.EVENT:case ot.BINARY_EVENT:this.onevent(t);break;case ot.ACK:case ot.BINARY_ACK:this.onack(t);break;case ot.DISCONNECT:this.ondisconnect();break;case ot.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...o){n||(n=!0,r.packet({type:ot.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n0&&e.jitter<=1?e.jitter:0,this.attempts=0}tl.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};tl.prototype.reset=function(){this.attempts=0};tl.prototype.setMin=function(e){this.ms=e};tl.prototype.setMax=function(e){this.max=e};tl.prototype.setJitter=function(e){this.jitter=e};class Oh extends Ht{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,af(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new tl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||pz;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new tz(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=pn(r,"open",function(){n.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},i=pn(r,"error",a);if(this._timeout!==!1){const c=this._timeout,p=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),r.close()},c);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(pn(t,"ping",this.onping.bind(this)),pn(t,"data",this.ondata.bind(this)),pn(t,"error",this.onerror.bind(this)),pn(t,"close",this.onclose.bind(this)),pn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){of(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Tk(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let n=0;nt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ol={};function dc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=rz(e,t.path||"/socket.io"),n=r.source,o=r.id,a=r.path,i=Ol[o]&&a in Ol[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||i;let p;return c?p=new Oh(n,t):(Ol[o]||(Ol[o]=new Oh(n,t)),p=Ol[o]),r.query&&!t.query&&(t.query=r.queryKey),p.socket(r.path,t)}Object.assign(dc,{Manager:Oh,Socket:Tk,io:dc,connect:dc});const Ck=A.createContext(null),Hp={success:{container:"border-mossGreen-500/80 bg-mossGreen-900/90 text-white",accent:"bg-mossGreen-400"},warning:{container:"border-warmAmberGlow-500/80 bg-warmAmberGlow-900/90 text-white",accent:"bg-warmAmberGlow-400"},error:{container:"border-sunsetCoral-500/80 bg-sunsetCoral-900/90 text-white",accent:"bg-sunsetCoral-400"},info:{container:"border-arcticBlue-500 bg-arcticBlue-900/90 text-white",accent:"bg-arcticBlue-400"}},gz=6e3;function bz({children:e}){const[t,r]=A.useState([]),n=A.useRef(new Map),o=A.useCallback(c=>{r(g=>g.filter(v=>v.id!==c));const p=n.current.get(c);p&&typeof window<"u"&&window.clearTimeout(p),n.current.delete(c)},[]),a=A.useCallback(({id:c,title:p,description:g,variant:v="info",duration:_=gz}={})=>{const O=c??`${Date.now()}-${Math.random().toString(16).slice(2)}`,C=Hp[v]?v:"info";if(r(T=>[...T.filter(b=>b.id!==O),{id:O,title:p,description:g,variant:C}]),_!==null&&_!==1/0&&typeof window<"u"){const T=window.setTimeout(()=>{o(O)},_),x=n.current.get(O);x&&window.clearTimeout(x),n.current.set(O,T)}return O},[o]);A.useEffect(()=>()=>{typeof window>"u"||(n.current.forEach(c=>window.clearTimeout(c)),n.current.clear())},[]);const i=A.useMemo(()=>({showToast:a,dismissToast:o}),[a,o]);return I.jsxs(Ck.Provider,{value:i,children:[e,I.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-50 flex w-80 max-w-full flex-col gap-3",children:t.map(c=>{const p=Hp[c.variant]??Hp.info;return I.jsx("div",{className:`pointer-events-auto overflow-hidden rounded-lg border px-4 py-3 shadow-xl backdrop-blur ${p.container}`,children:I.jsxs("div",{className:"flex items-start gap-3",children:[I.jsx("span",{className:`mt-1 h-2 flex-shrink-0 w-2 rounded-full ${p.accent}`}),I.jsxs("div",{className:"flex-1",children:[c.title&&I.jsx("p",{className:"text-sm font-semibold",children:c.title}),c.description&&I.jsx("p",{className:"mt-1 text-sm leading-snug text-white/80",children:c.description})]}),I.jsx("button",{type:"button",onClick:()=>o(c.id),className:"ml-2 rounded-md p-1 text-xs uppercase tracking-wide text-white/60 transition hover:text-white/90",children:"Schließen"})]})},c.id)})})]})}function Ok(){const e=A.useContext(Ck);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}const Sk=A.createContext(null),vz={maintenance:null,update:null,script:null,ssh:null,loading:!0,error:"",lastUpdated:null};function mz({children:e}){var b,d;const[t,r]=A.useState(vz),n=A.useRef(null),o=A.useRef(!1),a=A.useCallback(l=>{r(u=>({...u,...l}))},[]),i=A.useCallback(async()=>{var l,u;a({loading:!0,error:""});try{const h=(await jt.get("/api/maintenance/config")).data??{};a({maintenance:h.maintenance??null,update:h.update??null,script:h.script??null,ssh:h.ssh??null,loading:!1,error:"",lastUpdated:new Date})}catch(s){const h=((u=(l=s.response)==null?void 0:l.data)==null?void 0:u.error)||s.message||"Fehler beim Laden der Wartungsdaten";a({loading:!1,error:h})}},[a]),c=A.useCallback(async()=>{var l,u;try{const h=(await jt.get("/api/maintenance/update-status")).data??{};r(m=>({...m,maintenance:h.maintenance??m.maintenance,update:h.update??m.update,error:""}))}catch(s){const h=((u=(l=s.response)==null?void 0:l.data)==null?void 0:u.error)||s.message||"Fehler beim Aktualisieren des Wartungsstatus";r(m=>({...m,error:h}))}},[]);A.useEffect(()=>{i()},[i]),A.useEffect(()=>{var l;if((l=t.update)!=null&&l.running){c();const u=setInterval(()=>{c()},5e3);return n.current=u,()=>clearInterval(u)}n.current&&(clearInterval(n.current),n.current=null)},[(b=t.update)==null?void 0:b.running,c]),A.useEffect(()=>{var u;const l=!!((u=t.update)!=null&&u.running);!l&&o.current&&i(),o.current=l},[(d=t.update)==null?void 0:d.running,i]);const p=A.useCallback(async(l={})=>{await jt.post("/api/maintenance/portainer-update",l),await c()},[c]),g=A.useCallback(async l=>{await jt.put("/api/maintenance/update-script",{script:l}),await i()},[i]),v=A.useCallback(async()=>{await jt.delete("/api/maintenance/update-script"),await i()},[i]),_=A.useCallback(async l=>{await jt.put("/api/maintenance/ssh-config",l),await i()},[i]),O=A.useCallback(async()=>{await jt.delete("/api/maintenance/ssh-config"),await i()},[i]),C=A.useCallback(async({active:l,message:u}={})=>{var w;const s={active:!!l};u!==void 0&&(s.message=u);const m=((w=(await jt.post("/api/maintenance/mode",s)).data)==null?void 0:w.maintenance)??null;return a({maintenance:m,error:""}),m},[a]),T=A.useCallback(async l=>(await jt.post("/api/maintenance/test-ssh",l??{})).data,[]),x=A.useMemo(()=>({maintenance:t.maintenance,update:t.update,script:t.script,ssh:t.ssh,loading:t.loading,error:t.error,lastUpdated:t.lastUpdated,refreshConfig:i,refreshUpdateStatus:c,setMaintenanceMode:C,triggerUpdate:p,saveScript:g,resetScript:v,saveSshConfig:_,deleteSshConfig:O,testSshConnection:T}),[t,i,c,C,p,g,v,_,O,T]);return I.jsx(Sk.Provider,{value:x,children:e})}function Pk(){const e=A.useContext(Sk);if(!e)throw new Error("useMaintenance must be used within a MaintenanceProvider");return e}const yz=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"},{value:"100",label:"100"},{value:"all",label:"Alle"}],mx="50",kk=A.createContext(null),wz=(e,t)=>{const r=Number(e);if(Number.isFinite(r)&&r>0)return r;const n=Number(t);return Number.isFinite(n)&&n>0?n:1};function xz({children:e,initialPage:t=1,initialPerPage:r=mx,perPageOptions:n=yz}){const[o,a]=A.useState(t),[i,c]=A.useState(r),[p,g]=A.useState(0),[v,_]=A.useState(0),O=A.useRef(t),C=A.useRef(r),T=A.useMemo(()=>new Set(n.map(N=>String(N.value))),[n]),x=i==="all",b=A.useCallback(()=>x?null:wz(i,r),[i,x,r]),d=A.useCallback((N,j)=>{g(Math.max(0,Number(N)||0)),_(Math.max(0,Number(j)||0))},[]),l=A.useCallback(()=>{a(O.current??1),c(C.current??mx),g(0),_(0)},[]),u=A.useCallback((N,{resetPage:j=!0}={})=>{if(N==null)return;const D=String(N);T.has(D)&&(c(D),j&&a(1))},[T]),s=A.useCallback(N=>{var D;const j=typeof N=="string"?N:(D=N==null?void 0:N.target)==null?void 0:D.value;u(j,{resetPage:!0})},[u]),h=A.useCallback(N=>{if(x)return;const j=Number(N);if(!Number.isFinite(j)||j<1)return;const D=b();if(!D)return;const F=Math.max(1,Math.ceil((p||0)/D));j>F||a(j)},[x,b,p]),m=A.useMemo(()=>{if(x)return 1;const N=b();return N?Math.max(1,Math.ceil((p||0)/N)):1},[x,b,p]),w=A.useMemo(()=>{if(!p)return 0;if(x)return 1;const N=b();return(o-1)*N+1},[p,x,b,o]),E=A.useMemo(()=>{if(!p)return 0;if(x)return p;const N=b(),j=(o-1)*N+(v||N);return Math.min(p,j)},[p,x,b,o,v]),k=A.useMemo(()=>p?x?`Zeige alle ${p.toLocaleString()} Einträge`:`Zeige ${w.toLocaleString()} – ${E.toLocaleString()} von ${p.toLocaleString()} Einträgen`:"Keine Einträge",[p,x,w,E]),P=A.useMemo(()=>({page:o,perPage:i,perPageOptions:n,perPageIsAll:x,totalItems:p,visibleItems:v,totalPages:m,rangeStart:w,rangeEnd:E,summaryLabel:k,setPage:a,setPerPage:u,setTotals:d,setTotalItems:g,setVisibleItems:_,handlePageChange:h,handlePerPageChange:s,validPerPageValues:T,resetPagination:l}),[o,i,n,x,p,v,m,w,E,k,d,u,h,s,T,l]);return I.jsx(kk.Provider,{value:P,children:e})}function Hb(){const e=A.useContext(kk);if(!e)throw new Error("usePage must be used within a PageProvider");return e}function Ek({disabled:e=!1}){const{summaryLabel:t,perPageIsAll:r,page:n,totalPages:o,handlePageChange:a}=Hb();return I.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[I.jsx("span",{children:t}),!r&&I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx("button",{onClick:()=>a(n-1),disabled:e||n<=1,className:"rounded-md border border-slate-300 p-2.5 text-center text-sm transition-all shadow-sm hover:shadow-lg text-slate-600 hover:text-white hover:bg-slate-800 hover:border-slate-800 focus:text-white focus:bg-slate-800 focus:border-slate-800 active:border-slate-800 active:text-white active:bg-slate-800 disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none",type:"button",children:I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-4 w-4",children:I.jsx("path",{d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z"})})}),I.jsxs("p",{className:"text-slate-600",children:["Seite ",I.jsx("strong",{className:"text-slate-800",children:n})," / ",I.jsx("strong",{className:"text-slate-800",children:o})]}),I.jsx("button",{onClick:()=>a(n+1),disabled:e||n>=o,className:"rounded-md border border-slate-300 p-2.5 text-center text-sm transition-all shadow-sm hover:shadow-lg text-slate-600 hover:text-white hover:bg-slate-800 hover:border-slate-800 focus:text-white focus:bg-slate-800 focus:border-slate-800 active:border-slate-800 active:text-white active:bg-slate-800 disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none",type:"button",children:I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-4 w-4",children:I.jsx("path",{d:"M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z"})})})]})]})}const ju="stackSelectionPreference",_z=30*1e3,Tz=30*1e3;let ba={data:null,timestamp:0},Au=null;const tt={QUEUED:"queued",STARTED:"started",SUCCESS:"success",ERROR:"error",INFO:"info"},Cz={initializing:"Vorbereitung","activating-maintenance":"Wartungsmodus aktivieren","executing-script":"Skript wird ausgeführt",waiting:"Warte auf Portainer",completed:"Abgeschlossen",failed:"Fehlgeschlagen"},Oz=()=>!!ba.data&&Date.now()-ba.timestamp<_z,yx=e=>{ba={data:e,timestamp:Date.now()}},Sz=e=>Array.isArray(e)?[...e].sort((t,r)=>((t==null?void 0:t.Name)||"").localeCompare((r==null?void 0:r.Name)||"")):[];function Pz(){const[e,t]=A.useState(()=>Sz(ba.data)),[r,n]=A.useState(()=>!ba.data),[o,a]=A.useState(""),[i,c]=A.useState([]),[p,g]=A.useState("all"),[v,_]=A.useState(""),[O,C]=A.useState(!1),[T,x]=A.useState(!1),[b,d]=A.useState(!1),{showToast:l}=Ok(),{maintenance:u,update:s,script:h,ssh:m}=Pk(),w=!!(u!=null&&u.active),E=u==null?void 0:u.message,k=!!(s!=null&&s.running),P=w||k,N=s!=null&&s.stage?Cz[s.stage]??s.stage:"–",{page:j,perPage:D,perPageOptions:F,setPage:W,setTotals:G,handlePerPageChange:X,resetPagination:U}=Hb(),B=A.useCallback(()=>{},[]);A.useEffect(()=>()=>U(),[U]),A.useEffect(()=>{P&&(n(!1),t([]),c([]))},[P]);const H=A.useRef(new Map),K=A.useCallback((ue,be)=>{const Se=new Map(ue.map(ve=>[ve.Id,ve]));return[...be].sort((ve,Pe)=>ve.Name.localeCompare(Pe.Name)).map(ve=>{const Pe=Se.get(ve.Id);if(Pe&&Pe.updateStatus==="✅"&&ve.updateStatus==="⚠️"){const he=ve.Name?`${ve.Name} (ID: ${ve.Id})`:`Stack ${ve.Id}`;l({variant:"warning",title:"Aktualisierung gefunden",description:he})}let it=ve.redeployPhase??(Pe==null?void 0:Pe.redeployPhase)??null;!it&&(ve.redeploying||Pe!=null&&Pe.redeploying)&&(it=tt.STARTED);const vt=it===tt.QUEUED,ft=it===tt.STARTED;return{...ve,redeployPhase:it,redeployQueued:vt,redeploying:vt||ft,redeployDisabled:ve.redeployDisabled??(Pe==null?void 0:Pe.redeployDisabled)??!1,duplicateName:ve.duplicateName??(Pe==null?void 0:Pe.duplicateName)??!1}})},[l]);A.useEffect(()=>{const ue=dc("/",{path:"/socket.io",transports:["websocket"]});return console.log("🔌 Socket connected"),ue.on("redeployStatus",async(be={})=>{const{stackId:Se}=be;if(!Se)return;const Re=be.redeployPhase??be.phase;let ve=Re;ve?Re==="started"||Re==="running"?ve=tt.STARTED:Re==="queued"?ve=tt.QUEUED:Re==="success"?ve=tt.SUCCESS:Re==="error"?ve=tt.ERROR:Re==="info"&&(ve=tt.INFO):be.isRedeploying===!0?ve=tt.STARTED:be.isRedeploying===!1&&(ve=tt.SUCCESS);const Pe=H.current.get(Se),it=be.stackName??(Pe==null?void 0:Pe.Name),vt=it?`${it} (ID: ${Se})`:`Stack ${Se}`;if(console.log(`🔄 Stack ${Se} Redeploy Update: ${ve??"unbekannt"}`),ve===tt.STARTED)l({variant:"info",title:"Redeploy gestartet",description:vt});else if(ve===tt.SUCCESS)l({variant:"success",title:"Redeploy abgeschlossen",description:vt});else if(ve===tt.ERROR){const ee=be.message?` – ${be.message}`:"";l({variant:"error",title:"Redeploy fehlgeschlagen",description:`${vt}${ee}`})}if(t(ee=>ee.map(he=>{if(he.Id!==Se)return he;const Te=ve??he.redeployPhase??null,We=Te===tt.QUEUED,ct=Te===tt.STARTED,lt=Te===tt.SUCCESS,qe=Te===tt.ERROR,mt=We||ct,Ot={...he,redeployPhase:Te,redeployQueued:We,redeploying:mt};return lt&&(Ot.updateStatus="✅",Ot.redeploying=!1,Ot.redeployQueued=!1),qe&&(Ot.redeploying=!1,Ot.redeployQueued=!1),!mt&&!lt&&!qe&&ve===void 0&&(Ot.redeploying=!1,Ot.redeployQueued=!1,Ot.redeployPhase=he.redeployPhase??null),Ot})),ve===tt.SUCCESS||ve===tt.ERROR||be.isRedeploying===!1&&!ve)try{const ee=await jt.get("/api/stacks");yx(ee.data),t(he=>K(he,ee.data))}catch(ee){console.error("Fehler beim Aktualisieren nach Redeploy:",ee)}}),()=>ue.disconnect()},[]);const Q=A.useCallback(async({force:ue=!1,silent:be=!1}={})=>{if(w||k){be||n(!1);return}const Se=!!ba.data;if(!ue&&Se&&(t(ve=>K(ve,ba.data)),!be&&(n(!1),Oz())))return;const Re=!be&&(!Se||ue);Re&&n(!0);try{(ue||!Au)&&(Au=jt.get("/api/stacks").then(Pe=>(yx(Pe.data),Pe.data)).finally(()=>{Au=null}));const ve=await Au;t(Pe=>K(Pe,ve)),a("")}catch(ve){console.error("❌ Fehler beim Abrufen der Stacks:",ve),!Se&&!be&&a("Fehler beim Laden der Stacks")}finally{Re&&n(!1)}},[w,k,K]);A.useEffect(()=>{Q()},[Q]),A.useEffect(()=>{if(typeof document>"u"||w||k)return;const ue=setInterval(()=>{document.hidden||Q({force:!0,silent:!0})},Tz);return()=>clearInterval(ue)},[Q,w,k]),A.useEffect(()=>{if(typeof document>"u"||w||k)return;const ue=()=>{document.hidden||Q({force:!0,silent:!0})};return document.addEventListener("visibilitychange",ue),()=>{document.removeEventListener("visibilitychange",ue)}},[Q,w,k]),A.useEffect(()=>{c(ue=>{const be=ue.filter(Se=>{const Re=e.find(Pe=>Pe.Id===Se);if(!Re||Re.updateStatus==="✅"||Re.redeployDisabled)return!1;const ve=Re.redeployPhase;return!(ve===tt.STARTED||ve===tt.QUEUED)});return be.length===ue.length?ue:be})},[e]),A.useEffect(()=>{H.current=new Map(e.map(ue=>[ue.Id,ue]))},[e]);const oe=v.trim().toLowerCase(),se=A.useMemo(()=>e.filter(ue=>!(p==="current"&&ue.updateStatus!=="✅"||p==="outdated"&&ue.updateStatus==="✅"||oe&&!`${ue.Name??""} ${ue.Id??""}`.toLowerCase().includes(oe))),[e,p,oe]),ae=A.useMemo(()=>se.filter(ue=>{if(ue.updateStatus==="✅"||ue.redeployDisabled)return!1;const be=ue.redeployPhase;return!(be===tt.STARTED||be===tt.QUEUED)}),[se]);A.useMemo(()=>{const ue=new Map;return e.forEach(be=>{ue.set(be.Id,be)}),ue},[e]),A.useMemo(()=>new Set(se.map(ue=>ue.Id)),[se]);const ne=A.useMemo(()=>{if(D==="all")return se;const ue=Number(D),be=(j-1)*ue;return se.slice(be,be+ue)},[se,D,j]);A.useEffect(()=>{G(se.length,ne.length)},[se.length,ne.length,G]),A.useMemo(()=>new Set(ne.map(ue=>ue.Id)),[ne]);const me=A.useMemo(()=>ne.filter(ue=>{if(ue.updateStatus==="✅"||ue.redeployDisabled)return!1;const be=ue.redeployPhase;return!(be===tt.STARTED||be===tt.QUEUED)}),[ne]),fe=A.useRef({action:"keep",remember:!1}),ie=A.useRef({status:p,search:oe}),ge=A.useRef(!1);A.useEffect(()=>{if(!(typeof window>"u"))try{const ue=window.sessionStorage.getItem(ju);if(!ue)return;const be=JSON.parse(ue);be&&(be.action==="keep"||be.action==="clear")&&(fe.current={action:be.action,remember:!0},d(!0))}catch(ue){console.error("⚠️ Konnte gespeicherte Auswahl-Einstellung nicht laden:",ue),fe.current={action:"keep",remember:!1}}},[]),A.useEffect(()=>{const ue=oe;if(!ge.current){ge.current=!0,ie.current={status:p,search:ue};return}const be=ie.current;if(!(be.status!==p||be.search!==ue)){p==="all"&&ue.length===0&&O&&C(!1);return}if(ie.current={status:p,search:ue},i.length===0){C(!1);return}if(!(p!=="all"||ue.length>0)){C(!1);return}const ve=fe.current;if(ve!=null&&ve.remember){ve.action==="clear"&&c([]),C(!1);return}x(!!(ve!=null&&ve.remember)),C(!0)},[p,oe,i.length,O]),A.useEffect(()=>{i.length===0&&O&&C(!1)},[i.length,O]);const de=p!=="all"||oe.length>0;A.useEffect(()=>{W(1)},[p,oe,W]),A.useEffect(()=>{if(D==="all"){j!==1&&W(1);return}const ue=Number(D)||1,be=Math.max(1,Math.ceil(se.length/ue));j>be&&W(be)},[se.length,D,j,W]);const Oe=(ue,be)=>{be||c(Se=>Se.includes(ue)?Se.filter(Re=>Re!==ue):[...Se,ue])},Me=ue=>{const be=T;if(typeof window<"u")try{if(be){const Se={action:ue,remember:!0};window.sessionStorage.setItem(ju,JSON.stringify(Se)),fe.current=Se}else window.sessionStorage.removeItem(ju),fe.current={action:ue,remember:!1}}catch(Se){console.error("⚠️ Konnte Auswahl-Einstellung nicht speichern:",Se),fe.current={action:ue,remember:!1}}else fe.current={action:ue,remember:!1};d(be),x(be),ue==="clear"&&c([]),C(!1)},Ce=()=>{if(typeof window<"u")try{window.sessionStorage.removeItem(ju)}catch(ue){console.error("⚠️ Konnte gespeicherte Auswahl-Einstellung nicht löschen:",ue)}fe.current={action:"keep",remember:!1},d(!1),x(!1),de&&i.length>0&&C(!0)},_e=async ue=>{const be=H.current.get(ue),Se=be==null?void 0:be.redeployPhase;if(!(Se===tt.STARTED||Se===tt.QUEUED)){c(Re=>Re.filter(ve=>ve!==ue)),t(Re=>Re.map(ve=>ve.Id===ue?{...ve,redeployPhase:tt.STARTED,redeploying:!0,redeployQueued:!1}:ve));try{await jt.put(`/api/stacks/${ue}/redeploy`)}catch(Re){if(console.error("❌ Fehler beim Redeploy:",Re),t(ve=>ve.map(Pe=>Pe.Id===ue?{...Pe,redeployPhase:null,redeploying:!1,redeployQueued:!1}:Pe)),!Re.response){const ve=H.current.get(ue),Pe=ve!=null&&ve.Name?`${ve.Name} (ID: ${ue})`:`Stack ${ue}`,it=Re.message||"Unbekannter Fehler";l({variant:"error",title:"Redeploy fehlgeschlagen",description:`${Pe} – ${it}`})}}}},Ee=async()=>{var be,Se;if(!me.length)return;const ue=new Set(me.map(Re=>Re.Id));t(Re=>Re.map(ve=>ue.has(ve.Id)?{...ve,redeployPhase:tt.QUEUED,redeploying:!0,redeployQueued:!0}:ve));try{ue.size===ae.length?await jt.put("/api/stacks/redeploy-all"):await jt.put("/api/stacks/redeploy-selection",{stackIds:Array.from(ue)}),c(Re=>Re.filter(ve=>!ue.has(ve)))}catch(Re){console.error("❌ Fehler beim Redeploy ALL:",Re),t(Pe=>Pe.map(it=>ue.has(it.Id)?{...it,redeployPhase:null,redeploying:!1,redeployQueued:!1}:it));const ve=((Se=(be=Re.response)==null?void 0:be.data)==null?void 0:Se.error)||Re.message||"Unbekannter Fehler";l({variant:"error",title:"Redeploy ALL fehlgeschlagen",description:ve})}},Ke=async()=>{var Se,Re;if(!i.length)return;const ue=i.filter(ve=>{const Pe=e.find(vt=>vt.Id===ve);if(!Pe||Pe.updateStatus==="✅"||Pe.redeployDisabled)return!1;const it=Pe.redeployPhase;return!(it===tt.STARTED||it===tt.QUEUED)});if(!ue.length){c([]);return}const be=new Set(ue);t(ve=>ve.map(Pe=>be.has(Pe.Id)?{...Pe,redeployPhase:tt.QUEUED,redeploying:!0,redeployQueued:!0}:Pe));try{await jt.put("/api/stacks/redeploy-selection",{stackIds:ue}),c(ve=>ve.filter(Pe=>!be.has(Pe)))}catch(ve){console.error("❌ Fehler beim Redeploy Auswahl:",ve),t(it=>it.map(vt=>be.has(vt.Id)?{...vt,redeployPhase:null,redeploying:!1,redeployQueued:!1}:vt));const Pe=((Re=(Se=ve.response)==null?void 0:Se.data)==null?void 0:Re.error)||ve.message||"Unbekannter Fehler";l({variant:"error",title:"Redeploy Auswahl fehlgeschlagen",description:Pe})}},Ze=i.length>0,dt=me.length>0,at=Ze?`Redeploy Auswahl (${i.length})`:"Redeploy Alle",nt=P||(Ze?O||i.length===0||i.every(ue=>{const be=e.find(Re=>Re.Id===ue);if(!be||be.updateStatus==="✅"||be.redeployDisabled)return!0;const Se=be.redeployPhase;return Se===tt.STARTED||Se===tt.QUEUED}):!dt),He=()=>{if(P){l({variant:"warning",title:"Wartungsmodus aktiv",description:"Redeploy-Aktionen sind während des Wartungsmodus deaktiviert."});return}Ze?Ke():Ee()};return I.jsxs("div",{className:"mt-12 mb-8 flex flex-col gap-12",children:[(w||k)&&I.jsx("div",{className:"rounded-lg border border-cyan-500/60 bg-cyan-900/30 px-4 py-3 text-sm text-bluegray-100",children:I.jsxs("div",{className:"flex flex-col gap-1",children:[I.jsxs("span",{children:["Wartungsmodus aktiv",E?` – ${E}`:k?" – Portainer-Update läuft":"","."]}),k&&I.jsxs("span",{className:"text-xs text-indigo-900",children:["Phase: ",N]})]})}),I.jsxs(pe.Card,{children:[I.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"p-4 pt-2 pb-2",children:!r&&!o?I.jsx(pe.Typography,{variant:"h6",color:"white",children:I.jsx("span",{className:"flex items-center gap-2",children:I.jsx("span",{children:"Filter und Optionen"})})}):I.jsx(pe.Typography,{variant:"h6",color:"white",children:I.jsx("span",{className:"flex items-center gap-2",children:I.jsx("span",{children:"Lade Stacks"})})})}),I.jsxs(pe.CardBody,{children:[r?I.jsxs("p",{className:"flex py-6 text-center text-sm font-medium text-gray-400",children:[I.jsx(pe.Spinner,{className:"mr-2 h-4 w-4 flex"}),"Lade Stacks..."]}):o?I.jsx("p",{className:"py-6 text-sm font-medium text-red-400",children:o}):I.jsxs("div",{className:"gap-4",children:[I.jsx("div",{className:"w-full",children:I.jsxs(pe.ButtonGroup,{fullWidth:!0,children:[I.jsx(pe.Button,{onClick:()=>g("all"),children:"Alle"}),I.jsx(pe.Button,{onClick:()=>g("current"),children:"Aktuell"}),I.jsx(pe.Button,{onClick:()=>g("outdated"),children:"Veraltet"})]})}),I.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between mt-8",children:[I.jsx("div",{className:"md:flex-1",children:I.jsx(pe.Input,{value:v,onChange:ue=>_(ue.target.value),variant:"static",placeholder:"Name oder ID"})}),I.jsx("div",{className:"md:mt-0 mt-8 md:flex-1",children:I.jsx(pe.Select,{variant:"static",label:"Einträge pro Seite",onChange:B,value:D,children:F.map(({value:ue,label:be})=>I.jsx(pe.Option,{value:ue,onClick:()=>X(ue),children:be},ue))})})]}),I.jsx("div",{className:"flex items-center justify-end gap-3 mt-5",children:b&&I.jsx("button",{onClick:Ce,className:"block antialiased font-sans text-sm leading-normal text-inherit text-xs font-medium text-warmAmberGlow-500 underline underline-offset-2 transition hover:text-warmAmberGlow-600",children:"Gespeicherte Entscheidung löschen"})})]}),O&&I.jsx("div",{className:"flex flex-col mt-5",children:I.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-arcticBlue-800 bg-arcticBlue-900/90 px-4 py-3 text-arcticBlue-100 md:flex-row md:items-center md:justify-between",children:[I.jsxs("div",{className:"space-y-2 block antialiased font-sans text-sm font-light leading-normal text-inherit",children:[I.jsxs("p",{children:[i.length===1?"1 Stack ist weiterhin ausgewählt.":`${i.length} Stacks sind weiterhin ausgewählt.`," ","Soll die Auswahl entfernt werden?"]}),I.jsxs("label",{className:"flex items-center gap-2",children:[I.jsx("input",{type:"checkbox",checked:T,onChange:ue=>x(ue.target.checked),className:"h-4 w-4 rounded border border-arcticBlue-400 bg-arcticBlue-900 text-arcticBlue-400 focus:ring-arcticBlue-300"}),I.jsx("span",{className:"text-xs",children:"Einstellung merken (bis Browser geschlossen wird)"})]})]}),I.jsxs("div",{className:"flex gap-2",children:[I.jsx(pe.Button,{onClick:()=>Me("keep"),className:"rounded-md border border-arcticBlue-600 bg-arcticBlue-700 px-4 py-2 font-sans font-bold text-center uppercase transition-all hover:bg-arcticBlue-800",children:"Auswahl behalten"}),I.jsx(pe.Button,{onClick:()=>Me("clear"),className:"rounded-md border border-sunsetCoral-500 bg-sunsetCoral-600 px-4 py-2 font-sans font-bold text-center uppercase transition-all hover:bg-sunsetCoral-600",children:"Auswahl entfernen"})]})]})})]})]}),I.jsx("div",{className:"grid gap-6 md:justify-end md:items-center",children:I.jsx(pe.Button,{className:"w-full bg-arcticBlue-500 hover:bg-arcticBlue-600",onClick:He,disabled:nt,children:at})}),I.jsx("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:ne.map(ue=>{const be=ue.redeployPhase,Se=be===tt.QUEUED,Re=be===tt.STARTED,ve=Se||Re,Pe=i.includes(ue.Id),it=ue.updateStatus==="✅",vt=!!ue.redeployDisabled,ft=!ve&&!it&&!vt;return I.jsx(pe.Card,{children:I.jsxs(pe.CardBody,{className:`flex w-full text-stormGrey-500 items-center justify-between gap-4 rounded-xl shadow-lg transition border ${Pe?"border-purple-500 ring-1 ring-purple-500/40":"border-transparent"} ${!ft||ve?"opacity-75 bg-stormGrey-200/20":""}`,children:[I.jsxs("div",{className:"flex items-center space-x-4",id:"left",children:[I.jsx("input",{type:"checkbox",checked:Pe,onChange:()=>Oe(ue.Id,!ft),className:`h-5 w-5 text-purple-500 focus:ring-purple-400 border-gray-600 bg-gray-900 rounded ${ft?"":"opacity-40 cursor-not-allowed"}`,disabled:!ft}),I.jsx("div",{className:`w-12 h-12 flex items-center justify-center rounded-full ${ue.updateStatus==="✅"?"bg-mossGreen-600":ue.updateStatus==="⚠️"?"bg-warmAmberGlow-400":"bg-sunsetCoral-500"}`}),I.jsxs("div",{children:[I.jsx("p",{className:"text-lg antialiased font-sans font-semibold leading-normal text-inherit",children:ue.Name}),I.jsxs("p",{className:"text-sm antialiased font-sans font-light leading-normal text-inherit",children:["ID: ",ue.Id]}),ue.duplicateName&&I.jsx("p",{className:"text-xs text-amber-700",children:"⚠️ Doppelter Name erkannt"})]})]}),I.jsx("div",{className:"ml-auto flex flex-col items-end gap-1 text-sm",id:"right",children:Re?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-warmAmberGlow-600",children:"Redeploy"}),I.jsx("span",{className:"text-warmAmberGlow-500",children:"läuft…"})]}):Se?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-warmAmberGlow-600",children:"Redeploy"}),I.jsx("span",{className:"text-warmAmberGlow-500",children:"in Warteliste…"})]}):vt?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-stormGrey-500",children:"System"}),I.jsx("span",{className:"text-gray-300",children:"Redeploy deaktiviert"})]}):it?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-stormGrey-500",children:"Status"}),I.jsx("span",{className:"text-mossGreen-600",children:"Aktuell"})]}):I.jsx(pe.Button,{onClick:()=>_e(ue.Id),disabled:ve,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:"Redeploy"})})]})},ue.Id)})}),I.jsx(Ek,{disabled:r||!!o})]})}const kz={idle:"Bereit",running:"Läuft",success:"Erfolgreich",error:"Fehlgeschlagen"},Sl={idle:"bg-stormGrey-700 text-gray-200",running:"bg-arcticBlue-600 text-white",success:"bg-mossGreen-600 text-white",error:"bg-sunsetCoral-600 text-white"},Ez={initializing:"Vorbereitung","activating-maintenance":"Wartungsmodus aktivieren","executing-script":"Skript wird ausgeführt",waiting:"Warte auf Portainer",completed:"Abgeschlossen",failed:"Fehlgeschlagen"},Rz={info:"text-arcticBlue-700",success:"text-mossGreen-700",warning:"text-warmAmberGlow-700",error:"text-sunsetCoral-700",stdout:"text-stormGrey-700",stderr:"text-warmAmberGlow-700",debug:"text-lavenderSmoke-700"},Nz=e=>{if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})},ua=e=>{if(!e&&e!==0)return"-";const r=(n=>{if(n instanceof Date)return n;if(typeof n=="number"){const o=n>1e12?n:n*1e3;return new Date(o)}if(typeof n=="string"){const o=Number(n);if(!Number.isNaN(o)){const a=o>1e12?o:o*1e3;return new Date(a)}return new Date(n)}return null})(e);return!r||Number.isNaN(r.getTime())?String(e):r.toLocaleString("de-DE",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})},wx=e=>e===1?"Git":e===2?"Compose":e??"-",Up=()=>({host:"",port:"22",username:"",password:"",extraSshArgs:""});function jz(){var Wa,fo,po;const{showToast:e}=Ok(),{maintenance:t,update:r,script:n,ssh:o,loading:a,error:i,setMaintenanceMode:c,triggerUpdate:p,saveScript:g,resetScript:v,saveSshConfig:_,deleteSshConfig:O,testSshConnection:C}=Pk(),T=!!(t!=null&&t.active),x=t==null?void 0:t.message,b=(Wa=t==null?void 0:t.extra)==null?void 0:Wa.type,d=!!(r!=null&&r.running),[l,u]=A.useState(""),[s,h]=A.useState(!1),[m,w]=A.useState(!1),[E,k]=A.useState(""),[P,N]=A.useState(!1),[j,D]=A.useState(()=>Up()),[F,W]=A.useState(!1),[G,X]=A.useState(!1),[U,B]=A.useState(!1),[H,K]=A.useState(!1),[Q,oe]=A.useState(!1),[se,ae]=A.useState(null);A.useEffect(()=>{if(!n)return;const we=n.custom??n.default??n.effective??"";u(we)},[n]),A.useEffect(()=>{if(!o){D(Up()),W(!1),X(!1),ae(null);return}D({host:o.host??"",port:String(o.port??"22"),username:o.username??"",password:"",extraSshArgs:Array.isArray(o.extraSshArgs)?o.extraSshArgs.join(` `):""}),W(!!o.passwordStored),X(!1),ae(null)},[o]);const ne=A.useMemo(()=>n?n.source==="custom"&&typeof n.custom=="string"?n.custom:n.default??n.effective??"":"",[n]),me=n?l!==ne:!1,fe=(n==null?void 0:n.source)==="custom"?"Benutzerdefiniert":"Standard",[ie,ge]=A.useState([]),[de,Oe]=A.useState(!0),[Me,Ce]=A.useState(""),[_e,Ee]=A.useState(!1),[Ke,Ze]=A.useState(null),[dt,at]=A.useState(null),nt=A.useRef(null),[He,ue]=A.useState(null),[be,Se]=A.useState(!0),[Re,ve]=A.useState(""),[Pe,it]=A.useState(!1),[vt,ft]=A.useState(null),ee=A.useRef(null),he=A.useCallback(async({silent:we=!1}={})=>{if(ee.current)return ee.current;const Ve=(async()=>{var ze,Je;we?it(!0):Se(!0),ve("");try{const zt=(await jt.get("/api/maintenance/portainer-status")).data??{};ue(zt),ft(new Date)}catch(pt){const zt=((Je=(ze=pt.response)==null?void 0:ze.data)==null?void 0:Je.error)||pt.message||"Fehler beim Prüfen des Portainer-Status";ve(zt),e({variant:"error",title:"Statusaktualisierung fehlgeschlagen",description:zt})}finally{we?it(!1):Se(!1),ee.current=null}})();return ee.current=Ve,Ve},[e]),Te=A.useCallback(async({silent:we=!1}={})=>{if(T||d){ge([]),Ce("Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert."),Oe(!1),Ee(!1);return}if(nt.current)return nt.current;const Ve=(async()=>{var ze,Je,pt;we?Ee(!0):Oe(!0),Ce("");try{const Rt=(await jt.get("/api/maintenance/duplicates")).data,Nr=Array.isArray(Rt)?Rt:(Rt==null?void 0:Rt.items)??[];ge(Nr),at(new Date)}catch(zt){if(((ze=zt.response)==null?void 0:ze.status)===423){const Rt="Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert.";ge([]),Ce(Rt),e({variant:"warning",title:"Duplikat-Verwaltung gesperrt",description:Rt})}else{const Rt=((pt=(Je=zt.response)==null?void 0:Je.data)==null?void 0:pt.error)||zt.message||"Fehler beim Laden der Wartungsdaten";Ce(Rt),e({variant:"error",title:"Duplikate konnten nicht geladen werden",description:Rt})}}finally{we?Ee(!1):Oe(!1),nt.current=null}})();return nt.current=Ve,Ve},[T,d,e]);A.useEffect(()=>{he()},[he]),A.useEffect(()=>{Te()},[Te]);const We=A.useMemo(()=>{const we=Array.isArray(ie)?ie.length:0,Ve=Array.isArray(ie)?ie.reduce((ze,Je)=>{var pt;return ze+(((pt=Je==null?void 0:Je.duplicates)==null?void 0:pt.length)||0)},0):0;return{groups:we,duplicateCount:Ve}},[ie]),ct=A.useCallback((we,Ve)=>{D(ze=>({...ze,[we]:Ve})),we==="password"&&W(!1)},[]),lt=A.useMemo(()=>{const we={host:j.host.trim(),port:Number.parseInt(j.port,10)||22,username:j.username.trim(),extraSshArgs:(j.extraSshArgs||"").split(/\r?\n/).map(ze=>ze.trim()).filter(Boolean)},Ve=j.password??"";return Ve?we.password=Ve:F||(we.password=""),we},[j,F]),qe=A.useCallback(async()=>{var we,Ve;if(n)try{h(!0),await g(l),e({variant:"success",title:"Skript gespeichert",description:"Das benutzerdefinierte Portainer-Update-Skript wurde aktualisiert."})}catch(ze){const Je=((Ve=(we=ze.response)==null?void 0:we.data)==null?void 0:Ve.error)||ze.message||"Skript konnte nicht gespeichert werden";e({variant:"error",title:"Speichern fehlgeschlagen",description:Je})}finally{h(!1)}},[g,l,n,e]),mt=A.useCallback(async()=>{var we,Ve;try{h(!0),await v(),e({variant:"info",title:"Standardskript wiederhergestellt",description:"Es wird wieder das Standard-Update-Skript verwendet."})}catch(ze){const Je=((Ve=(we=ze.response)==null?void 0:we.data)==null?void 0:Ve.error)||ze.message||"Standardskript konnte nicht wiederhergestellt werden";e({variant:"error",title:"Zurücksetzen fehlgeschlagen",description:Je})}finally{h(!1)}},[v,e]),Ot=A.useCallback(async()=>{var we,Ve;try{B(!0),await _(lt),ae(null),X(!1),e({variant:"success",title:"SSH-Konfiguration gespeichert",description:"Verbindungseinstellungen wurden aktualisiert."})}catch(ze){const Je=((Ve=(we=ze.response)==null?void 0:we.data)==null?void 0:Ve.error)||ze.message||"SSH-Konfiguration konnte nicht gespeichert werden";e({variant:"error",title:"Speichern fehlgeschlagen",description:Je})}finally{B(!1)}},[lt,_,e]),Rr=A.useCallback(async()=>{var we,Ve;try{K(!0);const ze=await C(lt);ae({success:!0,timestamp:new Date,details:ze==null?void 0:ze.result}),e({variant:"success",title:"SSH-Verbindung erfolgreich",description:"Verbindung zum Portainer-Host wurde hergestellt."})}catch(ze){const Je=((Ve=(we=ze.response)==null?void 0:we.data)==null?void 0:Ve.error)||ze.message||"SSH-Verbindung fehlgeschlagen";ae({success:!1,timestamp:new Date,error:Je}),e({variant:"error",title:"SSH-Test fehlgeschlagen",description:Je})}finally{K(!1)}},[lt,C,e]),ao=A.useCallback(async()=>{var we,Ve;try{oe(!0),await O(),D(Up()),W(!1),X(!1),ae(null),e({variant:"info",title:"SSH-Konfiguration gelöscht",description:"Die Verbindungseinstellungen wurden zurückgesetzt."})}catch(ze){const Je=((Ve=(we=ze.response)==null?void 0:we.data)==null?void 0:Ve.error)||ze.message||"SSH-Konfiguration konnte nicht gelöscht werden";e({variant:"error",title:"Löschen fehlgeschlagen",description:Je})}finally{oe(!1)}},[O,e]),io=A.useCallback(async we=>{var Ve,ze;if(!(a||P)&&we!==T){if(d){e({variant:"warning",title:"Aktion nicht möglich",description:"Während eines laufenden Updates kann der Wartungsmodus nicht geändert werden."});return}N(!0);try{const Je=we&&!!b,pt={active:we};Je&&x?pt.message=x:pt.message=null,await c(pt),e({variant:we?"info":"success",title:we?"Wartungsmodus aktiviert":"Wartungsmodus deaktiviert",description:we?"Benutzer sehen jetzt die Wartungsseite.":"StackPulse steht wieder zur Verfügung."})}catch(Je){const pt=((ze=(Ve=Je.response)==null?void 0:Ve.data)==null?void 0:ze.error)||Je.message||"Wartungsmodus konnte nicht geändert werden";e({variant:"error",title:"Änderung fehlgeschlagen",description:pt})}finally{N(!1)}}},[a,P,T,d,c,x,b,e]),tr=A.useCallback(async()=>{var Ve,ze;if(T||d){e({variant:"warning",title:"Update nicht möglich",description:"Während eines aktiven Wartungsmodus kann kein weiteres Update gestartet werden."});return}const we=(He==null?void 0:He.latestVersion)??(He==null?void 0:He.currentVersion)??"unbekannt";if(!(typeof window<"u"&&!window.confirm(`Portainer-Update starten? Zielversion: ${we}. Während des Updates befindet sich StackPulse im Wartungsmodus. Fortfahren?`)))try{k(""),w(!0),await p(),e({variant:"info",title:"Update gestartet",description:"Das Portainer-Update wurde gestartet."})}catch(Je){const pt=((ze=(Ve=Je.response)==null?void 0:Ve.data)==null?void 0:ze.error)||Je.message||"Portainer-Update konnte nicht gestartet werden";k(pt),e({variant:"error",title:"Update fehlgeschlagen",description:pt})}finally{w(!1)}},[T,d,He,p,e]),lo=A.useCallback(async we=>{var pt,zt,Rt,Nr;if(!we)return;if(T||d){e({variant:"warning",title:"Aktion nicht möglich",description:"Während des Wartungsmodus sind Bereinigungen deaktiviert."});return}const Ve=(pt=we.canonical)==null?void 0:pt.Id;if(!Ve)return;const ze=(we.duplicates||[]).map(Yt=>Yt.Id).filter(Boolean);if(!ze.length)return;const Je=((zt=we.canonical)==null?void 0:zt.Name)||we.name||`Stack ${Ve}`;if(!(typeof window<"u"&&!window.confirm(`Bereinigung für "${Je}" starten? Es werden ${ze.length} Duplikate entfernt: ${ze.join(", ")}`))){Ze(String(Ve));try{const $r=(await jt.post("/api/maintenance/duplicates/cleanup",{canonicalId:Ve,duplicateIds:ze})).data??{};if($r.success===!1)throw new Error($r.error||"Bereinigung fehlgeschlagen");const ta=Array.isArray($r.results)?$r.results.filter(ln=>ln.status==="deleted").map(ln=>ln.id):ze;e({variant:"success",title:"Bereinigung abgeschlossen",description:`${Je} – entfernte IDs: ${ta.join(", ")}`}),await Te({silent:!0})}catch(Yt){const $r=((Nr=(Rt=Yt.response)==null?void 0:Rt.data)==null?void 0:Nr.error)||Yt.message||"Bereinigung fehlgeschlagen";e({variant:"error",title:"Bereinigung fehlgeschlagen",description:$r})}finally{Ze(null)}}},[Te,T,e,d]);t!=null&&t.activatedAt&&ua(t.activatedAt),t!=null&&t.updatedAt&&ua(t.updatedAt);const Hr=T||d,so=(r==null?void 0:r.status)??(d?"running":"idle"),Pn=kz[so]??so,Zo=Sl[so]??Sl.idle,yr=r!=null&&r.stage?Ez[r.stage]??r.stage:"–",Bn=(r==null?void 0:r.logs)??[],uo=(r==null?void 0:r.targetVersion)??"-",za=(r==null?void 0:r.resultVersion)??"-",co=r!=null&&r.startedAt?ua(r.startedAt):"-",Ur=r!=null&&r.finishedAt?ua(r.finishedAt):"-",Ba=(r==null?void 0:r.message)??(d?"Update läuft…":""),ea=d||s||a;return I.jsxs("div",{className:"mt-12 mb-8 flex flex-col gap-12",children:[(T||d)&&I.jsx("div",{className:"rounded-lg border border-cyan-500/60 bg-cyan-900/30 px-4 py-3 text-sm text-bluegray-100",children:I.jsxs("div",{className:"flex flex-col gap-1",children:[I.jsxs("span",{children:["Wartungsmodus aktiv",x?` – ${x}`:d?" – Portainer-Update läuft":"","."]}),d&&I.jsxs("span",{className:"text-xs text-indigo-900",children:["Phase: ",yr]})]})}),I.jsxs(pe.Card,{children:[I.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:I.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:I.jsx("span",{children:"Wartungsmodus"})})}),I.jsxs(pe.CardBody,{className:"flex flex-col gap-4 p-4",children:[I.jsxs("div",{className:"flex items-start justify-between gap-4",children:[I.jsx("div",{className:"space-y-1",children:I.jsx("p",{className:"text-sm antialiased font-sans text-sm font-light leading-normal text-inherit",children:"Schaltet StackPulse für Benutzer in den Wartungsmodus."})}),I.jsx(pe.Switch,{checked:T,disabled:P||a||d,onChange:we=>io(we.target.checked),ripple:!1,color:"amber"})]}),P&&I.jsx("p",{className:"text-xs text-stormGrey-500",children:"Wartungsmodus wird aktualisiert…"})]})]}),I.jsxs(pe.Card,{children:[I.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:I.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:I.jsx("span",{children:"Portainer"})})}),I.jsxs(pe.CardBody,{className:"flex flex-col gap-4 p-4 pt-0",children:[I.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[I.jsxs("div",{children:[I.jsx("h2",{className:"block antialiased font-sans text-lg font-semibold",children:"Portainer Status"}),I.jsx("p",{className:"block antialiased font-sans text-sm font-light leading-normal text-inherit",children:be?"Status wird geprüft…":Re||(d?"Portainer wird aktuell aktualisiert.":(He==null?void 0:He.updateAvailable)===!0?"Es ist ein Update für Portainer verfügbar.":"Portainer ist auf dem aktuellen Stand.")}),vt&&!be&&I.jsxs("p",{className:"mt-1 text-xs text-stormGrey-500 block antialiased font-sans",children:["Stand: ",vt.toLocaleString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})]})]}),I.jsx("div",{className:"flex items-center gap-3",children:I.jsx(pe.Button,{onClick:()=>he({silent:!1}),disabled:be||Pe,className:"w-full",children:"Status aktualisieren"})})]}),I.jsx("div",{className:"flex flex-col gap-4 mt-5 space-y-4 block antialiased font-sans text-sm font-light leading-normal text-inherit",children:!be&&!Re&&He&&I.jsxs("div",{className:"",children:[I.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[I.jsx("span",{children:"Installierte Version"}),I.jsx("span",{className:"font-medium",children:He.currentVersion??"Unbekannt"})]}),I.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[I.jsx("span",{children:"Neueste Version"}),I.jsx("span",{className:"font-medium",children:He.latestVersion??"Unbekannt"})]}),I.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[I.jsx("span",{children:"Status"}),I.jsx("span",{className:`rounded-full px-3 py-0.5 text-xs font-semibold ${He.updateAvailable===!0?Sl.error:He.updateAvailable===!1?Sl.success:Sl.idle}`,children:He.updateAvailable===!0?"Update verfügbar":He.updateAvailable===!1?"Aktuell":"Unbekannt"})]}),He.edition&&I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{className:"text-stormGrey-400",children:"Edition"}),I.jsx("span",{className:"font-medium",children:He.edition})]}),He.build&&I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{className:"text-stormGrey-400",children:"Build"}),I.jsx("span",{className:"font-medium",children:He.build})]}),((fo=He.errors)==null?void 0:fo.latestVersion)&&I.jsxs("div",{className:"rounded-md mt-8 border bg-sunsetCoral-600 text-white px-3 py-2 text-xs",children:["Neueste Version konnte nicht ermittelt werden: ",He.errors.latestVersion]}),((po=He.errors)==null?void 0:po.container)&&I.jsxs("div",{className:"rounded-md mt-8 border bg-sunsetCoral-600 text-white px-3 py-2 text-xs",children:["Container-Details konnten nicht ermittelt werden: ",He.errors.container]})]})}),I.jsxs("div",{className:"mt-6 grid gap-6 lg:grid-cols-2 xl:grid-cols-3",children:[I.jsxs("div",{className:"rounded-md border border-gray-700/20 p-4",children:[I.jsx("div",{className:"flex items-center justify-between",children:I.jsx("h3",{className:"text-sm font-semibold",children:"SSH-Verbindung"})}),I.jsxs("div",{className:"mt-3 grid gap-3 text-sm",children:[I.jsxs("label",{className:"grid gap-1",children:[I.jsx("span",{className:"text-xs uppercase tracking-wide",children:"Host"}),I.jsx("input",{type:"text",value:j.host,onChange:we=>ct("host",we.target.value),disabled:U||H||Q||d,className:"w-full rounded-md border border-gray-700 bg-gray-950/70 px-3 py-2 text-sm focus:border-purple-500 focus:outline-none"})]}),I.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[I.jsxs("label",{className:"grid gap-1",children:[I.jsx("span",{className:"text-xs uppercase tracking-wide ",children:"Port"}),I.jsx("input",{type:"number",min:"1",value:j.port,onChange:we=>ct("port",we.target.value),disabled:U||H||Q||d,className:"w-full rounded-md border border-gray-700 bg-gray-950/70 px-3 py-2 text-sm focus:border-purple-500 focus:outline-none"})]}),I.jsxs("label",{className:"grid gap-1",children:[I.jsx("span",{className:"text-xs uppercase tracking-wide ",children:"Benutzer"}),I.jsx("input",{type:"text",value:j.username,onChange:we=>ct("username",we.target.value),disabled:U||H||Q||d,className:"w-full rounded-md border border-gray-700 bg-gray-950/70 px-3 py-2 text-sm focus:border-purple-500 focus:outline-none"})]})]}),I.jsxs("div",{className:"grid gap-1",children:[I.jsxs("div",{className:"flex items-center justify-between text-xs uppercase tracking-wide ",children:[I.jsx("label",{htmlFor:"maintenance-ssh-password",className:"cursor-pointer",children:"Passwort"}),I.jsx("button",{type:"button",onClick:()=>X(we=>!we),disabled:U||H||Q||d,className:"text-[11px] font-medium text-blue-500 transition hover:text-blue-800 disabled:opacity-50",children:G?"Verbergen":"Anzeigen"})]}),I.jsx("input",{id:"maintenance-ssh-password",type:G?"text":"password",value:j.password,onChange:we=>ct("password",we.target.value),disabled:U||H||Q||d,className:"w-full rounded-md border border-gray-700 bg-gray-950/70 px-3 py-2 text-sm focus:border-purple-500 focus:outline-none",placeholder:"Passwort für den SSH-Benutzer",autoComplete:"off",spellCheck:!1}),F&&!j.password&&I.jsx("span",{className:"text-[11px] ",children:"Ein Passwort ist gespeichert. Neuer Inhalt ersetzt es oder lösche die Konfiguration unten."})]}),I.jsxs("label",{className:"grid gap-1",children:[I.jsx("span",{className:"text-xs uppercase tracking-wide ",children:"Weitere SSH-Argumente"}),I.jsx("textarea",{rows:3,value:j.extraSshArgs,onChange:we=>ct("extraSshArgs",we.target.value),disabled:U||H||Q||d,className:"w-full rounded-md border border-gray-700 bg-gray-950/70 px-3 py-2 font-mono text-[11px] focus:border-purple-500 focus:outline-none",placeholder:"je Zeile ein Argument (optional)"})]})]}),I.jsxs("div",{className:"mt-4 grid gap-2",children:[I.jsx(pe.Button,{onClick:Ot,disabled:U||H||Q||d,className:"mt-3 w-full",children:U?"Speichern…":"SSH-Konfiguration speichern"}),I.jsx(pe.Button,{onClick:Rr,disabled:U||H||Q||d,className:"w-full bg-arcticBlue-500 hover:bg-arcticBlue-600",children:H?"Test läuft…":"Verbindung testen"}),I.jsx(pe.Button,{onClick:ao,disabled:U||H||Q||d,className:"w-full hover:bg-sunsetCoral-600 bg-sunsetCoral-500",children:Q?"Löschen…":"SSH-Einstellungen löschen"})]}),se&&I.jsx("p",{className:`mt-3 text-xs ${se.success?"text-mossGreen-600":"text-sunsetCoral-500"}`,children:se.success?"SSH-Verbindung erfolgreich.":`SSH-Verbindung fehlgeschlagen: ${se.error}`})]}),I.jsxs("div",{className:"rounded-md border border-gray-700/20 p-4",children:[I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("h3",{className:"text-sm font-semibold",children:"Update-Skript"}),I.jsxs("span",{className:"text-xs",children:["Quelle: ",fe]})]}),I.jsx("textarea",{value:l,onChange:we=>u(we.target.value),rows:10,disabled:s||d,className:"mt-3 w-full rounded-md border border-gray-700/20 px-3 py-2 font-mono text-xs focus:border-purple-500 focus:outline-none"}),I.jsxs("div",{className:"mt-3 grid gap-2",children:[I.jsx(pe.Button,{onClick:qe,disabled:!me||s||d,className:"mt-3 w-full",children:"Speichern"}),I.jsx(pe.Button,{color:"purple",onClick:mt,disabled:!n||n.source!=="custom"||s||d,className:"w-full hover:bg-sunsetCoral-600 bg-sunsetCoral-500",children:"Standard wiederherstellen"})]}),(n==null?void 0:n.customUpdatedAt)&&I.jsxs("p",{className:"mt-2 text-xs text-stormGrey-500",children:["Zuletzt geändert: ",ua(n.customUpdatedAt)]})]}),I.jsxs("div",{className:"rounded-md border border-gray-700/20 p-4",children:[I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("h3",{className:"text-sm font-semibold",children:"Update-Status"}),I.jsx("span",{className:`rounded-full px-3 py-0.5 text-xs font-semibold ${Zo}`,children:Pn})]}),I.jsxs("div",{className:"mt-3 grid gap-2 text-xs",children:[I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{children:"Phase"}),I.jsx("span",{className:"font-medium",children:yr})]}),I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{children:"Ziel-Version"}),I.jsx("span",{className:"font-medium",children:uo})]}),I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{children:"Installierte Version"}),I.jsx("span",{className:"font-medium",children:za})]}),I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{children:"Gestartet"}),I.jsx("span",{children:co})]}),I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{children:"Beendet"}),I.jsx("span",{children:Ur})]}),Ba&&I.jsx("div",{className:"rounded-md border border-mossGreen-700 bg-mossGreen-800 px-3 py-2 text-xs text-white",children:Ba}),(r==null?void 0:r.error)&&I.jsx("div",{className:"rounded-md border border-sunsetCoral-500/60 bg-sunsetCoral-900/40 px-3 py-2 text-xs text-white",children:r.error}),E&&I.jsx("div",{className:"rounded-md border border-sunsetCoral-500/60 bg-sunsetCoral-900/40 px-3 py-2 text-xs text-white",children:E})]}),I.jsx("div",{className:"mt-3 h-40 overflow-y-auto rounded-md border border-gray-700/20 bg-gray-950/70 p-3 font-mono text-[11px] leading-relaxed",children:Bn.length===0?I.jsx("p",{className:"text-stormGrey-500",children:"Noch keine Protokolle vorhanden."}):Bn.map((we,Ve)=>I.jsxs("div",{className:"mb-2 last:mb-0",children:[I.jsxs("span",{className:"text-gray-500",children:["[",Nz(we.timestamp),"]"]})," ",I.jsx("span",{className:(Rz[we.level]??"text-stormGrey-300")+" whitespace-normal break-words",style:{overflowWrap:"anywhere",wordBreak:"normal"},children:we.message})]},`${we.timestamp}-${Ve}`))}),I.jsx(pe.Button,{onClick:tr,disabled:ea||m,className:"mt-3 w-full",children:m?"Update wird gestartet…":"Portainer aktualisieren"})]})]})]})]}),I.jsxs(pe.Card,{children:[I.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:I.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:I.jsx("span",{children:"Doppelte Stacks"})})}),I.jsxs(pe.CardBody,{className:"flex flex-col gap-4 p-4",children:[I.jsx("div",{className:"rounded-lg border border-warmAmberGlow-600 bg-warmAmberGlow-700 px-4 py-3 text-sm text-white",children:"Das Entfernen von deppelten Stacks ist noch nicht getestet. Bitte nicht in Produktivumgebungen einsetzen."}),I.jsxs("div",{className:"flex items-start justify-between gap-4",children:[I.jsxs("div",{className:"space-y-1",children:[I.jsx("p",{className:"text-sm antialiased font-sans text-sm font-light leading-normal text-inherit",children:Hr?"Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert.":de?"Analyse läuft…":We.groups===0?"Keine Duplikate gefunden":`${We.groups} Stack-Namen mit insgesamt ${We.duplicateCount} Duplikaten gefunden`}),dt&&!de&&!Hr&&I.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Stand: ",dt.toLocaleString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})]})]}),I.jsx(pe.Button,{onClick:()=>Te({silent:!1}),disabled:Hr||de||_e||Ke!==null,className:"",children:"Aktualisieren"}),Me&&!Hr&&I.jsx("div",{className:"rounded-lg border border-sunsetCoral-500/60 bg-sunsetCoral-900/40 px-4 py-3 text-sm text-white",children:Me})]}),de?I.jsx("div",{className:"flex flex-col gap-4 p-4",children:"Daten werden geladen…"}):We.groups===0||Hr?I.jsx("div",{className:"rounded-xl border-mossGreen-500/80 bg-mossGreen-900/90 text-mossGreen-100 p-8 text-center text-sm text-white",children:Hr?"Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert.":"Es wurden keine doppelten Stacks gefunden."}):I.jsx("div",{className:"space-y-5",children:ie.map(we=>{var pt,zt,Rt,Nr;const Ve=(pt=we==null?void 0:we.canonical)==null?void 0:pt.Id,ze=(we==null?void 0:we.duplicates)||[],Je=Ke===String(Ve);return I.jsxs("div",{className:"rounded-xl border border-gray-700 bg-gray-800/70 p-6 shadow",children:[I.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[I.jsxs("div",{className:"space-y-1",children:[I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx("h3",{className:"text-lg font-semibold text-white",children:we.name}),I.jsxs("span",{className:"rounded-full bg-amber-500/20 px-3 py-0.5 text-xs font-medium text-amber-200",children:[ze.length," Duplikat",ze.length===1?"":"e"]})]}),I.jsxs("p",{className:"text-sm text-gray-300",children:["Behaltener Stack: ID ",Ve," (Endpoint ",((zt=we==null?void 0:we.canonical)==null?void 0:zt.EndpointId)??"-",")"]}),I.jsxs("p",{className:"text-xs text-gray-500",children:["Typ: ",wx((Rt=we==null?void 0:we.canonical)==null?void 0:Rt.Type)," • Erstellt: ",ua((Nr=we==null?void 0:we.canonical)==null?void 0:Nr.Created)]})]}),I.jsx("button",{type:"button",onClick:()=>lo(we),disabled:Hr||Je||_e||de,className:"self-start rounded-lg bg-sunsetCoral-500 px-4 py-2 text-sm font-semibold text-white transition hover:bg-sunsetCoral-600 disabled:opacity-50",children:Je?"Bereinigung läuft…":`Bereinigen (${ze.length})`})]}),I.jsx("div",{className:"mt-5 grid gap-3",children:ze.map(Yt=>I.jsx("div",{className:"rounded-lg border border-sunsetCoral-500/40 bg-sunsetCoral-900/20 p-4 text-sm text-white",children:I.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[I.jsxs("span",{className:"font-semibold text-white",children:["ID: ",Yt.Id]}),I.jsxs("span",{children:["Endpoint: ",Yt.EndpointId??"-"]}),I.jsxs("span",{children:["Typ: ",wx(Yt.Type)]}),I.jsxs("span",{children:["Erstellt: ",ua(Yt.Created)]})]})},Yt.Id))})]},Ve||we.name)})})]})]})]})}const Ml=Ln.forwardRef(({value:e,onClick:t,onKeyDown:r,...n},o)=>{const{setOpen:a}=pe.useSelect(),i=A.useCallback(()=>{(typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame:v=>setTimeout(v,0))(()=>{a(!0)})},[a]),c=A.useCallback(g=>{typeof t=="function"&&t(g),i()},[t,i]),p=A.useCallback(g=>{typeof r=="function"&&r(g),(g.key==="Enter"||g.key===" ")&&i()},[r,i]);return I.jsx(pe.Option,{...n,value:e,ref:o,onClick:c,onKeyDown:p})});Ml.displayName="StickyOption";const Az={success:"text-mossGreen-500",warning:"text-warmAmberGlow-500",error:"text-sunsetCoral-500",started:"text-arcticBlue-500"},Mz=e=>{if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString("de-DE",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})},xx=e=>{if(e)return e.replace("T"," ")},_x="redeployLogFilters",xr="__all__",Mu="- Alle -",$p={Einzeln:"Einzeln",Alle:"Alle",Auswahl:"Auswahl",single:"Einzeln",all:"Alle",selection:"Auswahl"},Iz=e=>!!(e.stacks&&e.stacks.length||e.statuses&&e.statuses.length||e.endpoints&&e.endpoints.length||e.redeployTypes&&e.redeployTypes.length||e.message&&e.message.trim()||e.from&&e.from.trim()||e.to&&e.to.trim());function Dz(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[o,a]=A.useState(""),[i,c]=A.useState(!1),[p,g]=A.useState([]),[v,_]=A.useState([]),[O,C]=A.useState([]),[T,x]=A.useState([]),[b,d]=A.useState([]),[l,u]=A.useState([]),[s,h]=A.useState([]),[m,w]=A.useState([]),[E,k]=A.useState(""),[P,N]=A.useState(""),[j,D]=A.useState(""),[F,W]=A.useState(!1),[G,X]=A.useState(!1),[U,B]=A.useState(!1),[H,K]=A.useState(0),{page:Q,perPage:oe,perPageOptions:se,setPage:ae,setPerPage:ne,setTotals:me,handlePerPageChange:fe,validPerPageValues:ie,resetPagination:ge}=Hb(),de=A.useCallback(()=>{},[]);A.useEffect(()=>()=>ge(),[ge]);const Oe=A.useCallback(ee=>{const he=Array.isArray(ee)?ee:(ee==null?void 0:ee.items)??[],Te=new Map,We=new Set,ct=new Set,lt=new Set;he.forEach(qe=>{if(qe.stackId){const mt=String(qe.stackId),Ot=qe.stackName||`Stack ${mt}`;Te.set(mt,Ot)}qe.status&&We.add(qe.status),qe.endpoint!==null&&qe.endpoint!==void 0&&qe.endpoint!==""&&ct.add(String(qe.endpoint)),qe.redeployType&<.add(qe.redeployType)}),g(Array.from(Te.entries()).map(([qe,mt])=>({value:qe,label:mt})).sort((qe,mt)=>qe.label.localeCompare(mt.label))),_(Array.from(We).sort()),C(Array.from(ct).sort((qe,mt)=>qe.localeCompare(mt,void 0,{numeric:!0}))),x(Array.from(lt).sort()),B(!0)},[]),Me=A.useMemo(()=>{const ee=new Map;return p.forEach(he=>{ee.set(he.value,he.label)}),ee},[p]);A.useEffect(()=>{U&&d(ee=>{const he=ee.filter(Te=>p.some(We=>We.value===Te));return he.length===ee.length?ee:he})},[U,p]),A.useEffect(()=>{U&&u(ee=>{const he=ee.filter(Te=>v.includes(Te));return he.length===ee.length?ee:he})},[U,v]),A.useEffect(()=>{U&&h(ee=>{const he=ee.filter(Te=>O.includes(Te));return he.length===ee.length?ee:he})},[U,O]),A.useEffect(()=>{U&&w(ee=>{const he=ee.filter(Te=>T.includes(Te));return he.length===ee.length?ee:he})},[U,T]),A.useEffect(()=>{if(typeof window>"u"){X(!0);return}try{const ee=window.localStorage.getItem(_x);if(ee){const he=JSON.parse(ee),Te=(he==null?void 0:he.filters)??he??{},We=(he==null?void 0:he.pagination)??{};d(Te.stacks||[]),u(Te.statuses||[]),h(Te.endpoints||[]),w(Te.redeployTypes||[]),k(Te.message||""),N(Te.from||""),D(Te.to||""),W(Iz(Te));const ct=We.perPage;if(ct!==void 0){const qe=String(ct);ie.has(qe)&&ne(qe,{resetPage:!1})}const lt=We.page;typeof lt=="number"&<>0&&ae(lt)}}catch(ee){console.error("❌ Fehler beim Laden der gespeicherten Log-Filter:",ee)}finally{X(!0)}},[ae,ne,ie]);const Ce=A.useCallback(()=>{const ee={};b.length&&(ee.stackIds=b.join(",")),l.length&&(ee.statuses=l.join(",")),s.length&&(ee.endpoints=s.join(",")),m.length&&(ee.redeployTypes=m.join(",")),E.trim()&&(ee.message=E.trim());const he=xx(P);he&&(ee.from=he);const Te=xx(j);return Te&&(ee.to=Te),ee},[b,l,s,m,E,P,j]);A.useEffect(()=>{if(!G)return;let ee=!1;return jt.get("/api/logs",{params:{perPage:"all",page:1}}).then(he=>{ee||Oe(he.data)}).catch(he=>{ee||console.error("⚠️ Konnte Filteroptionen nicht aktualisieren:",he)}),()=>{ee=!0}},[G,Oe,H]);const _e=A.useMemo(()=>({stacks:b,statuses:l,endpoints:s,redeployTypes:m,message:E,from:P,to:j}),[b,l,s,m,E,P,j]);A.useEffect(()=>{if(!G)return;const ee={...Ce()};oe==="all"?(ee.perPage="all",ee.page=1):(ee.perPage=oe,ee.page=Q);let he=!1;return n(!0),a(""),jt.get("/api/logs",{params:ee}).then(Te=>{if(he)return;const We=Te.data||{},ct=Array.isArray(We)?We:We.items??[],lt=Array.isArray(We)?ct.length:We.total??ct.length;if(t(ct),me(lt,ct.length),oe==="all")Q!==1&&ae(1);else{const qe=Math.max(1,Math.ceil((lt||0)/Number(oe))),mt=Math.min(Math.max(Q,1),qe);mt!==Q&&ae(mt)}}).catch(Te=>{he||(console.error("❌ Fehler beim Laden der Logs:",Te),a("Fehler beim Laden der Redeploy-Logs"))}).finally(()=>{he||n(!1)}),()=>{he=!0}},[G,Ce,Oe,H,oe,Q,me]),A.useEffect(()=>{if(G&&!(typeof window>"u"))try{window.localStorage.setItem(_x,JSON.stringify({filters:_e,pagination:{perPage:oe,page:Q}}))}catch(ee){console.error("⚠️ Konnte Filter nicht speichern:",ee)}},[G,_e,oe,Q]);const Ee=A.useCallback(ee=>he=>{var ct;if(typeof he=="string"){const lt=he;if(lt==="")return;ee(qe=>lt===xr?[]:qe.includes(lt)?qe.filter(mt=>mt!==lt):[...qe,lt]),ae(1);return}const Te=(ct=he==null?void 0:he.target)==null?void 0:ct.selectedOptions;if(!Te)return;const We=Array.from(Te).map(lt=>lt.value);We.includes(xr)?ee([]):ee(We),ae(1)},[ae]),Ke=A.useMemo(()=>Ee(d),[Ee,d]),Ze=A.useMemo(()=>Ee(u),[Ee,u]),dt=A.useMemo(()=>Ee(w),[Ee,w]),at=A.useMemo(()=>Ee(h),[Ee,h]),nt=(ee,he)=>{ee(Te=>Te.filter(We=>We!==he)),ae(1)},He=()=>{d([]),u([]),h([]),w([]),k(""),N(""),D(""),W(!1),ae(1)},ue=()=>{W(ee=>!ee)},be=A.useMemo(()=>{const ee=p.filter(he=>he.value!==xr);return[{value:xr,label:Mu},...ee]},[p]),Se=A.useMemo(()=>{const ee=v.filter(he=>he!==xr).map(he=>({value:he,label:he}));return[{value:xr,label:Mu},...ee]},[v]),Re=A.useMemo(()=>{const ee=O.filter(he=>he!==xr).map(he=>({value:he,label:he}));return[{value:xr,label:Mu},...ee]},[O]),ve=A.useMemo(()=>{const ee=T.filter(he=>he!==xr).map(he=>({value:he,label:$p[he]??he}));return[{value:xr,label:Mu},...ee]},[T]),Pe=A.useMemo(()=>{let ee=0;return b.length&&(ee+=b.length),l.length&&(ee+=l.length),s.length&&(ee+=s.length),m.length&&(ee+=m.length),E.trim()&&(ee+=1),P&&(ee+=1),j&&(ee+=1),ee},[b,l,s,E,P,j]),it=async ee=>{if(window.confirm("Diesen Log-Eintrag dauerhaft löschen?")){c(!0),a("");try{await jt.delete(`/api/logs/${ee}`),K(he=>he+1)}catch(he){console.error("❌ Fehler beim Löschen des Logs:",he),a("Fehler beim Löschen des Redeploy-Logs")}finally{c(!1)}}},vt=async()=>{if(e.length&&window.confirm("Alle angezeigten Logs (entsprechend Filter) löschen?")){c(!0),a("");try{const ee={...Ce(),ids:e.map(he=>he.id).join(",")};await jt.delete("/api/logs",{params:ee}),K(he=>he+1)}catch(ee){console.error("❌ Fehler beim Löschen der gefilterten Logs:",ee),a("Fehler beim Löschen der gefilterten Logs")}finally{c(!1)}}},ft=async ee=>{c(!0),a("");try{const he=await jt.get("/api/logs/export",{params:{...Ce(),format:ee},responseType:"blob"}),Te=he.headers["content-type"]||(ee==="sql"?"application/sql":"text/plain"),ct=(he.headers["content-disposition"]||"").match(/filename="?([^";]+)"?/i),lt=(ct==null?void 0:ct[1])||`redeploy-logs.${ee}`,qe=new Blob([he.data],{type:Te}),mt=window.URL.createObjectURL(qe),Ot=document.createElement("a");Ot.href=mt,Ot.download=lt,document.body.appendChild(Ot),Ot.click(),Ot.remove(),window.URL.revokeObjectURL(mt)}catch(he){console.error("❌ Fehler beim Export der Logs:",he),a("Fehler beim Export der Redeploy-Logs")}finally{c(!1)}};return Ln.useState(!1),I.jsxs("div",{className:"mt-12 mb-8 flex flex-col gap-12",children:[I.jsxs(pe.Card,{children:[I.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"p-4 pt-2 pb-2",children:I.jsx(pe.Typography,{variant:"h6",color:"white",children:I.jsxs("button",{onClick:ue,className:"flex w-full items-center justify-between",children:[I.jsxs("span",{className:"flex items-center gap-2",children:[I.jsx("span",{children:"Filter und Optionen"}),Pe>0&&I.jsxs("span",{className:"rounded-full bg-blue-gray-500/80 px-2 py-0.5 text-xs text-white",children:[Pe," aktiv"]})]}),I.jsx("span",{className:"text-xs uppercase tracking-wide text-gray-400",children:F?"Ausblenden":"Anzeigen"})]})})}),I.jsx(pe.CardBody,{children:F&&I.jsxs("div",{children:[I.jsxs("div",{className:"flex flex-wrap gap-2",children:[I.jsx(pe.Button,{onClick:()=>ft("txt"),disabled:i||r,className:"w-full md:flex-1",children:"Export TXT"}),I.jsx(pe.Button,{onClick:()=>ft("sql"),disabled:i||r,className:"w-full md:flex-1",children:"Export SQL"}),I.jsx(pe.Button,{onClick:vt,disabled:i||r||e.length===0,className:"w-full md:flex-1 bg-sunsetCoral-500 hover:bg-sunsetCoral-600",children:"Angezeigte löschen"})]}),I.jsxs("div",{className:"flex flex-wrap gap-2 mt-10",children:[I.jsxs("div",{className:"grid gap-4 flex-1",children:[I.jsx(pe.Select,{multiple:!0,onChange:de,className:"text-stormGrey-500",variant:"static",dismiss:{itemPress:!1},label:"Stacks",children:be.map(({value:ee,label:he})=>I.jsx(Ml,{value:ee,onClick:()=>Ke(ee),onKeyDown:Te=>{(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),Ke(ee))},className:`text-black-600 ${ee===xr?"font-semibold text-black-800":""}`,children:he},ee))}),I.jsx("div",{className:"mt-2 mb-2 min-h-[1.5rem] text-xs text-stormGrey-400",children:b.length===0?I.jsx("span",{className:"rounded-full bg-stormGrey-700/60 px-2 py-0.5 text-white ",children:"Alle Stacks"}):I.jsx("span",{children:b.map(ee=>I.jsx("button",{type:"button",onClick:()=>nt(d,ee),className:"rounded-full bg-lavenderSmoke-600/80 px-2 py-0.5 text-white transition hover:bg-lavenderSmoke-600/90 focus:outline-none focus:ring-2 focus:ring-lavenderSmoke-400 cursor-pointer",title:"Filter entfernen",children:Me.get(ee)??`Stack ${ee}`},ee))})})]}),I.jsxs("div",{className:"grid gap-4 flex-1",children:[I.jsx(pe.Select,{multiple:!0,onChange:de,className:"text-stormGrey-500",variant:"static",dismiss:{itemPress:!1},label:"Status",children:Se.map(({value:ee,label:he})=>I.jsx(Ml,{value:ee,onClick:()=>Ze(ee),onKeyDown:Te=>{(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),Ze(ee))},className:`text-black-600 ${ee===xr?"font-semibold text-black-800":""}`,children:he},ee))}),I.jsx("div",{className:"mt-2 mb-2 min-h-[1.5rem] text-xs text-stormGrey-400",children:l.length===0?I.jsx("span",{className:"rounded-full bg-stormGrey-700/60 px-2 py-0.5 text-white",children:"Alle Status"}):I.jsx("span",{children:l.map(ee=>I.jsx("button",{type:"button",onClick:()=>nt(u,ee),className:"rounded-full bg-copperRust-600/80 px-2 py-0.5 text-white transition hover:bg-copperRust-600/90 focus:outline-none focus:ring-2 focus:ring-copperRust-400 cursor-pointer",title:"Filter entfernen",children:ee},ee))})})]}),I.jsxs("div",{className:"grid gap-4 flex-1",children:[I.jsx(pe.Select,{multiple:!0,onChange:de,className:"text-stormGrey-500",variant:"static",dismiss:{itemPress:!1},label:"Redeploy-Typ",children:ve.map(({value:ee,label:he})=>I.jsx(Ml,{value:ee,onClick:()=>dt(ee),onKeyDown:Te=>{(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),dt(ee))},className:`text-black-600 ${ee===xr?"font-semibold text-black-800":""}`,children:he},ee))}),I.jsx("div",{className:"mt-2 mb-2 min-h-[1.5rem] text-xs text-stormGrey-400",children:m.length===0?I.jsx("span",{className:"rounded-full bg-stormGrey-700/60 px-2 py-0.5 text-white",children:"Alle Typen"}):I.jsx("span",{children:m.map(ee=>I.jsx("button",{type:"button",onClick:()=>nt(w,ee),className:"rounded-full bg-citrusPunch-600/80 px-2 py-0.5 text-white transition hover:bg-citrusPunch-600/90 focus:outline-none focus:ring-2 focus:ring-citrusPunch-400 cursor-pointer",title:"Filter entfernen",children:$p[ee]??ee},ee))})})]}),I.jsxs("div",{className:"grid gap-4 flex-1",children:[I.jsx(pe.Select,{multiple:!0,onChange:de,className:"text-stormGrey-500",variant:"static",dismiss:{itemPress:!1},label:"Endpoints",children:Re.map(({value:ee,label:he})=>I.jsx(Ml,{value:ee,onClick:()=>at(ee),onKeyDown:Te=>{(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),at(ee))},className:`text-black-600 ${ee===xr?"font-semibold text-black-800":""}`,children:he},ee))}),I.jsx("div",{className:"mt-2 mb-2 min-h-[1.5rem] text-xs text-stormGrey-400",children:s.length===0?I.jsx("span",{className:"rounded-full bg-stormGrey-700/60 px-2 py-0.5 text-white",children:"Alle Endpoints"}):I.jsx("span",{children:s.map(ee=>I.jsxs("button",{type:"button",onClick:()=>nt(h,ee),className:"rounded-full bg-emeraldMist-500/80 px-2 py-0.5 text-white transition hover:bg-emeraldMist-500/90 focus:outline-none focus:ring-2 focus:ring-emeraldMist-400 cursor-pointer",title:"Filter entfernen",children:["Endpoint ",ee]},ee))})})]})]}),I.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between mt-8",children:[I.jsx("div",{className:"md:flex-1",children:I.jsx(pe.Input,{value:E,onChange:ee=>{k(ee.target.value),ae(1)},variant:"static",label:"Nachricht (Freitext)",placeholder:"Suche"})}),I.jsx("div",{className:"md:mt-0 mt-8 md:flex-1",children:I.jsx(pe.Select,{variant:"static",label:"Einträge pro Seite",onChange:de,value:oe,children:se.map(({value:ee,label:he})=>I.jsx(pe.Option,{value:ee,onClick:()=>fe(ee),children:he},ee))})})]}),I.jsxs("div",{className:"flex flex-col md:flex-row flex-wrap gap-4 mt-8",children:[I.jsx("div",{className:"flex-1",children:I.jsx(pe.Input,{type:"datetime-local",variant:"static",label:"Von",value:P,onChange:ee=>{N(ee.target.value),ae(1)},className:"w-full"})}),I.jsx("div",{className:"flex-1",children:I.jsx(pe.Input,{type:"datetime-local",variant:"static",label:"Bis",value:j,onChange:ee=>{D(ee.target.value),ae(1)},className:"w-full"})}),I.jsx("div",{className:"flex-1",children:I.jsx(pe.Button,{onClick:He,disabled:i||r,className:"w-full",children:"Zurücksetzen"})})]})]})})]}),I.jsxs(pe.Card,{children:[I.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:I.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:I.jsx("span",{children:"Logs"})})}),I.jsx(pe.CardBody,{className:"overflow-x-scroll px-0 pt-0 pb-2",children:I.jsxs("table",{className:"w-full min-w-[640px] table-auto",children:[I.jsx("thead",{children:I.jsx("tr",{children:["Zeitpunkt","Stack","Art","Status","Nachricht","Endpoint","Aktionen"].map(ee=>I.jsx("th",{className:"border-b border-stormGrey-50 py-3 px-5 text-left",children:I.jsx(pe.Typography,{variant:"small",className:"text-[11px] font-bold uppercase text-stormGrey-400",children:ee})},ee))})}),I.jsx("tbody",{children:e.map(ee=>{const he=Az[ee.status]||"text-blue-300",Te="py-3 px-5",We=ee.stackName||"Unbekannt",ct=We!=="---"&&ee.stackId!==void 0&&ee.stackId!==null,lt=ee.redeployType?$p[ee.redeployType]??ee.redeployType:"---";return I.jsxs("tr",{children:[I.jsx("td",{className:Te,children:I.jsx(pe.Typography,{variant:"small",className:"mb-1 block text-xs font-medium text-stormGrey-600",children:Mz(ee.timestamp)})}),I.jsx("td",{className:Te,children:I.jsxs("div",{className:"flex flex-col",children:[I.jsx("span",{className:"font-medium",children:We}),I.jsx(pe.Typography,{variant:"small",children:ct&&I.jsxs("span",{className:"text-xs text-stormGrey-400",children:["ID: ",ee.stackId]})})]})}),I.jsx("td",{className:Te,children:I.jsx(pe.Typography,{variant:"small",children:lt})}),I.jsx("td",{className:Te,children:I.jsx(pe.Typography,{variant:"small",className:`font-semibold ${he}`,children:ee.status})}),I.jsx("td",{className:Te,children:I.jsx(pe.Typography,{variant:"small",children:ee.message||"-"})}),I.jsx("td",{className:Te,children:I.jsx(pe.Typography,{variant:"small",children:ee.endpoint??"-"})}),I.jsx("td",{className:Te,children:I.jsx(pe.Typography,{variant:"small",children:I.jsx("button",{onClick:()=>it(ee.id),disabled:i,className:"rounded-md border border-sunsetCoral-600 px-3 py-1 text-xs text-sunsetCoral-800 transition hover:bg-sunsetCoral-600/20 disabled:opacity-60",children:"Löschen"})})})]},ee.id)})})]})})]}),I.jsx(Ek,{disabled:i})]})}const qp={className:"w-5 h-5 text-inherit"},Sh=[{layout:"dashboard",pages:[{icon:I.jsx(_M,{...qp}),name:"stacks",path:"/stacks",element:I.jsx(Pz,{})},{icon:I.jsx(PM,{...qp}),name:"maintenance",path:"/maintenance",element:I.jsx(jz,{})},{icon:I.jsx(yM,{...qp}),name:"logs",path:"/logs",element:I.jsx(Dz,{})}]}];function Rk(){const[e,t]=Xd(),{sidenavType:r}=e;return I.jsxs("div",{className:"min-h-screen bg-blue-gray-50/50",children:[I.jsx(Qd,{routes:Sh,brandImg:r==="dark"?"/img/logo-ct.png":"/img/logo-ct-dark.png"}),I.jsxs("div",{className:"p-4 xl:ml-80",children:[I.jsx(FP,{}),I.jsx(VP,{}),I.jsx(pe.IconButton,{size:"lg",color:"white",className:"fixed bottom-8 right-8 z-40 rounded-full shadow-blue-gray-900/10",ripple:!1,onClick:()=>Rb(t,!0),children:I.jsx(G1,{className:"h-5 w-5"})}),I.jsx(Og,{children:Sh.map(({layout:n,pages:o})=>n==="dashboard"&&o.map(({path:a,element:i})=>I.jsx(mi,{exact:!0,path:a,element:i})))}),I.jsx("div",{className:"text-blue-gray-600",children:I.jsx(zP,{})})]})]})}Rk.displayName="/src/layout/dashboard.jsx";function Nk(){return I.jsx("div",{className:"relative min-h-screen w-full",children:I.jsx(Og,{children:Sh.map(({layout:e,pages:t})=>e==="auth"&&t.map(({path:r,element:n})=>I.jsx(mi,{exact:!0,path:r,element:n})))})})}Nk.displayName="/src/layout/Auth.jsx";function Lz(){return I.jsxs(Og,{children:[I.jsx(mi,{path:"/dashboard/*",element:I.jsx(Rk,{})}),I.jsx(mi,{path:"/auth/*",element:I.jsx(Nk,{})}),I.jsx(mi,{path:"*",element:I.jsx(zA,{to:"/dashboard/stacks",replace:!0})})]})}Gp.createRoot(document.getElementById("root")).render(I.jsx(Ln.StrictMode,{children:I.jsx(KA,{children:I.jsx(mz,{children:I.jsx(bz,{children:I.jsx(xz,{children:I.jsx(pe.ThemeProvider,{children:I.jsx(Eb,{children:I.jsx(Lz,{})})})})})})})}));