(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function s(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function a(c){if(c.ep)return;c.ep=!0;const h=s(c);fetch(c.href,h)}})();var Ul={exports:{}},ri={},Wl={exports:{}},oe={};/** * @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 Xf;function Wg(){if(Xf)return oe;Xf=1;var r=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.iterator;function P(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,M={};function N(T,D,ne){this.props=T,this.context=D,this.refs=M,this.updater=ne||R}N.prototype.isReactComponent={},N.prototype.setState=function(T,D){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,D,"setState")},N.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function j(){}j.prototype=N.prototype;function B(T,D,ne){this.props=T,this.context=D,this.refs=M,this.updater=ne||R}var $=B.prototype=new j;$.constructor=B,V($,N.prototype),$.isPureReactComponent=!0;var ee=Array.isArray,G=Object.prototype.hasOwnProperty,te={current:null},ae={key:!0,ref:!0,__self:!0,__source:!0};function Z(T,D,ne){var se,ue={},ce=null,me=null;if(D!=null)for(se in D.ref!==void 0&&(me=D.ref),D.key!==void 0&&(ce=""+D.key),D)G.call(D,se)&&!ae.hasOwnProperty(se)&&(ue[se]=D[se]);var de=arguments.length-2;if(de===1)ue.children=ne;else if(1>>1,D=O[T];if(0>>1;Tc(ue,z))cec(me,ue)?(O[T]=me,O[ce]=z,T=ce):(O[T]=ue,O[se]=z,T=se);else if(cec(me,z))O[T]=me,O[ce]=z,T=ce;else break e}}return Q}function c(O,Q){var z=O.sortIndex-Q.sortIndex;return z!==0?z:O.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();r.unstable_now=function(){return f.now()-p}}var m=[],g=[],v=1,S=null,P=3,R=!1,V=!1,M=!1,N=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(O){for(var Q=s(g);Q!==null;){if(Q.callback===null)a(g);else if(Q.startTime<=O)a(g),Q.sortIndex=Q.expirationTime,i(m,Q);else break;Q=s(g)}}function ee(O){if(M=!1,$(O),!V)if(s(m)!==null)V=!0,Ye(G);else{var Q=s(g);Q!==null&&ie(ee,Q.startTime-O)}}function G(O,Q){V=!1,M&&(M=!1,j(Z),Z=-1),R=!0;var z=P;try{for($(Q),S=s(m);S!==null&&(!(S.expirationTime>Q)||O&&!qe());){var T=S.callback;if(typeof T=="function"){S.callback=null,P=S.priorityLevel;var D=T(S.expirationTime<=Q);Q=r.unstable_now(),typeof D=="function"?S.callback=D:S===s(m)&&a(m),$(Q)}else a(m);S=s(m)}if(S!==null)var ne=!0;else{var se=s(g);se!==null&&ie(ee,se.startTime-Q),ne=!1}return ne}finally{S=null,P=z,R=!1}}var te=!1,ae=null,Z=-1,xe=5,Ce=-1;function qe(){return!(r.unstable_now()-CeO||125T?(O.sortIndex=z,i(g,O),s(m)===null&&O===s(g)&&(M?(j(Z),Z=-1):M=!0,ie(ee,z-T))):(O.sortIndex=D,i(m,O),V||R||(V=!0,Ye(G))),O},r.unstable_shouldYield=qe,r.unstable_wrapCallback=function(O){var Q=P;return function(){var z=P;P=Q;try{return O.apply(this,arguments)}finally{P=z}}}}(Kl)),Kl}var ed;function Gg(){return ed||(ed=1,Hl.exports=Kg()),Hl.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 td;function Qg(){if(td)return it;td=1;var r=Pa(),i=Gg();function s(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"),m=Object.prototype.hasOwnProperty,g=/^[: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]*$/,v={},S={};function P(e){return m.call(S,e)?!0:m.call(v,e)?!1:g.test(e)?S[e]=!0:(v[e]=!0,!1)}function R(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function V(e,t,n,o){if(t===null||typeof t>"u"||R(e,t,n,o))return!0;if(o)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 M(e,t,n,o,l,u,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=d}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new M(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new M(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new M(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new M(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){N[e]=new M(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new M(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new M(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new M(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new M(e,5,!1,e.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function B(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(j,B);N[t]=new M(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(j,B);N[t]=new M(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(j,B);N[t]=new M(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new M(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new M(e,1,!1,e.toLowerCase(),null,!0,!0)});function $(e,t,n,o){var l=N.hasOwnProperty(t)?N[t]:null;(l!==null?l.type!==0:o||!(2y||l[d]!==u[y]){var w=` `+l[d].replace(" at new "," at ");return e.displayName&&w.includes("")&&(w=w.replace("",e.displayName)),w}while(1<=d&&0<=y);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function ue(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=se(e.type,!1),e;case 11:return e=se(e.type.render,!1),e;case 1:return e=se(e.type,!0),e;default:return""}}function ce(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 ae:return"Fragment";case te:return"Portal";case xe:return"Profiler";case Z:return"StrictMode";case Qe:return"Suspense";case Je:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qe:return(e.displayName||"Context")+".Consumer";case Ce:return(e._context.displayName||"Context")+".Provider";case ot:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case St:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case Ye:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}function me(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 ce(t);case 8:return t===Z?"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 de(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function we(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function st(e){var t=we(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(d){o=""+d,u.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(d){o=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yi(e){e._valueTracker||(e._valueTracker=st(e))}function eu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=we(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function vi(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 Yo(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tu(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=de(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nu(e,t){t=t.checked,t!=null&&$(e,"checked",t,!1)}function Xo(e,t){nu(e,t);var n=de(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zo(e,t.type,de(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ru(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,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 Zo(e,t,n){(t!=="number"||vi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vr=Array.isArray;function In(e,t,n,o){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=wi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Sr={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},Gp=["Webkit","ms","Moz","O"];Object.keys(Sr).forEach(function(e){Gp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sr[t]=Sr[e]})});function uu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Sr.hasOwnProperty(e)&&Sr[e]?(""+t).trim():t+"px"}function cu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,l=uu(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,l):e[n]=l}}var Qp=z({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 bo(e,t){if(t){if(Qp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function es(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 ts=null;function ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rs=null,zn=null,Bn=null;function fu(e){if(e=Wr(e)){if(typeof rs!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Wi(t),rs(e.stateNode,e.type,t))}}function du(e){zn?Bn?Bn.push(e):Bn=[e]:zn=e}function hu(){if(zn){var e=zn,t=Bn;if(Bn=zn=null,fu(e),t)for(e=0;e>>=0,e===0?32:31-(im(e)/om|0)|0}var ki=64,Ci=4194304;function kr(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 Ei(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,l=e.suspendedLanes,u=e.pingedLanes,d=n&268435455;if(d!==0){var y=d&~l;y!==0?o=kr(y):(u&=d,u!==0&&(o=kr(u)))}else d=n&~l,d!==0?o=kr(d):u!==0&&(o=kr(u));if(o===0)return 0;if(t!==0&&t!==o&&!(t&l)&&(l=o&-o,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Cr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xt(t),e[t]=n}function um(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 o=e.eventTimes;for(e=e.expirationTimes;0=_r),Uu=" ",Wu=!1;function $u(e,t){switch(e){case"keyup":return Om.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $n=!1;function zm(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Wu=!0,Uu);case"textInput":return e=t.data,e===Uu&&Wu?null:e;default:return null}}function Bm(e,t){if($n)return e==="compositionend"||!xs&&$u(e,t)?(e=Fu(),Li=ms=bt=null,$n=!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=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qu(n)}}function bu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ec(){for(var e=window,t=vi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vi(e.document)}return t}function ks(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 Xm(e){var t=ec(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bu(n.ownerDocument.documentElement,n)){if(o!==null&&ks(n)){if(t=o.start,e=o.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 l=n.textContent.length,u=Math.min(o.start,l);o=o.end===void 0?u:Math.min(o.end,l),!e.extend&&u>o&&(l=o,o=u,u=l),l=Ju(n,u);var d=Ju(n,o);l&&d&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>o?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.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,Hn=null,Cs=null,Or=null,Es=!1;function tc(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Es||Hn==null||Hn!==vi(o)||(o=Hn,"selectionStart"in o&&ks(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Or&&jr(Or,o)||(Or=o,o=zi(Cs,"onSelect"),0Xn||(e.current=Is[Xn],Is[Xn]=null,Xn--)}function ge(e,t){Xn++,Is[Xn]=e.current,e.current=t}var rn={},Be=nn(rn),be=nn(!1),xn=rn;function Zn(e,t){var n=e.type.contextTypes;if(!n)return rn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function et(e){return e=e.childContextTypes,e!=null}function $i(){ve(be),ve(Be)}function gc(e,t,n){if(Be.current!==rn)throw Error(s(168));ge(Be,t),ge(be,n)}function yc(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var l in o)if(!(l in t))throw Error(s(108,me(e)||"Unknown",l));return z({},n,o)}function Hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rn,xn=Be.current,ge(Be,e),ge(be,be.current),!0}function vc(e,t,n){var o=e.stateNode;if(!o)throw Error(s(169));n?(e=yc(e,t,xn),o.__reactInternalMemoizedMergedChildContext=e,ve(be),ve(Be),ge(Be,e)):ve(be),ge(be,n)}var jt=null,Ki=!1,zs=!1;function wc(e){jt===null?jt=[e]:jt.push(e)}function lg(e){Ki=!0,wc(e)}function on(){if(!zs&&jt!==null){zs=!0;var e=0,t=he;try{var n=jt;for(he=1;e>=d,l-=d,Ot=1<<32-xt(t)+l|n<b?(je=X,X=null):je=X.sibling;var fe=A(k,X,C[b],F);if(fe===null){X===null&&(X=je);break}e&&X&&fe.alternate===null&&t(k,X),x=u(fe,x,b),Y===null?K=fe:Y.sibling=fe,Y=fe,X=je}if(b===C.length)return n(k,X),Se&&Tn(k,b),K;if(X===null){for(;bb?(je=X,X=null):je=X.sibling;var pn=A(k,X,fe.value,F);if(pn===null){X===null&&(X=je);break}e&&X&&pn.alternate===null&&t(k,X),x=u(pn,x,b),Y===null?K=pn:Y.sibling=pn,Y=pn,X=je}if(fe.done)return n(k,X),Se&&Tn(k,b),K;if(X===null){for(;!fe.done;b++,fe=C.next())fe=_(k,fe.value,F),fe!==null&&(x=u(fe,x,b),Y===null?K=fe:Y.sibling=fe,Y=fe);return Se&&Tn(k,b),K}for(X=o(k,X);!fe.done;b++,fe=C.next())fe=I(X,k,b,fe.value,F),fe!==null&&(e&&fe.alternate!==null&&X.delete(fe.key===null?b:fe.key),x=u(fe,x,b),Y===null?K=fe:Y.sibling=fe,Y=fe);return e&&X.forEach(function(Ug){return t(k,Ug)}),Se&&Tn(k,b),K}function Me(k,x,C,F){if(typeof C=="object"&&C!==null&&C.type===ae&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case G:e:{for(var K=C.key,Y=x;Y!==null;){if(Y.key===K){if(K=C.type,K===ae){if(Y.tag===7){n(k,Y.sibling),x=l(Y,C.props.children),x.return=k,k=x;break e}}else if(Y.elementType===K||typeof K=="object"&&K!==null&&K.$$typeof===Ye&&Cc(K)===Y.type){n(k,Y.sibling),x=l(Y,C.props),x.ref=$r(k,Y,C),x.return=k,k=x;break e}n(k,Y);break}else t(k,Y);Y=Y.sibling}C.type===ae?(x=Ln(C.props.children,k.mode,F,C.key),x.return=k,k=x):(F=So(C.type,C.key,C.props,null,k.mode,F),F.ref=$r(k,x,C),F.return=k,k=F)}return d(k);case te:e:{for(Y=C.key;x!==null;){if(x.key===Y)if(x.tag===4&&x.stateNode.containerInfo===C.containerInfo&&x.stateNode.implementation===C.implementation){n(k,x.sibling),x=l(x,C.children||[]),x.return=k,k=x;break e}else{n(k,x);break}else t(k,x);x=x.sibling}x=jl(C,k.mode,F),x.return=k,k=x}return d(k);case Ye:return Y=C._init,Me(k,x,Y(C._payload),F)}if(vr(C))return W(k,x,C,F);if(Q(C))return H(k,x,C,F);Xi(k,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,x!==null&&x.tag===6?(n(k,x.sibling),x=l(x,C),x.return=k,k=x):(n(k,x),x=Fl(C,k.mode,F),x.return=k,k=x),d(k)):n(k,x)}return Me}var er=Ec(!0),Rc=Ec(!1),Zi=nn(null),qi=null,tr=null,Ks=null;function Gs(){Ks=tr=qi=null}function Qs(e){var t=Zi.current;ve(Zi),e._currentValue=t}function Ys(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function nr(e,t){qi=e,Ks=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tt=!0),e.firstContext=null)}function pt(e){var t=e._currentValue;if(Ks!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if(qi===null)throw Error(s(308));tr=e,qi.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var kn=null;function Xs(e){kn===null?kn=[e]:kn.push(e)}function Ac(e,t,n,o){var l=t.interleaved;return l===null?(n.next=n,Xs(t)):(n.next=l.next,l.next=n),t.interleaved=n,zt(e,o)}function zt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var sn=!1;function Zs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ln(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,le&2){var l=o.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),o.pending=t,zt(e,n)}return l=o.interleaved,l===null?(t.next=t,Xs(o)):(t.next=l.next,l.next=t),o.interleaved=t,zt(e,n)}function Ji(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,cs(e,n)}}function Dc(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?l=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?l=u=t:u=u.next=t}else l=u=t;n={baseState:o.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bi(e,t,n,o){var l=e.updateQueue;sn=!1;var u=l.firstBaseUpdate,d=l.lastBaseUpdate,y=l.shared.pending;if(y!==null){l.shared.pending=null;var w=y,E=w.next;w.next=null,d===null?u=E:d.next=E,d=w;var L=e.alternate;L!==null&&(L=L.updateQueue,y=L.lastBaseUpdate,y!==d&&(y===null?L.firstBaseUpdate=E:y.next=E,L.lastBaseUpdate=w))}if(u!==null){var _=l.baseState;d=0,L=E=w=null,y=u;do{var A=y.lane,I=y.eventTime;if((o&A)===A){L!==null&&(L=L.next={eventTime:I,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var W=e,H=y;switch(A=t,I=n,H.tag){case 1:if(W=H.payload,typeof W=="function"){_=W.call(I,_,A);break e}_=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=H.payload,A=typeof W=="function"?W.call(I,_,A):W,A==null)break e;_=z({},_,A);break e;case 2:sn=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,A=l.effects,A===null?l.effects=[y]:A.push(y))}else I={eventTime:I,lane:A,tag:y.tag,payload:y.payload,callback:y.callback,next:null},L===null?(E=L=I,w=_):L=L.next=I,d|=A;if(y=y.next,y===null){if(y=l.shared.pending,y===null)break;A=y,y=A.next,A.next=null,l.lastBaseUpdate=A,l.shared.pending=null}}while(!0);if(L===null&&(w=_),l.baseState=w,l.firstBaseUpdate=E,l.lastBaseUpdate=L,t=l.shared.interleaved,t!==null){l=t;do d|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);Rn|=d,e.lanes=d,e.memoizedState=_}}function Lc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var o=tl.transition;tl.transition={};try{e(!1),t()}finally{he=n,tl.transition=o}}function Zc(){return mt().memoizedState}function fg(e,t,n){var o=fn(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},qc(e))Jc(t,n);else if(n=Ac(e,t,n,o),n!==null){var l=Ze();Rt(n,e,o,l),bc(n,t,o)}}function dg(e,t,n){var o=fn(e),l={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(qc(e))Jc(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,y=u(d,n);if(l.hasEagerState=!0,l.eagerState=y,Pt(y,d)){var w=t.interleaved;w===null?(l.next=l,Xs(t)):(l.next=w.next,w.next=l),t.interleaved=l;return}}catch{}finally{}n=Ac(e,t,l,o),n!==null&&(l=Ze(),Rt(n,e,o,l),bc(n,t,o))}}function qc(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Jc(e,t){Qr=no=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bc(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,cs(e,n)}}var oo={readContext:pt,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},hg={readContext:pt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:Wc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ro(4194308,4,Kc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ro(4194308,4,e,t)},useInsertionEffect:function(e,t){return ro(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=Lt();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=fg.bind(null,Te,e),[o.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Bc,useDebugValue:al,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Bc(!1),t=e[0];return e=cg.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Te,l=Lt();if(Se){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Fe===null)throw Error(s(349));En&30||Fc(o,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,Wc(Oc.bind(null,o,u,e),[e]),o.flags|=2048,Zr(9,jc.bind(null,o,u,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Fe.identifierPrefix;if(Se){var n=It,o=Ot;n=(o&~(1<<32-xt(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=d.createElement(n,{is:o.is}):(e=d.createElement(n),n==="select"&&(d=e,o.multiple?d.multiple=!0:o.size&&(d.size=o.size))):e=d.createElementNS(e,n),e[Mt]=t,e[Ur]=o,Sf(e,t,!1,!1),t.stateNode=e;e:{switch(d=es(n,o),n){case"dialog":ye("cancel",e),ye("close",e),l=o;break;case"iframe":case"object":case"embed":ye("load",e),l=o;break;case"video":case"audio":for(l=0;llr&&(t.flags|=128,o=!0,qr(u,!1),t.lanes=4194304)}else{if(!o)if(e=eo(d),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!Se)return We(t),null}else 2*Ae()-u.renderingStartTime>lr&&n!==1073741824&&(t.flags|=128,o=!0,qr(u,!1),t.lanes=4194304);u.isBackwards?(d.sibling=t.child,t.child=d):(n=u.last,n!==null?n.sibling=d:t.child=d,u.last=d)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ae(),t.sibling=null,n=Pe.current,ge(Pe,o?n&1|2:n&1),t):(We(t),null);case 22:case 23:return Vl(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?ct&1073741824&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function xg(e,t){switch(Us(t),t.tag){case 1:return et(t.type)&&$i(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rr(),ve(be),ve(Be),el(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Js(t),null;case 13:if(ve(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(Pe),null;case 4:return rr(),null;case 10:return Qs(t.type._context),null;case 22:case 23:return Vl(),null;case 24:return null;default:return null}}var uo=!1,$e=!1,Pg=typeof WeakSet=="function"?WeakSet:Set,U=null;function or(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Ee(e,t,o)}else n.current=null}function Sl(e,t,n){try{n()}catch(o){Ee(e,t,o)}}var Tf=!1;function Tg(e,t){if(Vs=Mi,e=ec(),ks(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var l=o.anchorOffset,u=o.focusNode;o=o.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var d=0,y=-1,w=-1,E=0,L=0,_=e,A=null;t:for(;;){for(var I;_!==n||l!==0&&_.nodeType!==3||(y=d+l),_!==u||o!==0&&_.nodeType!==3||(w=d+o),_.nodeType===3&&(d+=_.nodeValue.length),(I=_.firstChild)!==null;)A=_,_=I;for(;;){if(_===e)break t;if(A===n&&++E===l&&(y=d),A===u&&++L===o&&(w=d),(I=_.nextSibling)!==null)break;_=A,A=_.parentNode}_=I}n=y===-1||w===-1?null:{start:y,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(_s={focusedElem:e,selectionRange:n},Mi=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var W=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var H=W.memoizedProps,Me=W.memoizedState,k=t.stateNode,x=k.getSnapshotBeforeUpdate(t.elementType===t.type?H:kt(t.type,H),Me);k.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(F){Ee(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return W=Tf,Tf=!1,W}function Jr(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&Sl(t,n,u)}l=l.next}while(l!==o)}}function co(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 o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function xl(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 kf(e){var t=e.alternate;t!==null&&(e.alternate=null,kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Ur],delete t[Os],delete t[og],delete t[sg])),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 Cf(e){return e.tag===5||e.tag===3||e.tag===4}function Ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cf(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 Pl(e,t,n){var o=e.tag;if(o===5||o===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=Ui));else if(o!==4&&(e=e.child,e!==null))for(Pl(e,t,n),e=e.sibling;e!==null;)Pl(e,t,n),e=e.sibling}function Tl(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Tl(e,t,n),e=e.sibling;e!==null;)Tl(e,t,n),e=e.sibling}var Oe=null,Ct=!1;function an(e,t,n){for(n=n.child;n!==null;)Rf(e,t,n),n=n.sibling}function Rf(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Ti,n)}catch{}switch(n.tag){case 5:$e||or(n,t);case 6:var o=Oe,l=Ct;Oe=null,an(e,t,n),Oe=o,Ct=l,Oe!==null&&(Ct?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(Ct?(e=Oe,n=n.stateNode,e.nodeType===8?js(e.parentNode,n):e.nodeType===1&&js(e,n),Dr(e)):js(Oe,n.stateNode));break;case 4:o=Oe,l=Ct,Oe=n.stateNode.containerInfo,Ct=!0,an(e,t,n),Oe=o,Ct=l;break;case 0:case 11:case 14:case 15:if(!$e&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){l=o=o.next;do{var u=l,d=u.destroy;u=u.tag,d!==void 0&&(u&2||u&4)&&Sl(n,t,d),l=l.next}while(l!==o)}an(e,t,n);break;case 1:if(!$e&&(or(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(y){Ee(n,t,y)}an(e,t,n);break;case 21:an(e,t,n);break;case 22:n.mode&1?($e=(o=$e)||n.memoizedState!==null,an(e,t,n),$e=o):an(e,t,n);break;default:an(e,t,n)}}function Af(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pg),t.forEach(function(o){var l=Vg.bind(null,e,o);n.has(o)||(n.add(o),o.then(l,l))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var o=0;ol&&(l=d),o&=~u}if(o=l,o=Ae()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Cg(o/1960))-o,10e?16:e,cn===null)var o=!1;else{if(e=cn,cn=null,go=0,le&6)throw Error(s(331));var l=le;for(le|=4,U=e.current;U!==null;){var u=U,d=u.child;if(U.flags&16){var y=u.deletions;if(y!==null){for(var w=0;wAe()-El?Mn(e,0):Cl|=n),rt(e,t)}function Uf(e,t){t===0&&(e.mode&1?(t=Ci,Ci<<=1,!(Ci&130023424)&&(Ci=4194304)):t=1);var n=Ze();e=zt(e,t),e!==null&&(Cr(e,t,n),rt(e,n))}function Lg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uf(e,n)}function Vg(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(s(314))}o!==null&&o.delete(t),Uf(e,n)}var Wf;Wf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||be.current)tt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return tt=!1,wg(e,t,n);tt=!!(e.flags&131072)}else tt=!1,Se&&t.flags&1048576&&Sc(t,Qi,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;ao(e,t),e=t.pendingProps;var l=Zn(t,Be.current);nr(t,n),l=rl(null,t,o,e,l,n);var u=il();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(o)?(u=!0,Hi(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Zs(t),l.updater=so,t.stateNode=l,l._reactInternals=t,cl(t,o,e,n),t=pl(null,t,o,!0,u,n)):(t.tag=0,Se&&u&&Bs(t),Xe(null,t,l,n),t=t.child),t;case 16:o=t.elementType;e:{switch(ao(e,t),e=t.pendingProps,l=o._init,o=l(o._payload),t.type=o,l=t.tag=Ng(o),e=kt(o,e),l){case 0:t=hl(null,t,o,e,n);break e;case 1:t=pf(null,t,o,e,n);break e;case 11:t=uf(null,t,o,e,n);break e;case 14:t=cf(null,t,o,kt(o.type,e),n);break e}throw Error(s(306,o,""))}return t;case 0:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:kt(o,l),hl(e,t,o,l,n);case 1:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:kt(o,l),pf(e,t,o,l,n);case 3:e:{if(mf(t),e===null)throw Error(s(387));o=t.pendingProps,u=t.memoizedState,l=u.element,Mc(e,t),bi(t,o,null,n);var d=t.memoizedState;if(o=d.element,u.isDehydrated)if(u={element:o,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=ir(Error(s(423)),t),t=gf(e,t,o,n,l);break e}else if(o!==l){l=ir(Error(s(424)),t),t=gf(e,t,o,n,l);break e}else for(ut=tn(t.stateNode.containerInfo.firstChild),at=t,Se=!0,Tt=null,n=Rc(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bn(),o===l){t=Ut(e,t,n);break e}Xe(e,t,o,n)}t=t.child}return t;case 5:return Vc(t),e===null&&$s(t),o=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,d=l.children,Ns(o,l)?d=null:u!==null&&Ns(o,u)&&(t.flags|=32),hf(e,t),Xe(e,t,d,n),t.child;case 6:return e===null&&$s(t),null;case 13:return yf(e,t,n);case 4:return qs(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=er(t,null,o,n):Xe(e,t,o,n),t.child;case 11:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:kt(o,l),uf(e,t,o,l,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,l=t.pendingProps,u=t.memoizedProps,d=l.value,ge(Zi,o._currentValue),o._currentValue=d,u!==null)if(Pt(u.value,d)){if(u.children===l.children&&!be.current){t=Ut(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var y=u.dependencies;if(y!==null){d=u.child;for(var w=y.firstContext;w!==null;){if(w.context===o){if(u.tag===1){w=Bt(-1,n&-n),w.tag=2;var E=u.updateQueue;if(E!==null){E=E.shared;var L=E.pending;L===null?w.next=w:(w.next=L.next,L.next=w),E.pending=w}}u.lanes|=n,w=u.alternate,w!==null&&(w.lanes|=n),Ys(u.return,n,t),y.lanes|=n;break}w=w.next}}else if(u.tag===10)d=u.type===t.type?null:u.child;else if(u.tag===18){if(d=u.return,d===null)throw Error(s(341));d.lanes|=n,y=d.alternate,y!==null&&(y.lanes|=n),Ys(d,n,t),d=u.sibling}else d=u.child;if(d!==null)d.return=u;else for(d=u;d!==null;){if(d===t){d=null;break}if(u=d.sibling,u!==null){u.return=d.return,d=u;break}d=d.return}u=d}Xe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,o=t.pendingProps.children,nr(t,n),l=pt(l),o=o(l),t.flags|=1,Xe(e,t,o,n),t.child;case 14:return o=t.type,l=kt(o,t.pendingProps),l=kt(o.type,l),cf(e,t,o,l,n);case 15:return ff(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:kt(o,l),ao(e,t),t.tag=1,et(o)?(e=!0,Hi(t)):e=!1,nr(t,n),tf(t,o,l),cl(t,o,l,n),pl(null,t,o,!0,e,n);case 19:return wf(e,t,n);case 22:return df(e,t,n)}throw Error(s(156,t.tag))};function $f(e,t){return xu(e,t)}function _g(e,t,n,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,o){return new _g(e,t,n,o)}function Nl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ng(e){if(typeof e=="function")return Nl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ot)return 11;if(e===St)return 14}return 2}function hn(e,t){var n=e.alternate;return n===null?(n=yt(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 So(e,t,n,o,l,u){var d=2;if(o=e,typeof e=="function")Nl(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case ae:return Ln(n.children,l,u,t);case Z:d=8,l|=8;break;case xe:return e=yt(12,n,t,l|2),e.elementType=xe,e.lanes=u,e;case Qe:return e=yt(13,n,t,l),e.elementType=Qe,e.lanes=u,e;case Je:return e=yt(19,n,t,l),e.elementType=Je,e.lanes=u,e;case ie:return xo(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ce:d=10;break e;case qe:d=9;break e;case ot:d=11;break e;case St:d=14;break e;case Ye:d=16,o=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=yt(d,n,t,l),t.elementType=e,t.type=o,t.lanes=u,t}function Ln(e,t,n,o){return e=yt(7,e,o,t),e.lanes=n,e}function xo(e,t,n,o){return e=yt(22,e,o,t),e.elementType=ie,e.lanes=n,e.stateNode={isHidden:!1},e}function Fl(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function jl(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fg(e,t,n,o,l){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=us(0),this.expirationTimes=us(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=us(0),this.identifierPrefix=o,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ol(e,t,n,o,l,u,d,y,w){return e=new Fg(e,t,n,y,w),t===1?(t=1,u===!0&&(t|=8)):t=0,u=yt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zs(u),e}function jg(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),$l.exports=Qg(),$l.exports}var rd;function Xg(){if(rd)return Ao;rd=1;var r=Yg();return Ao.createRoot=r.createRoot,Ao.hydrateRoot=r.hydrateRoot,Ao}var Zg=Xg();function qg(r){if(typeof Proxy>"u")return r;const i=new Map,s=(...a)=>r(...a);return new Proxy(s,{get:(a,c)=>c==="create"?r:(i.has(c)||i.set(c,r(c)),i.get(c))})}function Wo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}const oa=r=>Array.isArray(r);function yh(r,i){if(!Array.isArray(i))return!1;const s=i.length;if(s!==r.length)return!1;for(let a=0;a{i[0][a]=s.get(),i[1][a]=s.getVelocity()}),i}function Ta(r,i,s,a){if(typeof i=="function"){const[c,h]=id(a);i=i(s!==void 0?s:r.custom,c,h)}if(typeof i=="string"&&(i=r.variants&&r.variants[i]),typeof i=="function"){const[c,h]=id(a);i=i(s!==void 0?s:r.custom,c,h)}return i}function $o(r,i,s){const a=r.getProps();return Ta(a,i,s!==void 0?s:a.custom,r)}const ka=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ca=["initial",...ka],pi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],On=new Set(pi),Ht=r=>r*1e3,Kt=r=>r/1e3,Jg={type:"spring",stiffness:500,damping:25,restSpeed:10},bg=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),ey={type:"keyframes",duration:.8},ty={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ny=(r,{keyframes:i})=>i.length>2?ey:On.has(r)?r.startsWith("scale")?bg(i[1]):Jg:ty;function Ea(r,i){return r?r[i]||r.default||r:void 0}const ry={skipAnimations:!1,useManualTiming:!1},iy=r=>r!==null;function Ho(r,{repeat:i,repeatType:s="loop"},a){const c=r.filter(iy),h=i&&s!=="loop"&&i%2===1?0:c.length-1;return!h||a===void 0?c[h]:a}const Ge=r=>r;function oy(r){let i=new Set,s=new Set,a=!1,c=!1;const h=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function p(g){h.has(g)&&(m.schedule(g),r()),g(f)}const m={schedule:(g,v=!1,S=!1)=>{const R=S&&a?i:s;return v&&h.add(g),R.has(g)||R.add(g),g},cancel:g=>{s.delete(g),h.delete(g)},process:g=>{if(f=g,a){c=!0;return}a=!0,[i,s]=[s,i],s.clear(),i.forEach(p),a=!1,c&&(c=!1,m.process(g))}};return m}const Mo=["read","resolveKeyframes","update","preRender","render","postRender"],sy=40;function vh(r,i){let s=!1,a=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>s=!0,f=Mo.reduce((j,B)=>(j[B]=oy(h),j),{}),{read:p,resolveKeyframes:m,update:g,preRender:v,render:S,postRender:P}=f,R=()=>{const j=performance.now();s=!1,c.delta=a?1e3/60:Math.max(Math.min(j-c.timestamp,sy),1),c.timestamp=j,c.isProcessing=!0,p.process(c),m.process(c),g.process(c),v.process(c),S.process(c),P.process(c),c.isProcessing=!1,s&&i&&(a=!1,r(R))},V=()=>{s=!0,a=!0,c.isProcessing||r(R)};return{schedule:Mo.reduce((j,B)=>{const $=f[B];return j[B]=(ee,G=!1,te=!1)=>(s||V(),$.schedule(ee,G,te)),j},{}),cancel:j=>{for(let B=0;B(((1-3*s+3*i)*r+(3*s-6*i))*r+3*i)*r,ly=1e-7,ay=12;function uy(r,i,s,a,c){let h,f,p=0;do f=i+(s-i)/2,h=wh(f,a,c)-r,h>0?s=f:i=f;while(Math.abs(h)>ly&&++puy(h,0,1,r,s);return h=>h===0||h===1?h:wh(c(h),i,a)}const Sh=r=>i=>i<=.5?r(2*i)/2:(2-r(2*(1-i)))/2,xh=r=>i=>1-r(1-i),Ph=mi(.33,1.53,.69,.99),Ra=xh(Ph),Th=Sh(Ra),kh=r=>(r*=2)<1?.5*Ra(r):.5*(2-Math.pow(2,-10*(r-1))),Aa=r=>1-Math.sin(Math.acos(r)),Ch=xh(Aa),Eh=Sh(Aa),Rh=r=>/^0[^.\s]+$/u.test(r);function cy(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||Rh(r):!0}let sa=Ge;const Ah=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),Mh=r=>i=>typeof i=="string"&&i.startsWith(r),Dh=Mh("--"),fy=Mh("var(--"),Ma=r=>fy(r)?dy.test(r.split("/*")[0].trim()):!1,dy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hy=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function py(r){const i=hy.exec(r);if(!i)return[,];const[,s,a,c]=i;return[`--${s??a}`,c]}function Lh(r,i,s=1){const[a,c]=py(r);if(!a)return;const h=window.getComputedStyle(i).getPropertyValue(a);if(h){const f=h.trim();return Ah(f)?parseFloat(f):f}return Ma(c)?Lh(c,i,s+1):c}const Yt=(r,i,s)=>s>i?i:stypeof r=="number",parse:parseFloat,transform:r=>r},fi={...yr,transform:r=>Yt(0,1,r)},Do={...yr,default:1},gi=r=>({test:i=>typeof i=="string"&&i.endsWith(r)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${r}`}),mn=gi("deg"),_t=gi("%"),q=gi("px"),my=gi("vh"),gy=gi("vw"),od={..._t,parse:r=>_t.parse(r)/100,transform:r=>_t.transform(r*100)},yy=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sd=r=>r===yr||r===q,ld=(r,i)=>parseFloat(r.split(", ")[i]),ad=(r,i)=>(s,{transform:a})=>{if(a==="none"||!a)return 0;const c=a.match(/^matrix3d\((.+)\)$/u);if(c)return ld(c[1],i);{const h=a.match(/^matrix\((.+)\)$/u);return h?ld(h[1],r):0}},vy=new Set(["x","y","z"]),wy=pi.filter(r=>!vy.has(r));function Sy(r){const i=[];return wy.forEach(s=>{const a=r.getValue(s);a!==void 0&&(i.push([s,a.get()]),a.set(s.startsWith("scale")?1:0))}),i}const pr={width:({x:r},{paddingLeft:i="0",paddingRight:s="0"})=>r.max-r.min-parseFloat(i)-parseFloat(s),height:({y:r},{paddingTop:i="0",paddingBottom:s="0"})=>r.max-r.min-parseFloat(i)-parseFloat(s),top:(r,{top:i})=>parseFloat(i),left:(r,{left:i})=>parseFloat(i),bottom:({y:r},{top:i})=>parseFloat(i)+(r.max-r.min),right:({x:r},{left:i})=>parseFloat(i)+(r.max-r.min),x:ad(4,13),y:ad(5,14)};pr.translateX=pr.x;pr.translateY=pr.y;const Vh=r=>i=>i.test(r),xy={test:r=>r==="auto",parse:r=>r},_h=[yr,q,_t,mn,gy,my,xy],ud=r=>_h.find(Vh(r)),jn=new Set;let la=!1,aa=!1;function Nh(){if(aa){const r=Array.from(jn).filter(a=>a.needsMeasurement),i=new Set(r.map(a=>a.element)),s=new Map;i.forEach(a=>{const c=Sy(a);c.length&&(s.set(a,c),a.render())}),r.forEach(a=>a.measureInitialState()),i.forEach(a=>{a.render();const c=s.get(a);c&&c.forEach(([h,f])=>{var p;(p=a.getValue(h))===null||p===void 0||p.set(f)})}),r.forEach(a=>a.measureEndState()),r.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}aa=!1,la=!1,jn.forEach(r=>r.complete()),jn.clear()}function Fh(){jn.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(aa=!0)})}function Py(){Fh(),Nh()}class Da{constructor(i,s,a,c,h,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=s,this.name=a,this.motionValue=c,this.element=h,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(jn.add(this),la||(la=!0,pe.read(Fh),pe.resolveKeyframes(Nh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:s,element:a,motionValue:c}=this;for(let h=0;hMath.round(r*1e5)/1e5,La=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ty(r){return r==null}const ky=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Va=(r,i)=>s=>!!(typeof s=="string"&&ky.test(s)&&s.startsWith(r)||i&&!Ty(s)&&Object.prototype.hasOwnProperty.call(s,i)),jh=(r,i,s)=>a=>{if(typeof a!="string")return a;const[c,h,f,p]=a.match(La);return{[r]:parseFloat(c),[i]:parseFloat(h),[s]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},Cy=r=>Yt(0,255,r),Ql={...yr,transform:r=>Math.round(Cy(r))},Fn={test:Va("rgb","red"),parse:jh("red","green","blue"),transform:({red:r,green:i,blue:s,alpha:a=1})=>"rgba("+Ql.transform(r)+", "+Ql.transform(i)+", "+Ql.transform(s)+", "+li(fi.transform(a))+")"};function Ey(r){let i="",s="",a="",c="";return r.length>5?(i=r.substring(1,3),s=r.substring(3,5),a=r.substring(5,7),c=r.substring(7,9)):(i=r.substring(1,2),s=r.substring(2,3),a=r.substring(3,4),c=r.substring(4,5),i+=i,s+=s,a+=a,c+=c),{red:parseInt(i,16),green:parseInt(s,16),blue:parseInt(a,16),alpha:c?parseInt(c,16)/255:1}}const ua={test:Va("#"),parse:Ey,transform:Fn.transform},ur={test:Va("hsl","hue"),parse:jh("hue","saturation","lightness"),transform:({hue:r,saturation:i,lightness:s,alpha:a=1})=>"hsla("+Math.round(r)+", "+_t.transform(li(i))+", "+_t.transform(li(s))+", "+li(fi.transform(a))+")"},He={test:r=>Fn.test(r)||ua.test(r)||ur.test(r),parse:r=>Fn.test(r)?Fn.parse(r):ur.test(r)?ur.parse(r):ua.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Fn.transform(r):ur.transform(r)},Ry=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ay(r){var i,s;return isNaN(r)&&typeof r=="string"&&(((i=r.match(La))===null||i===void 0?void 0:i.length)||0)+(((s=r.match(Ry))===null||s===void 0?void 0:s.length)||0)>0}const Oh="number",Ih="color",My="var",Dy="var(",cd="${}",Ly=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function di(r){const i=r.toString(),s=[],a={color:[],number:[],var:[]},c=[];let h=0;const p=i.replace(Ly,m=>(He.test(m)?(a.color.push(h),c.push(Ih),s.push(He.parse(m))):m.startsWith(Dy)?(a.var.push(h),c.push(My),s.push(m)):(a.number.push(h),c.push(Oh),s.push(parseFloat(m))),++h,cd)).split(cd);return{values:s,split:p,indexes:a,types:c}}function zh(r){return di(r).values}function Bh(r){const{split:i,types:s}=di(r),a=i.length;return c=>{let h="";for(let f=0;ftypeof r=="number"?0:r;function _y(r){const i=zh(r);return Bh(r)(i.map(Vy))}const yn={test:Ay,parse:zh,createTransformer:Bh,getAnimatableNone:_y},Ny=new Set(["brightness","contrast","saturate","opacity"]);function Fy(r){const[i,s]=r.slice(0,-1).split("(");if(i==="drop-shadow")return r;const[a]=s.match(La)||[];if(!a)return r;const c=s.replace(a,"");let h=Ny.has(i)?1:0;return a!==s&&(h*=100),i+"("+h+c+")"}const jy=/\b([a-z-]*)\(.*?\)/gu,ca={...yn,getAnimatableNone:r=>{const i=r.match(jy);return i?i.map(Fy).join(" "):r}},Oy={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,radius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,backgroundPositionX:q,backgroundPositionY:q},Iy={rotate:mn,rotateX:mn,rotateY:mn,rotateZ:mn,scale:Do,scaleX:Do,scaleY:Do,scaleZ:Do,skew:mn,skewX:mn,skewY:mn,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:fi,originX:od,originY:od,originZ:q},fd={...yr,transform:Math.round},_a={...Oy,...Iy,zIndex:fd,size:q,fillOpacity:fi,strokeOpacity:fi,numOctaves:fd},zy={..._a,color:He,backgroundColor:He,outlineColor:He,fill:He,stroke:He,borderColor:He,borderTopColor:He,borderRightColor:He,borderBottomColor:He,borderLeftColor:He,filter:ca,WebkitFilter:ca},Na=r=>zy[r];function Uh(r,i){let s=Na(r);return s!==ca&&(s=yn),s.getAnimatableNone?s.getAnimatableNone(i):void 0}const By=new Set(["auto","none","0"]);function Uy(r,i,s){let a=0,c;for(;a{s.getValue(m).set(g)}),this.resolveNoneKeyframes()}}function Fa(r){return typeof r=="function"}let Vo;function Wy(){Vo=void 0}const Nt={now:()=>(Vo===void 0&&Nt.set(ze.isProcessing||ry.useManualTiming?ze.timestamp:performance.now()),Vo),set:r=>{Vo=r,queueMicrotask(Wy)}},dd=(r,i)=>i==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(yn.test(r)||r==="0")&&!r.startsWith("url("));function $y(r){const i=r[0];if(r.length===1)return!0;for(let s=0;sKy?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Py(),this._resolved}onKeyframesResolved(i,s){this.resolvedAt=Nt.now(),this.hasAttemptedResolve=!0;const{name:a,type:c,velocity:h,delay:f,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!Hy(i,a,c,h))if(f)this.options.duration=0;else{m?.(Ho(i,this.options,s)),p?.(),this.resolveFinishedPromise();return}const v=this.initPlayback(i,s);v!==!1&&(this._resolved={keyframes:i,finalKeyframe:s,...v},this.onPostResolved())}onPostResolved(){}then(i,s){return this.currentFinishedPromise.then(i,s)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(i=>{this.resolveFinishedPromise=i})}}const mr=(r,i,s)=>{const a=i-r;return a===0?1:(s-r)/a},Hh=(r,i,s=10)=>{let a="";const c=Math.max(Math.round(i/s),2);for(let h=0;h{const v=g*f,S=v*r,P=v-s,R=fa(g,f),V=Math.exp(-S);return Yl-P/R*V},h=g=>{const S=g*f*r,P=S*s+s,R=Math.pow(f,2)*Math.pow(g,2)*r,V=Math.exp(-S),M=fa(Math.pow(g,2),f);return(-c(g)+Yl>0?-1:1)*((P-R)*V)/M}):(c=g=>{const v=Math.exp(-g*r),S=(g-s)*r+1;return-Yl+v*S},h=g=>{const v=Math.exp(-g*r),S=(s-g)*(r*r);return v*S});const p=5/r,m=Xy(c,h,p);if(r=Ht(r),isNaN(m))return{stiffness:Re.stiffness,damping:Re.damping,duration:r};{const g=Math.pow(m,2)*a;return{stiffness:g,damping:f*2*Math.sqrt(a*g),duration:r}}}const Yy=12;function Xy(r,i,s){let a=s;for(let c=1;c=da?1/0:i}const Zy=["duration","bounce"],qy=["stiffness","damping","mass"];function hd(r,i){return i.some(s=>r[s]!==void 0)}function Jy(r){let i={velocity:Re.velocity,stiffness:Re.stiffness,damping:Re.damping,mass:Re.mass,isResolvedFromDuration:!1,...r};if(!hd(r,qy)&&hd(r,Zy))if(r.visualDuration){const s=r.visualDuration,a=2*Math.PI/(s*1.2),c=a*a,h=2*Yt(.05,1,1-r.bounce)*Math.sqrt(c);i={...i,mass:Re.mass,stiffness:c,damping:h}}else{const s=Qy(r);i={...i,...s,mass:Re.mass},i.isResolvedFromDuration=!0}return i}function Yh(r=Re.visualDuration,i=Re.bounce){const s=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:i}:r;let{restSpeed:a,restDelta:c}=s;const h=s.keyframes[0],f=s.keyframes[s.keyframes.length-1],p={done:!1,value:h},{stiffness:m,damping:g,mass:v,duration:S,velocity:P,isResolvedFromDuration:R}=Jy({...s,velocity:-Kt(s.velocity||0)}),V=P||0,M=g/(2*Math.sqrt(m*v)),N=f-h,j=Kt(Math.sqrt(m/v)),B=Math.abs(N)<5;a||(a=B?Re.restSpeed.granular:Re.restSpeed.default),c||(c=B?Re.restDelta.granular:Re.restDelta.default);let $;if(M<1){const G=fa(j,M);$=te=>{const ae=Math.exp(-M*j*te);return f-ae*((V+M*j*N)/G*Math.sin(G*te)+N*Math.cos(G*te))}}else if(M===1)$=G=>f-Math.exp(-j*G)*(N+(V+j*N)*G);else{const G=j*Math.sqrt(M*M-1);$=te=>{const ae=Math.exp(-M*j*te),Z=Math.min(G*te,300);return f-ae*((V+M*j*N)*Math.sinh(Z)+G*N*Math.cosh(Z))/G}}const ee={calculatedDuration:R&&S||null,next:G=>{const te=$(G);if(R)p.done=G>=S;else{let ae=0;M<1&&(ae=G===0?Ht(V):Gh($,G,te));const Z=Math.abs(ae)<=a,xe=Math.abs(f-te)<=c;p.done=Z&&xe}return p.value=p.done?f:te,p},toString:()=>{const G=Math.min(Qh(ee),da),te=Hh(ae=>ee.next(G*ae).value,G,30);return G+"ms "+te}};return ee}function pd({keyframes:r,velocity:i=0,power:s=.8,timeConstant:a=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:f,min:p,max:m,restDelta:g=.5,restSpeed:v}){const S=r[0],P={done:!1,value:S},R=Z=>p!==void 0&&Zm,V=Z=>p===void 0?m:m===void 0||Math.abs(p-Z)-M*Math.exp(-Z/a),$=Z=>j+B(Z),ee=Z=>{const xe=B(Z),Ce=$(Z);P.done=Math.abs(xe)<=g,P.value=P.done?j:Ce};let G,te;const ae=Z=>{R(P.value)&&(G=Z,te=Yh({keyframes:[P.value,V(P.value)],velocity:Gh($,Z,P.value),damping:c,stiffness:h,restDelta:g,restSpeed:v}))};return ae(0),{calculatedDuration:null,next:Z=>{let xe=!1;return!te&&G===void 0&&(xe=!0,ee(Z),ae(Z)),G!==void 0&&Z>=G?te.next(Z-G):(!xe&&ee(Z),P)}}}const by=mi(.42,0,1,1),ev=mi(0,0,.58,1),Xh=mi(.42,0,.58,1),tv=r=>Array.isArray(r)&&typeof r[0]!="number",ja=r=>Array.isArray(r)&&typeof r[0]=="number",md={linear:Ge,easeIn:by,easeInOut:Xh,easeOut:ev,circIn:Aa,circInOut:Eh,circOut:Ch,backIn:Ra,backInOut:Th,backOut:Ph,anticipate:kh},gd=r=>{if(ja(r)){sa(r.length===4);const[i,s,a,c]=r;return mi(i,s,a,c)}else if(typeof r=="string")return sa(md[r]!==void 0),md[r];return r},nv=(r,i)=>s=>i(r(s)),Gt=(...r)=>r.reduce(nv),ke=(r,i,s)=>r+(i-r)*s;function Xl(r,i,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?r+(i-r)*6*s:s<1/2?i:s<2/3?r+(i-r)*(2/3-s)*6:r}function rv({hue:r,saturation:i,lightness:s,alpha:a}){r/=360,i/=100,s/=100;let c=0,h=0,f=0;if(!i)c=h=f=s;else{const p=s<.5?s*(1+i):s+i-s*i,m=2*s-p;c=Xl(m,p,r+1/3),h=Xl(m,p,r),f=Xl(m,p,r-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:a}}function Fo(r,i){return s=>s>0?i:r}const Zl=(r,i,s)=>{const a=r*r,c=s*(i*i-a)+a;return c<0?0:Math.sqrt(c)},iv=[ua,Fn,ur],ov=r=>iv.find(i=>i.test(r));function yd(r){const i=ov(r);if(!i)return!1;let s=i.parse(r);return i===ur&&(s=rv(s)),s}const vd=(r,i)=>{const s=yd(r),a=yd(i);if(!s||!a)return Fo(r,i);const c={...s};return h=>(c.red=Zl(s.red,a.red,h),c.green=Zl(s.green,a.green,h),c.blue=Zl(s.blue,a.blue,h),c.alpha=ke(s.alpha,a.alpha,h),Fn.transform(c))},ha=new Set(["none","hidden"]);function sv(r,i){return ha.has(r)?s=>s<=0?r:i:s=>s>=1?i:r}function lv(r,i){return s=>ke(r,i,s)}function Oa(r){return typeof r=="number"?lv:typeof r=="string"?Ma(r)?Fo:He.test(r)?vd:cv:Array.isArray(r)?Zh:typeof r=="object"?He.test(r)?vd:av:Fo}function Zh(r,i){const s=[...r],a=s.length,c=r.map((h,f)=>Oa(h)(h,i[f]));return h=>{for(let f=0;f{for(const h in a)s[h]=a[h](c);return s}}function uv(r,i){var s;const a=[],c={color:0,var:0,number:0};for(let h=0;h{const s=yn.createTransformer(i),a=di(r),c=di(i);return a.indexes.var.length===c.indexes.var.length&&a.indexes.color.length===c.indexes.color.length&&a.indexes.number.length>=c.indexes.number.length?ha.has(r)&&!c.values.length||ha.has(i)&&!a.values.length?sv(r,i):Gt(Zh(uv(a,c),c.values),s):Fo(r,i)};function qh(r,i,s){return typeof r=="number"&&typeof i=="number"&&typeof s=="number"?ke(r,i,s):Oa(r)(r,i)}function fv(r,i,s){const a=[],c=s||qh,h=r.length-1;for(let f=0;fi[0];if(h===2&&r[0]===r[1])return()=>i[1];r[0]>r[h-1]&&(r=[...r].reverse(),i=[...i].reverse());const f=fv(i,a,c),p=f.length,m=g=>{let v=0;if(p>1)for(;vm(Yt(r[0],r[h-1],g)):m}function hv(r,i){const s=r[r.length-1];for(let a=1;a<=i;a++){const c=mr(0,i,a);r.push(ke(s,1,c))}}function pv(r){const i=[0];return hv(i,r.length-1),i}function mv(r,i){return r.map(s=>s*i)}function gv(r,i){return r.map(()=>i||Xh).splice(0,r.length-1)}function jo({duration:r=300,keyframes:i,times:s,ease:a="easeInOut"}){const c=tv(a)?a.map(gd):gd(a),h={done:!1,value:i[0]},f=mv(s&&s.length===i.length?s:pv(i),r),p=dv(f,i,{ease:Array.isArray(c)?c:gv(i,c)});return{calculatedDuration:r,next:m=>(h.value=p(m),h.done=m>=r,h)}}const yv=r=>{const i=({timestamp:s})=>r(s);return{start:()=>pe.update(i,!0),stop:()=>gn(i),now:()=>ze.isProcessing?ze.timestamp:Nt.now()}},vv={decay:pd,inertia:pd,tween:jo,keyframes:jo,spring:Yh},wv=r=>r/100;class Ia extends $h{constructor(i){super(i),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:s,motionValue:a,element:c,keyframes:h}=this.options,f=c?.KeyframeResolver||Da,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new f(h,p,s,a,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(i){const{type:s="keyframes",repeat:a=0,repeatDelay:c=0,repeatType:h,velocity:f=0}=this.options,p=Fa(s)?s:vv[s]||jo;let m,g;p!==jo&&typeof i[0]!="number"&&(m=Gt(wv,qh(i[0],i[1])),i=[0,100]);const v=p({...this.options,keyframes:i});h==="mirror"&&(g=p({...this.options,keyframes:[...i].reverse(),velocity:-f})),v.calculatedDuration===null&&(v.calculatedDuration=Qh(v));const{calculatedDuration:S}=v,P=S+c,R=P*(a+1)-c;return{generator:v,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:S,resolvedDuration:P,totalDuration:R}}onPostResolved(){const{autoplay:i=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!i?this.pause():this.state=this.pendingPlayState}tick(i,s=!1){const{resolved:a}=this;if(!a){const{keyframes:Z}=this.options;return{done:!0,value:Z[Z.length-1]}}const{finalKeyframe:c,generator:h,mirroredGenerator:f,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:v,resolvedDuration:S}=a;if(this.startTime===null)return h.next(0);const{delay:P,repeat:R,repeatType:V,repeatDelay:M,onUpdate:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-v/this.speed,this.startTime)),s?this.currentTime=i:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(i-this.startTime)*this.speed;const j=this.currentTime-P*(this.speed>=0?1:-1),B=this.speed>=0?j<0:j>v;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let $=this.currentTime,ee=h;if(R){const Z=Math.min(this.currentTime,v)/S;let xe=Math.floor(Z),Ce=Z%1;!Ce&&Z>=1&&(Ce=1),Ce===1&&xe--,xe=Math.min(xe,R+1),!!(xe%2)&&(V==="reverse"?(Ce=1-Ce,M&&(Ce-=M/S)):V==="mirror"&&(ee=f)),$=Yt(0,1,Ce)*S}const G=B?{done:!1,value:m[0]}:ee.next($);p&&(G.value=p(G.value));let{done:te}=G;!B&&g!==null&&(te=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const ae=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&te);return ae&&c!==void 0&&(G.value=Ho(m,this.options,c)),N&&N(G.value),ae&&this.finish(),G}get duration(){const{resolved:i}=this;return i?Kt(i.calculatedDuration):0}get time(){return Kt(this.currentTime)}set time(i){i=Ht(i),this.currentTime=i,this.holdTime!==null||this.speed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.speed)}get speed(){return this.playbackSpeed}set speed(i){const s=this.playbackSpeed!==i;this.playbackSpeed=i,s&&(this.time=Kt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:i=yv,onPlay:s,startTime:a}=this.options;this.driver||(this.driver=i(h=>this.tick(h))),s&&s();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):this.startTime=a??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var i;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(i=this.currentTime)!==null&&i!==void 0?i:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:i}=this.options;i&&i()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}}const Sv=new Set(["opacity","clipPath","filter","transform"]);function za(r){let i;return()=>(i===void 0&&(i=r()),i)}const xv={linearEasing:void 0};function Pv(r,i){const s=za(r);return()=>{var a;return(a=xv[i])!==null&&a!==void 0?a:s()}}const Oo=Pv(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function Jh(r){return!!(typeof r=="function"&&Oo()||!r||typeof r=="string"&&(r in pa||Oo())||ja(r)||Array.isArray(r)&&r.every(Jh))}const oi=([r,i,s,a])=>`cubic-bezier(${r}, ${i}, ${s}, ${a})`,pa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:oi([0,.65,.55,1]),circOut:oi([.55,0,1,.45]),backIn:oi([.31,.01,.66,-.59]),backOut:oi([.33,1.53,.69,.99])};function bh(r,i){if(r)return typeof r=="function"&&Oo()?Hh(r,i):ja(r)?oi(r):Array.isArray(r)?r.map(s=>bh(s,i)||pa.easeOut):pa[r]}function Tv(r,i,s,{delay:a=0,duration:c=300,repeat:h=0,repeatType:f="loop",ease:p="easeInOut",times:m}={}){const g={[i]:s};m&&(g.offset=m);const v=bh(p,c);return Array.isArray(v)&&(g.easing=v),r.animate(g,{delay:a,duration:c,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"})}function wd(r,i){r.timeline=i,r.onfinish=null}const kv=za(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Io=10,Cv=2e4;function Ev(r){return Fa(r.type)||r.type==="spring"||!Jh(r.ease)}function Rv(r,i){const s=new Ia({...i,keyframes:r,repeat:0,delay:0,isGenerator:!0});let a={done:!1,value:r[0]};const c=[];let h=0;for(;!a.done&&hthis.onKeyframesResolved(f,p),s,a,c),this.resolver.scheduleResolve()}initPlayback(i,s){var a;let{duration:c=300,times:h,ease:f,type:p,motionValue:m,name:g,startTime:v}=this.options;if(!(!((a=m.owner)===null||a===void 0)&&a.current))return!1;if(typeof f=="string"&&Oo()&&Av(f)&&(f=ep[f]),Ev(this.options)){const{onComplete:P,onUpdate:R,motionValue:V,element:M,...N}=this.options,j=Rv(i,N);i=j.keyframes,i.length===1&&(i[1]=i[0]),c=j.duration,h=j.times,f=j.ease,p="keyframes"}const S=Tv(m.owner.current,g,i,{...this.options,duration:c,times:h,ease:f});return S.startTime=v??this.calcStartTime(),this.pendingTimeline?(wd(S,this.pendingTimeline),this.pendingTimeline=void 0):S.onfinish=()=>{const{onComplete:P}=this.options;m.set(Ho(i,this.options,s)),P&&P(),this.cancel(),this.resolveFinishedPromise()},{animation:S,duration:c,times:h,type:p,ease:f,keyframes:i}}get duration(){const{resolved:i}=this;if(!i)return 0;const{duration:s}=i;return Kt(s)}get time(){const{resolved:i}=this;if(!i)return 0;const{animation:s}=i;return Kt(s.currentTime||0)}set time(i){const{resolved:s}=this;if(!s)return;const{animation:a}=s;a.currentTime=Ht(i)}get speed(){const{resolved:i}=this;if(!i)return 1;const{animation:s}=i;return s.playbackRate}set speed(i){const{resolved:s}=this;if(!s)return;const{animation:a}=s;a.playbackRate=i}get state(){const{resolved:i}=this;if(!i)return"idle";const{animation:s}=i;return s.playState}get startTime(){const{resolved:i}=this;if(!i)return null;const{animation:s}=i;return s.startTime}attachTimeline(i){if(!this._resolved)this.pendingTimeline=i;else{const{resolved:s}=this;if(!s)return Ge;const{animation:a}=s;wd(a,i)}return Ge}play(){if(this.isStopped)return;const{resolved:i}=this;if(!i)return;const{animation:s}=i;s.playState==="finished"&&this.updateFinishedPromise(),s.play()}pause(){const{resolved:i}=this;if(!i)return;const{animation:s}=i;s.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:i}=this;if(!i)return;const{animation:s,keyframes:a,duration:c,type:h,ease:f,times:p}=i;if(s.playState==="idle"||s.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:v,onComplete:S,element:P,...R}=this.options,V=new Ia({...R,keyframes:a,duration:c,type:h,ease:f,times:p,isGenerator:!0}),M=Ht(this.time);g.setWithVelocity(V.sample(M-Io).value,V.sample(M).value,Io)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:i}=this;i&&i.animation.finish()}cancel(){const{resolved:i}=this;i&&i.animation.cancel()}static supports(i){const{motionValue:s,name:a,repeatDelay:c,repeatType:h,damping:f,type:p}=i;return kv()&&a&&Sv.has(a)&&s&&s.owner&&s.owner.current instanceof HTMLElement&&!s.owner.getProps().onUpdate&&!c&&h!=="mirror"&&f!==0&&p!=="inertia"}}const Mv=za(()=>window.ScrollTimeline!==void 0);class Dv{constructor(i){this.stop=()=>this.runAll("stop"),this.animations=i.filter(Boolean)}then(i,s){return Promise.all(this.animations).then(i).catch(s)}getAll(i){return this.animations[0][i]}setAll(i,s){for(let a=0;aMv()&&c.attachTimeline?c.attachTimeline(i):s(c));return()=>{a.forEach((c,h)=>{c&&c(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(i){this.setAll("time",i)}get speed(){return this.getAll("speed")}set speed(i){this.setAll("speed",i)}get startTime(){return this.getAll("startTime")}get duration(){let i=0;for(let s=0;ss[i]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Lv({when:r,delay:i,delayChildren:s,staggerChildren:a,staggerDirection:c,repeat:h,repeatType:f,repeatDelay:p,from:m,elapsed:g,...v}){return!!Object.keys(v).length}const Ba=(r,i,s,a={},c,h)=>f=>{const p=Ea(a,r)||{},m=p.delay||a.delay||0;let{elapsed:g=0}=a;g=g-Ht(m);let v={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-g,onUpdate:P=>{i.set(P),p.onUpdate&&p.onUpdate(P)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:r,motionValue:i,element:h?void 0:c};Lv(p)||(v={...v,...ny(r,v)}),v.duration&&(v.duration=Ht(v.duration)),v.repeatDelay&&(v.repeatDelay=Ht(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let S=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(S=!0)),S&&!h&&i.get()!==void 0){const P=Ho(v.keyframes,p);if(P!==void 0)return pe.update(()=>{v.onUpdate(P),v.onComplete()}),new Dv([])}return!h&&Sd.supports(v)?new Sd(v):new Ia(v)},Vv=r=>!!(r&&typeof r=="object"&&r.mix&&r.toValue),_v=r=>oa(r)?r[r.length-1]||0:r;function Ua(r,i){r.indexOf(i)===-1&&r.push(i)}function Wa(r,i){const s=r.indexOf(i);s>-1&&r.splice(s,1)}class $a{constructor(){this.subscriptions=[]}add(i){return Ua(this.subscriptions,i),()=>Wa(this.subscriptions,i)}notify(i,s,a){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](i,s,a);else for(let h=0;h!isNaN(parseFloat(r));class Fv{constructor(i,s={}){this.version="11.12.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(a,c=!0)=>{const h=Nt.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(i),this.owner=s.owner}setCurrent(i){this.current=i,this.updatedAt=Nt.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=Nv(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,s){this.events[i]||(this.events[i]=new $a);const a=this.events[i].add(s);return i==="change"?()=>{a(),pe.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,s){this.passiveEffect=i,this.stopPassiveEffect=s}set(i,s=!0){!s||!this.passiveEffect?this.updateAndNotify(i,s):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,s,a){this.set(s),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-a}jump(i,s=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>xd)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,xd);return Kh(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(i){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=i(s),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 hi(r,i){return new Fv(r,i)}function jv(r,i,s){r.hasValue(i)?r.getValue(i).set(s):r.addValue(i,hi(s))}function Ov(r,i){const s=$o(r,i);let{transitionEnd:a={},transition:c={},...h}=s||{};h={...h,...a};for(const f in h){const p=_v(h[f]);jv(r,f,p)}}const Ha=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Iv="framerAppearId",tp="data-"+Ha(Iv);function np(r){return r.props[tp]}const Ke=r=>!!(r&&r.getVelocity);function zv(r){return!!(Ke(r)&&r.add)}function ma(r,i){const s=r.getValue("willChange");if(zv(s))return s.add(i)}function Bv({protectedKeys:r,needsAnimating:i},s){const a=r.hasOwnProperty(s)&&i[s]!==!0;return i[s]=!1,a}function rp(r,i,{delay:s=0,transitionOverride:a,type:c}={}){var h;let{transition:f=r.getDefaultTransition(),transitionEnd:p,...m}=i;a&&(f=a);const g=[],v=c&&r.animationState&&r.animationState.getState()[c];for(const S in m){const P=r.getValue(S,(h=r.latestValues[S])!==null&&h!==void 0?h:null),R=m[S];if(R===void 0||v&&Bv(v,S))continue;const V={delay:s,...Ea(f||{},S)};let M=!1;if(window.MotionHandoffAnimation){const j=np(r);if(j){const B=window.MotionHandoffAnimation(j,S,pe);B!==null&&(V.startTime=B,M=!0)}}ma(r,S),P.start(Ba(S,P,R,r.shouldReduceMotion&&On.has(S)?{type:!1}:V,r,M));const N=P.animation;N&&g.push(N)}return p&&Promise.all(g).then(()=>{pe.update(()=>{p&&Ov(r,p)})}),g}function ga(r,i,s={}){var a;const c=$o(r,i,s.type==="exit"?(a=r.presenceContext)===null||a===void 0?void 0:a.custom:void 0);let{transition:h=r.getDefaultTransition()||{}}=c||{};s.transitionOverride&&(h=s.transitionOverride);const f=c?()=>Promise.all(rp(r,c,s)):()=>Promise.resolve(),p=r.variantChildren&&r.variantChildren.size?(g=0)=>{const{delayChildren:v=0,staggerChildren:S,staggerDirection:P}=h;return Uv(r,i,v+g,S,P,s)}:()=>Promise.resolve(),{when:m}=h;if(m){const[g,v]=m==="beforeChildren"?[f,p]:[p,f];return g().then(()=>v())}else return Promise.all([f(),p(s.delay)])}function Uv(r,i,s=0,a=0,c=1,h){const f=[],p=(r.variantChildren.size-1)*a,m=c===1?(g=0)=>g*a:(g=0)=>p-g*a;return Array.from(r.variantChildren).sort(Wv).forEach((g,v)=>{g.notify("AnimationStart",i),f.push(ga(g,i,{...h,delay:s+m(v)}).then(()=>g.notify("AnimationComplete",i)))}),Promise.all(f)}function Wv(r,i){return r.sortNodePosition(i)}function $v(r,i,s={}){r.notify("AnimationStart",i);let a;if(Array.isArray(i)){const c=i.map(h=>ga(r,h,s));a=Promise.all(c)}else if(typeof i=="string")a=ga(r,i,s);else{const c=typeof i=="function"?$o(r,i,s.custom):i;a=Promise.all(rp(r,c,s))}return a.then(()=>{r.notify("AnimationComplete",i)})}const Hv=Ca.length;function ip(r){if(!r)return;if(!r.isControllingVariants){const s=r.parent?ip(r.parent)||{}:{};return r.props.initial!==void 0&&(s.initial=r.props.initial),s}const i={};for(let s=0;sPromise.all(i.map(({animation:s,options:a})=>$v(r,s,a)))}function Yv(r){let i=Qv(r),s=Pd(),a=!0;const c=m=>(g,v)=>{var S;const P=$o(r,v,m==="exit"?(S=r.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(P){const{transition:R,transitionEnd:V,...M}=P;g={...g,...M,...V}}return g};function h(m){i=m(r)}function f(m){const{props:g}=r,v=ip(r.parent)||{},S=[],P=new Set;let R={},V=1/0;for(let N=0;NV&&ee,xe=!1;const Ce=Array.isArray($)?$:[$];let qe=Ce.reduce(c(j),{});G===!1&&(qe={});const{prevResolvedValues:ot={}}=B,Qe={...ot,...qe},Je=ie=>{Z=!0,P.has(ie)&&(xe=!0,P.delete(ie)),B.needsAnimating[ie]=!0;const O=r.getValue(ie);O&&(O.liveStyle=!1)};for(const ie in Qe){const O=qe[ie],Q=ot[ie];if(R.hasOwnProperty(ie))continue;let z=!1;oa(O)&&oa(Q)?z=!yh(O,Q):z=O!==Q,z?O!=null?Je(ie):P.add(ie):O!==void 0&&P.has(ie)?Je(ie):B.protectedKeys[ie]=!0}B.prevProp=$,B.prevResolvedValues=qe,B.isActive&&(R={...R,...qe}),a&&r.blockInitialAnimation&&(Z=!1),Z&&(!(te&&ae)||xe)&&S.push(...Ce.map(ie=>({animation:ie,options:{type:j}})))}if(P.size){const N={};P.forEach(j=>{const B=r.getBaseTarget(j),$=r.getValue(j);$&&($.liveStyle=!0),N[j]=B??null}),S.push({animation:N})}let M=!!S.length;return a&&(g.initial===!1||g.initial===g.animate)&&!r.manuallyAnimateOnMount&&(M=!1),a=!1,M?i(S):Promise.resolve()}function p(m,g){var v;if(s[m].isActive===g)return Promise.resolve();(v=r.variantChildren)===null||v===void 0||v.forEach(P=>{var R;return(R=P.animationState)===null||R===void 0?void 0:R.setActive(m,g)}),s[m].isActive=g;const S=f(m);for(const P in s)s[P].protectedKeys={};return S}return{animateChanges:f,setActive:p,setAnimateFunction:h,getState:()=>s,reset:()=>{s=Pd(),a=!0}}}function Xv(r,i){return typeof i=="string"?i!==r:Array.isArray(i)?!yh(i,r):!1}function Vn(r=!1){return{isActive:r,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pd(){return{animate:Vn(!0),whileInView:Vn(),whileHover:Vn(),whileTap:Vn(),whileDrag:Vn(),whileFocus:Vn(),exit:Vn()}}class vn{constructor(i){this.isMounted=!1,this.node=i}update(){}}class Zv extends vn{constructor(i){super(i),i.animationState||(i.animationState=Yv(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();Wo(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:s}=this.node.prevProps||{};i!==s&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)===null||i===void 0||i.call(this)}}let qv=0;class Jv extends vn{constructor(){super(...arguments),this.id=qv++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:s}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===a)return;const c=this.node.animationState.setActive("exit",!i);s&&!i&&c.then(()=>s(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const bv={animation:{Feature:Zv},exit:{Feature:Jv}},op=r=>r.pointerType==="mouse"?typeof r.button!="number"||r.button<=0:r.isPrimary!==!1;function Ko(r,i="page"){return{point:{x:r[`${i}X`],y:r[`${i}Y`]}}}const e0=r=>i=>op(i)&&r(i,Ko(i));function $t(r,i,s,a={passive:!0}){return r.addEventListener(i,s,a),()=>r.removeEventListener(i,s)}function Qt(r,i,s,a){return $t(r,i,e0(s),a)}const Td=(r,i)=>Math.abs(r-i);function t0(r,i){const s=Td(r.x,i.x),a=Td(r.y,i.y);return Math.sqrt(s**2+a**2)}class sp{constructor(i,s,{transformPagePoint:a,contextWindow:c,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Jl(this.lastMoveEventInfo,this.history),P=this.startEvent!==null,R=t0(S.offset,{x:0,y:0})>=3;if(!P&&!R)return;const{point:V}=S,{timestamp:M}=ze;this.history.push({...V,timestamp:M});const{onStart:N,onMove:j}=this.handlers;P||(N&&N(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,S)},this.handlePointerMove=(S,P)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=ql(P,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(S,P)=>{this.end();const{onEnd:R,onSessionEnd:V,resumeAnimation:M}=this.handlers;if(this.dragSnapToOrigin&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=Jl(S.type==="pointercancel"?this.lastMoveEventInfo:ql(P,this.transformPagePoint),this.history);this.startEvent&&R&&R(S,N),V&&V(S,N)},!op(i))return;this.dragSnapToOrigin=h,this.handlers=s,this.transformPagePoint=a,this.contextWindow=c||window;const f=Ko(i),p=ql(f,this.transformPagePoint),{point:m}=p,{timestamp:g}=ze;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=s;v&&v(i,Jl(p,this.history)),this.removeListeners=Gt(Qt(this.contextWindow,"pointermove",this.handlePointerMove),Qt(this.contextWindow,"pointerup",this.handlePointerUp),Qt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),gn(this.updatePoint)}}function ql(r,i){return i?{point:i(r.point)}:r}function kd(r,i){return{x:r.x-i.x,y:r.y-i.y}}function Jl({point:r},i){return{point:r,delta:kd(r,lp(i)),offset:kd(r,n0(i)),velocity:r0(i,.1)}}function n0(r){return r[0]}function lp(r){return r[r.length-1]}function r0(r,i){if(r.length<2)return{x:0,y:0};let s=r.length-1,a=null;const c=lp(r);for(;s>=0&&(a=r[s],!(c.timestamp-a.timestamp>Ht(i)));)s--;if(!a)return{x:0,y:0};const h=Kt(c.timestamp-a.timestamp);if(h===0)return{x:0,y:0};const f={x:(c.x-a.x)/h,y:(c.y-a.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function ap(r){let i=null;return()=>{const s=()=>{i=null};return i===null?(i=r,s):!1}}const Cd=ap("dragHorizontal"),Ed=ap("dragVertical");function up(r){let i=!1;if(r==="y")i=Ed();else if(r==="x")i=Cd();else{const s=Cd(),a=Ed();s&&a?i=()=>{s(),a()}:(s&&s(),a&&a())}return i}function cp(){const r=up(!0);return r?(r(),!1):!0}function cr(r){return r&&typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"current")}const fp=1e-4,i0=1-fp,o0=1+fp,dp=.01,s0=0-dp,l0=0+dp;function ft(r){return r.max-r.min}function a0(r,i,s){return Math.abs(r-i)<=s}function Rd(r,i,s,a=.5){r.origin=a,r.originPoint=ke(i.min,i.max,r.origin),r.scale=ft(s)/ft(i),r.translate=ke(s.min,s.max,r.origin)-r.originPoint,(r.scale>=i0&&r.scale<=o0||isNaN(r.scale))&&(r.scale=1),(r.translate>=s0&&r.translate<=l0||isNaN(r.translate))&&(r.translate=0)}function ai(r,i,s,a){Rd(r.x,i.x,s.x,a?a.originX:void 0),Rd(r.y,i.y,s.y,a?a.originY:void 0)}function Ad(r,i,s){r.min=s.min+i.min,r.max=r.min+ft(i)}function u0(r,i,s){Ad(r.x,i.x,s.x),Ad(r.y,i.y,s.y)}function Md(r,i,s){r.min=i.min-s.min,r.max=r.min+ft(i)}function ui(r,i,s){Md(r.x,i.x,s.x),Md(r.y,i.y,s.y)}function c0(r,{min:i,max:s},a){return i!==void 0&&rs&&(r=a?ke(s,r,a.max):Math.min(r,s)),r}function Dd(r,i,s){return{min:i!==void 0?r.min+i:void 0,max:s!==void 0?r.max+s-(r.max-r.min):void 0}}function f0(r,{top:i,left:s,bottom:a,right:c}){return{x:Dd(r.x,s,c),y:Dd(r.y,i,a)}}function Ld(r,i){let s=i.min-r.min,a=i.max-r.max;return i.max-i.mina?s=mr(i.min,i.max-a,r.min):a>c&&(s=mr(r.min,r.max-c,i.min)),Yt(0,1,s)}function p0(r,i){const s={};return i.min!==void 0&&(s.min=i.min-r.min),i.max!==void 0&&(s.max=i.max-r.min),s}const ya=.35;function m0(r=ya){return r===!1?r=0:r===!0&&(r=ya),{x:Vd(r,"left","right"),y:Vd(r,"top","bottom")}}function Vd(r,i,s){return{min:_d(r,i),max:_d(r,s)}}function _d(r,i){return typeof r=="number"?r:r[i]||0}const Nd=()=>({translate:0,scale:1,origin:0,originPoint:0}),fr=()=>({x:Nd(),y:Nd()}),Fd=()=>({min:0,max:0}),De=()=>({x:Fd(),y:Fd()});function wt(r){return[r("x"),r("y")]}function hp({top:r,left:i,right:s,bottom:a}){return{x:{min:i,max:s},y:{min:r,max:a}}}function g0({x:r,y:i}){return{top:i.min,right:r.max,bottom:i.max,left:r.min}}function y0(r,i){if(!i)return r;const s=i({x:r.left,y:r.top}),a=i({x:r.right,y:r.bottom});return{top:s.y,left:s.x,bottom:a.y,right:a.x}}function bl(r){return r===void 0||r===1}function va({scale:r,scaleX:i,scaleY:s}){return!bl(r)||!bl(i)||!bl(s)}function _n(r){return va(r)||pp(r)||r.z||r.rotate||r.rotateX||r.rotateY||r.skewX||r.skewY}function pp(r){return jd(r.x)||jd(r.y)}function jd(r){return r&&r!=="0%"}function zo(r,i,s){const a=r-s,c=i*a;return s+c}function Od(r,i,s,a,c){return c!==void 0&&(r=zo(r,c,a)),zo(r,s,a)+i}function wa(r,i=0,s=1,a,c){r.min=Od(r.min,i,s,a,c),r.max=Od(r.max,i,s,a,c)}function mp(r,{x:i,y:s}){wa(r.x,i.translate,i.scale,i.originPoint),wa(r.y,s.translate,s.scale,s.originPoint)}const Id=.999999999999,zd=1.0000000000001;function v0(r,i,s,a=!1){const c=s.length;if(!c)return;i.x=i.y=1;let h,f;for(let p=0;pId&&(i.x=1),i.yId&&(i.y=1)}function dr(r,i){r.min=r.min+i,r.max=r.max+i}function Bd(r,i,s,a,c=.5){const h=ke(r.min,r.max,c);wa(r,i,s,h,a)}function hr(r,i){Bd(r.x,i.x,i.scaleX,i.scale,i.originX),Bd(r.y,i.y,i.scaleY,i.scale,i.originY)}function gp(r,i){return hp(y0(r.getBoundingClientRect(),i))}function w0(r,i,s){const a=gp(r,s),{scroll:c}=i;return c&&(dr(a.x,c.offset.x),dr(a.y,c.offset.y)),a}const yp=({current:r})=>r?r.ownerDocument.defaultView:null,S0=new WeakMap;class x0{constructor(i){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=De(),this.visualElement=i}start(i,{snapToCursor:s=!1}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const c=v=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(Ko(v,"page").point)},h=(v,S)=>{const{drag:P,dragPropagation:R,onDragStart:V}=this.getProps();if(P&&!R&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=up(P),!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),wt(N=>{let j=this.getAxisMotionValue(N).get()||0;if(_t.test(j)){const{projection:B}=this.visualElement;if(B&&B.layout){const $=B.layout.layoutBox[N];$&&(j=ft($)*(parseFloat(j)/100))}}this.originPoint[N]=j}),V&&pe.postRender(()=>V(v,S)),ma(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},f=(v,S)=>{const{dragPropagation:P,dragDirectionLock:R,onDirectionLock:V,onDrag:M}=this.getProps();if(!P&&!this.openGlobalLock)return;const{offset:N}=S;if(R&&this.currentDirection===null){this.currentDirection=P0(N),this.currentDirection!==null&&V&&V(this.currentDirection);return}this.updateAxis("x",S.point,N),this.updateAxis("y",S.point,N),this.visualElement.render(),M&&M(v,S)},p=(v,S)=>this.stop(v,S),m=()=>wt(v=>{var S;return this.getAnimationState(v)==="paused"&&((S=this.getAxisMotionValue(v).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new sp(i,{onSessionStart:c,onStart:h,onMove:f,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:yp(this.visualElement)})}stop(i,s){const a=this.isDragging;if(this.cancel(),!a)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&pe.postRender(()=>h(i,s))}cancel(){this.isDragging=!1;const{projection:i,animationState:s}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(i,s,a){const{drag:c}=this.getProps();if(!a||!Lo(i,c,this.currentDirection))return;const h=this.getAxisMotionValue(i);let f=this.originPoint[i]+a[i];this.constraints&&this.constraints[i]&&(f=c0(f,this.constraints[i],this.elastic[i])),h.set(f)}resolveConstraints(){var i;const{dragConstraints:s,dragElastic:a}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)===null||i===void 0?void 0:i.layout,h=this.constraints;s&&cr(s)?this.constraints||(this.constraints=this.resolveRefConstraints()):s&&c?this.constraints=f0(c.layoutBox,s):this.constraints=!1,this.elastic=m0(a),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&wt(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=p0(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:s}=this.getProps();if(!i||!cr(i))return!1;const a=i.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=w0(a,c.root,this.visualElement.getTransformPagePoint());let f=d0(c.layout.layoutBox,h);if(s){const p=s(g0(f));this.hasMutatedConstraints=!!p,p&&(f=hp(p))}return f}startAnimation(i){const{drag:s,dragMomentum:a,dragElastic:c,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=wt(v=>{if(!Lo(v,s,this.currentDirection))return;let S=m&&m[v]||{};f&&(S={min:0,max:0});const P=c?200:1e6,R=c?40:1e7,V={type:"inertia",velocity:a?i[v]:0,bounceStiffness:P,bounceDamping:R,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(v,V)});return Promise.all(g).then(p)}startAxisValueAnimation(i,s){const a=this.getAxisMotionValue(i);return ma(this.visualElement,i),a.start(Ba(i,a,0,s,this.visualElement,!1))}stopAnimation(){wt(i=>this.getAxisMotionValue(i).stop())}pauseAnimation(){wt(i=>{var s;return(s=this.getAxisMotionValue(i).animation)===null||s===void 0?void 0:s.pause()})}getAnimationState(i){var s;return(s=this.getAxisMotionValue(i).animation)===null||s===void 0?void 0:s.state}getAxisMotionValue(i){const s=`_drag${i.toUpperCase()}`,a=this.visualElement.getProps(),c=a[s];return c||this.visualElement.getValue(i,(a.initial?a.initial[i]:void 0)||0)}snapToCursor(i){wt(s=>{const{drag:a}=this.getProps();if(!Lo(s,a,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(s);if(c&&c.layout){const{min:f,max:p}=c.layout.layoutBox[s];h.set(i[s]-ke(f,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:s}=this.getProps(),{projection:a}=this.visualElement;if(!cr(s)||!a||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};wt(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const m=p.get();c[f]=h0({min:m,max:m},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),wt(f=>{if(!Lo(f,i,null))return;const p=this.getAxisMotionValue(f),{min:m,max:g}=this.constraints[f];p.set(ke(m,g,c[f]))})}addListeners(){if(!this.visualElement.current)return;S0.set(this.visualElement,this);const i=this.visualElement.current,s=Qt(i,"pointerdown",m=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&this.start(m)}),a=()=>{const{dragConstraints:m}=this.getProps();cr(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,h=c.addEventListener("measure",a);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),pe.read(a);const f=$t(window,"resize",()=>this.scalePositionWithinConstraints()),p=c.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(wt(v=>{const S=this.getAxisMotionValue(v);S&&(this.originPoint[v]+=m[v].translate,S.set(S.get()+m[v].translate))}),this.visualElement.render())});return()=>{f(),s(),h(),p&&p()}}getProps(){const i=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:a=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:f=ya,dragMomentum:p=!0}=i;return{...i,drag:s,dragDirectionLock:a,dragPropagation:c,dragConstraints:h,dragElastic:f,dragMomentum:p}}}function Lo(r,i,s){return(i===!0||i===r)&&(s===null||s===r)}function P0(r,i=10){let s=null;return Math.abs(r.y)>i?s="y":Math.abs(r.x)>i&&(s="x"),s}class T0 extends vn{constructor(i){super(i),this.removeGroupControls=Ge,this.removeListeners=Ge,this.controls=new x0(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ge}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ud=r=>(i,s)=>{r&&pe.postRender(()=>r(i,s))};class k0 extends vn{constructor(){super(...arguments),this.removePointerDownListener=Ge}onPointerDown(i){this.session=new sp(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yp(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:s,onPan:a,onPanEnd:c}=this.node.getProps();return{onSessionStart:Ud(i),onStart:Ud(s),onMove:a,onEnd:(h,f)=>{delete this.session,c&&pe.postRender(()=>c(h,f))}}}mount(){this.removePointerDownListener=Qt(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ka=J.createContext(null);function C0(){const r=J.useContext(Ka);if(r===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:a}=r,c=J.useId();J.useEffect(()=>a(c),[]);const h=J.useCallback(()=>s&&s(c),[c,s]);return!i&&s?[!1,h]:[!0]}const vp=J.createContext({}),wp=J.createContext({}),_o={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wd(r,i){return i.max===i.min?0:r/(i.max-i.min)*100}const ii={correct:(r,i)=>{if(!i.target)return r;if(typeof r=="string")if(q.test(r))r=parseFloat(r);else return r;const s=Wd(r,i.target.x),a=Wd(r,i.target.y);return`${s}% ${a}%`}},E0={correct:(r,{treeScale:i,projectionDelta:s})=>{const a=r,c=yn.parse(r);if(c.length>5)return a;const h=yn.createTransformer(r),f=typeof c[0]!="number"?1:0,p=s.x.scale*i.x,m=s.y.scale*i.y;c[0+f]/=p,c[1+f]/=m;const g=ke(p,m,.5);return typeof c[2+f]=="number"&&(c[2+f]/=g),typeof c[3+f]=="number"&&(c[3+f]/=g),h(c)}},Bo={};function R0(r){Object.assign(Bo,r)}const{schedule:Ga,cancel:pw}=vh(queueMicrotask,!1);class A0 extends J.Component{componentDidMount(){const{visualElement:i,layoutGroup:s,switchLayoutGroup:a,layoutId:c}=this.props,{projection:h}=i;R0(M0),h&&(s.group&&s.group.add(h),a&&a.register&&c&&a.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),_o.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:s,visualElement:a,drag:c,isPresent:h}=this.props,f=a.projection;return f&&(f.isPresent=h,c||i.layoutDependency!==s||s===void 0?f.willUpdate():this.safeToRemove(),i.isPresent!==h&&(h?f.promote():f.relegate()||pe.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:i}=this.props.visualElement;i&&(i.root.didUpdate(),Ga.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:s,switchLayoutGroup:a}=this.props,{projection:c}=i;c&&(c.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(c),a&&a.deregister&&a.deregister(c))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function Sp(r){const[i,s]=C0(),a=J.useContext(vp);return re.jsx(A0,{...r,layoutGroup:a,switchLayoutGroup:J.useContext(wp),isPresent:i,safeToRemove:s})}const M0={borderRadius:{...ii,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ii,borderTopRightRadius:ii,borderBottomLeftRadius:ii,borderBottomRightRadius:ii,boxShadow:E0},xp=["TopLeft","TopRight","BottomLeft","BottomRight"],D0=xp.length,$d=r=>typeof r=="string"?parseFloat(r):r,Hd=r=>typeof r=="number"||q.test(r);function L0(r,i,s,a,c,h){c?(r.opacity=ke(0,s.opacity!==void 0?s.opacity:1,V0(a)),r.opacityExit=ke(i.opacity!==void 0?i.opacity:1,0,_0(a))):h&&(r.opacity=ke(i.opacity!==void 0?i.opacity:1,s.opacity!==void 0?s.opacity:1,a));for(let f=0;fai?1:s(mr(r,i,a))}function Gd(r,i){r.min=i.min,r.max=i.max}function vt(r,i){Gd(r.x,i.x),Gd(r.y,i.y)}function Qd(r,i){r.translate=i.translate,r.scale=i.scale,r.originPoint=i.originPoint,r.origin=i.origin}function Yd(r,i,s,a,c){return r-=i,r=zo(r,1/s,a),c!==void 0&&(r=zo(r,1/c,a)),r}function N0(r,i=0,s=1,a=.5,c,h=r,f=r){if(_t.test(i)&&(i=parseFloat(i),i=ke(f.min,f.max,i/100)-f.min),typeof i!="number")return;let p=ke(h.min,h.max,a);r===h&&(p-=i),r.min=Yd(r.min,i,s,p,c),r.max=Yd(r.max,i,s,p,c)}function Xd(r,i,[s,a,c],h,f){N0(r,i[s],i[a],i[c],i.scale,h,f)}const F0=["x","scaleX","originX"],j0=["y","scaleY","originY"];function Zd(r,i,s,a){Xd(r.x,i,F0,s?s.x:void 0,a?a.x:void 0),Xd(r.y,i,j0,s?s.y:void 0,a?a.y:void 0)}function qd(r){return r.translate===0&&r.scale===1}function Tp(r){return qd(r.x)&&qd(r.y)}function Jd(r,i){return r.min===i.min&&r.max===i.max}function O0(r,i){return Jd(r.x,i.x)&&Jd(r.y,i.y)}function bd(r,i){return Math.round(r.min)===Math.round(i.min)&&Math.round(r.max)===Math.round(i.max)}function kp(r,i){return bd(r.x,i.x)&&bd(r.y,i.y)}function eh(r){return ft(r.x)/ft(r.y)}function th(r,i){return r.translate===i.translate&&r.scale===i.scale&&r.originPoint===i.originPoint}class I0{constructor(){this.members=[]}add(i){Ua(this.members,i),i.scheduleRender()}remove(i){if(Wa(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(i){const s=this.members.findIndex(c=>i===c);if(s===0)return!1;let a;for(let c=s;c>=0;c--){const h=this.members[c];if(h.isPresent!==!1){a=h;break}}return a?(this.promote(a),!0):!1}promote(i,s){const a=this.lead;if(i!==a&&(this.prevLead=a,this.lead=i,i.show(),a)){a.instance&&a.scheduleRender(),i.scheduleRender(),i.resumeFrom=a,s&&(i.resumeFrom.preserveOpacity=!0),a.snapshot&&(i.snapshot=a.snapshot,i.snapshot.latestValues=a.animationValues||a.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:c}=i.options;c===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:s,resumingFrom:a}=i;s.onExitComplete&&s.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function z0(r,i,s){let a="";const c=r.x.translate/i.x,h=r.y.translate/i.y,f=s?.z||0;if((c||h||f)&&(a=`translate3d(${c}px, ${h}px, ${f}px) `),(i.x!==1||i.y!==1)&&(a+=`scale(${1/i.x}, ${1/i.y}) `),s){const{transformPerspective:g,rotate:v,rotateX:S,rotateY:P,skewX:R,skewY:V}=s;g&&(a=`perspective(${g}px) ${a}`),v&&(a+=`rotate(${v}deg) `),S&&(a+=`rotateX(${S}deg) `),P&&(a+=`rotateY(${P}deg) `),R&&(a+=`skewX(${R}deg) `),V&&(a+=`skewY(${V}deg) `)}const p=r.x.scale*i.x,m=r.y.scale*i.y;return(p!==1||m!==1)&&(a+=`scale(${p}, ${m})`),a||"none"}const B0=(r,i)=>r.depth-i.depth;class U0{constructor(){this.children=[],this.isDirty=!1}add(i){Ua(this.children,i),this.isDirty=!0}remove(i){Wa(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(B0),this.isDirty=!1,this.children.forEach(i)}}function No(r){const i=Ke(r)?r.get():r;return Vv(i)?i.toValue():i}function W0(r,i){const s=Nt.now(),a=({timestamp:c})=>{const h=c-s;h>=i&&(gn(a),r(h-i))};return pe.read(a,!0),()=>gn(a)}function $0(r){return r instanceof SVGElement&&r.tagName!=="svg"}function H0(r,i,s){const a=Ke(r)?r:hi(r);return a.start(Ba("",a,i,s)),a.animation}const Nn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},si=typeof window<"u"&&window.MotionDebug!==void 0,ea=["","X","Y","Z"],K0={visibility:"hidden"},nh=1e3;let G0=0;function ta(r,i,s,a){const{latestValues:c}=i;c[r]&&(s[r]=c[r],i.setStaticValue(r,0),a&&(a[r]=0))}function Cp(r){if(r.hasCheckedOptimisedAppear=!0,r.root===r)return;const{visualElement:i}=r.options;if(!i)return;const s=np(i);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:c,layoutId:h}=r.options;window.MotionCancelOptimisedAnimation(s,"transform",pe,!(c||h))}const{parent:a}=r;a&&!a.hasCheckedOptimisedAppear&&Cp(a)}function Ep({attachResizeListener:r,defaultParent:i,measureScroll:s,checkIsScrollRoot:a,resetTransform:c}){return class{constructor(f={},p=i?.()){this.id=G0++,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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,si&&(Nn.totalNodes=Nn.resolvedTargetDeltas=Nn.recalculatedProjection=0),this.nodes.forEach(X0),this.nodes.forEach(e1),this.nodes.forEach(t1),this.nodes.forEach(Z0),si&&window.MotionDebug.record(Nn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;mthis.root.updateBlockedByResize=!1;r(f,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=W0(P,250),_o.hasAnimatedSinceResize&&(_o.hasAnimatedSinceResize=!1,this.nodes.forEach(ih))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&v&&(m||g)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:P,hasRelativeTargetChanged:R,layout:V})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||v.getDefaultTransition()||s1,{onLayoutAnimationStart:N,onLayoutAnimationComplete:j}=v.getProps(),B=!this.targetLayout||!kp(this.targetLayout,V)||R,$=!P&&R;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||$||P&&(B||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,$);const ee={...Ea(M,"layout"),onPlay:N,onComplete:j};(v.shouldReduceMotion||this.options.layoutRoot)&&(ee.delay=0,ee.type=!1),this.startAnimation(ee)}else P||ih(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=V})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gn(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(n1),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cp(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{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 m=0;m{const G=ee/1e3;oh(S.x,f.x,G),oh(S.y,f.y,G),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ui(P,this.layout.layoutBox,this.relativeParent.layout.layoutBox),i1(this.relativeTarget,this.relativeTargetOrigin,P,G),$&&O0(this.relativeTarget,$)&&(this.isProjectionDirty=!1),$||($=De()),vt($,this.relativeTarget)),M&&(this.animationValues=v,L0(v,g,this.latestValues,G,B,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=G},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{_o.hasAnimatedSinceResize=!0,this.currentAnimation=H0(0,nh,{...f,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onComplete:()=>{f.onComplete&&f.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 f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:v}=f;if(!(!p||!m||!g)){if(this!==f&&this.layout&&g&&Rp(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||De();const S=ft(this.layout.layoutBox.x);m.x.min=f.target.x.min,m.x.max=m.x.min+S;const P=ft(this.layout.layoutBox.y);m.y.min=f.target.y.min,m.y.max=m.y.min+P}vt(p,m),hr(p,v),ai(this.projectionDeltaWithTransform,this.layoutCorrected,p,v)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new I0),this.sharedNodes.get(f).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:p}=this.options;return p?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:p}=this.options;return p?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:m}=f;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&ta("z",f,g,this.animationValues);for(let v=0;v{var p;return(p=f.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(rh),this.root.sharedNodes.clear()}}}function Q0(r){r.updateLayout()}function Y0(r){var i;const s=((i=r.resumeFrom)===null||i===void 0?void 0:i.snapshot)||r.snapshot;if(r.isLead()&&r.layout&&s&&r.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:c}=r.layout,{animationType:h}=r.options,f=s.source!==r.layout.source;h==="size"?wt(S=>{const P=f?s.measuredBox[S]:s.layoutBox[S],R=ft(P);P.min=a[S].min,P.max=P.min+R}):Rp(h,s.layoutBox,a)&&wt(S=>{const P=f?s.measuredBox[S]:s.layoutBox[S],R=ft(a[S]);P.max=P.min+R,r.relativeTarget&&!r.currentAnimation&&(r.isProjectionDirty=!0,r.relativeTarget[S].max=r.relativeTarget[S].min+R)});const p=fr();ai(p,a,s.layoutBox);const m=fr();f?ai(m,r.applyTransform(c,!0),s.measuredBox):ai(m,a,s.layoutBox);const g=!Tp(p);let v=!1;if(!r.resumeFrom){const S=r.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:P,layout:R}=S;if(P&&R){const V=De();ui(V,s.layoutBox,P.layoutBox);const M=De();ui(M,a,R.layoutBox),kp(V,M)||(v=!0),S.options.layoutRoot&&(r.relativeTarget=M,r.relativeTargetOrigin=V,r.relativeParent=S)}}}r.notifyListeners("didUpdate",{layout:a,snapshot:s,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:v})}else if(r.isLead()){const{onExitComplete:a}=r.options;a&&a()}r.options.transition=void 0}function X0(r){si&&Nn.totalNodes++,r.parent&&(r.isProjecting()||(r.isProjectionDirty=r.parent.isProjectionDirty),r.isSharedProjectionDirty||(r.isSharedProjectionDirty=!!(r.isProjectionDirty||r.parent.isProjectionDirty||r.parent.isSharedProjectionDirty)),r.isTransformDirty||(r.isTransformDirty=r.parent.isTransformDirty))}function Z0(r){r.isProjectionDirty=r.isSharedProjectionDirty=r.isTransformDirty=!1}function q0(r){r.clearSnapshot()}function rh(r){r.clearMeasurements()}function J0(r){r.isLayoutDirty=!1}function b0(r){const{visualElement:i}=r.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),r.resetTransform()}function ih(r){r.finishAnimation(),r.targetDelta=r.relativeTarget=r.target=void 0,r.isProjectionDirty=!0}function e1(r){r.resolveTargetDelta()}function t1(r){r.calcProjection()}function n1(r){r.resetSkewAndRotation()}function r1(r){r.removeLeadSnapshot()}function oh(r,i,s){r.translate=ke(i.translate,0,s),r.scale=ke(i.scale,1,s),r.origin=i.origin,r.originPoint=i.originPoint}function sh(r,i,s,a){r.min=ke(i.min,s.min,a),r.max=ke(i.max,s.max,a)}function i1(r,i,s,a){sh(r.x,i.x,s.x,a),sh(r.y,i.y,s.y,a)}function o1(r){return r.animationValues&&r.animationValues.opacityExit!==void 0}const s1={duration:.45,ease:[.4,0,.1,1]},lh=r=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(r),ah=lh("applewebkit/")&&!lh("chrome/")?Math.round:Ge;function uh(r){r.min=ah(r.min),r.max=ah(r.max)}function l1(r){uh(r.x),uh(r.y)}function Rp(r,i,s){return r==="position"||r==="preserve-aspect"&&!a0(eh(i),eh(s),.2)}function a1(r){var i;return r!==r.root&&((i=r.scroll)===null||i===void 0?void 0:i.wasRoot)}const u1=Ep({attachResizeListener:(r,i)=>$t(r,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),na={current:void 0},Ap=Ep({measureScroll:r=>({x:r.scrollLeft,y:r.scrollTop}),defaultParent:()=>{if(!na.current){const r=new u1({});r.mount(window),r.setOptions({layoutScroll:!0}),na.current=r}return na.current},resetTransform:(r,i)=>{r.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:r=>window.getComputedStyle(r).position==="fixed"}),c1={pan:{Feature:k0},drag:{Feature:T0,ProjectionNode:Ap,MeasureLayout:Sp}};function ch(r,i){const s=i?"pointerenter":"pointerleave",a=i?"onHoverStart":"onHoverEnd",c=(h,f)=>{if(h.pointerType==="touch"||cp())return;const p=r.getProps();r.animationState&&p.whileHover&&r.animationState.setActive("whileHover",i);const m=p[a];m&&pe.postRender(()=>m(h,f))};return Qt(r.current,s,c,{passive:!r.getProps()[a]})}class f1 extends vn{mount(){this.unmount=Gt(ch(this.node,!0),ch(this.node,!1))}unmount(){}}class d1 extends vn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!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=Gt($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Mp=(r,i)=>i?r===i?!0:Mp(r,i.parentElement):!1;function ra(r,i){if(!i)return;const s=new PointerEvent("pointer"+r);i(s,Ko(s))}class h1 extends vn{constructor(){super(...arguments),this.removeStartListeners=Ge,this.removeEndListeners=Ge,this.removeAccessibleListeners=Ge,this.startPointerPress=(i,s)=>{if(this.isPressing)return;this.removeEndListeners();const a=this.node.getProps(),h=Qt(window,"pointerup",(p,m)=>{if(!this.checkPressEnd())return;const{onTap:g,onTapCancel:v,globalTapTarget:S}=this.node.getProps(),P=!S&&!Mp(this.node.current,p.target)?v:g;P&&pe.update(()=>P(p,m))},{passive:!(a.onTap||a.onPointerUp)}),f=Qt(window,"pointercancel",(p,m)=>this.cancelPress(p,m),{passive:!(a.onTapCancel||a.onPointerCancel)});this.removeEndListeners=Gt(h,f),this.startPress(i,s)},this.startAccessiblePress=()=>{const i=h=>{if(h.key!=="Enter"||this.isPressing)return;const f=p=>{p.key!=="Enter"||!this.checkPressEnd()||ra("up",(m,g)=>{const{onTap:v}=this.node.getProps();v&&pe.postRender(()=>v(m,g))})};this.removeEndListeners(),this.removeEndListeners=$t(this.node.current,"keyup",f),ra("down",(p,m)=>{this.startPress(p,m)})},s=$t(this.node.current,"keydown",i),a=()=>{this.isPressing&&ra("cancel",(h,f)=>this.cancelPress(h,f))},c=$t(this.node.current,"blur",a);this.removeAccessibleListeners=Gt(s,c)}}startPress(i,s){this.isPressing=!0;const{onTapStart:a,whileTap:c}=this.node.getProps();c&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),a&&pe.postRender(()=>a(i,s))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!cp()}cancelPress(i,s){if(!this.checkPressEnd())return;const{onTapCancel:a}=this.node.getProps();a&&pe.postRender(()=>a(i,s))}mount(){const i=this.node.getProps(),s=Qt(i.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(i.onTapStart||i.onPointerStart)}),a=$t(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Gt(s,a)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Sa=new WeakMap,ia=new WeakMap,p1=r=>{const i=Sa.get(r.target);i&&i(r)},m1=r=>{r.forEach(p1)};function g1({root:r,...i}){const s=r||document;ia.has(s)||ia.set(s,{});const a=ia.get(s),c=JSON.stringify(i);return a[c]||(a[c]=new IntersectionObserver(m1,{root:r,...i})),a[c]}function y1(r,i,s){const a=g1(i);return Sa.set(r,s),a.observe(r),()=>{Sa.delete(r),a.unobserve(r)}}const v1={some:0,all:1};class w1 extends vn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:s,margin:a,amount:c="some",once:h}=i,f={root:s?s.current:void 0,rootMargin:a,threshold:typeof c=="number"?c:v1[c]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,h&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:S}=this.node.getProps(),P=g?v:S;P&&P(m)};return y1(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:s}=this.node;["amount","margin","root"].some(S1(i,s))&&this.startObserver()}unmount(){}}function S1({viewport:r={}},{viewport:i={}}={}){return s=>r[s]!==i[s]}const x1={inView:{Feature:w1},tap:{Feature:h1},focus:{Feature:d1},hover:{Feature:f1}},P1={layout:{ProjectionNode:Ap,MeasureLayout:Sp}},Dp=J.createContext({transformPagePoint:r=>r,isStatic:!1,reducedMotion:"never"}),Go=J.createContext({}),Qa=typeof window<"u",T1=Qa?J.useLayoutEffect:J.useEffect,Lp=J.createContext({strict:!1});function k1(r,i,s,a,c){var h,f;const{visualElement:p}=J.useContext(Go),m=J.useContext(Lp),g=J.useContext(Ka),v=J.useContext(Dp).reducedMotion,S=J.useRef();a=a||m.renderer,!S.current&&a&&(S.current=a(r,{visualState:i,parent:p,props:s,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const P=S.current,R=J.useContext(wp);P&&!P.projection&&c&&(P.type==="html"||P.type==="svg")&&C1(S.current,s,c,R);const V=J.useRef(!1);J.useInsertionEffect(()=>{P&&V.current&&P.update(s,g)});const M=s[tp],N=J.useRef(!!M&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,M))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,M)));return T1(()=>{P&&(V.current=!0,window.MotionIsMounted=!0,P.updateFeatures(),Ga.render(P.render),N.current&&P.animationState&&P.animationState.animateChanges())}),J.useEffect(()=>{P&&(!N.current&&P.animationState&&P.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)===null||j===void 0||j.call(window,M)}),N.current=!1))}),P}function C1(r,i,s,a){const{layoutId:c,layout:h,drag:f,dragConstraints:p,layoutScroll:m,layoutRoot:g}=i;r.projection=new s(r.latestValues,i["data-framer-portal-id"]?void 0:Vp(r.parent)),r.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!f||p&&cr(p),visualElement:r,animationType:typeof h=="string"?h:"both",initialPromotionConfig:a,layoutScroll:m,layoutRoot:g})}function Vp(r){if(r)return r.options.allowProjection!==!1?r.projection:Vp(r.parent)}function E1(r,i,s){return J.useCallback(a=>{a&&r.mount&&r.mount(a),i&&(a?i.mount(a):i.unmount()),s&&(typeof s=="function"?s(a):cr(s)&&(s.current=a))},[i])}function Qo(r){return Wo(r.animate)||Ca.some(i=>ci(r[i]))}function _p(r){return!!(Qo(r)||r.variants)}function R1(r,i){if(Qo(r)){const{initial:s,animate:a}=r;return{initial:s===!1||ci(s)?s:void 0,animate:ci(a)?a:void 0}}return r.inherit!==!1?i:{}}function A1(r){const{initial:i,animate:s}=R1(r,J.useContext(Go));return J.useMemo(()=>({initial:i,animate:s}),[fh(i),fh(s)])}function fh(r){return Array.isArray(r)?r.join(" "):r}const dh={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"]},gr={};for(const r in dh)gr[r]={isEnabled:i=>dh[r].some(s=>!!i[s])};function M1(r){for(const i in r)gr[i]={...gr[i],...r[i]}}const D1=Symbol.for("motionComponentSymbol");function L1({preloadedFeatures:r,createVisualElement:i,useRender:s,useVisualState:a,Component:c}){r&&M1(r);function h(p,m){let g;const v={...J.useContext(Dp),...p,layoutId:V1(p)},{isStatic:S}=v,P=A1(p),R=a(p,S);if(!S&&Qa){_1();const V=N1(v);g=V.MeasureLayout,P.visualElement=k1(c,R,v,i,V.ProjectionNode)}return re.jsxs(Go.Provider,{value:P,children:[g&&P.visualElement?re.jsx(g,{visualElement:P.visualElement,...v}):null,s(c,p,E1(R,P.visualElement,m),R,S,P.visualElement)]})}const f=J.forwardRef(h);return f[D1]=c,f}function V1({layoutId:r}){const i=J.useContext(vp).id;return i&&r!==void 0?i+"-"+r:r}function _1(r,i){J.useContext(Lp).strict}function N1(r){const{drag:i,layout:s}=gr;if(!i&&!s)return{};const a={...i,...s};return{MeasureLayout:i?.isEnabled(r)||s?.isEnabled(r)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}const F1=["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 Ya(r){return typeof r!="string"||r.includes("-")?!1:!!(F1.indexOf(r)>-1||/[A-Z]/u.test(r))}function Np(r,{style:i,vars:s},a,c){Object.assign(r.style,i,c&&c.getProjectionStyles(a));for(const h in s)r.style.setProperty(h,s[h])}const Fp=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 jp(r,i,s,a){Np(r,i,void 0,a);for(const c in i.attrs)r.setAttribute(Fp.has(c)?c:Ha(c),i.attrs[c])}function Op(r,{layout:i,layoutId:s}){return On.has(r)||r.startsWith("origin")||(i||s!==void 0)&&(!!Bo[r]||r==="opacity")}function Xa(r,i,s){var a;const{style:c}=r,h={};for(const f in c)(Ke(c[f])||i.style&&Ke(i.style[f])||Op(f,r)||((a=s?.getValue(f))===null||a===void 0?void 0:a.liveStyle)!==void 0)&&(h[f]=c[f]);return h}function Ip(r,i,s){const a=Xa(r,i,s);for(const c in r)if(Ke(r[c])||Ke(i[c])){const h=pi.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;a[h]=r[c]}return a}function j1(r){const i=J.useRef(null);return i.current===null&&(i.current=r()),i.current}function O1({scrapeMotionValuesFromProps:r,createRenderState:i,onMount:s},a,c,h){const f={latestValues:I1(a,c,h,r),renderState:i()};return s&&(f.mount=p=>s(a,p,f)),f}const zp=r=>(i,s)=>{const a=J.useContext(Go),c=J.useContext(Ka),h=()=>O1(r,i,a,c);return s?h():j1(h)};function I1(r,i,s,a){const c={},h=a(r,{});for(const P in h)c[P]=No(h[P]);let{initial:f,animate:p}=r;const m=Qo(r),g=_p(r);i&&g&&!m&&r.inherit!==!1&&(f===void 0&&(f=i.initial),p===void 0&&(p=i.animate));let v=s?s.initial===!1:!1;v=v||f===!1;const S=v?p:f;if(S&&typeof S!="boolean"&&!Wo(S)){const P=Array.isArray(S)?S:[S];for(let R=0;R({style:{},transform:{},transformOrigin:{},vars:{}}),Bp=()=>({...Za(),attrs:{}}),Up=(r,i)=>i&&typeof r=="number"?i.transform(r):r,z1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},B1=pi.length;function U1(r,i,s){let a="",c=!0;for(let h=0;htypeof r=="string"&&r.toLowerCase()==="svg",G1={useVisualState:zp({scrapeMotionValuesFromProps:Ip,createRenderState:Bp,onMount:(r,i,{renderState:s,latestValues:a})=>{pe.read(()=>{try{s.dimensions=typeof i.getBBox=="function"?i.getBBox():i.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}),pe.render(()=>{Ja(s,a,ba(i.tagName),r.transformTemplate),jp(i,s)})}})},Q1={useVisualState:zp({scrapeMotionValuesFromProps:Xa,createRenderState:Za})};function Wp(r,i,s){for(const a in i)!Ke(i[a])&&!Op(a,s)&&(r[a]=i[a])}function Y1({transformTemplate:r},i){return J.useMemo(()=>{const s=Za();return qa(s,i,r),Object.assign({},s.vars,s.style)},[i])}function X1(r,i){const s=r.style||{},a={};return Wp(a,s,r),Object.assign(a,Y1(r,i)),a}function Z1(r,i){const s={},a=X1(r,i);return r.drag&&r.dragListener!==!1&&(s.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=r.drag===!0?"none":`pan-${r.drag==="x"?"y":"x"}`),r.tabIndex===void 0&&(r.onTap||r.onTapStart||r.whileTap)&&(s.tabIndex=0),s.style=a,s}const q1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Uo(r){return r.startsWith("while")||r.startsWith("drag")&&r!=="draggable"||r.startsWith("layout")||r.startsWith("onTap")||r.startsWith("onPan")||r.startsWith("onLayout")||q1.has(r)}let $p=r=>!Uo(r);function J1(r){r&&($p=i=>i.startsWith("on")?!Uo(i):r(i))}try{J1(require("@emotion/is-prop-valid").default)}catch{}function b1(r,i,s){const a={};for(const c in r)c==="values"&&typeof r.values=="object"||($p(c)||s===!0&&Uo(c)||!i&&!Uo(c)||r.draggable&&c.startsWith("onDrag"))&&(a[c]=r[c]);return a}function ew(r,i,s,a){const c=J.useMemo(()=>{const h=Bp();return Ja(h,i,ba(a),r.transformTemplate),{...h.attrs,style:{...h.style}}},[i]);if(r.style){const h={};Wp(h,r.style,r),c.style={...h,...c.style}}return c}function tw(r=!1){return(s,a,c,{latestValues:h},f)=>{const m=(Ya(s)?ew:Z1)(a,h,f,s),g=b1(a,typeof s=="string",r),v=s!==J.Fragment?{...g,...m,ref:c}:{},{children:S}=a,P=J.useMemo(()=>Ke(S)?S.get():S,[S]);return J.createElement(s,{...v,children:P})}}function nw(r,i){return function(a,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...Ya(a)?G1:Q1,preloadedFeatures:r,useRender:tw(c),createVisualElement:i,Component:a};return L1(f)}}const xa={current:null},Hp={current:!1};function rw(){if(Hp.current=!0,!!Qa)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),i=()=>xa.current=r.matches;r.addListener(i),i()}else xa.current=!1}function iw(r,i,s){for(const a in i){const c=i[a],h=s[a];if(Ke(c))r.addValue(a,c);else if(Ke(h))r.addValue(a,hi(c,{owner:r}));else if(h!==c)if(r.hasValue(a)){const f=r.getValue(a);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=r.getStaticValue(a);r.addValue(a,hi(f!==void 0?f:c,{owner:r}))}}for(const a in s)i[a]===void 0&&r.removeValue(a);return i}const ph=new WeakMap,ow=[..._h,He,yn],sw=r=>ow.find(Vh(r)),mh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lw{scrapeMotionValuesFromProps(i,s,a){return{}}constructor({parent:i,props:s,presenceContext:a,reducedMotionConfig:c,blockInitialAnimation:h,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Da,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const P=Nt.now();this.renderScheduledAtthis.bindToMotionValue(a,s)),Hp.current||rw(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xa.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ph.delete(this.current),this.projection&&this.projection.unmount(),gn(this.notifyUpdate),gn(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const s=this.features[i];s&&(s.unmount(),s.isMounted=!1)}this.current=null}bindToMotionValue(i,s){this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)();const a=On.has(i),c=s.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&pe.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),h=s.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,i,s)),this.valueSubscriptions.set(i,()=>{c(),h(),f&&f(),s.owner&&s.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in gr){const s=gr[i];if(!s)continue;const{isEnabled:a,Feature:c}=s;if(!this.features[i]&&c&&a(this.props)&&(this.features[i]=new c(this)),this.features[i]){const h=this.features[i];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):De()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,s){this.latestValues[i]=s}update(i,s){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let a=0;as.variantChildren.delete(i)}addValue(i,s){const a=this.values.get(i);s!==a&&(a&&this.removeValue(i),this.bindToMotionValue(i,s),this.values.set(i,s),this.latestValues[i]=s.get())}removeValue(i){this.values.delete(i);const s=this.valueSubscriptions.get(i);s&&(s(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,s){if(this.props.values&&this.props.values[i])return this.props.values[i];let a=this.values.get(i);return a===void 0&&s!==void 0&&(a=hi(s===null?void 0:s,{owner:this}),this.addValue(i,a)),a}readValue(i,s){var a;let c=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(a=this.getBaseTargetFromProps(this.props,i))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,i,this.options);return c!=null&&(typeof c=="string"&&(Ah(c)||Rh(c))?c=parseFloat(c):!sw(c)&&yn.test(s)&&(c=Uh(i,s)),this.setBaseTarget(i,Ke(c)?c.get():c)),Ke(c)?c.get():c}setBaseTarget(i,s){this.baseTarget[i]=s}getBaseTarget(i){var s;const{initial:a}=this.props;let c;if(typeof a=="string"||typeof a=="object"){const f=Ta(this.props,a,(s=this.presenceContext)===null||s===void 0?void 0:s.custom);f&&(c=f[i])}if(a&&c!==void 0)return c;const h=this.getBaseTargetFromProps(this.props,i);return h!==void 0&&!Ke(h)?h:this.initialValues[i]!==void 0&&c===void 0?void 0:this.baseTarget[i]}on(i,s){return this.events[i]||(this.events[i]=new $a),this.events[i].add(s)}notify(i,...s){this.events[i]&&this.events[i].notify(...s)}}class Kp extends lw{constructor(){super(...arguments),this.KeyframeResolver=Wh}sortInstanceNodePosition(i,s){return i.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(i,s){return i.style?i.style[s]:void 0}removeValueFromRenderState(i,{vars:s,style:a}){delete s[i],delete a[i]}}function aw(r){return window.getComputedStyle(r)}class uw extends Kp{constructor(){super(...arguments),this.type="html",this.renderInstance=Np}readValueFromInstance(i,s){if(On.has(s)){const a=Na(s);return a&&a.default||0}else{const a=aw(i),c=(Dh(s)?a.getPropertyValue(s):a[s])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(i,{transformPagePoint:s}){return gp(i,s)}build(i,s,a){qa(i,s,a.transformTemplate)}scrapeMotionValuesFromProps(i,s,a){return Xa(i,s,a)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Ke(i)&&(this.childSubscription=i.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class cw extends Kp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=De}getBaseTargetFromProps(i,s){return i[s]}readValueFromInstance(i,s){if(On.has(s)){const a=Na(s);return a&&a.default||0}return s=Fp.has(s)?s:Ha(s),i.getAttribute(s)}scrapeMotionValuesFromProps(i,s,a){return Ip(i,s,a)}build(i,s,a){Ja(i,s,this.isSVGTag,a.transformTemplate)}renderInstance(i,s,a,c){jp(i,s,a,c)}mount(i){this.isSVGTag=ba(i.tagName),super.mount(i)}}const fw=(r,i)=>Ya(r)?new cw(i):new uw(i,{allowProjection:r!==J.Fragment}),dw=nw({...bv,...x1,...c1,...P1},fw),gh=qg(dw);function hw(){const r=J.useRef(null),[i,s]=J.useState("Speech synthesis is the artificial production of human speech."),[a,c]=J.useState("male_1"),[h,f]=J.useState(null),[p,m]=J.useState(null),[g,v]=J.useState("Detecting WebGPU support..."),[S,P]=J.useState([]);J.useEffect(()=>{r.current??=new Worker(new URL("/assets/worker-BKr81zhZ.js",import.meta.url),{type:"module"});const V=N=>{switch(N.data.status){case"feature-success":v("Loading model (only downloaded once)...");break;case"feature-error":m(N.data.data);break;case"ready":f("ready");break;case"complete":const{audio:j,text:B}=N.data;P($=>[{text:B,src:j},...$]),f("ready");break}},M=N=>{console.error("Worker error:",N)};return r.current.addEventListener("message",V),r.current.addEventListener("error",M),()=>{r.current.removeEventListener("message",V),r.current.removeEventListener("error",M)}},[]);const R=V=>{V.preventDefault(),f("running"),r.current.postMessage({type:"generate",text:i.trim(),speaker_id:a})};return re.jsxs("div",{className:"relative w-full min-h-screen bg-gradient-to-br from-gray-900 to-gray-700 flex flex-col items-center justify-center p-4 relative overflow-hidden font-sans",children:[re.jsxs(gh.div,{initial:{opacity:1},animate:{opacity:h===null?1:0},transition:{duration:.5},className:"absolute w-screen h-screen justify-center flex flex-col items-center z-10 bg-gray-800/95 backdrop-blur-md",style:{pointerEvents:h===null?"auto":"none"},children:[re.jsx("div",{className:"w-[250px] h-[250px] border-4 border-white shadow-[0_0_0_5px_#4973ff] rounded-full overflow-hidden",children:re.jsx("div",{className:"loading-wave"})}),re.jsx("p",{className:`text-3xl my-5 text-center ${p?"text-red-500":"text-white"}`,children:p??g})]}),re.jsxs("div",{className:"max-w-3xl w-full space-y-8 relative z-[2]",children:[re.jsxs("div",{className:"text-center",children:[re.jsx("h1",{className:"text-5xl font-extrabold text-gray-100 mb-2 drop-shadow-lg font-heading",children:"WebGPU Text-to-Speech"}),re.jsxs("p",{className:"text-2xl text-gray-300 font-semibold font-subheading",children:["Powered by ",re.jsx("a",{href:"https://github.com/edwko/OuteTTS",target:"_blank",rel:"noreferrer",className:"underline",children:"OuteTTS"})," and ",re.jsxs("a",{href:"https://huggingface.co/docs/transformers.js",target:"_blank",rel:"noreferrer",className:"underline",children:[re.jsx("img",{width:"40",src:"hf-logo.svg",className:"inline translate-y-[-2px] me-1"}),"Transformers.js"]})]})]}),re.jsx("div",{className:"bg-gray-800/50 backdrop-blur-sm border border-gray-700 rounded-lg p-6",children:re.jsxs("form",{onSubmit:R,className:"space-y-4",children:[re.jsx("textarea",{placeholder:"Enter text...",value:i,onChange:V=>s(V.target.value),className:"w-full min-h-[100px] max-h-[300px] bg-gray-700/50 backdrop-blur-sm border-2 border-gray-600 rounded-xl resize-y text-gray-100 placeholder-gray-400 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",rows:Math.min(8,i.split(` `).length)}),re.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[re.jsxs("select",{value:a,onChange:V=>c(V.target.value),className:"w-full bg-gray-700/50 backdrop-blur-sm border-2 border-gray-600 rounded-xl text-gray-100 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[re.jsx("option",{value:"male_1",children:"Male 1"}),re.jsx("option",{value:"male_2",children:"Male 2"}),re.jsx("option",{value:"male_3",children:"Male 3"}),re.jsx("option",{value:"male_4",children:"Male 4"}),re.jsx("option",{value:"female_1",children:"Female 1"}),re.jsx("option",{value:"female_2",children:"Female 2"}),re.jsx("option",{value:"random",children:"Random"})]}),re.jsx("button",{type:"submit",className:"inline-flex justify-center items-center px-6 py-2 text-lg font-semibold bg-gradient-to-t from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 transition-colors duration-300 rounded-xl text-white disabled:opacity-50",disabled:h==="running"||i.trim()==="",children:h==="running"?"Generating...":"Generate"})]})]})}),S.length>0&&re.jsx(gh.div,{initial:{y:50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5},className:"max-h-[250px] overflow-y-auto px-2 mt-4 space-y-6 relative z-[2]",children:S.map((V,M)=>re.jsx("div",{children:re.jsxs("div",{className:"text-white bg-gray-800/70 backdrop-blur-sm border border-gray-700 rounded-lg p-4 z-10",children:[re.jsxs("span",{className:"absolute right-5 font-bold",children:["#",S.length-M]}),re.jsx("p",{className:"mb-3 max-w-[95%]",children:V.text}),re.jsx("audio",{controls:!0,src:V.src,className:"w-full",children:"Your browser does not support the audio element."})]})},M))})]}),re.jsxs("div",{className:"bg-[#015871] pointer-events-none absolute left-0 w-full h-[5%] bottom-[-50px]",children:[re.jsx("div",{className:"wave"}),re.jsx("div",{className:"wave"})]})]})}Zg.createRoot(document.getElementById("root")).render(re.jsx(J.StrictMode,{children:re.jsx(hw,{})}));