function I1(e,t){for(var n=0;nr[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Bl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ym(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bm={exports:{}},sa={},xm={exports:{}},q={};/** * @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 ci=Symbol.for("react.element"),F1=Symbol.for("react.portal"),V1=Symbol.for("react.fragment"),B1=Symbol.for("react.strict_mode"),z1=Symbol.for("react.profiler"),U1=Symbol.for("react.provider"),W1=Symbol.for("react.context"),H1=Symbol.for("react.forward_ref"),K1=Symbol.for("react.suspense"),G1=Symbol.for("react.memo"),Q1=Symbol.for("react.lazy"),df=Symbol.iterator;function X1(e){return e===null||typeof e!="object"?null:(e=df&&e[df]||e["@@iterator"],typeof e=="function"?e:null)}var wm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sm=Object.assign,Pm={};function Yr(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||wm}Yr.prototype.isReactComponent={};Yr.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")};Yr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cm(){}Cm.prototype=Yr.prototype;function Pc(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||wm}var Cc=Pc.prototype=new Cm;Cc.constructor=Pc;Sm(Cc,Yr.prototype);Cc.isPureReactComponent=!0;var ff=Array.isArray,Em=Object.prototype.hasOwnProperty,Ec={current:null},Tm={key:!0,ref:!0,__self:!0,__source:!0};function km(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Em.call(t,r)&&!Tm.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,E=_[w];if(0>>1;wo(H,I))Wo(G,H)?(_[w]=G,_[W]=I,w=W):(_[w]=H,_[V]=I,w=V);else if(Wo(G,I))_[w]=G,_[W]=I,w=W;else break e}}return A}function o(_,A){var I=_.sortIndex-A.sortIndex;return I!==0?I:_.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,p=!1,m=!1,v=!1,P=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(_){for(var A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=_)r(u),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(u)}}function S(_){if(v=!1,g(_),!m)if(n(l)!==null)m=!0,J(C);else{var A=n(u);A!==null&&ie(S,A.startTime-_)}}function C(_,A){m=!1,v&&(v=!1,b(x),x=-1),p=!0;var I=f;try{for(g(A),d=n(l);d!==null&&(!(d.expirationTime>A)||_&&!M());){var w=d.callback;if(typeof w=="function"){d.callback=null,f=d.priorityLevel;var E=w(d.expirationTime<=A);A=e.unstable_now(),typeof E=="function"?d.callback=E:d===n(l)&&r(l),g(A)}else r(l);d=n(l)}if(d!==null)var j=!0;else{var V=n(u);V!==null&&ie(S,V.startTime-A),j=!1}return j}finally{d=null,f=I,p=!1}}var T=!1,k=null,x=-1,$=5,F=-1;function M(){return!(e.unstable_now()-F<$)}function z(){if(k!==null){var _=e.unstable_now();F=_;var A=!0;try{A=k(!0,_)}finally{A?L():(T=!1,k=null)}}else T=!1}var L;if(typeof h=="function")L=function(){h(z)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,U=O.port2;O.port1.onmessage=z,L=function(){U.postMessage(null)}}else L=function(){P(z,0)};function J(_){k=_,T||(T=!0,L())}function ie(_,A){x=P(function(){_(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,J(C))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(_){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var I=f;f=A;try{return _()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,A){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var I=f;f=_;try{return A()}finally{f=I}},e.unstable_scheduleCallback=function(_,A,I){var w=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0w?(_.sortIndex=I,t(u,_),n(l)===null&&_===n(u)&&(v?(b(x),x=-1):v=!0,ie(S,I-w))):(_.sortIndex=E,t(l,_),m||p||(m=!0,J(C))),_},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(_){var A=f;return function(){var I=f;f=A;try{return _.apply(this,arguments)}finally{f=I}}}})(Mm);Nm.exports=Mm;var ab=Nm.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 Lm=y,st=ab;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ul=Object.prototype.hasOwnProperty,lb=/^[: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]*$/,hf={},mf={};function ub(e){return Ul.call(mf,e)?!0:Ul.call(hf,e)?!1:lb.test(e)?mf[e]=!0:(hf[e]=!0,!1)}function cb(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function db(e,t,n,r){if(t===null||typeof t>"u"||cb(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Ge(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new Ge(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){De[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var kc=/[\-:]([a-z])/g;function Rc(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(kc,Rc);De[t]=new Ge(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(kc,Rc);De[t]=new Ge(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(kc,Rc);De[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function $c(e,t,n,r){var o=De.hasOwnProperty(t)?De[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Wa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xo(e):""}function fb(e){switch(e.tag){case 5:return xo(e.type);case 16:return xo("Lazy");case 13:return xo("Suspense");case 19:return xo("SuspenseList");case 0:case 2:case 15:return e=Ha(e.type,!1),e;case 11:return e=Ha(e.type.render,!1),e;case 1:return e=Ha(e.type,!0),e;default:return""}}function Gl(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 gr:return"Fragment";case mr:return"Portal";case Wl:return"Profiler";case Nc:return"StrictMode";case Hl:return"Suspense";case Kl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _m:return(e.displayName||"Context")+".Consumer";case Om:return(e._context.displayName||"Context")+".Provider";case Mc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lc:return t=e.displayName||null,t!==null?t:Gl(e.type)||"Memo";case on:t=e._payload,e=e._init;try{return Gl(e(t))}catch{}}return null}function pb(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 Gl(t);case 8:return t===Nc?"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 En(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hb(e){var t=jm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ei(e){e._valueTracker||(e._valueTracker=hb(e))}function Im(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vs(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 Ql(e,t){var n=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=En(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fm(e,t){t=t.checked,t!=null&&$c(e,"checked",t,!1)}function Xl(e,t){Fm(e,t);var n=En(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Yl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yl(e,t.type,En(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Yl(e,t,n){(t!=="number"||vs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wo=Array.isArray;function Ar(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Ti.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ro={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},mb=["Webkit","ms","Moz","O"];Object.keys(Ro).forEach(function(e){mb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ro[t]=Ro[e]})});function Um(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ro.hasOwnProperty(e)&&Ro[e]?(""+t).trim():t+"px"}function Wm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Um(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var gb=be({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 Zl(e,t){if(t){if(gb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function eu(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 tu=null;function Ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nu=null,Or=null,_r=null;function wf(e){if(e=pi(e)){if(typeof nu!="function")throw Error(D(280));var t=e.stateNode;t&&(t=da(t),nu(e.stateNode,e.type,t))}}function Hm(e){Or?_r?_r.push(e):_r=[e]:Or=e}function Km(){if(Or){var e=Or,t=_r;if(_r=Or=null,wf(e),t)for(e=0;e>>=0,e===0?32:31-(kb(e)/Rb|0)|0}var ki=64,Ri=4194304;function So(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 ws(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=So(a):(i&=s,i!==0&&(r=So(i)))}else s=n&~o,s!==0?r=So(s):i!==0&&(r=So(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function di(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=n}function Lb(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=No),Nf=String.fromCharCode(32),Mf=!1;function fg(e,t){switch(e){case"keyup":return sx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vr=!1;function lx(e,t){switch(e){case"compositionend":return pg(t);case"keypress":return t.which!==32?null:(Mf=!0,Nf);case"textInput":return e=t.data,e===Nf&&Mf?null:e;default:return null}}function ux(e,t){if(vr)return e==="compositionend"||!Bc&&fg(e,t)?(e=cg(),Zi=Ic=cn=null,vr=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_f(n)}}function vg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yg(){for(var e=window,t=vs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vs(e.document)}return t}function zc(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 yx(e){var t=yg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vg(n.ownerDocument.documentElement,n)){if(r!==null&&zc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Df(n,i);var s=Df(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,yr=null,lu=null,Lo=null,uu=!1;function jf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uu||yr==null||yr!==vs(r)||(r=yr,"selectionStart"in r&&zc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Lo&&Qo(Lo,r)||(Lo=r,r=Cs(lu,"onSelect"),0wr||(e.current=mu[wr],mu[wr]=null,wr--)}function se(e,t){wr++,mu[wr]=e.current,e.current=t}var Tn={},ze=Nn(Tn),Ye=Nn(!1),Qn=Tn;function Vr(e,t){var n=e.type.contextTypes;if(!n)return Tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function Ts(){ce(Ye),ce(ze)}function Wf(e,t,n){if(ze.current!==Tn)throw Error(D(168));se(ze,t),se(Ye,n)}function kg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,pb(e)||"Unknown",o));return be({},n,r)}function ks(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tn,Qn=ze.current,se(ze,e),se(Ye,Ye.current),!0}function Hf(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=kg(e,t,Qn),r.__reactInternalMemoizedMergedChildContext=e,ce(Ye),ce(ze),se(ze,e)):ce(Ye),se(Ye,n)}var Ft=null,fa=!1,il=!1;function Rg(e){Ft===null?Ft=[e]:Ft.push(e)}function Nx(e){fa=!0,Rg(e)}function Mn(){if(!il&&Ft!==null){il=!0;var e=0,t=oe;try{var n=Ft;for(oe=1;e>=s,o-=s,Vt=1<<32-Ct(t)+o|n<x?($=k,k=null):$=k.sibling;var F=f(b,k,g[x],S);if(F===null){k===null&&(k=$);break}e&&k&&F.alternate===null&&t(b,k),h=i(F,h,x),T===null?C=F:T.sibling=F,T=F,k=$}if(x===g.length)return n(b,k),fe&&Dn(b,x),C;if(k===null){for(;xx?($=k,k=null):$=k.sibling;var M=f(b,k,F.value,S);if(M===null){k===null&&(k=$);break}e&&k&&M.alternate===null&&t(b,k),h=i(M,h,x),T===null?C=M:T.sibling=M,T=M,k=$}if(F.done)return n(b,k),fe&&Dn(b,x),C;if(k===null){for(;!F.done;x++,F=g.next())F=d(b,F.value,S),F!==null&&(h=i(F,h,x),T===null?C=F:T.sibling=F,T=F);return fe&&Dn(b,x),C}for(k=r(b,k);!F.done;x++,F=g.next())F=p(k,b,x,F.value,S),F!==null&&(e&&F.alternate!==null&&k.delete(F.key===null?x:F.key),h=i(F,h,x),T===null?C=F:T.sibling=F,T=F);return e&&k.forEach(function(z){return t(b,z)}),fe&&Dn(b,x),C}function P(b,h,g,S){if(typeof g=="object"&&g!==null&&g.type===gr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Ci:e:{for(var C=g.key,T=h;T!==null;){if(T.key===C){if(C=g.type,C===gr){if(T.tag===7){n(b,T.sibling),h=o(T,g.props.children),h.return=b,b=h;break e}}else if(T.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===on&&Jf(C)===T.type){n(b,T.sibling),h=o(T,g.props),h.ref=co(b,T,g),h.return=b,b=h;break e}n(b,T);break}else t(b,T);T=T.sibling}g.type===gr?(h=Gn(g.props.children,b.mode,S,g.key),h.return=b,b=h):(S=as(g.type,g.key,g.props,null,b.mode,S),S.ref=co(b,h,g),S.return=b,b=S)}return s(b);case mr:e:{for(T=g.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(b,h.sibling),h=o(h,g.children||[]),h.return=b,b=h;break e}else{n(b,h);break}else t(b,h);h=h.sibling}h=pl(g,b.mode,S),h.return=b,b=h}return s(b);case on:return T=g._init,P(b,h,T(g._payload),S)}if(wo(g))return m(b,h,g,S);if(io(g))return v(b,h,g,S);_i(b,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(b,h.sibling),h=o(h,g),h.return=b,b=h):(n(b,h),h=fl(g,b.mode,S),h.return=b,b=h),s(b)):n(b,h)}return P}var zr=Dg(!0),jg=Dg(!1),hi={},Ot=Nn(hi),Jo=Nn(hi),Zo=Nn(hi);function zn(e){if(e===hi)throw Error(D(174));return e}function qc(e,t){switch(se(Zo,t),se(Jo,e),se(Ot,hi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jl(t,e)}ce(Ot),se(Ot,t)}function Ur(){ce(Ot),ce(Jo),ce(Zo)}function Ig(e){zn(Zo.current);var t=zn(Ot.current),n=Jl(t,e.type);t!==n&&(se(Jo,e),se(Ot,n))}function Jc(e){Jo.current===e&&(ce(Ot),ce(Jo))}var ge=Nn(0);function As(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 sl=[];function Zc(){for(var e=0;en?n:4,e(!0);var r=al.transition;al.transition={};try{e(!1),t()}finally{oe=n,al.transition=r}}function ev(){return yt().memoizedState}function Ox(e,t,n){var r=xn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tv(e))nv(t,n);else if(n=Lg(e,t,n,r),n!==null){var o=He();Et(n,e,r,o),rv(n,t,r)}}function _x(e,t,n){var r=xn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tv(e))nv(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Tt(a,s)){var l=t.interleaved;l===null?(o.next=o,Xc(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Lg(e,t,o,r),n!==null&&(o=He(),Et(n,e,r,o),rv(n,t,r))}}function tv(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function nv(e,t){Ao=Os=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_c(e,n)}}var _s={readContext:vt,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},Dx={readContext:vt,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:ep,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rs(4194308,4,Xg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){return rs(4,2,e,t)},useMemo:function(e,t){var n=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ox.bind(null,ye,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:Zf,useDebugValue:od,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=Zf(!1),t=e[0];return e=Ax.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ye,o=Rt();if(fe){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),Ae===null)throw Error(D(349));Yn&30||Bg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,ep(Ug.bind(null,r,i,e),[e]),r.flags|=2048,ni(9,zg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Rt(),t=Ae.identifierPrefix;if(fe){var n=Bt,r=Vt;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ei++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Nt]=t,e[qo]=r,fv(e,t,!1,!1),t.stateNode=e;e:{switch(s=eu(n,r),n){case"dialog":ue("cancel",e),ue("close",e),o=r;break;case"iframe":case"object":case"embed":ue("load",e),o=r;break;case"video":case"audio":for(o=0;oHr&&(t.flags|=128,r=!0,fo(i,!1),t.lanes=4194304)}else{if(!r)if(e=As(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!fe)return Ie(t),null}else 2*Ce()-i.renderingStartTime>Hr&&n!==1073741824&&(t.flags|=128,r=!0,fo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ce(),t.sibling=null,n=ge.current,se(ge,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return cd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?rt&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function Wx(e,t){switch(Wc(t),t.tag){case 1:return qe(t.type)&&Ts(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ur(),ce(Ye),ce(ze),Zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jc(t),null;case 13:if(ce(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ge),null;case 4:return Ur(),null;case 10:return Qc(t.type._context),null;case 22:case 23:return cd(),null;case 24:return null;default:return null}}var ji=!1,Ve=!1,Hx=typeof WeakSet=="function"?WeakSet:Set,B=null;function Er(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function ku(e,t,n){try{n()}catch(r){xe(e,t,r)}}var up=!1;function Kx(e,t){if(cu=Ss,e=yg(),zc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(du={focusedElem:e,selectionRange:n},Ss=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,P=m.memoizedState,b=t.stateNode,h=b.getSnapshotBeforeUpdate(t.elementType===t.type?v:wt(t.type,v),P);b.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){xe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return m=up,up=!1,m}function Oo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ku(t,n,i)}o=o.next}while(o!==r)}}function ma(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ru(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function mv(e){var t=e.alternate;t!==null&&(e.alternate=null,mv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[qo],delete t[hu],delete t[Rx],delete t[$x])),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 gv(e){return e.tag===5||e.tag===3||e.tag===4}function cp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gv(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 $u(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Es));else if(r!==4&&(e=e.child,e!==null))for($u(e,t,n),e=e.sibling;e!==null;)$u(e,t,n),e=e.sibling}function Nu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nu(e,t,n),e=e.sibling;e!==null;)Nu(e,t,n),e=e.sibling}var Oe=null,St=!1;function en(e,t,n){for(n=n.child;n!==null;)vv(e,t,n),n=n.sibling}function vv(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(aa,n)}catch{}switch(n.tag){case 5:Ve||Er(n,t);case 6:var r=Oe,o=St;Oe=null,en(e,t,n),Oe=r,St=o,Oe!==null&&(St?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(St?(e=Oe,n=n.stateNode,e.nodeType===8?ol(e.parentNode,n):e.nodeType===1&&ol(e,n),Ko(e)):ol(Oe,n.stateNode));break;case 4:r=Oe,o=St,Oe=n.stateNode.containerInfo,St=!0,en(e,t,n),Oe=r,St=o;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&ku(n,t,s),o=o.next}while(o!==r)}en(e,t,n);break;case 1:if(!Ve&&(Er(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){xe(n,t,a)}en(e,t,n);break;case 21:en(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,en(e,t,n),Ve=r):en(e,t,n);break;default:en(e,t,n)}}function dp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hx),t.forEach(function(r){var o=tw.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Qx(r/1960))-r,10e?16:e,dn===null)var r=!1;else{if(e=dn,dn=null,Is=0,te&6)throw Error(D(331));var o=te;for(te|=4,B=e.current;B!==null;){var i=B,s=i.child;if(B.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lCe()-ld?Kn(e,0):ad|=n),Je(e,t)}function Ev(e,t){t===0&&(e.mode&1?(t=Ri,Ri<<=1,!(Ri&130023424)&&(Ri=4194304)):t=1);var n=He();e=Yt(e,t),e!==null&&(di(e,t,n),Je(e,n))}function ew(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ev(e,n)}function tw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Ev(e,n)}var Tv;Tv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xe=!1,zx(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,fe&&t.flags&1048576&&$g(t,$s,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;os(e,t),e=t.pendingProps;var o=Vr(t,ze.current);jr(t,n),o=td(null,t,r,e,o,n);var i=nd();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,qe(r)?(i=!0,ks(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Yc(t),o.updater=pa,t.stateNode=o,o._reactInternals=t,xu(t,r,e,n),t=Pu(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&Uc(t),We(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(os(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=rw(r),e=wt(r,e),o){case 0:t=Su(null,t,r,e,n);break e;case 1:t=sp(null,t,r,e,n);break e;case 11:t=op(null,t,r,e,n);break e;case 14:t=ip(null,t,r,wt(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:wt(r,o),Su(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:wt(r,o),sp(e,t,r,o,n);case 3:e:{if(uv(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ag(e,t),Ls(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Wr(Error(D(423)),t),t=ap(e,t,r,n,o);break e}else if(r!==o){o=Wr(Error(D(424)),t),t=ap(e,t,r,n,o);break e}else for(ot=vn(t.stateNode.containerInfo.firstChild),it=t,fe=!0,Pt=null,n=jg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===o){t=qt(e,t,n);break e}We(e,t,r,n)}t=t.child}return t;case 5:return Ig(t),e===null&&vu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,fu(r,o)?s=null:i!==null&&fu(r,i)&&(t.flags|=32),lv(e,t),We(e,t,s,n),t.child;case 6:return e===null&&vu(t),null;case 13:return cv(e,t,n);case 4:return qc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zr(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:wt(r,o),op(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,se(Ns,r._currentValue),r._currentValue=s,i!==null)if(Tt(i.value,s)){if(i.children===o.children&&!Ye.current){t=qt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Wt(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),yu(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(D(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),yu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,jr(t,n),o=vt(o),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return r=t.type,o=wt(r,t.pendingProps),o=wt(r.type,o),ip(e,t,r,o,n);case 15:return sv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:wt(r,o),os(e,t),t.tag=1,qe(r)?(e=!0,ks(t)):e=!1,jr(t,n),_g(t,r,o),xu(t,r,o,n),Pu(null,t,r,!0,e,n);case 19:return dv(e,t,n);case 22:return av(e,t,n)}throw Error(D(156,t.tag))};function kv(e,t){return Zm(e,t)}function nw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ht(e,t,n,r){return new nw(e,t,n,r)}function fd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rw(e){if(typeof e=="function")return fd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mc)return 11;if(e===Lc)return 14}return 2}function wn(e,t){var n=e.alternate;return n===null?(n=ht(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function as(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")fd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case gr:return Gn(n.children,o,i,t);case Nc:s=8,o|=8;break;case Wl:return e=ht(12,n,t,o|2),e.elementType=Wl,e.lanes=i,e;case Hl:return e=ht(13,n,t,o),e.elementType=Hl,e.lanes=i,e;case Kl:return e=ht(19,n,t,o),e.elementType=Kl,e.lanes=i,e;case Dm:return va(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Om:s=10;break e;case _m:s=9;break e;case Mc:s=11;break e;case Lc:s=14;break e;case on:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=ht(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Gn(e,t,n,r){return e=ht(7,e,r,t),e.lanes=n,e}function va(e,t,n,r){return e=ht(22,e,r,t),e.elementType=Dm,e.lanes=n,e.stateNode={isHidden:!1},e}function fl(e,t,n){return e=ht(6,e,null,t),e.lanes=n,e}function pl(e,t,n){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ow(e,t,n,r,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=Ga(0),this.expirationTimes=Ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ga(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function pd(e,t,n,r,o,i,s,a,l){return e=new ow(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ht(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yc(i),e}function iw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mv)}catch(e){console.error(e)}}Mv(),$m.exports=lt;var Lv=$m.exports;const cw=ym(Lv);var bp=Lv;zl.createRoot=bp.createRoot,zl.hydrateRoot=bp.hydrateRoot;const vd={prefix:String(Math.round(Math.random()*1e10)),current:0,isSSR:!1},yd=re.createContext(vd);let dw=!!(typeof window<"u"&&window.document&&window.document.createElement),hl=new WeakMap;function fw(e=!1){let t=y.useContext(yd),n=y.useRef(null);if(n.current===null&&!e){var r,o;let i=(r=re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||r===void 0||(o=r.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(i){let s=hl.get(i);s==null?hl.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==s.state&&(t.current=s.id,hl.delete(i))}n.current=++t.current}return n.current}function pw(e){let t=y.useContext(yd);t===vd&&!dw&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=fw(!!e);return e||`react-aria${t.prefix}-${n}`}function hw(e){let t=re.useId(),[n]=y.useState(bd()),r=n?"react-aria":`react-aria${vd.prefix}`;return e||`${r}-${t}`}const mw=typeof re.useId=="function"?hw:pw;function gw(){return!1}function vw(){return!0}function yw(e){return()=>{}}function bd(){return typeof re.useSyncExternalStore=="function"?re.useSyncExternalStore(yw,gw,vw):y.useContext(yd).isSSR}function xd(e,t,n){let[r,o]=y.useState(e||t),i=y.useRef(e!==void 0),s=e!==void 0;y.useEffect(()=>{let u=i.current;u!==s&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),i.current=s},[s]);let a=s?e:r,l=y.useCallback((u,...c)=>{let d=(f,...p)=>{n&&(Object.is(a,f)||n(f,...p)),s||(a=f)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((p,...m)=>{let v=u(s?a:p,...m);return d(v,...c),s?p:v})):(s||o(u),d(u,...c))},[s,a,n]);return[a,l]}function Av(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{};function xw(e){let[t,n]=y.useState(e),r=y.useRef(t),o=y.useRef(null),i=y.useCallback(()=>{let a=o.current.next();for(;!a.done&&r.current===a.value;)a=o.current.next();if(a.done){o.current=null;return}n(a.value),r.current=a.value},[n,r,o]);Ze(()=>{o.current&&i()});let s=y.useCallback(a=>{o.current=a(r.current),i()},[i,o,r]);return[t,s]}let Bs=new Map;function zs(e){let[t,n]=y.useState(e),r=y.useRef(null),o=mw(t),i=y.useCallback(s=>{r.current=s},[]);return Bs.set(o,i),Ze(()=>{let s=o;return()=>{Bs.delete(s)}},[o]),y.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),o}function ww(e,t){if(e===t)return e;let n=Bs.get(e);if(n)return n(t),t;let r=Bs.get(t);return r?(r(e),e):t}function xp(e=[]){let t=zs(),[n,r]=xw(t),o=y.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Ze(o,[t,o,...e]),n}function Sa(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function Se(...e){let t={...e[0]};for(let n=1;n=65&&o.charCodeAt(2)<=90?t[o]=Sa(i,s):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[o]=bw(i,s):o==="id"&&i&&s?t.id=ww(i,s):t[o]=s!==void 0?s:i}}return t}const Sw=new Set(["id"]),Pw=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Cw=/^(data-.*)$/;function wd(e,t={}){let{labelable:n,propNames:r}=t,o={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Sw.has(i)||n&&Pw.has(i)||r!=null&&r.has(i)||Cw.test(i))&&(o[i]=e[i]);return o}function kr(e){if(Ew())e.focus({preventScroll:!0});else{let t=Tw(e);e.focus(),kw(t)}}let Vi=null;function Ew(){if(Vi==null){Vi=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return Vi=!0,!0}})}catch{}}return Vi}function Tw(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"u")return;let e=n=>{let r=fr.get(n.target);r||(r=new Set,fr.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=fr.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),fr.delete(n.target)),fr.size===0)){for(let o of _u)o();_u.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?wp():document.addEventListener("DOMContentLoaded",wp));function Ov(e){requestAnimationFrame(()=>{fr.size===0?e():_u.add(e)})}function Rw(){let e=y.useRef(new Map),t=y.useCallback((o,i,s,a)=>{let l=a!=null&&a.once?(...u)=>{e.current.delete(s),s(...u)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,s,a)},[]),n=y.useCallback((o,i,s,a)=>{var l;let u=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,u,a),e.current.delete(s)},[]),r=y.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return y.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function $w(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=zs(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function Nw(){return typeof window.ResizeObserver<"u"}function Mw(e){const{ref:t,onResize:n}=e;y.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(Nw()){const o=new window.ResizeObserver(i=>{i.length&&n()});return o.observe(r),()=>{r&&o.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function _v(e,t){Ze(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}function Lw(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Sd(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Dv(){return Sd(/^Mac/i)}function Aw(){return Sd(/^iPhone/i)}function Ow(){return Sd(/^iPad/i)||Dv()&&navigator.maxTouchPoints>1}function jv(){return Aw()||Ow()}function _w(){return Lw(/Android/i)}function pr(e){const t=y.useRef(null);return Ze(()=>{t.current=e},[e]),y.useCallback((...n)=>{const r=t.current;return r(...n)},[])}function Du(e){return e.mozInputSource===0&&e.isTrusted?!0:_w()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Dw(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const jw=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Iw=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Iv(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script;return jw.has(n)}let t=e.split("-")[0];return Iw.has(t)}function Fv(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Iv(e)?"rtl":"ltr"}}let ju=Fv(),Co=new Set;function Sp(){ju=Fv();for(let e of Co)e(ju)}function Fw(){let e=bd(),[t,n]=y.useState(ju);return y.useEffect(()=>(Co.size===0&&window.addEventListener("languagechange",Sp),Co.add(n),()=>{Co.delete(n),Co.size===0&&window.removeEventListener("languagechange",Sp)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Vw=re.createContext(null);function Bw(e){let{locale:t,children:n}=e,r=Fw(),o=t?{locale:t,direction:Iv(t)?"rtl":"ltr"}:r;return re.createElement(Vw.Provider,{value:o},n)}var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r{Ov(()=>{Rr==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=Iu||""),Iu="",Rr="default")})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ls.has(e)){let t=ls.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ls.delete(e)}}const Bv=re.createContext(null);Bv.displayName="PressResponderContext";function Uw(e){let t=y.useContext(Bv);if(t){let{register:n,...r}=t;e=Se(r,e),n()}return _v(t,e.ref),e}function Pd(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,isDisabled:s,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...f}=Uw(e),[p,m]=y.useState(!1),v=y.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:P,removeAllGlobalListeners:b}=Rw(),h=pr((x,$)=>{let F=v.current;s||F.didFirePressStart||(r&&r({type:"pressstart",pointerType:$,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}),n&&n(!0),F.didFirePressStart=!0,m(!0))}),g=pr((x,$,F=!0)=>{let M=v.current;M.didFirePressStart&&(M.ignoreClickAfterPress=!0,M.didFirePressStart=!1,o&&o({type:"pressend",pointerType:$,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}),n&&n(!1),m(!1),t&&F&&!s&&t({type:"press",pointerType:$,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}))}),S=pr((x,$)=>{s||i&&i({type:"pressup",pointerType:$,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey})}),C=pr(x=>{let $=v.current;$.isPressed&&($.isOverTarget&&g(jt($.target,x),$.pointerType,!1),$.isPressed=!1,$.isOverTarget=!1,$.activePointerId=null,$.pointerType=null,b(),c||Bi($.target))}),T=pr(x=>{u&&C(x)}),k=y.useMemo(()=>{let x=v.current,$={onKeyDown(M){ml(M.nativeEvent,M.currentTarget)&&M.currentTarget.contains(M.target)?(Ep(M.target,M.key)&&M.preventDefault(),M.stopPropagation(),!x.isPressed&&!M.repeat&&(x.target=M.currentTarget,x.isPressed=!0,h(M,"keyboard"),P(document,"keyup",F,!1))):M.key==="Enter"&&Fu(M.currentTarget)&&M.stopPropagation()},onKeyUp(M){ml(M.nativeEvent,M.currentTarget)&&!M.repeat&&M.currentTarget.contains(M.target)&&S(jt(x.target,M),"keyboard")},onClick(M){M&&!M.currentTarget.contains(M.target)||M&&M.button===0&&(M.stopPropagation(),s&&M.preventDefault(),!x.ignoreClickAfterPress&&!x.ignoreEmulatedMouseEvents&&(x.pointerType==="virtual"||Du(M.nativeEvent))&&(!s&&!l&&kr(M.currentTarget),h(M,"virtual"),S(M,"virtual"),g(M,"virtual")),x.ignoreEmulatedMouseEvents=!1,x.ignoreClickAfterPress=!1)}},F=M=>{if(x.isPressed&&ml(M,x.target)){Ep(M.target,M.key)&&M.preventDefault(),M.stopPropagation(),x.isPressed=!1;let z=M.target;g(jt(x.target,M),"keyboard",x.target.contains(z)),b(),x.target instanceof HTMLElement&&x.target.contains(z)&&(Fu(x.target)||x.target.getAttribute("role")==="link")&&x.target.click()}};if(typeof PointerEvent<"u"){$.onPointerDown=O=>{if(!(O.button!==0||!O.currentTarget.contains(O.target))){if(Dw(O.nativeEvent)){x.pointerType="virtual";return}gl(O.currentTarget)&&O.preventDefault(),x.pointerType=O.pointerType,O.stopPropagation(),x.isPressed||(x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=O.pointerId,x.target=O.currentTarget,!s&&!l&&kr(O.currentTarget),c||Pp(x.target),h(O,x.pointerType),P(document,"pointermove",M,!1),P(document,"pointerup",z,!1),P(document,"pointercancel",L,!1))}},$.onMouseDown=O=>{O.currentTarget.contains(O.target)&&O.button===0&&(gl(O.currentTarget)&&O.preventDefault(),O.stopPropagation())},$.onPointerUp=O=>{!O.currentTarget.contains(O.target)||x.pointerType==="virtual"||O.button===0&&ar(O,O.currentTarget)&&S(O,x.pointerType||O.pointerType)};let M=O=>{O.pointerId===x.activePointerId&&(ar(O,x.target)?x.isOverTarget||(x.isOverTarget=!0,h(jt(x.target,O),x.pointerType)):x.isOverTarget&&(x.isOverTarget=!1,g(jt(x.target,O),x.pointerType,!1),T(O)))},z=O=>{O.pointerId===x.activePointerId&&x.isPressed&&O.button===0&&(ar(O,x.target)?g(jt(x.target,O),x.pointerType):x.isOverTarget&&g(jt(x.target,O),x.pointerType,!1),x.isPressed=!1,x.isOverTarget=!1,x.activePointerId=null,x.pointerType=null,b(),c||Bi(x.target))},L=O=>{C(O)};$.onDragStart=O=>{O.currentTarget.contains(O.target)&&C(O)}}else{$.onMouseDown=L=>{L.button!==0||!L.currentTarget.contains(L.target)||(gl(L.currentTarget)&&L.preventDefault(),L.stopPropagation(),!x.ignoreEmulatedMouseEvents&&(x.isPressed=!0,x.isOverTarget=!0,x.target=L.currentTarget,x.pointerType=Du(L.nativeEvent)?"virtual":"mouse",!s&&!l&&kr(L.currentTarget),h(L,x.pointerType),P(document,"mouseup",M,!1)))},$.onMouseEnter=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),x.isPressed&&!x.ignoreEmulatedMouseEvents&&(x.isOverTarget=!0,h(L,x.pointerType)))},$.onMouseLeave=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),x.isPressed&&!x.ignoreEmulatedMouseEvents&&(x.isOverTarget=!1,g(L,x.pointerType,!1),T(L)))},$.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!x.ignoreEmulatedMouseEvents&&L.button===0&&S(L,x.pointerType)};let M=L=>{if(L.button===0){if(x.isPressed=!1,b(),x.ignoreEmulatedMouseEvents){x.ignoreEmulatedMouseEvents=!1;return}ar(L,x.target)?g(jt(x.target,L),x.pointerType):x.isOverTarget&&g(jt(x.target,L),x.pointerType,!1),x.isOverTarget=!1}};$.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;L.stopPropagation();let O=Ww(L.nativeEvent);O&&(x.activePointerId=O.identifier,x.ignoreEmulatedMouseEvents=!0,x.isOverTarget=!0,x.isPressed=!0,x.target=L.currentTarget,x.pointerType="touch",!s&&!l&&kr(L.currentTarget),c||Pp(x.target),h(L,x.pointerType),P(window,"scroll",z,!0))},$.onTouchMove=L=>{if(!L.currentTarget.contains(L.target)||(L.stopPropagation(),!x.isPressed))return;let O=Cp(L.nativeEvent,x.activePointerId);O&&ar(O,L.currentTarget)?x.isOverTarget||(x.isOverTarget=!0,h(L,x.pointerType)):x.isOverTarget&&(x.isOverTarget=!1,g(L,x.pointerType,!1),T(L))},$.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target)||(L.stopPropagation(),!x.isPressed))return;let O=Cp(L.nativeEvent,x.activePointerId);O&&ar(O,L.currentTarget)?(S(L,x.pointerType),g(L,x.pointerType)):x.isOverTarget&&g(L,x.pointerType,!1),x.isPressed=!1,x.activePointerId=null,x.isOverTarget=!1,x.ignoreEmulatedMouseEvents=!0,c||Bi(x.target),b()},$.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),x.isPressed&&C(L))};let z=L=>{x.isPressed&&L.target.contains(x.target)&&C({currentTarget:x.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};$.onDragStart=L=>{L.currentTarget.contains(L.target)&&C(L)}}return $},[P,s,l,b,c,C,T,g,h,S]);return y.useEffect(()=>()=>{c||Bi(v.current.target)},[c]),{isPressed:a||p,pressProps:Se(f,k)}}function Fu(e){return e.tagName==="A"&&e.hasAttribute("href")}function ml(e,t){const{key:n,code:r}=e,o=t,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof HTMLInputElement&&!zv(o,n)||o instanceof HTMLTextAreaElement||o.isContentEditable)&&(!Fu(o)||i==="button"&&n!=="Enter")&&!(i==="link"&&n!=="Enter")}function Ww(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Cp(e,t){const n=e.changedTouches;for(let r=0;rt.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function ar(e,t){let n=t.getBoundingClientRect(),r=Hw(e);return Kw(n,r)}function gl(e){return!(e instanceof HTMLElement)||!e.draggable}function Ep(e,t){return e instanceof HTMLInputElement?!zv(e,t):e instanceof HTMLButtonElement?e.type!=="submit":!0}const Gw=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function zv(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Gw.has(e.type)}class Qw{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Uv(e){let t=y.useRef({isFocused:!1,observer:null});Ze(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=pr(r=>{e==null||e(r)});return y.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{t.current.isFocused=!1,o.disabled&&n(new Qw("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){t.current.observer.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Wv(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=y.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=Uv(i),a=y.useCallback(l=>{l.target===l.currentTarget&&document.activeElement===l.target&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let Zr=null,Vu=new Set,Tp=!1,Zn=!1,Bu=!1;const Xw={Tab:!0,Escape:!0};function Cd(e,t){for(let n of Vu)n(e,t)}function Yw(e){return!(e.metaKey||!Dv()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function kp(e){Zn=!0,Yw(e)&&(Zr="keyboard",Cd("keyboard",e))}function lr(e){Zr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Zn=!0,Cd("pointer",e))}function qw(e){Du(e)&&(Zn=!0,Zr="virtual")}function Jw(e){e.target===window||e.target===document||(!Zn&&!Bu&&(Zr="virtual",Cd("virtual",e)),Zn=!1,Bu=!1)}function Zw(){Zn=!1,Bu=!0}function zu(){if(typeof window>"u"||Tp)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Zn=!0,e.apply(this,arguments)},document.addEventListener("keydown",kp,!0),document.addEventListener("keyup",kp,!0),document.addEventListener("click",qw,!0),window.addEventListener("focus",Jw,!0),window.addEventListener("blur",Zw,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",lr,!0),document.addEventListener("pointermove",lr,!0),document.addEventListener("pointerup",lr,!0)):(document.addEventListener("mousedown",lr,!0),document.addEventListener("mousemove",lr,!0),document.addEventListener("mouseup",lr,!0)),Tp=!0}typeof document<"u"&&(document.readyState!=="loading"?zu():document.addEventListener("DOMContentLoaded",zu));function Hv(){return Zr!=="pointer"}function eS(){return Zr}function tS(e,t,n){return!(e&&t==="keyboard"&&n instanceof KeyboardEvent&&!Xw[n.key])}function nS(e,t,n){zu(),y.useEffect(()=>{let r=(o,i)=>{tS(n==null?void 0:n.isTextInput,o,i)&&e(Hv())};return Vu.add(r),()=>{Vu.delete(r)}},t)}function rS(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=y.useRef({isFocusWithin:!1}),s=y.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(u),o&&o(!1))},[n,o,i]),a=Uv(s),l=y.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[r,o,a]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Us=!1,vl=0;function Uu(){Us=!0,setTimeout(()=>{Us=!1},50)}function Rp(e){e.pointerType==="touch"&&Uu()}function oS(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Rp):document.addEventListener("touchend",Uu),vl++,()=>{vl--,!(vl>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Rp):document.removeEventListener("touchend",Uu))}}function Pa(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=y.useState(!1),a=y.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;y.useEffect(oS,[]);let{hoverProps:l,triggerHoverEnd:u}=y.useMemo(()=>{let c=(p,m)=>{if(a.pointerType=m,o||m==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let v=p.currentTarget;a.target=v,t&&t({type:"hoverstart",target:v,pointerType:m}),n&&n(!0),s(!0)},d=(p,m)=>{if(a.pointerType="",a.target=null,m==="touch"||!a.isHovered)return;a.isHovered=!1;let v=p.currentTarget;r&&r({type:"hoverend",target:v,pointerType:m}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=p=>{Us&&p.pointerType==="mouse"||c(p,p.pointerType)},f.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&d(p,p.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!Us&&c(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&d(p,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[t,n,r,o,a]);return y.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function $p(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function iS(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:$p(e.onKeyDown),onKeyUp:$p(e.onKeyUp)}}}function Kv(e){if(eS()==="virtual"){let t=document.activeElement;Ov(()=>{document.activeElement===t&&document.contains(e)&&kr(e)})}else kr(e)}function sS(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function aS(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Gv(e,t){return e.nodeName!=="#comment"&&sS(e)&&aS(e,t)&&(!e.parentElement||Gv(e.parentElement,e))}const Np=re.createContext(null);let de=null;function lS(e){let{children:t,contain:n,restoreFocus:r,autoFocus:o}=e,i=y.useRef(),s=y.useRef(),a=y.useRef([]),{parentNode:l}=y.useContext(Np)||{},u=y.useMemo(()=>new Hu({scopeRef:a}),[a]);Ze(()=>{let f=l||Pe.root;if(Pe.getTreeNode(f.scopeRef)&&de&&!Ws(de,f.scopeRef)){let p=Pe.getTreeNode(de);p&&(f=p)}f.addChild(u),Pe.addNode(u)},[u,l]),Ze(()=>{let f=Pe.getTreeNode(a);f.contain=n},[n]),Ze(()=>{let f=i.current.nextSibling,p=[];for(;f&&f!==s.current;)p.push(f),f=f.nextSibling;a.current=p},[t]),hS(a,r,n),fS(a,n),gS(a,r,n),pS(a,o),y.useEffect(()=>{if(a){let f=document.activeElement,p=null;if(Be(f,a.current)){for(let m of Pe.traverse())Be(f,m.scopeRef.current)&&(p=m);p===Pe.getTreeNode(a)&&(de=p.scopeRef)}return()=>{let m=Pe.getTreeNode(a).parent.scopeRef;(a===de||Ws(a,de))&&(!m||Pe.getTreeNode(m))&&(de=m),Pe.removeTreeNode(a)}}},[a]);let c=y.useMemo(()=>uS(a),[]),d=y.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return re.createElement(Np.Provider,{value:d},re.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,re.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function uS(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:s}=t,a=r||document.activeElement,l=n[0].previousElementSibling,u=fn(Un(n),{tabbable:o,accept:s},n);u.currentNode=Be(a,n)?a:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&zt(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:s}=t,a=r||document.activeElement,l=n[n.length-1].nextElementSibling,u=fn(Un(n),{tabbable:o,accept:s},n);u.currentNode=Be(a,n)?a:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&zt(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=fn(Un(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let s=i.nextNode();return s&&zt(s,!0),s},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=fn(Un(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let s=i.previousNode();return s&&zt(s,!0),s}}}const Ed=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],cS=Ed.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Ed.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const dS=Ed.join(':not([hidden]):not([tabindex="-1"]),');function Un(e){return e[0].parentElement}function Eo(e){let t=Pe.getTreeNode(de);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function fS(e,t){let n=y.useRef(),r=y.useRef(null);Ze(()=>{let o=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=null);return}let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Eo(e))return;let u=document.activeElement,c=e.current;if(!Be(u,c))return;let d=fn(Un(c),{tabbable:!0},c);d.currentNode=u;let f=l.shiftKey?d.previousNode():d.nextNode();f||(d.currentNode=l.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,f=l.shiftKey?d.previousNode():d.nextNode()),l.preventDefault(),f&&zt(f,!0)},s=l=>{(!de||Ws(de,e))&&Be(l.target,e.current)?(de=e,n.current=l.target):Eo(e)&&!Wu(l.target,e)?n.current?n.current.focus():de&&Hs(de.current):Eo(e)&&(n.current=l.target)},a=l=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{Eo(e)&&!Wu(document.activeElement,e)&&(de=e,document.body.contains(l.target)?(n.current=l.target,n.current.focus()):de&&Hs(de.current))})};return document.addEventListener("keydown",i,!1),document.addEventListener("focusin",s,!1),o.forEach(l=>l.addEventListener("focusin",s,!1)),o.forEach(l=>l.addEventListener("focusout",a,!1)),()=>{document.removeEventListener("keydown",i,!1),document.removeEventListener("focusin",s,!1),o.forEach(l=>l.removeEventListener("focusin",s,!1)),o.forEach(l=>l.removeEventListener("focusout",a,!1))}},[e,t]),Ze(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Qv(e){return Wu(e)}function Be(e,t){return t.some(n=>n.contains(e))}function Wu(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Pe.traverse(Pe.getTreeNode(t)))if(Be(e,n.current))return!0;return!1}function Ws(e,t){var n;let r=(n=Pe.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function zt(e,t=!1){if(e!=null&&!t)try{Kv(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function Hs(e,t=!0){let n=e[0].previousElementSibling,r=fn(Un(e),{tabbable:t},e);r.currentNode=n;let o=r.nextNode();t&&!o&&(r=fn(Un(e),{tabbable:!1},e),r.currentNode=n,o=r.nextNode()),zt(o)}function pS(e,t){const n=re.useRef(t);y.useEffect(()=>{n.current&&(de=e,Be(document.activeElement,de.current)||Hs(e.current)),n.current=!1},[e])}function hS(e,t,n){Ze(()=>{if(t||n)return;let r=e.current,o=i=>{let s=i.target;Be(s,e.current)?de=e:Qv(s)||(de=null)};return document.addEventListener("focusin",o,!1),r.forEach(i=>i.addEventListener("focusin",o,!1)),()=>{document.removeEventListener("focusin",o,!1),r.forEach(i=>i.removeEventListener("focusin",o,!1))}},[e,t,n])}function mS(e){let t=Pe.getTreeNode(de);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function gS(e,t,n){const r=y.useRef(typeof document<"u"?document.activeElement:null);Ze(()=>{let o=e.current;if(!t||n)return;let i=()=>{(!de||Ws(de,e))&&Be(document.activeElement,e.current)&&(de=e)};return document.addEventListener("focusin",i,!1),o.forEach(s=>s.addEventListener("focusin",i,!1)),()=>{document.removeEventListener("focusin",i,!1),o.forEach(s=>s.removeEventListener("focusin",i,!1))}},[e,n]),Ze(()=>{if(!t)return;Pe.getTreeNode(e).nodeToRestore=r.current;let o=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!Eo(e))return;let s=document.activeElement;if(!Be(s,e.current))return;let a=Pe.getTreeNode(e).nodeToRestore,l=fn(document.body,{tabbable:!0});l.currentNode=s;let u=i.shiftKey?l.previousNode():l.nextNode();if((!document.body.contains(a)||a===document.body)&&(a=null,Pe.getTreeNode(e).nodeToRestore=null),(!u||!Be(u,e.current))&&a){l.currentNode=a;do u=i.shiftKey?l.previousNode():l.nextNode();while(Be(u,e.current));i.preventDefault(),i.stopPropagation(),u?zt(u,!0):Qv(a)?zt(a,!0):s.blur()}};return n||document.addEventListener("keydown",o,!0),()=>{n||document.removeEventListener("keydown",o,!0);let i=Pe.getTreeNode(e).nodeToRestore;if(t&&i&&(Be(document.activeElement,e.current)||document.activeElement===document.body&&mS(e))){let s=Pe.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let a=s.getTreeNode(e);for(;a;){if(a.nodeToRestore&&document.body.contains(a.nodeToRestore)){zt(a.nodeToRestore);return}a=a.parent}for(a=s.getTreeNode(e);a;){if(a.scopeRef&&Pe.getTreeNode(a.scopeRef)){Hs(a.scopeRef.current,!0);return}a=a.parent}}})}}},[e,t,n])}function fn(e,t,n){let r=t!=null&&t.tabbable?dS:cS,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var s;return!(t==null||(s=t.from)===null||s===void 0)&&s.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Gv(i)&&(!n||Be(i,n))&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}class Td{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let o=this.fastMap.get(n??null),i=new Hu({scopeRef:t});o.addChild(i),i.parent=o,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t),r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef.current&&Be(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r.removeChild(n),o.size>0&&o.forEach(i=>r.addChild(i)),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){let t=new Td;for(let n of this.traverse())t.addTreeNode(n.scopeRef,n.parent.scopeRef,n.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new Hu({scopeRef:null}),this.fastMap.set(null,this.root)}}class Hu{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Pe=new Td;function Kr(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=y.useRef({isFocused:!1,isFocusVisible:t||Hv()}),[i,s]=y.useState(!1),[a,l]=y.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=y.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=y.useCallback(p=>{o.current.isFocused=p,s(p),u()},[u]);nS(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:d}=Wv({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=rS({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:r?f:d}}let vS=re.createContext(null);function yS(e){let t=y.useContext(vS)||{};_v(t,e);let{ref:n,...r}=t;return r}function kd(e,t){let{focusProps:n}=Wv(e),{keyboardProps:r}=iS(e),o=Se(n,r),i=yS(t),s=e.isDisabled?{}:i,a=y.useRef(e.autoFocus);return y.useEffect(()=>{a.current&&t.current&&Kv(t.current),a.current=!1},[t]),{focusableProps:Se({...o,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}const Ku=re.createContext(null);function bS(e){let{children:t}=e,n=y.useContext(Ku),[r,o]=y.useState(0),i=y.useMemo(()=>({parent:n,modalCount:r,addModal(){o(s=>s+1),n&&n.addModal()},removeModal(){o(s=>s-1),n&&n.removeModal()}}),[n,r]);return re.createElement(Ku.Provider,{value:i},t)}function xS(){let e=y.useContext(Ku);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function wS(e){let{modalProviderProps:t}=xS();return re.createElement("div",{"data-overlay-container":!0,...e,...t})}function SS(e){return re.createElement(bS,null,re.createElement(wS,e))}const Mp=re.createContext(null);function PS(e){let t=bd(),{portalContainer:n=t?null:document.body}=e,[r,o]=y.useState(!1),i=y.useMemo(()=>({contain:r,setContain:o}),[r,o]);if(!n)return null;let s;return e.disableFocusManagement?s=re.createElement(Mp.Provider,{value:i},e.children):s=re.createElement(Mp.Provider,{value:i},re.createElement(lS,{restoreFocus:!0,contain:r},e.children)),cw.createPortal(s,n)}var CS=({children:e,locale:t="en"})=>N.jsx(Bw,{locale:t,children:N.jsx(SS,{children:e})});function ct(e){return y.forwardRef(e)}var Ca=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((o,i)=>i in e?{...o,[i]:e[i]}:o,{});return n?[Object.keys(e).filter(i=>!t.includes(i)).reduce((i,s)=>({...i,[s]:e[s]}),{}),r]:[e,r]},Lp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,nt=e=>!e||typeof e!="object"||Object.keys(e).length===0,ES=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Xv(e,t){e.forEach(function(n){Array.isArray(n)?Xv(n,t):t.push(n)})}function Yv(e){let t=[];return Xv(e,t),t}var TS=(...e)=>Yv(e).filter(Boolean),qv=(e,t)=>{let n={};for(let r in e)t!=null&&t.hasOwnProperty(r)?n[r]=typeof e[r]=="object"?qv(e[r],t[r]):t[r]+" "+e[r]:n[r]=e[r];for(let r in t)n.hasOwnProperty(r)||(n[r]=t[r]);return n},Ap=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();function kS(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(s){var a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set:function(s,a){n.has(s)?n.set(s,a):o(s,a)}}}var ey="!";function OS(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(s){for(var a=[],l=0,u=0,c,d=0;du?c-u:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:P}}}function _S(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function DS(e){return{cache:AS(e.cacheSize),splitModifiers:OS(e),...RS(e)}}var jS=/\s+/;function IS(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(jS).map(function(s){var a=n(s),l=a.modifiers,u=a.hasImportantModifier,c=a.baseClassName,d=a.maybePostfixModifierPosition,f=r(d?c.substring(0,d):c),p=!!d;if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};p=!1}var m=_S(l).join(":"),v=u?m+ey:m;return{isTailwindClass:!0,modifierId:v,classGroupId:f,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var a=s.modifierId,l=s.classGroupId,u=s.hasPostfixModifier,c=a+l;return i.has(c)?!1:(i.add(c),o(l,u).forEach(function(d){return i.add(a+d)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function Qu(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;re||void 0,Ks=(...e)=>oy(Yv(e).filter(Boolean).join(" ")),yl=null,Gs={},qu=!1,go=(...e)=>t=>t.twMerge?((!yl||qu)&&(qu=!1,yl=nt(Gs)?nP:tP(Gs)),oy(yl(Ks(e)))):Ks(e),jp=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=Ks(e[n],t[n]):e[n]=t[n];return e},oP=(e,t)=>{var n,r,o,i,s;let{slots:a={},variants:l={},compoundVariants:u=[],compoundSlots:c=[],defaultVariants:d={}}=e,f={...rP,...t},p=Ks((n=e==null?void 0:e.extend)==null?void 0:n.base,e==null?void 0:e.base),m=qv(l,(r=e==null?void 0:e.extend)==null?void 0:r.variants),v={...(o=e==null?void 0:e.extend)==null?void 0:o.defaultVariants,...d};!nt(f.twMergeConfig)&&!ES(f.twMergeConfig,Gs)&&(qu=!0,Gs=f.twMergeConfig);let P=nt(a)?{}:{base:e==null?void 0:e.base,...a},b=nt((i=e==null?void 0:e.extend)==null?void 0:i.slots)?P:jp((s=e==null?void 0:e.extend)==null?void 0:s.slots,nt(P)?{base:e==null?void 0:e.base}:P),h=S=>{var C,T,k,x;if(nt(m)&&nt(a)&&nt((C=e==null?void 0:e.extend)==null?void 0:C.slots))return go(p,S==null?void 0:S.class,S==null?void 0:S.className)(f);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof u}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);let $=(A,I,w=[],E)=>{let j=w;if(typeof I=="string")j.push(Ap(I).split(" ").map(V=>`${A}:${V}`));else if(Array.isArray(I))j.push(I.flatMap(V=>`${A}:${V}`));else if(typeof I=="object"&&typeof E=="string"){let V=I==null?void 0:I[E];if(V&&typeof V=="string"){let H=Ap(V);j[E]=j[E]?[...j[E],...H.split(" ").map(W=>`${A}:${W}`)]:H.split(" ").map(W=>`${A}:${W}`)}else Array.isArray(V)&&V.length>0&&(j[E]=V.flatMap(H=>`${A}:${H}`))}return j},F=(A,I=m,w=null)=>{let E=I==null?void 0:I[A];if(!E||nt(E))return null;let j=S==null?void 0:S[A];if(j===null)return null;let V=Lp(j),H=Array.isArray(f.responsiveVariants)&&f.responsiveVariants.length>0||f.responsiveVariants===!0,W=v==null?void 0:v[A],G=[];typeof V=="object"&&H&&(G=Object.keys(V).reduce((Z,ae)=>{let Te=V[ae],On=E==null?void 0:E[Te];return ae==="initial"?(W=Te,Z):Array.isArray(f.responsiveVariants)&&!f.responsiveVariants.includes(ae)?Z:$(ae,On,Z,w)},[]));let ne=E[V]||E[Lp(W)];return typeof G=="object"&&typeof w=="string"&&G[w]?jp(G,ne):G.length>0?[ne,...G]:ne},M=()=>m?Object.keys(m).map(A=>F(A,m)):null,z=A=>!m||typeof m!="object"?null:Object.keys(m).reduce((I,w)=>{let E=F(w,m,A),j=A==="base"&&typeof E=="string"?E:E&&E[A];return j&&I.push(j),I},[]),L=S&&Object.fromEntries(Object.entries(S).filter(([,A])=>A!==void 0)),O=A=>{var I;let w=typeof(S==null?void 0:S[A])=="object"?{[A]:(I=S[A])==null?void 0:I.initial}:{};return{...v,...L,...w}},U=(A=[])=>A==null?void 0:A.filter(({class:I,className:w,...E})=>Object.entries(E).every(([j,V])=>{let H=O(j);return Array.isArray(V)?V.includes(H[j]):H[j]===V})).flatMap(({class:I,className:w})=>[I,w]),J=()=>{var A;let I=U(u),w=U((A=e==null?void 0:e.extend)==null?void 0:A.compoundVariants);return TS(w,I)},ie=()=>{let A=J();return Array.isArray(A)?A.reduce((I,w)=>{if(typeof w=="string"&&(I.base=go(I.base,w)(f)),typeof w=="object"){let E=Object.keys(w);for(let j of E)I[j]=go(I[j],w[j])(f)}return I},{}):A},_=()=>c.length<1?null:c.reduce((A,I)=>{let{slots:w=[],class:E,className:j,...V}=I;if(!nt(V)){let H=Object.keys(V);for(let W of H){let G=O(W)[W];if(!G||G!==V[W])return A}}for(let H of w)A[H]||(A[H]=[]),A[H].push([E,j]);return A},{});if(!nt(a)||!nt((T=e==null?void 0:e.extend)==null?void 0:T.slots)){let A=(k=ie())!=null?k:[],I=(x=_())!=null?x:[];return{...typeof b=="object"&&!nt(b)?Object.keys(b).reduce((w,E)=>(w[E]=j=>go(b[E],z(E),A==null?void 0:A[E],I==null?void 0:I[E],j==null?void 0:j.class,j==null?void 0:j.className)(f),w),{}):{}}}return go(p,M(),J(),S==null?void 0:S.class,S==null?void 0:S.className)(f)},g=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return h.variantKeys=g(),h.base=p,h.slots=b,h.variants=m,h.defaultVariants=v,h.compoundSlots=c,h.compoundVariants=u,h},iP=["0","xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl","1","2","3","3.5","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],bl=iP.map(e=>`unit-${e}`),Ui=["small","medium","large"],eo=(e,t)=>{var n,r,o;return oP(e,{...t,twMerge:(n=t==null?void 0:t.twMerge)!=null?n:!0,twMergeConfig:{...t==null?void 0:t.twMergeConfig,theme:{...(r=t==null?void 0:t.twMergeConfig)==null?void 0:r.theme,opacity:["disabled"],spacing:["divider","unit",...bl],borderWidth:Ui,borderRadius:Ui},classGroups:{...(o=t==null?void 0:t.twMergeConfig)==null?void 0:o.classGroups,shadow:[{shadow:Ui}],"font-size":[{text:["tiny",...Ui]}],"bg-image":["bg-stripe-gradient"],"min-w":[{"min-w":["unit",...bl]}],"min-h":[{"min-h":["unit",...bl]}]}}})},mi=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],sP=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],xl=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],aP={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},lP={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground",foreground:"shadow-lg shadow-foreground/40 bg-foreground text-background"},uP={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger",foreground:"bg-transparent border-foreground text-foreground"},cP={default:"bg-default/40 text-default-foreground",primary:"bg-primary/20 text-primary",secondary:"bg-secondary/20 text-secondary",success:"bg-success/20 text-success-600 dark:text-success",warning:"bg-warning/20 text-warning-600 dark:text-warning",danger:"bg-danger/20 text-danger dark:text-danger-500",foreground:"bg-foreground/10 text-foreground"},dP={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger",foreground:"border-default bg-default-100 text-foreground"},fP={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger",foreground:"bg-transparent text-foreground"},pP={default:"border-default text-default-foreground hover:!bg-default",primary:"border-primary text-primary hover:!text-primary-foreground hover:!bg-primary",secondary:"border-secondary text-secondary hover:text-secondary-foreground hover:!bg-secondary",success:"border-success text-success hover:!text-success-foreground hover:!bg-success",warning:"border-warning text-warning hover:!text-warning-foreground hover:!bg-warning",danger:"border-danger text-danger hover:!text-danger-foreground hover:!bg-danger",foreground:"border-foreground text-foreground hover:!bg-foreground"},ur={solid:aP,shadow:lP,bordered:uP,flat:cP,faded:dP,light:fP,ghost:pP},Ip=eo({slots:{base:"group flex flex-col",label:"block text-small font-medium text-foreground-600",mainWrapper:"",inputWrapper:"relative w-full inline-flex flex-row items-center shadow-sm px-3 gap-3",innerWrapper:"inline-flex h-full items-center w-full gap-1.5 box-border",input:"w-full h-full font-normal !bg-transparent outline-none placeholder:text-foreground-500",clearButton:["p-2","-m-2","z-10","hidden","absolute","right-3","appearance-none","outline-none","select-none","opacity-0","hover:!opacity-100","cursor-pointer","active:!opacity-70","rounded-full",...mi],helperWrapper:"flex relative flex-col gap-1.5 pt-1 px-1",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400"]},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"]}},color:{default:{},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success-600 dark:text-success"},warning:{label:"text-warning-600 dark:text-warning"},danger:{label:"text-danger dark:text-danger-500"}},size:{sm:{label:"text-tiny",inputWrapper:"h-unit-8 min-h-unit-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-unit-10 min-h-unit-10 rounded-medium",input:"text-small",clearButton:"text-large"},lg:{inputWrapper:"h-unit-12 min-h-unit-12 rounded-large",input:"text-medium",clearButton:"text-large"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{base:"data-[has-helper=true]:pb-4",label:"text-foreground pb-1.5",mainWrapper:"flex flex-col",description:"absolute left-1",errorMessage:"absolute left-1"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:pb-4",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"text-foreground pr-2",description:"absolute left-1",errorMessage:"absolute left-1"},inside:{label:"text-tiny",inputWrapper:"flex-col items-start justify-center gap-0"}},fullWidth:{true:{base:"w-full"}},isLabelPlaceholder:{true:{label:"absolute z-10 pointer-events-none"}},isClearable:{true:{input:"peer pr-6",clearButton:"peer-[.is-filled]:opacity-70 peer-[.is-filled]:block"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"placeholder:text-danger text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isMultiline:{true:{inputWrapper:"!h-auto",input:"resize-none py-2"}},disableAnimation:{true:{inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","origin-top-left","transition-all","!duration-200","!ease-[cubic-bezier(0,0,0.2,1)]","motion-reduce:transition-none"],clearButton:["transition-opacity","motion-reduce:transition-none"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,labelPlacement:"inside",isDisabled:!1,disableAnimation:!1},compoundVariants:[{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-50","data-[hover=true]:bg-primary-100","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-50","text-secondary","data-[hover=true]:bg-secondary-100","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-50","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-100","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-50","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-100","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-50","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-100","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...sP]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["bg-danger-50","data-[hover=true]:bg-danger-100","group-data-[focus=true]:bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{label:"text-small",inputWrapper:"h-16 py-2.5 gap-1"}},{isLabelPlaceholder:!0,labelPlacement:["inside","outside"],class:{label:["font-normal","text-foreground-500","group-focus-within:font-medium","group-[.is-filled]:font-medium","group-focus-within:pointer-events-auto","group-[.is-filled]:pointer-events-auto"]}},{isLabelPlaceholder:!0,labelPlacement:"inside",class:{inputWrapper:"group",label:["group-focus-within:text-foreground-600","group-[.is-filled]:text-foreground-600"]}},{isLabelPlaceholder:!0,labelPlacement:"outside",class:{base:"group relative justify-end",label:["pb-0","group-focus-within:left-0","group-[.is-filled]:left-0","group-focus-within:text-foreground","group-[.is-filled]:text-foreground"]}},{isLabelPlaceholder:!0,color:"primary",class:{label:["group-focus-within:text-primary","group-[.is-filled]:text-primary"]}},{isLabelPlaceholder:!0,color:"secondary",class:{label:["group-focus-within:text-secondary","group-[.is-filled]:text-secondary"]}},{isLabelPlaceholder:!0,color:"success",class:{label:["group-focus-within:text-success","group-[.is-filled]:text-success"]}},{isLabelPlaceholder:!0,color:"warning",class:{label:["group-focus-within:text-warning","group-[.is-filled]:text-warning"]}},{isLabelPlaceholder:!0,color:"danger",class:{label:["group-focus-within:text-danger","group-[.is-filled]:text-danger"]}},{isLabelPlaceholder:!0,variant:"underlined",class:{label:["group-focus-within:pt-0","group-[.is-filled]:pt-0"]}},{isLabelPlaceholder:!0,variant:"underlined",size:"sm",class:{label:["pt-3"]}},{isLabelPlaceholder:!0,variant:"underlined",size:"md",class:{label:["pt-4"]}},{isLabelPlaceholder:!0,variant:"underlined",size:"lg",class:{label:["pt-5"]}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:["sm","md"],class:{label:["text-small","group-focus-within:text-tiny","group-[.is-filled]:text-tiny"],input:"pt-4"}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:"sm",class:{label:["group-focus-within:-translate-y-2.5","group-[.is-filled]:-translate-y-2.5"],input:"pt-4"}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:"md",class:{label:["group-focus-within:-translate-y-3","group-[.is-filled]:-translate-y-3"],input:"pt-4"}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:"lg",class:{label:["text-medium","group-focus-within:text-small","group-focus-within:-translate-y-3","group-[.is-filled]:text-small","group-[.is-filled]:-translate-y-3"],input:"pt-6"}},{isLabelPlaceholder:!0,labelPlacement:"outside",size:"sm",class:{label:["text-tiny","bottom-2","left-2","group-focus-within:bottom-10","group-[.is-filled]:bottom-10"]}},{isLabelPlaceholder:!0,labelPlacement:"outside",size:"md",class:{label:["text-small","bottom-2.5","left-3","group-focus-within:bottom-12","group-[.is-filled]:bottom-12"]}},{isLabelPlaceholder:!0,labelPlacement:"outside",size:"lg",class:{label:["text-medium","bottom-3","left-3","group-focus-within:text-small","group-[.is-filled]:bottom-sm","group-focus-within:bottom-14","group-[.is-filled]:bottom-14"]}}]}),Fp=eo({base:["relative inline-flex items-center outline-none tap-highlight-transparent",...mi],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"},underline:{none:"no-underline",hover:"hover:underline",always:"underline",active:"active:underline",focus:"focus:underline"},isBlock:{true:["px-2","py-1","hover:after:opacity-100","after:content-['']","after:inset-0","after:opacity-0","after:w-full","after:h-full","after:rounded-xl","after:transition-background","after:absolute"],false:"hover:opacity-80 active:opacity-disabled transition-opacity"},isDisabled:{true:"opacity-disabled cursor-default pointer-events-none"},disableAnimation:{true:"after:transition-none transition-none"}},compoundVariants:[{isBlock:!0,color:"foreground",class:"hover:after:bg-foreground/10"},{isBlock:!0,color:"primary",class:"hover:after:bg-primary/20"},{isBlock:!0,color:"secondary",class:"hover:after:bg-secondary/20"},{isBlock:!0,color:"success",class:"hover:after:bg-success/20"},{isBlock:!0,color:"warning",class:"hover:after:bg-warning/20"},{isBlock:!0,color:"danger",class:"hover:after:bg-danger/20"},{underline:["hover","always","active","focus"],class:"underline-offset-4"}],defaultVariants:{color:"primary",size:"md",isBlock:!1,underline:"none",isDisabled:!1,disableAnimation:!1}}),hP="flex mx-1 text-current self-center",Vp=eo({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-center","data-[menu-open=true]:border-none"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-[var(--navbar-height)]"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent",...mi],srOnly:["sr-only"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity","before:content-['']","before:block","before:h-px","before:w-6","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","after:content-['']","after:block","after:h-px","after:w-6","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:after:translate-y-0","group-data-[open=true]:after:-rotate-45"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap","justify-start","bg-transparent","items-center","no-underline","text-medium","whitespace-nowrap","box-border"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=start]:basis-0","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-semibold"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-[var(--navbar-height)]","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto"],menuItem:["text-large"]},variants:{position:{static:{base:"static"},sticky:{base:"sticky top-0 inset-x-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},hideOnScroll:{true:{base:["sticky","top-0","inset-x-0"]}},isBordered:{true:{base:["border-b","border-divider"]}},isBlurred:{false:{base:"bg-background",menu:"bg-background"},true:{base:["backdrop-blur-lg","data-[menu-open=true]:backdrop-blur-xl","backdrop-saturate-150","bg-background/70"],menu:["backdrop-blur-xl","backdrop-saturate-150","bg-background/70"]}},disableAnimation:{true:{menu:["hidden","h-[calc(100dvh_-_var(--navbar-height)_-_1px)]","data-[open=true]:flex"]}}},defaultVariants:{maxWidth:"lg",position:"sticky",isBlurred:!0}}),mP=eo({slots:{base:["flex","relative","justify-center","items-center","box-border","overflow-hidden","align-middle","text-white","z-10",...mi],img:["flex","object-cover","w-full","h-full","transition-opacity","!duration-500","opacity-0","data-[loaded=true]:opacity-100"],fallback:[...xl,"flex","items-center","justify-center"],name:[...xl,"font-normal","text-center","text-inherit"],icon:[...xl,"flex","items-center","justify-center","text-inherit","w-full","h-full"]},variants:{size:{sm:{base:"w-8 h-8 text-tiny"},md:{base:"w-10 h-10 text-tiny"},lg:{base:"w-14 h-14 text-small"}},color:{default:{base:ur.solid.default},primary:{base:ur.solid.primary},secondary:{base:ur.solid.secondary},success:{base:ur.solid.success},warning:{base:ur.solid.warning},danger:{base:ur.solid.danger}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isBordered:{true:{base:"ring-2 ring-offset-2 ring-offset-background dark:ring-offset-background-dark"}},isDisabled:{true:{base:"opacity-disabled"}},isInGroup:{true:{base:["-ml-2 data-[hover=true]:-translate-x-3 transition-transform","data-[focus-visible=true]:-translate-x-3"]}},isInGridGroup:{true:{base:"m-0 data-[hover=true]:translate-x-0"}}},defaultVariants:{size:"md",color:"default",radius:"full"},compoundVariants:[{color:"default",isBordered:!0,class:{base:"ring-default"}},{color:"primary",isBordered:!0,class:{base:"ring-focus"}},{color:"secondary",isBordered:!0,class:{base:"ring-secondary"}},{color:"success",isBordered:!0,class:{base:"ring-success"}},{color:"warning",isBordered:!0,class:{base:"ring-warning"}},{color:"danger",isBordered:!0,class:{base:"ring-danger"}}]});eo({base:"flex items-center justify-center h-auto w-max-content",variants:{isGrid:{true:"inline-grid grid-cols-4 gap-3"}}});var Bp=eo({slots:{base:["flex","flex-col","relative","overflow-hidden","height-auto","outline-none","text-foreground","box-border","bg-content1",...mi],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-5","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,disableAnimation:!1,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,disableAnimation:!1,isFooterBlurred:!1}}),gP=e=>(e==null?void 0:e.length)<=4?e:e==null?void 0:e.slice(0,3),vP=(...e)=>{let t=" ";for(const n of e)if(typeof n=="string"&&n.length>0){t=n;break}return t};function iy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;te?"true":void 0;function $d(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,o=y.createContext(void 0);o.displayName=r;function i(){var s;const a=y.useContext(o);if(!a&&t){const l=new Error(n);throw l.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,l,i),l}return a}return[o.Provider,i,o]}function et(e){const t=y.useRef(null);return y.useImperativeHandle(e,()=>t.current),t}var yP=Object.create,sy=Object.defineProperty,bP=Object.getOwnPropertyDescriptor,ay=Object.getOwnPropertyNames,xP=Object.getPrototypeOf,wP=Object.prototype.hasOwnProperty,ly=(e,t)=>function(){return t||(0,e[ay(e)[0]])((t={exports:{}}).exports,t),t.exports},SP=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ay(t))!wP.call(e,o)&&o!==n&&sy(e,o,{get:()=>t[o],enumerable:!(r=bP(t,o))||r.enumerable});return e},PP=(e,t,n)=>(n=e!=null?yP(xP(e)):{},SP(t||!e||!e.__esModule?sy(n,"default",{value:e,enumerable:!0}):n,e)),CP=ly({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function p(w){return w===null||typeof w!="object"?null:(w=f&&w[f]||w["@@iterator"],typeof w=="function"?w:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,P={};function b(w,E,j){this.props=w,this.context=E,this.refs=P,this.updater=j||m}b.prototype.isReactComponent={},b.prototype.setState=function(w,E){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,E,"setState")},b.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function h(){}h.prototype=b.prototype;function g(w,E,j){this.props=w,this.context=E,this.refs=P,this.updater=j||m}var S=g.prototype=new h;S.constructor=g,v(S,b.prototype),S.isPureReactComponent=!0;var C=Array.isArray,T=Object.prototype.hasOwnProperty,k={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function $(w,E,j){var V,H={},W=null,G=null;if(E!=null)for(V in E.ref!==void 0&&(G=E.ref),E.key!==void 0&&(W=""+E.key),E)T.call(E,V)&&!x.hasOwnProperty(V)&&(H[V]=E[V]);var ne=arguments.length-2;if(ne===1)H.children=j;else if(1{let n=[];const r=zp.Children.map(e,i=>(0,zp.isValidElement)(i)&&i.type===t?(n.push(i),null):i),o=n.length>=0?n:void 0;return[r,o]};/** * @license React * react.development.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. *//** * @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 kP=new Set(["id","type","className","style","title","role","tabIndex","htmlFor","width","height"]),RP=/^(data-.*)$/,$P=/^(aria-.*)$/,NP=/^(on[A-Z].*)$/;function Ju(e,t={labelable:!0,enabled:!0}){let{labelable:n,propNames:r}=t,o={};if(!t.enabled)return e;for(const i in e)(Object.prototype.hasOwnProperty.call(e,i)&&(kP.has(i)||n&&$P.test(i)||r!=null&&r.has(i)||RP.test(i))||NP.test(i))&&(o[i]=e[i]);return o}var MP=e=>N.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...e,children:[N.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),N.jsx("path",{d:"M15 3h6v6"}),N.jsx("path",{d:"M10 14L21 3"})]}),LP=e=>N.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:N.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})});const uy=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ea=y.createContext({}),Ta=y.createContext(null),ka=typeof document<"u",Qs=ka?y.useLayoutEffect:y.useEffect,cy=y.createContext({strict:!1});function AP(e,t,n,r){const{visualElement:o}=y.useContext(Ea),i=y.useContext(cy),s=y.useContext(Ta),a=y.useContext(uy).reducedMotion,l=y.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;return y.useInsertionEffect(()=>{u&&u.update(n,s)}),Qs(()=>{u&&u.render()}),y.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?Qs:y.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function $r(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function OP(e,t,n){return y.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):$r(n)&&(n.current=r))},[t])}function oi(e){return typeof e=="string"||Array.isArray(e)}function Ra(e){return typeof e=="object"&&typeof e.start=="function"}const Nd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Md=["initial",...Nd];function $a(e){return Ra(e.animate)||Md.some(t=>oi(e[t]))}function dy(e){return!!($a(e)||e.variants)}function _P(e,t){if($a(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oi(n)?n:void 0,animate:oi(r)?r:void 0}}return e.inherit!==!1?t:{}}function DP(e){const{initial:t,animate:n}=_P(e,y.useContext(Ea));return y.useMemo(()=>({initial:t,animate:n}),[Up(t),Up(n)])}function Up(e){return Array.isArray(e)?e.join(" "):e}const Wp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ii={};for(const e in Wp)ii[e]={isEnabled:t=>Wp[e].some(n=>!!t[n])};function jP(e){for(const t in e)ii[t]={...ii[t],...e[t]}}const Ld=y.createContext({}),fy=y.createContext({}),IP=Symbol.for("motionComponentSymbol");function FP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&jP(e);function i(a,l){let u;const c={...y.useContext(uy),...a,layoutId:VP(a)},{isStatic:d}=c,f=DP(a),p=r(a,d);if(!d&&ka){f.visualElement=AP(o,p,c,t);const m=y.useContext(fy),v=y.useContext(cy).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,v,e,m))}return y.createElement(Ea.Provider,{value:f},u&&f.visualElement?y.createElement(u,{visualElement:f.visualElement,...c}):null,n(o,a,OP(p,f.visualElement,l),p,d,f.visualElement))}const s=y.forwardRef(i);return s[IP]=o,s}function VP({layoutId:e}){const t=y.useContext(Ld).id;return t&&e!==void 0?t+"-"+e:e}function BP(e){function t(r,o={}){return FP(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const zP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ad(e){return typeof e!="string"||e.includes("-")?!1:!!(zP.indexOf(e)>-1||/[A-Z]/.test(e))}const Xs={};function UP(e){Object.assign(Xs,e)}const gi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rr=new Set(gi);function py(e,{layout:t,layoutId:n}){return rr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xs[e]||e==="opacity")}const tt=e=>!!(e&&e.getVelocity),WP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HP=gi.length;function KP(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),my=hy("--"),Zu=hy("var(--"),GP=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,QP=(e,t)=>t&&typeof e=="number"?t.transform(e):e,kn=(e,t,n)=>Math.min(Math.max(n,e),t),or={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jo={...or,transform:e=>kn(0,1,e)},Wi={...or,default:1},Io=e=>Math.round(e*1e5)/1e5,Na=/(-)?([\d]*\.?[\d])+/g,gy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,XP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vi(e){return typeof e=="string"}const yi=e=>({test:t=>vi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rn=yi("deg"),_t=yi("%"),K=yi("px"),YP=yi("vh"),qP=yi("vw"),Hp={..._t,parse:e=>_t.parse(e)/100,transform:e=>_t.transform(e*100)},Kp={...or,transform:Math.round},vy={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,size:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,rotate:rn,rotateX:rn,rotateY:rn,rotateZ:rn,scale:Wi,scaleX:Wi,scaleY:Wi,scaleZ:Wi,skew:rn,skewX:rn,skewY:rn,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:jo,originX:Hp,originY:Hp,originZ:K,zIndex:Kp,fillOpacity:jo,strokeOpacity:jo,numOctaves:Kp};function Od(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(my(d)){i[d]=f;continue}const p=vy[d],m=QP(f,p);if(rr.has(d)){if(l=!0,s[d]=m,!c)continue;f!==(p.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,a[d]=m):o[d]=m}if(t.transform||(l||r?o.transform=KP(e.transform,n,c,r):o.transform&&(o.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:p=0}=a;o.transformOrigin=`${d} ${f} ${p}`}}const _d=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yy(e,t,n){for(const r in t)!tt(t[r])&&!py(r,n)&&(e[r]=t[r])}function JP({transformTemplate:e},t,n){return y.useMemo(()=>{const r=_d();return Od(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function ZP(e,t,n){const r=e.style||{},o={};return yy(o,r,e),Object.assign(o,JP(e,t,n)),e.transformValues?e.transformValues(o):o}function eC(e,t,n){const r={},o=ZP(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const tC=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Ys(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||tC.has(e)}let by=e=>!Ys(e);function nC(e){e&&(by=t=>t.startsWith("on")?!Ys(t):e(t))}try{nC(require("@emotion/is-prop-valid").default)}catch{}function rC(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(by(o)||n===!0&&Ys(o)||!t&&!Ys(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Gp(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function oC(e,t,n){const r=Gp(t,e.x,e.width),o=Gp(n,e.y,e.height);return`${r} ${o}`}const iC={offset:"stroke-dashoffset",array:"stroke-dasharray"},sC={offset:"strokeDashoffset",array:"strokeDasharray"};function aC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?iC:sC;e[i.offset]=K.transform(-r);const s=K.transform(t),a=K.transform(n);e[i.array]=`${s} ${a}`}function Dd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d,f){if(Od(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(o!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=oC(v,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&aC(p,s,a,l,!1)}const xy=()=>({..._d(),attrs:{}}),jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lC(e,t,n,r){const o=y.useMemo(()=>{const i=xy();return Dd(i,t,{enableHardwareAcceleration:!1},jd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};yy(i,e.style,e),o.style={...i,...o.style}}return o}function uC(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Ad(n)?lC:eC)(r,i,s,n),c={...rC(r,typeof n=="string",e),...l,ref:o},{children:d}=r,f=y.useMemo(()=>tt(d)?d.get():d,[d]);return y.createElement(n,{...c,children:f})}}const Id=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function wy(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Sy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Py(e,t,n,r){wy(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Sy.has(o)?o:Id(o),t.attrs[o])}function Fd(e,t){const{style:n}=e,r={};for(const o in n)(tt(n[o])||t.style&&tt(t.style[o])||py(o,e))&&(r[o]=n[o]);return r}function Cy(e,t){const n=Fd(e,t);for(const r in e)if(tt(e[r])||tt(t[r])){const o=gi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Vd(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function Ey(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const qs=e=>Array.isArray(e),cC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),dC=e=>qs(e)?e[e.length-1]||0:e;function us(e){const t=tt(e)?e.get():e;return cC(t)?t.toValue():t}function fC({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:pC(r,o,i,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Ty=e=>(t,n)=>{const r=y.useContext(Ea),o=y.useContext(Ta),i=()=>fC(e,t,r,o);return n?i():Ey(i)};function pC(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=us(i[f]);let{initial:s,animate:a}=e;const l=$a(e),u=dy(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?a:s;return d&&typeof d!="boolean"&&!Ra(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const m=Vd(e,p);if(!m)return;const{transitionEnd:v,transition:P,...b}=m;for(const h in b){let g=b[h];if(Array.isArray(g)){const S=c?g.length-1:0;g=g[S]}g!==null&&(o[h]=g)}for(const h in v)o[h]=v[h]}),o}const hC={useVisualState:Ty({scrapeMotionValuesFromProps:Cy,createRenderState:xy,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Dd(n,r,{enableHardwareAcceleration:!1},jd(t.tagName),e.transformTemplate),Py(t,n)}})},mC={useVisualState:Ty({scrapeMotionValuesFromProps:Fd,createRenderState:_d})};function gC(e,{forwardMotionProps:t=!1},n,r){return{...Ad(e)?hC:mC,preloadedFeatures:n,useRender:uC(t),createVisualElement:r,Component:e}}function Ut(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ky=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ma(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const vC=e=>t=>ky(t)&&e(t,Ma(t));function Ht(e,t,n,r){return Ut(e,t,vC(n),r)}const yC=(e,t)=>n=>t(e(n)),Sn=(...e)=>e.reduce(yC);function Ry(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Qp=Ry("dragHorizontal"),Xp=Ry("dragVertical");function $y(e){let t=!1;if(e==="y")t=Xp();else if(e==="x")t=Qp();else{const n=Qp(),r=Xp();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ny(){const e=$y(!0);return e?(e(),!1):!0}class Ln{constructor(t){this.isMounted=!1,this.node=t}update(){}}const we=e=>e;function bC(e){let t=[],n=[],r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const d=c&&o,f=d?t:n;return u&&s.add(l),f.indexOf(l)===-1&&(f.push(l),d&&o&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(d[f]=bC(()=>n=!0),d),{}),s=d=>i[d].process(o),a=()=>{const d=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(d-o.timestamp,xC),1),o.timestamp=d,o.isProcessing=!0,Hi.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:Hi.reduce((d,f)=>{const p=i[f];return d[f]=(m,v=!1,P=!1)=>(n||l(),p.schedule(m,v,P)),d},{}),cancel:d=>Hi.forEach(f=>i[f].cancel(d)),state:o,steps:i}}const{schedule:pe,cancel:Jt,state:Fe,steps:wl}=wC(typeof requestAnimationFrame<"u"?requestAnimationFrame:we,!0);function Yp(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(i,s)=>{if(i.type==="touch"||Ny())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&pe.update(()=>a[r](i,s))};return Ht(e.current,n,o,{passive:!e.getProps()[r]})}class SC extends Ln{mount(){this.unmount=Sn(Yp(this.node,!0),Yp(this.node,!1))}unmount(){}}class PC extends Ln{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sn(Ut(this.node.current,"focus",()=>this.onFocus()),Ut(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const My=(e,t)=>t?e===t?!0:My(e,t.parentElement):!1;function Sl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ma(n))}class CC extends Ln{constructor(){super(...arguments),this.removeStartListeners=we,this.removeEndListeners=we,this.removeAccessibleListeners=we,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=Ht(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();pe.update(()=>{My(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Ht(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Sl("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&pe.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=Ut(this.node.current,"keyup",s),Sl("down",(a,l)=>{this.startPress(a,l)})},n=Ut(this.node.current,"keydown",t),r=()=>{this.isPressing&&Sl("cancel",(i,s)=>this.cancelPress(i,s))},o=Ut(this.node.current,"blur",r);this.removeAccessibleListeners=Sn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&pe.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ny()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&pe.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ht(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ut(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ec=new WeakMap,Pl=new WeakMap,EC=e=>{const t=ec.get(e.target);t&&t(e)},TC=e=>{e.forEach(EC)};function kC({root:e,...t}){const n=e||document;Pl.has(n)||Pl.set(n,{});const r=Pl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(TC,{root:e,...t})),r[o]}function RC(e,t,n){const r=kC(t);return ec.set(e,n),r.observe(e),()=>{ec.delete(e),r.unobserve(e)}}const $C={some:0,all:1};class NC extends Ln{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:$C[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return RC(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(MC(t,n))&&this.startObserver()}unmount(){}}function MC({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const LC={inView:{Feature:NC},tap:{Feature:CC},focus:{Feature:PC},hover:{Feature:SC}};function Ly(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function OC(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function La(e,t,n){const r=e.getProps();return Vd(r,t,n!==void 0?n:r.custom,AC(e),OC(e))}const _C="framerAppearId",DC="data-"+Id(_C);let jC=we,Bd=we;const Pn=e=>e*1e3,Kt=e=>e/1e3,IC={current:!1},Ay=e=>Array.isArray(e)&&typeof e[0]=="number";function Oy(e){return!!(!e||typeof e=="string"&&_y[e]||Ay(e)||Array.isArray(e)&&e.every(Oy))}const To=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,_y={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:To([0,.65,.55,1]),circOut:To([.55,0,1,.45]),backIn:To([.31,.01,.66,-.59]),backOut:To([.33,1.53,.69,.99])};function Dy(e){if(e)return Ay(e)?To(e):Array.isArray(e)?e.map(Dy):_y[e]}function FC(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Dy(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function VC(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const jy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,BC=1e-7,zC=12;function UC(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=jy(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>BC&&++aUC(i,0,1,e,n);return i=>i===0||i===1?i:jy(o(i),t,r)}const WC=bi(.42,0,1,1),HC=bi(0,0,.58,1),Iy=bi(.42,0,.58,1),KC=e=>Array.isArray(e)&&typeof e[0]!="number",Fy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vy=e=>t=>1-e(1-t),By=e=>1-Math.sin(Math.acos(e)),zd=Vy(By),GC=Fy(zd),zy=bi(.33,1.53,.69,.99),Ud=Vy(zy),QC=Fy(Ud),XC=e=>(e*=2)<1?.5*Ud(e):.5*(2-Math.pow(2,-10*(e-1))),YC={linear:we,easeIn:WC,easeInOut:Iy,easeOut:HC,circIn:By,circInOut:GC,circOut:zd,backIn:Ud,backInOut:QC,backOut:zy,anticipate:XC},qp=e=>{if(Array.isArray(e)){Bd(e.length===4);const[t,n,r,o]=e;return bi(t,n,r,o)}else if(typeof e=="string")return YC[e];return e},Wd=(e,t)=>n=>!!(vi(n)&&XP.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Uy=(e,t,n)=>r=>{if(!vi(r))return r;const[o,i,s,a]=r.match(Na);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},qC=e=>kn(0,255,e),Cl={...or,transform:e=>Math.round(qC(e))},Hn={test:Wd("rgb","red"),parse:Uy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cl.transform(e)+", "+Cl.transform(t)+", "+Cl.transform(n)+", "+Io(jo.transform(r))+")"};function JC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const tc={test:Wd("#"),parse:JC,transform:Hn.transform},Nr={test:Wd("hsl","hue"),parse:Uy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_t.transform(Io(t))+", "+_t.transform(Io(n))+", "+Io(jo.transform(r))+")"},Ue={test:e=>Hn.test(e)||tc.test(e)||Nr.test(e),parse:e=>Hn.test(e)?Hn.parse(e):Nr.test(e)?Nr.parse(e):tc.parse(e),transform:e=>vi(e)?e:e.hasOwnProperty("red")?Hn.transform(e):Nr.transform(e)},ve=(e,t,n)=>-n*e+n*t+e;function El(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ZC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=El(l,a,e+1/3),i=El(l,a,e),s=El(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const Tl=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},eE=[tc,Hn,Nr],tE=e=>eE.find(t=>t.test(e));function Jp(e){const t=tE(e);let n=t.parse(e);return t===Nr&&(n=ZC(n)),n}const Wy=(e,t)=>{const n=Jp(e),r=Jp(t),o={...n};return i=>(o.red=Tl(n.red,r.red,i),o.green=Tl(n.green,r.green,i),o.blue=Tl(n.blue,r.blue,i),o.alpha=ve(n.alpha,r.alpha,i),Hn.transform(o))};function nE(e){var t,n;return isNaN(e)&&vi(e)&&(((t=e.match(Na))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(gy))===null||n===void 0?void 0:n.length)||0)>0}const Hy={regex:GP,countKey:"Vars",token:"${v}",parse:we},Ky={regex:gy,countKey:"Colors",token:"${c}",parse:Ue.parse},Gy={regex:Na,countKey:"Numbers",token:"${n}",parse:or.parse};function kl(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function Js(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&kl(n,Hy),kl(n,Ky),kl(n,Gy),n}function Qy(e){return Js(e).values}function Xy(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Js(e),i=t.length;return s=>{let a=o;for(let l=0;ltypeof e=="number"?0:e;function oE(e){const t=Qy(e);return Xy(e)(t.map(rE))}const Rn={test:nE,parse:Qy,createTransformer:Xy,getAnimatableNone:oE},Yy=(e,t)=>n=>`${n>0?t:e}`;function qy(e,t){return typeof e=="number"?n=>ve(e,t,n):Ue.test(e)?Wy(e,t):e.startsWith("var(")?Yy(e,t):Zy(e,t)}const Jy=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>qy(i,t[s]));return i=>{for(let s=0;s{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=qy(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}},Zy=(e,t)=>{const n=Rn.createTransformer(t),r=Js(e),o=Js(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?Sn(Jy(r.values,o.values),n):Yy(e,t)},si=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Zp=(e,t)=>n=>ve(e,t,n);function sE(e){return typeof e=="number"?Zp:typeof e=="string"?Ue.test(e)?Wy:Zy:Array.isArray(e)?Jy:typeof e=="object"?iE:Zp}function aE(e,t,n){const r=[],o=n||sE(e[0]),i=e.length-1;for(let s=0;st[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=aE(t,r,o),a=s.length,l=u=>{let c=0;if(a>1)for(;cl(kn(e[0],e[i-1],u)):l}function lE(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=si(0,t,r);e.push(ve(n,1,o))}}function uE(e){const t=[0];return lE(t,e.length-1),t}function cE(e,t){return e.map(n=>n*t)}function dE(e,t){return e.map(()=>t||Iy).splice(0,e.length-1)}function Zs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=KC(r)?r.map(qp):qp(r),i={done:!1,value:t[0]},s=cE(n&&n.length===t.length?n:uE(t),e),a=e0(s,t,{ease:Array.isArray(o)?o:dE(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function t0(e,t){return t?e*(1e3/t):0}const fE=5;function n0(e,t,n){const r=Math.max(t-fE,0);return t0(n-e(r),t-r)}const Rl=.001,pE=.01,eh=10,hE=.05,mE=1;function gE({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;jC(e<=Pn(eh));let s=1-t;s=kn(hE,mE,s),e=kn(pE,eh,Kt(e)),s<1?(o=u=>{const c=u*s,d=c*e,f=c-n,p=nc(u,s),m=Math.exp(-d);return Rl-f/p*m},i=u=>{const d=u*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-d),v=nc(Math.pow(u,2),s);return(-o(u)+Rl>0?-1:1)*((f-p)*m)/v}):(o=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Rl+c*d},i=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=yE(o,i,a);if(e=Pn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const vE=12;function yE(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function wE(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!th(e,xE)&&th(e,bE)){const n=gE(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function r0({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=wE(r),p=c?-Kt(c):0,m=l/(2*Math.sqrt(a*u)),v=i-o,P=Kt(Math.sqrt(a/u)),b=Math.abs(v)<5;n||(n=b?.01:2),t||(t=b?.005:.5);let h;if(m<1){const g=nc(P,m);h=S=>{const C=Math.exp(-m*P*S);return i-C*((p+m*P*v)/g*Math.sin(g*S)+v*Math.cos(g*S))}}else if(m===1)h=g=>i-Math.exp(-P*g)*(v+(p+P*v)*g);else{const g=P*Math.sqrt(m*m-1);h=S=>{const C=Math.exp(-m*P*S),T=Math.min(g*S,300);return i-C*((p+m*P*v)*Math.sinh(T)+g*v*Math.cosh(T))/g}}return{calculatedDuration:f&&d||null,next:g=>{const S=h(g);if(f)s.done=g>=d;else{let C=p;g!==0&&(m<1?C=n0(h,g,S):C=0);const T=Math.abs(C)<=n,k=Math.abs(i-S)<=t;s.done=T&&k}return s.value=s.done?i:S,s}}}function nh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=x=>a!==void 0&&xl,m=x=>a===void 0?l:l===void 0||Math.abs(a-x)-v*Math.exp(-x/r),g=x=>b+h(x),S=x=>{const $=h(x),F=g(x);f.done=Math.abs($)<=u,f.value=f.done?b:F};let C,T;const k=x=>{p(f.value)&&(C=x,T=r0({keyframes:[f.value,m(f.value)],velocity:n0(g,x,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:x=>{let $=!1;return!T&&C===void 0&&($=!0,S(x),k(x)),C!==void 0&&x>C?T.next(x-C):(!$&&S(x),f)}}}const SE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>pe.update(t,!0),stop:()=>Jt(t),now:()=>Fe.isProcessing?Fe.timestamp:performance.now()}},rh=2e4;function oh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=rh?1/0:t}const PE={decay:nh,inertia:nh,tween:Zs,keyframes:Zs,spring:r0};function ea({autoplay:e=!0,delay:t=0,driver:n=SE,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let p=1,m=!1,v,P;const b=()=>{P=new Promise(w=>{v=w})};b();let h;const g=PE[o]||Zs;let S;g!==Zs&&typeof r[0]!="number"&&(S=e0([0,100],r,{clamp:!1}),r=[0,100]);const C=g({...f,keyframes:r});let T;a==="mirror"&&(T=g({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let k="idle",x=null,$=null,F=null;C.calculatedDuration===null&&i&&(C.calculatedDuration=oh(C));const{calculatedDuration:M}=C;let z=1/0,L=1/0;M!==null&&(z=M+s,L=z*(i+1)-s);let O=0;const U=w=>{if($===null)return;p>0&&($=Math.min($,w)),p<0&&($=Math.min(w-L/p,$)),x!==null?O=x:O=Math.round(w-$)*p;const E=O-t*(p>=0?1:-1),j=p>=0?E<0:E>L;O=Math.max(E,0),k==="finished"&&x===null&&(O=L);let V=O,H=C;if(i){const Z=O/z;let ae=Math.floor(Z),Te=Z%1;!Te&&Z>=1&&(Te=1),Te===1&&ae--,ae=Math.min(ae,i+1);const On=!!(ae%2);On&&(a==="reverse"?(Te=1-Te,s&&(Te-=s/z)):a==="mirror"&&(H=T));let he=kn(0,1,Te);O>L&&(he=a==="reverse"&&On?1:0),V=he*z}const W=j?{done:!1,value:r[0]}:H.next(V);S&&(W.value=S(W.value));let{done:G}=W;!j&&M!==null&&(G=p>=0?O>=L:O<=0);const ne=x===null&&(k==="finished"||k==="running"&&G);return d&&d(W.value),ne&&_(),W},J=()=>{h&&h.stop(),h=void 0},ie=()=>{k="idle",J(),v(),b(),$=F=null},_=()=>{k="finished",c&&c(),J(),v()},A=()=>{if(m)return;h||(h=n(U));const w=h.now();l&&l(),x!==null?$=w-x:(!$||k==="finished")&&($=w),k==="finished"&&b(),F=$,x=null,k="running",h.start()};e&&A();const I={then(w,E){return P.then(w,E)},get time(){return Kt(O)},set time(w){w=Pn(w),O=w,x!==null||!h||p===0?x=w:$=h.now()-w/p},get duration(){const w=C.calculatedDuration===null?oh(C):C.calculatedDuration;return Kt(w)},get speed(){return p},set speed(w){w===p||!h||(p=w,I.time=Kt(O))},get state(){return k},play:A,pause:()=>{k="paused",x=O},stop:()=>{m=!0,k!=="idle"&&(k="idle",u&&u(),ie())},cancel:()=>{F!==null&&U(F),ie()},complete:()=>{k="finished"},sample:w=>($=0,U(w))};return I}function CE(e){let t;return()=>(t===void 0&&(t=e()),t)}const EE=CE(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),TE=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Ki=10,kE=2e4,RE=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Oy(t.ease);function $E(e,t,{onUpdate:n,onComplete:r,...o}){if(!(EE()&&TE.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(h=>{a=h})};u();let{keyframes:c,duration:d=300,ease:f,times:p}=o;if(RE(t,o)){const h=ea({...o,repeat:0,delay:0});let g={done:!1,value:c[0]};const S=[];let C=0;for(;!g.done&&Cm.cancel(),P=()=>{pe.update(v),a(),u()};return m.onfinish=()=>{e.set(VC(c,o)),r&&r(),P()},{then(h,g){return l.then(h,g)},attachTimeline(h){return m.timeline=h,m.onfinish=null,we},get time(){return Kt(m.currentTime||0)},set time(h){m.currentTime=Pn(h)},get speed(){return m.playbackRate},set speed(h){m.playbackRate=h},get duration(){return Kt(d)},play:()=>{s||(m.play(),Jt(v))},pause:()=>m.pause(),stop:()=>{if(s=!0,m.playState==="idle")return;const{currentTime:h}=m;if(h){const g=ea({...o,autoplay:!1});e.setWithVelocity(g.sample(h-Ki).value,g.sample(h).value,Ki)}P()},complete:()=>m.finish(),cancel:P}}function NE({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:we,pause:we,stop:we,then:i=>(i(),Promise.resolve()),cancel:we,complete:we});return t?ea({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const ME={type:"spring",stiffness:500,damping:25,restSpeed:10},LE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),AE={type:"keyframes",duration:.8},OE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_E=(e,{keyframes:t})=>t.length>2?AE:rr.has(e)?e.startsWith("scale")?LE(t[1]):ME:OE,rc=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Rn.test(t)||t==="0")&&!t.startsWith("url(")),DE=new Set(["brightness","contrast","saturate","opacity"]);function jE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Na)||[];if(!r)return e;const o=n.replace(r,"");let i=DE.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const IE=/([a-z-]*)\(.*?\)/g,oc={...Rn,getAnimatableNone:e=>{const t=e.match(IE);return t?t.map(jE).join(" "):e}},FE={...vy,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:oc,WebkitFilter:oc},Hd=e=>FE[e];function o0(e,t){let n=Hd(e);return n!==oc&&(n=Rn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const i0=e=>/^0[^.\s]+$/.test(e);function VE(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||i0(e)}function BE(e,t,n,r){const o=rc(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;uo=>{const i=s0(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Pn(s);const l=BE(t,e,n,i),u=l[0],c=l[l.length-1],d=rc(e,u),f=rc(e,c);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:m=>{t.set(m),i.onUpdate&&i.onUpdate(m)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(zE(i)||(p={...p,..._E(e,p)}),p.duration&&(p.duration=Pn(p.duration)),p.repeatDelay&&(p.repeatDelay=Pn(p.repeatDelay)),!d||!f||IC.current||i.type===!1)return NE(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=$E(t,e,p);if(m)return m}return ea(p)};function ta(e){return!!(tt(e)&&e.add)}const UE=e=>/^\-?\d*\.?\d+$/.test(e);function Gd(e,t){e.indexOf(t)===-1&&e.push(t)}function Qd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Xd{constructor(){this.subscriptions=[]}add(t){return Gd(this.subscriptions,t),()=>Qd(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class HE{constructor(t,n={}){this.version="10.15.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:s}=Fe;this.lastUpdated!==s&&(this.timeDelta=i,this.lastUpdated=s,pe.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>pe.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=WE(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Xd);const r=this.events[t].add(n);return t==="change"?()=>{r(),pe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?t0(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gr(e,t){return new HE(e,t)}const a0=e=>t=>t.test(e),KE={test:e=>e==="auto",parse:e=>e},l0=[or,K,_t,rn,qP,YP,KE],vo=e=>l0.find(a0(e)),GE=[...l0,Ue,Rn],QE=e=>GE.find(a0(e));function XE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gr(n))}function YE(e,t){const n=La(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i){const a=dC(i[s]);XE(e,s,a)}}function qE(e,t,n){var r,o;const i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(s)for(let a=0;al.remove(d))),u.push(v)}return s&&Promise.all(u).then(()=>{s&&YE(e,s)}),u}function ic(e,t,n={}){const r=La(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(u0(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=o;return tT(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,u]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>u())}else return Promise.all([i(),s(n.delay)])}function tT(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(nT).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(ic(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function nT(e,t){return e.sortNodePosition(t)}function rT(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ic(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ic(e,t,n);else{const o=typeof t=="function"?La(e,t,n.custom):t;r=Promise.all(u0(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const oT=[...Nd].reverse(),iT=Nd.length;function sT(e){return t=>Promise.all(t.map(({animation:n,options:r})=>rT(e,n,r)))}function aT(e){let t=sT(e);const n=uT();let r=!0;const o=(l,u)=>{const c=La(e,u);if(c){const{transition:d,transitionEnd:f,...p}=c;l={...l,...p,...f}}return l};function i(l){t=l(e)}function s(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],p=new Set;let m={},v=1/0;for(let b=0;bv&&C;const F=Array.isArray(S)?S:[S];let M=F.reduce(o,{});T===!1&&(M={});const{prevResolvedValues:z={}}=g,L={...z,...M},O=U=>{$=!0,p.delete(U),g.needsAnimating[U]=!0};for(const U in L){const J=M[U],ie=z[U];m.hasOwnProperty(U)||(J!==ie?qs(J)&&qs(ie)?!Ly(J,ie)||x?O(U):g.protectedKeys[U]=!0:J!==void 0?O(U):p.add(U):J!==void 0&&p.has(U)?O(U):g.protectedKeys[U]=!0)}g.prevProp=S,g.prevResolvedValues=M,g.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&($=!1),$&&!k&&f.push(...F.map(U=>({animation:U,options:{type:h,...l}})))}if(p.size){const b={};p.forEach(h=>{const g=e.getBaseTarget(h);g!==void 0&&(b[h]=g)}),f.push({animation:b})}let P=!!f.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(f):Promise.resolve()}function a(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),n[l].isActive=u;const f=s(c,l);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n}}function lT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ly(t,e):!1}function _n(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function uT(){return{animate:_n(!0),whileInView:_n(),whileHover:_n(),whileTap:_n(),whileDrag:_n(),whileFocus:_n(),exit:_n()}}class cT extends Ln{constructor(t){super(t),t.animationState||(t.animationState=aT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ra(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let dT=0;class fT extends Ln{constructor(){super(...arguments),this.id=dT++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const pT={animation:{Feature:cT},exit:{Feature:fT}},ih=(e,t)=>Math.abs(e-t);function hT(e,t){const n=ih(e.x,t.x),r=ih(e.y,t.y);return Math.sqrt(n**2+r**2)}class c0{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Nl(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=hT(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:p}=Fe;this.history.push({...f,timestamp:p});const{onStart:m,onMove:v}=this.handlers;c||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=$l(c,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,p=Nl(u.type==="pointercancel"?this.lastMoveEventInfo:$l(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,p),f&&f(u,p)},!ky(t))return;this.handlers=n,this.transformPagePoint=r;const o=Ma(t),i=$l(o,this.transformPagePoint),{point:s}=i,{timestamp:a}=Fe;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=n;l&&l(t,Nl(i,this.history)),this.removeListeners=Sn(Ht(window,"pointermove",this.handlePointerMove),Ht(window,"pointerup",this.handlePointerUp),Ht(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jt(this.updatePoint)}}function $l(e,t){return t?{point:t(e.point)}:e}function sh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nl({point:e},t){return{point:e,delta:sh(e,d0(t)),offset:sh(e,mT(t)),velocity:gT(t,.1)}}function mT(e){return e[0]}function d0(e){return e[e.length-1]}function gT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=d0(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Pn(t)));)n--;if(!r)return{x:0,y:0};const i=Kt(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function at(e){return e.max-e.min}function sc(e,t=0,n=.01){return Math.abs(e-t)<=n}function ah(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=at(n)/at(t),(sc(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(sc(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Fo(e,t,n,r){ah(e.x,t.x,n.x,r?r.originX:void 0),ah(e.y,t.y,n.y,r?r.originY:void 0)}function lh(e,t,n){e.min=n.min+t.min,e.max=e.min+at(t)}function vT(e,t,n){lh(e.x,t.x,n.x),lh(e.y,t.y,n.y)}function uh(e,t,n){e.min=t.min-n.min,e.max=e.min+at(t)}function Vo(e,t,n){uh(e.x,t.x,n.x),uh(e.y,t.y,n.y)}function yT(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function ch(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function bT(e,{top:t,left:n,bottom:r,right:o}){return{x:ch(e.x,n,o),y:ch(e.y,t,r)}}function dh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=si(t.min,t.max-r,e.min):r>o&&(n=si(e.min,e.max-o,t.min)),kn(0,1,n)}function ST(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ac=.35;function PT(e=ac){return e===!1?e=0:e===!0&&(e=ac),{x:fh(e,"left","right"),y:fh(e,"top","bottom")}}function fh(e,t,n){return{min:ph(e,t),max:ph(e,n)}}function ph(e,t){return typeof e=="number"?e:e[t]||0}const hh=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:hh(),y:hh()}),mh=()=>({min:0,max:0}),ke=()=>({x:mh(),y:mh()});function $t(e){return[e("x"),e("y")]}function f0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CT({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ET(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ml(e){return e===void 0||e===1}function lc({scale:e,scaleX:t,scaleY:n}){return!Ml(e)||!Ml(t)||!Ml(n)}function In(e){return lc(e)||p0(e)||e.z||e.rotate||e.rotateX||e.rotateY}function p0(e){return gh(e.x)||gh(e.y)}function gh(e){return e&&e!=="0%"}function na(e,t,n){const r=e-n,o=t*r;return n+o}function vh(e,t,n,r,o){return o!==void 0&&(e=na(e,o,r)),na(e,n,r)+t}function uc(e,t=0,n=1,r,o){e.min=vh(e.min,t,n,r,o),e.max=vh(e.max,t,n,r,o)}function h0(e,{x:t,y:n}){uc(e.x,t.translate,t.scale,t.originPoint),uc(e.y,n.translate,n.scale,n.originPoint)}function TT(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a1.0000000000001||e<.999999999999?e:1}function an(e,t){e.min=e.min+t,e.max=e.max+t}function bh(e,t,[n,r,o]){const i=t[o]!==void 0?t[o]:.5,s=ve(e.min,e.max,i);uc(e,t[n],t[r],s,t.scale)}const kT=["x","scaleX","originX"],RT=["y","scaleY","originY"];function Lr(e,t){bh(e.x,t,kT),bh(e.y,t,RT)}function m0(e,t){return f0(ET(e.getBoundingClientRect(),t))}function $T(e,t,n){const r=m0(e,n),{scroll:o}=t;return o&&(an(r.x,o.offset.x),an(r.y,o.offset.y)),r}const NT=new WeakMap;class MT{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ke(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=l=>{this.stopAnimation(),n&&this.snapToCursor(Ma(l,"page").point)},i=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$y(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$t(m=>{let v=this.getAxisMotionValue(m).get()||0;if(_t.test(v)){const{projection:P}=this.visualElement;if(P&&P.layout){const b=P.layout.layoutBox[m];b&&(v=at(b)*(parseFloat(v)/100))}}this.originPoint[m]=v}),f&&pe.update(()=>f(l,u),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=LT(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new c0(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&pe.update(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Gi(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=yT(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},o=this.constraints;t&&$r(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=bT(r.layoutBox,t):this.constraints=!1,this.elastic=PT(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&$t(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=ST(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$r(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=$T(r,o.root,this.visualElement.getTransformPagePoint());let s=xT(o.layout.layoutBox,i);if(n){const a=n(CT(s));this.hasMutatedConstraints=!!a,a&&(s=f0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=$t(c=>{if(!Gi(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Kd(t,r,0,n))}stopAnimation(){$t(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){$t(n=>{const{drag:r}=this.getProps();if(!Gi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-ve(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!$r(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};$t(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();o[s]=wT({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),$t(s=>{if(!Gi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(ve(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;NT.set(this.visualElement,this);const t=this.visualElement.current,n=Ht(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();$r(l)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const s=Ut(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&($t(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=ac,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Gi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function LT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AT extends Ln{constructor(t){super(t),this.removeGroupControls=we,this.removeListeners=we,this.controls=new MT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||we}unmount(){this.removeGroupControls(),this.removeListeners()}}const xh=e=>(t,n)=>{e&&pe.update(()=>e(t,n))};class OT extends Ln{constructor(){super(...arguments),this.removePointerDownListener=we}onPointerDown(t){this.session=new c0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:xh(t),onStart:xh(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&pe.update(()=>o(i,s))}}}mount(){this.removePointerDownListener=Ht(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function _T(){const e=y.useContext(Ta);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=y.useId();return y.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const cs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const yo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=wh(e,t.target.x),r=wh(e,t.target.y);return`${n}% ${r}%`}},DT={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Rn.parse(e);if(o.length>5)return r;const i=Rn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const u=ve(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}};class jT extends re.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;UP(IT),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),cs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||pe.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function g0(e){const[t,n]=_T(),r=y.useContext(Ld);return re.createElement(jT,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(fy),isPresent:t,safeToRemove:n})}const IT={borderRadius:{...yo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yo,borderTopRightRadius:yo,borderBottomLeftRadius:yo,borderBottomRightRadius:yo,boxShadow:DT},v0=["TopLeft","TopRight","BottomLeft","BottomRight"],FT=v0.length,Sh=e=>typeof e=="string"?parseFloat(e):e,Ph=e=>typeof e=="number"||K.test(e);function VT(e,t,n,r,o,i){o?(e.opacity=ve(0,n.opacity!==void 0?n.opacity:1,BT(r)),e.opacityExit=ve(t.opacity!==void 0?t.opacity:1,0,zT(r))):i&&(e.opacity=ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(si(e,t,r))}function Eh(e,t){e.min=t.min,e.max=t.max}function dt(e,t){Eh(e.x,t.x),Eh(e.y,t.y)}function Th(e,t,n,r,o){return e-=t,e=na(e,1/n,r),o!==void 0&&(e=na(e,1/o,r)),e}function UT(e,t=0,n=1,r=.5,o,i=e,s=e){if(_t.test(t)&&(t=parseFloat(t),t=ve(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ve(i.min,i.max,r);e===i&&(a-=t),e.min=Th(e.min,t,n,a,o),e.max=Th(e.max,t,n,a,o)}function kh(e,t,[n,r,o],i,s){UT(e,t[n],t[r],t[o],t.scale,i,s)}const WT=["x","scaleX","originX"],HT=["y","scaleY","originY"];function Rh(e,t,n,r){kh(e.x,t,WT,n?n.x:void 0,r?r.x:void 0),kh(e.y,t,HT,n?n.y:void 0,r?r.y:void 0)}function $h(e){return e.translate===0&&e.scale===1}function b0(e){return $h(e.x)&&$h(e.y)}function KT(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function x0(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Nh(e){return at(e.x)/at(e.y)}class GT{constructor(){this.members=[]}add(t){Gd(this.members,t),t.scheduleRender()}remove(t){if(Qd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Mh(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const QT=(e,t)=>e.depth-t.depth;class XT{constructor(){this.children=[],this.isDirty=!1}add(t){Gd(this.children,t),this.isDirty=!0}remove(t){Qd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QT),this.isDirty=!1,this.children.forEach(t)}}function YT(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Jt(r),e(i-t))};return pe.read(r,!0),()=>Jt(r)}function qT(e){window.MotionDebug&&window.MotionDebug.record(e)}function JT(e){return e instanceof SVGElement&&e.tagName!=="svg"}function ZT(e,t,n){const r=tt(e)?e:Gr(e);return r.start(Kd("",r,t,n)),r.animation}const Lh=["","X","Y","Z"],Ah=1e3;let ek=0;const Fn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function w0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=ek++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Fn.totalNodes=Fn.resolvedTargetDeltas=Fn.recalculatedProjection=0,this.nodes.forEach(rk),this.nodes.forEach(lk),this.nodes.forEach(uk),this.nodes.forEach(ok),qT(Fn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=YT(f,250),cs.hasAnimatedSinceResize&&(cs.hasAnimatedSinceResize=!1,this.nodes.forEach(_h))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||hk,{onLayoutAnimationStart:P,onLayoutAnimationComplete:b}=c.getProps(),h=!this.targetLayout||!x0(this.targetLayout,m)||p,g=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...s0(v,"layout"),onPlay:P,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||_h(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Jt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ck),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(ik),this.sharedNodes.forEach(dk)}scheduleUpdateProjection(){pe.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const C=S/1e3;Dh(d.x,s.x,C),Dh(d.y,s.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fk(this.relativeTarget,this.relativeTargetOrigin,f,C),g&&KT(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=ke()),dt(g,this.relativeTarget)),v&&(this.animationValues=c,VT(c,u,this.latestValues,C,h,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Jt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{cs.hasAnimatedSinceResize=!0,this.currentAnimation=ZT(0,Ah,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ah),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&S0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ke();const d=at(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=at(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}dt(a,l),Lr(a,c),Fo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new GT),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Oh),this.root.sharedNodes.clear()}}}function tk(e){e.updateLayout()}function nk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?$t(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=at(f);f.min=r[d].min,f.max=f.min+p}):S0(i,n.layoutBox,r)&&$t(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=at(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=Mr();Fo(a,r,n.layoutBox);const l=Mr();s?Fo(l,e.applyTransform(o,!0),n.measuredBox):Fo(l,r,n.layoutBox);const u=!b0(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=ke();Vo(m,n.layoutBox,f.layoutBox);const v=ke();Vo(v,r,p.layoutBox),x0(m,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rk(e){Fn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ok(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ik(e){e.clearSnapshot()}function Oh(e){e.clearMeasurements()}function sk(e){e.isLayoutDirty=!1}function ak(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _h(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lk(e){e.resolveTargetDelta()}function uk(e){e.calcProjection()}function ck(e){e.resetRotation()}function dk(e){e.removeLeadSnapshot()}function Dh(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jh(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function fk(e,t,n,r){jh(e.x,t.x,n.x,r),jh(e.y,t.y,n.y,r)}function pk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const hk={duration:.45,ease:[.4,0,.1,1]},Ih=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Fh=Ih("applewebkit/")&&!Ih("chrome/")?Math.round:we;function Vh(e){e.min=Fh(e.min),e.max=Fh(e.max)}function mk(e){Vh(e.x),Vh(e.y)}function S0(e,t,n){return e==="position"||e==="preserve-aspect"&&!sc(Nh(t),Nh(n),.2)}const gk=w0({attachResizeListener:(e,t)=>Ut(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ll={current:void 0},P0=w0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ll.current){const e=new gk({});e.mount(window),e.setOptions({layoutScroll:!0}),Ll.current=e}return Ll.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vk={pan:{Feature:OT},drag:{Feature:AT,ProjectionNode:P0,MeasureLayout:g0}},yk=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function bk(e){const t=yk.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function cc(e,t,n=1){const[r,o]=bk(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():Zu(o)?cc(o,t,n+1):o}function xk(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const i=o.get();if(!Zu(i))return;const s=cc(i,r);s&&o.set(s)});for(const o in t){const i=t[o];if(!Zu(i))continue;const s=cc(i,r);s&&(t[o]=s,n||(n={}),n[o]===void 0&&(n[o]=i))}return{target:t,transitionEnd:n}}const wk=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),C0=e=>wk.has(e),Sk=e=>Object.keys(e).some(C0),Bh=e=>e===or||e===K,zh=(e,t)=>parseFloat(e.split(", ")[t]),Uh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return zh(o[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?zh(i[1],e):0}},Pk=new Set(["x","y","z"]),Ck=gi.filter(e=>!Pk.has(e));function Ek(e){const t=[];return Ck.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Qr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Uh(4,13),y:Uh(5,14)};Qr.translateX=Qr.x;Qr.translateY=Qr.y;const Tk=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Qr[u](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(a[u]),e[u]=Qr[u](l,i)}),e},kk=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(C0);let i=[],s=!1;const a=[];if(o.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=vo(c);const f=t[l];let p;if(qs(f)){const m=f.length,v=f[0]===null?1:0;c=f[v],d=vo(c);for(let P=v;P=0?window.pageYOffset:null,u=Tk(t,e,a);return i.length&&i.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),ka&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Rk(e,t,n,r){return Sk(t)?kk(e,t,n,r):{target:t,transitionEnd:r}}const $k=(e,t,n,r)=>{const o=xk(e,t,r);return t=o.target,r=o.transitionEnd,Rk(e,t,n,r)},dc={current:null},E0={current:!1};function Nk(){if(E0.current=!0,!!ka)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dc.current=e.matches;e.addListener(t),t()}else dc.current=!1}function Mk(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(tt(i))e.addValue(o,i),ta(r)&&r.add(o);else if(tt(s))e.addValue(o,Gr(i,{owner:e})),ta(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(o);e.addValue(o,Gr(a!==void 0?a:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Wh=new WeakMap,T0=Object.keys(ii),Lk=T0.length,Hh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ak=Md.length;class Ok{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>pe.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.isControllingVariants=$a(n),this.isVariantNode=dy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const f=c[d];a[d]!==void 0&&tt(f)&&(f.set(a[d],!1),ta(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Wh.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),E0.current||Nk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:dc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Wh.delete(this.current),this.projection&&this.projection.unmount(),Jt(this.notifyUpdate),Jt(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=rr.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&pe.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,i){let s,a;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:f,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ke()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=Vd(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!tt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class k0 extends Ok{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},i){let s=ZE(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),s&&(s=o(s))),i){qE(this,r,s);const a=$k(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function _k(e){return window.getComputedStyle(e)}class Dk extends k0{readValueFromInstance(t,n){if(rr.has(n)){const r=Hd(n);return r&&r.default||0}else{const r=_k(t),o=(my(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return m0(t,n)}build(t,n,r,o){Od(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Fd(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;tt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){wy(t,n,r,o)}}class jk extends k0{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rr.has(n)){const r=Hd(n);return r&&r.default||0}return n=Sy.has(n)?n:Id(n),t.getAttribute(n)}measureInstanceViewportBox(){return ke()}scrapeMotionValuesFromProps(t,n){return Cy(t,n)}build(t,n,r,o){Dd(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){Py(t,n,r,o)}mount(t){this.isSVGTag=jd(t.tagName),super.mount(t)}}const Ik=(e,t)=>Ad(e)?new jk(t,{enableHardwareAcceleration:!1}):new Dk(t,{enableHardwareAcceleration:!0}),Fk={layout:{ProjectionNode:P0,MeasureLayout:g0}},Vk={...pT,...LC,...vk,...Fk},Yd=BP((e,t)=>gC(e,t,Vk,Ik));function R0(){const e=y.useRef(!1);return Qs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Bk(){const e=R0(),[t,n]=y.useState(0),r=y.useCallback(()=>{e.current&&n(t+1)},[t]);return[y.useCallback(()=>pe.postRender(r),[r]),t]}class zk extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Uk({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),o=y.useRef({width:0,height:0,top:0,left:0});return y.useInsertionEffect(()=>{const{width:i,height:s,top:a,left:l}=o.current;if(t||!r.current||!i||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${i}px !important; height: ${s}px !important; top: ${a}px !important; left: ${l}px !important; } `),()=>{document.head.removeChild(u)}},[t]),y.createElement(zk,{isPresent:t,childRef:r,sizeRef:o},y.cloneElement(e,{ref:r}))}const Al=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Ey(Wk),l=y.useId(),u=y.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c=>{a.set(c,!0);for(const d of a.values())if(!d)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),i?void 0:[n]);return y.useMemo(()=>{a.forEach((c,d)=>a.set(d,!1))},[n]),y.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=y.createElement(Uk,{isPresent:n},e)),y.createElement(Ta.Provider,{value:u},e)};function Wk(){return new Map}function Hk(e){return y.useEffect(()=>()=>e(),[])}const hr=e=>e.key||"";function Kk(e,t){e.forEach(n=>{const r=hr(n);t.set(r,n)})}function Gk(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const $0=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{const a=y.useContext(Ld).forceRender||Bk()[0],l=R0(),u=Gk(e);let c=u;const d=y.useRef(new Map).current,f=y.useRef(c),p=y.useRef(new Map).current,m=y.useRef(!0);if(Qs(()=>{m.current=!1,Kk(u,p),f.current=c}),Hk(()=>{m.current=!0,p.clear(),d.clear()}),m.current)return y.createElement(y.Fragment,null,c.map(h=>y.createElement(Al,{key:hr(h),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s},h)));c=[...c];const v=f.current.map(hr),P=u.map(hr),b=v.length;for(let h=0;h{if(P.indexOf(g)!==-1)return;const S=p.get(g);if(!S)return;const C=v.indexOf(g);let T=h;if(!T){const k=()=>{p.delete(g),d.delete(g);const x=f.current.findIndex($=>$.key===g);if(f.current.splice(x,1),!d.size){if(f.current=u,l.current===!1)return;a(),r&&r()}};T=y.createElement(Al,{key:hr(S),isPresent:!1,onExitComplete:k,custom:t,presenceAffectsLayout:i,mode:s},S),d.set(g,T)}c.splice(C,0,T)}),c=c.map(h=>{const g=h.key;return d.has(g)?h:y.createElement(Al,{key:hr(h),isPresent:!0,presenceAffectsLayout:i,mode:s},h)}),y.createElement(y.Fragment,null,d.size?c:c.map(h=>y.cloneElement(h)))};var Kh={ease:[.36,.66,.4,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],spring:[.155,1.105,.295,1.12],springOut:[.57,-.15,.62,.07],softSpring:[.16,1.11,.3,1.02]},Qk=()=>N.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[N.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),N.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[BN,Xk]=$d({name:"AvatarGroupContext",strict:!1}),Yk=globalThis!=null&&globalThis.document?y.useLayoutEffect:y.useEffect;function qk(e={}){const{loading:t,src:n,srcSet:r,onLoad:o,onError:i,crossOrigin:s,sizes:a,ignoreFallback:l}=e,[u,c]=y.useState("pending");y.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=y.useRef(),f=y.useCallback(()=>{if(!n)return;p();const m=new Image;m.src=n,s&&(m.crossOrigin=s),r&&(m.srcset=r),a&&(m.sizes=a),t&&(m.loading=t),m.onload=v=>{p(),c("loaded"),o==null||o(v)},m.onerror=v=>{p(),c("failed"),i==null||i(v)},d.current=m},[n,s,r,a,o,i,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return Yk(()=>{if(!l)return u==="loading"&&f(),()=>{p()}},[u,f,l]),l?"loaded":u}function Jk(e={}){var t,n,r,o,i;const s=Xk(),a=!!s,{as:l,ref:u,src:c,name:d,icon:f,classNames:p,fallback:m,alt:v=d||"avatar",imgRef:P,color:b=(t=s==null?void 0:s.color)!=null?t:"default",radius:h=(n=s==null?void 0:s.radius)!=null?n:"full",size:g=(r=s==null?void 0:s.size)!=null?r:"md",isBordered:S=(o=s==null?void 0:s.isBordered)!=null?o:!1,isDisabled:C=(i=s==null?void 0:s.isDisabled)!=null?i:!1,isFocusable:T=!1,getInitials:k=gP,ignoreFallback:x=!1,showFallback:$=!1,ImgComponent:F="img",imgProps:M,className:z,onError:L,...O}=e,U=l||"span",J=et(u),ie=et(P),{isFocusVisible:_,isFocused:A,focusProps:I}=Kr(),{isHovered:w,hoverProps:E}=Pa({isDisabled:C}),V=qk({src:c,onError:L,ignoreFallback:x})==="loaded",H=(!c||!V)&&$,W=y.useMemo(()=>{var Te;return mP({color:b,radius:h,size:g,isBordered:S,isDisabled:C,isInGroup:a,isInGridGroup:(Te=s==null?void 0:s.isGrid)!=null?Te:!1})},[b,h,g,S,C,a,s==null?void 0:s.isGrid]),G=me(p==null?void 0:p.base,z),ne=y.useMemo(()=>T||l==="button",[T,l]),Z=y.useCallback((Te={})=>({ref:J,tabIndex:ne?0:-1,"data-hover":Y(w),"data-focus":Y(A),"data-focus-visible":Y(_),className:W.base({class:me(G,Te==null?void 0:Te.className)}),...Se(O,E,ne?I:{})}),[ne,W,G,I,O]),ae=y.useCallback((Te={})=>({ref:ie,src:c,"data-loaded":Y(V),className:W.img({class:p==null?void 0:p.img}),...Se(M,Te)}),[W,V,M,c,ie]);return{Component:U,ImgComponent:F,src:c,alt:v,icon:f,name:d,imgRef:ie,slots:W,classNames:p,fallback:m,isImgLoaded:V,showFallback:H,ignoreFallback:x,getInitials:k,getAvatarProps:Z,getImageProps:ae}}var N0=ct((e,t)=>{const{Component:n,ImgComponent:r,src:o,icon:i=N.jsx(Qk,{}),alt:s,classNames:a,slots:l,name:u,showFallback:c,fallback:d,getInitials:f,getAvatarProps:p,getImageProps:m}=Jk({...e,ref:t}),v=y.useMemo(()=>!c&&o?null:d?N.jsx("div",{"aria-label":s,className:l.fallback({class:a==null?void 0:a.fallback}),role:"img",children:d}):u?N.jsx("span",{"aria-label":s,className:l.name({class:a==null?void 0:a.name}),role:"img",children:f(u)}):N.jsx("span",{"aria-label":s,className:l.icon({class:a==null?void 0:a.icon}),role:"img",children:i}),[c,o,d,u,a]);return N.jsxs(n,{...p(),children:[o&&N.jsx(r,{...m(),alt:s}),v]})});N0.displayName="NextUI.Avatar";var Zk=N0;function M0(e,t){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:s,onPressChange:a,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:c,href:d,target:f,rel:p,type:m="button",allowTextSelectionOnPress:v}=e,P;n==="button"?P={type:m,disabled:r}:P={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:d,target:n==="a"?f:void 0,type:n==="input"?m:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:b,isPressed:h}=Pd({onPressStart:i,onPressEnd:s,onPressChange:a,onPress:o,isDisabled:r,preventFocusOnPress:l,allowTextSelectionOnPress:v,ref:t}),{focusableProps:g}=kd(e,t);u&&(g.tabIndex=r?-1:g.tabIndex);let S=Se(g,b,wd(e,{labelable:!0}));return{isPressed:h,buttonProps:Se(P,S,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:C=>{c&&c(C)}})}}var e2=(e,t,n)=>Math.min(Math.max(e,t),n),L0=({ripples:e=[],motionProps:t,color:n="currentColor",style:r})=>N.jsx(N.Fragment,{children:e.map(o=>{const i=e2(.01*o.size,.2,o.size>100?.75:.5);return N.jsx($0,{mode:"popLayout",children:N.jsx(Yd.span,{animate:{transform:"scale(2)",opacity:0},className:"nextui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:n,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",zIndex:10,top:o.y,left:o.x,width:`${o.size}px`,height:`${o.size}px`,...r},transition:{duration:i},...t})},o.key)})});L0.displayName="NextUI.Ripple";var t2=L0;function n2(e={}){const{removeAfter:t=1e3,...n}=e,[r,o]=y.useState([]);y.useEffect(()=>{const s=r.map((a,l)=>setTimeout(()=>{o(u=>u.filter((c,d)=>d!==l))},t));return()=>{s.forEach(a=>clearTimeout(a))}},[r]);const i=y.useCallback(s=>{const a=s.currentTarget,l=Math.max(a.clientWidth,a.clientHeight),u=a.getBoundingClientRect();o(c=>[...c,{key:new Date().getTime(),size:l,x:s.clientX-u.x-l/2,y:s.clientY-u.y-l/2}])},[]);return{ripples:r,onClick:i,...n}}var[r2,A0]=$d({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within "}),O0=ct((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=et(t),{slots:u,classNames:c}=A0(),d=me(c==null?void 0:c.body,o);return N.jsx(a,{ref:l,className:(n=u.body)==null?void 0:n.call(u,{class:d}),...s,children:i})});O0.displayName="NextUI.CardBody";var o2=O0,_0=ct((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=et(t),{slots:u,classNames:c}=A0(),d=me(c==null?void 0:c.header,o);return N.jsx(a,{ref:l,className:(n=u.header)==null?void 0:n.call(u,{class:d}),...s,children:i})});_0.displayName="NextUI.CardHeader";var i2=_0;function s2(e){const[t,n]=Ca(e,Bp.variantKeys),{ref:r,as:o,children:i,disableRipple:s=!1,onClick:a,onPress:l,autoFocus:u,className:c,classNames:d,allowTextSelectionOnPress:f=!0,...p}=t,m=et(r),v=o||(e.isPressable?"button":"div"),P=typeof v=="string",b=me(d==null?void 0:d.base,c),{onClick:h,ripples:g}=n2(),S=U=>{!e.disableAnimation&&!s&&m.current&&h(U)},{buttonProps:C,isPressed:T}=M0({onPress:l,elementType:o,isDisabled:!e.isPressable,onClick:Sa(a,S),allowTextSelectionOnPress:f,...p},m),{hoverProps:k,isHovered:x}=Pa({isDisabled:!e.isHoverable,...p}),{isFocusVisible:$,isFocused:F,focusProps:M}=Kr({autoFocus:u}),z=y.useMemo(()=>Bp({...n}),[...Object.values(n)]),L=y.useMemo(()=>({isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,disableAnimation:e.disableAnimation,fullWidth:e.fullWidth,slots:z,classNames:d}),[z,d,e.isDisabled,e.isFooterBlurred,e.disableAnimation,e.fullWidth]),O=y.useCallback((U={})=>({ref:m,className:z.base({class:b}),tabIndex:e.isPressable?0:-1,"data-hover":Y(x),"data-pressed":Y(T),"data-focus":Y(F),"data-focus-visible":Y($),"data-disabled":Y(e.isDisabled),...Se(e.isPressable?{...C,...M,role:"button"}:{},e.isHoverable?k:{},Ju(p,{enabled:P}),Ju(U))}),[m,z,b,P,e.isPressable,e.isHoverable,e.isDisabled,x,T,$,C,M,k,p]);return{context:L,domRef:m,Component:v,classNames:d,children:i,ripples:g,isHovered:x,isPressed:T,isPressable:e.isPressable,isHoverable:e.isHoverable,disableAnimation:e.disableAnimation,disableRipple:s,handleClick:S,isFocusVisible:$,getCardProps:O}}var D0=ct((e,t)=>{const{children:n,context:r,Component:o,ripples:i,isPressable:s,disableAnimation:a,disableRipple:l,getCardProps:u}=s2({...e,ref:t});return N.jsxs(o,{...u(),children:[N.jsx(r2,{value:r,children:n}),s&&!a&&!l&&N.jsx(t2,{ripples:i})]})});D0.displayName="NextUI.Card";var a2=D0;function l2(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=zs(t);let s=zs(),a={};n?(r=r?`${s} ${r}`:s,a={id:s,htmlFor:i==="label"?t:void 0}):!r&&!o&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=$w({id:t,"aria-label":o,"aria-labelledby":r});return{labelProps:a,fieldProps:l}}function u2(e){let{description:t,errorMessage:n,validationState:r}=e,{labelProps:o,fieldProps:i}=l2(e),s=xp([!!t,!!n,r]),a=xp([!!t,!!n,r]);return i=Se(i,{"aria-describedby":[s,a,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:i,descriptionProps:{id:s},errorMessageProps:{id:a}}}function c2(e={}){let{isReadOnly:t}=e,[n,r]=xd(e.isSelected,e.defaultSelected||!1,e.onChange);function o(s){t||r(s)}function i(){t||r(!n)}return{isSelected:n,setSelected:o,toggle:i}}function d2(e,t){let{elementType:n="a",onPress:r,onPressStart:o,onPressEnd:i,onClick:s,isDisabled:a,...l}=e,u={};n!=="a"&&(u={role:"link",tabIndex:a?void 0:0});let{focusableProps:c}=kd(e,t),{pressProps:d,isPressed:f}=Pd({onPress:r,onPressStart:o,onPressEnd:i,isDisabled:a,ref:t}),p=wd(l,{labelable:!0}),m=Se(c,d);return{isPressed:f,linkProps:Se(p,{...m,...u,"aria-disabled":a||void 0,"aria-current":e["aria-current"],onClick:v=>{var P;(P=d.onClick)===null||P===void 0||P.call(d,v),s&&(s(v),console.warn("onClick is deprecated, please use onPress"))}})}}function f2(e){var t,n;const[r,o]=Ca(e,Fp.variantKeys),{ref:i,as:s,children:a,anchorIcon:l,isExternal:u=!1,showAnchorIcon:c=!1,autoFocus:d=!1,className:f,onPress:p,onPressStart:m,onPressEnd:v,onClick:P,...b}=r,h=s||"a",g=et(i),{linkProps:S}=d2({...b,onPress:p,onPressStart:m,onPressEnd:v,onClick:P,isDisabled:e.isDisabled,elementType:`${s}`},g),{isFocused:C,isFocusVisible:T,focusProps:k}=Kr({autoFocus:d});u&&(b.rel=(t=b.rel)!=null?t:"noopener noreferrer",b.target=(n=b.target)!=null?n:"_blank");const x=y.useMemo(()=>Fp({...o,className:f}),[...Object.values(o),f]),$=y.useCallback(()=>({ref:g,className:x,"data-focus":Y(C),"data-disabled":Y(e.isDisabled),"data-focus-visible":Y(T),...Se(k,S,b)}),[x,C,T,k,S,b]);return{Component:h,children:a,anchorIcon:l,showAnchorIcon:c,getLinkProps:$}}var j0=ct((e,t)=>{const{Component:n,children:r,showAnchorIcon:o,anchorIcon:i=N.jsx(MP,{className:hP}),getLinkProps:s}=f2({ref:t,...e});return N.jsx(n,{...s(),children:N.jsxs(N.Fragment,{children:[r,o&&i]})})});j0.displayName="NextUI.Link";var Gh=j0;function p2(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,validationState:s,type:a="text",onChange:l=()=>{}}=e,{focusableProps:u}=kd(e,t),{labelProps:c,fieldProps:d,descriptionProps:f,errorMessageProps:p}=u2(e),m=wd(e,{labelable:!0});const v={type:a,pattern:e.pattern};return{labelProps:c,inputProps:Se(m,n==="input"&&v,{disabled:r,readOnly:i,"aria-required":o||void 0,"aria-invalid":s==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:e.value,defaultValue:e.value?void 0:e.defaultValue,onChange:P=>l(P.target.value),autoComplete:e.autoComplete,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...u,...d}),descriptionProps:f,errorMessageProps:p}}function h2(e){var t,n;const[r,o]=Ca(e,Ip.variantKeys),{ref:i,as:s,label:a,description:l,errorMessage:u,className:c,classNames:d,autoFocus:f,startContent:p,endContent:m,onClear:v,onChange:P,onValueChange:b=()=>{},...h}=r,g=y.useCallback(Q=>{b(Q??"")},[b]),[S,C]=xd((t=r.value)!=null?t:void 0,(n=r.defaultValue)!=null?n:void 0,g),T=s||"div",k=me(d==null?void 0:d.base,c,S?"is-filled":""),x=e.isMultiline,$=et(i),F=y.useCallback(()=>{C(""),$.current&&($.current.value="",$.current.focus()),v==null||v()},[$,C,v]),{labelProps:M,inputProps:z,descriptionProps:L,errorMessageProps:O}=p2({...e,"aria-label":vP(e==null?void 0:e["aria-label"],e==null?void 0:e.label,e==null?void 0:e.placeholder),inputElementType:x?"textarea":"input",value:S,onChange:C},$),{isFocusVisible:U,isFocused:J,focusProps:ie}=Kr({autoFocus:f,isTextInput:!0}),{isHovered:_,hoverProps:A}=Pa({isDisabled:!!(e!=null&&e.isDisabled)}),{focusProps:I,isFocusVisible:w}=Kr(),{pressProps:E}=Pd({isDisabled:!!(e!=null&&e.isDisabled),onPress:F}),j=r.validationState==="invalid",V=y.useMemo(()=>{var Q;return(!e.labelPlacement||e.labelPlacement==="inside")&&!a?"outside":(Q=e.labelPlacement)!=null?Q:"inside"},[e.labelPlacement,a]),H=!r.placeholder&&V!=="outside-left"&&!x,W=!!v||e.isClearable,G=!!a||!!l||!!u,ne=!!r.placeholder,Z=!!l||!!u,ae=V==="outside"||V==="outside-left",Te=V==="inside",On=!!p,he=y.useMemo(()=>Ip({...o,isInvalid:j,isClearable:W,labelPlacement:V,isLabelPlaceholder:H&&!On}),[...Object.values(o),j,V,W,H,On]),R1=y.useCallback((Q={})=>({className:he.base({class:k}),"data-focus-visible":Y(U),"data-readonly":Y(e.isReadOnly),"data-focus":Y(J),"data-hover":Y(_),"data-required":Y(e.isRequired),"data-invalid":Y(j),"data-disabled":Y(e.isDisabled),"data-has-elements":Y(G),"data-has-helper":Y(Z),...Q}),[he,k,J,_,j,Z,G,U,e.isReadOnly,e.isRequired,e.isDisabled]),$1=y.useCallback((Q={})=>({className:he.label({class:d==null?void 0:d.label}),...M,...Q}),[he,M,d==null?void 0:d.label]),N1=y.useCallback((Q={})=>({ref:$,className:he.input({class:me(d==null?void 0:d.input,S?"is-filled":"")}),...Se(ie,z,Ju(h),Q),required:e.isRequired,"aria-readonly":Y(e.isReadOnly),"aria-required":Y(e.isRequired),onChange:Sa(z.onChange,P)}),[he,S,ie,z,h,d==null?void 0:d.input,e.isReadOnly,e.isRequired,P]),M1=y.useCallback((Q={})=>({"data-hover":Y(_),className:he.inputWrapper({class:me(d==null?void 0:d.inputWrapper,S?"is-filled":"")}),onClick:uf=>{var cf;uf.target===uf.currentTarget&&((cf=$.current)==null||cf.focus())},...Se(Q,A),style:{cursor:"text",...Q.style}}),[he,_,S,d==null?void 0:d.inputWrapper]),L1=y.useCallback((Q={})=>({...Q,className:he.innerWrapper({class:me(d==null?void 0:d.innerWrapper,Q==null?void 0:Q.className)})}),[he,d==null?void 0:d.innerWrapper]),A1=y.useCallback((Q={})=>({...Q,className:he.mainWrapper({class:me(d==null?void 0:d.mainWrapper,Q==null?void 0:Q.className)})}),[he,d==null?void 0:d.mainWrapper]),O1=y.useCallback((Q={})=>({...Q,className:he.helperWrapper({class:me(d==null?void 0:d.helperWrapper,Q==null?void 0:Q.className)})}),[he,d==null?void 0:d.helperWrapper]),_1=y.useCallback((Q={})=>({...Q,...L,className:he.description({class:me(d==null?void 0:d.description,Q==null?void 0:Q.className)})}),[he,d==null?void 0:d.description]),D1=y.useCallback((Q={})=>({...Q,...O,className:he.errorMessage({class:me(d==null?void 0:d.errorMessage,Q==null?void 0:Q.className)})}),[he,O,d==null?void 0:d.errorMessage]),j1=y.useCallback((Q={})=>({...Q,role:"button",tabIndex:0,"data-focus-visible":Y(w),className:he.clearButton({class:me(d==null?void 0:d.clearButton,Q==null?void 0:Q.className)}),...Se(E,I)}),[he,w,E,I,d==null?void 0:d.clearButton]);return{Component:T,classNames:d,domRef:$,label:a,description:l,startContent:p,endContent:m,labelPlacement:V,isClearable:W,isInvalid:j,hasHelper:Z,shouldLabelBeOutside:ae,shouldLabelBeInside:Te,hasPlaceholder:ne,errorMessage:u,getBaseProps:R1,getLabelProps:$1,getInputProps:N1,getMainWrapperProps:A1,getInputWrapperProps:M1,getInnerWrapperProps:L1,getHelperWrapperProps:O1,getDescriptionProps:_1,getErrorMessageProps:D1,getClearButtonProps:j1}}var I0=ct((e,t)=>{const{Component:n,label:r,description:o,isClearable:i,startContent:s,endContent:a,labelPlacement:l,hasPlaceholder:u,hasHelper:c,shouldLabelBeOutside:d,shouldLabelBeInside:f,errorMessage:p,getBaseProps:m,getLabelProps:v,getInputProps:P,getInnerWrapperProps:b,getInputWrapperProps:h,getMainWrapperProps:g,getHelperWrapperProps:S,getDescriptionProps:C,getErrorMessageProps:T,getClearButtonProps:k}=h2({...e,ref:t}),x=r?N.jsx("label",{...v(),children:r}):null,$=y.useMemo(()=>i?N.jsx("span",{...k(),children:a||N.jsx(LP,{})}):a,[i,k]),F=y.useMemo(()=>c?N.jsx("div",{...S(),children:p?N.jsx("div",{...T(),children:p}):o?N.jsx("div",{...C(),children:o}):null}):null,[c,p,o,S,T,C]),M=y.useMemo(()=>s||$?N.jsxs("div",{...b(),children:[s,N.jsx("input",{...P()}),$]}):N.jsx("input",{...P()}),[s,$,P,b]),z=y.useMemo(()=>d?N.jsxs("div",{...g(),children:[N.jsxs("div",{...h(),children:[l==="outside"&&!u?x:null,M]}),F]}):N.jsxs(N.Fragment,{children:[N.jsxs("div",{...h(),children:[x,M]}),F]}),[l,F,d,f,u,x,M,p,o,g,h,T,C]);return N.jsxs(n,{...m(),children:[d&&(l==="outside-left"||u)?x:null,z]})});I0.displayName="NextUI.Input";var m2=I0,ds="right-scroll-bar-position",fs="width-before-scroll-bar",g2="with-scroll-bars-hidden",v2="--removed-body-scroll-bar-size";function y2(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function b2(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function x2(e,t){return b2(t||null,function(n){return e.forEach(function(r){return y2(r,n)})})}function w2(e){return e}function S2(e,t){t===void 0&&(t=w2);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var c=s;s=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),n}}}};return o}function P2(e){e===void 0&&(e={});var t=S2(null);return t.options=Mt({async:!0,ssr:!1},e),t}var F0=function(e){var t=e.sideCar,n=Vv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Mt({},n))};F0.isSideCarExport=!0;function C2(e,t){return e.useMedium(t),F0}var V0=P2(),Ol=function(){},Aa=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Ol,onWheelCapture:Ol,onTouchMoveCapture:Ol}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,P=e.as,b=P===void 0?"div":P,h=e.gapMode,g=Vv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,C=x2([n,t]),T=Mt(Mt({},g),o);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:V0,removeScrollBar:u,shards:d,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:h}),s?y.cloneElement(y.Children.only(a),Mt(Mt({},T),{ref:C})):y.createElement(b,Mt({},T,{className:l,ref:C}),a))});Aa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Aa.classNames={fullWidth:fs,zeroRight:ds};var Qh,E2=function(){if(Qh)return Qh;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function T2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E2();return t&&e.setAttribute("nonce",t),e}function k2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function R2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=T2())&&(k2(t,n),R2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},N2=function(){var e=$2();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},B0=function(){var e=N2(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},M2={left:0,top:0,right:0,gap:0},_l=function(e){return parseInt(e||"",10)||0},L2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[_l(n),_l(r),_l(o)]},A2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M2;var t=L2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},O2=B0(),_2=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(g2,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } body { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(o,`px; padding-top: `).concat(i,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(ds,` { right: `).concat(a,"px ").concat(r,`; } .`).concat(fs,` { margin-right: `).concat(a,"px ").concat(r,`; } .`).concat(ds," .").concat(ds,` { right: 0 `).concat(r,`; } .`).concat(fs," .").concat(fs,` { margin-right: 0 `).concat(r,`; } body { `).concat(v2,": ").concat(a,`px; } `)},D2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=y.useMemo(function(){return A2(o)},[o]);return y.createElement(O2,{styles:_2(i,!t,o,n?"":"!important")})},fc=!1;if(typeof window<"u")try{var Qi=Object.defineProperty({},"passive",{get:function(){return fc=!0,!0}});window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{fc=!1}var cr=fc?{passive:!1}:!1,j2=function(e){return e.tagName==="TEXTAREA"},z0=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!j2(e)&&n[t]==="visible")},I2=function(e){return z0(e,"overflowY")},F2=function(e){return z0(e,"overflowX")},Xh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=U0(e,r);if(o){var i=W0(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},V2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},U0=function(e,t){return e==="v"?I2(t):F2(t)},W0=function(e,t){return e==="v"?V2(t):B2(t)},z2=function(e,t){return e==="h"&&t==="rtl"?-1:1},U2=function(e,t,n,r,o){var i=z2(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,c=s>0,d=0,f=0;do{var p=W0(e,a),m=p[0],v=p[1],P=p[2],b=v-P-i*m;(m||b)&&U0(e,a)&&(d+=b,f+=m),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(o&&d===0||!o&&s>d)||!c&&(o&&f===0||!o&&-s>f))&&(u=!0),u},Xi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yh=function(e){return[e.deltaX,e.deltaY]},qh=function(e){return e&&"current"in e?e.current:e},W2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H2=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},K2=0,dr=[];function G2(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(K2++)[0],i=y.useState(B0)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=zw([e.lockRef.current],(e.shards||[]).map(qh),!0).filter(Boolean);return v.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(v,P){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var b=Xi(v),h=n.current,g="deltaX"in v?v.deltaX:h[0]-b[0],S="deltaY"in v?v.deltaY:h[1]-b[1],C,T=v.target,k=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in v&&k==="h"&&T.type==="range")return!1;var x=Xh(k,T);if(!x)return!0;if(x?C=k:(C=k==="v"?"h":"v",x=Xh(k,T)),!x)return!1;if(!r.current&&"changedTouches"in v&&(g||S)&&(r.current=C),!C)return!0;var $=r.current||C;return U2($,P,v,$==="h"?g:S,!0)},[]),l=y.useCallback(function(v){var P=v;if(!(!dr.length||dr[dr.length-1]!==i)){var b="deltaY"in P?Yh(P):Xi(P),h=t.current.filter(function(C){return C.name===P.type&&C.target===P.target&&W2(C.delta,b)})[0];if(h&&h.should){P.cancelable&&P.preventDefault();return}if(!h){var g=(s.current.shards||[]).map(qh).filter(Boolean).filter(function(C){return C.contains(P.target)}),S=g.length>0?a(P,g[0]):!s.current.noIsolation;S&&P.cancelable&&P.preventDefault()}}},[]),u=y.useCallback(function(v,P,b,h){var g={name:v,delta:P,target:b,should:h};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(S){return S!==g})},1)},[]),c=y.useCallback(function(v){n.current=Xi(v),r.current=void 0},[]),d=y.useCallback(function(v){u(v.type,Yh(v),v.target,a(v,e.lockRef.current))},[]),f=y.useCallback(function(v){u(v.type,Xi(v),v.target,a(v,e.lockRef.current))},[]);y.useEffect(function(){return dr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,cr),document.addEventListener("touchmove",l,cr),document.addEventListener("touchstart",c,cr),function(){dr=dr.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,cr),document.removeEventListener("touchmove",l,cr),document.removeEventListener("touchstart",c,cr)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(i,{styles:H2(o)}):null,p?y.createElement(D2,{gapMode:e.gapMode}):null)}const Q2=C2(V0,G2);var H0=y.forwardRef(function(e,t){return y.createElement(Aa,Mt({},e,{ref:t,sideCar:Q2}))});H0.classNames=Aa.classNames;const X2=H0;var[Y2,to]=$d({name:"NavbarContext",strict:!0,errorMessage:"useNavbarContext: `context` is undefined. Seems you forgot to wrap component within "}),q2={enter:{height:"calc(100vh - var(--navbar-height) - 1px)",transition:{duration:.3,easings:"easeOut"}},exit:{height:0,transition:{duration:.25,easings:"easeIn"}}},K0=ct((e,t)=>{var n,r;const{className:o,children:i,portalContainer:s,motionProps:a,style:l,...u}=e,c=et(t),{slots:d,isMenuOpen:f,height:p,disableAnimation:m,classNames:v}=to(),P=me(v==null?void 0:v.menu,o),b=y.useCallback(({children:g})=>N.jsx(X2,{forwardProps:!0,enabled:f,removeScrollBar:!1,children:g}),[f]),h=m?N.jsx(b,{children:N.jsx("ul",{ref:c,className:(n=d.menu)==null?void 0:n.call(d,{class:P}),"data-open":Y(f),style:{"--navbar-height":p},...u,children:i})}):N.jsx($0,{children:f?N.jsx(b,{children:N.jsx(Yd.ul,{ref:c,layoutScroll:!0,animate:"enter",className:(r=d.menu)==null?void 0:r.call(d,{class:P}),"data-open":Y(f),exit:"exit",initial:"exit",style:{"--navbar-height":p,...l},variants:q2,...Se(a,u),children:i})}):null});return N.jsx(PS,{portalContainer:s,children:h})});K0.displayName="NextUI.NavbarMenu";var G0=K0,J2={visible:{y:0,transition:{ease:Kh.easeOut}},hidden:{y:"-100%",transition:{ease:Kh.easeIn}}},Z2=typeof window<"u";function Jh(e){return Z2?e?{x:e.scrollLeft,y:e.scrollTop}:{x:window.scrollX,y:window.scrollY}:{x:0,y:0}}var eR=e=>{const{elementRef:t,delay:n=30,callback:r,isEnabled:o}=e,i=y.useRef(o?Jh(t==null?void 0:t.current):{x:0,y:0});let s=null;const a=()=>{const l=Jh(t==null?void 0:t.current);typeof r=="function"&&r({prevPos:i.current,currPos:l}),i.current=l,s=null};return y.useEffect(()=>{if(!o)return;const l=()=>{n?s===null&&(s=setTimeout(a,n)):a()},u=(t==null?void 0:t.current)||window;return u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)},[t==null?void 0:t.current,n,o]),i.current};function tR(e){var t;const[n,r]=Ca(e,Vp.variantKeys),{ref:o,as:i,parentRef:s,height:a="4rem",shouldHideOnScroll:l=!1,disableScrollHandler:u=!1,onScrollPositionChange:c,isMenuOpen:d,isMenuDefaultOpen:f,onMenuOpenChange:p=()=>{},motionProps:m,className:v,classNames:P,...b}=n,h=i||"nav",g=et(o),S=y.useRef(0),C=y.useRef(0),[T,k]=y.useState(!1),[x,$]=xd(d,f,p),F=()=>{if(g.current){const U=g.current.offsetWidth;U!==S.current&&(S.current=U)}};Mw({ref:g,onResize:()=>{var U;((U=g.current)==null?void 0:U.offsetWidth)!==S.current&&(F(),$(!1))}}),y.useEffect(()=>{var U;F(),C.current=((U=g.current)==null?void 0:U.offsetHeight)||0},[]);const M=y.useMemo(()=>Vp({...r,hideOnScroll:l}),[...Object.values(r),l]),z=me(P==null?void 0:P.base,v);eR({elementRef:s,isEnabled:l||!u,callback:({prevPos:U,currPos:J})=>{c==null||c(J.y),l&&k(ie=>{const _=J.y>U.y&&J.y>C.current;return _!==ie?_:ie})}});const L=(U={})=>({...Se(b,U),"data-hidden":Y(T),"data-menu-open":Y(x),ref:g,className:M.base({class:me(z,U==null?void 0:U.className)}),style:{"--navbar-height":a,...U==null?void 0:U.style}}),O=(U={})=>({...U,"data-menu-open":Y(x),className:M.wrapper({class:me(P==null?void 0:P.wrapper,U==null?void 0:U.className)})});return{Component:h,slots:M,domRef:g,height:a,isHidden:T,disableAnimation:(t=e.disableAnimation)!=null?t:!1,shouldHideOnScroll:l,isMenuOpen:x,classNames:P,setIsMenuOpen:$,motionProps:m,getBaseProps:L,getWrapperProps:O}}var Q0=ct((e,t)=>{const{children:n,...r}=e,o=tR({...r,ref:t}),i=o.Component,[s,a]=TP(n,G0),l=N.jsxs(N.Fragment,{children:[N.jsx("header",{...o.getWrapperProps(),children:s}),a]});return N.jsx(Y2,{value:o,children:o.shouldHideOnScroll?N.jsx(Yd.nav,{animate:o.isHidden?"hidden":"visible",initial:!1,variants:J2,...Se(o.getBaseProps(),o.motionProps),children:l}):N.jsx(i,{...o.getBaseProps(),children:l})})});Q0.displayName="NextUI.Navbar";var nR=Q0,X0=ct((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=et(t),{slots:u,classNames:c}=to(),d=me(c==null?void 0:c.brand,o);return N.jsx(a,{ref:l,className:(n=u.brand)==null?void 0:n.call(u,{class:d}),...s,children:i})});X0.displayName="NextUI.NavbarBrand";var rR=X0,Y0=ct((e,t)=>{var n;const{as:r,className:o,children:i,justify:s="start",...a}=e,l=r||"ul",u=et(t),{slots:c,classNames:d}=to(),f=me(d==null?void 0:d.content,o);return N.jsx(l,{ref:u,className:(n=c.content)==null?void 0:n.call(c,{class:f}),"data-justify":s,...a,children:i})});Y0.displayName="NextUI.NavbarContent";var pc=Y0,q0=ct((e,t)=>{var n;const{as:r,className:o,children:i,isActive:s,...a}=e,l=r||"li",u=et(t),{slots:c,classNames:d}=to(),f=me(d==null?void 0:d.item,o);return N.jsx(l,{ref:u,className:(n=c.item)==null?void 0:n.call(c,{class:f}),"data-active":Y(s),...a,children:i})});q0.displayName="NextUI.NavbarItem";var J0=q0,Z0=ct((e,t)=>{var n;const{className:r,children:o,...i}=e,s=et(t),{slots:a,isMenuOpen:l,classNames:u}=to(),c=me(u==null?void 0:u.menuItem,r);return N.jsx("li",{ref:s,className:(n=a.menuItem)==null?void 0:n.call(a,{class:c}),"data-open":Y(l),...i,children:o})});Z0.displayName="NextUI.NavbarMenuItem";var oR=Z0;function iR(e,t,n){const{isSelected:r}=t,{isPressed:o,buttonProps:i}=M0({...e,onPress:Sa(t.toggle,e.onPress)},n);return{isPressed:o,buttonProps:Se(i,{"aria-pressed":r})}}var e1=ct((e,t)=>{var n;const{as:r,icon:o,className:i,onChange:s,autoFocus:a,srOnlyText:l,...u}=e,c=r||"button",d=et(t),{slots:f,classNames:p,isMenuOpen:m,setIsMenuOpen:v}=to(),b=c2({...u,isSelected:m,onChange:M=>{s==null||s(M),v(M)}}),{buttonProps:h,isPressed:g}=iR(e,b,d),{isFocusVisible:S,focusProps:C}=Kr({autoFocus:a}),{isHovered:T,hoverProps:k}=Pa({}),x=me(p==null?void 0:p.toggle,i),$=y.useMemo(()=>typeof o=="function"?o(m):o||N.jsx("span",{className:f.toggleIcon({class:p==null?void 0:p.toggleIcon})}),[o,f.toggleIcon,p==null?void 0:p.toggleIcon]),F=y.useMemo(()=>l||(b.isSelected?"close navigation menu":"open navigation menu"),[l,m]);return N.jsxs(c,{ref:d,className:(n=f.toggle)==null?void 0:n.call(f,{class:x}),"data-focus-visible":Y(S),"data-hover":Y(T),"data-open":Y(m),"data-pressed":Y(g),...Se(h,C,k,u),children:[N.jsx("span",{className:f.srOnly(),children:F}),$]})});e1.displayName="NextUI.NavbarMenuToggle";var sR=e1,qd={};function t1(e,t){return function(){return e.apply(t,arguments)}}const{toString:aR}=Object.prototype,{getPrototypeOf:Jd}=Object,Oa=(e=>t=>{const n=aR.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=e=>(e=e.toLowerCase(),t=>Oa(t)===e),_a=e=>t=>typeof t===e,{isArray:no}=Array,ai=_a("undefined");function lR(e){return e!==null&&!ai(e)&&e.constructor!==null&&!ai(e.constructor)&>(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const n1=Dt("ArrayBuffer");function uR(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&n1(e.buffer),t}const cR=_a("string"),gt=_a("function"),r1=_a("number"),Da=e=>e!==null&&typeof e=="object",dR=e=>e===!0||e===!1,ps=e=>{if(Oa(e)!=="object")return!1;const t=Jd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},fR=Dt("Date"),pR=Dt("File"),hR=Dt("Blob"),mR=Dt("FileList"),gR=e=>Da(e)&>(e.pipe),vR=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||gt(e.append)&&((t=Oa(e))==="formdata"||t==="object"&>(e.toString)&&e.toString()==="[object FormData]"))},yR=Dt("URLSearchParams"),bR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),no(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const i1=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Bl)(),s1=e=>!ai(e)&&e!==i1;function hc(){const{caseless:e}=s1(this)&&this||{},t={},n=(r,o)=>{const i=e&&o1(t,o)||o;ps(t[i])&&ps(r)?t[i]=hc(t[i],r):ps(r)?t[i]=hc({},r):no(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(xi(t,(o,i)=>{n&>(o)?e[i]=t1(o,n):e[i]=o},{allOwnKeys:r}),e),wR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),SR=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},PR=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Jd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CR=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ER=e=>{if(!e)return null;if(no(e))return e;let t=e.length;if(!r1(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},TR=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Jd(Uint8Array)),kR=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},RR=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$R=Dt("HTMLFormElement"),NR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Zh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),MR=Dt("RegExp"),a1=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};xi(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},LR=e=>{a1(e,(t,n)=>{if(gt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(gt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},AR=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return no(e)?r(e):r(String(e).split(t)),n},OR=()=>{},_R=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Dl="abcdefghijklmnopqrstuvwxyz",em="0123456789",l1={DIGIT:em,ALPHA:Dl,ALPHA_DIGIT:Dl+Dl.toUpperCase()+em},DR=(e=16,t=l1.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function jR(e){return!!(e&>(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const IR=e=>{const t=new Array(10),n=(r,o)=>{if(Da(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=no(r)?[]:{};return xi(r,(s,a)=>{const l=n(s,o+1);!ai(l)&&(i[a]=l)}),t[o]=void 0,i}}return r};return n(e,0)},FR=Dt("AsyncFunction"),VR=e=>e&&(Da(e)||gt(e))&>(e.then)&>(e.catch);var R={isArray:no,isArrayBuffer:n1,isBuffer:lR,isFormData:vR,isArrayBufferView:uR,isString:cR,isNumber:r1,isBoolean:dR,isObject:Da,isPlainObject:ps,isUndefined:ai,isDate:fR,isFile:pR,isBlob:hR,isRegExp:MR,isFunction:gt,isStream:gR,isURLSearchParams:yR,isTypedArray:TR,isFileList:mR,forEach:xi,merge:hc,extend:xR,trim:bR,stripBOM:wR,inherits:SR,toFlatObject:PR,kindOf:Oa,kindOfTest:Dt,endsWith:CR,toArray:ER,forEachEntry:kR,matchAll:RR,isHTMLForm:$R,hasOwnProperty:Zh,hasOwnProp:Zh,reduceDescriptors:a1,freezeMethods:LR,toObjectSet:AR,toCamelCase:NR,noop:OR,toFiniteNumber:_R,findKey:o1,global:i1,isContextDefined:s1,ALPHABET:l1,generateString:DR,isSpecCompliantForm:jR,toJSONObject:IR,isAsyncFn:FR,isThenable:VR};function ee(e,t,n,r,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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}R.inherits(ee,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:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const u1=ee.prototype,c1={};["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=>{c1[e]={value:e}});Object.defineProperties(ee,c1);Object.defineProperty(u1,"isAxiosError",{value:!0});ee.from=(e,t,n,r,o,i)=>{const s=Object.create(u1);return R.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var BR=null;function mc(e){return R.isPlainObject(e)||R.isArray(e)}function d1(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function tm(e,t,n){return e?e.concat(t).map(function(o,i){return o=d1(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function zR(e){return R.isArray(e)&&!e.some(mc)}const UR=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function ja(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,P){return!R.isUndefined(P[v])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(R.isDate(m))return m.toISOString();if(!l&&R.isBlob(m))throw new ee("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(m)||R.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,P){let b=m;if(m&&!P&&typeof m=="object"){if(R.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(R.isArray(m)&&zR(m)||(R.isFileList(m)||R.endsWith(v,"[]"))&&(b=R.toArray(m)))return v=d1(v),b.forEach(function(g,S){!(R.isUndefined(g)||g===null)&&t.append(s===!0?tm([v],S,i):s===null?v:v+"[]",u(g))}),!1}return mc(m)?!0:(t.append(tm(P,v,i),u(m)),!1)}const d=[],f=Object.assign(UR,{defaultVisitor:c,convertValue:u,isVisitable:mc});function p(m,v){if(!R.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(m),R.forEach(m,function(b,h){(!(R.isUndefined(b)||b===null)&&o.call(t,b,R.isString(h)?h.trim():h,v,f))===!0&&p(b,v?v.concat(h):[h])}),d.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return p(e),t}function nm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Zd(e,t){this._pairs=[],e&&ja(e,this,t)}const f1=Zd.prototype;f1.append=function(t,n){this._pairs.push([t,n])};f1.toString=function(t){const n=t?function(r){return t.call(this,r,nm)}:nm;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function WR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function p1(e,t,n){if(!t)return e;const r=n&&n.encode||WR,o=n&&n.serialize;let i;if(o?i=o(t,n):i=R.isURLSearchParams(t)?t.toString():new Zd(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class HR{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}var rm=HR,h1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},KR=typeof URLSearchParams<"u"?URLSearchParams:Zd,GR=typeof FormData<"u"?FormData:null,QR=typeof Blob<"u"?Blob:null;const XR=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),YR=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")();var Lt={isBrowser:!0,classes:{URLSearchParams:KR,FormData:GR,Blob:QR},isStandardBrowserEnv:XR,isStandardBrowserWebWorkerEnv:YR,protocols:["http","https","file","blob","url","data"]};function qR(e,t){return ja(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Lt.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function JR(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ZR(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return s=!s&&R.isArray(o)?o.length:s,l?(R.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!R.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&R.isArray(o[s])&&(o[s]=ZR(o[s])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(JR(r),o,n,0)}),n}return null}const e$={"Content-Type":void 0};function t$(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ia={transitional:h1,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o&&o?JSON.stringify(m1(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qR(t,this.formSerializer).toString();if((a=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ja(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),t$(t)):t}],transformResponse:[function(t){const n=this.transitional||Ia.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&R.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],function(t){Ia.headers[t]={}});R.forEach(["post","put","patch"],function(t){Ia.headers[t]=R.merge(e$)});var ef=Ia;const n$=R.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"]);var r$=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&n$[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const om=Symbol("internals");function bo(e){return e&&String(e).trim().toLowerCase()}function hs(e){return e===!1||e==null?e:R.isArray(e)?e.map(hs):String(e)}function o$(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const i$=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function jl(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function s$(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function a$(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}class Fa{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,l,u){const c=bo(l);if(!c)throw new Error("header name must be a non-empty string");const d=R.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=hs(a))}const s=(a,l)=>R.forEach(a,(u,c)=>i(u,c,l));return R.isPlainObject(t)||t instanceof this.constructor?s(t,n):R.isString(t)&&(t=t.trim())&&!i$(t)?s(r$(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=bo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return o$(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=bo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||jl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=bo(s),s){const a=R.findKey(r,s);a&&(!n||jl(r,r[a],a,n))&&(delete r[a],o=!0)}}return R.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||jl(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,i)=>{const s=R.findKey(r,i);if(s){n[s]=hs(o),delete n[i];return}const a=t?s$(i):String(i).trim();a!==i&&delete n[i],n[a]=hs(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[om]=this[om]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=bo(s);r[a]||(a$(o,s),r[a]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}Fa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.freezeMethods(Fa.prototype);R.freezeMethods(Fa);var Gt=Fa;function Il(e,t){const n=this||ef,r=t||n,o=Gt.from(r.headers);let i=r.data;return R.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function g1(e){return!!(e&&e.__CANCEL__)}function wi(e,t,n){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(wi,ee,{__CANCEL__:!0});function l$(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var u$=Lt.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,a){const l=[];l.push(n+"="+encodeURIComponent(r)),R.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),R.isString(i)&&l.push("path="+i),R.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function c$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function d$(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function v1(e,t){return e&&!c$(t)?d$(e,t):t}var f$=Lt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const a=R.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function p$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function h$(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];s||(s=u),n[o]=l,r[o]=u;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,l=r(a),u=i<=s;n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-i)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const m$=typeof XMLHttpRequest<"u";var g$=m$&&function(e){return new Promise(function(n,r){let o=e.data;const i=Gt.from(e.headers).normalize(),s=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}R.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const c=v1(e.baseURL,e.url);u.open(e.method.toUpperCase(),p1(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function d(){if(!u)return;const p=Gt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),v={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};l$(function(b){n(b),l()},function(b){r(b),l()},v),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new ee("Request aborted",ee.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new ee("Network Error",ee.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||h1;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new ee(m,v.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,u)),u=null},Lt.isStandardBrowserEnv){const p=(e.withCredentials||f$(c))&&e.xsrfCookieName&&u$.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}o===void 0&&i.setContentType(null),"setRequestHeader"in u&&R.forEach(i.toJSON(),function(m,v){u.setRequestHeader(v,m)}),R.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&s!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",im(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",im(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{u&&(r(!p||p.type?new wi(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=p$(c);if(f&&Lt.protocols.indexOf(f)===-1){r(new ee("Unsupported protocol "+f+":",ee.ERR_BAD_REQUEST,e));return}u.send(o||null)})};const ms={http:BR,xhr:g$};R.forEach(ms,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var v$={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;oe instanceof Gt?e.toJSON():e;function Xr(e,t){t=t||{};const n={};function r(u,c,d){return R.isPlainObject(u)&&R.isPlainObject(c)?R.merge.call({caseless:d},u,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function o(u,c,d){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function i(u,c){if(!R.isUndefined(c))return r(void 0,c)}function s(u,c){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>o(am(u),am(c),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||o,f=d(e[c],t[c],c);R.isUndefined(f)&&d!==a||(n[c]=f)}),n}const y1="1.4.0",tf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lm={};tf.transitional=function(t,n,r){function o(i,s){return"[Axios v"+y1+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new ee(o(s," has been removed"+(n?" in "+n:"")),ee.ERR_DEPRECATED);return n&&!lm[s]&&(lm[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};function y$(e,t,n){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ee("option "+i+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}var gc={assertOptions:y$,validators:tf};const nn=gc.validators;class ra{constructor(t){this.defaults=t,this.interceptors={request:new rm,response:new rm}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&gc.assertOptions(r,{silentJSONParsing:nn.transitional(nn.boolean),forcedJSONParsing:nn.transitional(nn.boolean),clarifyTimeoutError:nn.transitional(nn.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:gc.assertOptions(o,{encode:nn.function,serialize:nn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&R.merge(i.common,i[n.method]),s&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Gt.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,d=0,f;if(!l){const m=[sm.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),f=m.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new wi(i,s,a),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new nf(function(o){t=o}),cancel:t}}}var b$=nf;function x$(e){return function(n){return e.apply(null,n)}}function w$(e){return R.isObject(e)&&e.isAxiosError===!0}const vc={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(vc).forEach(([e,t])=>{vc[t]=e});var S$=vc;function b1(e){const t=new gs(e),n=t1(gs.prototype.request,t);return R.extend(n,gs.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return b1(Xr(e,o))},n}const Me=b1(ef);Me.Axios=gs;Me.CanceledError=wi;Me.CancelToken=b$;Me.isCancel=g1;Me.VERSION=y1;Me.toFormData=ja;Me.AxiosError=ee;Me.Cancel=Me.CanceledError;Me.all=function(t){return Promise.all(t)};Me.spread=x$;Me.isAxiosError=w$;Me.mergeConfig=Xr;Me.AxiosHeaders=Gt;Me.formToJSON=e=>m1(R.isHTMLForm(e)?new FormData(e):e);Me.HttpStatusCode=S$;Me.default=Me;var P$=Me,C$=Bl&&Bl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qd,"__esModule",{value:!0});var x1=qd.PipedAPI=void 0;const E$=C$(P$);class T${constructor(t="https://pipedapi.kavin.rocks"){this.host=t}async _get(t){return(await E$.default.get(`${this.host}${t}`)).data}async trending(t){return await this._get(`/trending?region=${t}`)}async streams(t){return await this._get(`/streams/${t}`)}async comments(t,n){return n?await this._get(`/nextpage/comments/${t}?nextpage=${n}`):await this._get(`/comments/${t}`)}async channel(t,n){return n?await this._get(`/nextpage/channel/${t}?nextpage=${n}`):await this._get(`/channel/${t}`)}async channelByName(t){return await this._get(`/c/${t}`)}async user(t){return await this._get(`/user/${t}`)}async playlist(t,n){return n?await this._get(`/nextpage/playlists/${t}?nextpage=${n}`):await this._get(`/playlists/${t}`)}async suggestions(t){return await this._get(`/suggestions?query=${t}`)}async sponsors(t,n=["sponsor"]){return await this._get(`/sponsors/${t}?category=${JSON.stringify(n)}`)}async search(t,n="all"){return await this._get(`/search?q=${t}&filter=${n}`)}}x1=qd.PipedAPI=T$;/** * @remix-run/router v1.7.2 * * 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 li(){return li=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Va(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function R$(){return Math.random().toString(36).substr(2,8)}function cm(e,t){return{usr:e.state,key:e.key,idx:t}}function yc(e,t,n,r){return n===void 0&&(n=null),li({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ir(t):t,{state:n,key:t&&t.key||r||R$()})}function oa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ir(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function $$(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=pn.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(li({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=pn.Pop;let P=c(),b=P==null?null:P-u;u=P,l&&l({action:a,location:v.location,delta:b})}function f(P,b){a=pn.Push;let h=yc(v.location,P,b);n&&n(h,P),u=c()+1;let g=cm(h,u),S=v.createHref(h);try{s.pushState(g,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(S)}i&&l&&l({action:a,location:v.location,delta:1})}function p(P,b){a=pn.Replace;let h=yc(v.location,P,b);n&&n(h,P),u=c();let g=cm(h,u),S=v.createHref(h);s.replaceState(g,"",S),i&&l&&l({action:a,location:v.location,delta:0})}function m(P){let b=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof P=="string"?P:oa(P);return Ee(b,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,b)}let v={get action(){return a},get location(){return e(o,s)},listen(P){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(um,d),l=P,()=>{o.removeEventListener(um,d),l=null}},createHref(P){return t(o,P)},createURL:m,encodeLocation(P){let b=m(P);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(P){return s.go(P)}};return v}var dm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(dm||(dm={}));function N$(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?ir(t):t,o=rf(r.pathname||"/",n);if(o==null)return null;let i=w1(e);M$(i);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Ee(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Cn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Ee(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),w1(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:I$(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of S1(i.path))o(i,s,l)}),t}function S1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=S1(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function M$(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:F$(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const L$=/^:\w+$/,A$=3,O$=2,_$=1,D$=10,j$=-2,fm=e=>e==="*";function I$(e,t){let n=e.split("/"),r=n.length;return n.some(fm)&&(r+=j$),t&&(r+=O$),n.filter(o=>!fm(o)).reduce((o,i)=>o+(L$.test(i)?A$:i===""?_$:D$),r)}function F$(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function V$(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(c==="*"){let f=a[d]||"";s=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=W$(a[d]||"",c),u},{}),pathname:i,pathnameBase:s,pattern:e}}function z$(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Va(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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function U$(e){try{return decodeURI(e)}catch(t){return Va(!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 W$(e,t){try{return decodeURIComponent(e)}catch(n){return Va(!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 ("+n+").")),e}}function rf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function H$(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ir(e):e;return{pathname:n?n.startsWith("/")?n:K$(n,t):t,search:Q$(r),hash:X$(o)}}function K$(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Vl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function of(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sf(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ir(e):(o=li({},e),Ee(!o.pathname||!o.pathname.includes("?"),Vl("?","pathname","search",o)),Ee(!o.pathname||!o.pathname.includes("#"),Vl("#","pathname","hash",o)),Ee(!o.search||!o.search.includes("#"),Vl("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=H$(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Cn=e=>e.join("/").replace(/\/\/+/g,"/"),G$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,X$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Y$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const P1=["post","put","patch","delete"];new Set(P1);const q$=["get",...P1];new Set(q$);/** * React Router v6.14.2 * * 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 ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),s=y.useRef(!1);return E1(()=>{s.current=!0}),y.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let c=sf(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Cn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function T1(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=y.useContext(An),{pathname:o}=Si(),i=JSON.stringify(of(r).map(s=>s.pathnameBase));return y.useMemo(()=>sf(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function tN(e,t){return nN(e,t)}function nN(e,t,n){oo()||Ee(!1);let{navigator:r}=y.useContext(ro),{matches:o}=y.useContext(An),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=Si(),u;if(t){var c;let v=typeof t=="string"?ir(t):t;a==="/"||(c=v.pathname)!=null&&c.startsWith(a)||Ee(!1),u=v}else u=l;let d=u.pathname||"/",f=a==="/"?d:d.slice(a.length)||"/",p=N$(e,{pathname:f}),m=aN(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Cn([a,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:Cn([a,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n);return t&&m?y.createElement(Ba.Provider,{value:{location:ia({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:pn.Pop}},m):m}function rN(){let e=dN(),t=Y$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,i)}const oN=y.createElement(rN,null);class iN extends y.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?y.createElement(An.Provider,{value:this.props.routeContext},y.createElement(C1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sN(e){let{routeContext:t,match:n,children:r}=e,o=y.useContext(af);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(An.Provider,{value:t},r)}function aN(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||Ee(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,d=null;n&&(d=l.route.errorElement||oN);let f=t.concat(i.slice(0,u+1)),p=()=>{let m;return c?m=d:l.route.Component?m=y.createElement(l.route.Component,null):l.route.element?m=l.route.element:m=a,y.createElement(sN,{match:l,routeContext:{outlet:a,matches:f,isDataRoute:n!=null},children:m})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?y.createElement(iN,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:p(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):p()},null)}var bc;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(bc||(bc={}));var ui;(function(e){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"})(ui||(ui={}));function lN(e){let t=y.useContext(af);return t||Ee(!1),t}function uN(e){let t=y.useContext(J$);return t||Ee(!1),t}function cN(e){let t=y.useContext(An);return t||Ee(!1),t}function k1(e){let t=cN(),n=t.matches[t.matches.length-1];return n.route.id||Ee(!1),n.route.id}function dN(){var e;let t=y.useContext(C1),n=uN(ui.UseRouteError),r=k1(ui.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function fN(){let{router:e}=lN(bc.UseNavigateStable),t=k1(ui.UseNavigateStable),n=y.useRef(!1);return E1(()=>{n.current=!0}),y.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,ia({fromRouteId:t},i)))},[e,t])}function pN(e){let{to:t,replace:n,state:r,relative:o}=e;oo()||Ee(!1);let{matches:i}=y.useContext(An),{pathname:s}=Si(),a=lf(),l=sf(t,of(i).map(c=>c.pathnameBase),s,o==="path"),u=JSON.stringify(l);return y.useEffect(()=>a(JSON.parse(u),{replace:n,state:r,relative:o}),[a,u,o,n,r]),null}function xc(e){Ee(!1)}function hN(e){let{basename:t="/",children:n=null,location:r,navigationType:o=pn.Pop,navigator:i,static:s=!1}=e;oo()&&Ee(!1);let a=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=ir(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=r,m=y.useMemo(()=>{let v=rf(u,a);return v==null?null:{location:{pathname:v,search:c,hash:d,state:f,key:p},navigationType:o}},[a,u,c,d,f,p,o]);return m==null?null:y.createElement(ro.Provider,{value:l},y.createElement(Ba.Provider,{children:n,value:m}))}function mN(e){let{children:t,location:n}=e;return tN(wc(t),n)}var pm;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(pm||(pm={}));new Promise(()=>{});function wc(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,o)=>{if(!y.isValidElement(r))return;let i=[...t,o];if(r.type===y.Fragment){n.push.apply(n,wc(r.props.children,i));return}r.type!==xc&&Ee(!1),!r.props.index||!r.props.children||Ee(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=wc(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.14.2 * * 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 Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function vN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yN(e,t){return e.button===0&&(!t||t==="_self")&&!vN(e)}const bN=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],xN="startTransition",hm=eb[xN];function wN(e){let{basename:t,children:n,future:r,window:o}=e,i=y.useRef();i.current==null&&(i.current=k$({window:o,v5Compat:!0}));let s=i.current,[a,l]=y.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=y.useCallback(d=>{u&&hm?hm(()=>l(d)):l(d)},[l,u]);return y.useLayoutEffect(()=>s.listen(c),[s,c]),y.createElement(hN,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const SN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ko=y.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c}=t,d=gN(t,bN),{basename:f}=y.useContext(ro),p,m=!1;if(typeof u=="string"&&PN.test(u)&&(p=u,SN))try{let h=new URL(window.location.href),g=u.startsWith("//")?new URL(h.protocol+u):new URL(u),S=rf(g.pathname,f);g.origin===h.origin&&S!=null?u=S+g.search+g.hash:m=!0}catch{}let v=Z$(u,{relative:o}),P=CN(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o});function b(h){r&&r(h),h.defaultPrevented||P(h)}return y.createElement("a",Sc({},d,{href:p||v,onClick:m||i?r:b,ref:n,target:l}))});var mm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(mm||(mm={}));var gm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gm||(gm={}));function CN(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=lf(),l=Si(),u=T1(e,{relative:s});return y.useCallback(c=>{if(yN(c,n)){c.preventDefault();let d=r!==void 0?r:oa(l)===oa(u);a(e,{replace:d,state:o,preventScrollReset:i,relative:s})}},[l,a,u,r,o,n,e,i,s])}function EN({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"}))}const TN=y.forwardRef(EN),kN=TN;function RN({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{d:"M12 15a3 3 0 100-6 3 3 0 000 6z"}),y.createElement("path",{fillRule:"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z",clipRule:"evenodd"}))}const $N=y.forwardRef(RN),NN=$N;function MN({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z",clipRule:"evenodd"}))}const LN=y.forwardRef(MN),AN=LN;function ON(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":e.toString()}function _N({video:e}){const t=lf();return N.jsxs(a2,{isBlurred:!0,isPressable:!0,onPress:()=>t(e.url),shadow:"none",children:[N.jsx(i2,{children:N.jsx("img",{className:"w-full rounded-xl",src:e.thumbnail})}),N.jsxs(o2,{className:"flex gap-3 flex-row",children:[N.jsx(Zk,{className:"flex-none",src:e.uploaderAvatar}),N.jsxs("div",{className:"flex gap-3 flex-col",children:[N.jsx(Gh,{color:"foreground",href:`#${e.url}`,children:e.title}),N.jsx(Gh,{color:"foreground",href:`#${e.uploaderUrl}`,children:N.jsxs("div",{className:"flex flex-row items-center",children:[N.jsx("p",{className:"flex-none text-md",children:e.uploaderName}),e.uploaderVerified&&N.jsx(kN,{className:"w-6 h-6 p-1"})]})}),N.jsxs("div",{className:"flex flex-row items-center",children:[N.jsx(NN,{className:"w-6 h-6 p-1"}),N.jsx("p",{className:"flex-none text-md",children:`${ON(e.views)} • ${e.uploadedDate}`})]})]})]})]})}function DN(){const[e,t]=y.useState([]);return y.useEffect(()=>{async function n(){const r=await window.piped_api.trending("US");t(r)}e.length===0&&n()}),N.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5 gap-2 p-4",children:e.map(n=>N.jsx(_N,{video:n},n.url))})}function jN(){return N.jsxs(nR,{children:[N.jsxs(pc,{children:[N.jsx(sR,{className:"sm:hidden"}),N.jsx(rR,{children:N.jsx(ko,{className:"font-bold text-inherit",to:"/trending",children:"ULTYT"})})]}),N.jsx(pc,{className:"sm:flex gap-4",justify:"start",children:N.jsx(J0,{children:N.jsx(m2,{isClearable:!0,radius:"lg",placeholder:"Type to search...",startContent:N.jsx(AN,{className:"h-6 w-6"})})})}),N.jsx(IN,{})]})}function vm(e){let t,n;return e?(t=oR,n=G0):(t=J0,n=pc),N.jsxs(n,{className:"hidden sm:flex gap-4",justify:"center",children:[N.jsx(t,{children:N.jsx(ko,{to:"/trending",children:"Trending"})}),N.jsx(t,{children:N.jsx(ko,{to:"/feed",children:"Feed"})}),N.jsx(t,{children:N.jsx(ko,{to:"/playlists",children:"Playlists"})}),N.jsx(t,{children:N.jsx(ko,{to:"/preferences",children:"Preferences"})})]})}function IN(){return N.jsxs(N.Fragment,{children:[vm(!1),vm(!0)]})}function FN(){return window.piped_api=new x1,N.jsx(CS,{children:N.jsxs(wN,{children:[N.jsx(jN,{}),N.jsxs(mN,{children:[N.jsx(xc,{path:"/",element:N.jsx(pN,{to:"/trending"})}),N.jsx(xc,{path:"/trending",element:N.jsx(DN,{})})]})]})})}zl.createRoot(document.getElementById("root")).render(N.jsx(re.StrictMode,{children:N.jsx(FN,{})}));